Commit ba3a2b47 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

delete func1 code

parent 3a53d1a3
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -92,6 +92,5 @@

//#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2       /*FhG: reduces WMOPS*/
//#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2_TEST_ALLIVAS  /*Test stage2 macro with all isavas variable = 1 - evs BE test will fail at least*/
//#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1
#endif
+0 −187
Original line number Diff line number Diff line
@@ -6687,181 +6687,6 @@ void wb_tbe_extras_reset_synth_fx(
    return;
}

#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1
inline static void elliptic_bpf_48k_generic_func1( Word32 *input_fx, Word32 *L_tmp, const Word16 full_band_bpf_fx[][5], Word16 IsUpsampled3, Word32 *L_tmpMax )
{
    Word32 L_tmpX;
    Word16 i;
    Word32 L_tmpMax2 = *L_tmpMax;
    Word32 L_tmpAbs;
    move32();
    IF( !IsUpsampled3 )
    {
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
        FOR( i = 0; i < L_FRAME48k; i++ )
        {
            W_tmpX = W_mac_16_16( 0, input_fx[i - 4], full_band_bpf_fx[0][4] );
            W_tmpX = W_mac_16_16( W_tmpX, input_fx[i - 3], full_band_bpf_fx[0][3] );
            W_tmpY = W_msu_32_16( 0, L_tmp[i - 1], full_band_bpf_fx[3][1] );
            W_tmpX = W_mac_16_16( W_tmpX, input_fx[i - 2], full_band_bpf_fx[0][2] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 2], full_band_bpf_fx[3][2] );
            W_tmpX = W_mac_16_16( W_tmpX, input_fx[i - 1], full_band_bpf_fx[0][1] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 3], full_band_bpf_fx[3][3] );
            W_tmpX = W_mac_16_16( W_tmpX, input_fx[i], full_band_bpf_fx[0][0] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 4], full_band_bpf_fx[3][4] );
            L_tmp[i] = W_sat_l( W_shr( W_add( W_tmpX, W_shl( W_tmpY, 2 - 16 + 3 ) ), 3 ) ); /*Q_input_fx + 11*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
        }
#else
        FOR( i = 0; i < L_FRAME48k; i++ )
        {
            L_tmpX = L_shr( L_mult( input_fx[i - 4], full_band_bpf_fx[0][4] ), 3 );                             /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i - 3], full_band_bpf_fx[0][3] ), 3 ), L_tmpX );        /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 1], full_band_bpf_fx[3][1] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i - 2], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );        /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 2], full_band_bpf_fx[3][2] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i - 1], full_band_bpf_fx[0][1] ), 3 ), L_tmpX );        /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 3], full_band_bpf_fx[3][3] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i], full_band_bpf_fx[0][0] ), 3 ), L_tmpX );            /*Q_input_fx + 13 + 1 - 3*/
            L_tmp[i] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 4], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
        }
#endif
    } /*IsUpsampled3*/
    ELSE
    { /*IsUpsampled3*/
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
        FOR( i = 0; i < L_FRAME48k; )
        {
            W_tmpX = W_mac_16_16( 0, input_fx[i - 3], full_band_bpf_fx[0][3] );
            W_tmpY = W_msu_32_16( 0, L_tmp[i - 1], full_band_bpf_fx[3][1] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 2], full_band_bpf_fx[3][2] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 3], full_band_bpf_fx[3][3] );
            W_tmpX = W_mac_16_16( W_tmpX, input_fx[i], full_band_bpf_fx[0][0] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 4], full_band_bpf_fx[3][4] );
            L_tmp[i] = W_sat_l( W_shr( W_add( W_tmpX, W_shl( W_tmpY, 2 - 16 + 3 ) ), 3 ) ); /*Q_input_fx + 11*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
            i++;

            W_tmpX = W_mac_16_16( 0, input_fx[i - 4], full_band_bpf_fx[0][4] );
            W_tmpY = W_msu_32_16( 0, L_tmp[i - 1], full_band_bpf_fx[3][1] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 2], full_band_bpf_fx[3][2] );
            W_tmpX = W_mac_16_16( W_tmpX, input_fx[i - 1], full_band_bpf_fx[0][1] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 3], full_band_bpf_fx[3][3] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 4], full_band_bpf_fx[3][4] );
            L_tmp[i] = W_sat_l( W_shr( W_add( W_tmpX, W_shl( W_tmpY, 2 - 16 + 3 ) ), 3 ) ); /*Q_input_fx + 11*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
            i++;

            W_tmpY = W_msu_32_16( 0, L_tmp[i - 1], full_band_bpf_fx[3][1] );
            W_tmpX = W_mac_16_16( 0, input_fx[i - 2], full_band_bpf_fx[0][2] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 2], full_band_bpf_fx[3][2] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 3], full_band_bpf_fx[3][3] );
            W_tmpY = W_msu_32_16( W_tmpY, L_tmp[i - 4], full_band_bpf_fx[3][4] );
            L_tmp[i] = W_sat_l( W_shr( W_add( W_tmpX, W_shl( W_tmpY, 2 - 16 + 3 ) ), 3 ) ); /*Q_input_fx + 11*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
            i++;
        }
#else
        FOR( i = 0; i < L_FRAME48k; )
        {
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i - 3], full_band_bpf_fx[0][3] ), 3 ), 0 );             /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 1], full_band_bpf_fx[3][1] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 2], full_band_bpf_fx[3][2] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 3], full_band_bpf_fx[3][3] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i], full_band_bpf_fx[0][0] ), 3 ), L_tmpX );            /*Q_input_fx + 13 + 1 - 3*/
            L_tmp[i] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 4], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
            i++;

            L_tmpX = L_shr( L_mult( input_fx[i - 4], full_band_bpf_fx[0][4] ), 3 );                             /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 1], full_band_bpf_fx[3][1] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 2], full_band_bpf_fx[3][2] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i - 1], full_band_bpf_fx[0][1] ), 3 ), L_tmpX );        /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 3], full_band_bpf_fx[3][3] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmp[i] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 4], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
            i++;

            L_tmpX = L_sub_sat( 0, L_shl_sat( Mult_32_16( L_tmp[i - 1], full_band_bpf_fx[3][1] ), 2 ) );        /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_add_sat( L_shr( L_mult( input_fx[i - 2], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );        /*Q_input_fx + 13 + 1 - 3*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 2], full_band_bpf_fx[3][2] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 3], full_band_bpf_fx[3][3] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
            L_tmp[i] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[i - 4], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
            move32();
            if ( L_tmpMax > 0 )
            {
                L_tmpAbs = L_abs( L_tmp[i] );
            }
            if ( L_tmpMax > 0 )
            {
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
            i++;
        }
#endif /*#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2*/
    }  /*IsUpsampled3*/
    *L_tmpMax = L_tmpMax2;
    move32();
}
#endif /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1*/

