Loading lib_dec/ivas_svd_dec_fx.c +5 −36 Original line number Diff line number Diff line Loading @@ -1082,7 +1082,6 @@ static void biDiagonalReductionLeft_64( ) { static FILE *f_debug=NULL; Word16 iCh, jCh; Loading @@ -1091,34 +1090,20 @@ static void biDiagonalReductionLeft_64( Word64 norm_64; norm_x=0; move32(); if (f_debug==NULL) f_debug=fopen("left64.bin","wb"); { unsigned int magic; magic=0xd00faffe; fwrite(&magic,sizeof(int),1,f_debug); } fwrite(&nChannelsL,sizeof(short),1,f_debug); fwrite(&nChannelsC,sizeof(short),1,f_debug); fwrite(&currChannel,sizeof(short),1,f_debug); IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ { Word32 tmp; norm_64=0; move64(); printf("\nNORM%02d: \x1b[1;34m",currChannel); FOR( jCh = currChannel; jCh < nChannelsL; jCh++ ) /* nChannelsL */ { tmp=W_extract_l(W_shr(singularVectors_Left_64[jCh][currChannel],bitwindow)); fwrite(&tmp,sizeof(int),1,f_debug); norm_64=W_add(norm_64,W_mult0_32_32(tmp,tmp)); fwrite(&norm_64,sizeof(long long),1,f_debug); printf("%016llX ",norm_64); } norm_x_e=W_norm(norm_64); norm_x=W_extract_h(W_shl(norm_64, norm_x_e )); norm_x_e = add(sub(shl(bitwindow, 1), norm_x_e), 1 ); printf(" --> %08X<%2d\x1b[0m\n",norm_x,norm_x_e); } IF ( norm_x ) { Loading Loading @@ -1352,7 +1337,6 @@ static void biDiagonalReductionLeft_fx( Word16 norm_x_e, f_e, r_e; Word32 L_temp; Word16 L_temp_e; static FILE *f_debug2=NULL; secDiag[currChannel] = Mpy_32_32( *sig_x, *g ); /* exp(sig_x_e) */ move32(); Loading @@ -1365,15 +1349,6 @@ static void biDiagonalReductionLeft_fx( ( *g ) = 0; move32(); if(f_debug2==NULL) f_debug2=fopen("leftfx.bin","wb"); { unsigned int magic; magic=0xd00faffe; fwrite(&magic,sizeof(int),1,f_debug2); } fwrite(&nChannelsL,sizeof(short),1,f_debug2); fwrite(&nChannelsC,sizeof(short),1,f_debug2); fwrite(&currChannel,sizeof(short),1,f_debug2); IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ { Loading @@ -1384,37 +1359,31 @@ 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) */ } fwrite(sig_x,sizeof(int),1,f_debug2); fwrite(sig_x_e,sizeof(short),1,f_debug2); 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 ); fwrite(&invVal,sizeof(int),1,f_debug2); fwrite(&invVal_e,sizeof(short),1,f_debug2); norm_x = 0; move32(); norm_x_e = 0; move16(); printf("\nNORM%02d: ",currChannel, norm_x,norm_x_e,(signed long long)norm_x*((signed long long)(*sig_x)*(signed long long)(*sig_x)),(*sig_x_e)); FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */ { Word16 temp_e = norm_l( singularVectors[jCh][currChannel] ); Word32 tmp; // tmp=L_shl( singularVectors[jCh][currChannel],temp_e); tmp=singularVectors[jCh][currChannel]; tmp=L_shl( singularVectors[jCh][currChannel],temp_e); fwrite(&tmp,sizeof(int),1,f_debug2); singularVectors[jCh][currChannel] = Mpy_32_32( L_shl( singularVectors[jCh][currChannel], temp_e ), invVal ); /* exp(sing_exp + (singularVectors_e - sig_x_e) */ fwrite(&singularVectors[jCh][currChannel],sizeof(int),1,f_debug2); 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) */ printf("%08X<%2d ",norm_x,norm_x_e); fwrite(&norm_x,sizeof(int),1,f_debug2); fwrite(&norm_x_e,sizeof(short),1,f_debug2); } printf("--> %08X<%2d %016llX<%2d\n", norm_x,norm_x_e,(signed long long)norm_x*((signed long long)(*sig_x)*(signed long long)(*sig_x)),(*sig_x_e)); IF( GT_16( norm_x_e, 0 ) ) { norm_x = MAX_32; Loading Loading
lib_dec/ivas_svd_dec_fx.c +5 −36 Original line number Diff line number Diff line Loading @@ -1082,7 +1082,6 @@ static void biDiagonalReductionLeft_64( ) { static FILE *f_debug=NULL; Word16 iCh, jCh; Loading @@ -1091,34 +1090,20 @@ static void biDiagonalReductionLeft_64( Word64 norm_64; norm_x=0; move32(); if (f_debug==NULL) f_debug=fopen("left64.bin","wb"); { unsigned int magic; magic=0xd00faffe; fwrite(&magic,sizeof(int),1,f_debug); } fwrite(&nChannelsL,sizeof(short),1,f_debug); fwrite(&nChannelsC,sizeof(short),1,f_debug); fwrite(&currChannel,sizeof(short),1,f_debug); IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ { Word32 tmp; norm_64=0; move64(); printf("\nNORM%02d: \x1b[1;34m",currChannel); FOR( jCh = currChannel; jCh < nChannelsL; jCh++ ) /* nChannelsL */ { tmp=W_extract_l(W_shr(singularVectors_Left_64[jCh][currChannel],bitwindow)); fwrite(&tmp,sizeof(int),1,f_debug); norm_64=W_add(norm_64,W_mult0_32_32(tmp,tmp)); fwrite(&norm_64,sizeof(long long),1,f_debug); printf("%016llX ",norm_64); } norm_x_e=W_norm(norm_64); norm_x=W_extract_h(W_shl(norm_64, norm_x_e )); norm_x_e = add(sub(shl(bitwindow, 1), norm_x_e), 1 ); printf(" --> %08X<%2d\x1b[0m\n",norm_x,norm_x_e); } IF ( norm_x ) { Loading Loading @@ -1352,7 +1337,6 @@ static void biDiagonalReductionLeft_fx( Word16 norm_x_e, f_e, r_e; Word32 L_temp; Word16 L_temp_e; static FILE *f_debug2=NULL; secDiag[currChannel] = Mpy_32_32( *sig_x, *g ); /* exp(sig_x_e) */ move32(); Loading @@ -1365,15 +1349,6 @@ static void biDiagonalReductionLeft_fx( ( *g ) = 0; move32(); if(f_debug2==NULL) f_debug2=fopen("leftfx.bin","wb"); { unsigned int magic; magic=0xd00faffe; fwrite(&magic,sizeof(int),1,f_debug2); } fwrite(&nChannelsL,sizeof(short),1,f_debug2); fwrite(&nChannelsC,sizeof(short),1,f_debug2); fwrite(&currChannel,sizeof(short),1,f_debug2); IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ { Loading @@ -1384,37 +1359,31 @@ 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) */ } fwrite(sig_x,sizeof(int),1,f_debug2); fwrite(sig_x_e,sizeof(short),1,f_debug2); 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 ); fwrite(&invVal,sizeof(int),1,f_debug2); fwrite(&invVal_e,sizeof(short),1,f_debug2); norm_x = 0; move32(); norm_x_e = 0; move16(); printf("\nNORM%02d: ",currChannel, norm_x,norm_x_e,(signed long long)norm_x*((signed long long)(*sig_x)*(signed long long)(*sig_x)),(*sig_x_e)); FOR( jCh = idx; jCh < nChannelsL; jCh++ ) /* nChannelsL */ { Word16 temp_e = norm_l( singularVectors[jCh][currChannel] ); Word32 tmp; // tmp=L_shl( singularVectors[jCh][currChannel],temp_e); tmp=singularVectors[jCh][currChannel]; tmp=L_shl( singularVectors[jCh][currChannel],temp_e); fwrite(&tmp,sizeof(int),1,f_debug2); singularVectors[jCh][currChannel] = Mpy_32_32( L_shl( singularVectors[jCh][currChannel], temp_e ), invVal ); /* exp(sing_exp + (singularVectors_e - sig_x_e) */ fwrite(&singularVectors[jCh][currChannel],sizeof(int),1,f_debug2); 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) */ printf("%08X<%2d ",norm_x,norm_x_e); fwrite(&norm_x,sizeof(int),1,f_debug2); fwrite(&norm_x_e,sizeof(short),1,f_debug2); } printf("--> %08X<%2d %016llX<%2d\n", norm_x,norm_x_e,(signed long long)norm_x*((signed long long)(*sig_x)*(signed long long)(*sig_x)),(*sig_x_e)); IF( GT_16( norm_x_e, 0 ) ) { norm_x = MAX_32; Loading