From 5ce99876f27fd45d5ee8820f21df7fcf8ba812a6 Mon Sep 17 00:00:00 2001 From: vaclav Date: Fri, 13 Dec 2024 11:28:10 +0100 Subject: [PATCH] issue 1244: fix to SWB BWE memory in case of switching from FB coding; under NONBE_1244_FIX_SWB_BWE_MEMORY --- lib_com/options.h | 2 ++ lib_enc/swb_pre_proc.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 059877b9b2..7ba00d5e4d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -178,6 +178,8 @@ #define NONBE_1220_OMASA_JBM_BRATE_SW_FLUSH /* VA: issue 1220: fix bug in renderer flush in OMASA 1ISM JBM bitrate switching */ #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_1233_HQ_CLASSIFIER_DIV_BY_ZERO /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */ +#define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding */ + /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/swb_pre_proc.c b/lib_enc/swb_pre_proc.c index 610d485db4..72893243f2 100644 --- a/lib_enc/swb_pre_proc.c +++ b/lib_enc/swb_pre_proc.c @@ -442,7 +442,11 @@ void swb_pre_proc( if ( st->last_extl != SWB_BWE && 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 ) || ( st->bwidth == FB && st->element_mode > EVS_MONO ) ) +#else if ( st->last_bwidth == FB ) +#endif { inner_frame = L_FRAME48k; inner_Fs = 48000; -- GitLab