From ba4529409e810b2889b6da902352bd6be5f8a80d Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Thu, 23 Jan 2025 21:52:53 +0530 Subject: [PATCH] Fix for 3GPP issue 1221: Encoder crash for McMASA 5.1 at 16.4kbps in encod_unvoiced_ivas_fx() --- lib_enc/q_gain2p_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/q_gain2p_fx.c b/lib_enc/q_gain2p_fx.c index ed39c5274..4618483d2 100644 --- a/lib_enc/q_gain2p_fx.c +++ b/lib_enc/q_gain2p_fx.c @@ -484,7 +484,7 @@ Word16 gain_enc_uv_fx( /* o : quantization pitch ind /* gcode = pred_nrg_frame * (*gain_inov); */ L_tmp = Mpy_32_16_1( pred_nrg_frame, *gain_inov ); /* 18Q13 */ i = norm_l( L_tmp ); - g_code = round_fx( L_shl( L_tmp, i ) ); + g_code = round_fx_sat( L_shl( L_tmp, i ) ); exp_gcode = sub( 18, i ); /* norm_code2 = 1.0f / sqrt((dot_product(code2, code2, lcode) + 0.01f) / lcode); */ -- GitLab