From f47deccf0a64382b75f87d469c8584a495afe1fb Mon Sep 17 00:00:00 2001 From: Anjaneyulu Sana Date: Tue, 15 Apr 2025 17:46:50 +0530 Subject: [PATCH] Fix for 3GPP issue 1477: Encoder crash (assert) in ISM1, HQ core fine gain quantization --- lib_com/pvq_com_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/pvq_com_fx.c b/lib_com/pvq_com_fx.c index a6c0bc462..1adcdb7ae 100644 --- a/lib_com/pvq_com_fx.c +++ b/lib_com/pvq_com_fx.c @@ -564,8 +564,8 @@ void fine_gain_quant_fx( tmp1 = extract_l( Pow2( 14, tmp1 ) ); exp1 = sub( 14, exp1 ); - L_tmp = L_mult0( fg_pred[band], tmp1 ); /*12+exp1 */ - fg_pred[band] = round_fx( L_shl( L_tmp, sub( 16, exp1 ) ) ); /*12+exp1+16-exp1-16=12 */ + L_tmp = L_mult0( fg_pred[band], tmp1 ); /*12+exp1 */ + fg_pred[band] = round_fx_sat( L_shl_sat( L_tmp, sub( 16, exp1 ) ) ); /*12+exp1+16-exp1-16=12 */ move16(); } } -- GitLab