Commit e61af58d authored by vaillancour's avatar vaillancour
Browse files

more staturation fixes based on a different saturation level

parent b8a93607
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -1367,7 +1367,11 @@ void wb_tbe_dec_fx(
        prev_pow = 0;
        FOR( i = 0; i < L_SHB_LAHEAD / 4; i++ )
        {
#ifdef BASOP_NOGLOB
            prev_pow = L_mac0_sat( prev_pow, hBWE_TD->state_syn_shbexc_fx[i], hBWE_TD->state_syn_shbexc_fx[i] ); /*Q(2*(st_fx->prev_Q_bwe_exc-16))*/
#else
            prev_pow = L_mac0( prev_pow, hBWE_TD->state_syn_shbexc_fx[i], hBWE_TD->state_syn_shbexc_fx[i] ); /*Q(2*(st_fx->prev_Q_bwe_exc-16))*/
#endif
        }

        rescale_genWB_mem( st_fx, sub( Q_bwe_exc, st_fx->prev_Q_bwe_exc ) );
@@ -1376,7 +1380,11 @@ void wb_tbe_dec_fx(
        sc = sub( Q_bwe_exc, add( Q_exc, Q_exc ) );
        FOR( cnt = 0; cnt < L_FRAME32k; cnt++ )
        {
#ifdef BASOP_NOGLOB
            bwe_exc_extended_16[cnt + NL_BUFF_OFFSET] = round_fx_sat( L_shl_sat( bwe_exc_extended[cnt], sc ) );
#else
            bwe_exc_extended_16[cnt + NL_BUFF_OFFSET] = round_fx( L_shl( bwe_exc_extended[cnt], sc ) );
#endif
        }
        Copy( bwe_exc_extended_16 + L_FRAME32k, hBWE_TD->old_bwe_exc_extended_fx, NL_BUFF_OFFSET );

@@ -1394,8 +1402,13 @@ void wb_tbe_dec_fx(
        curr_pow = 0;
        FOR( i = 0; i < L_SHB_LAHEAD / 4; i++ )
        {
#ifdef BASOP_NOGLOB
            curr_pow = L_mac0_sat( curr_pow, shaped_wb_excitation[i + L_SHB_LAHEAD / 4], shaped_wb_excitation[i +
                               L_SHB_LAHEAD / 4] ); /* Q(2*Q_bwe_exc_ext) */
#else
            curr_pow = L_mac0( curr_pow, shaped_wb_excitation[i + L_SHB_LAHEAD / 4], shaped_wb_excitation[i +
                               L_SHB_LAHEAD / 4] ); /* Q(2*Q_bwe_exc_ext) */
#endif
        }

        if( GT_16( voice_factors[0], 24576 ))