diff --git a/lib_com/options.h b/lib_com/options.h old mode 100644 new mode 100755 index 9e9922fb4d3551ca7006c962ae0b838d75b90c59..0c0cd6e4f0a38a7e5ccad3ba6b0311fe632b8559 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -173,6 +173,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 */ #define NONBE_FIX_1010_STEREO_CNG_DIV_BY_ZERO /* Eri: Issue 1010: Division by zero in Stereo CNG */ /* ##################### 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 3a4b6be20890334a8fdb76f0f077a447d706c77f..f3f9982ec8e079cd577e9aa9017b466c53b1d883 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 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; +#endif idx_k1 = ( idx_k0 + 1 ) % STEREO_DFT_PAST_MAX; /*dmx energy memory*/