diff --git a/lib_com/options.h b/lib_com/options.h index 0c348e36b8271c1e8a0c34ff7c1d5818c6d93859..8a960be74c8eabf6ed3bf9ddfcd4e7bae2d7716b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -134,6 +134,7 @@ #define FIX_737_HQ_ACELP_SWITCH_SCALING_ERROR /* Eri: Proposed fix for issue 737: scaling error in excitation memory after HQ->ACELP switch */ #define FIX_736_BWE_SECT_C // Solves an issue where the BWE was disappearing, problem related to wrong scaling in ic-BWE #define FIX_734_MISSING_SUBFR_LOW_RATE_ACELP +#define FIX_747_TDBWE_ENERGY_BURST /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index 2cf9bcc3a26452b2c3c4c752edc296fe233ce5f8..55dfe2f50e7b7743a1b0a4fcc8931bdd44771967 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -2012,9 +2012,18 @@ ivas_error core_switching_post_dec_ivas_fx( test(); test(); test(); + +#ifdef FIX_747_TDBWE_ENERGY_BURST + IF( ( ( EQ_16( st_fx->extl, SWB_TBE ) || EQ_16( st_fx->extl, FB_TBE ) || EQ_16( st_fx->extl, SWB_CNG ) ) && + ( NE_16( st_fx->L_frame, st_fx->last_L_frame ) || ( NE_16( st_fx->last_extl, SWB_TBE ) && NE_16( st_fx->last_extl, FB_TBE ) && NE_16( st_fx->last_core, TCX_20_CORE ) && NE_16( st_fx->last_core, TCX_10_CORE ) ) || EQ_16( st_fx->last_core, HQ_CORE ) ) ) || + ( LT_16( st_fx->bwidth, st_fx->last_bwidth ) && NE_16( st_fx->last_extl, SWB_TBE ) ) || st_fx->old_ppp_mode || ( ( EQ_16( st_fx->prev_coder_type, AUDIO ) || EQ_16( st_fx->prev_coder_type, INACTIVE ) ) && st_fx->bws_cnt > 0 ) + || ( st_fx->bws_cnt == 0 && EQ_16( st_fx->prev_bws_cnt, N_WS2N_FRAMES ) ) ) +#else IF( ( ( EQ_16( st_fx->extl, SWB_TBE ) || EQ_16( st_fx->extl, FB_TBE ) || EQ_16( st_fx->extl, SWB_CNG ) ) && ( NE_16( st_fx->L_frame, st_fx->last_L_frame ) || ( NE_16( st_fx->last_extl, SWB_TBE ) && NE_16( st_fx->last_extl, FB_TBE ) ) || EQ_16( st_fx->last_core, HQ_CORE ) ) ) || ( LT_16( st_fx->bwidth, st_fx->last_bwidth ) && NE_16( st_fx->last_extl, SWB_TBE ) ) || st_fx->old_ppp_mode || ( ( EQ_16( st_fx->prev_coder_type, AUDIO ) || EQ_16( st_fx->prev_coder_type, INACTIVE ) ) && st_fx->bws_cnt > 0 ) || ( st_fx->bws_cnt == 0 && EQ_16( st_fx->prev_bws_cnt, N_WS2N_FRAMES ) ) ) + +#endif { swb_tbe_reset_fx( hBWE_TD->mem_csfilt_fx, hBWE_TD->mem_genSHBexc_filt_down_shb_fx, hBWE_TD->state_lpc_syn_fx, hBWE_TD->syn_overlap_fx, hBWE_TD->state_syn_shbexc_fx, &( hBWE_TD->tbe_demph_fx ), &( hBWE_TD->tbe_premph_fx ), hBWE_TD->mem_stp_swb_fx, &( hBWE_TD->gain_prec_swb_fx ) );