diff --git a/lib_com/options.h b/lib_com/options.h index a244037882e84546ecae3ae50084b5843083e95f..3b77202459f1cb260d473d61363d85ae2af62a27 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 d1040cb8075a3a6a4c4e305a81e8f55d50da934d..52a6d976f09b8673aa092590ea096cc28540a84d 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 )