diff --git a/lib_com/options.h b/lib_com/options.h index a1b758cfc563aca2adef722e54399cc2355c02f1..3100e4717423675b6e44e83861803364021bb2a5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -107,6 +107,8 @@ #define FIX_2588_MISSING_CONDITIONS /* VA: Proposed fix to 2588, addition of a condition in lsf_dec */ #define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI /* Nokia: BASOP issue 2442: Increase accuracy of computations and add additional gain clamp for low energy decorrelated signal rendering. */ +#define NONBE_FIX2614_LP_CNG_ASSERT + /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ diff --git a/lib_dec/ivas_stereo_cng_dec_fx.c b/lib_dec/ivas_stereo_cng_dec_fx.c index c7b506d4da177fb3d228d5362c68c49d81e83548..2c1e7865b26b99e48f6c9830dfaa7346fdcb98be 100644 --- a/lib_dec/ivas_stereo_cng_dec_fx.c +++ b/lib_dec/ivas_stereo_cng_dec_fx.c @@ -345,6 +345,9 @@ static void stereo_dft_generate_comfort_noise_fx( { q_cngNoiseLevel_upd = s_min( q_cngNoiseLevel_upd, add( e_norm_temp[i], norm_l( cngNoiseLevel_upd[i] ) ) ); } +#ifdef NONBE_FIX2614_LP_CNG_ASSERT + q_cngNoiseLevel_upd = s_min( q_cngNoiseLevel_upd, sub( 31, shr( st->hFdCngDec->bandNoiseShape_exp, 1 ) ) ); +#endif FOR( i = 0; i < st->L_frame; i++ ) { cngNoiseLevel_upd[i] = L_shl( cngNoiseLevel_upd[i], sub( q_cngNoiseLevel_upd, e_norm_temp[i] ) );