Commit 6513a57e authored by Fabian Bauer's avatar Fabian Bauer
Browse files

Some bugs in STGE2 code, introduce...

Some bugs in STGE2 code, introduce FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2_TEST_ALLIVAS introduce FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_ACTIVATENEW and deactivate it to test old elliptic_bpf_48k_generic function
parent 9703b023
Loading
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -95,7 +95,10 @@
#define FIX_1439_SPEEDUP_synthesise_fb_high_band_fx             /*FhG: reduces WMOPS - bit-exact*/

#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic              /*FhG: reduces maintenance complexity & reduces WMOPS & prepares STAGE2 patch*/
#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_ACTIVATENEW /*activates new, spaghetticode version of elliptic_bpf_48k_generic. if inactive, only old code with no opts is active*/

//#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
+6 −2
Original line number Diff line number Diff line
@@ -3266,7 +3266,7 @@ void wb_tbe_extras_reset_synth_fx( Word16 state_lsyn_filt_shb[], Word16 state_ls
void elliptic_bpf_48k_generic_fx(
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
    int isIVAS;
    Word16 isIVAS,
#endif
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
    Word16 IsUpsampled3,
@@ -3292,7 +3292,11 @@ void synthesise_fb_high_band_fx(
    Word16 *prev_fbbwe_ratio,   /* o  : previous frame energy for FEC                       */
    Word32 bpf_memory[][4],     /* i/o: memory for elliptic bpf 48k                         */
    Word16 bpf_memory_Q[],
    Word16 Qout );
    Word16 Qout 
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
  , Word16 isIVAS
#endif 
);
void prep_tbe_exc_fx(
    const Word16 L_frame_fx, /* i : length of the frame */
+288 −5

File changed.

Preview size limit exceeded, changes collapsed.

+14 −2
Original line number Diff line number Diff line
@@ -4644,7 +4644,15 @@ void fb_tbe_dec_fx(
    fb_exc_energy = sum2_fx_mod( fb_exc, L_FRAME16k );

    /* FB TBE synthesis */
    synthesise_fb_high_band_fx( fb_exc, Q_fb_exc, fb_synth, fb_exc_energy, ratio, st->L_frame, st->bfi, &( hBWE_TD->prev_fbbwe_ratio_fx ), hBWE_TD->fbbwe_hpf_mem_fx, hBWE_TD->fbbwe_hpf_mem_fx_Q, hb_synth_exp );
    synthesise_fb_high_band_fx( fb_exc, Q_fb_exc, fb_synth, fb_exc_energy, ratio, st->L_frame, st->bfi, &( hBWE_TD->prev_fbbwe_ratio_fx ), hBWE_TD->fbbwe_hpf_mem_fx, hBWE_TD->fbbwe_hpf_mem_fx_Q, hb_synth_exp 
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2_TEST_ALLIVAS
      , 1
#else
      , 0
#endif
#endif
    );

    /* add the fb_synth component to the hb_synth component */
    /*  v_add_fx( hb_synth, fb_synth, hb_synth, L_FRAME48k );*/
@@ -4713,7 +4721,11 @@ void fb_tbe_dec_ivas_fx(
    fb_exc_energy = sum2_fx_mod( fb_exc, L_FRAME16k );

    /* FB TBE synthesis */
    synthesise_fb_high_band_fx( fb_exc, Q_fb_exc, fb_synth, fb_exc_energy, ratio, st->L_frame, st->bfi, &( hBWE_TD->prev_fbbwe_ratio_fx ), hBWE_TD->fbbwe_hpf_mem_fx, hBWE_TD->fbbwe_hpf_mem_fx_Q, hb_synth_exp );
    synthesise_fb_high_band_fx( fb_exc, Q_fb_exc, fb_synth, fb_exc_energy, ratio, st->L_frame, st->bfi, &( hBWE_TD->prev_fbbwe_ratio_fx ), hBWE_TD->fbbwe_hpf_mem_fx, hBWE_TD->fbbwe_hpf_mem_fx_Q, hb_synth_exp 
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
      , 1
#endif
    );

    test();
    IF( GE_16( st->element_mode, IVAS_CPE_DFT ) && ( st->idchan == 0 ) )
+7 −3
Original line number Diff line number Diff line
@@ -7332,7 +7332,11 @@ void fb_tbe_enc_fx(

    elliptic_bpf_48k_generic_fx(
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
        1 // isIVAS
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2_TEST_ALLIVAS
        1, // isIVAS
#else
        0, // isIVAS
#endif
#endif
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
        0, // IsUpsampled3
@@ -7468,7 +7472,7 @@ void fb_tbe_enc_ivas_fx(
    {
        elliptic_bpf_48k_generic_fx(
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
            1 // isIVAS
            1, // isIVAS
#endif
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
            0, // IsUpsampled3
@@ -7479,7 +7483,7 @@ void fb_tbe_enc_ivas_fx(
    {
        elliptic_bpf_48k_generic_fx(
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2
            1 // isIVAS
            1, // isIVAS
#endif
#ifdef FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic
            0, // IsUpsampled3