Commit f9b319b6 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_2273_OOB_INDEXING_IN_PIT_FR4

parent 6b37c8bb
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -86,7 +86,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_1904_HARM_GSC_ENC                           /* VA: #1904 Harmonization of EVS and IVAS GSC code */
#define FIX_2273_OOB_INDEXING_IN_PIT_FR4                /* VA: Fix to silence clang on ptr init */
#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. */
#define FIX_1480_CLANG18_MSAN_UNINIT_VARIABLE           /* Eri: Initializes a variables in HQ decoder. It is not used, but is passed uninitialized to a function which is caught by clang-18 */
#define FIX_1449_RENDERER_FRAME_SIZE_UNCLEAR_IN_ISAR    /* Dolby: Fix for issue 1449: renderer frame size unclear in ISAR */
+0 −49
Original line number Diff line number Diff line
@@ -762,9 +762,7 @@ Word16 pitch_fr4_fx(
    Word16 corr_v[15 + 2 * L_INTERPOL1 + 1]; /* Total length = t0_max-t0_min+1+2*L_inter */
    Word16 pit_min;
    Word16 cor_max;
#ifdef FIX_2273_OOB_INDEXING_IN_PIT_FR4
    Word16 corr_off;
#endif

    /* initialization */
    IF( limit_flag == 0 )
@@ -809,25 +807,11 @@ Word16 pitch_fr4_fx(
    t_min = sub( t0_min, L_INTERPOL1 );
    t_max = add( t0_max, L_INTERPOL1 );

#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
    corr = &corr_v[-t_min];
#else
    corr = corr_v;
    corr_off = -t_min;
    move16();
#endif

    /* corr[t_min..t_max] */
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
    if ( element_mode > EVS_MONO )
    {
        norm_corr_ivas_fx( exc, xn, h, t_min, t_max, corr, L_subfr, Q_new );
    }
    else
    {
        norm_corr_fx( exc, xn, h, t_min, t_max, corr, L_subfr );
    }
#else
    if ( element_mode > EVS_MONO )
    {
        norm_corr_ivas_fx( exc, xn, h, t_min, t_max, corr + corr_off, L_subfr, Q_new );
@@ -836,37 +820,24 @@ Word16 pitch_fr4_fx(
    {
        norm_corr_fx( exc, xn, h, t_min, t_max, corr + corr_off, L_subfr );
    }
#endif

    /*-----------------------------------------------------------------*
     * Find integer pitch
     *-----------------------------------------------------------------*/

#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
    max_val = corr[t0_min];
#else
    max_val = corr[t0_min + corr_off];
#endif
    move16();
    t0 = t0_min;
    move16();

    FOR( i = t0_min + 1; i <= t0_max; i++ )
    {
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
        if ( GE_16( corr[i], max_val ) )
#else
        if ( GE_16( corr[i + corr_off], max_val ) )
#endif
        {
            t0 = i;
            move16();
        }
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
        max_val = s_max( corr[i], max_val );
#else
        max_val = s_max( corr[i + corr_off], max_val );
#endif
    }

    IF( EQ_16( t0_fr1, pit_min ) )
@@ -880,11 +851,7 @@ Word16 pitch_fr4_fx(
            {
                i = sub( i, 2 );
            }
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
            IF( GT_16( corr[i], corr[i + 2] ) )
#else
            IF( GT_16( corr[i + corr_off], corr[i + 2 + corr_off] ) )
#endif
            {
                t0 = i;
                move16();
@@ -935,27 +902,15 @@ Word16 pitch_fr4_fx(
    {
        fraction = 0;
        move16();
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
        cor_max = Interpol_4( &corr[t0], fraction );
#else
        cor_max = Interpol_4( &corr[t0 + corr_off], fraction );
#endif
    }
    ELSE
    {
        t0 = sub( t0, 1 );
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
        cor_max = Interpol_4( &corr[t0], fraction );
#else
        cor_max = Interpol_4( &corr[t0 + corr_off], fraction );
#endif
        FOR( i = fraction + step; i <= 3; i = ( i + step ) )
        {
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
            temp = Interpol_4( &corr[t0], i );
#else
            temp = Interpol_4( &corr[t0 + corr_off], i );
#endif
            IF( GT_16( temp, cor_max ) )
            {
                cor_max = temp;
@@ -968,11 +923,7 @@ Word16 pitch_fr4_fx(

    FOR( i = 0; i <= 3; i = ( i + step ) )
    {
#ifndef FIX_2273_OOB_INDEXING_IN_PIT_FR4
        temp = Interpol_4( &corr[t1], i );
#else
        temp = Interpol_4( &corr[t1 + corr_off], i );
#endif
        IF( GT_16( temp, cor_max ) )
        {
            cor_max = temp;