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

activate only be speedups - is really be?

parent 8408cc86
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@

#define SUPPORT_JBM_TRACEFILE                   /* Support for JBM tracefile, which is needed for 3GPP objective/subjective testing, but not relevant for real-world implementations */

/*#define WMOPS*/                                   /* Activate complexity and memory counters */
//#define WMOPS                                   /* Activate complexity and memory counters */
#ifdef WMOPS
/*#define WMOPS_PER_FRAME*/                     /* Output per-frame complexity (writes one float value per frame to the file "wmops_analysis") */
/*#define WMOPS_DETAIL*/                        /* Output detailed complexity printout for every function. Increases runtime overhead */
@@ -78,4 +78,11 @@
#define HARM_PUSH_BIT
#define HARM_ENC_INIT
//#define HARM_SCE_INIT

// new speedups - pipe running
#define FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat            /*FhG: reduces WMOPS - bit-exact*/
#define FIX_1439_SPEEDUP_stereo_icBWE_dec_fx                    /*FhG: reduces WMOPS - bit-exact*/
#define FIX_1439_SPEEDUP_ivas_swb_tbe_dec_fx_0                  /*FhG: reduces WMOPS - bit-exact*/
#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig  /*FhG: reduces WMOPS - bit-exact*/

#endif
+1 −8
Original line number Diff line number Diff line
@@ -61,17 +61,10 @@
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE1       // nonbe    // |
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE2       // nonbe    // | > 3.1 WOPS, pipe testing https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/pipelines/50562
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE2       // nonbe    // | > 3.1 WMOPS, pipe testing https://forge.3gpp.org/rep/sa4/audio/ivas-basop/-/pipelines/50562
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_STAGE3       // nonbe    // |
//#define FIX_1439_SPEEDUP_elliptic_bpf_48k_generic_upsampledsig // BE  // .9    WMOPS -- all pipes green
//   ^^^^^^^^
// Numbers ALL:     84,189
// Numbers beOnly:  87,344
// NUmbers none:    88,236
//-----------------------------------------------------------------------
//#define FIX_1439_SPEEDUP_ivas_swb_tbe_dec_fx_0 // .8 WMOPS BE, all pipes green!
// OPT_STEREO_32KBPS_V1 switch is inactive - why? (3.2 WMOPS)
+0 −13
Original line number Diff line number Diff line
@@ -760,7 +760,6 @@ void Copy_Scale_sig_16_32_DEPREC(
    }
}

#define FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat
void Copy_Scale_sig_16_32_no_sat(
    const Word16 x[], /* i  : signal to scale input           Qx        */
    Word32 y[],       /* o  : scaled signal output            Qx        */
@@ -796,7 +795,6 @@ void Copy_Scale_sig_16_32_no_sat(
        return;
    }
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat
    //#define FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
    L_tmp = L_shl_o( 1, exp0 - 1, &Overflow );

    IF( L_tmp >= 0x7FFF )
@@ -806,15 +804,9 @@ void Copy_Scale_sig_16_32_no_sat(
            // y[i] = L_mult0(x[i], L_tmp);
            y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) );
            move32(); /* saturation can occur here */
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
            Word32 tmp32 = W_extract_l( W_mult_32_16( L_tmp, x[i] ) );
            if ( tmp32 != y[i] )
                assert( 0 );
#endif
        }
        return;
    }

    // ELSE
    {
        // Word16 tmp = extract_l( L_tmp );
@@ -822,11 +814,6 @@ void Copy_Scale_sig_16_32_no_sat(
        {
            y[i] = L_mult( x[i], L_tmp );
            move32(); /* saturation can occur here */
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat_TEST
            Word32 tmp32 = W_extract_l( W_mult_32_16( L_tmp, x[i] ) );
            if ( tmp32 != y[i] )
                assert( 0 );
#endif
        }
    }
#else
+15 −0
Original line number Diff line number Diff line
@@ -904,8 +904,22 @@ void stereo_icBWE_dec_fx(
    winSlope_fx = div_s( 1, winLen_fx );                       /* Q15 */
    alpha_fx = winSlope_fx;                                    /* Q15 */
    move16();
#ifdef FIX_1439_SPEEDUP_stereo_icBWE_dec_fx
    Word16 winSlope_fx_ = sub( 32767 /* 1.0 in Q15*/, winSlope_fx );
#endif
    FOR( i = 0; i < winLen_fx; i++ )
    {
#ifdef FIX_1439_SPEEDUP_stereo_icBWE_dec_fx
        L_tmp = L_mult0( alpha_fx, icbweM2Ref_fx );                                                        /* Q29 */
        L_tmp = L_mac0( L_tmp, sub( 32767 /* 1.0 in Q15*/, alpha_fx ), hStereoICBWE->icbweM2Ref_prev_fx ); /* Q29 */
        tmp = shl( round_fx( L_tmp ), 1 );                                                                 /* Q14 */
        synthRef_fx[i] = Mpy_32_16_1( synthRef_fx[i], tmp );                                               /* Qsyn - 1 */
        move32();
        if ( LE_16( alpha_fx, winSlope_fx_ ) )
        {
            alpha_fx = add( alpha_fx, winSlope_fx ); /* Q15 */
        }
#else
        L_tmp = L_mult0( alpha_fx, icbweM2Ref_fx );                                                        /* Q29 */
        L_tmp = L_mac0( L_tmp, sub( 32767 /* 1.0 in Q15*/, alpha_fx ), hStereoICBWE->icbweM2Ref_prev_fx ); /* Q29 */
        tmp = shl( round_fx( L_tmp ), 1 );                                                                 /* Q14 */
@@ -915,6 +929,7 @@ void stereo_icBWE_dec_fx(
        {
            alpha_fx = add( alpha_fx, winSlope_fx ); /* Q15 */
        }
#endif
    }

    FOR( ; i < NS2SA_FX2( st->output_Fs, FRAME_SIZE_NS ); i++ )