Commit c5fcab00 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

LTV test for optimizations

parent 182c2a50
Loading
Loading
Loading
Loading
Loading
+414 −36

File changed.

Preview size limit exceeded, changes collapsed.

+25 −0
Original line number Diff line number Diff line
@@ -1026,6 +1026,7 @@ void computeDiffuseness_fixed(
    q_intensity_slow = sub( add( q_intensity, q_intensity ), 31 );

    /* Compute Diffuseness */
#ifndef OPT_SBA_DEC_PATH
    p_tmp = intensity_slow_abs;
    exp2 = 0;
    move16();
@@ -1064,6 +1065,30 @@ void computeDiffuseness_fixed(
            move32();
        }
    }
#else /* OPT_SBA_DEC_PATH */
    Word16 diff = sub( 62, q_ene );
    p_tmp = intensity_slow_abs;
    FOR( i = 0; i < num_freq_bands; ++i )
    {

        exp1 = sub( 31, q_intensity_slow );
        tmp = Sqrt32( p_tmp[i], &exp1 );

        tmp = BASOP_Util_Divide3232_Scale_newton( tmp, L_add( energy_slow[i], EPSILLON_FX ), &exp2 );
        q_tmp = sub( diff, add( exp1, exp2 ) );
        // bring to Q30
        tmp = L_shl_sat( tmp, sub( Q30, q_tmp ) );
        diffuseness[i] = L_sub( ONE_IN_Q30, tmp );
        move32();

        if ( LT_32( diffuseness[i], 0 ) )
        {
            diffuseness[i] = 0;
            move32();
        }
    }

#endif /* OPT_SBA_DEC_PATH */
    *q_diffuseness = Q30;
    move16();

+14 −6
Original line number Diff line number Diff line
@@ -1094,8 +1094,12 @@ void ivas_mct_dec_mct_fx(
void apply_MCT_dec_fx(
    MCT_DEC_HANDLE hMCT,                /* i/o: MCT decoder structure                   */
    Decoder_State **sts,                /* i/o: decoder state structure                 */
    Word32 *x[MCT_MAX_CHANNELS][NB_DIV], /* i/o: decoded and dequan. spect. input to MCT */
    Word16 q_x[MCT_MAX_CHANNELS] );
    Word32 *x[MCT_MAX_CHANNELS][NB_DIV] /* i/o: decoded and dequan. spect. input to MCT */
#ifndef OPT_SBA_DEC_PATH
    ,
    Word16 q_x[MCT_MAX_CHANNELS]
#endif /* OPT_SBA_DEC_PATH */
);

void mctStereoIGF_dec_fx(
    MCT_DEC_HANDLE hMCT,                 /* i/o: MCT decoder structure           */
@@ -1129,9 +1133,13 @@ void stereo_decoder_tcx_fx(
    const Word16 mct_on,               /* i  : flag mct block (1) or stereo (0)        */
    const Word16 last_core_l,          /* i  : last core for left channel              */
    const Word16 last_core_r,          /* i  : last core for right channel             */
    const Word16 tmp_plc_upmix,        /* i  : indicates temp upmix for PLC decision   */
    const Word16 tmp_plc_upmix         /* i  : indicates temp upmix for PLC decision   */
#ifndef OPT_SBA_DEC_PATH
    ,
    Word16 *q_x_ch2,
    Word16 *q_x_ch1 );
    Word16 *q_x_ch1
#endif /* OPT_SBA_DEC_PATH */
);

void v_multc_acc_32_16(
    const Word32 x[], /* i  : Input vector                                     */
+17 −2
Original line number Diff line number Diff line
@@ -44,7 +44,11 @@
 *------------------------------------------------------------------------------------------*/

#define IVAS_TDET_PARM_ENV_EPS ( 1e-5f )
#ifndef OPT_SBA_DEC_PATH
#define IVAS_TDET_PARM_ENV_EPS_fx 21474          // Q31
#else                                            /* OPT_SBA_DEC_PATH */
#define IVAS_TDET_PARM_ENV_EPS_fx ( 1407374884 ) // Q47
#endif                                           /* OPT_SBA_DEC_PATH */

#define IVAS_TDET_DUCK_MULT_FAC   ( 590558003 ) // Q29
#define IVAS_TDET_PARM_TRANS_THR  ( 107374182 ) // Q30
@@ -403,8 +407,19 @@ void ivas_td_decorr_get_ducking_gains_fx(
    FOR( i = 0; i < frame_len; i++ )
    {
        // e_fast_fx[i] = L_add( L_abs( e_fast_fx[i] ), L_shr( IVAS_TDET_PARM_ENV_EPS_fx, q_factor_diff ) ); /*Q14*/
#ifndef OPT_SBA_DEC_PATH
        e_fast_fx[i] = BASOP_Util_Add_Mant32Exp( L_abs( e_fast_fx[i] ), e_fast_e[i], IVAS_TDET_PARM_ENV_EPS_fx, 0, &e_fast_e[i] );
        move32();
#else  /* OPT_SBA_DEC_PATH */
        Word32 tmp = L_abs( e_fast_fx[i] );
        Word16 nrm = norm_l( tmp );
        Word16 max_e = s_max( sub( e_fast_e[i], nrm ), 31 - 47 );
        max_e = add( max_e, 1 ); // 1 for headroom
        e_fast_fx[i] = L_add( L_shr( tmp, sub( max_e, e_fast_e[i] ) ), L_shr( IVAS_TDET_PARM_ENV_EPS_fx, sub( max_e, 31 - 47 ) ) );
        move32();
        e_fast_e[i] = max_e;
        move16();
#endif /* OPT_SBA_DEC_PATH */
        e_slow_fx[i] = e_fast_fx[i];
        move32();
        e_slow_e[i] = e_fast_e[i];
+2 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@
/* Note: each compile switch (FIX_1101_...) is independent from the other ones */
#define OPT_STEREO_32KBPS_V1                    /* Optimization made in stereo decoding path for 32kbps decoding */
#define OPT_AVOID_STATE_BUF_RESCALE             /* Optimization made to avoid rescale of synth state buffer */
#define OPT_SBA_DEC_PATH                    /* Optimization made in SBA decoding path */
#define OPT_IVAS_FILTER_ROM                    /* Optimization made in IVAS filter table */
#define FIX_1310_SPEEDUP_ivas_dirac_dec_get_response_fx                 /*FhG: WMOPS tuning, nonbe*/
#define FIX_1310_SPEEDUP_ivas_dirac_dec_output_synthesis_process_slot   /*FhG: WMOPS tuning, nonbe*/
/* Both following 2 macros (IMPROVE_HIGH_COMPLEXITY_PARAM_MC_PRM_EST*) are independent from each other, they refer to different code blocks */
Loading