From 17eef30b2dc2306868e4c11aac6c3ad0fa3f4f2a Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 22 Oct 2024 08:39:59 +0200 Subject: [PATCH] port fix for cause of issue 903 --- lib_com/options.h | 1 + lib_dec/ivas_mdct_core_dec.c | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 61cc36854..c59854228 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,6 +164,7 @@ #define FIX_828_PORT_1152_FROM_FLT_REPO /* FhG: fix for issue 828 - fix uninitialized value used in BASOP */ #define NONE_BE_FIX_816_LFE_PLC_FLOAT /* DLB: issue 816: reduce required precision to float for LFE-PLC*/ #define FIX_835_PARAMMC_BUFFER_VALUES /* FhG: issue 835: wide range of buffer values for cx in ParamMC */ +#define FIX_903_ZERO_OUT_IMDCT_BUFFERS_FOR_MCT_IGNORE /* FhG: zero out all relevant imdct buffers in MCT decoding of channels with mct_chan_mode == MCT_CHAN_MODE_IGNORE */ /* #################### End FIXES switches ############################ */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ diff --git a/lib_dec/ivas_mdct_core_dec.c b/lib_dec/ivas_mdct_core_dec.c index eb816509f..0b13c274d 100644 --- a/lib_dec/ivas_mdct_core_dec.c +++ b/lib_dec/ivas_mdct_core_dec.c @@ -865,6 +865,16 @@ void ivas_mdct_core_reconstruct( { set_f( &synth[k * L_frame[ch]], 0.f, L_frame[ch] ); set_f( &synthFB[k * L_frame[ch]], 0.f, L_frameTCX[ch] ); +#ifdef FIX_903_ZERO_OUT_IMDCT_BUFFERS_FOR_MCT_IGNORE + /* Note: these buffers are not subframe-based, hence no indexing with k */ + set_f( &st->hHQ_core->old_outLB[0], 0.f, L_frame[ch] ); + set_f( &st->hHQ_core->old_out[0], 0.f, L_frameTCX[ch] ); + set_f( &st->hTcxDec->syn_Overl[0], 0.f, L_frame[ch] / 2 ); + set_f( &st->hTcxDec->syn_OverlFB[0], 0.f, L_frameTCX[ch] / 2 ); + set_f( &st->hTcxDec->syn_Overl_TDAC[0], 0.f, L_frame[ch] / 2 ); + set_f( &st->hTcxDec->syn_Overl_TDACFB[0], 0.f, L_frameTCX[ch] / 2 ); +#endif + } } -- GitLab