From cb4e9d3680e2df276990c5ce467b4b28cc93ea60 Mon Sep 17 00:00:00 2001 From: Tapani Pihlajakuja Date: Fri, 10 Apr 2026 13:28:50 +0300 Subject: [PATCH] Fix BASOP issue 2520 by correcting the threshold. --- lib_com/options.h | 1 + lib_rend/ivas_dirac_dec_binaural_functions_fx.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 8d06feb49..77de4cea4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -129,6 +129,7 @@ #define FIX_BASOP_2513_EXTRA_RETURN_REND_OPEN /* Nokia: BASOP issue 2513: Removes extra return block */ #define FIX_BASOP_2514_EFAP_PORTING_ERROR /* Nokia: BASOP issue 2514: Fix wrongly ported line */ #define FIX_BASOP_2516_REND_CUSTOM_LAYOUT_PORT_BUG /* Nokia: BASOP issue 2516: Fix porting bug in setting planar state for custom layout in renderer */ +#define FIX_BASOP_2520_PARAMBIN_THRESHOLD_FIX /* Nokia: BASOP issue 2520: Fix wrong threshold in ParamBin */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c index de0877bf7..9828e8b12 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions_fx.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions_fx.c @@ -1646,7 +1646,11 @@ static void ivas_dirac_dec_binaural_formulate_target_covariance_matrices_fx( } ELSE IF( NE_32( ivas_format, MASA_ISM_FORMAT ) || ( EQ_32( ivas_format, MASA_ISM_FORMAT ) && LT_16( dirIndex, hSpatParamRendCom->numParametricDirections ) ) ) /* For second of the two simultaneous directions */ { +#ifdef FIX_BASOP_2520_PARAMBIN_THRESHOLD_FIX + IF( LT_32( ( ratio_fx = hSpatParamRendCom->energy_ratio2_fx[dirac_read_idx][bin] ), 1073741 /* 0.001 in Q30 */ ) ) +#else IF( LT_32( ( ratio_fx = hSpatParamRendCom->energy_ratio2_fx[dirac_read_idx][bin] ), 10737418 /* 0.01 in Q30 */ ) ) +#endif { /* This touches only MASA path where second direction always has smaller ratio and * for non-2dir it is zero. As the whole direction contribution is multiplied with -- GitLab