Commit 8579dea8 authored by Fabian Bauer's avatar Fabian Bauer
Browse files

Revert "reharmonize init"

This reverts commit 9db93ebf.
parent bf7fe5e6
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -265,6 +265,7 @@ ivas_error TonalMDCTConceal_Init_ivas_fx(
        move16();
        hTonalMDCTConc->faded_signal_nrg_exp = 0;
        move16();
        set16_fx( hTonalMDCTConc->timeDataBuffer, 0, ( 3 * L_FRAME_MAX ) / 2 );
    }
#endif
    /* Offset the pointer to the end of buffer, so that pTCI is not destroyed when
@@ -272,13 +273,6 @@ ivas_error TonalMDCTConceal_Init_ivas_fx(
    move16();
    move16();
    /* just the second half of the second last pcm output is needed */
#ifdef HARMONIZE_2553_TonalConceal_Init
    IF( EQ_16( element_mode, EVS_MONO ) )
    {
        hTonalMDCTConc->secondLastPcmOut = &hTonalMDCTConc->timeDataBuffer[sub( ( 3 * L_FRAME_MAX ) / 2, 3 * ( s_min( L_FRAME_MAX, nSamples ) ) / 2 )];
        hTonalMDCTConc->lastPcmOut = &hTonalMDCTConc->timeDataBuffer[sub( ( 3 * L_FRAME_MAX ) / 2, s_min( L_FRAME_MAX, nSamples ) )];
    }
#endif

#ifdef HARMONIZE_2553_TonalConceal_Init
    IF( GT_16( element_mode, EVS_MONO ) )
@@ -286,20 +280,15 @@ ivas_error TonalMDCTConceal_Init_ivas_fx(
    {
        set16_fx( hTonalMDCTConc->timeDataBuffer, 0, ( 3 * L_FRAME_MAX ) / 2 );
    }
#ifdef HARMONIZE_2553_TonalConceal_Init
    IF( GT_16( element_mode, EVS_MONO ) )
    {

    hTonalMDCTConc->secondLastPcmOut = &hTonalMDCTConc->timeDataBuffer[( 3 * L_FRAME_MAX ) / 2 - ( 3 * s_min( L_FRAME_MAX, nSamples ) / 2 )];
    hTonalMDCTConc->lastPcmOut = &hTonalMDCTConc->timeDataBuffer[( 3 * L_FRAME_MAX ) / 2 - s_min( L_FRAME_MAX, nSamples )];
    }
#endif
    /* If the second last frame was lost, we reuse saved TonalComponentsInfo and don't update pcm buffers */
    assert( sizeof( *hTonalMDCTConc->pTCI ) <= ( hTonalMDCTConc->lastPcmOut - hTonalMDCTConc->timeDataBuffer ) * sizeof( hTonalMDCTConc->timeDataBuffer[0] ) );

    return IVAS_ERR_OK;
}


#ifndef HARMONIZE_2553_TonalConceal_SaveFreqSignal
void TonalMDCTConceal_SaveFreqSignal_fx(
    TonalMDCTConcealPtr hTonalMDCTConc,