Commit 3b4a34fa authored by thomas dettbarn's avatar thomas dettbarn
Browse files

start over

parent c9958936
Loading
Loading
Loading
Loading
+3 −376
Original line number Diff line number Diff line
//#define	MYCHANGES
/******************************************************************************************************

   (C) 2022-2025 IVAS codec Public Collaboration with portions copyright Dolby International AB, Ericsson AB,
@@ -30,6 +29,7 @@
   the United Nations Convention on Contracts on the International Sales of Goods.

*******************************************************************************************************/

#include <stdint.h>
#include "options.h"
#include "prot_fx.h"
@@ -66,36 +66,6 @@ static void HouseholderReduction_fx(
    Word32 *eps_x_fx,        /* exp(eps_x_fx_e) */
    Word16 *eps_x_fx_e );

#ifdef	MYCHANGES

static void biDiagonalReductionLeft_fx(
    Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
    Word32 singularValues[MAX_OUTPUT_CHANNELS],    /* exp(singularValues_e) */
    Word32 secDiag[MAX_OUTPUT_CHANNELS],           /* exp(secDiag_e) */
    Word16 singularVectors2_e[][MAX_OUTPUT_CHANNELS],
    Word16 singularValues_e[MAX_OUTPUT_CHANNELS],
    Word16 *secDiag_e,
    const Word16 nChannelsL,  /* Q0 */
    const Word16 nChannelsC,  /* Q0 */
    const Word16 currChannel, /* Q0 */
    Word32 g, /* Q31 */
    Word16 g_e /* Q31 */
);

static void biDiagonalReductionRight_fx(
    Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
    Word32 secDiag[MAX_OUTPUT_CHANNELS],           /* exp(secDiag_e) */
    Word16 singularVectors2_e[][MAX_OUTPUT_CHANNELS],
    Word16 *secDiag_e,
    const Word16 nChannelsL,  /* Q0 */
    const Word16 nChannelsC,  /* Q0 */
    const Word16 currChannel, /* Q0 */
    Word32 *g, /* Q31 */
    Word16 *g_e /* Q31 */
);            // Q31

#else

