diff --git a/lib_com/gs_noisefill.c b/lib_com/gs_noisefill.c index 8e0231e0362d927d513b134cc2f9e77cbe80c3cb..30dda50efb856282a053fd5a78085be841e1ce5b 100644 --- a/lib_com/gs_noisefill.c +++ b/lib_com/gs_noisefill.c @@ -589,11 +589,19 @@ 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, 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 { @@ -607,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 ) diff --git a/lib_com/options.h b/lib_com/options.h index 59daf40a861b119e176179d27d553536838fa14d..2c7d1fcc1473f9586737cf722caf1e909bb920f6 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 ######################### */