From 516d64b7d063741eef178149af8e1107a4908794 Mon Sep 17 00:00:00 2001 From: vaclav Date: Mon, 12 Jan 2026 10:42:59 +0100 Subject: [PATCH] FIX_2315_AGC_MEMORY_RESET --- lib_com/options.h | 1 + lib_dec/core_switching_dec_fx.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index a24403788..3b7720245 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -133,6 +133,7 @@ #define FIX_2285_CODE_DECODER_INIT_BW /* VA: basop issue 2285: fix core-decoder initialization bandwidth */ #define FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN /* Dolby: Fix missing update of low-rate pitch gain in the S/M classifier */ #define FIX_2297_SBA_SCALING_32KHZ /* VA: basop issue 2297: Fix scaling factor before the SBA decoder for output_Fs = 32 or 16 */ +#define FIX_2315_AGC_MEMORY_RESET /* VA: basop issue 2315: fix reset of the AGC memory */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index d1040cb80..52a6d976f 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -2491,8 +2491,14 @@ ivas_error core_switching_pre_dec_ivas_fx( /* Last frame was Stereo CNG and the synthesis memory is outdated -- reset */ set16_fx( st->hTcxDec->old_syn_Overl, 0, L_FRAME32k / 2 ); set16_fx( st->hFdCngDec->hFdCngCom->olapBufferAna_fx, 0, FFTLEN ); +#ifndef FIX_2315_AGC_MEMORY_RESET set16_fx( st->agc_mem_fx, 0, 2 ); +#endif } + +#ifdef FIX_2315_AGC_MEMORY_RESET + set16_fx( st->agc_mem_fx, 0, 2 ); +#endif st->mem_deemph_fx = 0; move16(); IF( !st->last_con_tcx ) -- GitLab