Loading lib_com/cng_exc_fx.c +16 −0 Original line number Diff line number Diff line Loading @@ -813,9 +813,17 @@ void cng_params_upd_fx( L_tmp = L_mult0(tmpv, tmpv); /* 2*(Q_exc+scale) */ pt_exc2++; tmpv = shl(*pt_exc2,scale); #ifdef BASOP_NOGLOB L_tmp = L_mac0_o(L_tmp, tmpv, tmpv, &Overflow); #else L_tmp = L_mac0(L_tmp, tmpv, tmpv); #endif pt_exc2++; #ifdef BASOP_NOGLOB L_ener = L_add_o(L_ener, L_shr_o(L_tmp, 7, &Overflow), &Overflow); /* Q(2*(Q_exc+scale)+1) ,division by L_frame done here */ #else L_ener = L_add(L_ener, L_shr(L_tmp, 7)); /* Q(2*(Q_exc+scale)+1) ,division by L_frame done here */ #endif } } ELSE /* L_FRAME16k */ Loading @@ -826,9 +834,17 @@ void cng_params_upd_fx( L_tmp = L_mult0(tmpv, tmpv); /* 2*(Q_exc+scale) */ pt_exc2++; tmpv = shl(*pt_exc2,scale); #ifdef BASOP_NOGLOB L_tmp = L_mac0_o(L_tmp, tmpv, tmpv, &Overflow); #else L_tmp = L_mac0(L_tmp, tmpv, tmpv); #endif pt_exc2++; #ifdef BASOP_NOGLOB L_ener = L_add_o(L_ener, L_shr_o( Mult_32_16(L_tmp,26214 /* 256/320, Q15 */), 7, &Overflow), &Overflow); /* Q(2*(Q_exc+scale)+15+1-16+1) ,division by L_frame done here */ #else L_ener = L_add(L_ener, L_shr( Mult_32_16(L_tmp,26214 /* 256/320, Q15 */), 7)); /* Q(2*(Q_exc+scale)+15+1-16+1) ,division by L_frame done here */ #endif } } #ifdef BASOP_NOGLOB Loading lib_com/preemph_fx.c +11 −1 Original line number Diff line number Diff line Loading @@ -19,15 +19,25 @@ void preemph_copy_fx( ) { Word16 i, temp; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif temp = x[lg - 1]; move16(); FOR (i = sub(lg, 1); i > 0; i--) { #ifdef BASOP_NOGLOB y[i] = msu_ro(L_deposit_h(x[i]), x[i - 1], mu, &Overflow); #else y[i] = msu_r(L_deposit_h(x[i]), x[i - 1], mu); #endif move16(); } #ifdef BASOP_NOGLOB y[0] = msu_ro(L_deposit_h(x[0]), *mem, mu, &Overflow); #else y[0] = msu_r(L_deposit_h(x[0]), *mem, mu); #endif move16(); *mem = temp; Loading lib_com/swb_bwe_com_lr_fx.c +11 −0 Original line number Diff line number Diff line Loading @@ -890,6 +890,9 @@ void SpectrumSmoothing_fx( Word16 reset_flag; Word16 pp, pk; Word16 exp_norm; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif *Qss = 10; Loading Loading @@ -966,12 +969,20 @@ void SpectrumSmoothing_fx( { IF( L_inBuf_pss[j] >= 0 ) { #ifdef BASOP_NOGLOB outBuf_pss_fx[j] = round_fx_o(L_shl_o(Mpy_32_16_r(L_shl_o(L_inBuf_pss[j], exp_norm, &Overflow), max_val_norm_fx), sub(exp_shift, exp_norm), &Overflow), &Overflow); #else outBuf_pss_fx[j] = round_fx(L_shl(Mpy_32_16_r(L_shl(L_inBuf_pss[j], exp_norm), max_val_norm_fx), sub(exp_shift, exp_norm))); #endif move32(); } ELSE { #ifdef BASOP_NOGLOB outBuf_pss_fx[j] = negate(round_fx_o(L_shl_o(Mpy_32_16_r(L_shl_o(L_abs(L_inBuf_pss[j]), exp_norm, &Overflow), max_val_norm_fx), sub(exp_shift, exp_norm), &Overflow), &Overflow)); #else outBuf_pss_fx[j] = negate(round_fx(L_shl(Mpy_32_16_r(L_shl(L_abs(L_inBuf_pss[j]), exp_norm), max_val_norm_fx), sub(exp_shift, exp_norm)))); #endif } } ELSE Loading lib_com/tcx_utils.c +7 −1 Original line number Diff line number Diff line Loading @@ -1616,7 +1616,9 @@ void tcx_get_gain( Word32 corr, ener; Word16 sx, sy, corr_e, ener_e; Word16 i, tmp; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif maxX = L_deposit_l(1); maxY = L_deposit_l(1); Loading Loading @@ -1657,7 +1659,11 @@ void tcx_get_gain( ener = L_shl(ener, tmp); ener_e = sub(ener_e, tmp); #ifdef BASOP_NOGLOB tmp = div_s(abs_s(round_fx_o(corr, &Overflow)), round_fx_o(ener, &Overflow)); #else tmp = div_s(abs_s(round_fx(corr)), round_fx(ener)); #endif if (corr < 0) tmp = negate(tmp); *gain = tmp; Loading lib_com/tools_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -171,10 +171,18 @@ Word32 sum2_fx_mod( /* o : sum of all squared vector elements Q(2x+ { Word16 i; Word32 L_tmp; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif L_tmp = L_deposit_l(0); FOR( i=0; i<lvec; i++ ) { #ifdef BASOP_NOGLOB L_tmp = L_add_o(L_tmp, L_shr(L_mult_o(vec[i], vec[i], &Overflow), 9), &Overflow); #else L_tmp = L_add(L_tmp, L_shr(L_mult(vec[i], vec[i]), 9)); #endif } return L_tmp; Loading Loading
lib_com/cng_exc_fx.c +16 −0 Original line number Diff line number Diff line Loading @@ -813,9 +813,17 @@ void cng_params_upd_fx( L_tmp = L_mult0(tmpv, tmpv); /* 2*(Q_exc+scale) */ pt_exc2++; tmpv = shl(*pt_exc2,scale); #ifdef BASOP_NOGLOB L_tmp = L_mac0_o(L_tmp, tmpv, tmpv, &Overflow); #else L_tmp = L_mac0(L_tmp, tmpv, tmpv); #endif pt_exc2++; #ifdef BASOP_NOGLOB L_ener = L_add_o(L_ener, L_shr_o(L_tmp, 7, &Overflow), &Overflow); /* Q(2*(Q_exc+scale)+1) ,division by L_frame done here */ #else L_ener = L_add(L_ener, L_shr(L_tmp, 7)); /* Q(2*(Q_exc+scale)+1) ,division by L_frame done here */ #endif } } ELSE /* L_FRAME16k */ Loading @@ -826,9 +834,17 @@ void cng_params_upd_fx( L_tmp = L_mult0(tmpv, tmpv); /* 2*(Q_exc+scale) */ pt_exc2++; tmpv = shl(*pt_exc2,scale); #ifdef BASOP_NOGLOB L_tmp = L_mac0_o(L_tmp, tmpv, tmpv, &Overflow); #else L_tmp = L_mac0(L_tmp, tmpv, tmpv); #endif pt_exc2++; #ifdef BASOP_NOGLOB L_ener = L_add_o(L_ener, L_shr_o( Mult_32_16(L_tmp,26214 /* 256/320, Q15 */), 7, &Overflow), &Overflow); /* Q(2*(Q_exc+scale)+15+1-16+1) ,division by L_frame done here */ #else L_ener = L_add(L_ener, L_shr( Mult_32_16(L_tmp,26214 /* 256/320, Q15 */), 7)); /* Q(2*(Q_exc+scale)+15+1-16+1) ,division by L_frame done here */ #endif } } #ifdef BASOP_NOGLOB Loading
lib_com/preemph_fx.c +11 −1 Original line number Diff line number Diff line Loading @@ -19,15 +19,25 @@ void preemph_copy_fx( ) { Word16 i, temp; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif temp = x[lg - 1]; move16(); FOR (i = sub(lg, 1); i > 0; i--) { #ifdef BASOP_NOGLOB y[i] = msu_ro(L_deposit_h(x[i]), x[i - 1], mu, &Overflow); #else y[i] = msu_r(L_deposit_h(x[i]), x[i - 1], mu); #endif move16(); } #ifdef BASOP_NOGLOB y[0] = msu_ro(L_deposit_h(x[0]), *mem, mu, &Overflow); #else y[0] = msu_r(L_deposit_h(x[0]), *mem, mu); #endif move16(); *mem = temp; Loading
lib_com/swb_bwe_com_lr_fx.c +11 −0 Original line number Diff line number Diff line Loading @@ -890,6 +890,9 @@ void SpectrumSmoothing_fx( Word16 reset_flag; Word16 pp, pk; Word16 exp_norm; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif *Qss = 10; Loading Loading @@ -966,12 +969,20 @@ void SpectrumSmoothing_fx( { IF( L_inBuf_pss[j] >= 0 ) { #ifdef BASOP_NOGLOB outBuf_pss_fx[j] = round_fx_o(L_shl_o(Mpy_32_16_r(L_shl_o(L_inBuf_pss[j], exp_norm, &Overflow), max_val_norm_fx), sub(exp_shift, exp_norm), &Overflow), &Overflow); #else outBuf_pss_fx[j] = round_fx(L_shl(Mpy_32_16_r(L_shl(L_inBuf_pss[j], exp_norm), max_val_norm_fx), sub(exp_shift, exp_norm))); #endif move32(); } ELSE { #ifdef BASOP_NOGLOB outBuf_pss_fx[j] = negate(round_fx_o(L_shl_o(Mpy_32_16_r(L_shl_o(L_abs(L_inBuf_pss[j]), exp_norm, &Overflow), max_val_norm_fx), sub(exp_shift, exp_norm), &Overflow), &Overflow)); #else outBuf_pss_fx[j] = negate(round_fx(L_shl(Mpy_32_16_r(L_shl(L_abs(L_inBuf_pss[j]), exp_norm), max_val_norm_fx), sub(exp_shift, exp_norm)))); #endif } } ELSE Loading
lib_com/tcx_utils.c +7 −1 Original line number Diff line number Diff line Loading @@ -1616,7 +1616,9 @@ void tcx_get_gain( Word32 corr, ener; Word16 sx, sy, corr_e, ener_e; Word16 i, tmp; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif maxX = L_deposit_l(1); maxY = L_deposit_l(1); Loading Loading @@ -1657,7 +1659,11 @@ void tcx_get_gain( ener = L_shl(ener, tmp); ener_e = sub(ener_e, tmp); #ifdef BASOP_NOGLOB tmp = div_s(abs_s(round_fx_o(corr, &Overflow)), round_fx_o(ener, &Overflow)); #else tmp = div_s(abs_s(round_fx(corr)), round_fx(ener)); #endif if (corr < 0) tmp = negate(tmp); *gain = tmp; Loading
lib_com/tools_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -171,10 +171,18 @@ Word32 sum2_fx_mod( /* o : sum of all squared vector elements Q(2x+ { Word16 i; Word32 L_tmp; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif L_tmp = L_deposit_l(0); FOR( i=0; i<lvec; i++ ) { #ifdef BASOP_NOGLOB L_tmp = L_add_o(L_tmp, L_shr(L_mult_o(vec[i], vec[i], &Overflow), 9), &Overflow); #else L_tmp = L_add(L_tmp, L_shr(L_mult(vec[i], vec[i]), 9)); #endif } return L_tmp; Loading