Commit 9933c8f4 authored by multrus's avatar multrus
Browse files

optimize L_norm_arr()

parent 552563cd
Loading
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;
}

+1 −0
Original line number Diff line number Diff line
@@ -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