From 1840b79ac9b86bdcd5243ecbdf5ef1088e9a9fb4 Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Wed, 17 Sep 2025 09:16:50 +0200 Subject: [PATCH 1/2] reintroduce code deleted by porting MR!1504 (BASOP issue 1564). Fixes #2008 as float and BASOP are now in sync --- lib_com/options.h | 2 +- lib_enc/ivas_stereo_dft_enc_itd.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 0c4477f35..7d8fc7a79 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -169,7 +169,7 @@ #define NONBE_FIX_1220_OMASA_JBM_EXT_USAN /* Nokia: fix issue 1220 OMASA EXT JBM USAN, also fix similar cases of free to avoid future problems */ #define NONBE_FIX_1376_MDCT_CONCEALMENT /* FhG: fix concealment artifact in MDCT Stereo with DTX, in case transition frame gets lost */ #define NONBE_1377_REND_DIRATT_CONF /* Eri: Issue 1377: Error in directivity attenuation configuration for both IVAS_dec and IVAS_rend */ - +#define FIX_ISSUE_2008_MISSING_CODE_FROM_PORTING /* FhG: Issue 2008: Code deleted while porting float-main MR !1504 (BASOP issue 1565)*/ /* #################### End BASOP porting switches ############################ */ /* clang-format on */ diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index ba3db0f5c..088a14897 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -729,6 +729,12 @@ void stereo_dft_enc_compute_itd( grand_dot_prod_img += xcorr[2 * i + 1]; xcorr_abs[i] = sqrtf( xcorr[2 * i] * xcorr[2 * i] + xcorr[2 * i + 1] * xcorr[2 * i + 1] ); +#ifdef FIX_ISSUE_2008_MISSING_CODE_FROM_PORTING + /* VM: prod_LL tends to overflow, better to replace with sum(log(prod_L)) and retrain the classifier */ + prod_LL = prod_L; + prod_RR = prod_R; +#endif + if ( j == SFM_PROD_GRP || i == NFFT_mid - 1 ) { prod_L = max( FLT_MIN, prod_L ); -- GitLab From cf0cd0e907ac28982f3b4baa1f2fb0eba5beb11c Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Wed, 17 Sep 2025 10:25:54 +0200 Subject: [PATCH 2/2] remove comment as in original MR --- lib_enc/ivas_stereo_dft_enc_itd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib_enc/ivas_stereo_dft_enc_itd.c b/lib_enc/ivas_stereo_dft_enc_itd.c index 088a14897..7c24cd545 100644 --- a/lib_enc/ivas_stereo_dft_enc_itd.c +++ b/lib_enc/ivas_stereo_dft_enc_itd.c @@ -730,7 +730,6 @@ void stereo_dft_enc_compute_itd( xcorr_abs[i] = sqrtf( xcorr[2 * i] * xcorr[2 * i] + xcorr[2 * i + 1] * xcorr[2 * i + 1] ); #ifdef FIX_ISSUE_2008_MISSING_CODE_FROM_PORTING - /* VM: prod_LL tends to overflow, better to replace with sum(log(prod_L)) and retrain the classifier */ prod_LL = prod_L; prod_RR = prod_R; #endif -- GitLab