From be56131768ac11b1da1faeeacef2c62d664a6c00 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Mon, 14 Jul 2025 16:00:54 +0530 Subject: [PATCH 1/3] Fix for 3GPP issue 1805: Regression, spike in BASOP decoder MASA LTV at 64 kbps and 16 kHz input Link #1805 --- lib_com/options.h | 2 ++ lib_dec/dec_tcx_fx.c | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 73144fdac..4f498c158 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -141,4 +141,6 @@ #define FIX_1818_WRONG_PIT_INIT /* VA: Fix wrong pitch initialization */ +#define NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT /* FhG: apply correct TCX5 grouping/interleaving when input_fs != output_fs */ + #endif diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index a35db1f8e..8009c69e0 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -5646,7 +5646,12 @@ void decoder_tcx_tns_fx( test(); test(); test(); +#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT + test(); + IF( ( NE_16( hTcxCfg->fIsTNSAllowed, 0 ) && NE_16( fUseTns, 0 ) && NE_16( bfi, 1 ) && whitenedDomain ) || GT_16( L_spec, L_frameTCX ) ) +#else IF( ( NE_16( hTcxCfg->fIsTNSAllowed, 0 ) && NE_16( fUseTns, 0 ) && NE_16( bfi, 1 ) ) || GT_16( L_spec, L_frameTCX ) ) +#endif { L = L_spec; move16(); @@ -5700,7 +5705,12 @@ void decoder_tcx_tns_fx( IF( EQ_16( L_frame, shr( st->L_frame, 1 ) ) && st->tcxonly != 0 && isTCX5 != 0 ) { test(); +#ifdef NONBE_FIX_TCX5_INTERLEAVING_FOR_FS_IN_UNEQUAL_FS_OUT + test(); + IF( st->element_mode == EVS_MONO || ( LT_16( L_spec, L_frameTCX ) && !whitenedDomain ) ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ +#else IF( st->element_mode == EVS_MONO || LT_16( L_spec, L_frameTCX ) ) /* todo: this is temporary to maintain EVS BE, this is a bug and should be fixed also for EVS (see issue 13) */ +#endif { tcx5TnsUngrouping_fx( shr( L_frameTCX, 1 ), shr( hTcxCfg->tnsConfig[0][0].iFilterBorders[0], 1 ), x_fx, DEC ); tmp = L_frameTCX; -- GitLab From 3c0cda94d0f4fce4ef06ca20a8c261c333c7fc7c Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 15 Jul 2025 12:06:39 +0530 Subject: [PATCH 2/3] Edit variables.yml to test against 3gpp_issue_1805_floatcode_fix reference This change will be reverted after testing --- .gitlab-ci/variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml index 96ef1f507..3e9c1e57b 100644 --- a/.gitlab-ci/variables.yml +++ b/.gitlab-ci/variables.yml @@ -1,6 +1,6 @@ variables: EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop" - FLOAT_REF_BRANCH: "ivas-float-update" + FLOAT_REF_BRANCH: "3gpp_issue_1805_floatcode_fix" SCRIPTS_DIR: "/usr/local/scripts" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" -- GitLab From 6fd44de77a9b1f08b7688b67ca9e3e6db7c5b73d Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 15 Jul 2025 13:56:44 +0530 Subject: [PATCH 3/3] Revert variables.yml change --- .gitlab-ci/variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci/variables.yml b/.gitlab-ci/variables.yml index 3e9c1e57b..96ef1f507 100644 --- a/.gitlab-ci/variables.yml +++ b/.gitlab-ci/variables.yml @@ -1,6 +1,6 @@ variables: EVS_BE_TEST_DIR_BASOP: "/usr/local/be_2_evs_basop" - FLOAT_REF_BRANCH: "3gpp_issue_1805_floatcode_fix" + FLOAT_REF_BRANCH: "ivas-float-update" SCRIPTS_DIR: "/usr/local/scripts" LONG_TEST_SUITE: "tests/codec_be_on_mr_nonselection tests/renderer --param_file scripts/config/self_test_ltv.prm --use_ltv" LONG_TEST_SUITE_NO_RENDERER: "tests/codec_be_on_mr_nonselection --param_file scripts/config/self_test_ltv.prm --use_ltv" -- GitLab