From bd1c6f2bf11f4cc84b470740cd033bf3006bfc9b Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Thu, 18 Dec 2025 13:58:02 +0100 Subject: [PATCH] Add fix FIX_1483_PEAQ_VQ_ENC_MSAN_ERROR to address MSAN error --- lib_com/hvq_pvq_bitalloc_fx.c | 6 ++++++ lib_com/options.h | 1 + 2 files changed, 7 insertions(+) diff --git a/lib_com/hvq_pvq_bitalloc_fx.c b/lib_com/hvq_pvq_bitalloc_fx.c index ea51afe88..58d918abd 100644 --- a/lib_com/hvq_pvq_bitalloc_fx.c +++ b/lib_com/hvq_pvq_bitalloc_fx.c @@ -40,6 +40,10 @@ Word16 hvq_pvq_bitalloc_fx( UWord16 lsb; Word16 num_sfm; +#ifdef FIX_1483_PEAQ_VQ_ENC_MSAN_ERROR + *n_sel_bands = 0; +#endif + IF( EQ_16( bwidth_fx, FB ) ) { num_sfm = SFM_N_HARM_FB; @@ -107,7 +111,9 @@ Word16 hvq_pvq_bitalloc_fx( return 0; } +#ifndef FIX_1483_PEAQ_VQ_ENC_MSAN_ERROR *n_sel_bands = 0; +#endif move16(); envSum = 0; move16(); diff --git a/lib_com/options.h b/lib_com/options.h index d7daa9187..4dbc147a5 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -103,6 +103,7 @@ #define FIX_1904_HARM_GSC_ENC /* VA: #1904 Harmonization of EVS and IVAS GSC code */ #define FIX_2271_OOB_INDEXING_IN_PIT_OL2 /* VA: Fix for issue 2271, to silence clang18 */ #define FIX_2273_OOB_INDEXING_IN_PIT_FR4 /* VA: Fix to silence clang on ptr init */ +#define FIX_1483_PEAQ_VQ_ENC_MSAN_ERROR /* Eri: When no PVQ bands are selected in peaq_vq_enc, the number of bands is not initialized. */ /* #################### End BE switches ################################## */ -- GitLab