Commit 93859eb2 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN

parent 03c6c533
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -162,7 +162,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_FLOAT_1539_G192_FORMAT_SWITCH               /* Nokia: reintroduce format switching for g192 bitstreams */
#define FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN            /* FhG: float issue 1560: Avoid optimizing the division on the result of maxWithSign() with -funsafe-math-optimizations */
#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES              /* Dolby: remove unused ISAR */
#define FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD          /* FhG: float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() */
#define FIX_1585_ASAN_FORMAT_SW_ALT                     /* VA: float issue 1585: alternative fix memory leaks with format switching */
+0 −50
Original line number Diff line number Diff line
@@ -272,12 +272,8 @@ static int16_t BidagonalDiagonalisation(
)
{
    int16_t kCh, nCh, iCh, jCh, split;
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    volatile float c, s;
    float f1, f2;
#else
    float c, s, f1, f2;
#endif
    float g = 0.0f;
    int16_t convergence, iteration, found_split;
    int16_t error = 0;
@@ -390,14 +386,8 @@ static void ApplyQRTransform(
)
{
    int16_t ch, split;
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    float d = 0.0f, g = 0.0f, r = 0.0f, x_ii = 0.0f, x_split = 0.0f, x_kk = 0.0f, aux = 0.0f;
    volatile float mu = 0.0f, c = 1.0f, s = 1.0f;
#else
    float d = 0.0f, g = 0.0f, r = 0.0f, x_ii = 0.0f, x_split = 0.0f, x_kk = 0.0f, mu = 0.0f, aux = 0.0f;
    float c = 1.0f;
    float s = 1.0f;
#endif

    x_kk = singularValues[currentIndex];
    x_ii = singularValues[startIndex];
@@ -535,20 +525,12 @@ static void biDiagonalReductionLeft(
    float *g )
{
    int16_t iCh, jCh;
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    volatile float norm_x, r;
    volatile float f;
    volatile float g_loc;
#else
    float norm_x, f, r;
#endif

    /* Setting values to 0 */
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    g_loc = 0.0f;
#else
    ( *g ) = 0.0f;
#endif

    if ( currChannel < nChannelsL ) /* i <= m */
    {
@@ -561,15 +543,9 @@ static void biDiagonalReductionLeft(

        if ( ( norm_x ) ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
        {
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
            g_loc = -( singularVectors[currChannel][currChannel] >= 0 ? 1 : ( -1 ) ) * sqrtf( norm_x );
            r = g_loc * singularVectors[currChannel][currChannel] - norm_x;
            singularVectors[currChannel][currChannel] = ( singularVectors[currChannel][currChannel] - g_loc );
#else
            ( *g ) = -( singularVectors[currChannel][currChannel] >= 0 ? 1 : ( -1 ) ) * sqrtf( norm_x );
            r = ( *g ) * singularVectors[currChannel][currChannel] - norm_x;
            singularVectors[currChannel][currChannel] = ( singularVectors[currChannel][currChannel] - ( *g ) );
#endif

            for ( iCh = currChannel + 1; iCh < nChannelsC; iCh++ ) /* nChannelsC */
            {
@@ -590,9 +566,7 @@ static void biDiagonalReductionLeft(
        }
    }

#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    *g = g_loc;
#endif

    return;
}
@@ -612,19 +586,11 @@ static void biDiagonalReductionRight(
    float *g )
{
    int16_t iCh, jCh, idx;
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    volatile float norm_x, r;
    volatile float g_loc;
#else
    float norm_x, r;
#endif

    /* Setting values to 0 */
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    g_loc = 0.0f;
#else
    ( *g ) = 0.0f;
#endif

    if ( currChannel < nChannelsL && currChannel != ( nChannelsC - 1 ) ) /* i <=m && i !=n */
    {
@@ -639,15 +605,9 @@ static void biDiagonalReductionRight(

        if ( norm_x ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
        {
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
            g_loc = -( singularVectors[currChannel][idx] >= 0 ? 1 : ( -1 ) ) * sqrtf( norm_x );
            r = g_loc * singularVectors[currChannel][idx] - norm_x;
            singularVectors[currChannel][idx] = ( singularVectors[currChannel][idx] - g_loc );
#else
            ( *g ) = -( singularVectors[currChannel][idx] >= 0 ? 1 : ( -1 ) ) * sqrtf( norm_x );
            r = ( *g ) * singularVectors[currChannel][idx] - norm_x;
            singularVectors[currChannel][idx] = ( singularVectors[currChannel][idx] - ( *g ) );
#endif

            for ( iCh = currChannel + 1; iCh < nChannelsL; iCh++ ) /*  nChannelsL */
            {
@@ -665,9 +625,7 @@ static void biDiagonalReductionRight(
        }
    }

#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    *g = g_loc;
#endif

    return;
}
@@ -687,12 +645,8 @@ static void singularVectorsAccumulationLeft(
{
    int16_t nCh, iCh, k;
    int16_t nChannels;
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    float norm_y;
    volatile float t_jj, t_ii;
#else
    float norm_y, t_jj, t_ii;
#endif

    /* Processing */
    nChannels = min( nChannelsL, nChannelsC ); /* min(nChannelsL,ChannelsC) */
@@ -760,12 +714,8 @@ static void singularVectorsAccumulationRight(
{
    int16_t nCh, iCh, k;
    int16_t nChannels;
#ifdef FIX_FLOAT_1560_SVD_NO_OPT_MAX_W_SIGN
    float norm_y, t_ii;
    volatile float ratio;
#else
    float norm_y, t_ii, ratio;
#endif

    /* Processing */
    nChannels = nChannelsC; /* nChannelsC */