static void biDiagonalReductionLeft_fx(
    Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
    Word32 singularValues[MAX_OUTPUT_CHANNELS],    /* exp(singularValues_e) */
@@ -123,7 +93,7 @@ static void biDiagonalReductionRight_fx(
    Word16 *sig_x_e,
    Word32 *g /* Q31 */
);            // Q31
#endif

static void singularVectorsAccumulationLeft_fx(
    Word32 singularVectors_Left[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) as Input, Q31 as output */
    Word32 singularValues[MAX_OUTPUT_CHANNELS],         /* exp(singularValues_e) */
@@ -852,18 +822,11 @@ static void HouseholderReduction_fx(
{
    Word16 nCh;
    // float g = 0.0f, sig_x = 0.0f;// to be removed
#ifdef	MYCHANGES
    Word32 g_fx = 0;
    move32();
    Word16 g_fx_e = 0;
    move16();
#else
    Word32 g_fx = 0, sig_x_fx = 0;
    move32();
    move32();
    Word16 sig_x_fx_e = 0;
    move16();
#endif

    Word16 iCh, jCh;
    Word16 singularVectors_Left_fx_e[MAX_OUTPUT_CHANNELS][MAX_OUTPUT_CHANNELS];
@@ -879,14 +842,8 @@ static void HouseholderReduction_fx(
    /* Bidiagonal Reduction for every channel */
    FOR( nCh = 0; nCh < nChannelsC; nCh++ ) /* nChannelsC */
    {
#ifdef	MYCHANGES
        biDiagonalReductionLeft_fx( singularVectors_Left_fx, singularValues_fx, secDiag_fx, singularVectors_Left_fx_e, singularValues_fx_e, secDiag_fx_e, nChannelsL, nChannelsC, nCh, g_fx, g_fx_e );
        biDiagonalReductionRight_fx( singularVectors_Left_fx, secDiag_fx, singularVectors_Left_fx_e, secDiag_fx_e, nChannelsL, nChannelsC, nCh, &g_fx, &g_fx_e );

#else
        biDiagonalReductionLeft_fx( singularVectors_Left_fx, singularValues_fx, secDiag_fx, singularVectors_Left_fx_e, singularValues_fx_e, secDiag_fx_e, nChannelsL, nChannelsC, nCh, &sig_x_fx, &sig_x_fx_e, &g_fx );
        biDiagonalReductionRight_fx( singularVectors_Left_fx, secDiag_fx, singularVectors_Left_fx_e, secDiag_fx_e, nChannelsL, nChannelsC, nCh, &sig_x_fx, &sig_x_fx_e, &g_fx );
#endif

        Word16 L_temp_e;
        Word32 L_temp = BASOP_Util_Add_Mant32Exp( L_abs( singularValues_fx[nCh] ), singularValues_fx_e[nCh], L_abs( secDiag_fx[nCh] ), secDiag_fx_e[nCh], &L_temp_e ); /* exp(L_temp_e) */
@@ -913,170 +870,7 @@ static void HouseholderReduction_fx(
 *
 *
 *-------------------------------------------------------------------------*/
#ifdef	MYCHANGES
static void biDiagonalReductionLeft_fx(
    Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
    Word32 singularValues[MAX_OUTPUT_CHANNELS],    /* exp(singularValues_e) */
    Word32 secDiag[MAX_OUTPUT_CHANNELS],           /* exp(secDiag_e) */
    Word16 singularVectors2_e[][MAX_OUTPUT_CHANNELS],
    Word16 singularValues_e[MAX_OUTPUT_CHANNELS],
    Word16 *secDiag_e,
    const Word16 nChannelsL,  /* Q0 */
    const Word16 nChannelsC,  /* Q0 */
    const Word16 currChannel, /* Q0 */
    Word32 g, /* Q31 */
    Word16 g_e
)
{
    Word16 iCh, jCh, idx;
    Word32 norm_x, f, r;
    Word16 norm_x_e, f_e, r_e;
    Word32 L_temp;
    Word16 L_temp_e;
    Word32 sig_x;
    Word16 sig_x_e;

    secDiag[currChannel] = g; /* exp(sig_x_e) */
    move32();
    secDiag_e[currChannel] = g_e;
    move16();

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

    IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */
    {
        idx = currChannel;
        move16();

        FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
        {
             sig_x= BASOP_Util_Add_Mant32Exp( sig_x, sig_x_e, L_abs( singularVectors[jCh][currChannel] ), singularVectors2_e[jCh][currChannel], &sig_x_e ); /* exp(sig_x_e) */
        }
	sig_x = MAXVAL_WORD32;
	sig_x_e = 31;
	printf("sig_x:%08X < %2x\n",sig_x,sig_x_e);
        IF( ( sig_x ) ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
        {
            Word16 invVal_e;
            Word32 invVal;
            invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( sig_x ), &invVal_e );
            norm_x = 0;
            move32();
            norm_x_e = 0;
            move16();
            FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
            {
                Word16 temp_e = norm_l( singularVectors[jCh][currChannel] );
                singularVectors[jCh][currChannel] = Mpy_32_32( L_shl( singularVectors[jCh][currChannel], temp_e ), invVal ); /* exp(sing_exp + (singularVectors_e - sig_x_e) */
                move32();
                singularVectors2_e[jCh][currChannel] = sub( add( invVal_e, sub( singularVectors2_e[jCh][currChannel], sig_x_e ) ), temp_e );
                move16();
                norm_x = BASOP_Util_Add_Mant32Exp( norm_x, norm_x_e, Mpy_32_32( singularVectors[jCh][currChannel], singularVectors[jCh][currChannel] ), shl( singularVectors2_e[jCh][currChannel], 1 ), &norm_x_e ); /* exp(norm_x_e) */
            }
            IF( GT_16( norm_x_e, 0 ) )
            {
                norm_x = MAX_32;
                move32();
                norm_x_e = 0;
                move16();
            }
            L_temp_e = norm_x_e;
            move16();
            L_temp = Sqrt32( norm_x, &L_temp_e );
			printf("norm_x_e:%d g_e:%d   %08X %016llX\n",norm_x_e,L_temp_e,L_temp,(signed long long)L_temp*(signed long long)(sig_x));
            L_temp = L_shl_r( L_temp, L_temp_e ); // Q31
                                                  //( *g ) = L_negate( GE_32( singularVectors[currChannel][idx], 0 ) ? L_temp : L_negate( L_temp ) );
            if ( singularVectors[currChannel][idx] >= 0 )
            {
                L_temp = L_negate( L_temp );
            }
            ( g ) = L_temp;
            move32();

			printf("singularVectors2_e[currChannel][currChannel]:%3d --> ",singularVectors2_e[currChannel][currChannel]);
		{
			Word32 tmp;
			tmp=Mpy_32_32( ( g ), singularVectors[currChannel][idx] );
			printf("tmp%08X %016llX %016llX    ",tmp,(signed long long)tmp*(signed long long)(sig_x),(signed long long)tmp*(signed long long)(sig_x)*(signed long long)(sig_x));
		}
            r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( g ), singularVectors[currChannel][idx] ), singularVectors2_e[currChannel][idx], -norm_x, norm_x_e, &r_e );                                      /* exp(r_e) */
            singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], singularVectors2_e[currChannel][idx], -( g ), 0, &singularVectors2_e[currChannel][idx] ); /* sing_exp */
			printf("r:%08X < %2x %016llx\n",r,r_e,(signed long long)r*(signed long long)(sig_x)*(signed long long)(sig_x));
			printf("singularVectors2_e[currChannel][currChannel]:%3d\n",singularVectors2_e[currChannel][currChannel]);
            move32();

            invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( r ), &invVal_e );
		printf("invVal:%08X invVal_e:%d\n",invVal,invVal_e);

            FOR( iCh = currChannel + 1; iCh < nChannelsC; iCh++ ) /* nChannelsC */
            {
                norm_x = 0;
                move32();
                norm_x_e = 0;
                move16();
                FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
                {
                    norm_x = BASOP_Util_Add_Mant32Exp( norm_x, norm_x_e, Mpy_32_32( singularVectors[jCh][currChannel], singularVectors[jCh][iCh] ), add( singularVectors2_e[jCh][currChannel], singularVectors2_e[jCh][iCh] ), &norm_x_e ); /* exp(norm_x_e) */
                }

                f = Mpy_32_32( norm_x, invVal ); /* invVal_e + (norm_x_e - r_e) */
                f_e = add( invVal_e, sub( norm_x_e, r_e ) );
		printf("f:%08X f_e:%d  %016llx %016llx %016llx %016llx   ",f,f_e, ((signed long long)f*(signed long long)sig_x), ((signed long long)f*(signed long long)sig_x)>>1,((signed long long)f*(signed long long)sig_x)>>2,((signed long long)f*(signed long long)sig_x)>>3);

                FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
                {
			Word32 tmp;
			tmp=Mpy_32_32( f, singularVectors[jCh][currChannel] );
			printf("*%08X* ",tmp);
                    singularVectors[jCh][iCh] = BASOP_Util_Add_Mant32Exp( singularVectors[jCh][iCh], singularVectors2_e[jCh][iCh], Mpy_32_32( f, singularVectors[jCh][currChannel] ), add( f_e, singularVectors2_e[jCh][currChannel] ), &singularVectors2_e[jCh][iCh] );
		printf("%08X<%2x...",singularVectors[jCh][iCh],singularVectors2_e[jCh][iCh]);
                    move32();
                }
		printf("---\n");
            }


            FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
            {
                singularVectors[jCh][currChannel] = Mpy_32_32( singularVectors[jCh][currChannel], ( sig_x ) ); /* sing_exp + sig_x_e */
                move32();
                singularVectors2_e[jCh][currChannel] = add( singularVectors2_e[jCh][currChannel], sig_x_e );
                move16();
            }
        }

        // rescaling block
        singularValues[currChannel] = Mpy_32_32( ( sig_x ), ( g ) ); /* sig_x_e */
        move32();
        singularValues_e[currChannel] = sig_x_e;
        move16();
    }
	{
		int i;
		int j;

		printf("currChannel:%d   ",currChannel);
		for (i=currChannel;i<nChannelsL;i++)
		{
			printf("%08X<%3x  ",singularVectors[i][currChannel],singularVectors2_e[i][currChannel]);
		}
		printf("\n");
		for (i=0;i<MAX_OUTPUT_CHANNELS;i++)
		{
			printf("%2d>  ",i);
			for (j=0;j<MAX_OUTPUT_CHANNELS;j++)
			{
				printf("%2d ",singularVectors2_e[i][j]);
			}
			printf("\n");
		}
	}

    return;
}
#else
static void biDiagonalReductionLeft_fx(
    Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
    Word32 singularValues[MAX_OUTPUT_CHANNELS],    /* exp(singularValues_e) */
@@ -1118,7 +912,7 @@ static void biDiagonalReductionLeft_fx(
        {
            ( *sig_x ) = BASOP_Util_Add_Mant32Exp( *sig_x, *sig_x_e, L_abs( singularVectors[jCh][currChannel] ), singularVectors2_e[jCh][currChannel], sig_x_e ); /* exp(sig_x_e) */
        }
	printf("sig_x:%08X < %2x\n",*sig_x,*sig_x_e);

        IF( ( *sig_x ) ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
        {
            Word16 invVal_e;
@@ -1147,7 +941,6 @@ static void biDiagonalReductionLeft_fx(
            L_temp_e = norm_x_e;
            move16();
            L_temp = Sqrt32( norm_x, &L_temp_e );
			printf("norm_x_e:%d g_e:%d   %08X %016llX\n",norm_x_e,L_temp_e,L_temp,(signed long long)L_temp*(signed long long)(*sig_x));
            L_temp = L_shl_r( L_temp, L_temp_e ); // Q31
                                                  //( *g ) = L_negate( GE_32( singularVectors[currChannel][idx], 0 ) ? L_temp : L_negate( L_temp ) );
            if ( singularVectors[currChannel][idx] >= 0 )
@@ -1157,20 +950,11 @@ static void biDiagonalReductionLeft_fx(
            ( *g ) = L_temp;
            move32();

			printf("singularVectors2_e[currChannel][currChannel]:%3d --> ",singularVectors2_e[currChannel][currChannel]);
		{
			Word32 tmp;
			tmp=Mpy_32_32( ( *g ), singularVectors[currChannel][idx] );
			printf("tmp%08X %016llX %016llX    ",tmp,(signed long long)tmp*(signed long long)(*sig_x),(signed long long)tmp*(signed long long)(*sig_x)*(signed long long)(*sig_x));
		}
            r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), singularVectors2_e[currChannel][idx], -norm_x, norm_x_e, &r_e );                                      /* exp(r_e) */
            singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], singularVectors2_e[currChannel][idx], -( *g ), 0, &singularVectors2_e[currChannel][idx] ); /* sing_exp */
			printf("r:%08X < %2x %016llx\n",r,r_e,(signed long long)r*(signed long long)(*sig_x)*(signed long long)(*sig_x));
			printf("singularVectors2_e[currChannel][currChannel]:%3d\n",singularVectors2_e[currChannel][currChannel]);
            move32();

            invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( r ), &invVal_e );
		printf("invVal:%08X invVal_e:%d\n",invVal,invVal_e);

            FOR( iCh = currChannel + 1; iCh < nChannelsC; iCh++ ) /* nChannelsC */
            {
@@ -1185,18 +969,12 @@ static void biDiagonalReductionLeft_fx(

                f = Mpy_32_32( norm_x, invVal ); /* invVal_e + (norm_x_e - r_e) */
                f_e = add( invVal_e, sub( norm_x_e, r_e ) );
		printf("f:%08X f_e:%d  %016llx %016llx %016llx %016llx   ",f,f_e, ((signed long long)f*(signed long long)*sig_x), ((signed long long)f*(signed long long)*sig_x)>>1,((signed long long)f*(signed long long)*sig_x)>>2,((signed long long)f*(signed long long)*sig_x)>>3);

                FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
                {
			Word32 tmp;
			tmp=Mpy_32_32( f, singularVectors[jCh][currChannel] );
			printf("*%08X* ",tmp);
                    singularVectors[jCh][iCh] = BASOP_Util_Add_Mant32Exp( singularVectors[jCh][iCh], singularVectors2_e[jCh][iCh], Mpy_32_32( f, singularVectors[jCh][currChannel] ), add( f_e, singularVectors2_e[jCh][currChannel] ), &singularVectors2_e[jCh][iCh] );
		printf("%08X<%2x...",singularVectors[jCh][iCh],singularVectors2_e[jCh][iCh]);
                    move32();
                }
		printf("---\n");
            }


@@ -1215,148 +993,16 @@ static void biDiagonalReductionLeft_fx(
        singularValues_e[currChannel] = *sig_x_e;
        move16();
    }
	{
		int i;
		int j;

		printf("currChannel:%d   ",currChannel);
		for (i=currChannel;i<nChannelsL;i++)
		{
			printf("%08X<%3x  ",singularVectors[i][currChannel],singularVectors2_e[i][currChannel]);
		}
		printf("\n");
		for (i=0;i<MAX_OUTPUT_CHANNELS;i++)
		{
			printf("%2d>  ",i);
			for (j=0;j<MAX_OUTPUT_CHANNELS;j++)
			{
				printf("%2d ",singularVectors2_e[i][j]);
			}
			printf("\n");
		}
	}

    return;
}
#endif

/*-------------------------------------------------------------------------
 * biDiagonalReductionRight()
 *
 *
 *-------------------------------------------------------------------------*/
#ifdef	MYCHANGES
static void biDiagonalReductionRight_fx(
		Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
		Word32 secDiag[MAX_OUTPUT_CHANNELS],           /* exp(secDiag_exp[]) */
		Word16 singularVectors2_e[][MAX_OUTPUT_CHANNELS],
		Word16 *secDiag_exp,
		const Word16 nChannelsL,  /* Q0 */
		const Word16 nChannelsC,  /* Q0 */
		const Word16 currChannel, /* Q0 */
		Word32 *g, /* Q31 */
		Word16 *g_e /* Q31 */
		)
{
	Word16 iCh, jCh, idx;
	Word32 norm_x, r;
	Word16 norm_x_e, r_e;
	Word32 L_temp;
	Word16 L_temp_e;

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

	IF( LT_16( currChannel, nChannelsL ) && NE_16( currChannel, sub( nChannelsC, 1 ) ) ) /* i <=m && i !=n */
	{
		idx = add( currChannel, 1 ); /* Q0 */
		norm_x = 0;
		move32();
		norm_x_e = 0;
		move16();
		FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /*nChannelsC */
		{
			printf("%08X<%2x||| ",singularVectors[currChannel][jCh],singularVectors2_e[currChannel][jCh]);
			norm_x = BASOP_Util_Add_Mant32Exp( norm_x, norm_x_e, Mpy_32_32( singularVectors[currChannel][jCh], singularVectors[currChannel][jCh] ), shl( singularVectors2_e[currChannel][jCh], 1 ), &norm_x_e ); /* exp(norm_x_e) */
		}
		printf("\n");
		IF( ( norm_x ) ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
		{
			Word16 invVal_e, temp_e;
			Word32 invVal;
			L_temp_e = norm_x_e;
			move16();
			L_temp = Sqrt32( norm_x, &L_temp_e );
			*g_e = L_temp_e;
			//	L_temp = L_shl_r( L_temp, L_temp_e ); // Q31
			IF( singularVectors[currChannel][idx] >= 0 )
			{
				( *g ) = L_negate( L_temp ); /* exp(L_temp_e) */
				move32();
			}
			ELSE
			{
				( *g ) = L_negate( L_negate( L_temp ) ); /* exp(L_temp_e) */
				move32();
			}
			r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), singularVectors2_e[currChannel][idx], -norm_x, norm_x_e, &r_e );                                      /* exp(r_e) */
			singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], singularVectors2_e[currChannel][idx], -( *g ), 0, &singularVectors2_e[currChannel][idx] ); /* exp(sing_exp) */
			move32();
			printf("RIGHT ");
			printf("g:%08X<%2x  ",*g,L_temp_e);
			printf("r:%08X<%2x  ",r,r_e);
			printf("\n");

			invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( r ), &invVal_e );
			FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /* nChannelsC */
			{
				temp_e = norm_l( singularVectors[currChannel][jCh] );
				secDiag[jCh] = Mpy_32_32( L_shl( singularVectors[currChannel][jCh], temp_e ), invVal ); /* exp(sing_exp + (singularVectors_e - sig_x_e) */
				move32();
				secDiag_exp[jCh] = add( sub( invVal_e, temp_e ), sub( singularVectors2_e[currChannel][jCh], r_e ) );
				move16();
			}
			FOR( iCh = currChannel + 1; iCh < nChannelsL; iCh++ ) /*  nChannelsL */
			{
				norm_x = 0;
				move32();
				norm_x_e = 0;
				move16();
				FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /* nChannelsC */
				{
					norm_x = BASOP_Util_Add_Mant32Exp( norm_x, norm_x_e, Mpy_32_32( singularVectors[iCh][jCh], singularVectors[currChannel][jCh] ), add( singularVectors2_e[iCh][jCh], singularVectors2_e[currChannel][jCh] ), &norm_x_e ); /* exp(norm_x_e) */
				}

				FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /*  nChannelsC */
				{
					singularVectors[iCh][jCh] = BASOP_Util_Add_Mant32Exp( singularVectors[iCh][jCh], singularVectors2_e[iCh][jCh], Mpy_32_32( norm_x, secDiag[jCh] ), add( norm_x_e, secDiag_exp[jCh] ), &singularVectors2_e[iCh][jCh] ); /* exp(sing_exp2) */
					move32();
				}
			}



		}

	}
	{
		int i;
		printf("RIGHT currChannel:%d ",currChannel);
		for (i=0;i<nChannelsC;i++)
		{
			printf("%08X<%2x   ",singularVectors[currChannel][i],singularVectors2_e[currChannel][i]);
		}
		printf("\n");
		exit(0);
	}

	return;
}



