/* * $ProjectName$ * $ProjectRevision$ * ----------------------------------------------------------- * $Id$ * ----------------------------------------------------------- * * $Author$ * * Description: * * Copyright 2002-2003 Tor-Einar Jarnbjo * ----------------------------------------------------------- * * Change History * ----------------------------------------------------------- * $Log$ * Revision 1.1 2005/07/11 15:42:36 hcl * Songdb java version, source. only 1.5 compatible * * Revision 1.2 2004/09/21 12:09:45 shred * *** empty log message *** * * Revision 1.1.1.1 2004/04/04 22:09:12 shred * First Import * * Revision 1.3 2003/04/10 19:49:04 jarnbjo * no message * * Revision 1.2 2003/03/16 01:11:12 jarnbjo * no message * * */ package de.jarnbjo.vorbis; class MdctFloat { static private final float cPI3_8=0.38268343236508977175f; static private final float cPI2_8=0.70710678118654752441f; static private final float cPI1_8=0.92387953251128675613f; private int n; private int log2n; private float[] trig; private int[] bitrev; private float[] equalizer; private float scale; private int itmp1, itmp2, itmp3, itmp4, itmp5, itmp6, itmp7, itmp8, itmp9; private float dtmp1, dtmp2, dtmp3, dtmp4, dtmp5, dtmp6, dtmp7, dtmp8, dtmp9; protected MdctFloat(int n) { bitrev=new int[n/4]; trig=new float[n+n/4]; int n2=n>>>1; log2n=(int)Math.rint(Math.log(n)/Math.log(2)); this.n=n; int AE=0; int AO=1; int BE=AE+n/2; int BO=BE+1; int CE=BE+n/2; int CO=CE+1; // trig lookups... for(int i=0;i>>j!=0;j++) if(((msb>>>j)&i)!=0)acc|=1<>1; int n4=n>>2; int n8=n>>3; if(equalizer!=null) { for(int i=0; i32767.0f) temp1=32767.0f; //if(temp1<-32768.0f) temp1=-32768.0f; //if(temp2>32767.0f) temp2=32767.0f; //if(temp2<-32768.0f) temp2=-32768.0f; pcm[o1]=(int)(-temp1*window[o1]); pcm[o2]=(int)( temp1*window[o2]); pcm[o3]=(int)( temp2*window[o3]); pcm[o4]=(int)( temp2*window[o4]); o1++; o2--; o3++; o4--; //xx+=2; //B+=2; } } } private float[] kernel(float[] x, float[] w, int n, int n2, int n4, int n8){ // step 2 int xA=n4; int xB=0; int w2=n4; int A=n2; for(int i=0;i>>(i+2); int k1=1<<(i+3); int wbase=n2-2; A=0; float[] temp; for(int r=0;r<(k0>>>2);r++){ int w1=wbase; w2=w1-(k0>>1); float AEv= trig[A],wA; float AOv= trig[A+1],wB; wbase-=2; k0++; for(int s=0;s<(2<