Commit 89cdfaf5 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

some more work on func1

parent fa009cca
Loading
Loading
Loading
Loading
Loading
+11 −17
Original line number Diff line number Diff line
@@ -6686,7 +6686,7 @@ void wb_tbe_extras_reset_synth_fx(

    return;
}
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1
#if defined( FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2 ) && defined (FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_func1)
static inline Word64 wmac_1616( Word64 x1, Word16 x2, Word16 x3 )
{
    return W_mac_16_16( x1, x2, x3 );
@@ -6719,6 +6719,7 @@ inline static void elliptic_bpf_48k_generic_func1( Word16 *input16_fx, Word32 *i
    {
        Word64 ( *wmac )( Word64, Word16, Word16 );
        Word64 ( *finalSat )( Word64, Word64 );
        Word16 *input_fx = input16_fx;
        wmac = wmac_1616;
        finalSat = finalSat16;
    }
@@ -6726,13 +6727,13 @@ inline static void elliptic_bpf_48k_generic_func1( Word16 *input16_fx, Word32 *i
    {
        Word64 ( *wmac )( Word64, Word32, Word16 );
        Word64 ( *finalSat )( Word64, Word64 );
        Word32 *input_fx = input32_fx;
        wmac = wmac_3216;
        finalSat = finalSat32;
    }

    IF( !IsUpsampled3 )
    {
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
        FOR( i = 0; i < L_FRAME48k; i++ )
        {
            W_tmpX = wmac( 0, input_fx[i - 4], full_band_bpf_fx[0][4] );
@@ -6755,22 +6756,18 @@ inline static void elliptic_bpf_48k_generic_func1( Word16 *input16_fx, Word32 *i
                L_tmpMax2 = L_max( L_tmpMax2, L_tmpAbs );
            }
        }
#else
        assert( 0 ); /*kein bock*/
#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_tmpX = wmac( 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_tmpX = wmac( 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*/
            L_tmp[i] = finalSat( W_tmpX, W_tmpY ); /*Q_input_fx + 11*/
            move32();
            if ( *L_tmpMax > 0 )
            {
@@ -6782,13 +6779,13 @@ inline static void elliptic_bpf_48k_generic_func1( Word16 *input16_fx, Word32 *i
            }
            i++;

            W_tmpX = W_mac_16_16( 0, input_fx[i - 4], full_band_bpf_fx[0][4] );
            W_tmpX = wmac( 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_tmpX = wmac( 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*/
            L_tmp[i] = finalSat( W_tmpX, W_tmpY ); /*Q_input_fx + 11*/
            move32();
            if ( *L_tmpMax > 0 )
            {
@@ -6801,11 +6798,11 @@ inline static void elliptic_bpf_48k_generic_func1( Word16 *input16_fx, Word32 *i
            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_tmpX = wmac( 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*/
            L_tmp[i] = finalSat( W_tmpX, W_tmpY ); /*Q_input_fx + 11*/
            move32();
            if ( *L_tmpMax > 0 )
            {
@@ -6817,9 +6814,6 @@ inline static void elliptic_bpf_48k_generic_func1( Word16 *input16_fx, Word32 *i
            }
            i++;
        }
#else
        assert( 0 ); /*kein bock*/
#endif /*#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2*/
    }  /*IsUpsampled3*/
    *L_tmpMax = L_tmpMax2;
    move32();