From b20dab1e67172b6834977a88a569ce7635e08cef Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Sat, 5 Oct 2024 17:36:48 +0530 Subject: [PATCH] Fix for 3GPP issue 912: decoder crash for low-level signal --- lib_dec/swb_tbe_dec_fx.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib_dec/swb_tbe_dec_fx.c b/lib_dec/swb_tbe_dec_fx.c index d7c63d3fb..1701bfdbf 100644 --- a/lib_dec/swb_tbe_dec_fx.c +++ b/lib_dec/swb_tbe_dec_fx.c @@ -968,8 +968,12 @@ void ivas_wb_tbe_dec_fx( FOR( i = 0; i < L_SHB_LAHEAD / 4 - 1; i++ ) { - L_tmp = Mult_32_16( Lscale, shaped_wb_excitation[i] ); /* Q(16-exp+Q_bwe_exc_ext) */ - shaped_wb_excitation[i] = round_fx( L_shl( L_tmp, exp ) ); /* Q_bwe_exc_ext */ + L_tmp = Mult_32_16( Lscale, shaped_wb_excitation[i] ); /* Q(16-exp+Q_bwe_exc_ext) */ +#ifdef BASOP_NOGLOB + shaped_wb_excitation[i] = round_fx_sat( L_shl_sat( L_tmp, exp ) ); /* Q_bwe_exc_ext */ +#else + shaped_wb_excitation[i] = round_fx( L_shl( L_tmp, exp ) ); /* Q_bwe_exc_ext */ +#endif move16(); } Lscale = root_a_fx( Lscale, sub( 31, exp ), &exp ); -- GitLab