Loading lib_com/weight_a_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -100,10 +100,12 @@ void weight_a_fx( Word16 i, fac; Word32 Amax; Word16 shift; #ifndef ISSUE_1836_replace_overflow_libcom__remnant #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow; Overflow = 0; move32(); #endif #endif fac = gamma; /* Q15 */ Loading @@ -122,7 +124,11 @@ void weight_a_fx( move16(); FOR( i = 1; i < m; i++ ) { #ifdef ISSUE_1836_replace_overflow_libcom__remnant ap[i] = round_fx_sat( L_shl( L_mult0( a[i], fac ), shift ) ); /* Q11 + shift */ //??sat #else ap[i] = round_fx_o( L_shl( L_mult0( a[i], fac ), shift ), &Overflow ); /* Q11 + shift */ #endif move16(); fac = mult_r( fac, gamma ); /* Q15 */ } Loading lib_com/wi_fx.c +377 −41 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_com/window_fx.c +9 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ #include "rom_basop_util.h" #include "prot_fx.h" void ham_cos_window( Word16 *fh, /* o: 0Q15 */ const Word16 n1, /* i: */ Loading @@ -29,10 +28,12 @@ void ham_cos_window( { Word16 i; Word32 cte, cc; #ifndef ISSUE_1836_replace_overflow_libcom__remnant #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif assert( n1 >= 102 ); /* if n1 is too low -> overflow in div_l */ Loading @@ -46,7 +47,11 @@ void ham_cos_window( { /* fh_f[i] = 0.54f - 0.46f * (Float32)cos(cc); */ BASOP_SATURATE_WARNING_OFF_EVS #ifdef ISSUE_1836_replace_overflow_libcom__remnant fh[i] = sub_sat( P54_0Q15, mult_r( getCosWord16( round_fx_sat( L_shl_sat( cc, 9 ) ) ), P92_0Q15 ) ); /*0Q15*/ //??sat //??sat //??sat #else fh[i] = sub_o( P54_0Q15, mult_r( getCosWord16( round_fx_o( L_shl_o( cc, 9, &Overflow ), &Overflow ) ), P92_0Q15 ), &Overflow ); /*0Q15*/ #endif move16(); BASOP_SATURATE_WARNING_ON_EVS cc = L_add( cc, cte ); /*0Q15*/ Loading @@ -63,8 +68,8 @@ void ham_cos_window( FOR( i = n1; i < n1 + n2; i++ ) { /* fh_f[i] = (Float32)cos(cc); */ #ifdef ISSUE_1796_replace_shl_o fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ #ifdef ISSUE_1836_replace_overflow_libcom__remnant fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ //??sat #else fh[i] = shl_o( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1, &Overflow ); /*0Q15*/ #endif Loading Loading
lib_com/weight_a_fx.c +6 −0 Original line number Diff line number Diff line Loading @@ -100,10 +100,12 @@ void weight_a_fx( Word16 i, fac; Word32 Amax; Word16 shift; #ifndef ISSUE_1836_replace_overflow_libcom__remnant #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow; Overflow = 0; move32(); #endif #endif fac = gamma; /* Q15 */ Loading @@ -122,7 +124,11 @@ void weight_a_fx( move16(); FOR( i = 1; i < m; i++ ) { #ifdef ISSUE_1836_replace_overflow_libcom__remnant ap[i] = round_fx_sat( L_shl( L_mult0( a[i], fac ), shift ) ); /* Q11 + shift */ //??sat #else ap[i] = round_fx_o( L_shl( L_mult0( a[i], fac ), shift ), &Overflow ); /* Q11 + shift */ #endif move16(); fac = mult_r( fac, gamma ); /* Q15 */ } Loading
lib_com/window_fx.c +9 −4 Original line number Diff line number Diff line Loading @@ -20,7 +20,6 @@ #include "rom_basop_util.h" #include "prot_fx.h" void ham_cos_window( Word16 *fh, /* o: 0Q15 */ const Word16 n1, /* i: */ Loading @@ -29,10 +28,12 @@ void ham_cos_window( { Word16 i; Word32 cte, cc; #ifndef ISSUE_1836_replace_overflow_libcom__remnant #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move16(); #endif #endif assert( n1 >= 102 ); /* if n1 is too low -> overflow in div_l */ Loading @@ -46,7 +47,11 @@ void ham_cos_window( { /* fh_f[i] = 0.54f - 0.46f * (Float32)cos(cc); */ BASOP_SATURATE_WARNING_OFF_EVS #ifdef ISSUE_1836_replace_overflow_libcom__remnant fh[i] = sub_sat( P54_0Q15, mult_r( getCosWord16( round_fx_sat( L_shl_sat( cc, 9 ) ) ), P92_0Q15 ) ); /*0Q15*/ //??sat //??sat //??sat #else fh[i] = sub_o( P54_0Q15, mult_r( getCosWord16( round_fx_o( L_shl_o( cc, 9, &Overflow ), &Overflow ) ), P92_0Q15 ), &Overflow ); /*0Q15*/ #endif move16(); BASOP_SATURATE_WARNING_ON_EVS cc = L_add( cc, cte ); /*0Q15*/ Loading @@ -63,8 +68,8 @@ void ham_cos_window( FOR( i = n1; i < n1 + n2; i++ ) { /* fh_f[i] = (Float32)cos(cc); */ #ifdef ISSUE_1796_replace_shl_o fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ #ifdef ISSUE_1836_replace_overflow_libcom__remnant fh[i] = shl_sat( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1 ); /*0Q15*/ //??sat #else fh[i] = shl_o( getCosWord16( round_fx( L_shl( cc, 10 ) ) ), 1, &Overflow ); /*0Q15*/ #endif Loading