Commit 38e2cb22 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

Revert "delete some code from another ticket and some empty lines"

This reverts commit f3335754.
parent 11970ae8
Loading
Loading
Loading
Loading
+3 −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 */
@@ -87,7 +87,9 @@
#define FIX_1481_HARDCODE_DIV                          /* FhG: hardcode division results in stereo_dmx_evs_init_encoder_fx() */

#define TEST_HR

#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic              /*FhG: nonBE, 0 regressions - reduces maintenance complexity & reduces WMOPS & prepares STAGE2 patch*/
//#define FIX_1439_SPEEDUP_SIMPLIFY_elliptic_bpf_48k_generic_STAGE2       /*FhG: nonBE, 1 regression (Pipeline #51485) - reduces 3.2 WMOPS with issue 1439 Bitstream*/

#endif
+3 −0
Original line number Diff line number Diff line
@@ -7038,6 +7038,7 @@ void elliptic_bpf_48k_generic_fx(
    }
#endif


    Q_temp = norm_l( L_tmpMax );
    Q_temp = sub( Q_temp, 4 );
    Scale_sig32( L_tmp2, 960, Q_temp );
@@ -7179,8 +7180,10 @@ void elliptic_bpf_48k_generic_fx(
        move32();
        L_tmpMax = L_max( L_tmpMax, L_abs( L_output[i] ) );
    }

#endif


    memory_fx2[2][0] = L_tmp2[L_FRAME48k - 4];
    memory_fx2[2][1] = L_tmp2[L_FRAME48k - 3];
    memory_fx2[2][2] = L_tmp2[L_FRAME48k - 2];
+25 −1
Original line number Diff line number Diff line
@@ -794,14 +794,38 @@ void Copy_Scale_sig_16_32_no_sat(
        }
        return;
    }
#ifdef FIX_1439_SPEEDUP_Copy_Scale_sig_16_32_no_sat
    L_tmp = L_shl_o( 1, exp0 - 1, &Overflow );

    IF( L_tmp >= 0x7FFF )
    {
        FOR( i = 0; i < lg; i++ )
        {
            // 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 */
            move32(); /* Overflow can occur here */
        }
        return;
    }
    // ELSE
    {
        Word16 tmp = extract_l( L_tmp );
        FOR( i = 0; i < lg; i++ )
        {
            y[i] = L_mult( x[i], tmp );
            move32();
        }
    }
#else
    L_tmp = L_shl_o( 1, exp0 - 1, &Overflow );
    FOR( i = 0; i < lg; i++ )
    {
        // y[i] = L_mult0(x[i], L_tmp);
        y[i] = W_extract_l( W_mult_32_16( L_tmp, x[i] ) );
        move32(); /* Overflow can occur here */
    }
#endif
}

void Copy_Scale_sig_32_16(
    const Word32 x[], /* i  : signal to scale input           Qx        */
+10 −0
Original line number Diff line number Diff line
@@ -904,6 +904,9 @@ 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++ )
    {
        L_tmp = L_mult0( alpha_fx, icbweM2Ref_fx );                                                        /* Q29 */
@@ -911,10 +914,17 @@ void stereo_icBWE_dec_fx(
        tmp = shl( round_fx( L_tmp ), 1 );                                                                 /* Q14 */
        synthRef_fx[i] = Mpy_32_16_1( synthRef_fx[i], tmp );                                               /* Qsyn - 1 */
        move32();
#ifdef FIX_1439_SPEEDUP_stereo_icBWE_dec_fx
        if ( LE_16( alpha_fx, winSlope_fx_ ) )
        {
            alpha_fx = add( alpha_fx, winSlope_fx ); /* Q15 */
        }
#else
        IF( LE_16( alpha_fx, sub( 32767 /* 1.0 in Q15*/, winSlope_fx ) ) )
        {
            alpha_fx = add( alpha_fx, winSlope_fx ); /* Q15 */
        }
#endif
    }

    FOR( ; i < NS2SA_FX2( st->output_Fs, FRAME_SIZE_NS ); i++ )
+10 −0
Original line number Diff line number Diff line
@@ -7032,14 +7032,24 @@ void ivas_swb_tbe_dec_fx(

            tmp1 = 0;
            move16();

#ifdef FIX_1439_SPEEDUP_ivas_swb_tbe_dec_fx
            Word32 idx32 = L_shr_r( 0x00333333, 10 ); /*NUM_SHB_SUBFR/L_FRAME16k*/ // Q16
#endif

            FOR( i = 0; i < L_FRAME16k; i++ )
            {
#ifndef FIX_1439_SPEEDUP_ivas_swb_tbe_dec_fx
                Word16 idx = 0;
                move16();
                IF( i != 0 )
                {
                    idx = idiv1616( i_mult( NUM_SHB_SUBFR, i ), L_FRAME16k );
                }
#else
                Word16 idx;
                idx = extract_h( imult3216( idx32, i ) ); /*Q0*/
#endif
                L_tmp1 = Mult_32_16( L_tmp, GainShape_fx[idx] );                           /* Q : 18 + tmp +15 -15*/
                White_exc16k_fx[i] = round_fx( Mult_32_16( L_tmp1, White_exc16k_fx[i] ) ); /* 18 + tmp +*Q_white_exc -15 -16 */
                move16();