Commit 304d11bf authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

ltv crash fix update

parent c8087dff
Loading
Loading
Loading
Loading
Loading
+0 −38
Original line number Diff line number Diff line
@@ -171,44 +171,6 @@ void Residu3_fx(
#endif
    }
}
#ifdef IVAS_FLOAT_FIXED
void Residu3_ivas_fx(
    const Word16 a[], /* i :  prediction coefficients                 Q12 */
    const Word16 x[], /* i :  input signal (usually speech)           Qx  */
                      /*      (note that values x[-M..-1] are needed)     */
    Word16 y[],       /* o :  output signal (usually residual)        Qx  */
    const Word16 lg,  /* i :  vector size                             Q0  */
    const Word16 shift )
{
    Word16 i, j;
    Word64 s64;
    Word32 s32;
    Word16 q;
#ifdef BASOP_NOGLOB_DECLARE_LOCAL
    Flag Overflow = 0;
    move32();
#endif
    q = add( norm_s( a[0] ), 1 );
    if ( shift != 0 )
        q = add( q, shift );
    FOR( i = 0; i < lg; i++ )
    {
        s64 = 0;
        move64();
        FOR( j = 1; j <= M; j++ )
        {
            s64 = W_mac_16_16( s64, x[i - j], a[j] );
        }
        s32 = W_shl_sat_l( s64, q );
#ifdef BASOP_NOGLOB
        y[i] = round_fx_o( s32, &Overflow );
#else /* BASOP_NOGLOB */
        y[i] = round_fx( s32 );
#endif
        move32();
    }
}
#endif
/*==========================================================================*/
/* FUNCTION      : 	void calc_residu()									    */
/*--------------------------------------------------------------------------*/
+1 −1
Original line number Diff line number Diff line
@@ -674,7 +674,7 @@ void stereo_tcx_core_enc(
    st->hTcxCfg->tcx_last_overlap_mode = st->hTcxCfg->tcx_curr_overlap_mode;
    move16();

    s = sub( getScaleFactor16( st->synth, st->L_frame ), 2 );
    s = sub( getScaleFactor16( st->synth, st->L_frame ), 4 );
    s = s_min( s, getScaleFactor16( st->hLPDmem->syn, M ) );
    IF( st->tcxonly == 0 )
    {
+1 −1
Original line number Diff line number Diff line
@@ -2488,7 +2488,7 @@ void tcx_encoder_memory_update_ivas_fx(
    IF( st->tcxonly == 0 )
    {
        /* Update weighted synthesis */
        Residu3_ivas_fx( Ai + imult1616( sub( st->nb_subfr, 1 ), ( M + 1 ) ), synth + sub( L_frame_glob, 1 ), &tmp, 1, 0 );
        Residu3_fx( Ai + imult1616( sub( st->nb_subfr, 1 ), ( M + 1 ) ), synth + sub( L_frame_glob, 1 ), &tmp, 1, 0 );
        LPDmem->mem_w0 = sub( wsig[sub( L_frame_glob, 1 )], tmp );
        move16();
    }