Commit 3ed11f4b authored by vaillancour's avatar vaillancour
Browse files

fixes AMRIO sw_amrwb_evs.bin 16 T02.INP

parent deb00941
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -191,7 +191,11 @@ Word32 Dot_product12( /* (o) Q31: normalized result (1 < va
    Flag Overflow_ignored = 0;
#endif /* BASOP_NOGLOB */

#ifdef BASOP_NOGLOB
    L_sum = L_mac_o(1, x[0], y[0], &Overflow_ignored);
#else
    L_sum = L_mac(1, x[0], y[0]);
#endif
    FOR (i = 1; i < lg; i++)
    {
#ifdef BASOP_NOGLOB
+7 −4
Original line number Diff line number Diff line
@@ -140,9 +140,9 @@ static void lerp_proc(Word16 *f, Word16 *f_out, Word16 bufferNewSize, Word16 bu
        move16();
#ifdef BASOP_NOGLOB
        *ptr++ = add_o(f[0], msu_r(L_mult(diff, f[1]),diff, f[0]), &Overflow);
#else /* BASOP_NOGLOB */
#else
        *ptr++ = add(f[0], msu_r(L_mult(diff, f[1]),diff, f[0]));
#endif /* BASOP_NOGLOB */
#endif
    }
    ELSE
    {
@@ -169,7 +169,7 @@ static void lerp_proc(Word16 *f, Word16 *f_out, Word16 bufferNewSize, Word16 bu
        move16();
#ifdef BASOP_NOGLOB
        *ptr++ = add(f[idx], msu_ro(L_mult(diff, f[idx+1]), diff, f[idx], &Overflow));
#else /* BASOP_NOGLOB */
#else 
        *ptr++ = add(f[idx], msu_r(L_mult(diff, f[idx+1]), diff, f[idx]));
#endif

@@ -191,8 +191,11 @@ static void lerp_proc(Word16 *f, Word16 *f_out, Word16 bufferNewSize, Word16 bu
    diff = lshr(extract_l(L_shr(L_sub(pos, L_deposit_h(idx)), 1)), 1);

    move16();
#ifdef BASOP_NOGLOB
    *ptr++ = add_o(f[idx], shl_o(msu_ro(L_mult_o(diff, f[idx+1], &Overflow), diff, f[idx], &Overflow), 1, &Overflow), &Overflow);
#else
    *ptr++ = add(f[idx], shl(msu_r(L_mult(diff, f[idx+1]), diff, f[idx]), 1));

#endif
    test();
    test();
    test();
+12 −0
Original line number Diff line number Diff line
@@ -11,8 +11,16 @@

static Word32 syn_kern_2(Word32 L_tmp, const Word16 a[], const Word16 y[])
{
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
#ifdef BASOP_NOGLOB
    L_tmp = L_msu_o(L_tmp,  y[-1],  a[1], &Overflow);
    return  L_msu_o(L_tmp,  y[-2],  a[2], &Overflow);
#else
    L_tmp = L_msu(L_tmp,  y[-1],  a[1]);
    return  L_msu(L_tmp,  y[-2],  a[2]);
#endif
}

static Word32 syn_kern_4(Word32 L_tmp, const Word16 a[], const Word16 y[])
@@ -183,7 +191,11 @@ void E_UTIL_synthesis(const Word16 shift, const Word16 a[], const Word16 x[], Wo
     *-----------------------------------------------------------------------*/
    /* Filtering Only from Input + Memory */
    L_tmp = syn_kern(L_mult(a0, *x++), a, mem);
#ifdef BASOP_NOGLOB
    L_tmp = L_shl_o(L_tmp, q, &Overflow);
#else
    L_tmp = L_shl(L_tmp, q);
#endif
    *y++ = round_fx(L_tmp);

    /* Filtering from Input + Mix of Memory & Output Signal Past */
+10 −4
Original line number Diff line number Diff line
@@ -204,10 +204,9 @@ void predict_signal(
    Word16 j;
    Word32 s;
    const Word16 *x0, *win;




#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
#endif
    x0 = &excI[-T0-1];
    frac = negate(frac);

@@ -222,10 +221,17 @@ void predict_signal(

    FOR (j = 0; j < L_subfr; j++)
    {
#ifdef BASOP_NOGLOB
        s = L_mult_o(win[0], x0[0], &Overflow);
        s = L_mac_o(s, win[1], x0[1], &Overflow);
        s = L_mac_o(s, win[2], x0[2], &Overflow);
        excO[j] = mac_ro(s, win[3], x0[3], &Overflow);
#else
        s = L_mult(win[0], x0[0]);
        s = L_mac(s, win[1], x0[1]);
        s = L_mac(s, win[2], x0[2]);
        excO[j] = mac_r(s, win[3], x0[3]);
#endif
        move16();

        x0++;
+5 −1
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ Word16 bass_pf_enc(

#ifdef BASOP_NOGLOB
                    error_in[i] = sub_o(orig[i+i_subfr], syn[i+i_subfr], &Overflow); /*Q0*/            move16();
#else /* BASOP_NOGLOB */
#else 
                    error_in[i] = sub(orig[i+i_subfr], syn[i+i_subfr]); /*Q0*/            move16();
#endif
                }
@@ -278,7 +278,11 @@ Word16 bass_pf_enc(
                    tmp32 = L_msu0(tmp32, tmp16, syn[i+i_subfr-T]);
                    noise_in[i] = round_fx(L_shl(tmp32, s2)); /* Q0+s2 */

#ifdef BASOP_NOGLOB
                    error_in[i] = sub_o(orig[i+i_subfr], syn[i+i_subfr], &Overflow); /*Q0*/            move16();
#else
                    error_in[i] = sub(orig[i+i_subfr], syn[i+i_subfr]); /*Q0*/            move16();
#endif
                }
            }
        }
Loading