From 847ea5230b9e1cfcf7bae93191c9cbbb9ebd4b85 Mon Sep 17 00:00:00 2001 From: naghibza Date: Tue, 2 Jun 2026 16:26:45 +0200 Subject: [PATCH] reset the 16k resampler memory of the secondary channel on DFT->TD stereo switch --- lib_com/options.h | 1 + lib_enc/ivas_stereo_switching_enc.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 5b5c21c7b..c724d50e7 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,6 +171,7 @@ #define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */ #define FIX_BASOP_2442_MASA2TC_TO_MONO_AND_AMBI /* Nokia: BASOP issue 2442: Aligns float with identical diffuse gain limitation to minimize diff */ +#define FIX_BASOP_2612_RESET_DECIM_MEM /* FhG: BASOP #2612: reset (zero) the 16k resampler memory of the secondary channel on DFT->TD stereo switch (otherwise -> fx overshoot) */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_stereo_switching_enc.c b/lib_enc/ivas_stereo_switching_enc.c index a1fe5b522..c42ee23ab 100644 --- a/lib_enc/ivas_stereo_switching_enc.c +++ b/lib_enc/ivas_stereo_switching_enc.c @@ -755,6 +755,9 @@ void stereo_switching_enc( /* no secondary channel in the previous frame -> memory resets */ set_zero( sts[1]->old_inp_12k8, L_INP_MEM ); +#ifdef FIX_BASOP_2612_RESET_DECIM_MEM + set_zero( sts[1]->mem_decim16k, 2 * L_FILT_MAX ); +#endif set_zero( sts[1]->mem_decim, 2 * L_FILT_MAX ); sts[1]->mem_preemph = 0; -- GitLab