From 0c144928ad68fbddb66af131c37879eb46a02b85 Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Fri, 25 Oct 2024 16:06:09 +0530 Subject: [PATCH] Fix for 3GPP issue 957: Assertion error in BWE of SCE decoding in OMASA [x] Adding saturation as suggested by PC group --- lib_com/swb_bwe_com_fx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib_com/swb_bwe_com_fx.c b/lib_com/swb_bwe_com_fx.c index 0025812db..d56f1b784 100644 --- a/lib_com/swb_bwe_com_fx.c +++ b/lib_com/swb_bwe_com_fx.c @@ -3005,7 +3005,8 @@ void hq_generic_decoding_fx( { FOR( tmp3_fx = 5120; tmp3_fx > 1024; tmp3_fx -= 512 ) { - L_tmp1 = L_shl( Mult_32_16( *pit1_fx, tmp3_fx ), 5 ); /*15 + 5 + 10 -15 */ + /* Adding saturation suggested as fix for issue #957 */ + L_tmp1 = L_shl_sat( Mult_32_16( *pit1_fx, tmp3_fx ), 5 ); /*15 + 5 + 10 -15 */ *pit1_fx-- = L_tmp1; move32(); } -- GitLab