Commit 1732636a authored by thomas dettbarn's avatar thomas dettbarn
Browse files

more fine tuning in left_64() and right_64() (to run the regression test)

parent f62a0613
Loading
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -1004,8 +1004,8 @@ static void biDiagonalReductionLeft_64(
{

#define HEADROOM_LEFT_1 2
#define HEADROOM_LEFT_2 2
#define HEADROOM_LEFT_3 15
#define HEADROOM_LEFT_2 12
#define HEADROOM_LEFT_3 14
#define HEADROOM_LEFT_4 15

    Word16 iCh, jCh;
@@ -1049,8 +1049,8 @@ static void biDiagonalReductionLeft_64(
        {
            ( *g ) = L_negate( *g );
        }
        factor2 = W_extract_l( W_shr( singularVectors_Left_64[currChannel][currChannel], HEADROOM_LEFT_1 ) );
        tmp_e = sub( HEADROOM_LEFT_1, ( *g_e ) );
        factor2 = W_extract_l( W_shr( singularVectors_Left_64[currChannel][currChannel], HEADROOM_LEFT_2 ) );
        tmp_e = sub( 2 * HEADROOM_LEFT_1 - HEADROOM_LEFT_2, ( *g_e ) );
        tmpmul = W_mult0_32_32( ( *g ), factor2 );
        tmpmul = W_shr( tmpmul, tmp_e );
        r_64 = W_sub( tmpmul, norm_64 );
@@ -1083,7 +1083,7 @@ static void biDiagonalReductionLeft_64(
            norm_x_e = W_norm( norm_64 );
            norm_x = W_extract_h( W_shl( norm_64, norm_x_e ) );
            f = Mpy_32_32( norm_x, invVal );
            magic_shift = norm_x_e - r_e + ( 32 + 2 * HEADROOM_LEFT_1 - HEADROOM_LEFT_2 - 2 * HEADROOM_LEFT_3 - HEADROOM_LEFT_4 );
            magic_shift = norm_x_e - r_e + ( 30 + 2 * HEADROOM_LEFT_1 - 2 * HEADROOM_LEFT_3 - HEADROOM_LEFT_4 );
            FOR( jCh = currChannel; jCh < nChannelsL; jCh++ )
            {
                factor1 = W_extract_h( W_shl( singularVectors_Left_64[jCh][currChannel], 32 - HEADROOM_LEFT_4 ) );
@@ -1114,8 +1114,8 @@ static void biDiagonalReductionRight_64(
    Word16 idx;

#define HEADROOM_RIGHT_1 2
#define HEADROOM_RIGHT_2 2
#define HEADROOM_RIGHT_3 15
#define HEADROOM_RIGHT_2 12
#define HEADROOM_RIGHT_3 14
#define HEADROOM_RIGHT_4 15


@@ -1162,7 +1162,7 @@ static void biDiagonalReductionRight_64(
            move32();
            move16();
            factor2 = W_extract_l( W_shr( singularVectors_Left_64[currChannel][idx], HEADROOM_RIGHT_2 ) );
            tmp_e = sub( HEADROOM_RIGHT_2, *g_e );
            tmp_e = sub( 2 * HEADROOM_RIGHT_1-HEADROOM_RIGHT_2, *g_e );
            tmpmul = W_mult0_32_32( *g, factor2 );
            tmpmul = W_shr( tmpmul, tmp_e );
            r_64 = W_sub( tmpmul, norm_64 );
@@ -1191,7 +1191,7 @@ static void biDiagonalReductionRight_64(
                norm_x_e = W_norm( norm_64 );
                norm_x = W_extract_h( W_shl( norm_64, norm_x_e ) );
                f = Mpy_32_32( norm_x, invVal );
                magic_shift = norm_x_e - r_e + ( 32 + 2 * HEADROOM_RIGHT_1 - HEADROOM_RIGHT_2 - 2 * HEADROOM_RIGHT_3 - HEADROOM_RIGHT_4 );
                magic_shift = norm_x_e - r_e + ( 30 + 2 * HEADROOM_RIGHT_1 - 2 * HEADROOM_RIGHT_3 - HEADROOM_RIGHT_4 );

                FOR( jCh = idx; jCh < nChannelsC; jCh++ )
                {