From 420310052b5c7acfd725b5377e855e9963813412 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 4 Mar 2024 08:55:23 +0100 Subject: [PATCH 1/2] Added fix FIX_1006_PAST_DMX_NRG_ERROR --- lib_com/options.h | 2 +- lib_dec/ivas_stereo_dft_dec_dmx.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 49d3c4b0fb..5fe84c86d4 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -160,7 +160,7 @@ #define FIX_1003_PARAMISM_BINAURAL_RECONFIG_USAN /* FhG: fix for #1003: fix USAN caused by ParamISM reconfig */ #define FIX_1001_ARI_HM_OVERFLOW /* FhG: fix for undef behaviour in in the harmonic TCX model arithmetic coder */ #define FIX_901_PARAMMC_DEAD_CODE /* FhG: issue 901: remove dead ParamMC code */ - +#define FIX_1006_PAST_DMX_NRG_ERROR /* Eri/FhG: Issue 1006: Bug fix in ivas_stereo_dft_dec not replicated in ivas_stereo_dft_dec_dmx */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_stereo_dft_dec_dmx.c b/lib_dec/ivas_stereo_dft_dec_dmx.c index 3a4b6be208..a8b623c519 100644 --- a/lib_dec/ivas_stereo_dft_dec_dmx.c +++ b/lib_dec/ivas_stereo_dft_dec_dmx.c @@ -229,7 +229,11 @@ void stereo_dft_unify_dmx( if ( st0->bfi && !prev_bfi ) { int16_t idx_k0, idx_k1; +#ifdef FIX_1006_PAST_DMX_NRG_ERROR + idx_k0 = ( hStereoDft->past_DMX_pos + STEREO_DFT_PAST_MAX - 1 ) % STEREO_DFT_PAST_MAX; +#else idx_k0 = ( hStereoDft->past_DMX_pos + 1 ) % STEREO_DFT_PAST_MAX; +#endif idx_k1 = ( idx_k0 + 1 ) % STEREO_DFT_PAST_MAX; /*dmx energy memory*/ -- GitLab From 25781b8e26dc2487782e2c6047acd7f218ef1241 Mon Sep 17 00:00:00 2001 From: Erik Norvell Date: Mon, 4 Mar 2024 10:24:47 +0100 Subject: [PATCH 2/2] Renamed switch to NONBE_FIX_1006_PAST_DMX_NRG_ERROR since it is non-BE --- lib_com/options.h | 2 +- lib_dec/ivas_stereo_dft_dec_dmx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 97d60e76c9..8c33ff99f3 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -157,7 +157,6 @@ #define FIX_998_UNUSED_FUNCTION /* FhG: issue 998: delete unused funtion ivas_dirac_dec_get_response_split_order */ #define FIX_1009_ISM_NONDIEGETIC_PANNING /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan */ -#define FIX_1006_PAST_DMX_NRG_ERROR /* Eri/FhG: Issue 1006: Bug fix in ivas_stereo_dft_dec not replicated in ivas_stereo_dft_dec_dmx */ /* #################### End BE switches ################################## */ @@ -170,6 +169,7 @@ #define NONBE_FIX_1004_USAN_DTX_MASA_NO_DIRS /* Nokia: fix USAN error caused by non-setting of correctly the number of MASA directions in DTX */ #define NONBE_FIX_1014_1015_1016_OSBA_JBM_STEREO /* FhG: issues #1014, #1015, #1016: fix tc buffer info update in the discrete ism renderer */ #define NONBE_FIX_987_PARAMC_BINAURAL_REVERB_RENDERING /* FhG: issue 987: solution b: downmix HOA3 to stereo a input for the reverberator */ +#define NONBE_FIX_1006_PAST_DMX_NRG_ERROR /* Eri/FhG: Issue 1006: Bug fix in ivas_stereo_dft_dec not replicated in ivas_stereo_dft_dec_dmx */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_stereo_dft_dec_dmx.c b/lib_dec/ivas_stereo_dft_dec_dmx.c index a8b623c519..f3f9982ec8 100644 --- a/lib_dec/ivas_stereo_dft_dec_dmx.c +++ b/lib_dec/ivas_stereo_dft_dec_dmx.c @@ -229,7 +229,7 @@ void stereo_dft_unify_dmx( if ( st0->bfi && !prev_bfi ) { int16_t idx_k0, idx_k1; -#ifdef FIX_1006_PAST_DMX_NRG_ERROR +#ifdef NONBE_FIX_1006_PAST_DMX_NRG_ERROR idx_k0 = ( hStereoDft->past_DMX_pos + STEREO_DFT_PAST_MAX - 1 ) % STEREO_DFT_PAST_MAX; #else idx_k0 = ( hStereoDft->past_DMX_pos + 1 ) % STEREO_DFT_PAST_MAX; -- GitLab