Commit 39ee6c2d authored by thomas dettbarn's avatar thomas dettbarn
Browse files

Inside a FOR loop within tcx_ltp_synth_filter32() there was an IF which was...

Inside a FOR loop within tcx_ltp_synth_filter32() there was an IF which was impeding WMOPS performance.
parent e95243e9
Loading
Loading
Loading
Loading
Loading
+9 −12
Original line number Diff line number Diff line
@@ -579,8 +579,7 @@ static void tcx_ltp_synth_filter32(

        L = tcxLtpFilters[filtIdx].length; /* Q0 */
        move16();

        alpha = 0;
        alpha = 0x7FFF; /* 1 in Q15 */
        move16();
        IF( fade != 0 )
        {
@@ -605,7 +604,13 @@ static void tcx_ltp_synth_filter32(
            if ( fade < 0 )
                step = negate( step );
        }

        if ( zir != NULL )
        {
            FOR( j = 0; j < length; j++ )
            {
                synth[j] = L_sub_sat( synth[j], zir[j] );
            }
        }
        FOR( j = 0; j < length; j++ )
        {
            s = L_deposit_l( 0 );
@@ -625,22 +630,14 @@ static void tcx_ltp_synth_filter32(
               fade-in/out: synth_ltp[j] = synth[j] - alpha * gain * s2 + alpha * gain * s; */
            L_tmp = L_sub_sat( s, Mpy_32_16_r( s2, ALPHA ) ); /* Qx */
            L_tmp2 = Mpy_32_16_r( L_tmp, gain );              /* Qx */
            IF( fade != 0 )
            L_tmp2 = Mpy_32_16_r( L_tmp2, alpha );  /* Qx */
            L_tmp2 = L_add_sat( synth[j], L_tmp2 ); /* Qx */
            if ( zir != NULL )
            {
                L_tmp2 = L_sub_sat( L_tmp2, zir[j] ); /* Qx */
            }

            synth_ltp[j] = L_tmp2; /* Qx */
            move16();

            BASOP_SATURATE_WARNING_OFF_EVS;
            if ( fade != 0 )
            {
            alpha = add_sat( alpha, step );
            }
            BASOP_SATURATE_WARNING_ON_EVS;

            x0++;