#else
static void biDiagonalReductionRight_fx(
    Word32 singularVectors[][MAX_OUTPUT_CHANNELS], /* exp(singularVectors_e) */
    Word32 secDiag[MAX_OUTPUT_CHANNELS],           /* exp(secDiag_exp[]) */
@@ -1388,10 +1034,8 @@ static void biDiagonalReductionRight_fx(

        FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /* nChannelsC */
        {
	printf("%08X<%2x||| ",singularVectors[currChannel][jCh],singularVectors2_e[currChannel][jCh]);
            ( *sig_x ) = BASOP_Util_Add_Mant32Exp( *sig_x, *sig_x_e, L_abs( singularVectors[currChannel][jCh] ), singularVectors2_e[currChannel][jCh], sig_x_e ); /* exp(sig_x_e) */
        }
	printf("\n");

        IF( ( *sig_x ) ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
        {
@@ -1437,11 +1081,6 @@ static void biDiagonalReductionRight_fx(
            r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), singularVectors2_e[currChannel][idx], -norm_x, norm_x_e, &r_e );                                      /* exp(r_e) */
            singularVectors[currChannel][idx] = BASOP_Util_Add_Mant32Exp( singularVectors[currChannel][idx], singularVectors2_e[currChannel][idx], -( *g ), 0, &singularVectors2_e[currChannel][idx] ); /* exp(sing_exp) */
            move32();
		printf("RIGHT ");
		printf("sig_x:%08X<%2x  ",*sig_x,*sig_x_e);
		printf("g:%08X<%2x  ",*g,L_temp_e);
		printf("r:%08X<%2x  ",r,r_e);
		printf("\n");

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

@@ -1481,21 +1120,9 @@ static void biDiagonalReductionRight_fx(
            }
        }
    }
	{
		int i;
		printf("RIGHT currChannel:%d ",currChannel);
		for (i=0;i<nChannelsC;i++)
		{
			printf("%08X<%2x   ",singularVectors[currChannel][i],singularVectors2_e[currChannel][i]);
		}
		printf("\n");
		exit(0);
	}

    return;
}
#endif


/*-------------------------------------------------------------------------
 * singularVectorsAccumulationLeft()