From a5e93633ff2e54dcfd806967bd68b30211f6ca71 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 13 Dec 2024 20:48:00 +0100 Subject: [PATCH 1/2] optimizations to ivas_param_mc_dec_render_fx() --- lib_com/options.h | 1 + lib_dec/ivas_mc_param_dec.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index cb8918eed..3e62b995b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -97,4 +97,5 @@ #define FIX_1104_OPT_GETMINSCALEFAC /* FhG: Optimize get_min_scalefactor(), avoid IF */ #define FIX_1106_SIMPLIFY_SET32FX /* FhG: simplify set32_fx() */ #define FIX_1107_VADDINC /* FhG: Optimize v_add_inc_fx() for most frequent case */ +#define FIX_1009_OPT_PARAMMC_RENDER /* FhG: Optimize ivas_param_mc_dec_render_fx() */ #endif diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index fc158ca89..9768820c9 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1968,10 +1968,13 @@ void ivas_param_mc_dec_render_fx( slot_idx_start_cldfb_synth = 0; move16(); +#ifndef FIX_1009_OPT_PARAMMC_RENDER Flag is_zero = 1; move32(); +#endif FOR( j = 0; j < st_ivas->hParamMC->hMetadataPMC->nbands_coded; j++ ) { +#ifndef FIX_1009_OPT_PARAMMC_RENDER is_zero = 1; move16(); FOR( i = 0; i < hParamMC->h_output_synthesis_cov_state.mixing_matrix_len; i++ ) @@ -1989,8 +1992,19 @@ void ivas_param_mc_dec_render_fx( } is_zero = 1; move16(); +#else + Flag is_zero = is_zero_arr( hParamMC->h_output_synthesis_cov_state.mixing_matrix_fx[j], hParamMC->h_output_synthesis_cov_state.mixing_matrix_len ); + { + if ( is_zero != 0 ) + { + hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[j] = 0; + move16(); + } + } +#endif IF( LT_16( st_ivas->hParamMC->band_grouping[j], st_ivas->hParamMC->h_output_synthesis_params.max_band_decorr ) ) { +#ifndef FIX_1009_OPT_PARAMMC_RENDER FOR( i = 0; i < hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_len; i++ ) { IF( NE_32( hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[j][i], 0 ) ) @@ -2000,6 +2014,10 @@ void ivas_param_mc_dec_render_fx( } } IF( is_zero ) +#else + is_zero = is_zero_arr( hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_fx[j], hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_len ); + if ( is_zero != 0 ) +#endif { hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[j] = 0; move16(); -- GitLab From bec6d69004f281476c8e4910d6e43b736dbef219 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 13 Dec 2024 21:17:55 +0100 Subject: [PATCH 2/2] fix variable name --- lib_dec/ivas_mc_param_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_mc_param_dec.c b/lib_dec/ivas_mc_param_dec.c index 9768820c9..e3d8bf0c0 100644 --- a/lib_dec/ivas_mc_param_dec.c +++ b/lib_dec/ivas_mc_param_dec.c @@ -1997,7 +1997,7 @@ void ivas_param_mc_dec_render_fx( { if ( is_zero != 0 ) { - hParamMC->h_output_synthesis_cov_state.mixing_matrix_res_exp[j] = 0; + hParamMC->h_output_synthesis_cov_state.mixing_matrix_exp[j] = 0; move16(); } } -- GitLab