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

remap memory_fx and memory2_fx - more changes TBD - check BEnes

parent 5c478bc2
Loading
Loading
Loading
Loading
Loading
+37 −6
Original line number Diff line number Diff line
@@ -6704,20 +6704,27 @@ void elliptic_bpf_48k_generic_fx(
)
{
    Word16 i, j;
#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic_
    Word16 memory_fx0[4][4], memory_fx[4], Q_temp, Q_temp2;
#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
    Word16 memory_fx0, Q_temp, Q_temp2;
    Word32 L_tmp_buffer[L_FRAME48k + 4], L_tmp2_buffer[L_FRAME48k + 4], L_output[L_FRAME48k], L_tmpX, L_tmpMax;

    Word32 *L_tmp = &L_tmp_buffer[4];
    Word32 *L_tmp2 = &L_tmp2_buffer[4];
    Word32 *memory2_fx[3] = { NULL, &L_tmp[-4], &L_tmp2[-4] };
    Word16 *memory_fx = &input_fx[-4];
#else
    Word16 memory_fx0[4][4], memory_fx[4][4], Q_temp, Q_temp2;
#endif
    Word32 L_tmp[L_FRAME48k], L_tmp2[L_FRAME48k], L_output[L_FRAME48k], L_tmpX, memory2_fx[4][4], L_tmpMax;
#endif
    Word32 memory2_fx_2[4], memory2_fx_3[4];

    FOR( i = 0; i < 4; i++ )
    {
        memory_fx0[0][i] = extract_l( memory_fx2[0][i] );
#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic_
        memory_fx[i] = shl_sat( memory_fx0[0][i], sub( *Q_input_fx, memory_fx_Q[0] ) );
#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
        memory_fx0 = extract_l( memory_fx2[0][i] );
        memory_fx[i] = shl_sat( memory_fx0, sub( *Q_input_fx, memory_fx_Q[0] ) );
#else
        memory_fx0[0][i] = extract_l( memory_fx2[0][i] );
        memory_fx[0][i] = shl_sat( memory_fx0[0][i], sub( *Q_input_fx, memory_fx_Q[0] ) );
#endif
        memory2_fx[1][i] = L_shl_sat( memory_fx2[1][i], sub( add( *Q_input_fx, 11 ), memory_fx_Q[1] ) );
@@ -6730,20 +6737,34 @@ void elliptic_bpf_48k_generic_fx(
        move32();
    }

#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpX = L_shr( L_mult( memory_fx[0], full_band_bpf_fx[0][4] ), 3 );                  /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[1], full_band_bpf_fx[0][3] ), 3 ), L_tmpX ); /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[2], full_band_bpf_fx[0][2] ), 3 ), L_tmpX ); /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[3], full_band_bpf_fx[0][1] ), 3 ), L_tmpX ); /*Q_input_fx + 13 + 1 - 3*/
#else
    L_tmpX = L_shr( L_mult( memory_fx[0][0], full_band_bpf_fx[0][4] ), 3 );                                 /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][1], full_band_bpf_fx[0][3] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][2], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][3], full_band_bpf_fx[0][1] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
#endif /*FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[0], full_band_bpf_fx[0][0] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[1][3], 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( memory2_fx[1][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( memory2_fx[1][1], full_band_bpf_fx[3][3] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
    L_tmp[0] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[1][0], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/

    move32();

#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpX = L_shr( L_mult( memory_fx[1], full_band_bpf_fx[0][4] ), 3 );                  /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[2], full_band_bpf_fx[0][3] ), 3 ), L_tmpX ); /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[3], full_band_bpf_fx[0][2] ), 3 ), L_tmpX ); /*Q_input_fx + 13 + 1 - 3*/
#else
    L_tmpX = L_shr( L_mult( memory_fx[0][1], full_band_bpf_fx[0][4] ), 3 );                                 /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][2], full_band_bpf_fx[0][3] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][3], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
#endif /*FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[0], full_band_bpf_fx[0][1] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[1], full_band_bpf_fx[0][0] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( L_tmp[0], full_band_bpf_fx[3][1] ), 2 ) );           /*Q_input_fx + 11 + 13  -15 +2*/
@@ -6752,8 +6773,13 @@ void elliptic_bpf_48k_generic_fx(
    L_tmp[1] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[1][1], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
    move32();

#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpX = L_shr( L_mult( memory_fx[2], full_band_bpf_fx[0][4] ), 3 );                  /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[3], full_band_bpf_fx[0][3] ), 3 ), L_tmpX ); /*Q_input_fx + 13 + 1 - 3*/
#else
    L_tmpX = L_shr( L_mult( memory_fx[0][2], full_band_bpf_fx[0][4] ), 3 );                                 /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( memory_fx[0][3], full_band_bpf_fx[0][3] ), 3 ), L_tmpX );                /*Q_input_fx + 13 + 1 - 3*/
#endif
    L_tmpX = L_add( L_shr( L_mult( input_fx[0], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[1], full_band_bpf_fx[0][1] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[2], full_band_bpf_fx[0][0] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
@@ -6762,7 +6788,12 @@ void elliptic_bpf_48k_generic_fx(
    L_tmpX = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[1][3], full_band_bpf_fx[3][3] ), 2 ) );   /*Q_input_fx + 11 + 13  -15 +2*/
    L_tmp[2] = L_sub_sat( L_tmpX, L_shl_sat( Mult_32_16( memory2_fx[1][2], full_band_bpf_fx[3][4] ), 2 ) ); /*Q_input_fx + 11 + 13  -15 +2*/
    move32();

#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
    L_tmpX = L_shr( L_mult( memory_fx[3], full_band_bpf_fx[0][4] ), 3 ); /*Q_input_fx + 13 + 1 - 3*/
#else
    L_tmpX = L_shr( L_mult( memory_fx[0][3], full_band_bpf_fx[0][4] ), 3 );                                 /*Q_input_fx + 13 + 1 - 3*/
#endif
    L_tmpX = L_add( L_shr( L_mult( input_fx[0], full_band_bpf_fx[0][3] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[1], full_band_bpf_fx[0][2] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/
    L_tmpX = L_add( L_shr( L_mult( input_fx[2], full_band_bpf_fx[0][1] ), 3 ), L_tmpX );                    /*Q_input_fx + 13 + 1 - 3*/