From 7685722e21f54c1da6bc8fcd2bd91b2d3899287b Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 19 Apr 2026 08:02:03 -0400 Subject: [PATCH 1/7] proposed fix to 2547 --- lib_com/options.h | 1 + lib_dec/core_switching_dec_fx.c | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 3077f91f2..977071f0e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -127,6 +127,7 @@ #define FIX_BASOP_2531_MCT_CP_BITRATE /* FhG: BASOP issue 2531: Fix MCT cp_bitrate calculation; affects bitrate switching only */ #define FIX_BASOP_2541_OMASA_ENC_FIXES /* Nokia: BASOP issue 2541: Fix function ivas_encode_masaism_metadata_fx */ #define FIX_BASOP_2545_FIX_LTV_REGRESSION_2529 /* Nokia: BASOP issue 2545: Fix LTV regression caused by issue 2529 fix */ +#define FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC /* VA : Basop issue yyyy: Align conditions in core sw dec */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index 2a7ee9fdb..4e59214b3 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -567,7 +567,11 @@ ivas_error core_switching_post_dec_fx( hBWE_TD->bwe_non_lin_prev_scale_fx = L_deposit_l( 0 ); move32(); } +#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC IF( st_fx->hHQ_core != NULL && !( EQ_16( inner_frame_tbl[st_fx->bwidth], L_FRAME16k ) && EQ_32( st_fx->core_brate, HQ_32k ) ) ) +#else + IF( st_fx->hHQ_core != NULL && !( EQ_16( inner_frame_tbl[st_fx->bwidth], L_FRAME16k ) && LE_32( st_fx->core_brate, HQ_32k ) ) ) +#endif { set32_fx( hHQ_core->prev_env_fx, 0, SFM_N_WB ); set32_fx( hHQ_core->prev_normq_fx, 0, SFM_N_WB ); @@ -725,9 +729,20 @@ ivas_error core_switching_post_dec_fx( test(); test(); test(); - IF( ( st_fx->hBWE_FD != NULL ) && ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || - ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) - { +#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC + IF( ( st_fx->hBWE_FD != NULL ) && + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) + || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) + || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) + || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) +#else + IF ( st_fx->hBWE_FD != NULL && + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || + ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && + st_fx->extl < 0 && EQ_16( st_fx->core, ACELP_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && NE_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) +#endif + { + set16_fx( hBWE_FD->L_old_wtda_swb_fx, 0, output_frame ); hBWE_FD->old_wtda_swb_fx_exp = 0; move16(); @@ -852,7 +867,11 @@ ivas_error core_switching_post_dec_fx( /* reset WB TBE buffers */ test(); +#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) ) +#else + IF ( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) && NE_16( st_fx->last_core, TCX_20_CORE ) && NE_16( st_fx->last_core, TCX_10_CORE ) ) +#endif { wb_tbe_extras_reset_fx( hBWE_TD->mem_genSHBexc_filt_down_wb2_fx, hBWE_TD->mem_genSHBexc_filt_down_wb3_fx ); wb_tbe_extras_reset_synth_fx( hBWE_TD->state_lsyn_filt_shb_fx, hBWE_TD->state_lsyn_filt_dwn_shb_fx, hBWE_TD->state_32and48k_WB_upsample_fx, hBWE_TD->mem_resamp_HB_fx ); -- GitLab From bbf11a77a5317a401ee06ee8c682eb57a48a9abe Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 19 Apr 2026 08:05:06 -0400 Subject: [PATCH 2/7] Fix clang --- lib_dec/core_switching_dec_fx.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index 4e59214b3..ad24688ab 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -730,18 +730,16 @@ ivas_error core_switching_post_dec_fx( test(); test(); #ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC - IF( ( st_fx->hBWE_FD != NULL ) && - ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) - || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) - || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) - || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) + IF( ( st_fx->hBWE_FD != NULL ) && + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) #else - IF ( st_fx->hBWE_FD != NULL && - ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || - ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && - st_fx->extl < 0 && EQ_16( st_fx->core, ACELP_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && NE_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) + IF( st_fx->hBWE_FD != NULL && + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || + ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && + st_fx->extl < 0 && EQ_16( st_fx->core, ACELP_CORE ) ) || + ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && NE_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) #endif - { + { set16_fx( hBWE_FD->L_old_wtda_swb_fx, 0, output_frame ); hBWE_FD->old_wtda_swb_fx_exp = 0; @@ -870,8 +868,8 @@ ivas_error core_switching_post_dec_fx( #ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) ) #else - IF ( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) && NE_16( st_fx->last_core, TCX_20_CORE ) && NE_16( st_fx->last_core, TCX_10_CORE ) ) -#endif + IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) && NE_16( st_fx->last_core, TCX_20_CORE ) && NE_16( st_fx->last_core, TCX_10_CORE ) ) +#endif { wb_tbe_extras_reset_fx( hBWE_TD->mem_genSHBexc_filt_down_wb2_fx, hBWE_TD->mem_genSHBexc_filt_down_wb3_fx ); wb_tbe_extras_reset_synth_fx( hBWE_TD->state_lsyn_filt_shb_fx, hBWE_TD->state_lsyn_filt_dwn_shb_fx, hBWE_TD->state_32and48k_WB_upsample_fx, hBWE_TD->mem_resamp_HB_fx ); -- GitLab From ef98519b2032d73d1db8b9a62ccbcca87ad0042f Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 19 Apr 2026 18:48:07 -0400 Subject: [PATCH 3/7] fix nbe_EVS --- lib_dec/core_switching_dec_fx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index ad24688ab..b2a3677f1 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -731,10 +731,13 @@ ivas_error core_switching_post_dec_fx( test(); #ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC IF( ( st_fx->hBWE_FD != NULL ) && - ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) + || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) + || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) #else IF( st_fx->hBWE_FD != NULL && - ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || + ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && EQ_16( st_fx->core, ACELP_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && NE_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) @@ -865,7 +868,7 @@ ivas_error core_switching_post_dec_fx( /* reset WB TBE buffers */ test(); -#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC +#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC_EVS IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) ) #else IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) && NE_16( st_fx->last_core, TCX_20_CORE ) && NE_16( st_fx->last_core, TCX_10_CORE ) ) -- GitLab From e78abac74305b66df56e4ea9e5af3049fe6590e0 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 19 Apr 2026 18:52:06 -0400 Subject: [PATCH 4/7] clang --- lib_dec/core_switching_dec_fx.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index b2a3677f1..fa55c79be 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -731,13 +731,11 @@ ivas_error core_switching_post_dec_fx( test(); #ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC IF( ( st_fx->hBWE_FD != NULL ) && - ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) - || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) - || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) #else IF( st_fx->hBWE_FD != NULL && - ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || - ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || + ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || + ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && EQ_16( st_fx->core, ACELP_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && NE_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) -- GitLab From c9bb845d89a4368903aee0ba8fd30b25fce72f05 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 19 Apr 2026 19:06:14 -0400 Subject: [PATCH 5/7] fix nbe_EVS 2 --- lib_dec/core_switching_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index fa55c79be..f2b70af67 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -729,7 +729,7 @@ ivas_error core_switching_post_dec_fx( test(); test(); test(); -#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC +#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC_EVS IF( ( st_fx->hBWE_FD != NULL ) && ( ( NE_16( st_fx->last_extl, SWB_BWE ) && EQ_16( st_fx->extl, SWB_BWE ) ) || ( NE_16( st_fx->last_extl, FB_BWE ) && EQ_16( st_fx->extl, FB_BWE ) ) || ( ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_extl, SWB_TBE ) ) && st_fx->extl < 0 && NE_16( st_fx->core, HQ_CORE ) ) || ( EQ_16( st_fx->last_core, ACELP_CORE ) && EQ_16( st_fx->core, ACELP_CORE ) && ( ( NE_16( st_fx->prev_coder_type, INACTIVE ) && EQ_16( st_fx->coder_type, INACTIVE ) ) || ( NE_16( st_fx->prev_coder_type, AUDIO ) && EQ_16( st_fx->coder_type, AUDIO ) ) ) && st_fx->bws_cnt > 0 ) ) ) #else -- GitLab From f2a90e4941da00a7d96e141023f1d9b1194b79d0 Mon Sep 17 00:00:00 2001 From: Tommy Date: Sun, 19 Apr 2026 19:31:19 -0400 Subject: [PATCH 6/7] fix nbe_EVS 3 --- lib_dec/core_switching_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index f2b70af67..4ac425ab9 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -866,7 +866,7 @@ ivas_error core_switching_post_dec_fx( /* reset WB TBE buffers */ test(); -#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC_EVS +#ifndef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) ) #else IF( NE_16( st_fx->last_extl, WB_TBE ) && EQ_16( st_fx->extl, WB_TBE ) && NE_16( st_fx->last_core, TCX_20_CORE ) && NE_16( st_fx->last_core, TCX_10_CORE ) ) -- GitLab From 57bd56b8c0b7335f3581d84ea9a537ccb4649fca Mon Sep 17 00:00:00 2001 From: Tommy Date: Mon, 20 Apr 2026 07:00:32 -0400 Subject: [PATCH 7/7] add missing condition --- lib_dec/core_switching_dec_fx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_dec/core_switching_dec_fx.c b/lib_dec/core_switching_dec_fx.c index 4ac425ab9..d44f0c9c0 100644 --- a/lib_dec/core_switching_dec_fx.c +++ b/lib_dec/core_switching_dec_fx.c @@ -183,7 +183,12 @@ void bw_switching_pre_proc_fx( { st_fx->prev_ener_shb_fx = 0; move16(); - set16_fx( st_fx->hBWE_FD->prev_SWB_fenv_fx, 0, SWB_FENV ); +#ifdef FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC + IF ( st_fx->hBWE_FD != NULL ) +#endif + { + set16_fx( st_fx->hBWE_FD->prev_SWB_fenv_fx, 0, SWB_FENV ); + } } ELSE IF( ( ( st_fx->core == ACELP_CORE && ( EQ_16( st_fx->last_core, HQ_CORE ) || EQ_16( st_fx->last_core, TCX_10_CORE ) || EQ_16( st_fx->last_core, TCX_20_CORE ) ) ) || ( EQ_16( st_fx->core, st_fx->last_core ) && NE_16( st_fx->extl, st_fx->last_extl ) ) ) && GE_16( st_fx->last_bwidth, SWB ) ) { -- GitLab