From d7fd73405197a5e802f73c6e7f357ed8d7a49247 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Wed, 16 Jul 2025 15:14:43 +0530 Subject: [PATCH] Bug fix: Scaling issue fix in CNG_enc_ivas_fx Link #1775 Fixes issue at time frame 16s-18s in #1775 --- lib_enc/cng_enc_fx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_enc/cng_enc_fx.c b/lib_enc/cng_enc_fx.c index 6dc3963f8..ed3663732 100644 --- a/lib_enc/cng_enc_fx.c +++ b/lib_enc/cng_enc_fx.c @@ -1261,11 +1261,11 @@ void CNG_enc_ivas_fx( move16(); /* Temp variables for floating point functions */ - lp_ener_thr_scale = 8; /* 4.0f*/ /* Q2 */ + lp_ener_thr_scale = 8; /* 4.0f*/ /* Q1 */ move16(); if ( st_fx->element_mode != EVS_MONO ) { - lp_ener_thr_scale = 7; /* 3.5f;*/ /* Q2 */ + lp_ener_thr_scale = 7; /* 3.5f;*/ /* Q1 */ move16(); } @@ -1634,7 +1634,7 @@ void CNG_enc_ivas_fx( IF( hTdCngEnc->burst_ho_cnt > 0 ) { /**allow_cn_step |= ( hDtxEnc->first_CNG || st->element_mode == EVS_MONO ) && ( hTdCngEnc->ho_ener_hist[hTdCngEnc->ho_hist_ptr] > lp_ener_thr_scale * hTdCngEnc->lp_ener );*/ - w_temp = W_msu_32_16( W_shl( W_deposit32_l( hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr] ), 1 ), hTdCngEnc->lp_ener_fx, lp_ener_thr_scale ); /*Q7*/ + w_temp = W_msu_32_16( W_shl( W_deposit32_l( hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr] ), 2 ), hTdCngEnc->lp_ener_fx, lp_ener_thr_scale ); /*Q8*/ test(); test(); -- GitLab