diff --git a/lib_com/options.h b/lib_com/options.h index 7d7d95965dacd6c9a6f76f795b0a2a1b0f5a7b9d..123c0590c61fafc9e725d2f9bf9e294104003f1c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -164,6 +164,7 @@ #define FIX_2235_TD_RENDERER_WORD16 /* Eri: For float: small synch with BASOP, removing unnecessary abs. BASOP: Use Word16 in TD renderer without converting to Word32 */ #define FIX_FLOAT_1526_DIRAC_MEM_LEAK /* FhG: potential memory leak in DirAC handles in case of format switching */ #define ALIGN_ACELP_CORE /* VA: align ACELP core functions with BASOP */ +#define FIX_1532_MSAN_ERR_AMR_FIRST_FRAME_IS_SID /* FhG: fix msan complaint in AMR-WB when first frame is an SID */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/hf_synth.c b/lib_dec/hf_synth.c index fe2bd60c0fe4be692e4c78f362b254826750c41f..9b4276ad950deca34d44fa599b227770d7d60bbc 100644 --- a/lib_dec/hf_synth.c +++ b/lib_dec/hf_synth.c @@ -441,6 +441,16 @@ void hf_synth_amr_wb( HF_corr_gain[i] = 2 * HP_gain[hf_gain[i]]; } } +#ifdef FIX_1532_MSAN_ERR_AMR_FIRST_FRAME_IS_SID + else + { + /* Initialize to fix clang-18 sanitizer complaint */ + for ( i = 0; i < NB_SUBFR; ++i ) + { + HF_corr_gain[i] = 1.0f; + } + } +#endif /* inverse DCT transform of HF excitation */ set_f( exc16k, 0.0f, L_FRAME16k );