From b89907aea050a2f3e9d4c537a5c66b286a4aefb2 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 22:09:00 +0200 Subject: [PATCH 1/2] port CR --- lib_com/options.h | 1 + lib_enc/swb_pre_proc_fx.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 49f6e68e9..73fdbba29 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -113,6 +113,7 @@ #define NONBE_1329_FIX_OSBA_CRASH /* FhG: issue 1329: prevent assert when bit budget is low*/ #define NONBE_FIX_1128_OSBA_EXT_OUTPUT_ORDER /* FhG: issue 1128: set output ambisonics order to input order for EXT output */ #define FIX_1138_SBA_EXT_ERROR_PRINTOUT /* VA: issue 1138: Fix SBA EXT output call of audioCfg2channels() */ +#define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ #define NONBE_FIX_981_PARAMBIN_DEFAULT_EARLY_PART /* Nokia: Set default early part energy correction to unity for BINAURAL_ROOM_REVERB */ #define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */ #define NONBE_FIX_1052_SBA_EXT_FIX /* VA: SBA external output support fix - do not overwrite "output_config" parameter */ diff --git a/lib_enc/swb_pre_proc_fx.c b/lib_enc/swb_pre_proc_fx.c index 85277e298..ca7233c95 100644 --- a/lib_enc/swb_pre_proc_fx.c +++ b/lib_enc/swb_pre_proc_fx.c @@ -583,7 +583,11 @@ void swb_pre_proc_fx( IF( NE_16( st_fx->last_extl, SWB_BWE ) && NE_16( st_fx->last_extl, FB_BWE ) ) { /* resample 48 kHz to 32kHz */ +#ifdef NONBE_1244_FIX_SWB_BWE_MEMORY + IF( ( st_fx->last_bwidth == FB && st_fx->element_mode == EVS_MONO ) || ( EQ_16( st_fx->bwidth, FB ) && st_fx->element_mode > EVS_MONO ) ) // note: once EVS i CR fixed, the condition will simplify to "if ( st->bwidth == FB )" only +#else IF( EQ_16( st_fx->last_bwidth, FB ) ) +#endif { inner_frame = L_FRAME48k; inner_Fs = 48000; @@ -986,7 +990,11 @@ void swb_pre_proc_ivas_fx( IF( NE_16( st->last_extl, SWB_BWE ) && NE_16( st->last_extl, FB_BWE ) ) { /* resample 48 kHz to 32kHz */ +#ifdef NONBE_1244_FIX_SWB_BWE_MEMORY + IF( ( st->last_bwidth == FB && st->element_mode == EVS_MONO ) || ( EQ_16( st->bwidth, FB ) && st->element_mode > EVS_MONO ) ) // note: once EVS i CR fixed, the condition will simplify to "if ( st->bwidth == FB )" only +#else IF( EQ_16( st->last_bwidth, FB ) ) +#endif { inner_frame = L_FRAME48k; move16(); -- GitLab From 204c8126a9f2a56c247dca3590328871fb76390e Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 18 Aug 2025 22:13:36 +0200 Subject: [PATCH 2/2] port CR --- lib_com/options.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 8e19ed962..064af49b6 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -121,10 +121,9 @@ #define NONBE_FIX_1110_STEREO_DTX_BRATE_SWITCHING /* VA: issue 1110: fix encoder crash in the stereo DTX bitrate switching condition */ #define FIX_1099_JBM_MD_HANDLE_ALLOC /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */ #define FIX_1121_MASA_DESCRIPTOR /* VA: issue 1121: Define 'ivasmasaFormatDescriptor' at one common place */ - -#define NONBE_1894_OSBA_SCALING /* FhG: do not scale OSBA inputs by 0.5 any more */ -#define NONBE_FIX_1141_OSBA_ROOM_RENDERING /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */ -#define NONBE_1360_LFE_DELAY /* Dlb: LFE delay alignment when rendering in CLDFB domain*/ +#define NONBE_1894_OSBA_SCALING /* FhG: do not scale OSBA inputs by 0.5 any more */ +#define NONBE_FIX_1141_OSBA_ROOM_RENDERING /* FhG: Fix for issue 1141: render objects in OSBA decoder with room effect */ +#define NONBE_1360_LFE_DELAY /* Dlb: LFE delay alignment when rendering in CLDFB domain*/ #define NONBE_1229_FIX_ISM1_DPID /* Eri: issue 1229: fix bug causing ISM 1 to use default -dpid instead of the specified one */ #define NONBE_SVD_OPTIMIZATION #define NONBE_FIX_1176_OSBA_REVERB_JBM_ASAN_ERROR /* Ericsson: Issue 1176, fix in TDREND_firfilt for subframes shorter than the filter length */ -- GitLab