Loading lib_com/fft_fx.c +21 −2 Original line number Diff line number Diff line Loading @@ -1071,9 +1071,15 @@ static void fft5_shift4_16fx( move16(); T6 = zRe[i3]; move16(); #ifdef BASOP_NOGLOB T7 = add_sat(T5,T6); T8 = add_sat(T4,T7); Tt = sub_sat(T5,T6); #else T7 = add(T5,T6); T8 = add(T4,T7); Tt = sub(T5,T6); #endif /* T9 = KP559016994 * (T4 - T7); */ L_tmp = Mult_32_16(KP559016994_16FX,sub(T4,T7)); T9 = round_fx(L_tmp); Loading @@ -1088,10 +1094,17 @@ static void fft5_shift4_16fx( move16(); T6 = zIm[i3]; move16(); #ifdef BASOP_NOGLOB T7 = add_sat(T5,T6); Te = sub_sat(T2,T3); Tp = add_sat(T4,T7); Th = sub_sat(T5,T6); #else T7 = add(T5,T6); Te = sub(T2,T3); Tp = add(T4,T7); Th = sub(T5,T6); #endif /* Tn = KP559016994 * (T4 - T7); */ L_tmp = Mult_32_16(KP559016994_16FX,sub(T4,T7)); Tn = round_fx(L_tmp); Loading @@ -1110,13 +1123,19 @@ static void fft5_shift4_16fx( /* T2 = KP951056516*Te + KP587785252*Th; */ L_tmp = Mult_32_16(KP951056516_16FX,Te); L_tmp = Madd_32_16(L_tmp,KP587785252_16FX,Th); #ifdef BASOP_NOGLOB T2 = round_fx_sat(L_tmp); #else T2 = round_fx(L_tmp); #endif /*T3 = KP951056516*Th - KP587785252*Te; */ L_tmp = Mult_32_16(KP951056516_16FX,Th); L_tmp = Msub_32_16(L_tmp,KP587785252_16FX,Te); #ifdef BASOP_NOGLOB T3 = round_fx_sat(L_tmp); #else T3 = round_fx(L_tmp); #endif #ifdef BASOP_NOGLOB T6 = sub_sat(T1, shr_sat(T8, 2)); T4 = add_sat(T9, T6); Loading lib_com/swb_tbe_com_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -2014,8 +2014,13 @@ void GenShapedSHBExcitation_fx( { /*exc16kWhtnd[k+j] = temp1 * exc16kWhtnd[k+j] + temp2 * White_exc16k[k+j]; */ L_tmp = L_mult(temp2, White_exc16k[k + j]); /* 16+(Q_bwe_exc-NOISE_QADJ)*/ #ifdef BASOP_NOGLOB L_tmp = L_shl_sat(L_tmp, NOISE_QADJ); /* 16+(Q_bwe_exc) */ exc16kWhtnd[k + j] = mac_r_sat(L_tmp, temp1, exc16kWhtnd[k + j]); #else L_tmp = L_shl(L_tmp, NOISE_QADJ); /* 16+(Q_bwe_exc) */ exc16kWhtnd[k + j] = mac_r(L_tmp, temp1, exc16kWhtnd[k + j]); #endif move16(); /* Q_bwe_exc */ } Loading lib_dec/FEC_HQ_phase_ecu_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -2285,8 +2285,13 @@ void sin_cos_est_fx(Word32 phi, Word16 *cosfreq, Word16 *sinfreq) tmp = L_shl(Mult_32_16(delta, sinb),1); /*Q31 */ cosv = L_sub(L_deposit_h(cosb), tmp); #ifdef BASOP_NOGLOB *sinfreq = round_fx_sat(sinv); *cosfreq = round_fx_sat(cosv); #else *sinfreq = round_fx(sinv); *cosfreq = round_fx(cosv); #endif return; Loading lib_dec/hf_synth_fx.c +10 −3 Original line number Diff line number Diff line Loading @@ -847,10 +847,11 @@ void hf_synth_amr_wb_fx( { *pt1 = mult_r(*pt1,g); /*qdct */ move16(); } *pt2 = round_fx(L_shl(L_mult(*pt2,inv_g),3)); /*qdct */ #ifdef BASOP_NOGLOB * pt2 = round_fx_sat(L_shl_sat(L_mult(*pt2, inv_g), 3)); /*qdct */ *pt3 = add_sat(*pt1, *pt2); #else * pt2 = round_fx(L_shl(L_mult(*pt2, inv_g), 3)); /*qdct */ *pt3 = add(*pt1, *pt2); #endif move16(); Loading Loading @@ -1408,12 +1409,18 @@ static void envelope_fx( L_tmp = L_mult(px, px); L_tmp = L_mac(L_tmp, py, py); /*Q(21+2*q1)*/ #ifdef BASOP_NOGLOB pp = round_fx_sat(Isqrt(L_shr(L_tmp, add(11, shl(q1, 1))))); /*Q10*/ #else pp = round_fx(Isqrt(L_shr(L_tmp, add(11, shl(q1, 1))))); /*Q10*/ #endif L_tmp = L_mult(rx, rx); L_tmp = L_mac(L_tmp, ry, ry); /*Q(21+2*q1)*/ #ifdef BASOP_NOGLOB rr = round_fx_sat(Isqrt(L_shr(L_tmp, add(11, shl(q2, 1))))); /*Q10*/ #else rr = round_fx(Isqrt(L_shr(L_tmp, add(11, shl(q2, 1))))); /*Q10*/ #endif Copy(Aq, As, 3); IF ( EQ_16(shr(As[2],1),-2048) ) { Loading Loading
lib_com/fft_fx.c +21 −2 Original line number Diff line number Diff line Loading @@ -1071,9 +1071,15 @@ static void fft5_shift4_16fx( move16(); T6 = zRe[i3]; move16(); #ifdef BASOP_NOGLOB T7 = add_sat(T5,T6); T8 = add_sat(T4,T7); Tt = sub_sat(T5,T6); #else T7 = add(T5,T6); T8 = add(T4,T7); Tt = sub(T5,T6); #endif /* T9 = KP559016994 * (T4 - T7); */ L_tmp = Mult_32_16(KP559016994_16FX,sub(T4,T7)); T9 = round_fx(L_tmp); Loading @@ -1088,10 +1094,17 @@ static void fft5_shift4_16fx( move16(); T6 = zIm[i3]; move16(); #ifdef BASOP_NOGLOB T7 = add_sat(T5,T6); Te = sub_sat(T2,T3); Tp = add_sat(T4,T7); Th = sub_sat(T5,T6); #else T7 = add(T5,T6); Te = sub(T2,T3); Tp = add(T4,T7); Th = sub(T5,T6); #endif /* Tn = KP559016994 * (T4 - T7); */ L_tmp = Mult_32_16(KP559016994_16FX,sub(T4,T7)); Tn = round_fx(L_tmp); Loading @@ -1110,13 +1123,19 @@ static void fft5_shift4_16fx( /* T2 = KP951056516*Te + KP587785252*Th; */ L_tmp = Mult_32_16(KP951056516_16FX,Te); L_tmp = Madd_32_16(L_tmp,KP587785252_16FX,Th); #ifdef BASOP_NOGLOB T2 = round_fx_sat(L_tmp); #else T2 = round_fx(L_tmp); #endif /*T3 = KP951056516*Th - KP587785252*Te; */ L_tmp = Mult_32_16(KP951056516_16FX,Th); L_tmp = Msub_32_16(L_tmp,KP587785252_16FX,Te); #ifdef BASOP_NOGLOB T3 = round_fx_sat(L_tmp); #else T3 = round_fx(L_tmp); #endif #ifdef BASOP_NOGLOB T6 = sub_sat(T1, shr_sat(T8, 2)); T4 = add_sat(T9, T6); Loading
lib_com/swb_tbe_com_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -2014,8 +2014,13 @@ void GenShapedSHBExcitation_fx( { /*exc16kWhtnd[k+j] = temp1 * exc16kWhtnd[k+j] + temp2 * White_exc16k[k+j]; */ L_tmp = L_mult(temp2, White_exc16k[k + j]); /* 16+(Q_bwe_exc-NOISE_QADJ)*/ #ifdef BASOP_NOGLOB L_tmp = L_shl_sat(L_tmp, NOISE_QADJ); /* 16+(Q_bwe_exc) */ exc16kWhtnd[k + j] = mac_r_sat(L_tmp, temp1, exc16kWhtnd[k + j]); #else L_tmp = L_shl(L_tmp, NOISE_QADJ); /* 16+(Q_bwe_exc) */ exc16kWhtnd[k + j] = mac_r(L_tmp, temp1, exc16kWhtnd[k + j]); #endif move16(); /* Q_bwe_exc */ } Loading
lib_dec/FEC_HQ_phase_ecu_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -2285,8 +2285,13 @@ void sin_cos_est_fx(Word32 phi, Word16 *cosfreq, Word16 *sinfreq) tmp = L_shl(Mult_32_16(delta, sinb),1); /*Q31 */ cosv = L_sub(L_deposit_h(cosb), tmp); #ifdef BASOP_NOGLOB *sinfreq = round_fx_sat(sinv); *cosfreq = round_fx_sat(cosv); #else *sinfreq = round_fx(sinv); *cosfreq = round_fx(cosv); #endif return; Loading
lib_dec/hf_synth_fx.c +10 −3 Original line number Diff line number Diff line Loading @@ -847,10 +847,11 @@ void hf_synth_amr_wb_fx( { *pt1 = mult_r(*pt1,g); /*qdct */ move16(); } *pt2 = round_fx(L_shl(L_mult(*pt2,inv_g),3)); /*qdct */ #ifdef BASOP_NOGLOB * pt2 = round_fx_sat(L_shl_sat(L_mult(*pt2, inv_g), 3)); /*qdct */ *pt3 = add_sat(*pt1, *pt2); #else * pt2 = round_fx(L_shl(L_mult(*pt2, inv_g), 3)); /*qdct */ *pt3 = add(*pt1, *pt2); #endif move16(); Loading Loading @@ -1408,12 +1409,18 @@ static void envelope_fx( L_tmp = L_mult(px, px); L_tmp = L_mac(L_tmp, py, py); /*Q(21+2*q1)*/ #ifdef BASOP_NOGLOB pp = round_fx_sat(Isqrt(L_shr(L_tmp, add(11, shl(q1, 1))))); /*Q10*/ #else pp = round_fx(Isqrt(L_shr(L_tmp, add(11, shl(q1, 1))))); /*Q10*/ #endif L_tmp = L_mult(rx, rx); L_tmp = L_mac(L_tmp, ry, ry); /*Q(21+2*q1)*/ #ifdef BASOP_NOGLOB rr = round_fx_sat(Isqrt(L_shr(L_tmp, add(11, shl(q2, 1))))); /*Q10*/ #else rr = round_fx(Isqrt(L_shr(L_tmp, add(11, shl(q2, 1))))); /*Q10*/ #endif Copy(Aq, As, 3); IF ( EQ_16(shr(As[2],1),-2048) ) { Loading