/*-------------------------------------------------------------------*
 * elliptic_bpf_48k_generic()
 *
@@ -6926,9 +6751,6 @@ void elliptic_bpf_48k_generic_fx(

#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpMax = L_add( 0, 0 );
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1 /*use subfunc*/
    elliptic_bpf_48k_generic_func1( input_fx, L_tmp, &full_band_bpf_fx[0], IsUpsampled3, 0 );
#else
    IF( !IsUpsampled3 )
    {
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
@@ -7028,7 +6850,6 @@ void elliptic_bpf_48k_generic_fx(
        }
#endif /*#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2*/
    } /*IsUpsampled3*/
#endif /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1*/

#else  /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic*/
    L_tmpX = L_shr( L_mult( memory_fx[0][0], full_band_bpf_fx[0][4] ), 3 );                             /*Q_input_fx + 13 + 1 - 3*/
@@ -7103,9 +6924,6 @@ void elliptic_bpf_48k_generic_fx(

#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpMax = L_add( 0, 0 );
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1 /*use subfunc*/
    elliptic_bpf_48k_generic_func1( L_tmp, L_tmp2, &full_band_bpf_fx[1], 0, &L_tmpMax );
#else
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
    FOR( i = 0; i < L_FRAME48k; i++ )
    {
@@ -7138,7 +6956,6 @@ void elliptic_bpf_48k_generic_fx(
        L_tmpMax = L_max( L_tmpMax, L_abs( L_tmp2[i] ) );
    }
#endif /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2*/
#endif /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1*/
#else  /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic*/
    L_tmpX = L_shr( Mult_32_16( memory2_fx[1][0], full_band_bpf_fx[1][4] ), 3 );                             /*Q_input_fx + 11 + 13 - 15 -3*/
    L_tmpX = L_add( L_shr( Mult_32_16( memory2_fx[1][1], full_band_bpf_fx[1][3] ), 3 ), L_tmpX );            /*Q_input_fx + 11 + 13 - 15 -3*/
@@ -7224,9 +7041,6 @@ void elliptic_bpf_48k_generic_fx(
    }
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpMax = L_add( 0, 0 );
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1 /*use subfunc*/
    elliptic_bpf_48k_generic_func1( L_tmp2, L_output, &full_band_bpf_fx[2], 0, &L_tmpMax );
#else
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
    FOR( i = 0; i < L_FRAME48k; i++ )
    {
@@ -7262,7 +7076,6 @@ void elliptic_bpf_48k_generic_fx(
        L_tmpMax = L_max( L_tmpMax, L_abs( L_output[i] ) );
    }
#endif /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2*/
#endif /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1*/
#else  /*FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic*/
    L_tmpX = L_shr( Mult_32_16( memory2_fx_2[0], full_band_bpf_fx[2][4] ), 3 );                               /* *Q_input_fx+6 +Q_temp +13 -15 -3 */
    L_tmpX = L_add_sat( L_shr( Mult_32_16( memory2_fx_2[1], full_band_bpf_fx[2][3] ), 3 ), L_tmpX );          /*Q_input_fx + 6 +Q_temp+13 -15 -3*/