Commit e4f931a6 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Encoder LTV crash fixes and Q-info updates for lib_com

parent 2acbab20
Loading
Loading
Loading
Loading
Loading
+37 −37
Original line number Diff line number Diff line
@@ -104,17 +104,17 @@ void fft16_with_cmplx_data( cmplx *pInp, Word16 bsacle );
 *
 * \return   void
 */
static void fft5_with_cmplx_data( cmplx *inp )
static void fft5_with_cmplx_data( cmplx *inp /*Qx*/ )
{
    cmplx x0, x1, x2, x3, x4;
    cmplx y1, y2, y3, y4;
    cmplx t;

    x0 = CL_shr( inp[0], SCALEFACTOR5 );
    x1 = CL_shr( inp[1], SCALEFACTOR5 );
    x2 = CL_shr( inp[2], SCALEFACTOR5 );
    x3 = CL_shr( inp[3], SCALEFACTOR5 );
    x4 = CL_shr( inp[4], SCALEFACTOR5 );
    x0 = CL_shr( inp[0], SCALEFACTOR5 ); // Qx - 4
    x1 = CL_shr( inp[1], SCALEFACTOR5 ); // Qx - 4
    x2 = CL_shr( inp[2], SCALEFACTOR5 ); // Qx - 4
    x3 = CL_shr( inp[3], SCALEFACTOR5 ); // Qx - 4
    x4 = CL_shr( inp[4], SCALEFACTOR5 ); // Qx - 4

    y1 = CL_add( x1, x4 );
    y4 = CL_sub( x1, x4 );
@@ -162,14 +162,14 @@ static void fft5_with_cmplx_data( cmplx *inp )
 *
 * \return   void
 */
static void fft8_with_cmplx_data( cmplx *inp )
static void fft8_with_cmplx_data( cmplx *inp /*Qx*/ )
{
    cmplx x0, x1, x2, x3, x4, x5, x6, x7;
    cmplx s0, s1, s2, s3, s4, s5, s6, s7;
    cmplx t0, t1, t2, t3, t4, t5, t6, t7;

    /* Pre-additions */
    x0 = CL_shr( inp[0], SCALEFACTOR8 );
    x0 = CL_shr( inp[0], SCALEFACTOR8 ); // Qx - 4
    x1 = CL_shr( inp[1], SCALEFACTOR8 );
    x2 = CL_shr( inp[2], SCALEFACTOR8 );
    x3 = CL_shr( inp[3], SCALEFACTOR8 );
@@ -244,7 +244,7 @@ static void fft8_with_cmplx_data( cmplx *inp )
 * \return   void
 */

static void fft10_with_cmplx_data( cmplx *inp_data )
static void fft10_with_cmplx_data( cmplx *inp_data /*Qx*/ )
{
    cmplx r1, r2, r3, r4;
    cmplx x0, x1, x2, x3, x4, t;
@@ -252,7 +252,7 @@ static void fft10_with_cmplx_data( cmplx *inp_data )

    /* FOR i=0 */
    {
        x0 = CL_shr( inp_data[0], SCALEFACTOR10 );
        x0 = CL_shr( inp_data[0], SCALEFACTOR10 ); // Qx - 5
        x1 = CL_shr( inp_data[2], SCALEFACTOR10 );
        x2 = CL_shr( inp_data[4], SCALEFACTOR10 );
        x3 = CL_shr( inp_data[6], SCALEFACTOR10 );
@@ -280,7 +280,7 @@ static void fft10_with_cmplx_data( cmplx *inp_data )
    }
    /* FOR i=1 */
    {
        x0 = CL_shr( inp_data[5], SCALEFACTOR10 );
        x0 = CL_shr( inp_data[5], SCALEFACTOR10 ); // Qx - 5
        x1 = CL_shr( inp_data[1], SCALEFACTOR10 );
        x2 = CL_shr( inp_data[3], SCALEFACTOR10 );
        x3 = CL_shr( inp_data[7], SCALEFACTOR10 );
@@ -353,14 +353,14 @@ static void fft10_with_cmplx_data( cmplx *inp_data )
 * \return   void
 */

static void fft15_with_cmplx_data( cmplx *inp_data )
static void fft15_with_cmplx_data( cmplx *inp_data /*Qx*/ )
{
    cmplx c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14;
    cmplx c_z0, c_z1, c_z2, c_z3, c_z4, c_z5, c_z6, c_z7, c_z8, c_z9, c_z10, c_z11, c_z12, c_z13, c_z14;
    cmplx c_y1, c_y2, c_y3, c_y4;
    cmplx c_t;

    c0 = CL_shr( inp_data[0], SCALEFACTOR15 );
    c0 = CL_shr( inp_data[0], SCALEFACTOR15 ); // Qx - 5
    c1 = CL_shr( inp_data[3], SCALEFACTOR15 );
    c2 = CL_shr( inp_data[6], SCALEFACTOR15 );
    c3 = CL_shr( inp_data[9], SCALEFACTOR15 );
@@ -497,8 +497,8 @@ static void fft15_with_cmplx_data( cmplx *inp_data )
 *           WOPS with 32x16 bit multiplications (scale on ):  288 cycles
 *           WOPS with 32x16 bit multiplications (scale off):  256 cycles
 *
 * \param    [i/o] re    real input / output
 * \param    [i/o] im    imag input / output
 * \param    [i/o] re    real input / output Qx
 * \param    [i/o] im    imag input / output Qx
 * \param    [i  ] s     stride real and imag input / output
 *
 * \return   void
@@ -529,7 +529,7 @@ void fft16( Word32 *re, Word32 *im, Word16 s, Word16 bScale )
    }
}

void fft16_with_cmplx_data( cmplx *input, Word16 bScale )
void fft16_with_cmplx_data( cmplx *input /*Qx*/, Word16 bScale )
{
    cmplx x0, x1, x2, x3, temp;
    cmplx t0, t2, t4, t6, t7;
@@ -538,7 +538,7 @@ void fft16_with_cmplx_data( cmplx *input, Word16 bScale )
    IF( bScale )
    {
        {
            x0 = CL_shr( input[0], SCALEFACTOR16 );
            x0 = CL_shr( input[0], SCALEFACTOR16 ); // Qx - 5
            x1 = CL_shr( input[4], SCALEFACTOR16 );
            x2 = CL_shr( input[8], SCALEFACTOR16 );
            x3 = CL_shr( input[12], SCALEFACTOR16 );
@@ -553,7 +553,7 @@ void fft16_with_cmplx_data( cmplx *input, Word16 bScale )
            y[3] = CL_add( t2, t6 );


            x0 = CL_shr( input[1], SCALEFACTOR16 );
            x0 = CL_shr( input[1], SCALEFACTOR16 ); // Qx - 5
            x1 = CL_shr( input[5], SCALEFACTOR16 );
            x2 = CL_shr( input[9], SCALEFACTOR16 );
            x3 = CL_shr( input[13], SCALEFACTOR16 );
@@ -568,7 +568,7 @@ void fft16_with_cmplx_data( cmplx *input, Word16 bScale )
            y[7] = CL_add( t2, t6 );


            x0 = CL_shr( input[2], SCALEFACTOR16 );
            x0 = CL_shr( input[2], SCALEFACTOR16 ); // Qx - 5
            x1 = CL_shr( input[6], SCALEFACTOR16 );
            x2 = CL_shr( input[10], SCALEFACTOR16 );
            x3 = CL_shr( input[14], SCALEFACTOR16 );
@@ -584,7 +584,7 @@ void fft16_with_cmplx_data( cmplx *input, Word16 bScale )
            y[11] = CL_add( t2, t6 );


            x0 = CL_shr( input[3], SCALEFACTOR16 );
            x0 = CL_shr( input[3], SCALEFACTOR16 ); // Qx - 5
            x1 = CL_shr( input[7], SCALEFACTOR16 );
            x2 = CL_shr( input[11], SCALEFACTOR16 );
            x3 = CL_shr( input[15], SCALEFACTOR16 );
@@ -736,7 +736,7 @@ void fft16_with_cmplx_data( cmplx *input, Word16 bScale )
 *
 * \return   void
 */
static void fft20_with_cmplx_data( cmplx *inp_data )
static void fft20_with_cmplx_data( cmplx *inp_data /*Qx*/ )
{
    cmplx r1, r2, r3, r4;
    cmplx x0, x1, x2, x3, x4;
@@ -751,7 +751,7 @@ static void fft20_with_cmplx_data( cmplx *inp_data )
    y4 = &y[12];

    {
        x0 = CL_shr( inp_data[0], SCALEFACTOR20 );
        x0 = CL_shr( inp_data[0], SCALEFACTOR20 ); // Qx - 5
        x1 = CL_shr( inp_data[16], SCALEFACTOR20 );
        x2 = CL_shr( inp_data[12], SCALEFACTOR20 );
        x3 = CL_shr( inp_data[8], SCALEFACTOR20 );
@@ -778,7 +778,7 @@ static void fft20_with_cmplx_data( cmplx *inp_data )
        y4[0] = CL_msu_j( r3, r4 );
    }
    {
        x0 = CL_shr( inp_data[5], SCALEFACTOR20 );
        x0 = CL_shr( inp_data[5], SCALEFACTOR20 ); // Qx - 5
        x1 = CL_shr( inp_data[1], SCALEFACTOR20 );
        x2 = CL_shr( inp_data[17], SCALEFACTOR20 );
        x3 = CL_shr( inp_data[13], SCALEFACTOR20 );
@@ -805,7 +805,7 @@ static void fft20_with_cmplx_data( cmplx *inp_data )
        y4[1] = CL_msu_j( r3, r4 );
    }
    {
        x0 = CL_shr( inp_data[10], SCALEFACTOR20 );
        x0 = CL_shr( inp_data[10], SCALEFACTOR20 ); // Qx - 5
        x1 = CL_shr( inp_data[6], SCALEFACTOR20 );
        x2 = CL_shr( inp_data[2], SCALEFACTOR20 );
        x3 = CL_shr( inp_data[18], SCALEFACTOR20 );
@@ -832,7 +832,7 @@ static void fft20_with_cmplx_data( cmplx *inp_data )
        y4[2] = CL_msu_j( r3, r4 );
    }
    {
        x0 = CL_shr( inp_data[15], SCALEFACTOR20 );
        x0 = CL_shr( inp_data[15], SCALEFACTOR20 ); // Qx - 5
        x1 = CL_shr( inp_data[11], SCALEFACTOR20 );
        x2 = CL_shr( inp_data[7], SCALEFACTOR20 );
        x3 = CL_shr( inp_data[3], SCALEFACTOR20 );
@@ -985,7 +985,7 @@ static void fft20_with_cmplx_data( cmplx *inp_data )
 * \return   void
 */

static void fft30_with_cmplx_data( cmplx *inp )
static void fft30_with_cmplx_data( cmplx *inp /*Qx*/ )
{
    cmplx *l = &inp[0];
    cmplx *h = &inp[15];
@@ -994,19 +994,19 @@ static void fft30_with_cmplx_data( cmplx *inp )

    /* 1. FFT15 stage */

    x[0] = CL_shr( inp[0], SCALEFACTOR30_1 );
    x[0] = CL_shr( inp[0], SCALEFACTOR30_1 ); // Qx - 5
    x[1] = CL_shr( inp[18], SCALEFACTOR30_1 );
    x[2] = CL_shr( inp[6], SCALEFACTOR30_1 );
    x[3] = CL_shr( inp[24], SCALEFACTOR30_1 );
    x[4] = CL_shr( inp[12], SCALEFACTOR30_1 );

    x[5] = CL_shr( inp[20], SCALEFACTOR30_1 );
    x[5] = CL_shr( inp[20], SCALEFACTOR30_1 ); // Qx - 5
    x[6] = CL_shr( inp[8], SCALEFACTOR30_1 );
    x[7] = CL_shr( inp[26], SCALEFACTOR30_1 );
    x[8] = CL_shr( inp[14], SCALEFACTOR30_1 );
    x[9] = CL_shr( inp[2], SCALEFACTOR30_1 );

    x[10] = CL_shr( inp[10], SCALEFACTOR30_1 );
    x[10] = CL_shr( inp[10], SCALEFACTOR30_1 ); // Qx - 5
    x[11] = CL_shr( inp[28], SCALEFACTOR30_1 );
    x[12] = CL_shr( inp[16], SCALEFACTOR30_1 );
    x[13] = CL_shr( inp[4], SCALEFACTOR30_1 );
@@ -1140,19 +1140,19 @@ static void fft30_with_cmplx_data( cmplx *inp )

    /* 2. FFT15 stage */

    x[0] = CL_shr( inp[15], SCALEFACTOR30_1 );
    x[0] = CL_shr( inp[15], SCALEFACTOR30_1 ); // Qx - 5
    x[1] = CL_shr( inp[3], SCALEFACTOR30_1 );
    x[2] = CL_shr( inp[21], SCALEFACTOR30_1 );
    x[3] = CL_shr( inp[9], SCALEFACTOR30_1 );
    x[4] = CL_shr( inp[27], SCALEFACTOR30_1 );

    x[5] = CL_shr( inp[5], SCALEFACTOR30_1 );
    x[5] = CL_shr( inp[5], SCALEFACTOR30_1 ); // Qx - 5
    x[6] = CL_shr( inp[23], SCALEFACTOR30_1 );
    x[7] = CL_shr( inp[11], SCALEFACTOR30_1 );
    x[8] = CL_shr( inp[29], SCALEFACTOR30_1 );
    x[9] = CL_shr( inp[17], SCALEFACTOR30_1 );

    x[10] = CL_shr( inp[25], SCALEFACTOR30_1 );
    x[10] = CL_shr( inp[25], SCALEFACTOR30_1 ); // Qx - 5
    x[11] = CL_shr( inp[13], SCALEFACTOR30_1 );
    x[12] = CL_shr( inp[1], SCALEFACTOR30_1 );
    x[13] = CL_shr( inp[19], SCALEFACTOR30_1 );
@@ -1425,14 +1425,14 @@ static void fft30_with_cmplx_data( cmplx *inp )
 */


static void fft32_with_cmplx_data( cmplx *inp )
static void fft32_with_cmplx_data( cmplx *inp /*Qx*/ )
{
    cmplx x[32], y[32], t[32], s[32], temp, temp1;
    const cmplx_s *pRotVector_32 = (const cmplx_s *) RotVector_32;

    /* 1. FFT8 stage */

    x[0] = CL_shr( inp[0], SCALEFACTOR32_1 );
    x[0] = CL_shr( inp[0], SCALEFACTOR32_1 ); // Qx - 5
    x[1] = CL_shr( inp[4], SCALEFACTOR32_1 );
    x[2] = CL_shr( inp[8], SCALEFACTOR32_1 );
    x[3] = CL_shr( inp[12], SCALEFACTOR32_1 );
@@ -1478,7 +1478,7 @@ static void fft32_with_cmplx_data( cmplx *inp )

    /* 2. FFT8 stage */

    x[0] = CL_shr( inp[1], SCALEFACTOR32_1 );
    x[0] = CL_shr( inp[1], SCALEFACTOR32_1 ); // Qx - 5
    x[1] = CL_shr( inp[5], SCALEFACTOR32_1 );
    x[2] = CL_shr( inp[9], SCALEFACTOR32_1 );
    x[3] = CL_shr( inp[13], SCALEFACTOR32_1 );
@@ -1525,7 +1525,7 @@ static void fft32_with_cmplx_data( cmplx *inp )

    /* 3. FFT8 stage */

    x[0] = CL_shr( inp[2], SCALEFACTOR32_1 );
    x[0] = CL_shr( inp[2], SCALEFACTOR32_1 ); // Qx - 5
    x[1] = CL_shr( inp[6], SCALEFACTOR32_1 );
    x[2] = CL_shr( inp[10], SCALEFACTOR32_1 );
    x[3] = CL_shr( inp[14], SCALEFACTOR32_1 );
@@ -1572,7 +1572,7 @@ static void fft32_with_cmplx_data( cmplx *inp )

    /* 4. FFT8 stage */

    x[0] = CL_shr( inp[3], SCALEFACTOR32_1 );
    x[0] = CL_shr( inp[3], SCALEFACTOR32_1 ); // Qx - 5
    x[1] = CL_shr( inp[7], SCALEFACTOR32_1 );
    x[2] = CL_shr( inp[11], SCALEFACTOR32_1 );
    x[3] = CL_shr( inp[15], SCALEFACTOR32_1 );
+887 −866

File changed.

Preview size limit exceeded, changes collapsed.

+350 −350

File changed.

Preview size limit exceeded, changes collapsed.

+13 −5
Original line number Diff line number Diff line
@@ -57,7 +57,13 @@
/* NOTE: this function uses a 5 entry table frac_fx (Q4 unsigned)    */
/*===================================================================*/

void Interpol_delay_fx( Word16 *out_fx, Word16 last_fx, Word16 current_fx, Word16 SubNum, const Word16 *frac_fx )
void Interpol_delay_fx(
    Word16 *out_fx,       /* Q4 */
    Word16 last_fx,       /* Q0 */
    Word16 current_fx,    /* Q0 */
    Word16 SubNum,        /* Q0 */
    const Word16 *frac_fx /* Q4 */
)
{
    Word16 i, temp;
    Word32 L_add1, L_add2;
@@ -81,17 +87,19 @@ void Interpol_delay_fx( Word16 *out_fx, Word16 last_fx, Word16 current_fx, Word1
 *--------------------------------------------------------------------*/

void deemph_lpc_fx(
    const Word16 *p_Aq_curr_fx, /* i : LP coefficients current frame                       */
    const Word16 *p_Aq_old_fx,  /* i : LP coefficients previous frame                      */
    const Word16 *p_Aq_curr_fx, /* i : LP coefficients current frame                   Q12 */
    const Word16 *p_Aq_old_fx,  /* i : LP coefficients previous frame                  Q12 */
    Word16 *LPC_de_curr_fx,     /* o : De-emphasized LP coefficients current frame  in Q12 */
    Word16 *LPC_de_old_fx,      /* o : De-emphasized LP coefficients previous frame in Q12 */
    const Word16 deemph_old )
    const Word16 deemph_old     /* Q0 */
)
{
    Word16 k, temp;
    Word16 b_fx[M + 2];                 /* Q12 */
    Word16 a_fx[2] = { -22282, 32767 }; /* Q15 {-PREEMPH_FAC,1.0} */
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
    b_fx[0] = 4096;
    move16(); /* 1 in Q12 */
@@ -123,7 +131,7 @@ void deemph_lpc_fx(
        move16(); /* 1 in Q12 */
        FOR( k = 0; k < M; k++ )
        {
            b_fx[k + 1] = p_Aq_old_fx[k + 1];
            b_fx[k + 1] = p_Aq_old_fx[k + 1]; /* Q12 */
            move16();
        }
        b_fx[M + 1] = 0;
+39 −36
Original line number Diff line number Diff line
@@ -21,14 +21,14 @@
 *-------------------------------------------------------------------*/

void pred_lt4(
    const Word16 excI[],   /* in : excitation buffer       */
    Word16 excO[],         /* out: excitation buffer       */
    const Word16 T0,       /* input : integer pitch lag    */
    Word16 frac,           /* input : fraction of lag      */
    const Word16 L_subfr,  /* input : subframe size        */
    const Word16 *win,     /* i  : interpolation window    */
    const Word16 nb_coef,  /* i  : nb of filter coef       */
    const Word16 up_sample /* i  : up_sample               */
    const Word16 excI[],   /* in : excitation buffer       Q_exc*/
    Word16 excO[],         /* out: excitation buffer       Q_exc*/
    const Word16 T0,       /* input : integer pitch lag    Q0*/
    Word16 frac,           /* input : fraction of lag      Q0*/
    const Word16 L_subfr,  /* input : subframe size        Q0*/
    const Word16 *win,     /* i  : interpolation window    Q14*/
    const Word16 nb_coef,  /* i  : nb of filter coef       Q0*/
    const Word16 up_sample /* i  : up_sample               Q0*/
)
{
    Word16 i, j;
@@ -36,6 +36,7 @@ void pred_lt4(
    const Word16 *x0, *x1, *x2, *c1, *c2;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
    x0 = &excI[-T0];

@@ -44,16 +45,16 @@ void pred_lt4(

    IF( frac < 0 )
    {
        frac = add( frac, up_sample );
        frac = add( frac, up_sample ); /* Q0 */
        x0--;
    }

    FOR( j = 0; j < L_subfr; j++ )
    {
        x1 = x0++;
        x2 = x1 + 1;
        c1 = ( &win[frac] );
        c2 = ( &win[up_sample - frac] );
        x1 = x0++;                       /* Q_exc */
        x2 = x1 + 1;                     /* Q_exc */
        c1 = ( &win[frac] );             /* Q14 */
        c2 = ( &win[up_sample - frac] ); /* Q14 */

        {
            Word64 s64 = 0;
@@ -61,24 +62,25 @@ void pred_lt4(
            FOR( i = 0; i < nb_coef; i++ )
            {
                /*s += (*x1--) * (*c1) + (*x2++) * (*c2);*/
                s64 = W_mac0_16_16( s64, ( *x1-- ), ( *c1 ) );
                s64 = W_mac0_16_16( s64, ( *x2++ ), ( *c2 ) );
                s64 = W_mac0_16_16( s64, ( *x1-- ), ( *c1 ) ); /* Q_exc + Q14 */
                s64 = W_mac0_16_16( s64, ( *x2++ ), ( *c2 ) ); /* Q_exc + Q14 */

                c1 += up_sample;
                c2 += up_sample;
            }
            s = W_sat_l( s64 );
            s = W_sat_l( s64 ); /* Q_exc + Q14 */
        }
#if ( INTERP_EXP != -1 )
#ifdef BASOP_NOGLOB
        s = L_shl_o( s, INTERP_EXP + 1, &Overflow );
        s = L_shl_o( s, INTERP_EXP + 1, &Overflow ); /* Q_exc + Q15 */
#else                                                /* BASOP_NOGLOB */
        s = L_shl( s, INTERP_EXP + 1 );
#endif                                               /* BASOP_NOGLOB */
#endif

#ifdef BASOP_NOGLOB
        excO[j] = round_fx_o( s, &Overflow );
        excO[j] = round_fx_o( s, &Overflow ); /* Q_exc */
        move16();
#else /* BASOP_NOGLOB */
        excO[j] = round_fx( s );
#endif
@@ -113,12 +115,12 @@ void pred_lt4(
/* NONE                                                                  */
/*=======================================================================*/
void pred_lt4_tc_fx(
    Word16 exc[],         /* i/o: excitation buffer        */
    const Word16 T0,      /* i  : integer pitch lag        */
    Word16 frac,          /* i:   fraction of lag          */
    const Word16 *win,    /* i  : interpolation window     */
    const Word16 imp_pos, /* i  : glottal impulse position */
    const Word16 i_subfr  /* i  : subframe index           */
    Word16 exc[],         /* i/o: excitation buffer        Q0*/
    const Word16 T0,      /* i  : integer pitch lag        Q0*/
    Word16 frac,          /* i:   fraction of lag          Q0*/
    const Word16 *win,    /* i  : interpolation window     Q14*/
    const Word16 imp_pos, /* i  : glottal impulse position Q0*/
    const Word16 i_subfr  /* i  : subframe index           Q0*/
)
{
    Word16 i, j, k, l;
@@ -128,28 +130,29 @@ void pred_lt4_tc_fx(
    Word16 excI[2 * L_SUBFR];
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
    Copy( exc + sub( i_subfr, L_SUBFR ), excI, shl( L_SUBFR, 1 ) );
    Copy( exc + sub( i_subfr, L_SUBFR ), excI, L_SUBFR * 2 ); /* Q0 */

    test();
    IF( LT_16( add( T0, sub( imp_pos, L_IMPULSE2 ) ), L_SUBFR ) && LT_16( T0, L_SUBFR ) )
    {
        set16_fx( &excI[sub( L_SUBFR, T0 )], 0, T0 );
        set16_fx( &excI[L_SUBFR - T0], 0, T0 );
        set16_fx( excO, 0, L_SUBFR + 1 );
        x0 = excI + sub( L_SUBFR, L_INTERPOL2 - 1 );
        x0 = excI + ( L_SUBFR - ( L_INTERPOL2 - 1 ) );

        IF( frac > 0 )
        {
            frac = sub( frac, UP_SAMP );
            frac = sub( frac, UP_SAMP ); /* Q0 */
            x0--;
        }

        l = add( UP_SAMP - 1, frac );
        l = add( UP_SAMP - 1, frac ); /* Q0 */
        FOR( j = T0; j < L_SUBFR + 1; j++ )
        {
            k = l;
            move16();
            L_sum = L_mult( x0[0], win[k] );
            L_sum = L_mult( x0[0], win[k] ); /* Q15 */
            FOR( i = 1; i < 2 * L_INTERPOL2; i++ )
            {
                /*
@@ -158,11 +161,11 @@ void pred_lt4_tc_fx(
                 * so that the values needed are contiguous.
                 */
                k += UP_SAMP;
                L_sum = L_mac( L_sum, x0[i], win[k] ); /*Q1 */
                L_sum = L_mac( L_sum, x0[i], win[k] ); /* Q15 */
            }
#ifdef BASOP_NOGLOB
            L_sum = L_shl_o( L_sum, 1, &Overflow ); /*Q0h */
            excO[j] = round_fx_o( L_sum, &Overflow );
            L_sum = L_shl_o( L_sum, 1, &Overflow );   /* Q16 */
            excO[j] = round_fx_o( L_sum, &Overflow ); /* Q0 */
            move16();
#else
            L_sum = L_shl( L_sum, 1 ); /*Q0h */
@@ -175,7 +178,7 @@ void pred_lt4_tc_fx(
        FOR( i = T0; i < L_SUBFR; i++ )
        {
#ifdef BASOP_NOGLOB
            exc[i + i_subfr] = add_o( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ), &Overflow );
            exc[i + i_subfr] = add_o( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ), &Overflow ); /* Q0 */
#else
            exc[i + i_subfr] = add( exc[i + i_subfr], mult_r( PIT_SHARP_fx, excO[i] ) );
#endif
Loading