Loading lib_enc/ivas_stereo_dmx_evs_fx.c +16 −4 Original line number Diff line number Diff line Loading @@ -738,11 +738,15 @@ static void calc_poc_fx( move32(); eneR_e = 0; move16(); step = sub( n0 >> 3, 1 ); step = sub( shr( n0, 3 ), 1 ); tmp1 = 0; move32(); tmp2 = 0; move32(); n1 = 0; move16(); n2 = 0; move16(); FOR( ( n = 1, i = 1 ); n < nsbd; n++ ) { Loading Loading @@ -843,9 +847,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(); } } Loading Loading @@ -1533,7 +1541,7 @@ static Word32 find_poc_peak_fx( move16(); move16(); move16(); IF( Q_fx[n] == 0 ) if ( Q_fx[n] == 0 ) { Q_e[n] = 0; move16(); Loading Loading @@ -1996,18 +2004,22 @@ void calc_energy_fx( *energy_fx = BASOP_Util_Add_Mant32Exp( Mpy_32_32( *energy_fx, ratio_float_fx ), *energy_fx_e, Mpy_32_32( temp32, L_sub( MAX_32, ratio_float_fx ) ), sub( 31, q_temp32 ), energy_fx_e ); move32(); 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) } Loading Loading @@ -2346,7 +2358,6 @@ void stereo_dmx_evs_enc_fx( move16(); FOR( k = 0; k < CPE_CHANNELS; k++ ) { move32(); FOR( m = 0; m < STEREO_DMX_EVS_NB_SBFRM; m++ ) { p_sub_frame = &( data_fx[k][m * input_subframe] ); Loading Loading @@ -2387,7 +2398,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 ) IF( BASOP_Util_Cmp_Mant32Exp( L_tmp2, L_tmp2_e, STEREO_DMX_EVS_TRNS_DTC_INST_Q0, 31 ) > 0 ) if ( BASOP_Util_Cmp_Mant32Exp( L_tmp2, L_tmp2_e, STEREO_DMX_EVS_TRNS_DTC_INST_Q0, 31 ) > 0 ) { is_transient = 1; move16(); Loading Loading @@ -3007,6 +3018,7 @@ ivas_error stereo_dmx_evs_init_encoder_fx( move32(); hStereoDmxEVS->hPHA->phitd_fx = 0; move32(); hStereoDmxEVS->hPHA->iccres_s_fx = 0; move32(); FOR( n = 0; n < CPE_CHANNELS; n++ ) Loading Loading
lib_enc/ivas_stereo_dmx_evs_fx.c +16 −4 Original line number Diff line number Diff line Loading @@ -738,11 +738,15 @@ static void calc_poc_fx( move32(); eneR_e = 0; move16(); step = sub( n0 >> 3, 1 ); step = sub( shr( n0, 3 ), 1 ); tmp1 = 0; move32(); tmp2 = 0; move32(); n1 = 0; move16(); n2 = 0; move16(); FOR( ( n = 1, i = 1 ); n < nsbd; n++ ) { Loading Loading @@ -843,9 +847,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(); } } Loading Loading @@ -1533,7 +1541,7 @@ static Word32 find_poc_peak_fx( move16(); move16(); move16(); IF( Q_fx[n] == 0 ) if ( Q_fx[n] == 0 ) { Q_e[n] = 0; move16(); Loading Loading @@ -1996,18 +2004,22 @@ void calc_energy_fx( *energy_fx = BASOP_Util_Add_Mant32Exp( Mpy_32_32( *energy_fx, ratio_float_fx ), *energy_fx_e, Mpy_32_32( temp32, L_sub( MAX_32, ratio_float_fx ) ), sub( 31, q_temp32 ), energy_fx_e ); move32(); 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) } Loading Loading @@ -2346,7 +2358,6 @@ void stereo_dmx_evs_enc_fx( move16(); FOR( k = 0; k < CPE_CHANNELS; k++ ) { move32(); FOR( m = 0; m < STEREO_DMX_EVS_NB_SBFRM; m++ ) { p_sub_frame = &( data_fx[k][m * input_subframe] ); Loading Loading @@ -2387,7 +2398,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 ) IF( BASOP_Util_Cmp_Mant32Exp( L_tmp2, L_tmp2_e, STEREO_DMX_EVS_TRNS_DTC_INST_Q0, 31 ) > 0 ) if ( BASOP_Util_Cmp_Mant32Exp( L_tmp2, L_tmp2_e, STEREO_DMX_EVS_TRNS_DTC_INST_Q0, 31 ) > 0 ) { is_transient = 1; move16(); Loading Loading @@ -3007,6 +3018,7 @@ ivas_error stereo_dmx_evs_init_encoder_fx( move32(); hStereoDmxEVS->hPHA->phitd_fx = 0; move32(); hStereoDmxEVS->hPHA->iccres_s_fx = 0; move32(); FOR( n = 0; n < CPE_CHANNELS; n++ ) Loading