From 837f655c24cdb9cb184d29d8eeeeeb789ba313ed Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 8 Jul 2025 06:15:49 +0530 Subject: [PATCH] Decoder MSAN issue fix, warnings fix --- lib_com/cnst.h | 2 +- lib_dec/dec_tcx_fx.c | 1 + lib_dec/ivas_mdct_core_dec_fx.c | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib_com/cnst.h b/lib_com/cnst.h index 792df3946..53032d5ae 100644 --- a/lib_com/cnst.h +++ b/lib_com/cnst.h @@ -134,7 +134,7 @@ #define ONE_IN_Q29 536870912 #define ONE_IN_Q30 1073741824 #define ONE_IN_Q31 0x7fffffff -#define MINUS_ONE_IN_Q31 -2147483648 +#define MINUS_ONE_IN_Q31 0x80000000 #define TWO_IN_Q29 1073741824 #define FOUR_IN_Q28 1073741824 diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index 6206577c1..643d8bf7d 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -5782,6 +5782,7 @@ void decoder_tcx_imdct_fx( move16(); #ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN Word16 q_acelp_zir_fx = 0; + set16_fx( acelp_zir_fx, 0, L_FRAME_MAX / 2 ); #else Word16 shift_q = sub( q_x, q_win ); #endif diff --git a/lib_dec/ivas_mdct_core_dec_fx.c b/lib_dec/ivas_mdct_core_dec_fx.c index 92511a62d..2baa31d22 100644 --- a/lib_dec/ivas_mdct_core_dec_fx.c +++ b/lib_dec/ivas_mdct_core_dec_fx.c @@ -1233,7 +1233,10 @@ void ivas_mdct_core_reconstruct_fx( IF( st->core != ACELP_CORE ) { #ifdef FIX_1348_BIT_PRECISION_IMPROVEMENT_QWIN - Word16 q_win0, q_winFB0; + Word16 q_win0 = Q15; + move16(); + Word16 q_winFB0 = Q15; + move16(); #else Scale_sig( st->hTcxDec->syn_Overl_TDACFB, L_FRAME_MAX / 2, sub( q_win, st->hTcxDec->Q_syn_Overl_TDACFB ) ); // st->hTcxDec->Q_syn_Overl_TDACFB -> q_win st->hTcxDec->Q_syn_Overl_TDACFB = q_win; -- GitLab