Commit c151fe30 authored by fotopoulou's avatar fotopoulou
Browse files

compliment fix at decoder side

parent c315f4d6
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -67,10 +67,16 @@ void stereo_tcx_init_dec(
{
    TCX_LTP_DEC_HANDLE hTcxLtpDec = st->hTcxLtpDec;
    TCX_DEC_HANDLE hTcxDec = st->hTcxDec;
#if 1
    int16_t prev_fIsTNSAllowed;
#endif

    st->rate_switching_init = 0;
    st->m_frame_type = ACTIVE_FRAME;
    st->core_brate = st->total_brate;
#if 1
    prev_fIsTNSAllowed = st->hTcxCfg->fIsTNSAllowed;
#endif

    /*sampling rate*/
    st->sr_core = getCoreSamplerateMode2( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->flag_ACELP16k, st->rf_flag, st->is_ism_format );
@@ -95,11 +101,19 @@ void stereo_tcx_init_dec(
    hTcxDec->tcx_lpc_shaped_ari = getTcxLpcShapedAri( st->bits_frame_nominal * FRAMES_PER_SEC, st->rf_flag, st->element_mode );
    st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_flag );

    if (
        st->element_mode != EVS_MONO )
    if ( st->element_mode != EVS_MONO )
    {
        st->hTcxCfg->fIsTNSAllowed = getTnsAllowed( st->bits_frame_nominal * FRAMES_PER_SEC, st->igf, st->element_mode );
    }

#if 1
    if ( !prev_fIsTNSAllowed && st->hTcxCfg->fIsTNSAllowed && st->element_mode == IVAS_CPE_DFT )
    {
        InitTnsConfigs( st->bwidth, st->hTcxCfg->tcx_coded_lines, st->hTcxCfg->tnsConfig, st->hIGFDec->infoIGFStopFreq, st->bits_frame_nominal * FRAMES_PER_SEC, st->element_mode, MCT_flag );

        SetAllowTnsOnWhite( st->hTcxCfg->tnsConfig, 0 );
    }
#endif
    if ( hTcxLtpDec != NULL )
    {
        hTcxLtpDec->tcxltp = getTcxLtp( st->sr_core );