From 550558d4dbed308df9884eafccb5a45636583ea1 Mon Sep 17 00:00:00 2001 From: Manuel Jander Date: Mon, 1 Jun 2026 12:08:07 +0200 Subject: [PATCH] Fix assertion failure, issue #2614. --- lib_com/options.h | 2 ++ lib_dec/ivas_stereo_cng_dec_fx.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index a1b758cfc..3100e4717 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 c7b506d4d..2c1e7865b 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] ) ); -- GitLab