Loading lib_com/cng_exc_fx.c +5 −2 Original line number Diff line number Diff line Loading @@ -249,8 +249,11 @@ void CNG_exc_fx( exp = norm_l(*Enew); L_tmp = L_shl(*Enew,exp); /* Q(exp+6) */ L_tmp = Mult_32_16(L_tmp,shl(L_frame,5)); /* Q(exp+6+5-15=exp-4) */ #ifdef BASOP_NOGLOB L_tmp = L_shr_sat( L_tmp, sub( exp, 10 ) ); /* Q6 */ #else L_tmp = L_shr( L_tmp, sub( exp, 10 ) ); /* Q6 */ #endif exp = norm_l(L_tmp); fra = Log2_norm_lc(L_shl(L_tmp,exp)); exp = sub(sub(30,exp),6); Loading lib_enc/cng_enc_fx.c +6 −1 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ void CNG_enc_fx( IF(NE_16(lp_ener_thr_scale, 8)) { L_tmp1 = L_add(L_tmp1, L_shr(hTdCngEnc->lp_ener_fx, 8)); } } /*fenew = dotp( fexc, fexc, pit_max )/pit_max;*/ L_tmp1 = L_sub(L_tmp1, hTdCngEnc->lp_ener_fx); #else L_tmp1 = L_shr(hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr],2); Loading Loading @@ -989,7 +989,12 @@ void CNG_enc_fx( exp = norm_l(hTdCngEnc->Enew_fx); L_tmp = L_shl(hTdCngEnc->Enew_fx,exp); /*Q(exp+6) */ L_tmp = Mult_32_16(L_tmp,shl(st_fx->L_frame_fx,5));/* Q(exp+6+5-15=exp-4) */ #ifdef BASOP_NOGLOB L_tmp = L_shr_sat(L_tmp,sub(exp,10)); /* Q6 */ #else L_tmp = L_shr(L_tmp,sub(exp,10)); /* Q6 */ #endif exp = norm_l(L_tmp); fra = Log2_norm_lc(L_shl(L_tmp,exp)); Loading lib_enc/cor_shif_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -43,7 +43,11 @@ Word16 correlation_shift_fx( /* o : noise dependent voicing correction Q e_Noise = sub(e_Noise, 14); /* Retreive exponent of wtmp */ Ltmp = Mpy_32_16(8, 837, wtmp); /* 2.4492e-4(Q31) * exp(0.1596*totalNoise) */ #ifdef BASOP_NOGLOB Ltmp = L_shl_sat(Ltmp,add(e_Noise, 15)); /* Result in Q31 */ #else Ltmp = L_shl(Ltmp,add(e_Noise, 15)); /* Result in Q31 */ #endif corr_shift_fx = round_fx(L_sub(Ltmp, 47244640)); /* Represents corr_shift in Q15 */ } corr_shift_fx = s_min(corr_shift_fx,16384); /* limit to 0.5 */ Loading lib_enc/detect_transient_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -341,7 +341,11 @@ Word16 detect_transient_fx( { /*blk++; */ blk = add(blk, 1); #ifdef BASOP_NOGLOB E_low_fx = L_add_sat(E_low_fx, Energy_in_fx[i]); #else E_low_fx = L_add(E_low_fx, Energy_in_fx[i]); #endif } exp = norm_s(blk); Loading @@ -357,7 +361,11 @@ Word16 detect_transient_fx( { /*blk++; */ blk = add(blk, 1); #ifdef BASOP_NOGLOB E_high_fx = L_add_sat( E_high_fx, Energy_in_fx[i] ); #else E_high_fx = L_add(E_high_fx, Energy_in_fx[i]); #endif } exp = norm_s(blk); Loading lib_enc/find_tilt_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -241,7 +241,11 @@ void find_tilt_fx( IF (EQ_32(Ltmp, MAX_32)) /* if Overflow: Compute with less precision */ { Ltmp = Mult_32_16(ee[i], 24576); /* 6/8 */ #ifdef BASOP_NOGLOB ee[i] = L_shl_sat( Ltmp, 3 ); #else ee[i] = L_shl(Ltmp, 3); #endif move32(); /* x8 */ } ELSE Loading Loading
lib_com/cng_exc_fx.c +5 −2 Original line number Diff line number Diff line Loading @@ -249,8 +249,11 @@ void CNG_exc_fx( exp = norm_l(*Enew); L_tmp = L_shl(*Enew,exp); /* Q(exp+6) */ L_tmp = Mult_32_16(L_tmp,shl(L_frame,5)); /* Q(exp+6+5-15=exp-4) */ #ifdef BASOP_NOGLOB L_tmp = L_shr_sat( L_tmp, sub( exp, 10 ) ); /* Q6 */ #else L_tmp = L_shr( L_tmp, sub( exp, 10 ) ); /* Q6 */ #endif exp = norm_l(L_tmp); fra = Log2_norm_lc(L_shl(L_tmp,exp)); exp = sub(sub(30,exp),6); Loading
lib_enc/cng_enc_fx.c +6 −1 Original line number Diff line number Diff line Loading @@ -452,7 +452,7 @@ void CNG_enc_fx( IF(NE_16(lp_ener_thr_scale, 8)) { L_tmp1 = L_add(L_tmp1, L_shr(hTdCngEnc->lp_ener_fx, 8)); } } /*fenew = dotp( fexc, fexc, pit_max )/pit_max;*/ L_tmp1 = L_sub(L_tmp1, hTdCngEnc->lp_ener_fx); #else L_tmp1 = L_shr(hTdCngEnc->ho_ener_hist_fx[hTdCngEnc->ho_hist_ptr],2); Loading Loading @@ -989,7 +989,12 @@ void CNG_enc_fx( exp = norm_l(hTdCngEnc->Enew_fx); L_tmp = L_shl(hTdCngEnc->Enew_fx,exp); /*Q(exp+6) */ L_tmp = Mult_32_16(L_tmp,shl(st_fx->L_frame_fx,5));/* Q(exp+6+5-15=exp-4) */ #ifdef BASOP_NOGLOB L_tmp = L_shr_sat(L_tmp,sub(exp,10)); /* Q6 */ #else L_tmp = L_shr(L_tmp,sub(exp,10)); /* Q6 */ #endif exp = norm_l(L_tmp); fra = Log2_norm_lc(L_shl(L_tmp,exp)); Loading
lib_enc/cor_shif_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -43,7 +43,11 @@ Word16 correlation_shift_fx( /* o : noise dependent voicing correction Q e_Noise = sub(e_Noise, 14); /* Retreive exponent of wtmp */ Ltmp = Mpy_32_16(8, 837, wtmp); /* 2.4492e-4(Q31) * exp(0.1596*totalNoise) */ #ifdef BASOP_NOGLOB Ltmp = L_shl_sat(Ltmp,add(e_Noise, 15)); /* Result in Q31 */ #else Ltmp = L_shl(Ltmp,add(e_Noise, 15)); /* Result in Q31 */ #endif corr_shift_fx = round_fx(L_sub(Ltmp, 47244640)); /* Represents corr_shift in Q15 */ } corr_shift_fx = s_min(corr_shift_fx,16384); /* limit to 0.5 */ Loading
lib_enc/detect_transient_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -341,7 +341,11 @@ Word16 detect_transient_fx( { /*blk++; */ blk = add(blk, 1); #ifdef BASOP_NOGLOB E_low_fx = L_add_sat(E_low_fx, Energy_in_fx[i]); #else E_low_fx = L_add(E_low_fx, Energy_in_fx[i]); #endif } exp = norm_s(blk); Loading @@ -357,7 +361,11 @@ Word16 detect_transient_fx( { /*blk++; */ blk = add(blk, 1); #ifdef BASOP_NOGLOB E_high_fx = L_add_sat( E_high_fx, Energy_in_fx[i] ); #else E_high_fx = L_add(E_high_fx, Energy_in_fx[i]); #endif } exp = norm_s(blk); Loading
lib_enc/find_tilt_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -241,7 +241,11 @@ void find_tilt_fx( IF (EQ_32(Ltmp, MAX_32)) /* if Overflow: Compute with less precision */ { Ltmp = Mult_32_16(ee[i], 24576); /* 6/8 */ #ifdef BASOP_NOGLOB ee[i] = L_shl_sat( Ltmp, 3 ); #else ee[i] = L_shl(Ltmp, 3); #endif move32(); /* x8 */ } ELSE Loading