From 56ad78e4dc7e5094e8288f2f7035c32a942338f1 Mon Sep 17 00:00:00 2001 From: naghibza Date: Tue, 2 Jun 2026 16:27:23 +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_fx.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 1835439dc..d8e81d626 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -108,6 +108,7 @@ #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 FIX_FMSW_DEC_EXT /* float issue 1566: fix EXT output in format switching */ +#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_fx.c b/lib_enc/ivas_stereo_switching_enc_fx.c index 84f2c7213..a56085d0f 100644 --- a/lib_enc/ivas_stereo_switching_enc_fx.c +++ b/lib_enc/ivas_stereo_switching_enc_fx.c @@ -853,6 +853,9 @@ void stereo_switching_enc_fx( /* no secondary channel in the previous frame -> memory resets */ set16_fx( sts[1]->old_inp_12k8_fx, 0, L_INP_MEM ); +#ifdef FIX_BASOP_2612_RESET_DECIM_MEM + set16_fx( sts[1]->mem_decim16k_fx, 0, 2 * L_FILT_MAX ); +#endif set16_fx( sts[1]->mem_decim_fx, 0, 2 * L_FILT_MAX ); sts[1]->q_mem_decim_fx = Q15; move16(); -- GitLab