From 3a34304957acacbbd22734c25a1eaadee8b81597 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 27 May 2026 13:27:47 +0200 Subject: [PATCH 1/4] issue 2550: adding assert and switch to figure out if there is really a functional difference --- lib_com/options.h | 1 + lib_enc/tcx_utils_enc_fx.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index cd569d12b..475d618fa 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -112,6 +112,7 @@ #define HARMONIZE_2553_TonalConceal_Init /* FhG: Harmonize TonalMDCTConceal_Init with its ivas derivate */ #define HARMONIZE_2553_TonalConceal_SaveFreqSignal /* FhG: Harmonize TonalConceal_SaveFreqSignal with its ivas derivate */ #define HARMONIZE_2553_TonalConceal_SaveTimeSignal /* FhG: Harmonize TonalConceal_SaveTimeSignal with its ivas derivate */ +#define FIX_ISSUE_2550_REVIEW_CONDITIONS /* FhG: BASOP Issue 2550: Review conditions in tcx_encoder_memory_update()*/ /* #################### End BE switches ################################## */ diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 757cfeb8f..59bca3e28 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -2623,6 +2623,10 @@ void tcx_encoder_memory_update_ivas_fx( move16(); test(); +#ifdef FIX_ISSUE_2550_REVIEW_CONDITIONS + assert(st->tcxonly == 0 || GE_16(L_frame_glob, L_FRAME16k)); +#endif // FIX_ISSUE_2550_REVIEW_CONDITIONS + IF( st->tcxonly == 0 || LE_16( L_frame_glob, L_FRAME16k ) ) { /* Update excitation */ -- GitLab From 69c74642fbaa347d13eb1e7dd8854721a2f6a2d0 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 27 May 2026 13:47:23 +0200 Subject: [PATCH 2/4] issue 2550: Clang formatting patch --- lib_enc/tcx_utils_enc_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 873d2d1e0..6c55776e8 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -2484,7 +2484,7 @@ void tcx_encoder_memory_update_ivas_fx( test(); #ifdef FIX_ISSUE_2550_REVIEW_CONDITIONS - assert(st->tcxonly == 0 || GE_16(L_frame_glob, L_FRAME16k)); + assert( st->tcxonly == 0 || GE_16( L_frame_glob, L_FRAME16k ) ); #endif // FIX_ISSUE_2550_REVIEW_CONDITIONS IF( st->tcxonly == 0 || LE_16( L_frame_glob, L_FRAME16k ) ) -- GitLab From 65bb113f68341e5f269cd8753749aba3e08c7261 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 27 May 2026 15:34:58 +0200 Subject: [PATCH 3/4] issue 2550: applying the same assert in function tcx_encoder_memory_update_fx() --- lib_enc/tcx_utils_enc_fx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 6c55776e8..27b351d03 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -2406,6 +2406,9 @@ void tcx_encoder_memory_update_fx( Copy( synth + sub( L_frame_glob, L_SYN_MEM ), LPDmem->mem_syn_r, L_SYN_MEM ); test(); +#ifdef FIX_ISSUE_2550_REVIEW_CONDITIONS + assert(st->tcxonly == 0 || GE_16(L_frame_glob, L_FRAME16k)); +#endif // FIX_ISSUE_2550_REVIEW_CONDITIONS IF( st->tcxonly == 0 || LE_16( L_frame_glob, L_FRAME16k ) ) { /* Update excitation */ -- GitLab From 95ec6a42f596400d86bad25a57392d42946f6067 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Wed, 27 May 2026 15:37:16 +0200 Subject: [PATCH 4/4] issue 2550: Clang formatting patch --- lib_enc/tcx_utils_enc_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 27b351d03..95cfa5c50 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -2407,7 +2407,7 @@ void tcx_encoder_memory_update_fx( test(); #ifdef FIX_ISSUE_2550_REVIEW_CONDITIONS - assert(st->tcxonly == 0 || GE_16(L_frame_glob, L_FRAME16k)); + assert( st->tcxonly == 0 || GE_16( L_frame_glob, L_FRAME16k ) ); #endif // FIX_ISSUE_2550_REVIEW_CONDITIONS IF( st->tcxonly == 0 || LE_16( L_frame_glob, L_FRAME16k ) ) { -- GitLab