Loading lib_com/swb_tbe_com_fx.c +12 −12 Original line number Diff line number Diff line Loading @@ -1434,9 +1434,7 @@ void GenShapedSHBExcitation_fx( Word32 White_exc16k_32[L_FRAME16k]; Word16 Q_temp; Word16 prev_Q_bwe_exc_fb; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #ifdef ADD_IVAS_TBE_CODE Word32 tempD; Word16 alpha, step, mem_csfilt_left, mem_csfilt_right, excNoisyEnvLeft[L_FRAME16k], excNoisyEnvRight[L_FRAME16k]; Loading Loading @@ -1507,7 +1505,11 @@ void GenShapedSHBExcitation_fx( /* Estimate pow1 associated with Low band nonlinear extended excitation */ /* pow1=0.00001f */ tmp = sub(shl(*Q_bwe_exc, 1), 31); #ifdef BASOP_NOGLOB pow1 = L_shl_sat(21475l/*0.00001f Q31*/, tmp); /* 0.00001f in 2*(Q_bwe_exc) */ #else pow1 = L_shl(21475l/*0.00001f Q31*/, tmp); /* 0.00001f in 2*(Q_bwe_exc) */ #endif FOR( k = 0; k < L_FRAME16k; k++) { /*excTmp2[k ] = (float)(fabs(exc16kWhtnd[k]));*/ Loading @@ -1516,7 +1518,7 @@ void GenShapedSHBExcitation_fx( /* pow1 += exc16kWhtnd[k] * exc16kWhtnd[k]; */ #ifdef BASOP_NOGLOB pow1 = L_mac0_o( pow1, exc16kWhtnd[k], exc16kWhtnd[k], &Overflow ); /* 2*Q_bwe_exc */ pow1 = L_mac0_sat( pow1, exc16kWhtnd[k], exc16kWhtnd[k] ); /* 2*Q_bwe_exc */ #else pow1 = L_mac0( pow1, exc16kWhtnd[k], exc16kWhtnd[k] ); /* 2*Q_bwe_exc */ #endif Loading Loading @@ -1682,7 +1684,7 @@ void GenShapedSHBExcitation_fx( FOR(k = 0; k < L_FRAME16k; k++) { #ifdef BASOP_NOGLOB L_tmp4 = L_shl_o(L_deposit_l(White_exc16k[k]), tmp, &Overflow); L_tmp4 = L_shl_sat(L_deposit_l(White_exc16k[k]), tmp); #else L_tmp4 = L_shl(L_deposit_l(White_exc16k[k]), tmp); #endif Loading Loading @@ -1717,7 +1719,7 @@ void GenShapedSHBExcitation_fx( /* o: White_exc16k in (Q_bwe_exc-NOISE_QADJ) */ /* pow22 += White_exc16k[k] * White_exc16k[k]; */ #ifdef BASOP_NOGLOB pow22 = L_mac0_o(pow22, White_exc16k[k], White_exc16k[k], &Overflow); /* 2*(Q_bwe_exc-NOISE_QADJ)*/ pow22 = L_mac0_sat(pow22, White_exc16k[k], White_exc16k[k]); /* 2*(Q_bwe_exc-NOISE_QADJ)*/ #else pow22 = L_mac0(pow22, White_exc16k[k], White_exc16k[k]); /* 2*(Q_bwe_exc-NOISE_QADJ)*/ #endif Loading Loading @@ -1980,7 +1982,7 @@ void GenShapedSHBExcitation_fx( tempQ31 = Mult_32_16(pow1, temp); L_tmp = root_a_over_b_fx(tempQ31, Q_pow1, pow22, Q_pow22, &exp); #ifdef BASOP_NOGLOB temp2 = round_fx_o(L_shl_o(L_tmp, exp, &Overflow), &Overflow); /* Q15 whiteEnvShapedExc scale factor */ temp2 = round_fx_sat(L_shl_sat(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #else temp2 = round_fx(L_shl(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #endif Loading @@ -2002,7 +2004,7 @@ void GenShapedSHBExcitation_fx( tempQ31 = Mult_32_16(pow1, temp); L_tmp = root_a_over_b_fx(tempQ31, Q_pow1, pow22, Q_pow22, &exp); #ifdef BASOP_NOGLOB temp2 = round_fx_o(L_shl_o(L_tmp, exp, &Overflow), &Overflow); /* Q15 whiteEnvShapedExc scale factor */ temp2 = round_fx_sat(L_shl_sat(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #else temp2 = round_fx(L_shl(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #endif Loading Loading @@ -2695,9 +2697,7 @@ static Word32 non_linearity_scaled_copy( { Word16 i; Word32 L_tmp; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif IF (en_abs) { Loading Loading @@ -2740,7 +2740,7 @@ static Word32 non_linearity_scaled_copy( FOR ( ; i < length; i++ ) { #ifdef BASOP_NOGLOB L_tmp = L_mult_o( input[i], input[i] , &Overflow); /* 2*Q_inp+1 */ L_tmp = L_mult_sat( input[i], input[i]); /* 2*Q_inp+1 */ #else /* BASOP_NOGLOB */ L_tmp = L_mult( input[i], input[i] ); /* 2*Q_inp+1 */ #endif /* BASOP_NOGLOB */ Loading lib_dec/swb_tbe_dec_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -1900,8 +1900,13 @@ void swb_tbe_dec_fx( Copy( shaped_shb_excitationTemp, &shaped_shb_excitation[L_SHB_LAHEAD], L_FRAME16k ); /* Q_bwe_exc */ tmp = sub(shl(Q_bwe_exc, 1), 31+16); #ifdef BASOP_NOGLOB prev_pow = L_shl_sat(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ curr_pow = L_shl_sat(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ #else prev_pow = L_shl(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ curr_pow = L_shl(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ #endif FOR( i = 0; i < L_SHB_LAHEAD + 10; i++ ) { #ifdef BASOP_NOGLOB Loading Loading
lib_com/swb_tbe_com_fx.c +12 −12 Original line number Diff line number Diff line Loading @@ -1434,9 +1434,7 @@ void GenShapedSHBExcitation_fx( Word32 White_exc16k_32[L_FRAME16k]; Word16 Q_temp; Word16 prev_Q_bwe_exc_fb; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #ifdef ADD_IVAS_TBE_CODE Word32 tempD; Word16 alpha, step, mem_csfilt_left, mem_csfilt_right, excNoisyEnvLeft[L_FRAME16k], excNoisyEnvRight[L_FRAME16k]; Loading Loading @@ -1507,7 +1505,11 @@ void GenShapedSHBExcitation_fx( /* Estimate pow1 associated with Low band nonlinear extended excitation */ /* pow1=0.00001f */ tmp = sub(shl(*Q_bwe_exc, 1), 31); #ifdef BASOP_NOGLOB pow1 = L_shl_sat(21475l/*0.00001f Q31*/, tmp); /* 0.00001f in 2*(Q_bwe_exc) */ #else pow1 = L_shl(21475l/*0.00001f Q31*/, tmp); /* 0.00001f in 2*(Q_bwe_exc) */ #endif FOR( k = 0; k < L_FRAME16k; k++) { /*excTmp2[k ] = (float)(fabs(exc16kWhtnd[k]));*/ Loading @@ -1516,7 +1518,7 @@ void GenShapedSHBExcitation_fx( /* pow1 += exc16kWhtnd[k] * exc16kWhtnd[k]; */ #ifdef BASOP_NOGLOB pow1 = L_mac0_o( pow1, exc16kWhtnd[k], exc16kWhtnd[k], &Overflow ); /* 2*Q_bwe_exc */ pow1 = L_mac0_sat( pow1, exc16kWhtnd[k], exc16kWhtnd[k] ); /* 2*Q_bwe_exc */ #else pow1 = L_mac0( pow1, exc16kWhtnd[k], exc16kWhtnd[k] ); /* 2*Q_bwe_exc */ #endif Loading Loading @@ -1682,7 +1684,7 @@ void GenShapedSHBExcitation_fx( FOR(k = 0; k < L_FRAME16k; k++) { #ifdef BASOP_NOGLOB L_tmp4 = L_shl_o(L_deposit_l(White_exc16k[k]), tmp, &Overflow); L_tmp4 = L_shl_sat(L_deposit_l(White_exc16k[k]), tmp); #else L_tmp4 = L_shl(L_deposit_l(White_exc16k[k]), tmp); #endif Loading Loading @@ -1717,7 +1719,7 @@ void GenShapedSHBExcitation_fx( /* o: White_exc16k in (Q_bwe_exc-NOISE_QADJ) */ /* pow22 += White_exc16k[k] * White_exc16k[k]; */ #ifdef BASOP_NOGLOB pow22 = L_mac0_o(pow22, White_exc16k[k], White_exc16k[k], &Overflow); /* 2*(Q_bwe_exc-NOISE_QADJ)*/ pow22 = L_mac0_sat(pow22, White_exc16k[k], White_exc16k[k]); /* 2*(Q_bwe_exc-NOISE_QADJ)*/ #else pow22 = L_mac0(pow22, White_exc16k[k], White_exc16k[k]); /* 2*(Q_bwe_exc-NOISE_QADJ)*/ #endif Loading Loading @@ -1980,7 +1982,7 @@ void GenShapedSHBExcitation_fx( tempQ31 = Mult_32_16(pow1, temp); L_tmp = root_a_over_b_fx(tempQ31, Q_pow1, pow22, Q_pow22, &exp); #ifdef BASOP_NOGLOB temp2 = round_fx_o(L_shl_o(L_tmp, exp, &Overflow), &Overflow); /* Q15 whiteEnvShapedExc scale factor */ temp2 = round_fx_sat(L_shl_sat(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #else temp2 = round_fx(L_shl(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #endif Loading @@ -2002,7 +2004,7 @@ void GenShapedSHBExcitation_fx( tempQ31 = Mult_32_16(pow1, temp); L_tmp = root_a_over_b_fx(tempQ31, Q_pow1, pow22, Q_pow22, &exp); #ifdef BASOP_NOGLOB temp2 = round_fx_o(L_shl_o(L_tmp, exp, &Overflow), &Overflow); /* Q15 whiteEnvShapedExc scale factor */ temp2 = round_fx_sat(L_shl_sat(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #else temp2 = round_fx(L_shl(L_tmp, exp)); /* Q15 whiteEnvShapedExc scale factor */ #endif Loading Loading @@ -2695,9 +2697,7 @@ static Word32 non_linearity_scaled_copy( { Word16 i; Word32 L_tmp; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif IF (en_abs) { Loading Loading @@ -2740,7 +2740,7 @@ static Word32 non_linearity_scaled_copy( FOR ( ; i < length; i++ ) { #ifdef BASOP_NOGLOB L_tmp = L_mult_o( input[i], input[i] , &Overflow); /* 2*Q_inp+1 */ L_tmp = L_mult_sat( input[i], input[i]); /* 2*Q_inp+1 */ #else /* BASOP_NOGLOB */ L_tmp = L_mult( input[i], input[i] ); /* 2*Q_inp+1 */ #endif /* BASOP_NOGLOB */ Loading
lib_dec/swb_tbe_dec_fx.c +5 −0 Original line number Diff line number Diff line Loading @@ -1900,8 +1900,13 @@ void swb_tbe_dec_fx( Copy( shaped_shb_excitationTemp, &shaped_shb_excitation[L_SHB_LAHEAD], L_FRAME16k ); /* Q_bwe_exc */ tmp = sub(shl(Q_bwe_exc, 1), 31+16); #ifdef BASOP_NOGLOB prev_pow = L_shl_sat(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ curr_pow = L_shl_sat(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ #else prev_pow = L_shl(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ curr_pow = L_shl(1407374848l/*0.00001f Q47*/, tmp); /* 2*(Q_bwe_exc) */ #endif FOR( i = 0; i < L_SHB_LAHEAD + 10; i++ ) { #ifdef BASOP_NOGLOB Loading