diff --git a/lib_com/options.h b/lib_com/options.h index 64fcbf1936141c653ebfcee9c2b9bb6403c80e45..c7407e532a9204fe239bd76e6e89f9070938286c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -79,4 +79,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 050548bc3b9ffcd28a9a7e9d5e82ab3fa644af1f..cc562c8999d960dc77257c30b538430068a4d1c3 100644 --- a/lib_com/trans_inv_fx.c +++ b/lib_com/trans_inv_fx.c @@ -543,7 +543,11 @@ void preecho_sb_fx( tmp_fx1 = norm_l( es_mdct_hb_fx[i] ); tmp_fxL1 = L_shl( es_mdct_hb_fx[i], tmp_fx1 ); tmp_fxL2 = L_shl( mean_prev_hb_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_hb_fx[i] = Frac_sqrt( tmp_fx3 ); diff --git a/lib_enc/pvq_core_enc_fx.c b/lib_enc/pvq_core_enc_fx.c index 0ad1d3192f82603300f25813efd5ee2ab7ee3681..3b20e82c3aad5b0c7abcdae17e93d3a7bc53cf73 100644 --- a/lib_enc/pvq_core_enc_fx.c +++ b/lib_enc/pvq_core_enc_fx.c @@ -521,7 +521,7 @@ Word16 pvq_core_enc_ivas_fx( R_upd = shl( bits_tot, 3 ); - gain_bits_tot = assign_gain_bits_fx( core, nb_sfm, sfmsize, R, gain_bits_array, &R_upd ); + gain_bits_tot = ivas_assign_gain_bits_fx( core, nb_sfm, sfmsize, R, gain_bits_array, &R_upd ); pvq_bits = shr( R_upd, 3 ); pvq_encode_frame_ivas_fx( hBstr, coefs_norm, *Q_coefs, coefs_quant, gopt, npulses, pulse_vector, sfm_start, sfm_end, sfmsize, nb_sfm, R, pvq_bits, core );