Commit cca71c3e authored by Vladimir Malenovsky's avatar Vladimir Malenovsky
Browse files

fix saturations in SWB TBE re-scaling function

parent 1816aab3
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@
#define FIX_1962_FORMAT_CONV_SPECTRAL_DIFF                   /* FhG: Improved precision of targetEnergy in ivas_ls_setup_conversion_process_mdct_fx() */
#define FIX_2003_CON_TCX_OVERFLOW                            /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */
#define OPT_TCXLTP_FILTER_LOOP                               /* FhG: optimize loop in tcx_ltp_synth_filter */

#define FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE                  /* Dolby: fix for issue 2026: Saturation in SWB TBE re-scaling function preventing StereoDownmix complexity job to complete */

/* #################### Start BASOP porting switches ############################ */

+4 −0
Original line number Diff line number Diff line
@@ -2706,7 +2706,11 @@ void swb_tbe_dec_fx(
    FOR( i = 0; i < L_SHB_LAHEAD; i++ )
    {
        L_tmp = Mult_32_16( Lscale, shaped_shb_excitation[i] );     /* Q_bwe_exc + (31-exp) - 15 */
#ifdef FIX_2602_NONBE_SAT_IN_SWB_TBE_SCALE
        shaped_shb_excitation[i] = round_fx_sat( L_shl_sat( L_tmp, exp ) ); /* Q_bwe_exc */
#else
        shaped_shb_excitation[i] = round_fx( L_shl( L_tmp, exp ) ); /* Q_bwe_exc */
#endif
        move16();
    }
    IF( exp < 0 )