diff --git a/lib_com/options.h b/lib_com/options.h index 27e64a41c68b5aa02a8d896557b3b0c0c5c14c17..cc9a0d7f87b76d61d1e418f056c120aaa06987af 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -92,6 +92,7 @@ #define NONBE_FIX_ISSUE_2206_AVOID_OVERFLOW_MSVQ_Interpol_Tran_fx /* FhG: Fix saturation crash in MSVQ_Interpol_Tran_fx() */ #define NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT_FIX_2527 /* Fix crash from issue #2527 */ #define FIX_FLOAT_1539_G192_FORMAT_SWITCH /* VA/Nokia: reintroduce format switching for g192 bitstreams */ +#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 196a375830fc95e3b8fbae2c1a58e8d029b3788a..55fbb9362a5afac17f73730ae9d73c4bab6987f9 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -7821,6 +7821,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*/ @@ -7828,9 +7829,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 d844e666b1b6bcec91a7bc17b6496825a0867360..e7905e262b27b9a14f5b76aa69ab3999e97ce147 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,10 @@ 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 + st->classifier_Q_mem_syn = 0; + move16(); +#endif } } } @@ -193,6 +201,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 +395,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 a9d9d24d7d8eee81332d99d00a8bd2e558b173f8..07c9f68a197a3f2db429a6fabccfd68057a6d40c 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 )