Loading lib_enc/swb_bwe_enc_hr_fx.c +6 −3 Original line number Diff line number Diff line Loading @@ -117,9 +117,11 @@ void swb_bwe_enc_hr_fx( #else Word32 L_t_audio_tmp_fx[L_FRAME48k]; #endif #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif FD_BWE_ENC_HANDLE hBWE_FD = st_fx->hBWE_FD; BSTR_ENC_HANDLE hBstr = st_fx->hBstr; Loading Loading @@ -767,12 +769,13 @@ void swb_bwe_enc_hr_fx( FOR( i = 0; i < Nsv2 * WIDTH_BAND; i++ ) { L_tmp = L_mult( temp, t_audio_fx[i] ); #ifdef ISSUE_1799_replace_L_shr_o L_tmp = L_shr_sat( L_tmp, temp2 ); #ifdef ISSUE_1867_replace_overflow_libenc L_tmp = L_shr_sat( L_tmp, temp2 ); //??sat t_audio_fx[i] = round_fx_sat( L_tmp ); //??sat #else L_tmp = L_shr_o( L_tmp, temp2, &Overflow ); #endif t_audio_fx[i] = round_fx_o( L_tmp, &Overflow ); #endif move16(); } Loading lib_enc/swb_bwe_enc_lr_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -698,9 +698,11 @@ static void gethar_noisegn_fx( Word16 temp_lo, temp_hi; Word16 Qg; #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif /*Generate HF noise*/ genhf_noise_fx( noise_flr_fx, Qss, L_xSynth_har, QsL, sspectra_fx, bands, har_bands, har_freq_est2, pos_max_hfe2, pul_res_fx, pk_sf_fx, fLenLow, Loading Loading @@ -783,8 +785,13 @@ static void gethar_noisegn_fx( L_temp = L_Comp( exp, frac ); L_temp = Mpy_32_16_1( L_temp, 19728 ); /* log(2)/log(10)=.30102999566398119521 = 19728.3(Q16) Q(0+16+1)=Q17 */ #ifdef ISSUE_1867_replace_overflow_libenc L_temp = L_shl_sat( L_temp, 13 ); /* Q17+13=30 30-16=14 */ //??sat g_fx = round_fx_sat( L_temp ); //??sat #else L_temp = L_shl_o( L_temp, 13, &Overflow ); /* Q17+13=30 30-16=14 */ g_fx = round_fx_o( L_temp, &Overflow ); #endif } gqlevs_fx = 4; Loading lib_enc/swb_pre_proc_fx.c +24 −0 Original line number Diff line number Diff line Loading @@ -523,9 +523,11 @@ void swb_pre_proc_fx( Word16 ts, nB, uB; /* Highband energy computation using CLDFB */ Word32 CldfbHB_ener; #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif Word16 realQ_neg1, imagQ_neg1, exp, Cldfbtemp1; TD_BWE_ENC_HANDLE hBWE_TD = st_fx->hBWE_TD; Loading Loading @@ -703,8 +705,13 @@ void swb_pre_proc_fx( realQ_neg1 = extract_l( L_shr( realBufferFlipped[ts][nB], 31 - ( 15 + cldfbScale->hb_scale ) + 1 ) ); imagQ_neg1 = extract_l( L_shr( imagBufferFlipped[ts][nB], 31 - ( 15 + cldfbScale->hb_scale ) + 1 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc CldfbHB_ener = L_mac0_sat( CldfbHB_ener, realQ_neg1, realQ_neg1 ); //??sat CldfbHB_ener = L_mac0_sat( CldfbHB_ener, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else CldfbHB_ener = L_mac0_o( CldfbHB_ener, realQ_neg1, realQ_neg1, &Overflow ); CldfbHB_ener = L_mac0_o( CldfbHB_ener, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } Loading Loading @@ -1100,9 +1107,11 @@ void swb_pre_proc_ivas_fx( { Word32 CldfbHB_fx = 0; // fixed counterpart Word16 CldfbHB_fx_e = 0; // fixed counterpart #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif Word16 realQ_neg1, imagQ_neg1, exp = 0, Cldfbtemp1; move32(); Loading Loading @@ -1211,8 +1220,13 @@ void swb_pre_proc_ivas_fx( realQ_neg1 = extract_l( L_shr( realBufferFlipped[ts][nB], 16 ) ); imagQ_neg1 = extract_l( L_shr( imagBufferFlipped[ts][nB], 16 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc CldfbHB_fx = L_mac0_sat( CldfbHB_fx, realQ_neg1, realQ_neg1 ); //??sat CldfbHB_fx = L_mac0_sat( CldfbHB_fx, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else CldfbHB_fx = L_mac0_o( CldfbHB_fx, realQ_neg1, realQ_neg1, &Overflow ); CldfbHB_fx = L_mac0_o( CldfbHB_fx, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } CldfbHB_fx_e = sub( Q31, shl( sub( q_reImBuffer, Q16 ), 1 ) ); Loading Loading @@ -1246,8 +1260,13 @@ void swb_pre_proc_ivas_fx( { realQ_neg1 = extract_l( L_shr( realBuffer[ts][nB], 16 ) ); imagQ_neg1 = extract_l( L_shr( imagBuffer[ts][nB], 16 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc icbweRefEner_fx = L_mac0_sat( icbweRefEner_fx, realQ_neg1, realQ_neg1 ); //??sat icbweRefEner_fx = L_mac0_sat( icbweRefEner_fx, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else icbweRefEner_fx = L_mac0_o( icbweRefEner_fx, realQ_neg1, realQ_neg1, &Overflow ); icbweRefEner_fx = L_mac0_o( icbweRefEner_fx, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } exp_icbweRefEner_fx = sub( Q31, shl( sub( q_reImBuffer, Q16 ), 1 ) ); Loading @@ -1266,8 +1285,13 @@ void swb_pre_proc_ivas_fx( realQ_neg1 = extract_l( L_shr( realBuffer[ts][nB], 16 ) ); imagQ_neg1 = extract_l( L_shr( imagBuffer[ts][nB], 16 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc lbEner = L_mac0_sat( lbEner, realQ_neg1, realQ_neg1 ); //??sat lbEner = L_mac0_sat( lbEner, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else lbEner = L_mac0_o( lbEner, realQ_neg1, realQ_neg1, &Overflow ); lbEner = L_mac0_o( lbEner, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } exp_lbEner = sub( Q31, shl( sub( q_reImBuffer, Q16 ), 1 ) ); Loading lib_enc/swb_tbe_enc_fx.c +197 −27 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
lib_enc/swb_bwe_enc_hr_fx.c +6 −3 Original line number Diff line number Diff line Loading @@ -117,9 +117,11 @@ void swb_bwe_enc_hr_fx( #else Word32 L_t_audio_tmp_fx[L_FRAME48k]; #endif #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif FD_BWE_ENC_HANDLE hBWE_FD = st_fx->hBWE_FD; BSTR_ENC_HANDLE hBstr = st_fx->hBstr; Loading Loading @@ -767,12 +769,13 @@ void swb_bwe_enc_hr_fx( FOR( i = 0; i < Nsv2 * WIDTH_BAND; i++ ) { L_tmp = L_mult( temp, t_audio_fx[i] ); #ifdef ISSUE_1799_replace_L_shr_o L_tmp = L_shr_sat( L_tmp, temp2 ); #ifdef ISSUE_1867_replace_overflow_libenc L_tmp = L_shr_sat( L_tmp, temp2 ); //??sat t_audio_fx[i] = round_fx_sat( L_tmp ); //??sat #else L_tmp = L_shr_o( L_tmp, temp2, &Overflow ); #endif t_audio_fx[i] = round_fx_o( L_tmp, &Overflow ); #endif move16(); } Loading
lib_enc/swb_bwe_enc_lr_fx.c +7 −0 Original line number Diff line number Diff line Loading @@ -698,9 +698,11 @@ static void gethar_noisegn_fx( Word16 temp_lo, temp_hi; Word16 Qg; #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif /*Generate HF noise*/ genhf_noise_fx( noise_flr_fx, Qss, L_xSynth_har, QsL, sspectra_fx, bands, har_bands, har_freq_est2, pos_max_hfe2, pul_res_fx, pk_sf_fx, fLenLow, Loading Loading @@ -783,8 +785,13 @@ static void gethar_noisegn_fx( L_temp = L_Comp( exp, frac ); L_temp = Mpy_32_16_1( L_temp, 19728 ); /* log(2)/log(10)=.30102999566398119521 = 19728.3(Q16) Q(0+16+1)=Q17 */ #ifdef ISSUE_1867_replace_overflow_libenc L_temp = L_shl_sat( L_temp, 13 ); /* Q17+13=30 30-16=14 */ //??sat g_fx = round_fx_sat( L_temp ); //??sat #else L_temp = L_shl_o( L_temp, 13, &Overflow ); /* Q17+13=30 30-16=14 */ g_fx = round_fx_o( L_temp, &Overflow ); #endif } gqlevs_fx = 4; Loading
lib_enc/swb_pre_proc_fx.c +24 −0 Original line number Diff line number Diff line Loading @@ -523,9 +523,11 @@ void swb_pre_proc_fx( Word16 ts, nB, uB; /* Highband energy computation using CLDFB */ Word32 CldfbHB_ener; #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif Word16 realQ_neg1, imagQ_neg1, exp, Cldfbtemp1; TD_BWE_ENC_HANDLE hBWE_TD = st_fx->hBWE_TD; Loading Loading @@ -703,8 +705,13 @@ void swb_pre_proc_fx( realQ_neg1 = extract_l( L_shr( realBufferFlipped[ts][nB], 31 - ( 15 + cldfbScale->hb_scale ) + 1 ) ); imagQ_neg1 = extract_l( L_shr( imagBufferFlipped[ts][nB], 31 - ( 15 + cldfbScale->hb_scale ) + 1 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc CldfbHB_ener = L_mac0_sat( CldfbHB_ener, realQ_neg1, realQ_neg1 ); //??sat CldfbHB_ener = L_mac0_sat( CldfbHB_ener, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else CldfbHB_ener = L_mac0_o( CldfbHB_ener, realQ_neg1, realQ_neg1, &Overflow ); CldfbHB_ener = L_mac0_o( CldfbHB_ener, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } Loading Loading @@ -1100,9 +1107,11 @@ void swb_pre_proc_ivas_fx( { Word32 CldfbHB_fx = 0; // fixed counterpart Word16 CldfbHB_fx_e = 0; // fixed counterpart #ifndef ISSUE_1867_replace_overflow_libenc #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif Word16 realQ_neg1, imagQ_neg1, exp = 0, Cldfbtemp1; move32(); Loading Loading @@ -1211,8 +1220,13 @@ void swb_pre_proc_ivas_fx( realQ_neg1 = extract_l( L_shr( realBufferFlipped[ts][nB], 16 ) ); imagQ_neg1 = extract_l( L_shr( imagBufferFlipped[ts][nB], 16 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc CldfbHB_fx = L_mac0_sat( CldfbHB_fx, realQ_neg1, realQ_neg1 ); //??sat CldfbHB_fx = L_mac0_sat( CldfbHB_fx, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else CldfbHB_fx = L_mac0_o( CldfbHB_fx, realQ_neg1, realQ_neg1, &Overflow ); CldfbHB_fx = L_mac0_o( CldfbHB_fx, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } CldfbHB_fx_e = sub( Q31, shl( sub( q_reImBuffer, Q16 ), 1 ) ); Loading Loading @@ -1246,8 +1260,13 @@ void swb_pre_proc_ivas_fx( { realQ_neg1 = extract_l( L_shr( realBuffer[ts][nB], 16 ) ); imagQ_neg1 = extract_l( L_shr( imagBuffer[ts][nB], 16 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc icbweRefEner_fx = L_mac0_sat( icbweRefEner_fx, realQ_neg1, realQ_neg1 ); //??sat icbweRefEner_fx = L_mac0_sat( icbweRefEner_fx, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else icbweRefEner_fx = L_mac0_o( icbweRefEner_fx, realQ_neg1, realQ_neg1, &Overflow ); icbweRefEner_fx = L_mac0_o( icbweRefEner_fx, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } exp_icbweRefEner_fx = sub( Q31, shl( sub( q_reImBuffer, Q16 ), 1 ) ); Loading @@ -1266,8 +1285,13 @@ void swb_pre_proc_ivas_fx( realQ_neg1 = extract_l( L_shr( realBuffer[ts][nB], 16 ) ); imagQ_neg1 = extract_l( L_shr( imagBuffer[ts][nB], 16 ) ); /* Q(-1), headroom needed */ #ifdef ISSUE_1867_replace_overflow_libenc lbEner = L_mac0_sat( lbEner, realQ_neg1, realQ_neg1 ); //??sat lbEner = L_mac0_sat( lbEner, imagQ_neg1, imagQ_neg1 ); /* Q(-2) */ //??sat #else lbEner = L_mac0_o( lbEner, realQ_neg1, realQ_neg1, &Overflow ); lbEner = L_mac0_o( lbEner, imagQ_neg1, imagQ_neg1, &Overflow ); /* Q(-2) */ #endif } } exp_lbEner = sub( Q31, shl( sub( q_reImBuffer, Q16 ), 1 ) ); Loading
lib_enc/swb_tbe_enc_fx.c +197 −27 File changed.Preview size limit exceeded, changes collapsed. Show changes