Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,5 +100,6 @@ #define FIX_1762_COMPILER_ISSUE /* FhG: fix compiler issues with W_mac_32_32() + ONE_IN_Q30 */ #define ISSUE_1751_replace_shl_ro /*FhG: replace shl_ro by overflow-free alternatives*/ #define ISSUE_1770_replace_shr_ro /* FhG: replace by non-overflow-alternative - BE */ #endif lib_com/tools_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -3144,7 +3144,11 @@ void add_vec_fx( { FOR( i = 0; i < N; i++ ) { #ifdef ISSUE_1770_replace_shr_ro y[i] = add_o( x1[i], shr_r_sat( x2[i], Qyx2 ), &Overflow ); #else y[i] = add_o( x1[i], shr_ro( x2[i], Qyx2, &Overflow ), &Overflow ); #endif move16(); } } Loading @@ -3152,7 +3156,11 @@ void add_vec_fx( { FOR( i = 0; i < N; i++ ) { #ifdef ISSUE_1770_replace_shr_ro y[i] = add_o( shr_r_sat( x1[i], Qyx1 ), shr_r_sat( x2[i], Qyx2 ), &Overflow ); #else y[i] = add_o( shr_ro( x1[i], Qyx1, &Overflow ), shr_ro( x2[i], Qyx2, &Overflow ), &Overflow ); #endif move16(); } } Loading lib_enc/find_uv_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -32,9 +32,11 @@ static Word16 find_ener_decrease_fx( /* o : maximum Word16 wtmp0, wtmp1; Word32 maxEnr, minEnr; Word16 dE2, exp0, exp1; #ifndef ISSUE_1770_replace_shr_ro #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif dE2 = 0; Loading Loading @@ -76,7 +78,11 @@ static Word16 find_ener_decrease_fx( /* o : maximum exp1 = sub( norm_l( maxEnr ), 1 ); wtmp1 = extract_h( L_shl( maxEnr, exp1 ) ); wtmp1 = div_s( wtmp1, wtmp0 ); #ifdef ISSUE_1770_replace_shr_ro dE2 = shr_r_sat( wtmp1, add( sub( exp1, exp0 ), 15 - 10 ) ); /*Q10*/ #else dE2 = shr_ro( wtmp1, add( sub( exp1, exp0 ), 15 - 10 ), &Overflow ); /*Q10*/ #endif return dE2; } Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -100,5 +100,6 @@ #define FIX_1762_COMPILER_ISSUE /* FhG: fix compiler issues with W_mac_32_32() + ONE_IN_Q30 */ #define ISSUE_1751_replace_shl_ro /*FhG: replace shl_ro by overflow-free alternatives*/ #define ISSUE_1770_replace_shr_ro /* FhG: replace by non-overflow-alternative - BE */ #endif
lib_com/tools_fx.c +8 −0 Original line number Diff line number Diff line Loading @@ -3144,7 +3144,11 @@ void add_vec_fx( { FOR( i = 0; i < N; i++ ) { #ifdef ISSUE_1770_replace_shr_ro y[i] = add_o( x1[i], shr_r_sat( x2[i], Qyx2 ), &Overflow ); #else y[i] = add_o( x1[i], shr_ro( x2[i], Qyx2, &Overflow ), &Overflow ); #endif move16(); } } Loading @@ -3152,7 +3156,11 @@ void add_vec_fx( { FOR( i = 0; i < N; i++ ) { #ifdef ISSUE_1770_replace_shr_ro y[i] = add_o( shr_r_sat( x1[i], Qyx1 ), shr_r_sat( x2[i], Qyx2 ), &Overflow ); #else y[i] = add_o( shr_ro( x1[i], Qyx1, &Overflow ), shr_ro( x2[i], Qyx2, &Overflow ), &Overflow ); #endif move16(); } } Loading
lib_enc/find_uv_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -32,9 +32,11 @@ static Word16 find_ener_decrease_fx( /* o : maximum Word16 wtmp0, wtmp1; Word32 maxEnr, minEnr; Word16 dE2, exp0, exp1; #ifndef ISSUE_1770_replace_shr_ro #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif #endif dE2 = 0; Loading Loading @@ -76,7 +78,11 @@ static Word16 find_ener_decrease_fx( /* o : maximum exp1 = sub( norm_l( maxEnr ), 1 ); wtmp1 = extract_h( L_shl( maxEnr, exp1 ) ); wtmp1 = div_s( wtmp1, wtmp0 ); #ifdef ISSUE_1770_replace_shr_ro dE2 = shr_r_sat( wtmp1, add( sub( exp1, exp0 ), 15 - 10 ) ); /*Q10*/ #else dE2 = shr_ro( wtmp1, add( sub( exp1, exp0 ), 15 - 10 ), &Overflow ); /*Q10*/ #endif return dE2; } Loading