From d8809b8cbb40555361075db0c5089ea552c7610b Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Fri, 18 Oct 2024 13:47:21 +0530 Subject: [PATCH] Fix for issue 928: Decoder crash for Stereo EVS Downmix with FEC in gaus_dec_fx() [x] Added saturation for crash fix since the expected value was 8.02 and Q maintained was Q12 --- lib_dec/gaus_dec_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/gaus_dec_fx.c b/lib_dec/gaus_dec_fx.c index a7806e274..5221e14f4 100644 --- a/lib_dec/gaus_dec_fx.c +++ b/lib_dec/gaus_dec_fx.c @@ -65,7 +65,7 @@ void gaus_dec_fx( L_tmp = Dot_product12( code, code, L_SUBFR, &exp ); exp = sub( exp, 18 /*24*/ + 6 ); /* exp: -18 (code in Q9), -6 (/L_SUBFR) */ L_tmp = Isqrt_lc( L_tmp, &exp ); - *inv_gain_inov = extract_h( L_shl( L_tmp, sub( exp, 3 ) ) ); /* inv_gain_inov in Q12 */ + *inv_gain_inov = extract_h( L_shl_sat( L_tmp, sub( exp, 3 ) ) ); /* inv_gain_inov in Q12 */ move16(); nb_bits = st_fx->acelp_cfg.gains_mode[shr( i_subfr, 6 )]; -- GitLab