From cb961996c3a4ea7b659ecb6452470d958fca6693 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 18 Nov 2025 09:06:41 +0100 Subject: [PATCH] instrumentation --- lib_enc/ivas_stereo_dmx_evs_fx.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/lib_enc/ivas_stereo_dmx_evs_fx.c b/lib_enc/ivas_stereo_dmx_evs_fx.c index 73f7e246c..829cf5a9f 100644 --- a/lib_enc/ivas_stereo_dmx_evs_fx.c +++ b/lib_enc/ivas_stereo_dmx_evs_fx.c @@ -764,11 +764,15 @@ static void calc_poc_fx( eneR_e = 0; move16(); #ifdef FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING - step = sub( n0 >> 3, 1 ); + step = sub( shr( n0, 3 ), 1 ); tmp1 = 0; + move32(); tmp2 = 0; + move32(); n1 = 0; + move16(); n2 = 0; + move16(); #endif FOR( ( n = 1, i = 1 ); n < nsbd; n++ ) @@ -871,9 +875,13 @@ static void calc_poc_fx( IF( EQ_16( i, step ) ) { tmp1 = eneL; + move32(); n1 = eneL_e; + move16(); tmp2 = eneR; + move32(); n2 = eneR_e; + move16(); } #endif } @@ -1569,11 +1577,7 @@ static Word32 find_poc_peak_fx( move16(); move16(); move16(); -#ifdef FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING - IF( Q_fx[n] == 0 ) -#else if ( Q_fx[n] == 0 ) -#endif { Q_e[n] = 0; move16(); @@ -2051,18 +2055,22 @@ void calc_energy_fx( move32(); #ifdef FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING + test(); IF( ( lvl_fx != NULL ) && ( lvl_fx_e != NULL ) ) { E_32_fx = BASOP_Util_Add_Mant32Exp( E_32_fx, sub( 31, q_E ), EPSILON_FX_M, EPSILON_FX_E, &temp_e ); lvli_fx = BASOP_Util_Log10( E_32_fx, temp_e ); lvli_fx_e = 6; // +6 : compensate result of log in Q25 + move16(); IF( EQ_16( BASOP_Util_Cmp_Mant32Exp( lvli_fx, lvli_fx_e, *lvl_fx, *lvl_fx_e ), 1 ) ) { lvlff_fx = STEREO_DMX_EVS_LVLU_FORGETTING_Q31; + move32(); } ELSE { lvlff_fx = STEREO_DMX_EVS_LVLD_FORGETTING_Q31; + move32(); } *lvl_fx = BASOP_Util_Add_Mant32Exp( Mpy_32_32( *lvl_fx, lvlff_fx ), *lvl_fx_e, Mpy_32_32( lvli_fx, L_sub( MAX_32, lvlff_fx ) ), lvli_fx_e, lvl_fx_e ); // Q(31 - *lvli_fx_e) } @@ -2432,8 +2440,8 @@ void stereo_dmx_evs_enc_fx( { #ifndef FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING fx_tmp = 0; -#endif move32(); +#endif FOR( m = 0; m < STEREO_DMX_EVS_NB_SBFRM; m++ ) { p_sub_frame = &( data_fx[k][m * input_subframe] ); @@ -2474,11 +2482,7 @@ void stereo_dmx_evs_enc_fx( L_tmp2 = BASOP_Util_Divide3232_Scale_newton( subframe_energy[m], L_tmp1, &L_tmp2_e ); L_tmp2_e = add( L_tmp2_e, sub( subframe_energy_e[m], L_tmp1_e ) ); // if ( subframe_energy[m] / ( subframe_energy[m - 1] + EPSILON ) > STEREO_DMX_EVS_TRNS_DTC_INST ) -#ifdef FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING - IF( BASOP_Util_Cmp_Mant32Exp( L_tmp2, L_tmp2_e, STEREO_DMX_EVS_TRNS_DTC_INST_Q0, 31 ) > 0 ) -#else if ( BASOP_Util_Cmp_Mant32Exp( L_tmp2, L_tmp2_e, STEREO_DMX_EVS_TRNS_DTC_INST_Q0, 31 ) > 0 ) -#endif { is_transient = 1; move16(); @@ -3153,6 +3157,7 @@ ivas_error stereo_dmx_evs_init_encoder_fx( #ifdef FIX_2184_EVS_STEREO_DMX_CHANNEL_DISAPPEARING hStereoDmxEVS->hPHA->phitd_fx = 0; + move32(); hStereoDmxEVS->hPHA->iccres_s_fx = 0; move32(); FOR( n = 0; n < CPE_CHANNELS; n++ ) -- GitLab