From 9bd1eebf5442faadafa03361ffe414c860f09f70 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Fri, 13 Feb 2026 13:52:04 +0100 Subject: [PATCH 1/2] issue: 2437 removing instances of EncodeIndex_ivas_fx() and converting them to EncodeIndex_fx() --- lib_com/options.h | 1 + lib_enc/ari_hm_enc_fx.c | 2 ++ lib_enc/enc_prm_fx.c | 17 +++++++++++++---- lib_enc/prot_fx_enc.h | 4 ++-- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 6f0d8e55e..70f2599cd 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -92,6 +92,7 @@ #define HARM_FD_BWE /* VA: harmonize core-coder FD BWE function duplications */ #define FIX_2411_Harmonize_TNSANALYSIS_DETECTTNSFILT /* FhG: basop issue 2411: harmonize TNSAnalysis*_fx(), DetectTnsFilt*_fx()*/ #define HARMONIZE_READ_DECODE_TNS /* FhG basop 2389: Harm between two pairs of functions. */ +#define FIX_2437_HARMONIZE_ENCODERINDEX /* FhG: basop issue 2437 EncoderIndex_ivas_fx() and EncoderIndex_fx()*/ /* #################### End BE switches ################################## */ diff --git a/lib_enc/ari_hm_enc_fx.c b/lib_enc/ari_hm_enc_fx.c index d70f09062..69b355300 100644 --- a/lib_enc/ari_hm_enc_fx.c +++ b/lib_enc/ari_hm_enc_fx.c @@ -51,6 +51,7 @@ Word16 EncodeIndex_fx( return 8; } } +#ifndef FIX_2437_HARMONIZE_ENCODERINDEX Word16 EncodeIndex_ivas_fx( const Word16 Bandwidth, Word16 PeriodicityIndex, @@ -79,6 +80,7 @@ Word16 EncodeIndex_ivas_fx( return 8; } } +#endif // !FIX_2437_HARMONIZE_ENCODERINDEX /*-------------------------------------------------------------------* * SearchPeriodicityIndex_Single() * diff --git a/lib_enc/enc_prm_fx.c b/lib_enc/enc_prm_fx.c index e28dd0bf9..4a7348185 100644 --- a/lib_enc/enc_prm_fx.c +++ b/lib_enc/enc_prm_fx.c @@ -82,7 +82,11 @@ static void enc_prm_hm_ivas_fx( flag = 1; move16(); } - EncodeIndex_ivas_fx( flag, prm_hm[1], hBstr ); +#ifndef FIX_2437_HARMONIZE_ENCODERINDEX + EncodeIndex_ivas_fx(flag, prm_hm[1], hBstr); +#else + EncodeIndex_fx(flag, prm_hm[1], hBstr); +#endif // !FIX_2437_HARMONIZE_ENCODERINDEX IF( EQ_16( st->hTcxCfg->coder_type, VOICED ) ) { @@ -1233,9 +1237,14 @@ void writeTCXparam_fx( push_next_indice( hBstr, prm[j], 1 ); IF( prm[j] ) - { - EncodeIndex_ivas_fx( (Word16) GE_16( hm_size, 256 ), prm[j + 1], hBstr ); - + { +#ifndef FIX_2437_HARMONIZE_ENCODERINDEX + EncodeIndex_ivas_fx((Word16)GE_16(hm_size, 256), prm[j + 1], hBstr); +#else + EncodeIndex_fx((Word16)GE_16(hm_size, 256), prm[j + 1], hBstr); +#endif // !FIX_2437_HARMONIZE_ENCODERINDEX + + flag_ctx_hm = 1; move16(); } diff --git a/lib_enc/prot_fx_enc.h b/lib_enc/prot_fx_enc.h index d6b13aa6e..ebe4f4aa5 100644 --- a/lib_enc/prot_fx_enc.h +++ b/lib_enc/prot_fx_enc.h @@ -2577,13 +2577,13 @@ Word16 EncodeIndex_fx( Word16 PeriodicityIndex, BSTR_ENC_HANDLE hBst /* i/o: bitstream handle */ ); - +#ifndef FIX_2437_HARMONIZE_ENCODERINDEX Word16 EncodeIndex_ivas_fx( const Word16 Bandwidth, /* 0: NB, 1: (S)WB */ Word16 PeriodicityIndex, BSTR_ENC_HANDLE hBst /* i/o: bitstream handle */ ); - +#endif void enc_prm_side_Info_fx( PLC_ENC_EVS_HANDLE hPlc_Ext, Encoder_State *st ); -- GitLab From f6cf9ba969012bab866bebdc63a6b1254f14fbb9 Mon Sep 17 00:00:00 2001 From: "Azizi, Arash" Date: Fri, 13 Feb 2026 13:55:24 +0100 Subject: [PATCH 2/2] issue: 2437 Clang formatting patch --- lib_enc/enc_prm_fx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_enc/enc_prm_fx.c b/lib_enc/enc_prm_fx.c index 4a7348185..3a4a043e3 100644 --- a/lib_enc/enc_prm_fx.c +++ b/lib_enc/enc_prm_fx.c @@ -83,9 +83,9 @@ static void enc_prm_hm_ivas_fx( move16(); } #ifndef FIX_2437_HARMONIZE_ENCODERINDEX - EncodeIndex_ivas_fx(flag, prm_hm[1], hBstr); + EncodeIndex_ivas_fx( flag, prm_hm[1], hBstr ); #else - EncodeIndex_fx(flag, prm_hm[1], hBstr); + EncodeIndex_fx( flag, prm_hm[1], hBstr ); #endif // !FIX_2437_HARMONIZE_ENCODERINDEX IF( EQ_16( st->hTcxCfg->coder_type, VOICED ) ) @@ -1237,14 +1237,14 @@ void writeTCXparam_fx( push_next_indice( hBstr, prm[j], 1 ); IF( prm[j] ) - { + { #ifndef FIX_2437_HARMONIZE_ENCODERINDEX - EncodeIndex_ivas_fx((Word16)GE_16(hm_size, 256), prm[j + 1], hBstr); + EncodeIndex_ivas_fx( (Word16) GE_16( hm_size, 256 ), prm[j + 1], hBstr ); #else - EncodeIndex_fx((Word16)GE_16(hm_size, 256), prm[j + 1], hBstr); + EncodeIndex_fx( (Word16) GE_16( hm_size, 256 ), prm[j + 1], hBstr ); #endif // !FIX_2437_HARMONIZE_ENCODERINDEX - + flag_ctx_hm = 1; move16(); } -- GitLab