Commit 307b1e39 authored by vaillancour's avatar vaillancour
Browse files

fix proposal for #2407

parent cf7f073c
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@
#define FIX_1283_STEREO_DFT_COLLAPSE                    /* FhG: float issue 1283: fix for critical issue with DFT stereo core coder */
#define FIX_2379_REMOVE_previoussynth_fx_32             /* VA: basop issue 2379: remove duplicated buffer st->previoussynth_fx_32[] */
#define FIX_2396_CONSTANT_STRIDE_IN_TC_BUFFER           /* FhG/VA: basop issue 2396: keep TC channel pointers in one constant place during decoding and rendering */

#define FIX_2407_FIX_RESIDU_IVAS                        /* VA: basop 2407, Implementation issue in residu_ivas + unnecessary complexity */
/* ##################### End NON-BE switches ########################### */

/* ################## End MAINTENANCE switches ######################### */
+18 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ void residu_ivas_fx(
    const Word16 l   /* i  : size of filtering                */
)
{
#ifndef FIX_2407_FIX_RESIDU_IVAS
    Word32 s;
    Word16 i, j;

@@ -38,7 +39,24 @@ void residu_ivas_fx(
        y[i] = s;
        move32();
    }
#else
    Word64 s64;
    Word16 i, j, scaling;

    scaling = sub( Q15, a_exp );
    FOR( i = 0; i < l; i++ )
    {
        s64 = W_mult_32_16( x[i], a[0] );
        move32();
        FOR( j = 1; j <= m; j++ )
        {
            s64 = W_mac_32_16( s64, x[i - j], a[j] );
        }
        y[i] = W_shl_sat_l( s64, scaling );
        move32();
    }

#endif
    return;
}