diff --git a/lib_com/fft_fx.c b/lib_com/fft_fx.c index 64a4c8be2d23ba1d0ceb7aeebd581bcf0e542314..bc66409db56839cf0fb6d5e17d8fa391a61c1e0f 100644 --- a/lib_com/fft_fx.c +++ b/lib_com/fft_fx.c @@ -7262,10 +7262,23 @@ Word16 L_norm_arr( Word32 *arr, Word16 size ) Word16 q = 31; move16(); FOR( Word16 i = 0; i < size; i++ ) +#ifndef FIX_1103_OPT_L_NORM_ARR IF( arr[i] != 0 ) { q = s_min( q, norm_l( arr[i] ) ); } +#else + { + Word16 q_tst; + + q_tst = norm_l( arr[i] ); + if ( arr[i] != 0 ) + { + q = s_min( q, q_tst ); + } + } + +#endif return q; } diff --git a/lib_com/options.h b/lib_com/options.h index 2954fb8a461d87db48d1ba9a91ca0f4291c848b3..a60a805d9b69729752c73f6fb0802246ae8d64ec 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -91,4 +91,5 @@ #define FIX_1054_IF_ELSE_CMPLX /* VA: Fix 1054 incorrect counting of complexity when ELSE-IF sequence is encoutered in two functions */ #define FIX_1052_COPY_CMPLX_DISCREPANCY /* VA: modify IF-ELSE statements used in Copy*() functions to avoid dependency on x[] and y[] in RAM */ #define FIX_1049_SHR_RO_COMPLEXITY /* VA: fix for issue 1049: incorrect counting of complexity in the shr_ro() function */ +#define FIX_1103_OPT_L_NORM_ARR /* FhG: Optimize L_norm_arr(), avoid IF */ #endif