Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -150,3 +150,5 @@ #define FIX_ISSUE_1237 /* VA: replacement of Copy_Scale_sig_16_32_DEPREC() that are doing 16 bits left shift by Copy_Scale_sig_16_32_no_sat() */ #define FIX_ISSUE_1237_KEEP_EVS_BE /* VA: Fix to keep EVS bitexactness to 26.444 */ #endif #define FIX_MINOR_SVD_WMOPS_MR1010X /* FhG: Minor WMOPS tuning, bit-exact to previous version, saves about 8.2 WMOPS for MR1010 */ lib_dec/ivas_svd_dec.c +41 −0 Original line number Diff line number Diff line Loading @@ -919,6 +919,7 @@ static void ApplyRotation_fx( *g = BASOP_Util_Add_Mant32Exp( Mpy_32_32( c, x12 ), add( c_e, x12_e ), Mpy_32_32( L_negate( s ), x11 ), add( s_e, x11_e ), g_e ); /* exp(g_e) */ move32(); #ifndef FIX_MINOR_SVD_WMOPS_MR1010X FOR( ch = 0; ch < nChannels; ch++ ) { x11 = singularVector[ch][currentIndex2]; Loading @@ -934,6 +935,24 @@ static void ApplyRotation_fx( singularVector[ch][currentIndex1] = L_shl_sat( singularVector[ch][currentIndex1], temp_exp ); /* exp(temp_exp) */ move32(); } #else Word32 s_neg = L_negate(s); Word32 temp; FOR( ch = 0; ch < nChannels; ch++ ) { x11 = singularVector[ch][currentIndex2]; move32(); x12 = singularVector[ch][currentIndex1]; move32(); temp = BASOP_Util_Add_Mant32Exp( Mpy_32_32( c, x11 ), c_e, Mpy_32_32( s, x12 ), s_e, &temp_exp ); /* exp(temp_exp) */ singularVector[ch][currentIndex2] = L_shl_sat( temp, temp_exp ); /* exp(temp_exp) */ move32(); temp = BASOP_Util_Add_Mant32Exp( Mpy_32_32( c, x12 ), c_e, Mpy_32_32( s_neg, x11 ), s_e, &temp_exp ); /* exp(temp_exp) */ singularVector[ch][currentIndex1] = L_shl_sat( temp, temp_exp ); /* exp(temp_exp) */ move32(); } #endif return; } Loading Loading @@ -1160,6 +1179,7 @@ IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ L_temp = Sqrt32( norm_x, &L_temp_e ); 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 ) ); #ifndef FIX_MINOR_SVD_WMOPS_MR1010X IF( singularVectors[currChannel][idx] >= 0 ) { ( *g ) = L_negate( L_temp ); Loading @@ -1170,6 +1190,14 @@ IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ ( *g ) = L_negate( L_negate( L_temp ) ); move32(); } #else if ( singularVectors[currChannel][idx] >= 0 ) { L_temp = L_negate( L_temp ); } ( *g ) = L_temp ; move32(); #endif #ifndef FIX_1010_OPT_SINGLE_RESCALE r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), sing_exp[currChannel], -norm_x, norm_x_e, &r_e ); /* exp(r_e) */ Loading Loading @@ -1868,6 +1896,7 @@ static Word32 maxWithSign_fx( const Word32 a /* Qx */ ) { #ifndef FIX_MINOR_SVD_WMOPS_MR1010X IF( GT_32( L_abs( a ), SVD_MINIMUM_VALUE_FX ) ) { return a; Loading @@ -1880,6 +1909,18 @@ static Word32 maxWithSign_fx( { return SVD_MINIMUM_VALUE_FX; } #else Word32 result; if (a >= 0) { result = L_max( a, SVD_MINIMUM_VALUE_FX ); } if (a < 0) { result = L_min( a, -SVD_MINIMUM_VALUE_FX ); } return result; #endif } /*------------------------------------------------------------------------- Loading Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -150,3 +150,5 @@ #define FIX_ISSUE_1237 /* VA: replacement of Copy_Scale_sig_16_32_DEPREC() that are doing 16 bits left shift by Copy_Scale_sig_16_32_no_sat() */ #define FIX_ISSUE_1237_KEEP_EVS_BE /* VA: Fix to keep EVS bitexactness to 26.444 */ #endif #define FIX_MINOR_SVD_WMOPS_MR1010X /* FhG: Minor WMOPS tuning, bit-exact to previous version, saves about 8.2 WMOPS for MR1010 */
lib_dec/ivas_svd_dec.c +41 −0 Original line number Diff line number Diff line Loading @@ -919,6 +919,7 @@ static void ApplyRotation_fx( *g = BASOP_Util_Add_Mant32Exp( Mpy_32_32( c, x12 ), add( c_e, x12_e ), Mpy_32_32( L_negate( s ), x11 ), add( s_e, x11_e ), g_e ); /* exp(g_e) */ move32(); #ifndef FIX_MINOR_SVD_WMOPS_MR1010X FOR( ch = 0; ch < nChannels; ch++ ) { x11 = singularVector[ch][currentIndex2]; Loading @@ -934,6 +935,24 @@ static void ApplyRotation_fx( singularVector[ch][currentIndex1] = L_shl_sat( singularVector[ch][currentIndex1], temp_exp ); /* exp(temp_exp) */ move32(); } #else Word32 s_neg = L_negate(s); Word32 temp; FOR( ch = 0; ch < nChannels; ch++ ) { x11 = singularVector[ch][currentIndex2]; move32(); x12 = singularVector[ch][currentIndex1]; move32(); temp = BASOP_Util_Add_Mant32Exp( Mpy_32_32( c, x11 ), c_e, Mpy_32_32( s, x12 ), s_e, &temp_exp ); /* exp(temp_exp) */ singularVector[ch][currentIndex2] = L_shl_sat( temp, temp_exp ); /* exp(temp_exp) */ move32(); temp = BASOP_Util_Add_Mant32Exp( Mpy_32_32( c, x12 ), c_e, Mpy_32_32( s_neg, x11 ), s_e, &temp_exp ); /* exp(temp_exp) */ singularVector[ch][currentIndex1] = L_shl_sat( temp, temp_exp ); /* exp(temp_exp) */ move32(); } #endif return; } Loading Loading @@ -1160,6 +1179,7 @@ IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ L_temp = Sqrt32( norm_x, &L_temp_e ); 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 ) ); #ifndef FIX_MINOR_SVD_WMOPS_MR1010X IF( singularVectors[currChannel][idx] >= 0 ) { ( *g ) = L_negate( L_temp ); Loading @@ -1170,6 +1190,14 @@ IF( LT_16( currChannel, nChannelsL ) ) /* i <= m */ ( *g ) = L_negate( L_negate( L_temp ) ); move32(); } #else if ( singularVectors[currChannel][idx] >= 0 ) { L_temp = L_negate( L_temp ); } ( *g ) = L_temp ; move32(); #endif #ifndef FIX_1010_OPT_SINGLE_RESCALE r = BASOP_Util_Add_Mant32Exp( Mpy_32_32( ( *g ), singularVectors[currChannel][idx] ), sing_exp[currChannel], -norm_x, norm_x_e, &r_e ); /* exp(r_e) */ Loading Loading @@ -1868,6 +1896,7 @@ static Word32 maxWithSign_fx( const Word32 a /* Qx */ ) { #ifndef FIX_MINOR_SVD_WMOPS_MR1010X IF( GT_32( L_abs( a ), SVD_MINIMUM_VALUE_FX ) ) { return a; Loading @@ -1880,6 +1909,18 @@ static Word32 maxWithSign_fx( { return SVD_MINIMUM_VALUE_FX; } #else Word32 result; if (a >= 0) { result = L_max( a, SVD_MINIMUM_VALUE_FX ); } if (a < 0) { result = L_min( a, -SVD_MINIMUM_VALUE_FX ); } return result; #endif } /*------------------------------------------------------------------------- Loading