From 1aacbfd39e6fc24fed9a860dc34d6f52ad4ae36f Mon Sep 17 00:00:00 2001 From: rhb Date: Mon, 12 Jun 2023 18:33:03 +0200 Subject: [PATCH] fix possible nan in IGF decoder --- lib_com/options.h | 2 +- lib_dec/igf_dec.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 lib_dec/igf_dec.c diff --git a/lib_com/options.h b/lib_com/options.h index aafa43e9af..e2107c11d6 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -181,7 +181,7 @@ #define MASA_PREREND /* Nokia: Contribution 42: Support for IVAS_rend to merge MASA + other format to MASA */ #define ISM_25k6_HZ_CORE /* VA: issue 540: 1ISM 48 kbps - change ACELP/TCX 16 kHz core to TCX only 25.6 kHz core */ - +#define FIX_547_NAN_IGF_DEC /* FhG: issue 547: fix possible nan in IGF decoder */ #define FIX_528_ISM_MD_FILE_TOO_SHORT /* VA: issue 528: ISM Metadata file too short */ diff --git a/lib_dec/igf_dec.c b/lib_dec/igf_dec.c old mode 100644 new mode 100755 index a3eefd226e..b9049241b9 --- a/lib_dec/igf_dec.c +++ b/lib_dec/igf_dec.c @@ -165,6 +165,10 @@ static void IGF_replaceTCXNoise_2_new( } } +#ifdef FIX_547_NAN_IGF_DEC + rE = max( rE, 1.f ); +#endif + if ( n_noise_bands_tile ) { noise_band_ratio = (float) n_noise_bands_tile / n_noise_bands; -- GitLab