From e5b8632713b8ccd06a639dcd8f031143f4f42a3d Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 10 Mar 2025 11:26:36 +0100 Subject: [PATCH] issue 1289: Fix glitch when stereo signal is decoded to mono n TD->DFT switching; under NONBE_1289_STEREO_SW_TO_MONO --- lib_com/options.h | 2 ++ lib_dec/ivas_stereo_switching_dec.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index be86aa6f64..9bf56cd9f1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -176,6 +176,8 @@ #define NONBE_1231_BASOP_819_THRESHOLD_MASA2TOTAL /* Nokia: add fix for precision limitation in comparison with masa2total energy ratio threshold to be aligned with BASOP*/ +#define NONBE_1289_STEREO_SW_TO_MONO /* VA: issue 1289: Fix glitch when stereo signal is decoded to mono n TD->DFT switching */ + /* ##################### End NON-BE switches ########################### */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c index 58a5b009a0..a831a74d23 100644 --- a/lib_dec/ivas_stereo_switching_dec.c +++ b/lib_dec/ivas_stereo_switching_dec.c @@ -1141,7 +1141,11 @@ void synchro_synthesis( /* handling of TD->DFT switching */ for ( n = 0; n < hCPE->nchan_out; n++ ) { +#ifdef NONBE_1289_STEREO_SW_TO_MONO + if ( ( !use_cldfb_for_last_dft && hCPE->last_element_mode != IVAS_CPE_DFT && !sba_dirac_stereo_flag && dft_mono_brate_switch != -1 ) || dft_mono_brate_switch == 1 ) +#else if ( ( hCPE->last_element_mode != IVAS_CPE_DFT && !sba_dirac_stereo_flag && dft_mono_brate_switch != -1 ) || dft_mono_brate_switch == 1 ) +#endif { float *pPrev_synth; float inv_fade_len = 1.f / delay_diff; -- GitLab