From 889b97c4fa02e01176224b631954e6aa9e2cf71d Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 28 Jan 2026 21:43:27 +0100 Subject: [PATCH] only read initialized values from Cy_buf_e[k] in ivas_param_mc_dequantize_cov_fx() during renormalization --- lib_com/options.h | 1 + lib_dec/ivas_mc_param_dec_fx.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index e11d5dffa..99e1479b3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -102,6 +102,7 @@ #define FIX_2319_CLDFB_INIT_FLAGS /* FhG: basop issue 2319: init hs->flags during openCldfb(), to avoid reading of uninitialized memory */ #define FIX_BASOP_2357_OBJECT_EDIT_MSAN /* Nokia: basop issue 2357: initialize missing exponents in object edit */ #define FIX_BASOP_2354_MSAN_DIFF_Q_VALUE /* Nokia: Initialize Q value of diffuseness in rendering to Q30 */ +#define FIX_2384_INIT_DEQUANT_COV /* FhG: basop issue 2384: only read initialized values from Cy_buf_e[k] in ivas_param_mc_dequantize_cov_fx() during renormalization */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_mc_param_dec_fx.c b/lib_dec/ivas_mc_param_dec_fx.c index ea889cc7b..70b4b645c 100644 --- a/lib_dec/ivas_mc_param_dec_fx.c +++ b/lib_dec/ivas_mc_param_dec_fx.c @@ -3142,6 +3142,9 @@ static void ivas_param_mc_dequantize_cov_fx( const PARAM_MC_ILD_MAPPING *h_ild_mapping; Word32 Cy_state_int_fx[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; Word16 Cy_state_int_e[MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS]; +#ifdef FIX_2384_INIT_DEQUANT_COV + Word16 nY_norm; +#endif set16_fx( Cp_buf_e, Cproto_e, MAX_OUTPUT_CHANNELS * MAX_OUTPUT_CHANNELS ); set32_fx( Nrqq_fx, 0, MAX_OUTPUT_CHANNELS ); @@ -3395,22 +3398,38 @@ static void ivas_param_mc_dequantize_cov_fx( Cyp_e += nY_cov; } } +#ifdef FIX_2384_INIT_DEQUANT_COV + nY_norm = nY_cov; + move16(); +#endif } ELSE { Copy32( Cy_state_int_fx, Cy_state_fx, imult1616( nY_int, nY_int ) ); Copy( Cy_state_int_e, Cy_buf_e, imult1616( nY_int, nY_int ) ); +#ifdef FIX_2384_INIT_DEQUANT_COV + nY_norm = nY_int; + move16(); +#endif } /*normalize output matrix to a common exponent*/ tmp = 0; +#ifdef FIX_2384_INIT_DEQUANT_COV + FOR( k = 0; k < nY_norm * nY_norm; k++ ) +#else FOR( k = 0; k < nY_int * nY_int; k++ ) +#endif { Cy_state_fx[k] = BASOP_Util_Add_Mant32Exp( Cy_state_fx[k], Cy_buf_e[k], 0, 0, &Cy_buf_e[k] ); move32(); tmp = s_max( tmp, Cy_buf_e[k] ); } +#ifdef FIX_2384_INIT_DEQUANT_COV + FOR( k = 0; k < nY_norm * nY_norm; k++ ) +#else FOR( k = 0; k < nY_int * nY_int; k++ ) +#endif { L_tmp = L_shr( Cy_state_fx[k], sub( tmp, Cy_buf_e[k] ) ); Cy_state_fx[k] = L_tmp; -- GitLab