Commit acd84eb2 authored by thomas dettbarn's avatar thomas dettbarn
Browse files

start over

parent 055407fd
Loading
Loading
Loading
Loading
+273 −131
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,
@@ -29,7 +30,6 @@
   the United Nations Convention on Contracts on the International Sales of Goods.

*******************************************************************************************************/
#define	MYCHANGES
#include <stdint.h>
#include "options.h"
#include "prot_fx.h"
@@ -925,79 +925,157 @@ static void biDiagonalReductionLeft_fx(
    const Word16 nChannelsC,  /* Q0 */
    const Word16 currChannel, /* Q0 */
    Word32 g, /* Q31 */
		Word16 g_e /* Q31 */
    Word16 g_e
)
{
	Word16 iCh, jCh;
    Word16 iCh, jCh, idx;
    Word32 norm_x, f, r;
    Word16 norm_x_e, f_e, r_e;
	Word32 invR;
	Word16 invR_e;
    Word32 L_temp;
    Word16 L_temp_e;
    Word32 sig_x;
    Word16 sig_x_e;

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

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

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

	if (currChannel < nChannelsL )
        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 = currChannel; jCh < nChannelsL; jCh++)
            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 (norm_x)
            IF( GT_16( norm_x_e, 0 ) )
            {
			printf("norm: %08X  < %2d  ",norm_x,norm_x_e );
			g_e = norm_x_e;
                norm_x = MAX_32;
                move32();
			g = Sqrt32(norm_x,&g_e);
			printf("sqrt: %08X < %2d\n",g,g_e);
//			g= L_shl_r(g, g_e);
			if ( singularVectors[currChannel][currChannel] >= 0)
                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 )
            {
				g = L_negate(g);
                L_temp = L_negate( L_temp );
            }
            ( g ) = L_temp;
            move32();
			r=BASOP_Util_Add_Mant32Exp( Mpy_32_32( g, singularVectors[currChannel][currChannel] ), singularVectors2_e[currChannel][currChannel], -norm_x, norm_x_e, &r_e);
			singularVectors[currChannel][currChannel] = BASOP_Util_Add_Mant32Exp(singularVectors[currChannel][currChannel], singularVectors2_e[currChannel][currChannel], -g, 0, &singularVectors2_e[currChannel][currChannel]);

			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();

			invR= BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx(r), &invR_e);
            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 = currChannel; jCh< nChannelsL; jCh++)
                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, invR );
				f_e = add(invR_e, norm_x);

				FOR( jCh = currChannel; jCh < nChannelsL; jCh++ ) /* nChannelsL */
                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();
            }
        }
		singularValues[currChannel] = g;

        // rescaling block
        singularValues[currChannel] = Mpy_32_32( ( sig_x ), ( g ) ); /* sig_x_e */
        move32();
		singularValues_e[currChannel] = g_e;
        singularValues_e[currChannel] = sig_x_e;
        move16();
    }
	return;
	{
		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) */
