Loading lib_enc/ivas_cpe_enc_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -1102,6 +1102,7 @@ ivas_error ivas_cpe_enc_fx( } igf = getIgfPresent_fx( sts[n]->element_mode, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->rf_mode ); /* Q0 */ move16(); IF( ( error = IGF_Reconfig_fx( &sts[n]->hIGFEnc, igf, 0, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) { Loading lib_enc/ivas_spar_encoder_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,7 @@ static ivas_error ivas_spar_enc_process_fx( IF( hSpar->hFbMixer->fb_cfg->active_w_mixing == 0 ) { /*cross fade between new active W channels and old passive W channel*/ test(); IF( EQ_16( dyn_active_w_flag, 1 ) || EQ_16( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag, 1 ) ) { IF( NE_16( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag, dyn_active_w_flag ) ) Loading lib_enc/ivas_stereo_dmx_evs_fx.c +18 −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 @@ -1919,6 +1927,7 @@ static void renorm_poc_fx( * * calculate energy *-------------------------------------------------------------------*/ void calc_energy_fx( const Word32 src1_fx[], /* i : Lch input signal */ const Word32 src2_fx[], /* i : Rch input signal */ Loading Loading @@ -1995,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 @@ -2345,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 @@ -2386,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 @@ -2419,6 +2431,7 @@ void stereo_dmx_evs_enc_fx( L_dmx_weight = L_deposit_h( dmx_weight ); L_tmp1 = L_deposit_l( BASOP_Util_Divide1616_Scale( hStereoDmxEVS->itd_fx, input_frame, &L_tmp1_e ) ); hPHA->phitd_fx = L_shl( L_tmp1, L_tmp1_e ); // Q15 create_M_signal_fx( data_fx[0], data_fx[1], dmx_poc_data, L_dmx_weight, input_frame, hStereoDmxEVS->s_wnd_fx, hStereoDmxEVS->dmx_weight_fx, hStereoDmxEVS->pre_dmx_energy_fx, hStereoDmxEVS->pre_dmx_energy_fx_e, hStereoDmxEVS->aux_dmx_energy_fx, hStereoDmxEVS->aux_dmx_energy_fx_e, hPHA ); Loading Loading @@ -3005,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_cpe_enc_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -1102,6 +1102,7 @@ ivas_error ivas_cpe_enc_fx( } igf = getIgfPresent_fx( sts[n]->element_mode, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->rf_mode ); /* Q0 */ move16(); IF( ( error = IGF_Reconfig_fx( &sts[n]->hIGFEnc, igf, 0, L_mult0( sts[n]->bits_frame_nominal, FRAMES_PER_SEC ), bw, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK ) { Loading
lib_enc/ivas_spar_encoder_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -929,6 +929,7 @@ static ivas_error ivas_spar_enc_process_fx( IF( hSpar->hFbMixer->fb_cfg->active_w_mixing == 0 ) { /*cross fade between new active W channels and old passive W channel*/ test(); IF( EQ_16( dyn_active_w_flag, 1 ) || EQ_16( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag, 1 ) ) { IF( NE_16( hSpar->hMdEnc->spar_md.prior_dyn_active_w_flag, dyn_active_w_flag ) ) Loading
lib_enc/ivas_stereo_dmx_evs_fx.c +18 −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 @@ -1919,6 +1927,7 @@ static void renorm_poc_fx( * * calculate energy *-------------------------------------------------------------------*/ void calc_energy_fx( const Word32 src1_fx[], /* i : Lch input signal */ const Word32 src2_fx[], /* i : Rch input signal */ Loading Loading @@ -1995,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 @@ -2345,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 @@ -2386,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 @@ -2419,6 +2431,7 @@ void stereo_dmx_evs_enc_fx( L_dmx_weight = L_deposit_h( dmx_weight ); L_tmp1 = L_deposit_l( BASOP_Util_Divide1616_Scale( hStereoDmxEVS->itd_fx, input_frame, &L_tmp1_e ) ); hPHA->phitd_fx = L_shl( L_tmp1, L_tmp1_e ); // Q15 create_M_signal_fx( data_fx[0], data_fx[1], dmx_poc_data, L_dmx_weight, input_frame, hStereoDmxEVS->s_wnd_fx, hStereoDmxEVS->dmx_weight_fx, hStereoDmxEVS->pre_dmx_energy_fx, hStereoDmxEVS->pre_dmx_energy_fx_e, hStereoDmxEVS->aux_dmx_energy_fx, hStereoDmxEVS->aux_dmx_energy_fx_e, hPHA ); Loading Loading @@ -3005,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