From 5b1113088238c6360a070bc96ff289c97fc09c67 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Mar 2026 16:46:43 +0100 Subject: [PATCH 1/4] FIX_2462_PARCOR_FIX --- lib_com/options.h | 1 + lib_com/swb_tbe_com_fx.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 8b6b40f99..852a3d3ed 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -117,6 +117,7 @@ #define FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning /* FhG: Adjust non-diegetic panning law to harmonize codec levels with 3GPP reference software */ #define FIX_FLOAT_1518 /* FhG: fix issue 1518: loudness differences in OSBA decoding to mono or stereo output */ #define FIX_FLOAT_1533_BLEND_SUBFR2 /* FhG: float issue 1533: correct blending in blend_subfr2() */ +#define FIX_2462_PARCOR_FIX /* VA: issue 2462: Fix bug in calculating parcor coefficient in Calc_rc0_h() */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c index 7f39768d9..caeec35e6 100644 --- a/lib_com/swb_tbe_com_fx.c +++ b/lib_com/swb_tbe_com_fx.c @@ -657,7 +657,12 @@ void Calc_rc0_h( #ifdef HARMONIZE_TBE3 IF( element_mode != EVS_MONO && enc_dec == ENC ) { +#ifdef FIX_2462_PARCOR_FIX + tmp2 = shr( h[0], 2 ); + L_acc = L_mult( tmp2, tmp2 ); +#else L_acc = L_mult( h[0], h[0] ); // TBV: shouldn't it be "shr( h[0], 2 )" ? +#endif FOR( i = 1; i < LONG_H_ST; i++ ) { tmp2 = shr( h[i], 2 ); @@ -1544,7 +1549,7 @@ void GenShapedWBExcitation_ivas_fx( #ifdef HARMONIZE_TBE2 pow22 = L_add( pow22, L_shr( L_tmp, Q_pow ) ); /* Q22 */ #else - pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ + pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ #endif } } -- GitLab From 2ba74c3a9a435e0809793b33063292ac4ac71603 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Mar 2026 16:49:59 +0100 Subject: [PATCH 2/4] clang-format --- lib_com/swb_tbe_com_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c index caeec35e6..f2331381c 100644 --- a/lib_com/swb_tbe_com_fx.c +++ b/lib_com/swb_tbe_com_fx.c @@ -1549,7 +1549,7 @@ void GenShapedWBExcitation_ivas_fx( #ifdef HARMONIZE_TBE2 pow22 = L_add( pow22, L_shr( L_tmp, Q_pow ) ); /* Q22 */ #else - pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ + pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ #endif } } -- GitLab From 58e89be2e45d6a65c4fb621476c3ad614488a63d Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Mar 2026 16:59:37 +0100 Subject: [PATCH 3/4] clang-format --- lib_com/swb_tbe_com_fx.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c index f2331381c..d62427d8c 100644 --- a/lib_com/swb_tbe_com_fx.c +++ b/lib_com/swb_tbe_com_fx.c @@ -674,9 +674,15 @@ void Calc_rc0_h( ptrs = h; +#ifdef FIX_2462_PARCOR_FIX + temp = shr( *ptrs++, 2 ); + move16(); + L_acc = L_mac( L_acc, temp, shr( *ptrs, 2 ) ); +#else temp = *ptrs++; move16(); L_acc = L_mult( temp, *ptrs ); +#endif FOR( i = 1; i < LONG_H_ST - 1; i++ ) { temp = shr( *ptrs++, 2 ); @@ -708,7 +714,11 @@ void Calc_rc0_h( L_acc = L_mac( L_acc, temp, *ptrs ); } } +#ifdef FIX_2462_PARCOR_FIX + L_acc = L_shl_sat( L_acc, sh_acf ); +#else L_acc = L_shl( L_acc, sh_acf ); +#endif acf1 = extract_h( L_acc ); /* Compute 1st parcor */ @@ -1549,7 +1559,7 @@ void GenShapedWBExcitation_ivas_fx( #ifdef HARMONIZE_TBE2 pow22 = L_add( pow22, L_shr( L_tmp, Q_pow ) ); /* Q22 */ #else - pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ + pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ #endif } } -- GitLab From 740200da814ccebaa92ec17485027bd9a1438dbb Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Mar 2026 17:02:52 +0100 Subject: [PATCH 4/4] clang-format --- lib_com/swb_tbe_com_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/swb_tbe_com_fx.c b/lib_com/swb_tbe_com_fx.c index d62427d8c..0520ec2b7 100644 --- a/lib_com/swb_tbe_com_fx.c +++ b/lib_com/swb_tbe_com_fx.c @@ -1559,7 +1559,7 @@ void GenShapedWBExcitation_ivas_fx( #ifdef HARMONIZE_TBE2 pow22 = L_add( pow22, L_shr( L_tmp, Q_pow ) ); /* Q22 */ #else - pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ + pow22 = L_add( pow22, L_shr( L_tmp, 10 ) ); /* Q22 */ #endif } } -- GitLab