Commit c414a1d5 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2271_OOB_INDEXING_IN_PIT_OL2

parent 73740e3d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@
#define TMP_1342_WORKAROUND_DEC_FLUSH_BROKEN_IN_SR      /* FhG: Temporary workaround for incorrect implementation of decoder flush with split rendering */
#define NONBE_1122_KEEP_EVS_MODE_UNCHANGED              /* FhG: Disables fix for issue 1122 in EVS mode to keep BE tests green. This switch should be removed once the 1122 fix is added to EVS via a CR.  */
#define FIX_1486_INIT_OUTPUT_POINTERS                   /* FhG: always initialize pointers in renderer flush */
#define FIX_2271_OOB_INDEXING_IN_PIT_OL2                /* VA: Fix for issue 2271, to silence clang18 */
#define FIX_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#define FIX_2249_MEMORY_LEAK_IN_SBA                     /* OR : issue 2249 : Memory leak in SBA to BINAURAL_ROOM_REVERB with memory instrumentation */
#define FIX_1483_PEAQ_VQ_ENC_MSAN_ERROR                 /* Eri: When no PVQ bands are selected in peaq_vq_enc, the number of bands is not initialized. */
+0 −23
Original line number Diff line number Diff line
@@ -72,9 +72,7 @@ void pitch_ol2(
    int16_t i, t, t0, t1, step, fraction, t0_min, t0_max, t_min, t_max;
    float temp, cor_max, enr_wsp, enr_old, cor[COR_BUF_LEN], *pt_cor, wsp_fr[L_SUBFR];
    const float *pt_wsp;
#ifdef FIX_2271_OOB_INDEXING_IN_PIT_OL2
    int16_t base_idx;
#endif
    t0_min = pitch_ol - delta;
    t0_max = pitch_ol + delta - 1;

@@ -116,40 +114,23 @@ void pitch_ol2(
     * the interpolated normalized correlation.
     *-----------------------------------------------------------------*/

#ifndef FIX_2271_OOB_INDEXING_IN_PIT_OL2
    pt_cor = cor + L_INTERPOL1 - t0_min;
#endif
    t0 = t1;
#ifdef FIX_2271_OOB_INDEXING_IN_PIT_OL2
    base_idx = L_INTERPOL1 - t0_min;
#endif
    step = 1; /* 1/4 subsample resolution */
    fraction = 1;

    if ( t0 == t0_min ) /* Limit case */
    {
        fraction = 0;
#ifndef FIX_2271_OOB_INDEXING_IN_PIT_OL2
        cor_max = interpolation( &pt_cor[t0], E_ROM_inter4_1, fraction, PIT_UP_SAMP, 4 );
#else
        cor_max = interpolation( &cor[t0 + base_idx], E_ROM_inter4_1, fraction, PIT_UP_SAMP, 4 );
#endif
    }
    else /* Process negative fractions */
    {
        t0--;
#ifndef FIX_2271_OOB_INDEXING_IN_PIT_OL2
        cor_max = interpolation( &pt_cor[t0], E_ROM_inter4_1, fraction, PIT_UP_SAMP, 4 );
#else
        cor_max = interpolation( &cor[t0 + base_idx], E_ROM_inter4_1, fraction, PIT_UP_SAMP, 4 );
#endif
        for ( i = ( fraction + step ); i <= 3; i = i + step )
        {
#ifndef FIX_2271_OOB_INDEXING_IN_PIT_OL2
            temp = interpolation( &pt_cor[t0], E_ROM_inter4_1, i, PIT_UP_SAMP, 4 );
#else
            temp = interpolation( &cor[t0 + base_idx], E_ROM_inter4_1, i, PIT_UP_SAMP, 4 );
#endif
            if ( temp > cor_max )
            {
                cor_max = temp;
@@ -160,11 +141,7 @@ void pitch_ol2(

    for ( i = 0; i <= 3; i = i + step ) /* Process positive fractions */
    {
#ifndef FIX_2271_OOB_INDEXING_IN_PIT_OL2
        temp = interpolation( &pt_cor[t1], E_ROM_inter4_1, i, PIT_UP_SAMP, 4 );
#else
        temp = interpolation( &cor[t1 + base_idx], E_ROM_inter4_1, i, PIT_UP_SAMP, 4 );
#endif
        if ( temp > cor_max )
        {
            cor_max = temp;