From b69e888760f72978ecdf4246e645337e5d670e49 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Mon, 9 Feb 2026 14:55:19 +0100 Subject: [PATCH 01/18] issue: 2427 checking if function TonalMDCTConceal_Detect_ivas_fx() works in legacy mode correctly. --- lib_com/options.h | 1 + lib_dec/er_util_fx.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 61a3c10cc..1f3180b6d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -94,6 +94,7 @@ #define FIX_2404_HARM_SIGNAL_CLAS /* VA: basop-2404, harmonize signal_clas and signa_ivas_clas */ #define HARMONIZE_ACELP_ENC /* VA: basop issue 2400: Remove duplicated main ACELP encoder function */ #define FIX_2392_MSAN_DESTROY_DEC /* VA: basop issue 2392: fix MSAN in ivas_destroy_dec_fx() */ +#define HARMONIZE_2427_GETPLC /* FhG: basop issue : 2427 Harmonizing getPLCDecision functions:*/ /* #################### End BE switches ################################## */ diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 8e28dc546..1e8b78d15 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -574,9 +574,11 @@ Word16 GetPLCModeDecision_fx( { pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } - +#ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); - +#else + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, &(st->hTcxCfg->psychParamsTCX20) ,st->element_mode); +#endif // !HARMONIZE_2427_GETPLC test(); test(); test(); -- GitLab From 320ccd5ad63863df55a57e11ffec5f6f2dfac1fe Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Mon, 9 Feb 2026 15:01:32 +0100 Subject: [PATCH 02/18] issue: 2427 checking clang formatting --- lib_dec/er_util_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 1e8b78d15..755333741 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -577,7 +577,7 @@ Word16 GetPLCModeDecision_fx( #ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, &(st->hTcxCfg->psychParamsTCX20) ,st->element_mode); + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, &( st->hTcxCfg->psychParamsTCX20 ), st->element_mode ); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From 6c87b5b9a520aa98d9a45f5a63da99e57ab07fb4 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Mon, 9 Feb 2026 16:05:15 +0100 Subject: [PATCH 03/18] issue: 2427 generalizing test for Tonal function pair --- lib_dec/er_util_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 755333741..0294af119 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -577,7 +577,7 @@ Word16 GetPLCModeDecision_fx( #ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, &( st->hTcxCfg->psychParamsTCX20 ), st->element_mode ); + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode ); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From df7ee5b1623034724bc6b733dd879ddf5dedc1c3 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Mon, 9 Feb 2026 16:07:51 +0100 Subject: [PATCH 04/18] issue: 2427 clang formatting --- lib_dec/er_util_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 0294af119..9cd81317d 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -577,7 +577,7 @@ Word16 GetPLCModeDecision_fx( #ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode ); + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From 84953aa1f9abd6020270c8d9eb722a04faab9583 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Tue, 10 Feb 2026 15:07:44 +0100 Subject: [PATCH 05/18] issue: 2427 further testing Tonal function pairs --- lib_dec/er_util_fx.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 9cd81317d..6ea15ecec 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -577,8 +577,18 @@ Word16 GetPLCModeDecision_fx( #ifndef HARMONIZE_2427_GETPLC TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); -#endif // !HARMONIZE_2427_GETPLC + IF(st->element_mode != EVS_MONO) + { + // IVAS version + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); + + } + ELSE + { + // EVS version + TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + } + #endif // !HARMONIZE_2427_GETPLC test(); test(); test(); -- GitLab From 255988158b05d743025e3b671fb2d760d5043c48 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Tue, 10 Feb 2026 15:13:08 +0100 Subject: [PATCH 06/18] issue: 2427 fixing formatting --- lib_dec/er_util_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 6ea15ecec..14bbc1a61 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -575,7 +575,7 @@ Word16 GetPLCModeDecision_fx( pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } #ifndef HARMONIZE_2427_GETPLC - TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); + TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); #else IF(st->element_mode != EVS_MONO) { @@ -588,7 +588,7 @@ Word16 GetPLCModeDecision_fx( // EVS version TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); } - #endif // !HARMONIZE_2427_GETPLC +#endif // !HARMONIZE_2427_GETPLC test(); test(); test(); -- GitLab From b22266be5fb84f4a28cc601efaab6212d6557c78 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Tue, 10 Feb 2026 15:37:00 +0100 Subject: [PATCH 07/18] issue: 2427 clang formatting --- lib_dec/er_util_fx.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 14bbc1a61..dc3e430cb 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -575,18 +575,17 @@ Word16 GetPLCModeDecision_fx( pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } #ifndef HARMONIZE_2427_GETPLC - TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else - IF(st->element_mode != EVS_MONO) + IF( st->element_mode != EVS_MONO ) { // IVAS version - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); - + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); } ELSE { // EVS version - TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); } #endif // !HARMONIZE_2427_GETPLC test(); -- GitLab From 9a93c5859259d3d1dd44df119c3ada301e663121 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Tue, 10 Feb 2026 18:21:26 +0100 Subject: [PATCH 08/18] issue: 2427 NULL psychParams version --- lib_dec/er_util_fx.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index dc3e430cb..049463166 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -575,18 +575,10 @@ Word16 GetPLCModeDecision_fx( pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } #ifndef HARMONIZE_2427_GETPLC - TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); + TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); #else - IF( st->element_mode != EVS_MONO ) - { - // IVAS version - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); - } - ELSE - { - // EVS version - TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); - } + // IVAS version + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, NULL , st->element_mode); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From a5e9c5f41e36b3b1d63d49fe446c1d6bebb222dd Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Tue, 10 Feb 2026 18:29:23 +0100 Subject: [PATCH 09/18] issue: 2427 NULL psychParams in conditional statement --- lib_dec/er_util_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 049463166..444cdb0f0 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -578,7 +578,7 @@ Word16 GetPLCModeDecision_fx( TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); #else // IVAS version - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, NULL , st->element_mode); + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : NULL), st->element_mode); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From 4b725157db1a2b70ef4f990e8f054c41611f4513 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 08:59:07 +0100 Subject: [PATCH 10/18] issue: 2427 clang formatting --- lib_dec/er_util_fx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 444cdb0f0..74bdf7449 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -575,10 +575,10 @@ Word16 GetPLCModeDecision_fx( pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } #ifndef HARMONIZE_2427_GETPLC - TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else // IVAS version - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : NULL), st->element_mode); + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : NULL ), st->element_mode ); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From 5eeed9dc054a9e14354d0bfb62d4ba6d9122d1cf Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 09:18:32 +0100 Subject: [PATCH 11/18] issue: 2427 NULL pointer for psychParam --- lib_dec/er_util_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 74bdf7449..0787ad80e 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -578,7 +578,7 @@ Word16 GetPLCModeDecision_fx( TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else // IVAS version - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : NULL ), st->element_mode ); + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, NULL, st->element_mode); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From d053cd387dcd0300fe7f864cb2538f91e2348764 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 09:32:12 +0100 Subject: [PATCH 12/18] issue: 2427 clang formatting patch --- lib_dec/er_util_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 0787ad80e..d5cdd8529 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -578,7 +578,7 @@ Word16 GetPLCModeDecision_fx( TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else // IVAS version - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, NULL, st->element_mode); + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, NULL, st->element_mode ); #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From 207f5aa2d4b25b0fa7897ebbc0635530ac81acc4 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 15:26:59 +0100 Subject: [PATCH 13/18] issue: 2427 giving up on harmonizing Tonal function pair --- lib_dec/er_util_fx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index d5cdd8529..61218a891 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -578,7 +578,13 @@ Word16 GetPLCModeDecision_fx( TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else // IVAS version - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, NULL, st->element_mode ); + IF(st->element_mode != 0) { + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, st->hTcxCfg->psychParamsCurrent, st->element_mode); + } + ELSE{ + TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + } + #endif // !HARMONIZE_2427_GETPLC test(); test(); -- GitLab From 347a0a62f90ee60fc0221f1255aad62a499e981e Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 15:30:08 +0100 Subject: [PATCH 14/18] issue: 2427 Clang formatting --- lib_dec/er_util_fx.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 61218a891..c4d904ce8 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -578,11 +578,13 @@ Word16 GetPLCModeDecision_fx( TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); #else // IVAS version - IF(st->element_mode != 0) { - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, st->hTcxCfg->psychParamsCurrent, st->element_mode); + IF( st->element_mode != 0 ) + { + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, st->hTcxCfg->psychParamsCurrent, st->element_mode ); } - ELSE{ - TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + ELSE + { + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); } #endif // !HARMONIZE_2427_GETPLC -- GitLab From 6f6a6537997d5607c8101aa723beae1c3f43faa9 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 17:32:16 +0100 Subject: [PATCH 15/18] issue: 2427 Further harmonizing uses of the function getplcmodedecision --- lib_dec/dec_LPD_fx.c | 18 +++++++++++++++--- lib_dec/er_util_fx.c | 14 +++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/lib_dec/dec_LPD_fx.c b/lib_dec/dec_LPD_fx.c index 0bc96a369..6834c8dc6 100644 --- a/lib_dec/dec_LPD_fx.c +++ b/lib_dec/dec_LPD_fx.c @@ -174,7 +174,13 @@ void decoder_LPD_fx( move16(); st->core_brate = st->last_core_brate; move16(); - st->core = GetPLCModeDecision_fx( st ); +#ifndef HARMONIZE_2427_GETPLC + st->core = GetPLCModeDecision_fx(st); +#else + st->core = GetPLCModeDecision_ivas_fx(st); +#endif // !HARMONIZE_2427_GETPLC + + move16(); } } @@ -198,8 +204,14 @@ void decoder_LPD_fx( /* PLC: [Common: mode decision] * PLC: Decide which Concealment to use. Update pitch lags if needed */ IF( bfi != 0 ) - { - st->core = GetPLCModeDecision_fx( st ); + { +#ifndef HARMONIZE_2427_GETPLC + st->core = GetPLCModeDecision_fx(st); +#else + st->core = GetPLCModeDecision_ivas_fx(st); +#endif // !HARMONIZE_2427_GETPLC + + move16(); } diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index c4d904ce8..998000b5d 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -448,9 +448,17 @@ Word16 GetPLCModeDecision_ivas_fx( { pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } - - TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); - +#ifndef HARMONIZE_2427_GETPLC + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); +#else + IF(st->element_mode != 0) { + TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); + } + ELSE{ + TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + } +#endif // !1 + test(); test(); test(); -- GitLab From b5698c9d51e5714333a5bfa36ece3793c1fbabaa Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 11 Feb 2026 17:59:38 +0100 Subject: [PATCH 16/18] issue: 2427 Clang formatting --- lib_dec/dec_LPD_fx.c | 14 +++++++------- lib_dec/er_util_fx.c | 14 ++++++++------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib_dec/dec_LPD_fx.c b/lib_dec/dec_LPD_fx.c index 6834c8dc6..81be4557c 100644 --- a/lib_dec/dec_LPD_fx.c +++ b/lib_dec/dec_LPD_fx.c @@ -175,12 +175,12 @@ void decoder_LPD_fx( st->core_brate = st->last_core_brate; move16(); #ifndef HARMONIZE_2427_GETPLC - st->core = GetPLCModeDecision_fx(st); + st->core = GetPLCModeDecision_fx( st ); #else - st->core = GetPLCModeDecision_ivas_fx(st); + st->core = GetPLCModeDecision_ivas_fx( st ); #endif // !HARMONIZE_2427_GETPLC - + move16(); } } @@ -204,14 +204,14 @@ void decoder_LPD_fx( /* PLC: [Common: mode decision] * PLC: Decide which Concealment to use. Update pitch lags if needed */ IF( bfi != 0 ) - { + { #ifndef HARMONIZE_2427_GETPLC - st->core = GetPLCModeDecision_fx(st); + st->core = GetPLCModeDecision_fx( st ); #else - st->core = GetPLCModeDecision_ivas_fx(st); + st->core = GetPLCModeDecision_ivas_fx( st ); #endif // !HARMONIZE_2427_GETPLC - + move16(); } diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 998000b5d..2c805f676 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -449,16 +449,18 @@ Word16 GetPLCModeDecision_ivas_fx( pitch = L_add( st->old_fpitch, 0 ); /*Q16*/ } #ifndef HARMONIZE_2427_GETPLC - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); #else - IF(st->element_mode != 0) { - TonalMDCTConceal_Detect_ivas_fx(st->hTonalMDCTConc, pitch, &numIndices, (EQ_16(st->element_mode, IVAS_CPE_MDCT) ? &(st->hTcxCfg->psychParamsTCX20) : st->hTcxCfg->psychParamsCurrent), st->element_mode); + IF( st->element_mode != 0 ) + { + TonalMDCTConceal_Detect_ivas_fx( st->hTonalMDCTConc, pitch, &numIndices, ( EQ_16( st->element_mode, IVAS_CPE_MDCT ) ? &( st->hTcxCfg->psychParamsTCX20 ) : st->hTcxCfg->psychParamsCurrent ), st->element_mode ); } - ELSE{ - TonalMDCTConceal_Detect(st->hTonalMDCTConc, pitch, &numIndices, st->element_mode); + ELSE + { + TonalMDCTConceal_Detect( st->hTonalMDCTConc, pitch, &numIndices, st->element_mode ); } #endif // !1 - + test(); test(); test(); -- GitLab From 0dc48119784606e971f55414b2cc4fd342d49ca4 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Thu, 12 Feb 2026 09:51:15 +0100 Subject: [PATCH 17/18] issue: 2427 changing declaration place of function GetPLCModeDecision_ivas_fx and removing declaration of GetPLCModeDecision_fx --- lib_com/ivas_prot_fx.h | 2 ++ lib_com/prot_fx.h | 6 +++++- lib_dec/er_util_fx.c | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index ba65afec0..f3703e721 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -1890,9 +1890,11 @@ void TonalMDCTConceal_Detect_ivas_fx( Word16 element_mode ); +#ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_ivas_fx( Decoder_State *st /* i/o: decoder memory state pointer */ ); +#endif // !HARMONIZE_2427_GETPLC void ivas_DetectTonalComponents_fx( Word16 indexOfTonalPeak[], diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 49e042e2d..da1962e80 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -8474,9 +8474,13 @@ void highPassFiltering_fx( const Word16 hp_filt[], /* i: Q15 high pass filter coefficients */ const Word16 l_fir_fer ); /* i: high pass filter length */ - +#ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_fx( Decoder_State *st ); +#else +Word16 GetPLCModeDecision_ivas_fx( + Decoder_State* st); +#endif // !HARMONIZE_2427_GETPLC void lpc_unquantize_fx( Decoder_State *st, diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 2c805f676..0dca78d7f 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -496,6 +496,7 @@ Word16 GetPLCModeDecision_ivas_fx( return core; /*Q0*/ } +#ifndef HARMONIZE_2427_GETPLC Word16 GetPLCModeDecision_fx( Decoder_State *st /* i/o: decoder memory state pointer */ ) @@ -632,3 +633,4 @@ Word16 GetPLCModeDecision_fx( } return core; } +#endif // !HARMONIZE_2427_GETPLC \ No newline at end of file -- GitLab From 80b9908dca19e6610b4b3e1d72fd7212ddfbc79c Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Thu, 12 Feb 2026 10:05:46 +0100 Subject: [PATCH 18/18] issue: 2427 Clang formatting --- lib_com/prot_fx.h | 2 +- lib_dec/er_util_fx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index da1962e80..c07c7628f 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -8479,7 +8479,7 @@ Word16 GetPLCModeDecision_fx( Decoder_State *st ); #else Word16 GetPLCModeDecision_ivas_fx( - Decoder_State* st); + Decoder_State *st ); #endif // !HARMONIZE_2427_GETPLC void lpc_unquantize_fx( diff --git a/lib_dec/er_util_fx.c b/lib_dec/er_util_fx.c index 0dca78d7f..6dacc0096 100644 --- a/lib_dec/er_util_fx.c +++ b/lib_dec/er_util_fx.c @@ -633,4 +633,4 @@ Word16 GetPLCModeDecision_fx( } return core; } -#endif // !HARMONIZE_2427_GETPLC \ No newline at end of file +#endif // !HARMONIZE_2427_GETPLC -- GitLab