diff --git a/lib_com/options.h b/lib_com/options.h index 7ac8448cf859d4c8c9bd5c73ea047e21be10c514..f8de808c1a4c8162b4e6a6cb94c9b240eec0e6d0 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -162,6 +162,7 @@ #define FIX_522_ISM_FIRST_SID /* VA: fix ISM decoder crash if first received frame is an SID */ #define FIX_470_MASA_JBM_EXT /* Nokia: Issue 470, fix MASA EXT output with JBM */ #define ISM_FB /* issue 556: change SWB to FB coding in 1ISM at 24.4 kbps */ +#define FIX_558_PLC_DISCONT /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */ /* ################## End DEVELOPMENT switches ######################### */ diff --git a/lib_dec/ivas_post_proc.c b/lib_dec/ivas_post_proc.c old mode 100644 new mode 100755 index 0321a646f95b7ccd8157a9398d3ee7a949914734..7f1c84983b3834b6948e06c0af71cd88341cc0d0 --- a/lib_dec/ivas_post_proc.c +++ b/lib_dec/ivas_post_proc.c @@ -208,7 +208,11 @@ void stereo_dft_dec_core_switching( lerp( hCPE->input_mem_BPF[0], hCPE->input_mem_BPF[0], NS2SA( st->L_frame * FRAMES_PER_SEC, STEREO_DFT32MS_OVL_NS ), NS2SA( st->last_L_frame * FRAMES_PER_SEC, STEREO_DFT32MS_OVL_NS ) ); } +#ifdef FIX_558_PLC_DISCONT + if ( st->prev_bfi && !( st->last_core_bfi == ACELP_CORE && st->last_con_tcx == 1 ) ) +#else if ( st->prev_bfi ) +#endif { /* last_core needed for correctly decoding ACELP->TCX/HQ switching frames in ivas_core_dec(). In the following steps the decoder needs to consider if the core was changed due to a lost frame to apply the correct transition */ @@ -414,6 +418,7 @@ void stereo_dft_dec_core_switching( { lerp( hCPE->input_mem[0], hCPE->input_mem_LB[0], NS2SA( st->L_frame * FRAMES_PER_SEC, STEREO_DFT32MS_OVL_NS ), NS2SA( output_frame * FRAMES_PER_SEC, STEREO_DFT32MS_OVL_NS ) ); } + /* ACELP synthesis @ internal sampling rate */ stereo_dft_dec_analyze( hCPE, output, DFT, 0, st->L_frame, output_frame, DFT_STEREO_DEC_ANA_LB, 0, 0 ); @@ -436,6 +441,7 @@ void stereo_dft_dec_core_switching( } #endif + /*----------------------------------------------------------------* * enhanced stereo filling: allpass filter *----------------------------------------------------------------*/