From 035b9d302c79338f3373496285a321a68bd6b9f2 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Fri, 13 Mar 2026 14:36:06 +0100 Subject: [PATCH] harmonize enc_prm_hm() and enc_prm_hm_ivas_fx() --- lib_com/options.h | 3 ++- lib_enc/enc_prm_fx.c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3c358ec83..136cc853b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -99,8 +99,9 @@ #define FIX_BASOP_2470_POWER_SPEC_E_INIT /* FhG: make sure powerSpec_e is always initialized in core_signal_analysis_high_bitrate_fx() */ #define FIX_BASOP_2475_ASSERT_IN_MASA2_REND_TO_MONO /* Nokia: basop issue 2475: Fix MASA2 to MONO rendering within IVAS_rend */ #define FIX_2346_DUPLICATED_IGF_FUNCTIONS /* FhG: basop issue 2346: Review potentially duplicated IGF functions */ - #define HARMONIZE_2446_CON_TCX_FX /* FhG: basop issue: 2446 harmonization of function con_tcx_fx() */ +#define FIX_BASOP_2478_HARM_ENC_PRM_HM /* FhG: basop issue 2478: harmonize enc_prm_hm() and enc_prm_hm_ivas_fx() */ + /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ diff --git a/lib_enc/enc_prm_fx.c b/lib_enc/enc_prm_fx.c index b076fcb0b..943bd943a 100644 --- a/lib_enc/enc_prm_fx.c +++ b/lib_enc/enc_prm_fx.c @@ -14,6 +14,7 @@ #include "prot_fx_enc.h" /* Function prototypes */ +#ifndef FIX_BASOP_2478_HARM_ENC_PRM_HM static void enc_prm_hm( Word16 *prm_hm, /* Q0 */ Encoder_State *st, @@ -53,6 +54,9 @@ static void enc_prm_hm( } } static void enc_prm_hm_ivas_fx( +#else +static void enc_prm_hm_fx( +#endif Word16 *prm_hm, /* Q0 */ Encoder_State *st, Word16 L_frame /* Q0 */ @@ -754,7 +758,11 @@ void enc_prm_fx( test(); IF( hTcxEnc->tcx_lpc_shaped_ari && NE_16( last_core, ACELP_CORE ) ) { +#ifdef FIX_BASOP_2478_HARM_ENC_PRM_HM + enc_prm_hm_fx( &prm[j], st, hm_size ); +#else enc_prm_hm( &prm[j], st, hm_size ); +#endif } /*Context HM flag*/ @@ -1235,7 +1243,11 @@ void writeTCXparam_fx( test(); IF( st->hTcxEnc->tcx_lpc_shaped_ari && last_core != ACELP_CORE && EQ_16( core, TCX_20_CORE ) ) { +#ifdef FIX_BASOP_2478_HARM_ENC_PRM_HM + enc_prm_hm_fx( &prm[j], st, hm_size ); +#else enc_prm_hm_ivas_fx( &prm[j], st, hm_size ); +#endif } /*Context HM flag*/ -- GitLab