All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.jaad.aac.gain.IMDCT Maven / Gradle / Ivy

There is a newer version: 0.2.5
Show newest version
package net.sourceforge.jaad.aac.gain;
import static java.lang.System.arraycopy;

import net.sourceforge.jaad.aac.AACException;
import net.sourceforge.jaad.aac.syntax.ICSInfo.WindowSequence;

/**
 * This class is part of JAAD ( jaadec.sourceforge.net ) that is distributed
 * under the Public Domain license. Code changes provided by the JCodec project
 * are distributed under FreeBSD license.
 * 
 * @author in-somnia
 */
//inverse modified discrete cosine transform
class IMDCT implements GCConstants, IMDCTTables, Windows {

	private static final float[][] LONG_WINDOWS = {SINE_256, KBD_256};
	private static final float[][] SHORT_WINDOWS = {SINE_32, KBD_32};
	private final int frameLen, shortFrameLen, lbLong, lbShort, lbMid;

	IMDCT(int frameLen) {
		this.frameLen = frameLen;
		lbLong = frameLen/BANDS;
		shortFrameLen = frameLen/8;
		lbShort = shortFrameLen/BANDS;
		lbMid = (lbLong-lbShort)/2;
	}

	void process(float[] _in, float[] out, int winShape, int winShapePrev, WindowSequence winSeq) throws AACException {
		final float[] buf = new float[frameLen];

		int b, j, i;
		if(winSeq.equals(WindowSequence.EIGHT_SHORT_SEQUENCE)) {
			for(b = 0; b




© 2015 - 2024 Weber Informatics LLC | Privacy Policy