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

Revert "replace non-intuitive condition by intuitive one"

This reverts commit 7c29e0fc.
parent bddbb00d
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -3268,10 +3268,6 @@ void elliptic_bpf_48k_generic_fx(
    Word32 memory_fx[][4], /* i/o: 4 arrays of 4 for memory                   memory_fx_Q */
    Word16 memory_fx_Q[],
    const Word16 full_band_bpf[][5] /* i  : filter coefficients b0,b1,b2,a0,a1,a2  Q13  */
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
    ,
    const int isUpsampledBy3 /* i  : input signal is upsampled by factor 3 by inserting zeros */
#endif
);
void synthesise_fb_high_band_fx(
+11 −21
Original line number Diff line number Diff line
@@ -6705,10 +6705,6 @@ void elliptic_bpf_48k_generic_fx(
    Word32 memory_fx2[][4], /* i/o: 4 arrays of 4 for memory                    */
    Word16 memory_fx_Q[],
    const Word16 full_band_bpf_fx[][5] /* i  : filter coefficients b0,b1,b2,a0,a1,a2  Q13  */
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
    ,
    const int isUpsampledBy3            /* i  : input signal is upsampled by factor 3 by inserting zeros */
#endif
)
{
    Word16 i, j;
@@ -6794,7 +6790,8 @@ void elliptic_bpf_48k_generic_fx(


#if defined( FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig ) && !defined( FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic )
    IF( isUpsampledBy3 )
    test();
    IF( full_band_bpf_fx == full_band_bpf_3_fx || full_band_bpf_fx == full_band_bpf_1_fx )
    {
        i = 4;
        L_tmpX = L_shr( L_mult( input_fx[i - 4], full_band_bpf_fx[0][4] ), 3 ); // 0 /*Q_input_fx + 13 + 1 - 3*/
@@ -6864,7 +6861,8 @@ void elliptic_bpf_48k_generic_fx(
#endif /*FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig*/

#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
    IF( isUpsampledBy3 )
    test();
    IF( full_band_bpf_fx == full_band_bpf_3_fx || full_band_bpf_fx == full_band_bpf_1_fx )
    {
#ifdef FIX_1439_SIMPLIFY_elliptic_bpf_48k_generic
        FOR( i = 0; i < L_FRAME48k; i++ )
@@ -7180,20 +7178,12 @@ void synthesise_fb_high_band_fx(
    IF( EQ_16( L_frame, L_FRAME16k ) )
    {
        /* for 16kHz ACELP core */
        elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_3_fx
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
        , 1
#endif 
        );
        elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_3_fx );
    }
    ELSE
    {
        /* for 12.8kHz ACELP core */
        elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx 
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
        ,1
#endif 
        );
        elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx );
    }
    temp1 = sum2_fx_mod( tmp, L_FRAME48k );

+3 −15
Original line number Diff line number Diff line
@@ -7330,11 +7330,7 @@ void fb_tbe_enc_fx(

    Copy_Scale_sig( new_input, input_fhb, L_FRAME48k, exp_temp );

    elliptic_bpf_48k_generic_fx( input_fhb, &exp_temp, tmp_vec, hBWE_TD->elliptic_bpf_2_48k_mem_fx, hBWE_TD->elliptic_bpf_2_48k_mem_fx_Q, full_band_bpf_2_fx 
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
    ,0
#endif 
    );
    elliptic_bpf_48k_generic_fx( input_fhb, &exp_temp, tmp_vec, hBWE_TD->elliptic_bpf_2_48k_mem_fx, hBWE_TD->elliptic_bpf_2_48k_mem_fx_Q, full_band_bpf_2_fx );
    Sample_Delay_HP = NS2SA( 48000, ACELP_LOOK_NS + DELAY_FD_BWE_ENC_12k8_NS + DELAY_FIR_RESAMPL_NS ) - L_FRAME48k / 2;

    IF( NE_16( st->last_extl, FB_TBE ) )
@@ -7463,19 +7459,11 @@ void fb_tbe_enc_ivas_fx(

    IF( EQ_16( st->element_mode, IVAS_CPE_DFT ) )
    {
        elliptic_bpf_48k_generic_fx( input_fhb_new, &exp_temp, tmp_vec, hBWE_TD->elliptic_bpf_2_48k_mem_fx, hBWE_TD->elliptic_bpf_2_48k_mem_fx_Q, full_band_bpf_2_fx 
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
        ,0
#endif 
        );
        elliptic_bpf_48k_generic_fx( input_fhb_new, &exp_temp, tmp_vec, hBWE_TD->elliptic_bpf_2_48k_mem_fx, hBWE_TD->elliptic_bpf_2_48k_mem_fx_Q, full_band_bpf_2_fx );
    }
    ELSE
    {
        elliptic_bpf_48k_generic_fx( input_fhb_new + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), &exp_temp, tmp_vec, hBWE_TD->elliptic_bpf_2_48k_mem_fx, hBWE_TD->elliptic_bpf_2_48k_mem_fx_Q, full_band_bpf_2_fx 
#ifdef FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig
        ,0
#endif 
        );
        elliptic_bpf_48k_generic_fx( input_fhb_new + NS2SA( 48000, DELAY_FIR_RESAMPL_NS ), &exp_temp, tmp_vec, hBWE_TD->elliptic_bpf_2_48k_mem_fx, hBWE_TD->elliptic_bpf_2_48k_mem_fx_Q, full_band_bpf_2_fx );
    }

    test();