diff --git a/lib_com/options.h b/lib_com/options.h index 46b00088cb61977c4c7fdcc2381ea11b0364547b..84ce770c974dd29e013a6496ffb243e927f049e0 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,6 +173,7 @@ #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_1180_HQMDCT_PHECU_LT_MUTING /* Ericsson: issue 1180, corrected long term mute loop attnuation after 200ms in PhECU-PLC */ +#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 ########################### */ diff --git a/lib_dec/ivas_stereo_switching_dec.c b/lib_dec/ivas_stereo_switching_dec.c index 58a5b009a034acea3028f2651f920aab1554d4d4..a831a74d23f6409a177b94a675025812e25a7cc5 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;