Commit 131ba565 authored by Mohammadreza Naghibzadeh's avatar Mohammadreza Naghibzadeh
Browse files

Add/remove some move32/16 functions.

parent bb922843
Loading
Loading
Loading
Loading
Loading
+15 −11
Original line number Diff line number Diff line
@@ -867,6 +867,7 @@ static void HouseholderReduction_fx(

#ifdef MERGE_REQUEST_1926_SPEEDUP_ivas_svd_dec_fx_NONBE
    Word16 sc = 0;
    move16();
    sc = getScaleFactor32( singularVectors_Left_fx[0], nChannelsC );
    FOR( jCh = 1; jCh < nChannelsL; jCh++ )
    {
@@ -981,8 +982,8 @@ static void biDiagonalReductionLeft_fx(
    Word16 L_temp_e;

    /* Setting values to 0 */
    ( *g ) = 0;
    ( *g_e ) = 0;
    *g = 0;
    *g_e = 0;
    move32();
    move16();

@@ -991,7 +992,9 @@ static void biDiagonalReductionLeft_fx(
        Word64 temp = 0;
        move64();
        norm_x = 0;
        move32();
        norm_x_e = 0;
        move16();
        Word16 max_e = MIN_16;
        move16();
        FOR( jCh = currChannel; jCh < nChannelsL; jCh++ ) /* nChannelsL */
@@ -1021,13 +1024,15 @@ static void biDiagonalReductionLeft_fx(
            if ( singularVectors[currChannel][currChannel] >= 0 )
            {
                L_temp = L_negate( L_temp );
                move32();
            }
            ( *g ) = L_temp;
            *g = L_temp;
            move32();
            *g_e = L_temp_e;
            r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][currChannel] ), singularVectors_e[currChannel][currChannel] + L_temp_e, -norm_x, norm_x_e, &r_e );                                             /* exp(r_e) */
            move16();

            r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][currChannel] ), singularVectors_e[currChannel][currChannel] + ( *g_e ), -norm_x, norm_x_e, &r_e );                                                 /* exp(r_e) */
            singularVectors[currChannel][currChannel] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][currChannel], singularVectors_e[currChannel][currChannel], -( *g ), *g_e, &singularVectors_e[currChannel][currChannel] ); /* sing_exp */
            move32();
            invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( r ), &invVal_e );

            FOR( iCh = currChannel + 1; iCh < nChannelsC; iCh++ ) /* nChannelsC */
@@ -1061,7 +1066,6 @@ static void biDiagonalReductionLeft_fx(
                FOR( jCh = currChannel; jCh < nChannelsL; jCh++ ) /* nChannelsL */
                {
                    singularVectors[jCh][iCh] = BASOP_Util_Add_Mant32Exp( singularVectors[jCh][iCh], singularVectors_e[jCh][iCh], Mpy_32_32( f, singularVectors[jCh][currChannel] ), add( f_e, singularVectors_e[jCh][currChannel] ), &singularVectors_e[jCh][iCh] );
                    move32();
                }
            }
        }
@@ -1085,8 +1089,8 @@ static void biDiagonalReductionRight_fx(
    Word16 L_temp_e;

    /* Setting values to 0 */
    ( *g ) = 0;
    ( *g_e ) = 0;
    *g = 0;
    *g_e = 0;
    move32();
    move16();
    IF( LT_16( currChannel, nChannelsL ) && NE_16( currChannel, sub( nChannelsC, 1 ) ) ) /* i <=m && i !=n */
@@ -1118,13 +1122,14 @@ static void biDiagonalReductionRight_fx(
            }
            ELSE
            {
                ( *g ) = L_negate( L_negate( L_temp ) ); /* exp(L_temp_e) */
                ( *g ) = L_temp; /* exp(L_temp_e) */
                move32();
            }
            *g_e = L_temp_e;
            move16();

            r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), singularVectors_e[currChannel][idx] + ( *g_e ), -norm_x, norm_x_e, &r_e );                             /* exp(r_e) */
            singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], singularVectors_e[currChannel][idx], -( *g ), *g_e, &singularVectors_e[currChannel][idx] ); /* exp(sing_exp) */
            move32();

            invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( r ), &invVal_e );

@@ -1145,7 +1150,6 @@ static void biDiagonalReductionRight_fx(
                FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /*  nChannelsC */
                {
                    singularVectors[iCh][jCh] = BASOP_Util_Add_Mant32Exp( singularVectors[iCh][jCh], singularVectors_e[iCh][jCh], Mpy_32_32( norm_x, singularVectors[currChannel][jCh] ), add( norm_x_e, singularVectors_e[currChannel][jCh] ), &singularVectors_e[iCh][jCh] ); /* exp(sing_exp2) */
                    move32();
                }
            }
        }