Loading lib_com/re8_util_fx.c +5 −2 Original line number Diff line number Diff line Loading @@ -276,8 +276,11 @@ static Word16 re8_identify_absolute_leader_fx( /* o : integer indicating if y i { Ls = L_mac( Ls, y[i], y[i]); } #ifdef BASOP_NOGLOB s = extract_h( L_shl_sat( Ls, 16 - ( 3 + 1 ) ) ); /* s can saturate here */ #else s = extract_h( L_shl( Ls, 16 - ( 3 + 1 ) ) ); /* s can saturate here */ #endif /*-----------------------------------------------------------------------* * compute the index 0 <= ka <= NB_LEADER+1 which identifies an absolute leader of Q0, Q2, Q3 or Q4 * Loading lib_enc/enc_higher_acelp_fx.c +7 −2 Original line number Diff line number Diff line Loading @@ -148,11 +148,12 @@ void transf_cdbk_enc_fx( { /*fcorr += fx_tran[i]*(float)ix_norm[i];*/ /*fener += (float)ix_norm[i]*(float)ix_norm[i];*/ stmp = shl(x_norm[i],Q_AVQ_OUT ); #ifdef BASOP_NOGLOB stmp = shl_sat( x_norm[i], Q_AVQ_OUT ); L_corr = L_mac_sat( L_corr, x_tran[i], stmp ); L_ener = L_mac_sat(L_ener, stmp, stmp); #else stmp = shl( x_norm[i], Q_AVQ_OUT ); L_corr = L_mac( L_corr, x_tran[i], stmp ); L_ener = L_mac(L_ener, stmp, stmp); #endif Loading Loading @@ -185,7 +186,11 @@ void transf_cdbk_enc_fx( { Ltmp1 = L_max(gain_code,1); e_den = norm_l(Ltmp1); #ifdef BASOP_NOGLOB m_den = extract_h( L_shl_sat( Ltmp1, e_den ) ); #else m_den = extract_h( L_shl( Ltmp1, e_den ) ); #endif /* ensure m_corr < m_den */ test(); IF( m_corr>0 && m_den >0) Loading lib_enc/gain_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -767,7 +767,11 @@ void gain_enc_SQ_fx( L_div = Mult_32_16(L_frac_num,tmp); /*Q(30-exp)*/ exp_div = sub(exp_num,exp_den); #ifdef BASOP_NOGLOB *gain_code = L_shl_sat( L_div, s_max( -31, sub( add( exp, exp_div ), 14 ) ) ); #else *gain_code = L_shl( L_div, s_max( -31, sub( add( exp, exp_div ), 14 ) ) ); #endif move32();/*Q16*/ *gain_pit = s_max(G_PITCH_MIN_Q14,s_min(*gain_pit,G_PITCH_MAX_Q14)); Loading lib_enc/q_gain2p_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -587,7 +587,11 @@ Word16 gain_enc_uv_fx( /* o : quantization pitch index } #ifdef BASOP_NOGLOB *gain_code = L_shl_sat( Mpy_32_16_1( *past_gcode, *gain_inov ), 3 ); #else *gain_code = L_shl( Mpy_32_16_1( *past_gcode, *gain_inov ), 3 ); #endif move32(); *gain_pit = 0; Loading lib_enc/swb_tbe_enc_fx.c +28 −7 Original line number Diff line number Diff line Loading @@ -2404,11 +2404,17 @@ static void EstimateSHBGainShape_fx( FOR( k = 0; k < length; k++ ) { sig = mult_r( oriSHB[j + k], subwin[k + 1] ); /* Q_oriSHB */ #ifdef BASOP_NOGLOB oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #else oriNrg = L_mac0( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #endif sig = mult_r( synSHB[j + k], subwin[k + 1] ); /* Q_synSHB */ #ifdef BASOP_NOGLOB synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_synSHB */ #else synNrg = L_mac0( synNrg, sig, sig ); /* 2* Q_synSHB */ #endif } } IF( i == NUM_SHB_SUBFR / 2 - 1 ) Loading @@ -2417,10 +2423,18 @@ static void EstimateSHBGainShape_fx( FOR( ; k < length_tmp; k++ ) { sig = mult_r( oriSHB[j + k], subwin[3 * length - 2 * k - 2] ); /* Q_oriSHB */ #ifdef BASOP_NOGLOB oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #else oriNrg = L_mac0( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #endif sig = mult_r( synSHB[j + k], subwin[3 * length - 2 * k - 2] ); /* Q_synSHB */ #ifdef BASOP_NOGLOB synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_synSHB */ #else synNrg = L_mac0( synNrg, sig, sig ); /* 2* Q_synSHB */ #endif } } ELSE Loading @@ -2428,10 +2442,17 @@ static void EstimateSHBGainShape_fx( FOR(; k < length2; k++ ) { sig = mult_r( oriSHB[j + k], subwin[2 * length - k - 1] ); /* Q_oriSHB */ #ifdef BASOP_NOGLOB oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #else oriNrg = L_mac0( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #endif sig = mult_r( synSHB[j + k], subwin[2 * length - k - 1] ); /* Q_synSHB */ #ifdef BASOP_NOGLOB synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_synSHB */ #else synNrg = L_mac0( synNrg, sig, sig ); /* 2* Q_synSHB */ #endif } } Loading Loading
lib_com/re8_util_fx.c +5 −2 Original line number Diff line number Diff line Loading @@ -276,8 +276,11 @@ static Word16 re8_identify_absolute_leader_fx( /* o : integer indicating if y i { Ls = L_mac( Ls, y[i], y[i]); } #ifdef BASOP_NOGLOB s = extract_h( L_shl_sat( Ls, 16 - ( 3 + 1 ) ) ); /* s can saturate here */ #else s = extract_h( L_shl( Ls, 16 - ( 3 + 1 ) ) ); /* s can saturate here */ #endif /*-----------------------------------------------------------------------* * compute the index 0 <= ka <= NB_LEADER+1 which identifies an absolute leader of Q0, Q2, Q3 or Q4 * Loading
lib_enc/enc_higher_acelp_fx.c +7 −2 Original line number Diff line number Diff line Loading @@ -148,11 +148,12 @@ void transf_cdbk_enc_fx( { /*fcorr += fx_tran[i]*(float)ix_norm[i];*/ /*fener += (float)ix_norm[i]*(float)ix_norm[i];*/ stmp = shl(x_norm[i],Q_AVQ_OUT ); #ifdef BASOP_NOGLOB stmp = shl_sat( x_norm[i], Q_AVQ_OUT ); L_corr = L_mac_sat( L_corr, x_tran[i], stmp ); L_ener = L_mac_sat(L_ener, stmp, stmp); #else stmp = shl( x_norm[i], Q_AVQ_OUT ); L_corr = L_mac( L_corr, x_tran[i], stmp ); L_ener = L_mac(L_ener, stmp, stmp); #endif Loading Loading @@ -185,7 +186,11 @@ void transf_cdbk_enc_fx( { Ltmp1 = L_max(gain_code,1); e_den = norm_l(Ltmp1); #ifdef BASOP_NOGLOB m_den = extract_h( L_shl_sat( Ltmp1, e_den ) ); #else m_den = extract_h( L_shl( Ltmp1, e_den ) ); #endif /* ensure m_corr < m_den */ test(); IF( m_corr>0 && m_den >0) Loading
lib_enc/gain_enc_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -767,7 +767,11 @@ void gain_enc_SQ_fx( L_div = Mult_32_16(L_frac_num,tmp); /*Q(30-exp)*/ exp_div = sub(exp_num,exp_den); #ifdef BASOP_NOGLOB *gain_code = L_shl_sat( L_div, s_max( -31, sub( add( exp, exp_div ), 14 ) ) ); #else *gain_code = L_shl( L_div, s_max( -31, sub( add( exp, exp_div ), 14 ) ) ); #endif move32();/*Q16*/ *gain_pit = s_max(G_PITCH_MIN_Q14,s_min(*gain_pit,G_PITCH_MAX_Q14)); Loading
lib_enc/q_gain2p_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -587,7 +587,11 @@ Word16 gain_enc_uv_fx( /* o : quantization pitch index } #ifdef BASOP_NOGLOB *gain_code = L_shl_sat( Mpy_32_16_1( *past_gcode, *gain_inov ), 3 ); #else *gain_code = L_shl( Mpy_32_16_1( *past_gcode, *gain_inov ), 3 ); #endif move32(); *gain_pit = 0; Loading
lib_enc/swb_tbe_enc_fx.c +28 −7 Original line number Diff line number Diff line Loading @@ -2404,11 +2404,17 @@ static void EstimateSHBGainShape_fx( FOR( k = 0; k < length; k++ ) { sig = mult_r( oriSHB[j + k], subwin[k + 1] ); /* Q_oriSHB */ #ifdef BASOP_NOGLOB oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #else oriNrg = L_mac0( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #endif sig = mult_r( synSHB[j + k], subwin[k + 1] ); /* Q_synSHB */ #ifdef BASOP_NOGLOB synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_synSHB */ #else synNrg = L_mac0( synNrg, sig, sig ); /* 2* Q_synSHB */ #endif } } IF( i == NUM_SHB_SUBFR / 2 - 1 ) Loading @@ -2417,10 +2423,18 @@ static void EstimateSHBGainShape_fx( FOR( ; k < length_tmp; k++ ) { sig = mult_r( oriSHB[j + k], subwin[3 * length - 2 * k - 2] ); /* Q_oriSHB */ #ifdef BASOP_NOGLOB oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #else oriNrg = L_mac0( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #endif sig = mult_r( synSHB[j + k], subwin[3 * length - 2 * k - 2] ); /* Q_synSHB */ #ifdef BASOP_NOGLOB synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_synSHB */ #else synNrg = L_mac0( synNrg, sig, sig ); /* 2* Q_synSHB */ #endif } } ELSE Loading @@ -2428,10 +2442,17 @@ static void EstimateSHBGainShape_fx( FOR(; k < length2; k++ ) { sig = mult_r( oriSHB[j + k], subwin[2 * length - k - 1] ); /* Q_oriSHB */ #ifdef BASOP_NOGLOB oriNrg = L_mac0_sat( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #else oriNrg = L_mac0( oriNrg, sig, sig ); /* 2* Q_oriSHB */ #endif sig = mult_r( synSHB[j + k], subwin[2 * length - k - 1] ); /* Q_synSHB */ #ifdef BASOP_NOGLOB synNrg = L_mac0_sat( synNrg, sig, sig ); /* 2* Q_synSHB */ #else synNrg = L_mac0( synNrg, sig, sig ); /* 2* Q_synSHB */ #endif } } Loading