diff --git a/lib_com/options.h b/lib_com/options.h index bc6458d295bb9ed29e0f0cb866d74d3172401c88..8c3633cadcaaf0d2501c9236cefff9e9205d4c1e 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -203,9 +203,8 @@ #define FIX_HBR_MASAMETA /* Nokia: Fixes to HBR MASA metadata at 384 and 512 kbps. Addresses issues 438 and 477 as well. */ #define FIX_482_DUMMYDEC_INIT /* Nokia: fix issue #428: missing inits for dummyDec in IVAS_rend */ #define FIX_468_16KHZ_PUPMIX /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */ +#define FIX_499_DFT_STEREO_PLC /* Eri: Fix for issue 499: Wrong past memory addressed for computing energy of DFT stereo residual ECU frame */ #define FIX_489_COV_SMOOTHING /* Dlb: Fix covariance smoothing for ParamUpmix */ - - #define FIX_485_STATIC_BUFFERS /* FhG: move static buffers in DirAC parameter estimator to the DirAC struct */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_stereo_dft_dec.c b/lib_dec/ivas_stereo_dft_dec.c index 02fd3a41d309f7237c43b7b07fbdc7b71ca36838..5c2d0b37e6f7ee598768e8fffcad6eb08e2dbc7d 100644 --- a/lib_dec/ivas_stereo_dft_dec.c +++ b/lib_dec/ivas_stereo_dft_dec.c @@ -1738,7 +1738,11 @@ void stereo_dft_dec( if ( st0->bfi && !prev_bfi ) { +#ifdef FIX_499_DFT_STEREO_PLC + 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*/ hStereoDft->past_dmx_nrg = stereo_dft_dmx_swb_nrg( hStereoDft->DFT_past_DMX[idx_k0], hStereoDft->DFT_past_DMX[idx_k1], min( hStereoDft->NFFT, STEREO_DFT32MS_N_32k ) );