Loading lib_com/pvq_com.c +8 −32 Original line number Diff line number Diff line Loading @@ -24,14 +24,13 @@ ) { Word16 pool_part; #define WMC_TOOL_SKIP pool_part = extract_h( L_mult( negate(abs_s(num)), lim_neg_inv_tbl_fx[den] )); /* neg_in always, positive out always, so that positive truncation(rounding) towards zero is used */ if ( num < 0 ) { pool_part = negate(pool_part); /* make negative, one op */ } #undef WMC_TOOL_SKIP return pool_part; } Loading @@ -41,9 +40,7 @@ { int result; #define WMC_TOOL_SKIP result = (int )(((ui64_t) (NUM << 1)* intLimCDivInvDQ31[DEN]) >> 32) ; #undef WMC_TOOL_SKIP return result; } Loading @@ -55,10 +52,8 @@ int result; int tmp_num; tmp_num = max(NUM,-NUM); #define WMC_TOOL_SKIP /* result = (int)sign(NUM)*intLimCDivPos(tmp_num, DEN); */ result = (int)sign(NUM)*(int)(((ui64_t) (tmp_num << 1)* intLimCDivInvDQ31[DEN]) >> 32) ; #undef WMC_TOOL_SKIP return result; } Loading Loading @@ -95,9 +90,7 @@ den = (2*L -1) ; if( den<=67) { #define WMC_TOOL_SKIP Rnrg = (int)(((ui64_t) (R << 1)* intLimCDivInvDQ31[den]) >> 32) ; #undef WMC_TOOL_SKIP } else { Loading Loading @@ -126,7 +119,6 @@ ) { short dsHighIndex; #define WMC_TOOL_SKIP dsHighIndex = dsDiracIndex - DS_INDEX_LINEAR_END - 1; *diracs = dsDiracIndex; Loading @@ -134,7 +126,6 @@ { *diracs = dsHighDiracsTab[dsHighIndex]; } #undef WMC_TOOL_SKIP return ; } Loading Loading @@ -166,17 +157,13 @@ *DsIdx = 1; return ; } #define WMC_TOOL_SKIP SHIFT(1); dsIndex = 1 << frQuanta[0][td]; SHIFT(1); TEST(1) ; if (t_quanta_o > sv[nsv >> 1]) { dsIndex = nsv - dsIndex; /*single op*/ ADD(1); } #undef WMC_TOOL_SKIP #define WMC_TOOL_SKIP ADD(1); for( i = frQuanta[0][td]-1; i >= 0; i--) { /* Loading @@ -184,9 +171,7 @@ dsIndex += ((tmp_diff<<1) - 1) << i; */ /* clang warns for (neg)<<i */ dsIndex += shl(sub(shl(lshr(sub(sv[dsIndex], t_quanta_o), 15), 1), 1), i); } TEST(1);MAC(1); dsIndex += (t_quanta_o > sv[dsIndex]); #undef WMC_TOOL_SKIP dsIndex -= (dsIndex > 1); if (dsm == CONS) Loading Loading @@ -335,8 +320,6 @@ { short short_res; #define WMC_TOOL_SKIP MAC(1); if (short_var == -1 ) { return (16-1); Loading @@ -361,7 +344,6 @@ } } } #undef WMC_TOOL_SKIP return (short_res); } Loading @@ -384,14 +366,12 @@ ms = opp << ns; /* mantissa */ mc = near<< nc; /* mantissa */ #define WMC_TOOL_SKIP acc = L_mac(538500224L, mc, -2776); /* a0*mc + a1, acc(Q27), a0(Q11), a1(Q27)*/ z = mac_r(acc, ms, -2776); /* z in Q11, a0 in Q11 */ d = sub(ms, mc); /* d in Q15 */ z = mult_r(z, d); /* z in Q11 */ result = add(z, shl(sub(nc, ns), 11)); #undef WMC_TOOL_SKIP return result; } Loading Loading @@ -675,6 +655,7 @@ return; } #define WMC_TOOL_SKIP unsigned int UMult_32_32(unsigned int UL_var1, unsigned int UL_var2) { Loading Loading @@ -718,10 +699,7 @@ unsigned int UL_tmp; #define WMC_TOOL_SKIP MOVE(1); *exp = norm_ul(UL_val); /* aligned to BASOP */ #undef WMC_TOOL_SKIP UL_tmp = UL_val << (*exp); /* Q32*/ *exp = 32 + 31 - *exp; Loading @@ -740,7 +718,6 @@ Word16 manNumer, manDenom; Word16 quotient; #define WMC_TOOL_SKIP expDenom = norm_l(denom); /* exponent */ manDenom = extract_h(L_shl(denom, expDenom)); /* mantissa */ expNumer = norm_l(numer); /* exponent */ Loading @@ -749,7 +726,6 @@ quotient = div_s(manNumer, manDenom); /* in Q14 */ *expo = sub(expNumer, expDenom); #undef WMC_TOOL_SKIP return quotient; /* Q14 */ } Loading @@ -774,7 +750,6 @@ Word16 man, expo, reciprocal; Word16 angle, w, z; #define WMC_TOOL_SKIP IF (L_sub(x, 0) == 0) { return 25736; /* EVS_PI/2 in Q14 */ Loading Loading @@ -913,6 +888,7 @@ acc = L_mac(acc, w, z); /* Q31 */ angle = extract_l(L_shr(acc, 31 - 14)); /* Q14 result of atan(x), where 0 <= x < 1 */ } #undef WMC_TOOL_SKIP return angle; /* Q14 between 0 and EVS_PI/2 radian. */ } #undef WMC_TOOL_SKIP lib_dec/tcq_core_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -288,8 +288,8 @@ void tcq_core_LR_dec( npulses[k_sort[k]] = pulsesnum; if( Rk_fx[k_sort[k]] > 0 && surplus_fx < 0 ) #define WMC_TOOL_SKIP { #define WMC_TOOL_SKIP IF( nzbands <= 1 ) { divider = 0; Loading lib_dec/tns_base_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ #include <math.h> #include <assert.h> #define WMC_TOOL_SKIP /** Linear prediction analysis/synthesis filter definition. Loading Loading
lib_com/pvq_com.c +8 −32 Original line number Diff line number Diff line Loading @@ -24,14 +24,13 @@ ) { Word16 pool_part; #define WMC_TOOL_SKIP pool_part = extract_h( L_mult( negate(abs_s(num)), lim_neg_inv_tbl_fx[den] )); /* neg_in always, positive out always, so that positive truncation(rounding) towards zero is used */ if ( num < 0 ) { pool_part = negate(pool_part); /* make negative, one op */ } #undef WMC_TOOL_SKIP return pool_part; } Loading @@ -41,9 +40,7 @@ { int result; #define WMC_TOOL_SKIP result = (int )(((ui64_t) (NUM << 1)* intLimCDivInvDQ31[DEN]) >> 32) ; #undef WMC_TOOL_SKIP return result; } Loading @@ -55,10 +52,8 @@ int result; int tmp_num; tmp_num = max(NUM,-NUM); #define WMC_TOOL_SKIP /* result = (int)sign(NUM)*intLimCDivPos(tmp_num, DEN); */ result = (int)sign(NUM)*(int)(((ui64_t) (tmp_num << 1)* intLimCDivInvDQ31[DEN]) >> 32) ; #undef WMC_TOOL_SKIP return result; } Loading Loading @@ -95,9 +90,7 @@ den = (2*L -1) ; if( den<=67) { #define WMC_TOOL_SKIP Rnrg = (int)(((ui64_t) (R << 1)* intLimCDivInvDQ31[den]) >> 32) ; #undef WMC_TOOL_SKIP } else { Loading Loading @@ -126,7 +119,6 @@ ) { short dsHighIndex; #define WMC_TOOL_SKIP dsHighIndex = dsDiracIndex - DS_INDEX_LINEAR_END - 1; *diracs = dsDiracIndex; Loading @@ -134,7 +126,6 @@ { *diracs = dsHighDiracsTab[dsHighIndex]; } #undef WMC_TOOL_SKIP return ; } Loading Loading @@ -166,17 +157,13 @@ *DsIdx = 1; return ; } #define WMC_TOOL_SKIP SHIFT(1); dsIndex = 1 << frQuanta[0][td]; SHIFT(1); TEST(1) ; if (t_quanta_o > sv[nsv >> 1]) { dsIndex = nsv - dsIndex; /*single op*/ ADD(1); } #undef WMC_TOOL_SKIP #define WMC_TOOL_SKIP ADD(1); for( i = frQuanta[0][td]-1; i >= 0; i--) { /* Loading @@ -184,9 +171,7 @@ dsIndex += ((tmp_diff<<1) - 1) << i; */ /* clang warns for (neg)<<i */ dsIndex += shl(sub(shl(lshr(sub(sv[dsIndex], t_quanta_o), 15), 1), 1), i); } TEST(1);MAC(1); dsIndex += (t_quanta_o > sv[dsIndex]); #undef WMC_TOOL_SKIP dsIndex -= (dsIndex > 1); if (dsm == CONS) Loading Loading @@ -335,8 +320,6 @@ { short short_res; #define WMC_TOOL_SKIP MAC(1); if (short_var == -1 ) { return (16-1); Loading @@ -361,7 +344,6 @@ } } } #undef WMC_TOOL_SKIP return (short_res); } Loading @@ -384,14 +366,12 @@ ms = opp << ns; /* mantissa */ mc = near<< nc; /* mantissa */ #define WMC_TOOL_SKIP acc = L_mac(538500224L, mc, -2776); /* a0*mc + a1, acc(Q27), a0(Q11), a1(Q27)*/ z = mac_r(acc, ms, -2776); /* z in Q11, a0 in Q11 */ d = sub(ms, mc); /* d in Q15 */ z = mult_r(z, d); /* z in Q11 */ result = add(z, shl(sub(nc, ns), 11)); #undef WMC_TOOL_SKIP return result; } Loading Loading @@ -675,6 +655,7 @@ return; } #define WMC_TOOL_SKIP unsigned int UMult_32_32(unsigned int UL_var1, unsigned int UL_var2) { Loading Loading @@ -718,10 +699,7 @@ unsigned int UL_tmp; #define WMC_TOOL_SKIP MOVE(1); *exp = norm_ul(UL_val); /* aligned to BASOP */ #undef WMC_TOOL_SKIP UL_tmp = UL_val << (*exp); /* Q32*/ *exp = 32 + 31 - *exp; Loading @@ -740,7 +718,6 @@ Word16 manNumer, manDenom; Word16 quotient; #define WMC_TOOL_SKIP expDenom = norm_l(denom); /* exponent */ manDenom = extract_h(L_shl(denom, expDenom)); /* mantissa */ expNumer = norm_l(numer); /* exponent */ Loading @@ -749,7 +726,6 @@ quotient = div_s(manNumer, manDenom); /* in Q14 */ *expo = sub(expNumer, expDenom); #undef WMC_TOOL_SKIP return quotient; /* Q14 */ } Loading @@ -774,7 +750,6 @@ Word16 man, expo, reciprocal; Word16 angle, w, z; #define WMC_TOOL_SKIP IF (L_sub(x, 0) == 0) { return 25736; /* EVS_PI/2 in Q14 */ Loading Loading @@ -913,6 +888,7 @@ acc = L_mac(acc, w, z); /* Q31 */ angle = extract_l(L_shr(acc, 31 - 14)); /* Q14 result of atan(x), where 0 <= x < 1 */ } #undef WMC_TOOL_SKIP return angle; /* Q14 between 0 and EVS_PI/2 radian. */ } #undef WMC_TOOL_SKIP
lib_dec/tcq_core_dec.c +1 −1 Original line number Diff line number Diff line Loading @@ -288,8 +288,8 @@ void tcq_core_LR_dec( npulses[k_sort[k]] = pulsesnum; if( Rk_fx[k_sort[k]] > 0 && surplus_fx < 0 ) #define WMC_TOOL_SKIP { #define WMC_TOOL_SKIP IF( nzbands <= 1 ) { divider = 0; Loading
lib_dec/tns_base_dec.c +0 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,6 @@ #include <math.h> #include <assert.h> #define WMC_TOOL_SKIP /** Linear prediction analysis/synthesis filter definition. Loading