Commit 32ba3bb6 authored by Jan Kiene's avatar Jan Kiene
Browse files

make everything 32 bit as done in EVS

parent f4399338
Loading
Loading
Loading
Loading
Loading
+1 −15
Original line number Diff line number Diff line
@@ -273,8 +273,7 @@ void tcx_hm_modify_envelope(
)
{
#ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI
    int16_t h;
    int32_t x, k;
    int32_t h, x, k;
#else
    int16_t k, h, x;
#endif
@@ -295,25 +294,12 @@ void tcx_hm_modify_envelope(

    while ( k <= L_frame + kTcxHmParabolaHalfWidth - 1 )
    {
#ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI
        int32_t tmp;
#endif

#ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI
        for ( x = max( 0, k - kTcxHmParabolaHalfWidth ); x <= min( k + kTcxHmParabolaHalfWidth, L_frame - 1 ); ++x )
#else
        for ( x = max( 0, k - kTcxHmParabolaHalfWidth ); x <= min( k + kTcxHmParabolaHalfWidth, L_frame - 1 ); ++x )
#endif
        {
            env[x] = Mpy_32_16( env[x], inv_shape[x - k + kTcxHmParabolaHalfWidth] );
        }
        ++h;
#ifdef FIX_966_VAR_OVERFLOW_IN_HARM_MODEL_ARI
        tmp = ( h * lag );
        k = tmp >> fract_res;
#else
        k = ( h * lag ) >> fract_res;
#endif
    }

    return;