From 0a4c68a8511bd3a9a40ac857cfbeda2431cedd44 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Fri, 18 Oct 2024 13:57:34 +0530 Subject: [PATCH] Fix for 3GPP issue 932: Decoder crash for MC 5.1 at 13.2 kbps FER in ivas_wb_tbe_dec_fx() [x] Added the missed saturation in ivas_wb_tbe_dec_fx --- lib_dec/swb_tbe_dec_fx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_dec/swb_tbe_dec_fx.c b/lib_dec/swb_tbe_dec_fx.c index 1701bfdbf..5301e9cfb 100644 --- a/lib_dec/swb_tbe_dec_fx.c +++ b/lib_dec/swb_tbe_dec_fx.c @@ -1226,8 +1226,12 @@ void ivas_wb_tbe_dec_fx( #endif exp = sub( add( exp, 22 ), 30 ); tmp = div_s( 16384, tmp ); - L_tmp = Isqrt_lc( L_deposit_h( tmp ), &exp ); /* Q(31-exp) */ + L_tmp = Isqrt_lc( L_deposit_h( tmp ), &exp ); /* Q(31-exp) */ +#ifdef BASOP_NOGLOB + st_fx->last_wb_bwe_ener_fx = round_fx_sat( L_shl_sat( L_tmp, add( exp, sub( n, 12 ) ) ) ); /* Q3 */ +#else st_fx->last_wb_bwe_ener_fx = round_fx( L_shl( L_tmp, add( exp, sub( n, 12 ) ) ) ); /* Q3 */ +#endif move16(); } -- GitLab