From b38c569aca19296e30507a0652dafbbb4cba7d1c Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Mon, 15 Dec 2025 11:19:11 -0500 Subject: [PATCH 1/2] Fix 1478, copy of un-init data --- lib_com/gs_noisefill.c | 4 ++++ lib_com/options.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/gs_noisefill.c b/lib_com/gs_noisefill.c index 8e0231e036..f0a306b51d 100644 --- a/lib_com/gs_noisefill.c +++ b/lib_com/gs_noisefill.c @@ -589,7 +589,11 @@ void highband_exc_dct_in( if ( bfi || core_brate < 6000 || ( core_brate < 8600 && coder_type == UNVOICED ) ) { +#ifndef FIX_1478_UNINIT_ON_BFI set_f( noisepb, 0.4f, MBANDS_GN ); +#else + set_f( noisepb, 0.4f, MBANDS_GN16k ); +#endif } else if ( GSC_IVAS_mode == 3 || ( GSC_IVAS_mode > 0 && GSC_noisy_speech == 1 ) ) { diff --git a/lib_com/options.h b/lib_com/options.h index 59daf40a86..2c7d1fcc14 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -172,7 +172,7 @@ #define FIX_1454_FIX_STEREO_TO_FOA_JBM /* VA: issue 1454: fix buggy stereo to FOA in JBM */ #define FIX_1461_CNG_BW_SWITCHING /* Eri: issue 1461: Stereo parameters are not updated when SID/NODATA forces BW to stay the same */ #define FIX_2252_LP_CNG_STARTS_SID /* VA: issues 2251 and 2252: fix LP CNG uninitialized value in bitstream that starts with an SID */ - +#define FIX_1478_UNINIT_ON_BFI /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */ /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ -- GitLab From 5e68081b6b4a16f8ad1c2fc78c0238a9425be3f6 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Mon, 15 Dec 2025 14:57:30 -0500 Subject: [PATCH 2/2] harmonise and nicer solution to 1478 --- lib_com/gs_noisefill.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib_com/gs_noisefill.c b/lib_com/gs_noisefill.c index f0a306b51d..30dda50efb 100644 --- a/lib_com/gs_noisefill.c +++ b/lib_com/gs_noisefill.c @@ -592,12 +592,16 @@ void highband_exc_dct_in( #ifndef FIX_1478_UNINIT_ON_BFI set_f( noisepb, 0.4f, MBANDS_GN ); #else - set_f( noisepb, 0.4f, MBANDS_GN16k ); + set_f( noisepb, 0.4f, last_bin ); #endif } else if ( GSC_IVAS_mode == 3 || ( GSC_IVAS_mode > 0 && GSC_noisy_speech == 1 ) ) { +#ifndef FIX_1478_UNINIT_ON_BFI set_f( noisepb, 0.4f, MBANDS_GN16k ); +#else + set_f( noisepb, 0.4f, last_bin ); +#endif } else { @@ -611,7 +615,11 @@ void highband_exc_dct_in( if ( GSC_IVAS_mode == 0 && GSC_noisy_speech && !bfi && element_mode <= IVAS_SCE ) { +#ifndef FIX_1478_UNINIT_ON_BFI set_f( noisepb, 0.1f, MBANDS_GN ); +#else + set_f( noisepb, 0.1f, last_bin ); +#endif } if ( core_brate < 6000 && coder_type <= UNVOICED ) -- GitLab