From dad95a0ba7f9aec7f3f8d843e0b67e86a80612ce Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Wed, 24 Sep 2025 16:08:12 +0200 Subject: [PATCH 1/4] Change masking noise threshold to its minimal value of 1 instead of 0 --- lib_com/options.h | 3 +++ lib_dec/fd_cng_dec_fx.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 889d42845..5fa3b6e85 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -104,6 +104,9 @@ #define FIX_1962_FORMAT_CONV_SPECTRAL_DIFF /* FhG: Improved precision of targetEnergy in ivas_ls_setup_conversion_process_mdct_fx() */ #define FIX_2003_CON_TCX_OVERFLOW /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */ + +#define FIX_2048_DELTA_MASKING_NOISE_Q15 /* VA: Change the threshold for masking noise from 0 to 1 to maintain consistency with the FLOAT code */ + /* #################### Start BASOP porting switches ############################ */ #define NONBE_1244_FIX_SWB_BWE_MEMORY /* VA: issue 1244: fix to SWB BWE memory in case of switching from FB coding - pending a review by Huawei */ diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index d3b963452..b241b2a23 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -24,7 +24,11 @@ #define ST_PERIODOG_FACT_Q15 29491 /* 0.9 in Q15, short-term filter factor for periodogram */ #define CNA_ACT_DN_FACT_Q15 22938 /* 0.7 in Q15, downward updating factor for CNA during active frames */ #define FIRST_CNA_NOISE_UPD_FRAMES 5 /* minimum number of CN initialization frames */ +#ifdef FIX_2048_DELTA_MASKING_NOISE_Q15 +#define DELTA_MASKING_NOISE_Q15 1 +#else #define DELTA_MASKING_NOISE_Q15 0 +#endif #define LOG_10_BASE_2 1783446566 /* Q29 */ #define GAIN_Q_OFFSET_IVAS_FX 45 #define LOG_10_BASE_2_BY_10_Q31 713378606 -- GitLab From 4a25ff82adc934e104e320f7f683d43379b545f4 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Wed, 24 Sep 2025 16:09:27 +0200 Subject: [PATCH 2/4] fix desc. --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5fa3b6e85..249299d2d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -105,7 +105,7 @@ #define FIX_1962_FORMAT_CONV_SPECTRAL_DIFF /* FhG: Improved precision of targetEnergy in ivas_ls_setup_conversion_process_mdct_fx() */ #define FIX_2003_CON_TCX_OVERFLOW /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */ -#define FIX_2048_DELTA_MASKING_NOISE_Q15 /* VA: Change the threshold for masking noise from 0 to 1 to maintain consistency with the FLOAT code */ +#define FIX_2048_DELTA_MASKING_NOISE_Q15 /* Dolby: Change the threshold for masking noise from 0 to 1 to maintain consistency with the FLOAT code */ /* #################### Start BASOP porting switches ############################ */ -- GitLab From 3220085059f6eb67a023cb9bef7d5096579d93eb Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Thu, 25 Sep 2025 09:51:59 +0200 Subject: [PATCH 3/4] clang format --- lib_dec/fd_cng_dec_fx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib_dec/fd_cng_dec_fx.c b/lib_dec/fd_cng_dec_fx.c index b241b2a23..5493d2a1c 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -20,14 +20,14 @@ #endif -#define CNA_ACT_DN_LARGE_PARTITION 50 /* index of the first larger partition */ -#define ST_PERIODOG_FACT_Q15 29491 /* 0.9 in Q15, short-term filter factor for periodogram */ -#define CNA_ACT_DN_FACT_Q15 22938 /* 0.7 in Q15, downward updating factor for CNA during active frames */ -#define FIRST_CNA_NOISE_UPD_FRAMES 5 /* minimum number of CN initialization frames */ +#define CNA_ACT_DN_LARGE_PARTITION 50 /* index of the first larger partition */ +#define ST_PERIODOG_FACT_Q15 29491 /* 0.9 in Q15, short-term filter factor for periodogram */ +#define CNA_ACT_DN_FACT_Q15 22938 /* 0.7 in Q15, downward updating factor for CNA during active frames */ +#define FIRST_CNA_NOISE_UPD_FRAMES 5 /* minimum number of CN initialization frames */ #ifdef FIX_2048_DELTA_MASKING_NOISE_Q15 -#define DELTA_MASKING_NOISE_Q15 1 +#define DELTA_MASKING_NOISE_Q15 1 #else -#define DELTA_MASKING_NOISE_Q15 0 +#define DELTA_MASKING_NOISE_Q15 0 #endif #define LOG_10_BASE_2 1783446566 /* Q29 */ #define GAIN_Q_OFFSET_IVAS_FX 45 -- GitLab From 4ac61f009fd8a5b3798086c84fc4680733315723 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Thu, 25 Sep 2025 14:50:49 +0200 Subject: [PATCH 4/4] update desc. --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 249299d2d..e91c112ac 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -105,7 +105,7 @@ #define FIX_1962_FORMAT_CONV_SPECTRAL_DIFF /* FhG: Improved precision of targetEnergy in ivas_ls_setup_conversion_process_mdct_fx() */ #define FIX_2003_CON_TCX_OVERFLOW /* FhG: Use a dynamic scaling factor for the synth buffer at the output of con_tcx_ivas_fx() */ -#define FIX_2048_DELTA_MASKING_NOISE_Q15 /* Dolby: Change the threshold for masking noise from 0 to 1 to maintain consistency with the FLOAT code */ +#define FIX_2048_DELTA_MASKING_NOISE_Q15 /* Dolby: Change the threshold for masking noise from 0 to 1 (1e-20f) to maintain consistency with the FLOAT code */ /* #################### Start BASOP porting switches ############################ */ -- GitLab