Loading lib_enc/enc_gen_voic_fx.c +8 −3 Original line number Diff line number Diff line Loading @@ -328,15 +328,20 @@ void encod_gen_voic_fx( FOR( i = 0; i < L_SUBFR; i++ ) { #ifdef BASOP_NOGLOB /* Contribution from AVQ layer */ Ltmp1 = L_mult(gain_preQ_fx, code_preQ_fx[i]); /* Q2 + Q6 -> Q9*/ Ltmp1 = L_shl(Ltmp1,tmp1_fx); /* Q16 + Q_exc */ Ltmp1 = L_mult_o(gain_preQ_fx, code_preQ_fx[i], &Overflow); /* Q2 + Q6 -> Q9*/ Ltmp1 = L_shl_o(Ltmp1, tmp1_fx, &Overflow); /* Q16 + Q_exc */ /* Compute exc2 */ #ifdef BASOP_NOGLOB Ltmp = L_shl_o(L_mult(gain_pit_fx,exc_fx[i+i_subfr_fx]),1, &Overflow); exc2_fx[i+i_subfr_fx] = round_fx_o(L_add_o(Ltmp, Ltmp1, &Overflow), &Overflow); #else /* Contribution from AVQ layer */ Ltmp1 = L_mult(gain_preQ_fx, code_preQ_fx[i]); /* Q2 + Q6 -> Q9*/ Ltmp1 = L_shl(Ltmp1, tmp1_fx); /* Q16 + Q_exc */ /* Compute exc2 */ Ltmp = L_shl(L_mult(gain_pit_fx,exc_fx[i+i_subfr_fx]),1); exc2_fx[i+i_subfr_fx] = round_fx(L_add(Ltmp, Ltmp1)); #endif Loading lib_enc/updt_tar_fx.c +8 −1 Original line number Diff line number Diff line Loading @@ -54,14 +54,21 @@ void updt_tar_HR_fx( { Word16 i; Word32 L_tmp, L_tmp1; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif FOR (i = 0; i < L; i++) { /*x2[i] = x[i] - gain*y[i];*/ L_tmp = L_mult(x[i], 32767); #ifdef BASOP_NOGLOB L_tmp1 = L_shl_o(L_mult_o(y[i], gain, &Overflow), Qx, &Overflow); L_tmp = L_sub_o(L_tmp, L_tmp1, &Overflow); #else L_tmp1 = L_shl(L_mult(y[i], gain), Qx); L_tmp = L_sub(L_tmp, L_tmp1); #endif x2[i] = extract_h(L_tmp); } return; Loading lib_enc/voiced_enc_fx.c +13 −1 Original line number Diff line number Diff line Loading @@ -1599,7 +1599,9 @@ static Word32 DTFS_getEngy_band_fx( Word16 k, lk, hk, HalfLag; Word32 freq_fx, L_lband, L_hband; Word32 en_fx = 0; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif L_lband = L_mult(lband, X_fx.lag_fx); L_hband = L_mult(hband, X_fx.lag_fx); HalfLag = s_min(shr(sub(X_fx.lag_fx, 1), 1), X_fx.nH_4kHz_fx); Loading Loading @@ -1627,8 +1629,13 @@ static Word32 DTFS_getEngy_band_fx( FOR(k = lk; k < hk; k++) { #ifdef BASOP_NOGLOB en_fx = L_mac0_o(en_fx, X_fx.a_fx[k], X_fx.a_fx[k], &Overflow); /* 2*X1.Q+1 */ en_fx = L_mac0_o(en_fx, X_fx.b_fx[k], X_fx.b_fx[k], &Overflow); #else en_fx = L_mac0(en_fx, X_fx.a_fx[k], X_fx.a_fx[k]); /* 2*X1.Q+1 */ en_fx = L_mac0(en_fx, X_fx.b_fx[k], X_fx.b_fx[k]); #endif } if (lband == 0) Loading @@ -1640,8 +1647,13 @@ static Word32 DTFS_getEngy_band_fx( test(); IF((s_and(X_fx.lag_fx, 1) == 0) && (hband == X_fx.upper_cut_off_freq_fx)) { #ifdef BASOP_NOGLOB en_fx = L_mac0_o(en_fx, X_fx.a_fx[k], X_fx.a_fx[k], &Overflow); en_fx = L_mac0_o(en_fx, X_fx.b_fx[k], X_fx.b_fx[k], &Overflow); #else en_fx = L_mac0(en_fx, X_fx.a_fx[k], X_fx.a_fx[k]); en_fx = L_mac0(en_fx, X_fx.b_fx[k], X_fx.b_fx[k]); #endif } return en_fx; /* 2*X1.Q */ Loading Loading
lib_enc/enc_gen_voic_fx.c +8 −3 Original line number Diff line number Diff line Loading @@ -328,15 +328,20 @@ void encod_gen_voic_fx( FOR( i = 0; i < L_SUBFR; i++ ) { #ifdef BASOP_NOGLOB /* Contribution from AVQ layer */ Ltmp1 = L_mult(gain_preQ_fx, code_preQ_fx[i]); /* Q2 + Q6 -> Q9*/ Ltmp1 = L_shl(Ltmp1,tmp1_fx); /* Q16 + Q_exc */ Ltmp1 = L_mult_o(gain_preQ_fx, code_preQ_fx[i], &Overflow); /* Q2 + Q6 -> Q9*/ Ltmp1 = L_shl_o(Ltmp1, tmp1_fx, &Overflow); /* Q16 + Q_exc */ /* Compute exc2 */ #ifdef BASOP_NOGLOB Ltmp = L_shl_o(L_mult(gain_pit_fx,exc_fx[i+i_subfr_fx]),1, &Overflow); exc2_fx[i+i_subfr_fx] = round_fx_o(L_add_o(Ltmp, Ltmp1, &Overflow), &Overflow); #else /* Contribution from AVQ layer */ Ltmp1 = L_mult(gain_preQ_fx, code_preQ_fx[i]); /* Q2 + Q6 -> Q9*/ Ltmp1 = L_shl(Ltmp1, tmp1_fx); /* Q16 + Q_exc */ /* Compute exc2 */ Ltmp = L_shl(L_mult(gain_pit_fx,exc_fx[i+i_subfr_fx]),1); exc2_fx[i+i_subfr_fx] = round_fx(L_add(Ltmp, Ltmp1)); #endif Loading
lib_enc/updt_tar_fx.c +8 −1 Original line number Diff line number Diff line Loading @@ -54,14 +54,21 @@ void updt_tar_HR_fx( { Word16 i; Word32 L_tmp, L_tmp1; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif FOR (i = 0; i < L; i++) { /*x2[i] = x[i] - gain*y[i];*/ L_tmp = L_mult(x[i], 32767); #ifdef BASOP_NOGLOB L_tmp1 = L_shl_o(L_mult_o(y[i], gain, &Overflow), Qx, &Overflow); L_tmp = L_sub_o(L_tmp, L_tmp1, &Overflow); #else L_tmp1 = L_shl(L_mult(y[i], gain), Qx); L_tmp = L_sub(L_tmp, L_tmp1); #endif x2[i] = extract_h(L_tmp); } return; Loading
lib_enc/voiced_enc_fx.c +13 −1 Original line number Diff line number Diff line Loading @@ -1599,7 +1599,9 @@ static Word32 DTFS_getEngy_band_fx( Word16 k, lk, hk, HalfLag; Word32 freq_fx, L_lband, L_hband; Word32 en_fx = 0; #ifdef BASOP_NOGLOB Flag Overflow = 0; #endif L_lband = L_mult(lband, X_fx.lag_fx); L_hband = L_mult(hband, X_fx.lag_fx); HalfLag = s_min(shr(sub(X_fx.lag_fx, 1), 1), X_fx.nH_4kHz_fx); Loading Loading @@ -1627,8 +1629,13 @@ static Word32 DTFS_getEngy_band_fx( FOR(k = lk; k < hk; k++) { #ifdef BASOP_NOGLOB en_fx = L_mac0_o(en_fx, X_fx.a_fx[k], X_fx.a_fx[k], &Overflow); /* 2*X1.Q+1 */ en_fx = L_mac0_o(en_fx, X_fx.b_fx[k], X_fx.b_fx[k], &Overflow); #else en_fx = L_mac0(en_fx, X_fx.a_fx[k], X_fx.a_fx[k]); /* 2*X1.Q+1 */ en_fx = L_mac0(en_fx, X_fx.b_fx[k], X_fx.b_fx[k]); #endif } if (lband == 0) Loading @@ -1640,8 +1647,13 @@ static Word32 DTFS_getEngy_band_fx( test(); IF((s_and(X_fx.lag_fx, 1) == 0) && (hband == X_fx.upper_cut_off_freq_fx)) { #ifdef BASOP_NOGLOB en_fx = L_mac0_o(en_fx, X_fx.a_fx[k], X_fx.a_fx[k], &Overflow); en_fx = L_mac0_o(en_fx, X_fx.b_fx[k], X_fx.b_fx[k], &Overflow); #else en_fx = L_mac0(en_fx, X_fx.a_fx[k], X_fx.a_fx[k]); en_fx = L_mac0(en_fx, X_fx.b_fx[k], X_fx.b_fx[k]); #endif } return en_fx; /* 2*X1.Q */ Loading