Commit 2e4f2bf9 authored by reutelhuber's avatar reutelhuber
Browse files

Merge branch '558-plc-discontinuities-in-dft-stereo' into 'main'

[Non-BE] Resolve "PLC discontinuities in DFT Stereo"

See merge request !754
parents e50511f9 329295e7
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 ######################### */

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
     *----------------------------------------------------------------*/