From 59f104ce918f85d82194fa1e2e69fe1c805e6ece Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Mon, 20 Apr 2026 11:45:48 +0200 Subject: [PATCH 1/4] try L_deposit_h --- lib_enc/tcx_utils_enc_fx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index db3c828d5..5e5e73c4c 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -3451,7 +3451,11 @@ void ProcessIGF_fx( } test(); +#ifdef FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN + tns_predictionGain = L_deposit_h( hIGFEnc->tns_predictionGain ); +#else tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); // todo: mul, 2026-03-12: check, why this is in Q23 +#endif IF( LT_32( tns_predictionGain, ONE_POINT_ONE_FIVE_Q23 ) && LT_16( predictionGain, ONE_POINT_ONE_FIVE_Q7 ) ) { hIGFEnc->flatteningTrigger = 1; -- GitLab From 68e90fdf59d2046ff14647aca17d31f8f042b049 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Mon, 20 Apr 2026 13:20:39 +0200 Subject: [PATCH 2/4] try L_deposit_h - activate --- lib_com/options.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_com/options.h b/lib_com/options.h index c09e1ff3d..544f2f383 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -116,6 +116,7 @@ #define FIX_BASOP_2531_MCT_CP_BITRATE /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */ #define FIX_BASOP_2541_OMASA_ENC_FIXES /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */ #define FIX_BASOP_2545_FIX_LTV_REGRESSION_2529 /* Nokia: BASOP issue 2545: Fix LTV regression caused by issue 2529 fix */ +#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN /* ##################### End NON-BE switches ########################### */ -- GitLab From 1c1fb314e0c9ad47dd8c7cae9891288b99f0cbac Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Tue, 21 Apr 2026 10:33:19 +0200 Subject: [PATCH 3/4] consider evs/ivas path : stay bitexact for evs --- lib_com/options.h | 2 +- lib_enc/tcx_utils_enc_fx.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 544f2f383..e41010e5d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -116,7 +116,7 @@ #define FIX_BASOP_2531_MCT_CP_BITRATE /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */ #define FIX_BASOP_2541_OMASA_ENC_FIXES /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */ #define FIX_BASOP_2545_FIX_LTV_REGRESSION_2529 /* Nokia: BASOP issue 2545: Fix LTV regression caused by issue 2529 fix */ -#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN +#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN /* FhG: fixes obvious bug for IVAS path. For EVS path, issue is still not resolved */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 5e5e73c4c..96dbbd9c1 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -3452,9 +3452,16 @@ void ProcessIGF_fx( test(); #ifdef FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN - tns_predictionGain = L_deposit_h( hIGFEnc->tns_predictionGain ); + IF( EQ_16( st->element_mode, EVS_MONO ) ) + { + tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); + } + ELSE + { + tns_predictionGain = L_deposit_h( hIGFEnc->tns_predictionGain ); + } #else - tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); // todo: mul, 2026-03-12: check, why this is in Q23 + tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); #endif IF( LT_32( tns_predictionGain, ONE_POINT_ONE_FIVE_Q23 ) && LT_16( predictionGain, ONE_POINT_ONE_FIVE_Q7 ) ) { -- GitLab From 77e05c012fd3bad97f14e7d984497219b8b6137d Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Wed, 22 Apr 2026 10:55:04 +0200 Subject: [PATCH 4/4] add comment --- lib_enc/tcx_utils_enc_fx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 96dbbd9c1..e60cbc751 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -3454,6 +3454,7 @@ void ProcessIGF_fx( #ifdef FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN IF( EQ_16( st->element_mode, EVS_MONO ) ) { + // this is a bug in the EVS legacy code, the IVAS branch is correct - don't fix for now, to keep EVS bit-exact tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); } ELSE -- GitLab