Loading lib_com/basop_util.c +9 −0 Original line number Diff line number Diff line Loading @@ -3071,3 +3071,12 @@ cmplx CL_mult_32x16( cmplx input, cmplx_s coeff ) #endif return result; } #ifndef FUNCTION_W_msu0_32_32 Word64 W_msu0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 ) { /* no saturation (like hexagon) */ L64_var1 = W_sub( L64_var1, W_mult0_32_32( L_var2, L_var3 ) ); return L64_var1; } #endif No newline at end of file lib_com/basop_util.h +4 −0 Original line number Diff line number Diff line Loading @@ -913,4 +913,8 @@ cmplx CL_scale_t( cmplx x, Word16 y ); cmplx CL_dscale_t( cmplx x, Word16 y1, Word16 y2 ); cmplx CL_mult_32x16( cmplx input, cmplx_s coeff ); #ifndef FUNCTION_W_msu0_32_32 Word64 W_msu0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 ); #endif #endif /* __BASOP_UTIL_H__ */ lib_enc/ivas_mcmasa_enc_fx.c +14 −2 Original line number Diff line number Diff line Loading @@ -2144,10 +2144,13 @@ static void compute_cov_mtx_fx( Word16 freq; int k; int i, j; Word64 temp64_1_r_acc, temp64_1_i_acc; Word16 tmp_16; #if 1 Word16 temp_exp = add( 1, shl( inp_exp, 1 ) ); #else Word16 temp_exp = shl( inp_exp, 1 ); #endif Word64 temp64_1_r_acc, temp64_1_i_acc; FOR( i = 0; i < N; i++ ) { Loading @@ -2166,11 +2169,19 @@ static void compute_cov_mtx_fx( FOR( freq = brange[0]; freq < brange[1]; freq++ ) { #if 1 temp64_1_r_acc = W_mac0_32_32( temp64_1_r_acc, si[i][freq], si[j][freq] ); // exp:2*inp_exp temp64_1_r_acc = W_mac0_32_32( temp64_1_r_acc, sr[i][freq], sr[j][freq] ); // exp:2*inp_exp temp64_1_i_acc = W_mac0_32_32( temp64_1_i_acc, si[i][freq], sr[j][freq] ); temp64_1_i_acc = W_msu0_32_32( temp64_1_i_acc, sr[i][freq], si[j][freq] ); #else temp64_1_r_acc = W_mac_32_32( temp64_1_r_acc, si[i][freq], si[j][freq] ); // exp:2*inp_exp temp64_1_r_acc = W_mac_32_32( temp64_1_r_acc, sr[i][freq], sr[j][freq] ); // exp:2*inp_exp temp64_1_i_acc = W_mac_32_32( temp64_1_i_acc, si[i][freq], sr[j][freq] ); temp64_1_i_acc = W_sub( temp64_1_i_acc, W_mult_32_32( sr[i][freq], si[j][freq] ) ); #endif } tmp_16 = W_norm( temp64_1_r_acc ); Loading @@ -2193,6 +2204,7 @@ static void compute_cov_mtx_fx( } #else /* Compute covariance matrix, i.e., xT * conj(x), and accumulate to the output */ static void compute_cov_mtx_fx( Loading Loading
lib_com/basop_util.c +9 −0 Original line number Diff line number Diff line Loading @@ -3071,3 +3071,12 @@ cmplx CL_mult_32x16( cmplx input, cmplx_s coeff ) #endif return result; } #ifndef FUNCTION_W_msu0_32_32 Word64 W_msu0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 ) { /* no saturation (like hexagon) */ L64_var1 = W_sub( L64_var1, W_mult0_32_32( L_var2, L_var3 ) ); return L64_var1; } #endif No newline at end of file
lib_com/basop_util.h +4 −0 Original line number Diff line number Diff line Loading @@ -913,4 +913,8 @@ cmplx CL_scale_t( cmplx x, Word16 y ); cmplx CL_dscale_t( cmplx x, Word16 y1, Word16 y2 ); cmplx CL_mult_32x16( cmplx input, cmplx_s coeff ); #ifndef FUNCTION_W_msu0_32_32 Word64 W_msu0_32_32( Word64 L64_var1, Word32 L_var2, Word32 L_var3 ); #endif #endif /* __BASOP_UTIL_H__ */
lib_enc/ivas_mcmasa_enc_fx.c +14 −2 Original line number Diff line number Diff line Loading @@ -2144,10 +2144,13 @@ static void compute_cov_mtx_fx( Word16 freq; int k; int i, j; Word64 temp64_1_r_acc, temp64_1_i_acc; Word16 tmp_16; #if 1 Word16 temp_exp = add( 1, shl( inp_exp, 1 ) ); #else Word16 temp_exp = shl( inp_exp, 1 ); #endif Word64 temp64_1_r_acc, temp64_1_i_acc; FOR( i = 0; i < N; i++ ) { Loading @@ -2166,11 +2169,19 @@ static void compute_cov_mtx_fx( FOR( freq = brange[0]; freq < brange[1]; freq++ ) { #if 1 temp64_1_r_acc = W_mac0_32_32( temp64_1_r_acc, si[i][freq], si[j][freq] ); // exp:2*inp_exp temp64_1_r_acc = W_mac0_32_32( temp64_1_r_acc, sr[i][freq], sr[j][freq] ); // exp:2*inp_exp temp64_1_i_acc = W_mac0_32_32( temp64_1_i_acc, si[i][freq], sr[j][freq] ); temp64_1_i_acc = W_msu0_32_32( temp64_1_i_acc, sr[i][freq], si[j][freq] ); #else temp64_1_r_acc = W_mac_32_32( temp64_1_r_acc, si[i][freq], si[j][freq] ); // exp:2*inp_exp temp64_1_r_acc = W_mac_32_32( temp64_1_r_acc, sr[i][freq], sr[j][freq] ); // exp:2*inp_exp temp64_1_i_acc = W_mac_32_32( temp64_1_i_acc, si[i][freq], sr[j][freq] ); temp64_1_i_acc = W_sub( temp64_1_i_acc, W_mult_32_32( sr[i][freq], si[j][freq] ) ); #endif } tmp_16 = W_norm( temp64_1_r_acc ); Loading @@ -2193,6 +2204,7 @@ static void compute_cov_mtx_fx( } #else /* Compute covariance matrix, i.e., xT * conj(x), and accumulate to the output */ static void compute_cov_mtx_fx( Loading