diff --git a/lib_com/options.h b/lib_com/options.h index 889d42845bc7d1c0dfeccddd0d570658921a9210..e91c112ac03412e890971135d74ae82c0f90fa5d 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 /* Dolby: Change the threshold for masking noise from 0 to 1 (1e-20f) 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 d3b9634522e9c7e7ed83c4c2a6784a0ac57c2ca7..5493d2a1c60027ba7b5e15938a81aea3237aa0a3 100644 --- a/lib_dec/fd_cng_dec_fx.c +++ b/lib_dec/fd_cng_dec_fx.c @@ -20,11 +20,15 @@ #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 DELTA_MASKING_NOISE_Q15 0 +#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 +#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