Loading lib_dec/tonalMDCTconcealment_fx.c +4 −15 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 ) ) Loading @@ -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, Loading Loading
lib_dec/tonalMDCTconcealment_fx.c +4 −15 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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 ) ) Loading @@ -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, Loading