diff --git a/lib_com/options.h b/lib_com/options.h index f5785f099801cbe1b78e4c0941e0117ede314c07..5990027cb70d0be81a7c9681dc2522e4ef640d42 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -80,4 +80,5 @@ #define SIMPLIFY_CODE_BE // Simplify synthesis loop #define CR_2109_to_2112_cd0_ce0 /* This is related to the CRs include in the 26.444 package of 21-12. Concerns lead_deindexing and */ #define FIX_QMETADATA_PENALTY /* Nokia: transform penalty calculation in qmetadata into integer operations */ +#define FIX_1013_CRASH_HQ_CORE_DEC /* Ittiam: Saturation added on the lines of EVS */ #endif diff --git a/lib_com/trans_inv_fx.c b/lib_com/trans_inv_fx.c index 5c41122fbdd79b81775ad846957056822ea95d67..24e87c5a6750ff4fd494fffe9865d3e16f3bace9 100644 --- a/lib_com/trans_inv_fx.c +++ b/lib_com/trans_inv_fx.c @@ -531,7 +531,11 @@ void preecho_sb_fx( tmp_fx1 = norm_l( es_mdct_fx[i] ); tmp_fxL1 = L_shl( es_mdct_fx[i], tmp_fx1 ); tmp_fxL2 = L_shl( mean_prev_fx_loc, tmp_fx1 ); +#ifdef FIX_1013_CRASH_HQ_CORE_DEC + tmp_fx1 = round_fx_sat( tmp_fxL1 ); +#else tmp_fx1 = round_fx( tmp_fxL1 ); +#endif tmp_fx2 = round_fx( tmp_fxL2 ); tmp_fx3 = div_s( tmp_fx2, tmp_fx1 ); min_g_fx[i] = Frac_sqrt( tmp_fx3 );