Loading lib_com/swb_bwe_com_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -305,7 +305,11 @@ Word16 WB_BWE_gain_pred_fx( tmp = s_min(s_max(tmp1, 16), 256);/*Q7 */ L_tmp = L_shr( L_mult0(WB_fenv[0], tmp),7);/*Q3 */ /*WB_fenv[0] = saturate(L_tmp); //Q3 */ #ifdef BASOP_NOGLOB WB_fenv[0] = round_fx_sat(L_shl_sat(L_tmp,16)); /*Q3 */ #else WB_fenv[0] = round_fx(L_shl(L_tmp,16)); /*Q3 */ #endif } test(); IF( GT_32(last_core_brate,ACELP_8k00)&>_16(WB_fenv[0],last_wb_bwe_ener)) Loading lib_dec/gain_dec_fx.c +6 −6 Original line number Diff line number Diff line Loading @@ -866,13 +866,9 @@ void lp_gain_updt_fx( ) { Word16 tmp; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #ifdef BASOP_NOGLOB tmp = extract_h(L_shl_o(norm_gain_code, 3, &Overflow)); /*(16+3)-16 -> Q3*/ tmp = extract_h(L_shl_sat(norm_gain_code, 3)); /*(16+3)-16 -> Q3*/ #else tmp = extract_h(L_shl(norm_gain_code,3)); /*(16+3)-16 -> Q3*/ #endif Loading Loading @@ -904,7 +900,7 @@ void lp_gain_updt_fx( *lp_gainp = add( *lp_gainp, mult(13107, gain_pit)); move16(); /*Q14 (0.4 in Q15 = 13107)*/ #ifdef BASOP_NOGLOB *lp_gainc = mac_ro(L_deposit_h(*lp_gainc), 13107, tmp, &Overflow); *lp_gainc = mac_r_sat(L_deposit_h(*lp_gainc), 13107, tmp); #else *lp_gainc = mac_r(L_deposit_h(*lp_gainc), 13107, tmp); #endif Loading Loading @@ -945,7 +941,11 @@ void lp_gain_updt_fx( { *lp_gainp = add(*lp_gainp, mult(10923, gain_pit)); move16(); /*Q14 (5.0/15.0 in Q15 = 10923)*/ #ifdef BASOP_NOGLOB *lp_gainc = mac_r_sat(L_deposit_h(*lp_gainc), 10923, tmp); #else *lp_gainc = mac_r(L_deposit_h(*lp_gainc), 10923, tmp); #endif move16(); /*Q3*/ } } Loading lib_dec/hf_synth_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -793,7 +793,11 @@ void hf_synth_amr_wb_fx( move16(); IF ( *pt2 > 0 ) { #ifdef BASOP_NOGLOB L_tmp = L_mac0_sat(L_tmp, shr(*pt2,1), shr(*pt2,1)); #else L_tmp = L_mac0(L_tmp, shr(*pt2,1), shr(*pt2,1)); #endif } pt1++; pt2++; Loading @@ -820,7 +824,11 @@ void hf_synth_amr_wb_fx( move16(); IF ( *pt2 > 0 ) { #ifdef BASOP_NOGLOB L_tmp = L_mac0_sat(L_tmp, shr(*pt2,1), shr(*pt2,1)); /*2*qdct-2 */ #else L_tmp = L_mac0(L_tmp, shr(*pt2,1), shr(*pt2,1)); /*2*qdct-2 */ #endif } pt1++; pt2++; Loading lib_dec/post_dec.c +6 −6 Original line number Diff line number Diff line Loading @@ -204,9 +204,6 @@ static void bass_pf_1sf_delay( Word16 gain; Word32 tmp, nrg, lp_error, tmp32; Word32 ener2; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif assert(bpf_noise_buf != NULL); Loading Loading @@ -289,7 +286,7 @@ static void bass_pf_1sf_delay( gain = BASOP_Util_Divide3232_Scale(tmp, nrg, &tmp16); BASOP_SATURATE_WARNING_OFF_EVS; #ifdef BASOP_NOGLOB gain = shl_o(gain, tmp16, &Overflow); /* Q15 */ gain = shl_sat(gain, tmp16); /* Q15 */ #else gain = shl(gain, tmp16); /* Q15 */ #endif Loading Loading @@ -320,8 +317,11 @@ static void bass_pf_1sf_delay( { tmp32 = L_msu0(0, gain, syn[i+i_subfr-T]); tmp32 = L_msu0(tmp32, gain, syn[i+i_subfr+T]); #ifdef BASOP_NOGLOB tmp16 = mac_r_sat(tmp32, gain, syn[i+i_subfr]); /* Q0 */ #else tmp16 = mac_r(tmp32, gain, syn[i+i_subfr]); /* Q0 */ #endif lp_error = Mpy_32_16_1(lp_error, 29491/*0.9f Q15*/); lp_error = L_mac(lp_error, tmp16, 0x1000); /* Q13 */ Loading Loading @@ -385,7 +385,7 @@ static void bass_pf_1sf_delay( tmp16 = BASOP_Util_Divide3232_Scale(tmp, tmp32, &st); BASOP_SATURATE_WARNING_OFF_EVS; #ifdef BASOP_NOGLOB tmp16 = shl_o(tmp16, sub(st, 2), &Overflow); /* Q15 */ tmp16 = shl_sat(tmp16, sub(st, 2)); /* Q15 */ #else tmp16 = shl(tmp16, sub(st, 2)); /* Q15 */ #endif Loading Loading
lib_com/swb_bwe_com_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -305,7 +305,11 @@ Word16 WB_BWE_gain_pred_fx( tmp = s_min(s_max(tmp1, 16), 256);/*Q7 */ L_tmp = L_shr( L_mult0(WB_fenv[0], tmp),7);/*Q3 */ /*WB_fenv[0] = saturate(L_tmp); //Q3 */ #ifdef BASOP_NOGLOB WB_fenv[0] = round_fx_sat(L_shl_sat(L_tmp,16)); /*Q3 */ #else WB_fenv[0] = round_fx(L_shl(L_tmp,16)); /*Q3 */ #endif } test(); IF( GT_32(last_core_brate,ACELP_8k00)&>_16(WB_fenv[0],last_wb_bwe_ener)) Loading
lib_dec/gain_dec_fx.c +6 −6 Original line number Diff line number Diff line Loading @@ -866,13 +866,9 @@ void lp_gain_updt_fx( ) { Word16 tmp; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #ifdef BASOP_NOGLOB tmp = extract_h(L_shl_o(norm_gain_code, 3, &Overflow)); /*(16+3)-16 -> Q3*/ tmp = extract_h(L_shl_sat(norm_gain_code, 3)); /*(16+3)-16 -> Q3*/ #else tmp = extract_h(L_shl(norm_gain_code,3)); /*(16+3)-16 -> Q3*/ #endif Loading Loading @@ -904,7 +900,7 @@ void lp_gain_updt_fx( *lp_gainp = add( *lp_gainp, mult(13107, gain_pit)); move16(); /*Q14 (0.4 in Q15 = 13107)*/ #ifdef BASOP_NOGLOB *lp_gainc = mac_ro(L_deposit_h(*lp_gainc), 13107, tmp, &Overflow); *lp_gainc = mac_r_sat(L_deposit_h(*lp_gainc), 13107, tmp); #else *lp_gainc = mac_r(L_deposit_h(*lp_gainc), 13107, tmp); #endif Loading Loading @@ -945,7 +941,11 @@ void lp_gain_updt_fx( { *lp_gainp = add(*lp_gainp, mult(10923, gain_pit)); move16(); /*Q14 (5.0/15.0 in Q15 = 10923)*/ #ifdef BASOP_NOGLOB *lp_gainc = mac_r_sat(L_deposit_h(*lp_gainc), 10923, tmp); #else *lp_gainc = mac_r(L_deposit_h(*lp_gainc), 10923, tmp); #endif move16(); /*Q3*/ } } Loading
lib_dec/hf_synth_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -793,7 +793,11 @@ void hf_synth_amr_wb_fx( move16(); IF ( *pt2 > 0 ) { #ifdef BASOP_NOGLOB L_tmp = L_mac0_sat(L_tmp, shr(*pt2,1), shr(*pt2,1)); #else L_tmp = L_mac0(L_tmp, shr(*pt2,1), shr(*pt2,1)); #endif } pt1++; pt2++; Loading @@ -820,7 +824,11 @@ void hf_synth_amr_wb_fx( move16(); IF ( *pt2 > 0 ) { #ifdef BASOP_NOGLOB L_tmp = L_mac0_sat(L_tmp, shr(*pt2,1), shr(*pt2,1)); /*2*qdct-2 */ #else L_tmp = L_mac0(L_tmp, shr(*pt2,1), shr(*pt2,1)); /*2*qdct-2 */ #endif } pt1++; pt2++; Loading
lib_dec/post_dec.c +6 −6 Original line number Diff line number Diff line Loading @@ -204,9 +204,6 @@ static void bass_pf_1sf_delay( Word16 gain; Word32 tmp, nrg, lp_error, tmp32; Word32 ener2; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif assert(bpf_noise_buf != NULL); Loading Loading @@ -289,7 +286,7 @@ static void bass_pf_1sf_delay( gain = BASOP_Util_Divide3232_Scale(tmp, nrg, &tmp16); BASOP_SATURATE_WARNING_OFF_EVS; #ifdef BASOP_NOGLOB gain = shl_o(gain, tmp16, &Overflow); /* Q15 */ gain = shl_sat(gain, tmp16); /* Q15 */ #else gain = shl(gain, tmp16); /* Q15 */ #endif Loading Loading @@ -320,8 +317,11 @@ static void bass_pf_1sf_delay( { tmp32 = L_msu0(0, gain, syn[i+i_subfr-T]); tmp32 = L_msu0(tmp32, gain, syn[i+i_subfr+T]); #ifdef BASOP_NOGLOB tmp16 = mac_r_sat(tmp32, gain, syn[i+i_subfr]); /* Q0 */ #else tmp16 = mac_r(tmp32, gain, syn[i+i_subfr]); /* Q0 */ #endif lp_error = Mpy_32_16_1(lp_error, 29491/*0.9f Q15*/); lp_error = L_mac(lp_error, tmp16, 0x1000); /* Q13 */ Loading Loading @@ -385,7 +385,7 @@ static void bass_pf_1sf_delay( tmp16 = BASOP_Util_Divide3232_Scale(tmp, tmp32, &st); BASOP_SATURATE_WARNING_OFF_EVS; #ifdef BASOP_NOGLOB tmp16 = shl_o(tmp16, sub(st, 2), &Overflow); /* Q15 */ tmp16 = shl_sat(tmp16, sub(st, 2)); /* Q15 */ #else tmp16 = shl(tmp16, sub(st, 2)); /* Q15 */ #endif Loading