From 5c5fca3387ba90052b3f512d2c6a67825ec135bb Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Fri, 8 Mar 2024 14:41:11 +0530 Subject: [PATCH] Fixes BASOP assert in 48kbps stereo decoding due to left shift of negative value The assertion was happening because of not enough headroom present for the calculation of win buffer, by reducing the Q-factor of input buffer crash was resolved. --- lib_dec/dec_tcx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/dec_tcx.c b/lib_dec/dec_tcx.c index 1f7aae469..f4684f7a6 100644 --- a/lib_dec/dec_tcx.c +++ b/lib_dec/dec_tcx.c @@ -359,7 +359,7 @@ void IMDCT_flt( #ifdef IVAS_FLOAT_FIXED Word32 x_fx[L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX]; Word16 win_fx[810] = { 0 }; - Word16 q_x = Q16, q_win, x_e_hdrm; + Word16 q_x = Q15, q_win, x_e_hdrm; x_e_hdrm = sub(q_x, 15); q_win = q_x + x_e_hdrm - 16; for ( int k = 0; k < L_ola + L_win; k++ ) -- GitLab