question: private void updateLtp ( SingleChannelElement sce ) { IndividualChannelStream ics = sce . ics ; float saved [ ] = sce . saved ; float savedLtp [ ] = sce . coeffs ; final float lwindow [ ] = ics . useKbWindow [ 0 ] ? ff_aac_kbd_long_1024 : ff_sine_1024 ; final float swindow [ ] = ics . useKbWindow [ 0 ] ? ff_aac_kbd_short_128 : ff_sine_128 ; if ( ics . windowSequence [ 0 ] == EIGHT_SHORT_SEQUENCE ) { System . arraycopy ( saved , 0 , savedLtp , 0 , 512 ) ; Arrays . fill ( savedLtp , 576 , 576 + 448 , 0f ) ; FloatDSP . vectorFmulReverse ( savedLtp , 448 , ac . bufMdct , 960 , swindow , 64 , 64 ) ; for ( int i = 0 ; i < 64 ; i ++ ) { savedLtp [ i + 512 ] = ac . bufMdct [ 1023 - i ] * swindow [ 63 - i ] ; } } else if ( ics . windowSequence [ 0 ] == LONG_START_SEQUENCE ) { System . arraycopy ( ac . bufMdct , 512 , savedLtp , 0 , 448 ) ; Arrays . fill ( savedLtp , 576 , 576 + 448 , 0f ) ; FloatDSP . vectorFmulReverse ( savedLtp , 448 , ac . bufMdct , 960 , swindow , 64 , 64 ) ; for ( int i = 0 ; i < 64 ; i ++ ) { savedLtp [ i + 512 ] = ac . bufMdct [ 1023 - i ] * swindow [ 63 - i ] ; } } else { FloatDSP . vectorFmulReverse ( savedLtp , 0 , ac . bufMdct , 512 , lwindow , 512 , 512 ) ; for ( int i = 0 ; i < 512 ; i ++ ) { savedLtp [ i + 512 ] = ac . bufMdct [ 1023 - i ] * lwindow [ 511 - i ] ; } } System . arraycopy ( sce . ltpState , 1024 , sce . ltpState , 0 , 1024 ) ; System . arraycopy ( sce . ret , 0 , sce . ltpState , 1024 , 1024 ) ; System . arraycopy ( savedLtp , 0 , sce . ltpState , 2048 , 1024 ) ; }
target:  Update the LTP buffer for next frame