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

fix for not using recovery_gain anymore

not completely BE, but conceptually the same, differences are small
parent f358b4cc
Loading
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -181,13 +181,28 @@ ivas_error ivas_core_dec(
            st->flagGuidedAcelp = 0;
        }

#ifdef FIX_124_DONT_ALLOC_PLCINFO_IN_IVAS
        if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) && st->hTcxDec != NULL )
        {
            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 );
            }
        }
#else
        /* PLC: [TCX: Fade-out-recovery] - overlapping part needs to be attenuated for first good frame */
        if ( !st->bfi && st->prev_bfi && ( st->last_core_bfi == TCX_20_CORE || st->last_core_bfi == TCX_10_CORE ) )
        {
            float gain;

            gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain
                                                                                                                    : 0.0f;
            gain = ( st->element_mode == IVAS_CPE_MDCT ) ? st->hTcxDec->conceal_eof_gain : ( st->hPlcInfo != NULL ) ? st->hPlcInfo->recovery_gain : 0.0f;

            if ( ( st->element_mode == IVAS_CPE_MDCT && hMCT == NULL ) || ( st->hPlcInfo != NULL ) )
            {
@@ -201,6 +216,7 @@ ivas_error ivas_core_dec(
                }
            }
        }
#endif

        set_f( voice_factors[n], 0.f, NB_SUBFR16k );
        set_f( hb_synth[n], 0.0f, L_FRAME48k );