From 2c41155a4bc2e4ab4a713dfc347ffc523d860017 Mon Sep 17 00:00:00 2001 From: Thomas Dettbarn Date: Wed, 24 Sep 2025 09:44:48 +0200 Subject: [PATCH 1/2] inside ivas_dirac_dec_output_synthesis_process_slot_fx(), die FOR-IF clause was changed to IF-FOR, improving WMOPS performance. --- lib_rend/ivas_dirac_output_synthesis_dec_fx.c | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c index 574a6950e..52ccc6b93 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c @@ -43,7 +43,7 @@ #include "ivas_rom_dec.h" #include "wmc_auto.h" #include "ivas_prot_fx.h" - +#include "ivas_rom_com_fx.h" /*------------------------------------------------------------------------- * Local constants @@ -1072,15 +1072,15 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( free( exp_temp_cy_cross_dir_smooth_fx ); Word16 temp_q1 = sub( h_dirac_output_synthesis_state->q_cy_cross_dir_smooth, temp_q ); - FOR( ch_idx = s_min( 4, nchan_transport ); ch_idx < num_channels_dir; ch_idx++ ) + IF( NE_16( temp_q, h_dirac_output_synthesis_state->q_cy_cross_dir_smooth ) ) { - IF( NE_16( temp_q, h_dirac_output_synthesis_state->q_cy_cross_dir_smooth ) ) + Word16 i; + Word32 aux; + IF( temp_q1 < 0 ) { - Word16 i; - Word32 aux; - IF( temp_q1 < 0 ) + Word32 temp_q1_equiv = L_lshl( (Word32) 0x80000000, temp_q1 ); + FOR( ch_idx = s_min( 4, nchan_transport ); ch_idx < num_channels_dir; ch_idx++ ) { - Word32 temp_q1_equiv = L_lshl( (Word32) 0x80000000, temp_q1 ); FOR( i = 0; i < num_freq_bands; i++ ) { aux = Mpy_32_32( h_dirac_output_synthesis_state->direct_power_factor_fx[i], h_dirac_output_synthesis_state->direct_responses_fx[ch_idx * num_freq_bands + i] ); @@ -1088,7 +1088,10 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( move32(); } } - ELSE + } + ELSE + { + FOR( ch_idx = s_min( 4, nchan_transport ); ch_idx < num_channels_dir; ch_idx++ ) { FOR( i = 0; i < num_freq_bands; i++ ) { @@ -1099,9 +1102,12 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( } } } - ELSE + } + ELSE + { + Word16 i; + FOR( ch_idx = s_min( 4, nchan_transport ); ch_idx < num_channels_dir; ch_idx++ ) { - Word16 i; FOR( i = 0; i < num_freq_bands; i++ ) { h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + i] = Madd_32_32( h_dirac_output_synthesis_state->cy_cross_dir_smooth_fx[ch_idx * num_freq_bands + i], h_dirac_output_synthesis_state->direct_power_factor_fx[i], h_dirac_output_synthesis_state->direct_responses_fx[ch_idx * num_freq_bands + i] ); @@ -1110,7 +1116,6 @@ void ivas_dirac_dec_output_synthesis_process_slot_fx( } } - /*Diffuse gain*/ FOR( ch_idx = s_min( 4, nchan_transport ); ch_idx < num_channels_diff; ch_idx++ ) { -- GitLab From e1f763b6ebdcc2967f228babe7c04c3ea3b76285 Mon Sep 17 00:00:00 2001 From: Thomas Dettbarn Date: Wed, 24 Sep 2025 11:02:23 +0200 Subject: [PATCH 2/2] removed a deprecated include from ivas_dirac_output_synthesis_dec_fx.c --- lib_rend/ivas_dirac_output_synthesis_dec_fx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c index 52ccc6b93..836120530 100644 --- a/lib_rend/ivas_dirac_output_synthesis_dec_fx.c +++ b/lib_rend/ivas_dirac_output_synthesis_dec_fx.c @@ -43,7 +43,6 @@ #include "ivas_rom_dec.h" #include "wmc_auto.h" #include "ivas_prot_fx.h" -#include "ivas_rom_com_fx.h" /*------------------------------------------------------------------------- * Local constants -- GitLab