From adb20e9040dfdb4e21202c55d8c35f1287287cef Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Fri, 3 Feb 2023 15:31:02 +0100 Subject: [PATCH] [fix] for issue 301 ix bug of missing update of overlap buffer for DFT-stereo PLC under FIX_301_PLC --- lib_com/options.h | 2 +- lib_dec/core_dec_init.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5dddf236ea..a5b56970e7 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -166,7 +166,7 @@ #define FIX_309_PREMPH_MEM_SCE /* FhG: issue 309 - fix overwriting of mem_preemph_enc in ivas preprocessing for SCE and tcxonly modes*/ #define FIX_317 /* FhG: issue 317 - address sanitizer error in MDCT-Stereo PLC */ - +#define FIX_301_PLC /* FhG: issue 301 - fix bug of missing update of overlap buffer for DFT-stereo PLC*/ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/core_dec_init.c b/lib_dec/core_dec_init.c index ec673cd19c..511eedc53f 100644 --- a/lib_dec/core_dec_init.c +++ b/lib_dec/core_dec_init.c @@ -279,7 +279,11 @@ void open_decoder_LPD( st->last_core_bfi = ACELP_CORE; } +#ifdef FIX_301_PLC + if ( ( ( st->element_mode != IVAS_CPE_DFT ) || ( st->element_mode == IVAS_CPE_DFT && st->prev_bfi ) ) && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) +#else if ( st->element_mode != IVAS_CPE_DFT && st->last_codec_mode == MODE1 && st->last_core == ACELP_CORE ) +#endif { /* Switching from Mode 1 ACELP */ st->last_core_bfi = ACELP_CORE; -- GitLab