diff --git a/lib_com/options.h b/lib_com/options.h index 3022909a35ae61f8ac37c70f8e8a4646134edd9d..a106710c88ef5f4dea8da12887d31b0a2bf292a8 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -104,6 +104,7 @@ #define FIX_2489_HARMONIZE_FdCng_encodeSID /* FhG: harmonize FdCng_encodeSID_fx() and FdCng_encodeSID_ivas_fx() */ #define FIX_1527_CMR_BITRATE_IDX /* Fix for incorrect bitrate idx packed in rtp CMR E-byte */ #define HARMONIZE_2494_FdCng_decodeSID_fx /* FhG: harmonize FdCng_decodeSID_fx with _ivas_ version */ +#define FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM /* FhG: BASOP 2509: st->hTcxCfg->psychParamsCurrent is not initialized */ /* #################### End BE switches ################################## */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 21035960d97191217a2cc5cd19087a779e3a4b78..5eb6bc7e9ec79bbf2674c12483cd3525cd688aa7 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -7295,7 +7295,12 @@ ivas_error ppp_quarter_decoder_fx( void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ - const Word16 bwidth /* Q0 */ +#ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM + const Word16 bwidth /* Q0 */ +#else + const Word16 bwidth, /* Q0 */ + const Word16 is_init /* i : indicate call during initialization */ +#endif ); void open_decoder_LPD_ivas_fx( diff --git a/lib_dec/core_dec_init_fx.c b/lib_dec/core_dec_init_fx.c index dd3115fb709f0b1bcbdffa12ccfacdde208e166c..357a57f0b888d233890ba3ae2fc98ab8272fa635 100644 --- a/lib_dec/core_dec_init_fx.c +++ b/lib_dec/core_dec_init_fx.c @@ -20,7 +20,12 @@ void open_decoder_LPD_fx( Decoder_State *st, const Word32 total_brate, /* Q0 */ - const Word16 bwidth /* Q0 */ +#ifndef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM + const Word16 bwidth /* Q0 */ +#else + const Word16 bwidth, /* Q0 */ + const Word16 is_init /* i : indicate call during initialization */ +#endif ) { Word16 i; @@ -206,6 +211,29 @@ void open_decoder_LPD_fx( set16_fx( hBWE_TD->cur_sub_Aq_fx, 0, M + 1 ); /* Q12 */ } +#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM + IF( st->hIGFDec != NULL ) + { + test(); + IF( !is_init || NE_16( st->element_mode, IVAS_CPE_MDCT ) ) + { + init_tcx_cfg_fx( st->hTcxCfg, total_brate, st->sr_core, st->output_Fs, st->L_frame, st->bwidth, st->hTcxDec->L_frameTCX, st->fscale, st->preemph_fac, st->tcxonly, st->rf_flag, st->igf, st->hIGFDec->infoIGFStopFreq, st->element_mode, st->ini_frame, MCT_flag, fscaleFB ); + } + ELSE + { + st->hTcxCfg->tcx_curr_overlap_mode = st->hTcxCfg->tcx_last_overlap_mode = ALDO_WINDOW; + move16(); + move16(); + st->hTcxCfg->last_aldo = 1; + move16(); + } + } + + IF( st->hTECDec != NULL ) + { + resetTecDec_Fx( st->hTECDec ); + } +#else /*TCX config*/ st->hTcxCfg->preemph_fac = st->preemph_fac; move16(); @@ -269,6 +297,7 @@ void open_decoder_LPD_fx( /* Initialize decoder delay */ +#endif if ( NE_16( st->element_mode, IVAS_SCE ) ) { diff --git a/lib_dec/core_dec_switch_fx.c b/lib_dec/core_dec_switch_fx.c index 142609fff4505ab659dc70912ef87ecd305fabeb..ea55dd251049f3449dcb7b9a9acd62c1a5697588 100644 --- a/lib_dec/core_dec_switch_fx.c +++ b/lib_dec/core_dec_switch_fx.c @@ -89,7 +89,11 @@ void mode_switch_decoder_LPD_fx( test(); IF( NE_16( fscale, st->fscale ) || ( switchWB != 0 ) || ( bSwitchFromAmrwbIO != 0 ) || EQ_16( st->last_codec_mode, MODE1 ) || st->force_lpd_reset ) { +#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM + open_decoder_LPD_fx( st, total_brate, bwidth, 0 ); +#else open_decoder_LPD_fx( st, total_brate, bwidth ); +#endif } ELSE { diff --git a/lib_dec/init_dec_fx.c b/lib_dec/init_dec_fx.c index bae2638e15c67d5ccb26102b92b4f527bc961233..d3b61ab39baff869796c8d7f61dfeb4c02cfd497 100644 --- a/lib_dec/init_dec_fx.c +++ b/lib_dec/init_dec_fx.c @@ -881,7 +881,11 @@ ivas_error init_decoder_fx( /* Init Decoder */ IF( st_fx->element_mode == EVS_MONO ) { +#ifdef FIX_BASOP_2509_EVS_CONCEAL_UNINIT_MEM + open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth, 1 ); +#else open_decoder_LPD_fx( st_fx, st_fx->total_brate, st_fx->bwidth ); +#endif } ELSE {