From a4a7053776df40ad3d604c85c1a704915d1c217c Mon Sep 17 00:00:00 2001 From: vaclav Date: Sat, 6 Dec 2025 10:58:40 +0100 Subject: [PATCH] fix FIX_2252_SCALING_SAVE_HB_SYNTH --- lib_com/options.h | 1 + lib_dec/acelp_core_dec_fx.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index e9b94dbad..fd3235f5c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -87,6 +87,7 @@ #define FIX_1435_MOVE_STEREO_PANNING /* VA: issue 1435: do the EVS stereo panning in the renderer */ #define FIX_BASOP_2201_HARMONIZE_HRTF_FILE_READER_CREND /* OR : Fix issue basop 2201 hrtf_file_reader crend differs between basop ivas-main and ivas-float-update */ #define FIX_2245_INIT_FD_CNG_EVS /* Dolby/VA: Issue 2245: initialize FD CNG with EVS-type of init function */ +#define FIX_2252_SCALING_SAVE_HB_SYNTH /* VA: issue 2252: fix use-of-uninit-value in save_hb_synth_fx[] scaling in FOA decoding with bitstream that starts with an SID */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/acelp_core_dec_fx.c b/lib_dec/acelp_core_dec_fx.c index 958b8064d..521ab4f18 100644 --- a/lib_dec/acelp_core_dec_fx.c +++ b/lib_dec/acelp_core_dec_fx.c @@ -2334,9 +2334,17 @@ ivas_error acelp_core_dec_fx( IF( NE_16( st->element_mode, EVS_MONO ) ) { +#ifdef FIX_2252_SCALING_SAVE_HB_SYNTH + IF( save_hb_synth_fx16 != NULL ) +#else IF( save_hb_synth_fx16 ) +#endif { +#ifdef FIX_2252_SCALING_SAVE_HB_SYNTH + Copy_Scale_sig_32_16( save_hb_synth_fx, save_hb_synth_fx16, output_frame, 0 ); // Q0 +#else Copy_Scale_sig_32_16( save_hb_synth_fx, save_hb_synth_fx16, L_FRAME48k, 0 ); // Q0 +#endif } Copy_Scale_sig_32_16( synth_fx, synth_fx16, output_frame, 0 ); // Q_syn2 } -- GitLab