Commit bd299063 authored by Jan Kiene's avatar Jan Kiene
Browse files

move part of FIX_124 to IMDCT to avoid rate sw problem

parent c0727907
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -334,6 +334,13 @@ void IMDCT(
    /* number of zero for ALDO windows*/
    nz = NS2SA( st->output_Fs, N_ZERO_MDCT_NS ) * L_frame / L_frameTCX;

#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS
    if ( frame_cnt == 0 && !bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && !hTcxCfg->last_aldo )
    {
        v_multc(old_syn_overl, hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, old_syn_overl, overlap);
    }
#endif

    if ( ( L_frameTCX == hTcxDec->L_frameTCX >> 1 || st->mct_chan_mode == MCT_CHAN_MODE_LFE ) && ( st->tcxonly ) )
    {
        /* Mode decision in PLC
+2 −11
Original line number Diff line number Diff line
@@ -188,17 +188,8 @@ ivas_error ivas_core_dec(
        if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && st->hTcxDec != NULL && hMCT == NULL )
#endif
        {
            float gain;

            gain = st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph;
            v_multc( st->hHQ_core->old_out, gain, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX );
            v_multc( st->hHQ_core->old_outLB, gain, st->hHQ_core->old_outLB, st->L_frame );

            if ( !st->hTcxCfg->last_aldo )
            {
                v_multc( st->hTcxDec->syn_OverlFB, gain, st->hTcxDec->syn_OverlFB, st->hTcxCfg->tcx_mdct_window_lengthFB );
                v_multc( st->hTcxDec->syn_Overl, gain, st->hTcxDec->syn_Overl, st->hTcxCfg->tcx_mdct_window_length );
            }
            v_multc( st->hHQ_core->old_out, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_out, st->hTcxDec->L_frameTCX );
            v_multc( st->hHQ_core->old_outLB, st->hTcxDec->conceal_eof_gain * st->last_concealed_gain_syn_deemph, st->hHQ_core->old_outLB, st->L_frame );
        }
#else
        /* PLC: [TCX: Fade-out-recovery] - overlapping part needs to be attenuated for first good frame */