Commit 5757f2cc authored by malenov's avatar malenov Committed by Sandesh Venkatesh
Browse files

fix discpreancy within the Copy() function depending on memory locations of x[] and y[]

parent 69312e13
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -84,4 +84,5 @@
#define NONBE_1233_HQ_CLASSIFIER_DIV_BY_ZERO            /* Eri: issue 1233: Address possible division by zero in hf_spectrum_sparseness() */
#define FIX_ISSUE_1062_AND_1068_TON_ENE_EST_FX
#define FIX_1054_IF_ELSE_CMPLX                          /* VA: Fix 1054 incorrect counting of complexity when ELSE-IF sequence is encoutered in two functions */
#define FIX_1052_COPY_CMPLX_DISCREPANCY       /* VA: modify IF-ELSE statements used in Copy*() functions to avoid dependency on x[] and y[] in RAM */
#endif
+20 −0
Original line number Diff line number Diff line
@@ -486,7 +486,12 @@ void Copy(
            move16();
        }
    }

#ifdef FIX_IF_ELSE_CMPLX_DISCREPANCY
    IF( y >= x )
#else
    ELSE
#endif
    {
        FOR( i = L - 1; i >= 0; i-- )
        {
@@ -515,7 +520,12 @@ void Copy64(
            move64();
        }
    }

#ifdef FIX_IF_ELSE_CMPLX_DISCREPANCY
    IF( y >= x )
#else
    ELSE
#endif
    {
        FOR( i = L - 1; i >= 0; i-- )
        {
@@ -559,7 +569,12 @@ void Copy_pword(
            move16();
        }
    }

#ifdef FIX_IF_ELSE_CMPLX_DISCREPANCY
    IF( y >= x )
#else
    ELSE
#endif
    {
        FOR( i = L - 1; i >= 0; i-- )
        {
@@ -590,7 +605,12 @@ void Copy32(
            move32();
        }
    }

#ifdef FIX_IF_ELSE_CMPLX_DISCREPANCY
    IF( y >= x )
#else
    ELSE
#endif
    {
        FOR( i = L - 1; i >= 0; i-- )
        {