@@ -1038,11 +1116,9 @@ static void biDiagonalReductionLeft_fx(

        FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */
        {
		printf("1> singularVectors2_e[currChannel][jCh]:%d\n",singularVectors2_e[currChannel][jCh]);
		fflush(stdout);
            ( *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;
@@ -1071,6 +1147,7 @@ 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 )
@@ -1080,13 +1157,20 @@ 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();
		printf("2> singularVectors2_e[currChannel][jCh]:%d\n",singularVectors2_e[currChannel][idx]);
		fflush(stdout);

            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 */
            {
@@ -1101,14 +1185,18 @@ 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("3> singularVectors2_e[currChannel][jCh]:%d\n",singularVectors2_e[jCh][idx]);
		fflush(stdout);
                }
		printf("---\n");
            }


@@ -1127,7 +1215,26 @@ static void biDiagonalReductionLeft_fx(
        singularValues_e[currChannel] = *sig_x_e;
        move16();
    }
	printf("-----------------\n");
	{
		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;
}
@@ -1152,79 +1259,98 @@ static void biDiagonalReductionRight_fx(
		)
{
	Word16 iCh, jCh, idx;
	Word32 norm_x;
	Word16 norm_x_e;
	Word32 r;
	Word16 r_e;
	Word32 invR;
	Word16 invR_e;
	Word32 norm_x, r;
	Word16 norm_x_e, r_e;
	Word32 L_temp;
	Word16 L_temp_e;

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

	IF( LT_16( currChannel, nChannelsL ) && NE_16( currChannel, sub( nChannelsC, 1 ) ) ) /* i <=m && i !=n */
	{
		idx = add(currChannel, 1);
		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) */
		}
		if ( norm_x)
		printf("\n");
		IF( ( norm_x ) ) /*(fabsf(*sig_x) > EPSILON * fabsf(*sig_x)) { */
		{
			IF( GT_16( norm_x_e, 0 ) )
			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 )
			{
				norm_x = MAX_32;
				( *g ) = L_negate( L_temp ); /* exp(L_temp_e) */
				move32();
				norm_x_e = 0;
				move16();
			}
			*g_e = norm_x_e;
			move32();
			*g = Sqrt32(norm_x,g_e);
			*g= L_shl_r((*g), *g_e);
			if ( singularVectors[currChannel][currChannel] >= 0)
			ELSE
			{
				*g = L_negate(*g);
			}
				( *g ) = L_negate( L_negate( L_temp ) ); /* exp(L_temp_e) */
				move32();
			r=BASOP_Util_Add_Mant32Exp( Mpy_32_32( *g, singularVectors[currChannel][currChannel] ), singularVectors2_e[currChannel][currChannel], -norm_x, norm_x_e, &r_e);
			singularVectors[currChannel][currChannel] = BASOP_Util_Add_Mant32Exp(singularVectors[currChannel][currChannel], singularVectors2_e[currChannel][currChannel], -( *g ), 0, &singularVectors2_e[currChannel][currChannel]);
			}
			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");

			invR= BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx(r), &invR_e);
			FOR (jCh = idx; jCh < nChannelsC; jCh++)
			invVal = BASOP_Util_Divide3232_Scale_newton( MAXVAL_WORD32, maxWithSign_fx( r ), &invVal_e );
			FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /* nChannelsC */
			{
				Word16 temp_e;
				temp_e = norm_l( singularVectors[currChannel][jCh] );
				secDiag[jCh]=Mpy_32_32( L_shl(singularVectors[currChannel][jCh], temp_e), invR);
				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(invR_e, temp_e), sub(singularVectors2_e[currChannel][jCh], r_e ) );
				secDiag_exp[jCh] = add( sub( invVal_e, temp_e ), sub( singularVectors2_e[currChannel][jCh], r_e ) );
				move16();
			}
			FOR (iCh = currChannel + 1; iCh < nChannelsL; iCh++ )
			FOR( iCh = currChannel + 1; iCh < nChannelsL; iCh++ ) /*  nChannelsL */
			{
				norm_x = 0;
				move32();
				norm_x_e = 0;
				move16();
				FOR ( jCh = idx; jCh < nChannelsC ; jCh++ )
				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 );	
					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++ )

				FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /*  nChannelsC */
				{
					printf("normx:%d secdiag:%d\n", norm_x_e, secDiag_exp[jCh]);
					fflush(stdout);
					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;
}

@@ -1262,8 +1388,10 @@ 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)) { */
        {
@@ -1278,7 +1406,6 @@ static void biDiagonalReductionRight_fx(
            FOR( jCh = idx; jCh < nChannelsC; jCh++ ) /*nChannelsC */
            {
                temp_e = norm_l( singularVectors[currChannel][jCh] );
		printf("singularVectors2_e[currChannel][jCh]:%d\n",singularVectors2_e[currChannel][jCh]);
                singularVectors[currChannel][jCh] = Mpy_32_32( L_shl( singularVectors[currChannel][jCh], temp_e ), invVal ); /* exp(sing_exp + (singularVectors_e - sig_x_e) */
                move32();
                singularVectors2_e[currChannel][jCh] = add( sub( invVal_e, temp_e ), sub( singularVectors2_e[currChannel][jCh], *sig_x_e ) );
@@ -1310,6 +1437,11 @@ 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 );

@@ -1349,6 +1481,16 @@ 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;
}