Commit 80f7175e authored by Manuel Jander's avatar Manuel Jander
Browse files

Fix compile error for FIX_1010_OPT_INV_USING_INVSQRT, but keep it disabled...

Fix compile error for FIX_1010_OPT_INV_USING_INVSQRT, but keep it disabled because of regressions. Reduce threshold for SVD problem debug code (disabled by default).
parent f4471291
Loading
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -441,6 +441,7 @@ static float matrixTestIdentity(
    return r;
}

#define PROBLEMATIC_THRESHOLD 0.5f
static void svd_accuracy_test_fx(
    Word32 InputMatrixFx[][MAX_OUTPUT_CHANNELS], /* i  : matrix to be decomposed (M)            InputMatrix_e*/
    Word16 InputMatrixFx_e,
@@ -493,7 +494,7 @@ static void svd_accuracy_test_fx(
    matrixTranspose( tmp1, singularVectors_Left, nChannelsL, nChannelsC );                             /* CxL */
    matrixProduct( tmp2, tmp1, singularVectors_Left, nChannelsC, nChannelsL, nChannelsL, nChannelsC ); /* CxC */
    result = matrixTestIdentity( tmp2, nChannelsC );
    if ( result >= 1.0 )
    if ( result >= PROBLEMATIC_THRESHOLD )
    {
        problematic = 1;
    }
@@ -506,7 +507,7 @@ static void svd_accuracy_test_fx(
    matrixTranspose( tmp1, singularVectors_Right, nChannelsC, nChannelsC );                             /* CxC */
    matrixProduct( tmp2, singularVectors_Right, tmp1, nChannelsC, nChannelsC, nChannelsC, nChannelsC ); /* CxC */
    result = matrixTestIdentity( tmp2, nChannelsC );
    if ( result >= 1.0 )
    if ( result >= PROBLEMATIC_THRESHOLD )
    {
        problematic = 1;
    }
@@ -520,7 +521,7 @@ static void svd_accuracy_test_fx(
    matrixTranspose( tmp3, singularVectors_Right, nChannelsC, nChannelsC );                                              /* CxC */
    matrixProduct( tmp2, tmp1, tmp3, nChannelsL, dimSingular, nChannelsC, nChannelsC );                                  /* LxC */
    result = matrixDifference( tmp2, InputMatrix, nChannelsL, nChannelsC );
    if ( result >= 1.0 )
    if ( result >= PROBLEMATIC_THRESHOLD )
    {
        problematic = 1;
    }
@@ -1826,7 +1827,11 @@ static void singularVectorsAccumulationLeft_fx(
                Word16 temp_e = norm_l( singularVectors_Left[nCh][nCh] );
                t_jj = BASOP_Util_Inv32( maxWithSign_fx( L_shl( singularVectors_Left[nCh][nCh], temp_e ) ), &temp_exp );
                t_jj = Mpy_32_32( Mpy_32_32( t_ii, norm_y ), t_jj );
#ifndef FIX_1010_OPT_SINGLE_RESCALE
                t_jj_e = add( add( temp_exp, temp_e ), sub( add( t_ii_e, norm_y_e ), sing_exp2[nCh][nCh] ) );
#else
                t_jj_e = add( add( temp_exp, temp_e ), sub( add( t_ii_e, norm_y_e ), singularVectors_Left_e[nCh][nCh] ) );
#endif
#else
                t_jj = BASOP_Util_Divide3232_Scale_cadence( Mpy_32_32( t_ii, norm_y ), maxWithSign_fx( singularVectors_Left[nCh][nCh] ), &temp_exp );                                                                                 // t_ii_e+norm_y_e-*singularVectors_e,
#ifndef FIX_1010_OPT_SINGLE_RESCALE