Commit 3b1b44ff authored by reutelhuber's avatar reutelhuber
Browse files

fix discontinuities in DFT Stereo when switching from TCX concealment to a...

fix discontinuities in DFT Stereo when switching from TCX concealment to a good frame with ACELP_CORE
parent 817cd879
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@

#define FIX_529_BWD_ISSUE                               /* VA: issue 529: fix Bandwidth Detector not working reliably for Music and Generic Audio */


#define FIX_558_PLC_DISCONT                             /* FhG: issue 558: fix discontinuities in DFT Stereo when switching from TCX concealment to ACELP */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

lib_dec/ivas_post_proc.c

100644 → 100755
+6 −0
Original line number Diff line number Diff line
@@ -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
     *----------------------------------------------------------------*/