diff --git a/lib_com/cnst.h b/lib_com/cnst.h index 7f435eaa9197c94a11ecef171b0772105cb2e286..036602ddc50f5d9ecea8441809c8c3cfc56a794a 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -2731,7 +2731,11 @@ extern const Word16 Idx2Freq_Tbl[]; /* 'x' is converted to Q6, 'Freq_Tbl'/1000 in Q9 */ /* only works for 'fs' = [8000,12800,16000,25600,32000,48000] (unpredictable otherwise) */ /* 15625 is 1000000.0f/Q6 but we use the calculated value to avoid float point code */ +#ifdef FIX_2286_GCC_WARNING_Idx2Freq_Tbl +#define NS2SA_FX2(fs,x) (chk_fs(fs) mult(Idx2Freq_Tbl[L_and(L_shr(fs,8),7)-2], (Word16)((x)/15625))) +#else #define NS2SA_FX2(fs,x) (chk_fs(fs) mult((&Idx2Freq_Tbl[-2])[L_and(L_shr(fs,8),7)], (Word16)((x)/15625))) +#endif #define L_FRAME_12k8 256 /* Frame size at 12k8Hz: 20ms = 256 samples */ #define L_FRAME_16k 320 /* Frame size at 16kHz: 20ms = 320 samples */ diff --git a/lib_com/options.h b/lib_com/options.h index e0435b3e26303e179da436a2527d3a4c5c9565c6..d61b63fcf043335f7c1a328ecbef20bd775041c6 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -89,6 +89,7 @@ #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 */ #define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ #define FIX_2254_IMPROV_COMPLEXITY_BE /* VA: BE small complexity reduction */ +#define FIX_2286_GCC_WARNING_Idx2Freq_Tbl /* FhG: Fix compiler warning for OOB access of Idx2Freq_Tbl[] */ #define FIX_CLANG18_MSAN_IN_DEC_INIT_BY_MOVING_COMMON_INITS_TOGETHER /* FhG: fix CLANG18 MSAN error in decoder init */ #define FIX_1481_CLANG18_MSAN_INIT_LAST_ELEM_BRATE /* FhG: initialize last_element_brate to avoid CLANG18 MSAN complaint */ #define FIX_1484_CLANG18_MSAN_INIT_ST_ELEM_BRATE /* FhG: initialize st->element_brate per default */