Commit 6c202ef2 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch 'basop-2275-usan-oob-indexing-in-predict_signal-function' into 'main'

Resolve "USAN: OOB indexing in predict_signal function"

Closes #2275

See merge request !2655
parents 203aa930 c25452bf
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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_2275_OOB_INDEXING_IN_PREDICT_SIGNAL_FUNC    /* FhG: fix a USAN OOB error */
#define FIX_2284_ADD_ASSERT_LOG                         /* FhG: add asserts to Log2_norm_lc() and log10_fx() */
#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 */
+11 −0
Original line number Diff line number Diff line
@@ -401,9 +401,20 @@ void predict_signal(
        x0--;
    }

#ifdef FIX_2275_OOB_INDEXING_IN_PREDICT_SIGNAL_FUNC
    IF( EQ_16( frac_max, 6 ) )
    {
        win = &inter6_2tcx2[frac][0]; /* Q15 */
    }
    ELSE
    {
        win = &inter4_2tcx2[frac][0]; /* Q15 */
    }
#else
    win = &inter4_2tcx2[frac][0]; /* Q15 */
    if ( EQ_16( frac_max, 6 ) )
        win = &inter6_2tcx2[frac][0]; /* Q15 */
#endif

    FOR( j = 0; j < L_subfr; j++ )
    {