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

use proper IF/ELSE construct

sideeffect: avoids sanitizer complaint
parent d3508f9d
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 */

/* #################### End BE switches ################################## */

+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++ )
    {