diff --git a/lib_com/options.h b/lib_com/options.h index 53bfa8a2e83a3edf1b7837dc2a6487ba95c2c38a..bcd015b9750f143dc3df4107667f3e3e28d343b3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -144,6 +144,7 @@ #define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN /* FhG: fixes obvious bug for IVAS path. For EVS path, issue is still not resolved */ #define FIX_FMSW_DEC /* float issue 1542: fix JBM issue in format switching */ #define FIX_FMSW_DEC_2 /* float issue 1575: fix crash for format switching when bitsream starts with EVS */ +#define FIX_BASOP_2562_HQ_PREECHO_SAT /* Eri/Orange: Basop issue 2562: Add saturation to L_add in preecho calculations */ #define FIX_BASOP_2561_STEREO_DFT_ENC_COMPUTE_ITD /* BASOP issue 2561: fix diffs in stereo_dft_enc_compute_itd() between float and BASOP */ #define FIX_BASOP_2517_CLICK_IN_OMASA_LTV /* FhG: BASOP #2517: preserve precision by removing one-bit headroom from Q_min and allowing saturation during buffer scaling */ #define FIX_BASOP_2559_Q_SYNTH_HISTORY_RESET /* FhG: BASOP issue 2559: reset hTcxDec->q_synth_history_fx in allocate_CoreCoder_TCX_fx() */ diff --git a/lib_com/trans_inv_fx.c b/lib_com/trans_inv_fx.c index 33e945ecd112c235ca605cca9b6366cb81dd1ebc..405dd1914827ae67e5dd99b8bc6be8d88d632609 100644 --- a/lib_com/trans_inv_fx.c +++ b/lib_com/trans_inv_fx.c @@ -746,7 +746,11 @@ void preecho_sb_fx( } } - tmp_fxL1 = L_add( eshbmean2_fx, es_mdct_hb_fx[ind3] ); /*2*(q_sig16)*/ +#ifdef FIX_BASOP_2562_HQ_PREECHO_SAT + tmp_fxL1 = L_add_sat( eshbmean2_fx, es_mdct_hb_fx[ind3] ); /*2*(q_sig16)*/ +#else + tmp_fxL1 = L_add( eshbmean2_fx, es_mdct_hb_fx[ind3] ); /*2*(q_sig16)*/ +#endif Mpy_32_16_ss( tmp_fxL1, 4369, &eshbmean3_fx, &tmp_u16 ); /*10922 : 1/3*/ tmp_fxL1 = L_sub( es_mdct_hb_fx[ind3], es_mdct_hb_fx[ind5] ); /*2*(q_sig16)*/