From 11548ec8611e2e5b76895ca716584f4b6f9d7050 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Wed, 6 Nov 2024 18:34:36 +0530 Subject: [PATCH] Fix for 3GPP issue 994: High energy in high frequency part of transient for ISM3 --- lib_com/swb_tbe_com_fx.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c index edc0a1e7d..70ab9f418 100644 --- a/lib_com/swb_tbe_com_fx.c +++ b/lib_com/swb_tbe_com_fx.c @@ -3089,6 +3089,16 @@ void GenShapedSHBExcitation_ivas_fx( { excNoisyEnv[i] = mac_r( L_tmp, csfilt_num2[0], shl( excTmp2[i], sub( Q_excTmp2, *Q_bwe_exc ) ) ); move16(); + /* Work-around to avoid 0s for very small value*/ + test(); + test(); + test(); + test(); + if ( excNoisyEnv[i] == 0 && ( L_tmp != 0 || ( csfilt_num2[0] != 0 && excTmp2[i] != 0 ) ) ) + { + excNoisyEnv[i] = 1; + move16(); + } /* excNoisyEnv : Q_excTmp2, *mem_csfilt: Q_excTmp2+16, excTmp2: Q_excTmp2, csfilt_num2[0] Q_excTmp2 */ L_tmp = L_mult( excNoisyEnv[i], neg_csfilt_den2[1] ); /* Q_excTmp2 + 16 */ -- GitLab