From c50fc494683f79c603b68fc1fd22a163130b8d0a Mon Sep 17 00:00:00 2001 From: Sandesh Venkatesh Date: Tue, 25 Jun 2024 22:26:23 +0530 Subject: [PATCH] MSAN fix --- lib_com/lerp.c | 2 ++ lib_dec/fd_cng_dec_fx.c | 3 +++ lib_dec/ivas_stereo_cng_dec.c | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib_com/lerp.c b/lib_com/lerp.c index b559650fc..ac11a17ce 100644 --- a/lib_com/lerp.c +++ b/lib_com/lerp.c @@ -495,8 +495,10 @@ void L_lerp_fx( Word32 *f, Word32 *f_out, Word16 bufferNewSize, Word16 bufferOld *q -= guard_bits; FOR( Word16 ind = 0; ind < bufferNewSize; ind++ ) f[ind] = L_shr( f[ind], guard_bits ); +#ifndef MSAN_FIX FOR( Word16 ind = 0; ind < bufferNewSize; ind++ ) f_out[ind] = L_shr( f_out[ind], guard_bits ); +#endif } IF( 128 * bufferNewSize > bufferOldSize * 507 ) diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index cdbf98f55..4c0e5b1d7 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -181,6 +181,9 @@ void initFdCngDec_ivas_fx( st->CNG_mode = -1; move16(); Copy( st->lsp_old_fx, st->lspCNG_fx, M ); +#ifdef MSAN_FIX + hFdCngDec->hFdCngCom->sid_frame_counter = 0; +#endif return; } diff --git a/lib_dec/ivas_stereo_cng_dec.c b/lib_dec/ivas_stereo_cng_dec.c index 54d67d007..0c08c549f 100644 --- a/lib_dec/ivas_stereo_cng_dec.c +++ b/lib_dec/ivas_stereo_cng_dec.c @@ -952,7 +952,7 @@ static void stereo_dft_generate_comfort_noise_fx( ptr0 = shb_shape; ptr1 = ptr0 + 2; ptr2 = ptr1 + 1; - set16_fx( e_norm_temp, q_shb_shape, st->L_frame ); + set16_fx( e_norm_temp, q_shb_shape, L_FRAME16k ); FOR( i = 0; i < L_FRAME16k / 2 - 1; i++ ) { -- GitLab