src/main/java/net/sourceforge/jaad/aac/syntax/ICSInfo.java
public void decode(IBitStream _in, AACDecoderConfig conf, boolean commonWindow) throws AACException {
		final SampleFrequency sf = conf.getSampleFrequency();
		if(sf.equals(SampleFrequency.SAMPLE_FREQUENCY_NONE)) throw new AACException("invalid sample frequency");

		_in.skipBit(); //reserved
		windowSequence = windowSequenceFromInt(_in.readBits(2));
		windowShape[PREVIOUS] = windowShape[CURRENT];
		windowShape[CURRENT] = _in.readBit();

		windowGroupCount = 1;
		windowGroupLength[0] = 1;
		if(windowSequence.equals(WindowSequence.EIGHT_SHORT_SEQUENCE)) {
			maxSFB = _in.readBits(4);
			int i;
			for(i = 0; i<7; i++) {
				if(_in.readBool()) windowGroupLength[windowGroupCount-1]++;
				else {
					windowGroupCount++;
					windowGroupLength[windowGroupCount-1] = 1;
				}
			}
			windowCount = 8;
			swbOffsets = SWB_OFFSET_SHORT_WINDOW[sf.getIndex()];
			swbCount = SWB_SHORT_WINDOW_COUNT[sf.getIndex()];
			predictionDataPresent = false;
		}
		else {
			maxSFB = _in.readBits(6);
			windowCount = 1;
			swbOffsets = SWB_OFFSET_LONG_WINDOW[sf.getIndex()];
			swbCount = SWB_LONG_WINDOW_COUNT[sf.getIndex()];
			predictionDataPresent = _in.readBool();
			if(predictionDataPresent) readPredictionData(_in, conf.getProfile(), sf, commonWindow);
		}
	}
public void decode(IBitStream _in, AACDecoderConfig conf, boolean commonWindow) throws AACException {
		final SampleFrequency sf = conf.getSampleFrequency();
		if(sf.equals(SampleFrequency.SAMPLE_FREQUENCY_NONE)) throw new AACException("invalid sample frequency");

		_in.skipBit(); //reserved
		windowSequence = windowSequenceFromInt(_in.readBits(2));
		windowShape[PREVIOUS] = windowShape[CURRENT];
		windowShape[CURRENT] = _in.readBit();

		windowGroupCount = 1;
		windowGroupLength[0] = 1;
		if(windowSequence.equals(WindowSequence.EIGHT_SHORT_SEQUENCE)) {
			maxSFB = _in.readBits(4);
			int i;
			for(i = 0; i<7; i++) {
				if(_in.readBool()) windowGroupLength[windowGroupCount-1]++;
				else {
					windowGroupCount++;
					windowGroupLength[windowGroupCount-1] = 1;
				}
			}
			windowCount = 8;
			swbOffsets = SWB_OFFSET_SHORT_WINDOW[sf.getIndex()];
			swbCount = SWB_SHORT_WINDOW_COUNT[sf.getIndex()];
			predictionDataPresent = false;
		}
		else {
			maxSFB = _in.readBits(6);
			windowCount = 1;
			swbOffsets = SWB_OFFSET_LONG_WINDOW[sf.getIndex()];
			swbCount = SWB_LONG_WINDOW_COUNT[sf.getIndex()];
			predictionDataPresent = _in.readBool();
			if(predictionDataPresent) readPredictionData(_in, conf.getProfile(), sf, commonWindow);
		}
	}
public void decode ( IBitStream _in , AACDecoderConfig conf , boolean commonWindow ) throws AACException { final SampleFrequency sf = conf . getSampleFrequency ( ) ; if ( sf . equals ( SampleFrequency . SAMPLE_FREQUENCY_NONE ) ) throw new AACException ( "invalid sample frequency" ) ; _in . skipBit ( ) ; //reserved windowSequence = windowSequenceFromInt ( _in . readBits ( 2 ) ) ; windowShape [ PREVIOUS ] = windowShape [ CURRENT ] ; windowShape [ CURRENT ] = _in . readBit ( ) ; windowGroupCount = 1 ; windowGroupLength [ 0 ] = 1 ; if ( windowSequence . equals ( WindowSequence . EIGHT_SHORT_SEQUENCE ) ) { maxSFB = _in . readBits ( 4 ) ; int i ; for ( i = 0 ; i < 7 ; i ++ ) { if ( _in . readBool ( ) ) windowGroupLength [ windowGroupCount - 1 ] ++ ; else { windowGroupCount ++ ; windowGroupLength [ windowGroupCount - 1 ] = 1 ; } } windowCount = 8 ; swbOffsets = SWB_OFFSET_SHORT_WINDOW [ sf . getIndex ( ) ] ; swbCount = SWB_SHORT_WINDOW_COUNT [ sf . getIndex ( ) ] ; predictionDataPresent = false ; } else { maxSFB = _in . readBits ( 6 ) ; windowCount = 1 ; swbOffsets = SWB_OFFSET_LONG_WINDOW [ sf . getIndex ( ) ] ; swbCount = SWB_LONG_WINDOW_COUNT [ sf . getIndex ( ) ] ; predictionDataPresent = _in . readBool ( ) ; if ( predictionDataPresent ) readPredictionData ( _in , conf . getProfile ( ) , sf , commonWindow ) ; } }
/* ========== decoding ==========
/ * ========== decoding ==========