From c1740d4906a31c04982219387b4e85259ed7063b Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Wed, 20 May 2026 08:46:18 +0200 Subject: [PATCH 1/2] added macro and code HARMONIZE_2595_reconfig_decoder_LPD --- lib_com/options.h | 1 + lib_com/prot_fx.h | 8 +++++++- lib_dec/core_dec_reconf_fx.c | 13 +++++++++++++ lib_dec/core_dec_switch_fx.c | 4 ++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index cd569d12b..73f33ca5c 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 HARMONIZE_2595_reconfig_decoder_LPD /* FhG: Harmonize reconfig_decoder_LPD with its ivas derivate */ /* #################### End BE switches ################################## */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index c434a6fc1..d28dde49d 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -7881,6 +7881,7 @@ Word16 RCcontextMapping_decode2_no_mem_s17_LCS_fx( CONTEXT_HM_CONFIG *hm_cfg /* i : context-based harmonic model configuration*/ ); +#ifndef HARMONIZE_2595_reconfig_decoder_LPD void reconfig_decoder_LPD_fx( Decoder_State *st, /* i/o: decoder state structure */ Word16 bits_frame, /* i : bit budget Q0*/ @@ -7888,9 +7889,14 @@ void reconfig_decoder_LPD_fx( Word32 total_brate, /* i : total bitrate Q0*/ Word16 L_frame_old /* i : frame length Q0*/ ); +#endif +#ifdef HARMONIZE_2595_reconfig_decoder_LPD +void reconfig_decoder_LPD_fx( +#else void reconfig_decoder_LPD_ivas_fx( - Decoder_State *st, /* i/o: decoder state structure */ +#endif + Decoder_State *st, /* i/o: decoder state structure */ const Word16 bits_frame, /* i : bit budget Q0*/ const Word16 bwidth, /* i : audio bandwidth Q0*/ const Word32 total_brate, /* i : total bitrate Q0*/ diff --git a/lib_dec/core_dec_reconf_fx.c b/lib_dec/core_dec_reconf_fx.c index d844e666b..2ce222776 100644 --- a/lib_dec/core_dec_reconf_fx.c +++ b/lib_dec/core_dec_reconf_fx.c @@ -10,7 +10,11 @@ #include "rom_com.h" +#ifdef HARMONIZE_2595_reconfig_decoder_LPD +void reconfig_decoder_LPD_fx( +#else void reconfig_decoder_LPD_ivas_fx( +#endif Decoder_State *st, /* i/o: decoder state structure */ const Word16 bits_frame, /* i : bit budget Q0*/ const Word16 bwidth, /* i : audio bandwidth Q0*/ @@ -168,6 +172,13 @@ void reconfig_decoder_LPD_ivas_fx( ELSE { set16_fx( st->mem_syn_clas_estim_fx, 0, L_SYN_MEM_CLAS_ESTIM ); /* Qx */ +#ifdef HARMONIZE_2595_reconfig_decoder_LPD + if ( EQ_16( st->element_mode, EVS_MONO ) ) + { + st->classifier_Q_mem_syn = 0; + move16(); + } +#endif } } } @@ -193,6 +204,7 @@ void reconfig_decoder_LPD_ivas_fx( return; } +#ifndef HARMONIZE_2595_reconfig_decoder_LPD void reconfig_decoder_LPD_fx( Decoder_State *st, /* i/o: decoder state structure */ Word16 bits_frame, /* i : bit budget Q0*/ @@ -386,3 +398,4 @@ void reconfig_decoder_LPD_fx( return; } +#endif diff --git a/lib_dec/core_dec_switch_fx.c b/lib_dec/core_dec_switch_fx.c index a9d9d24d7..07c9f68a1 100644 --- a/lib_dec/core_dec_switch_fx.c +++ b/lib_dec/core_dec_switch_fx.c @@ -383,7 +383,11 @@ void mode_switch_decoder_LPD_ivas_fx( frame_size = FrameSizeConfig[frame_size_index].frame_net_bits; move16(); +#ifdef HARMONIZE_2595_reconfig_decoder_LPD + reconfig_decoder_LPD_fx( st, frame_size, bwidth, total_brate, st->last_L_frame ); +#else reconfig_decoder_LPD_ivas_fx( st, frame_size, bwidth, total_brate, st->last_L_frame ); +#endif test(); IF( hTcxDec->envWeighted && !hTcxDec->enableTcxLpc ) -- GitLab From bf43a3a7281421454d25e9348ceb313b9ad18216 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Thu, 21 May 2026 10:49:12 +0200 Subject: [PATCH 2/2] remove conditioning around reset of st->classifier_Q_mem_syn --- lib_dec/core_dec_reconf_fx.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib_dec/core_dec_reconf_fx.c b/lib_dec/core_dec_reconf_fx.c index 2ce222776..e7905e262 100644 --- a/lib_dec/core_dec_reconf_fx.c +++ b/lib_dec/core_dec_reconf_fx.c @@ -173,11 +173,8 @@ void reconfig_decoder_LPD_ivas_fx( { set16_fx( st->mem_syn_clas_estim_fx, 0, L_SYN_MEM_CLAS_ESTIM ); /* Qx */ #ifdef HARMONIZE_2595_reconfig_decoder_LPD - if ( EQ_16( st->element_mode, EVS_MONO ) ) - { - st->classifier_Q_mem_syn = 0; - move16(); - } + st->classifier_Q_mem_syn = 0; + move16(); #endif } } -- GitLab