diff --git a/lib_com/options.h b/lib_com/options.h index 532d57e4e56feb6033015680ad3e82c692d3fd9a..a52fc2886ddbecce3119d5e6c8df2b47f50210fb 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -103,6 +103,7 @@ #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_2371_REMOVE_UNUSED_ISAR_FCNS /* Dolby: basop issue 2371: remove unused ISAR-related functions */ +#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 ea889cc7b3898452cb4d09bfa97c5b9f5d44d99d..70b4b645c47202fa83b0762157ed76515794d22a 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;