Loading lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ #define ISSUE_1796_replace_shl_o /* FhG: replace shl_ro by overflow-free alternatives - BE*/ #define ISSUE_1799_replace_L_shr_o /* FhG: replace by non-overflow-alternative - BE */ #define ISSUE_1836_replace_overflow_libcom /* FhG: replace overflow operators by non-overflow-alternatives - BE */ #define ISSUE_1866_replace_overflow_libdec /* FhG: BE - Replace BASOPoverflow operators all over the lib_dec module if Overflow result is not used */ Loading lib_com/swb_bwe_com_fx.c +0 −4 Original line number Diff line number Diff line Loading @@ -595,12 +595,8 @@ Word32 calc_tilt_bwe_fx( /* o : Tilt in Q24 tmp1 = mult_ro( *ptr++, 8192 /*0.25 in Q15 */, &Overflow ); /* Divide by 4 */ L_ener = L_mac0_o( L_ener, tmp1, tmp1, &Overflow ); } #ifdef ISSUE_1799_replace_L_shr_o /*Overflow will never happen because exp2 is always positive*/ L_ener = L_shr( L_ener, exp2 ); #else L_ener = L_shr_o( L_ener, exp2, &Overflow ); #endif L_temp = L_add_o( L_ener_tot, L_ener, &Overflow ); IF( Overflow != 0 ) { Loading lib_com/tools_fx.c +0 −4 Original line number Diff line number Diff line Loading @@ -3452,12 +3452,8 @@ Word32 Calc_Energy_Autoscaled( /* o: Result (Energy) #endif L_temp = L_mac0_o( L_temp, temp, temp, &Overflow ); } #ifdef ISSUE_1799_replace_L_shr_o /*Overfloe will never happen because temp2 is always positive*/ L_temp = L_shr( L_temp, temp2 ); #else L_temp = L_shr_o( L_temp, temp2, &Overflow ); #endif /* Here we try the addition just to check if we can sum the energy of the small (8 Iterations) loop with the total energy calculated so far without an overflow. Loading lib_enc/bw_detect_fx.c +0 −4 Original line number Diff line number Diff line Loading @@ -297,11 +297,7 @@ void bw_detect_fx( FOR( i = 0; i < BWD_TOTAL_WIDTH; i++ ) { #ifdef ISSUE_1799_replace_L_shr_o spect[i] = round_fx_o( L_shr_sat( spect32[i], Q_dct ), &Overflow ); #else spect[i] = round_fx_o( L_shr_o( spect32[i], Q_dct, &Overflow ), &Overflow ); #endif move16(); } Q_dct = -2; Loading lib_enc/energy_fx.c +0 −9 Original line number Diff line number Diff line Loading @@ -42,11 +42,6 @@ void est_energy_fx( const Word16 *Nregion_index; Word32 *sb_power = enerBuffer; Word32 Ltmp32 = 0; #ifndef ISSUE_1799_replace_L_shr_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif move32(); SNR_sb_num = SNR_SUB_BAND_NUM[bandwidth - CLDFBVAD_NB_ID]; move16(); Loading Loading @@ -127,11 +122,7 @@ void est_energy_fx( tmpspec_amp = L_shl( sb_power[j], s16MaxCoefNorm ); /* sb_power_Q + s16MaxCoefNorm */ s32CopyPower = L_add( s32CopyPower, tmpspec_amp ); } #ifdef ISSUE_1799_replace_L_shr_o frame_sb_energy[i] = L_shr_sat( s32CopyPower, s16MaxCoefNorm ); /* sb_power_Q */ #else frame_sb_energy[i] = L_shr_o( s32CopyPower, s16MaxCoefNorm, &Overflow ); /* sb_power_Q */ #endif move32(); } Loading Loading
lib_com/options.h +0 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,6 @@ #define ISSUE_1796_replace_shl_o /* FhG: replace shl_ro by overflow-free alternatives - BE*/ #define ISSUE_1799_replace_L_shr_o /* FhG: replace by non-overflow-alternative - BE */ #define ISSUE_1836_replace_overflow_libcom /* FhG: replace overflow operators by non-overflow-alternatives - BE */ #define ISSUE_1866_replace_overflow_libdec /* FhG: BE - Replace BASOPoverflow operators all over the lib_dec module if Overflow result is not used */ Loading
lib_com/swb_bwe_com_fx.c +0 −4 Original line number Diff line number Diff line Loading @@ -595,12 +595,8 @@ Word32 calc_tilt_bwe_fx( /* o : Tilt in Q24 tmp1 = mult_ro( *ptr++, 8192 /*0.25 in Q15 */, &Overflow ); /* Divide by 4 */ L_ener = L_mac0_o( L_ener, tmp1, tmp1, &Overflow ); } #ifdef ISSUE_1799_replace_L_shr_o /*Overflow will never happen because exp2 is always positive*/ L_ener = L_shr( L_ener, exp2 ); #else L_ener = L_shr_o( L_ener, exp2, &Overflow ); #endif L_temp = L_add_o( L_ener_tot, L_ener, &Overflow ); IF( Overflow != 0 ) { Loading
lib_com/tools_fx.c +0 −4 Original line number Diff line number Diff line Loading @@ -3452,12 +3452,8 @@ Word32 Calc_Energy_Autoscaled( /* o: Result (Energy) #endif L_temp = L_mac0_o( L_temp, temp, temp, &Overflow ); } #ifdef ISSUE_1799_replace_L_shr_o /*Overfloe will never happen because temp2 is always positive*/ L_temp = L_shr( L_temp, temp2 ); #else L_temp = L_shr_o( L_temp, temp2, &Overflow ); #endif /* Here we try the addition just to check if we can sum the energy of the small (8 Iterations) loop with the total energy calculated so far without an overflow. Loading
lib_enc/bw_detect_fx.c +0 −4 Original line number Diff line number Diff line Loading @@ -297,11 +297,7 @@ void bw_detect_fx( FOR( i = 0; i < BWD_TOTAL_WIDTH; i++ ) { #ifdef ISSUE_1799_replace_L_shr_o spect[i] = round_fx_o( L_shr_sat( spect32[i], Q_dct ), &Overflow ); #else spect[i] = round_fx_o( L_shr_o( spect32[i], Q_dct, &Overflow ), &Overflow ); #endif move16(); } Q_dct = -2; Loading
lib_enc/energy_fx.c +0 −9 Original line number Diff line number Diff line Loading @@ -42,11 +42,6 @@ void est_energy_fx( const Word16 *Nregion_index; Word32 *sb_power = enerBuffer; Word32 Ltmp32 = 0; #ifndef ISSUE_1799_replace_L_shr_o #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; #endif #endif move32(); SNR_sb_num = SNR_SUB_BAND_NUM[bandwidth - CLDFBVAD_NB_ID]; move16(); Loading Loading @@ -127,11 +122,7 @@ void est_energy_fx( tmpspec_amp = L_shl( sb_power[j], s16MaxCoefNorm ); /* sb_power_Q + s16MaxCoefNorm */ s32CopyPower = L_add( s32CopyPower, tmpspec_amp ); } #ifdef ISSUE_1799_replace_L_shr_o frame_sb_energy[i] = L_shr_sat( s32CopyPower, s16MaxCoefNorm ); /* sb_power_Q */ #else frame_sb_energy[i] = L_shr_o( s32CopyPower, s16MaxCoefNorm, &Overflow ); /* sb_power_Q */ #endif move32(); } Loading