diff --git a/lib_com/options.h b/lib_com/options.h index 686288b80b09f4fdbd9d0e601e28481015bede1e..c644d36d0bf7f788269e2303a4363aba84430c76 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,4 +95,5 @@ #define FIX_1103_OPT_L_NORM_ARR /* FhG: Optimize L_norm_arr(), avoid IF */ #define FIX_1105_OPT_MINIMUM_SL /* FhG: Optimize minimum_s(), minimum_l(), avoid IF */ #define FIX_1104_OPT_GETMINSCALEFAC /* FhG: Optimize get_min_scalefactor(), avoid IF */ +#define FIX_1106_SIMPLIFY_SET32FX /* FhG: simplify set32_fx() */ #endif diff --git a/lib_com/tools_fx.c b/lib_com/tools_fx.c index b6cb03469dc17872997098a09c96e659146892cd..62766e3b76035193c8732501a0eefa8e9ff0fc87 100644 --- a/lib_com/tools_fx.c +++ b/lib_com/tools_fx.c @@ -692,6 +692,15 @@ void set32_fx( const Word16 N /* i : Lenght of the vector */ ) { +#ifdef FIX_1106_SIMPLIFY_SET32FX + Word16 i; + + FOR( i = 0; i < N; i++ ) + { + y[i] = a; + move32(); + } +#else Word16 i, tmp; tmp = extract_l( a ); IF( EQ_32( L_deposit_l( tmp ), a ) ) @@ -710,6 +719,7 @@ void set32_fx( move32(); } } +#endif return; }