//import java.io.IOException; //Compiler does not support imports\r
\r
/**\r
- * A class for the synthesis filter bank.\r
- * This class does a fast downsampling from 32, 44.1 or 48 kHz to 8 kHz, if ULAW is defined.\r
- * Frequencies above 4 kHz are removed by ignoring higher subbands.\r
+ * A class for the synthesis filter bank. This class does a fast downsampling\r
+ * from 32, 44.1 or 48 kHz to 8 kHz, if ULAW is defined. Frequencies above 4 kHz\r
+ * are removed by ignoring higher subbands.\r
*/\r
@LATTICE("TMP<PCM,PCM<AV,AV<V2,V2<V1,V1<L1,L1<L2,L2<L3,L3<L4,L4<LSH,LSH<S,S<SA,SA<EQ,EQ<SH,SH*,LSH*,V1*")\r
@METHODDEFAULT("OUT<V,V<SH,SH<IN,IN<GLOBAL,SH*,THISLOC=IN,GLOBALLOC=GLOBAL")\r
-final class SynthesisFilter\r
-{\r
- @LOC("V1") private float[] v1;\r
- @LOC("V2") private float[] v2;\r
-// @LOC("AV") private float[] actual_v; // v1 or v2\r
- @LOC("SH") private int actual_write_pos; // 0-15\r
- @LOC("SA") private float[] samples; // 32 new subband samples\r
- @LOC("V2") private int channel;\r
- @LOC("V2") private float scalefactor;\r
- @LOC("EQ") private float[] eq;\r
- \r
- /**\r
- * Quality value for controlling CPU usage/quality tradeoff. \r
- */\r
- /*\r
- private int quality;\r
- \r
- private int v_inc;\r
- \r
- \r
- \r
- public static final int HIGH_QUALITY = 1;\r
- public static final int MEDIUM_QUALITY = 2;\r
- public static final int LOW_QUALITY = 4;\r
- */\r
- \r
+final class SynthesisFilter {\r
+ @LOC("V1")\r
+ private float[] v1;\r
+ @LOC("V2")\r
+ private float[] v2;\r
+ // @LOC("AV") private float[] actual_v; // v1 or v2\r
+ @LOC("SH")\r
+ private int actual_write_pos; // 0-15\r
+ @LOC("SA")\r
+ private float[] samples; // 32 new subband samples\r
+ @LOC("V2")\r
+ private int channel;\r
+ @LOC("V2")\r
+ private float scalefactor;\r
+ @LOC("EQ")\r
+ private float[] eq;\r
+\r
+ /**\r
+ * Quality value for controlling CPU usage/quality tradeoff.\r
+ */\r
+ /*\r
+ * private int quality;\r
+ * \r
+ * private int v_inc;\r
+ * \r
+ * \r
+ * \r
+ * public static final int HIGH_QUALITY = 1; public static final int\r
+ * MEDIUM_QUALITY = 2; public static final int LOW_QUALITY = 4;\r
+ */\r
+\r
/**\r
- * Contructor.\r
- * The scalefactor scales the calculated float pcm samples to short values\r
- * (raw pcm samples are in [-1.0, 1.0], if no violations occur).\r
+ * Contructor. The scalefactor scales the calculated float pcm samples to\r
+ * short values (raw pcm samples are in [-1.0, 1.0], if no violations occur).\r
*/\r
- public SynthesisFilter(int channelnumber, float factor, float[] eq0)\r
- { \r
- d16 = splitArray(d, 16);\r
- \r
- v1 = new float[512];\r
- v2 = new float[512];\r
- samples = new float[32];\r
- channel = channelnumber;\r
- scalefactor = factor;\r
- setEQ(eq); \r
- //setQuality(HIGH_QUALITY);\r
- \r
- reset();\r
+ public SynthesisFilter(int channelnumber, float factor, float[] eq0) {\r
+ d16 = splitArray(d, 16);\r
+\r
+ v1 = new float[512];\r
+ v2 = new float[512];\r
+ samples = new float[32];\r
+ channel = channelnumber;\r
+ scalefactor = factor;\r
+ setEQ(eq);\r
+ // setQuality(HIGH_QUALITY);\r
+\r
+ reset();\r
}\r
- \r
- public void setEQ(float[] eq0)\r
- {\r
- this.eq = eq0; \r
- if (eq==null)\r
- {\r
- eq = new float[32];\r
- for (int i=0; i<32; i++)\r
- eq[i] = 1.0f;\r
- }\r
- if (eq.length<32)\r
- {\r
- throw new IllegalArgumentException("eq0"); \r
- }\r
- \r
+\r
+ public void setEQ(float[] eq0) {\r
+ this.eq = eq0;\r
+ if (eq == null) {\r
+ eq = new float[32];\r
+ for (int i = 0; i < 32; i++)\r
+ eq[i] = 1.0f;\r
+ }\r
+ if (eq.length < 32) {\r
+ throw new IllegalArgumentException("eq0");\r
+ }\r
+\r
}\r
- \r
- /*\r
- private void setQuality(int quality0)\r
- {\r
- switch (quality0)\r
- { \r
- case HIGH_QUALITY:\r
- case MEDIUM_QUALITY:\r
- case LOW_QUALITY: \r
- v_inc = 16 * quality0; \r
- quality = quality0;\r
- break; \r
- default :\r
- throw new IllegalArgumentException("Unknown quality value");\r
- } \r
- }\r
- \r
- public int getQuality()\r
- {\r
- return quality; \r
- }\r
- */\r
- \r
+\r
+ /*\r
+ * private void setQuality(int quality0) { switch (quality0) { case\r
+ * HIGH_QUALITY: case MEDIUM_QUALITY: case LOW_QUALITY: v_inc = 16 * quality0;\r
+ * quality = quality0; break; default : throw new\r
+ * IllegalArgumentException("Unknown quality value"); } }\r
+ * \r
+ * public int getQuality() { return quality; }\r
+ */\r
+\r
/**\r
* Reset the synthesis filter.\r
*/\r
- public void reset()\r
- {\r
- //float[] floatp;\r
- // float[] floatp2;\r
-\r
- // initialize v1[] and v2[]:\r
- //for (floatp = v1 + 512, floatp2 = v2 + 512; floatp > v1; )\r
- // *--floatp = *--floatp2 = 0.0;\r
- for (int p=0;p<512;p++) \r
- v1[p] = v2[p] = 0.0f;\r
-\r
- // initialize samples[]:\r
- //for (floatp = samples + 32; floatp > samples; )\r
- // *--floatp = 0.0;\r
- for (int p2=0;p2<32;p2++) \r
- samples[p2] = 0.0f;\r
-\r
-// actual_v = v1;\r
- actual_write_pos = 15;\r
- }\r
+ public void reset() {\r
+ // float[] floatp;\r
+ // float[] floatp2;\r
+\r
+ // initialize v1[] and v2[]:\r
+ // for (floatp = v1 + 512, floatp2 = v2 + 512; floatp > v1; )\r
+ // *--floatp = *--floatp2 = 0.0;\r
+ for (int p = 0; p < 512; p++)\r
+ v1[p] = v2[p] = 0.0f;\r
\r
+ // initialize samples[]:\r
+ // for (floatp = samples + 32; floatp > samples; )\r
+ // *--floatp = 0.0;\r
+ for (int p2 = 0; p2 < 32; p2++)\r
+ samples[p2] = 0.0f;\r
+\r
+ // actual_v = v1;\r
+ actual_write_pos = 15;\r
+ }\r
\r
/**\r
* Inject Sample.\r
*/\r
- public void input_sample(@LOC("V") float sample, @LOC("V") int subbandnumber)\r
- { \r
- samples[subbandnumber] = eq[subbandnumber]*sample;\r
+ @LATTICE("THIS<IN,THISLOC=THIS")\r
+ public void input_sample(@LOC("IN") float sample, @LOC("IN") int subbandnumber) {\r
+ samples[subbandnumber] = eq[subbandnumber] * sample;\r
}\r
\r
@LATTICE("TH<IN,IN<C,C*,THISLOC=TH")\r
- public void input_samples(@LOC("IN") float[] s)\r
- {\r
- for (@LOC("C") int i=31; i>=0; i--)\r
- { \r
- samples[i] = s[i]*eq[i];\r
- }\r
+ public void input_samples(@LOC("IN") float[] s) {\r
+ for (@LOC("C") int i = 31; i >= 0; i--) {\r
+ samples[i] = s[i] * eq[i];\r
+ }\r
}\r
- \r
+\r
/**\r
* Compute new values via a fast cosine transform.\r
*/\r
- private void compute_new_v()\r
- {\r
+ private void compute_new_v() {\r
// p is fully initialized from x1\r
- //float[] p = _p;\r
+ // float[] p = _p;\r
// pp is fully initialized from p\r
- //float[] pp = _pp; \r
+ // float[] pp = _pp;\r
\r
- //float[] new_v = _new_v;\r
+ // float[] new_v = _new_v;\r
\r
- //float[] new_v = new float[32]; // new V[0-15] and V[33-48] of Figure 3-A.2 in ISO DIS 11172-3\r
- //float[] p = new float[16];\r
- //float[] pp = new float[16];\r
+ // float[] new_v = new float[32]; // new V[0-15] and V[33-48] of Figure\r
+ // 3-A.2 in ISO DIS 11172-3\r
+ // float[] p = new float[16];\r
+ // float[] pp = new float[16];\r
\r
/*\r
- for (int i=31; i>=0; i--)\r
- {\r
- new_v[i] = 0.0f;\r
- }\r
+ * for (int i=31; i>=0; i--) { new_v[i] = 0.0f; }\r
*/\r
\r
@LOC("IN,SynthesisFilter.L4") float new_v0 = 0.0f;\r
@LOC("IN,SynthesisFilter.L2") float new_v30 = 0.0f;\r
@LOC("IN,SynthesisFilter.L4") float new_v31 = 0.0f;\r
\r
-// new_v0 = new_v1 = new_v2 = new_v3 = new_v4 = new_v5 = new_v6 = new_v7 = new_v8 = new_v9 = \r
-// new_v10 = new_v11 = new_v12 = new_v13 = new_v14 = new_v15 = new_v16 = new_v17 = new_v18 = new_v19 = \r
-// new_v20 = new_v21 = new_v22 = new_v23 = new_v24 = new_v25 = new_v26 = new_v27 = new_v28 = new_v29 = \r
-// new_v30 = new_v31 = 0.0f;\r
-\r
+ // new_v0 = new_v1 = new_v2 = new_v3 = new_v4 = new_v5 = new_v6 = new_v7 =\r
+ // new_v8 = new_v9 =\r
+ // new_v10 = new_v11 = new_v12 = new_v13 = new_v14 = new_v15 = new_v16 =\r
+ // new_v17 = new_v18 = new_v19 =\r
+ // new_v20 = new_v21 = new_v22 = new_v23 = new_v24 = new_v25 = new_v26 =\r
+ // new_v27 = new_v28 = new_v29 =\r
+ // new_v30 = new_v31 = 0.0f;\r
\r
- // float[] new_v = new float[32]; // new V[0-15] and V[33-48] of Figure 3-A.2 in ISO DIS 11172-3\r
- // float[] p = new float[16];\r
- // float[] pp = new float[16];\r
+ // float[] new_v = new float[32]; // new V[0-15] and V[33-48] of Figure\r
+ // 3-A.2 in ISO DIS 11172-3\r
+ // float[] p = new float[16];\r
+ // float[] pp = new float[16];\r
\r
- //float[] s = samples; // subbed in samples directly below to reduce uneccesary areas\r
+ // float[] s = samples; // subbed in samples directly below to reduce\r
+ // uneccesary areas\r
\r
@LOC("IN,SynthesisFilter.S") float s0 = samples[0];\r
@LOC("IN,SynthesisFilter.S") float s1 = samples[1];\r
@LOC("IN,SynthesisFilter.S") float s7 = samples[7];\r
@LOC("IN,SynthesisFilter.S") float s8 = samples[8];\r
@LOC("IN,SynthesisFilter.S") float s9 = samples[9];\r
- @LOC("IN,SynthesisFilter.S") float s10 = samples[10]; \r
+ @LOC("IN,SynthesisFilter.S") float s10 = samples[10];\r
@LOC("IN,SynthesisFilter.S") float s11 = samples[11];\r
@LOC("IN,SynthesisFilter.S") float s12 = samples[12];\r
@LOC("IN,SynthesisFilter.S") float s13 = samples[13];\r
@LOC("IN,SynthesisFilter.S") float s17 = samples[17];\r
@LOC("IN,SynthesisFilter.S") float s18 = samples[18];\r
@LOC("IN,SynthesisFilter.S") float s19 = samples[19];\r
- @LOC("IN,SynthesisFilter.S") float s20 = samples[20]; \r
+ @LOC("IN,SynthesisFilter.S") float s20 = samples[20];\r
@LOC("IN,SynthesisFilter.S") float s21 = samples[21];\r
@LOC("IN,SynthesisFilter.S") float s22 = samples[22];\r
@LOC("IN,SynthesisFilter.S") float s23 = samples[23];\r
@LOC("IN,SynthesisFilter.S") float s27 = samples[27];\r
@LOC("IN,SynthesisFilter.S") float s28 = samples[28];\r
@LOC("IN,SynthesisFilter.S") float s29 = samples[29];\r
- @LOC("IN,SynthesisFilter.S") float s30 = samples[30]; \r
+ @LOC("IN,SynthesisFilter.S") float s30 = samples[30];\r
@LOC("IN,SynthesisFilter.S") float s31 = samples[31];\r
\r
@LOC("IN,SynthesisFilter.LSH") float p0 = s0 + s31;\r
p14 = (pp10 - pp13) * cos5_16;\r
p15 = (pp11 - pp12) * cos7_16;\r
\r
-\r
pp0 = p0 + p3;\r
pp1 = p1 + p2;\r
pp2 = (p0 - p3) * cos1_8;\r
\r
// this is pretty insane coding\r
@LOC("IN,SynthesisFilter.L3") float tmp1;\r
- new_v19/*36-17*/ = -(new_v4 = (new_v12 = p7) + p5) - p6;\r
- new_v27/*44-17*/ = -p6 - p7 - p4;\r
+ new_v19/* 36-17 */= -(new_v4 = (new_v12 = p7) + p5) - p6;\r
+ new_v27/* 44-17 */= -p6 - p7 - p4;\r
new_v6 = (new_v10 = (new_v14 = p15) + p11) + p13;\r
- new_v17/*34-17*/ = -(new_v2 = p15 + p13 + p9) - p14;\r
- new_v21/*38-17*/ = (tmp1 = -p14 - p15 - p10 - p11) - p13;\r
- new_v29/*46-17*/ = -p14 - p15 - p12 - p8;\r
- new_v25/*42-17*/ = tmp1 - p12;\r
- new_v31/*48-17*/ = -p0;\r
+ new_v17/* 34-17 */= -(new_v2 = p15 + p13 + p9) - p14;\r
+ new_v21/* 38-17 */= (tmp1 = -p14 - p15 - p10 - p11) - p13;\r
+ new_v29/* 46-17 */= -p14 - p15 - p12 - p8;\r
+ new_v25/* 42-17 */= tmp1 - p12;\r
+ new_v31/* 48-17 */= -p0;\r
new_v0 = p1;\r
- new_v23/*40-17*/ = -(new_v8 = p3) - p2;\r
+ new_v23/* 40-17 */= -(new_v8 = p3) - p2;\r
\r
p0 = (s0 - s31) * cos1_64;\r
p1 = (s1 - s30) * cos3_64;\r
p14 = (s14 - s17) * cos29_64;\r
p15 = (s15 - s16) * cos31_64;\r
\r
-\r
pp0 = p0 + p15;\r
pp1 = p1 + p14;\r
pp2 = p2 + p13;\r
pp14 = (p6 - p9) * cos13_32;\r
pp15 = (p7 - p8) * cos15_32;\r
\r
-\r
p0 = pp0 + pp7;\r
p1 = pp1 + pp6;\r
p2 = pp2 + pp5;\r
p14 = (pp10 - pp13) * cos5_16;\r
p15 = (pp11 - pp12) * cos7_16;\r
\r
-\r
pp0 = p0 + p3;\r
pp1 = p1 + p2;\r
pp2 = (p0 - p3) * cos1_8;\r
pp14 = (p12 - p15) * cos1_8;\r
pp15 = (p13 - p14) * cos3_8;\r
\r
-\r
p0 = pp0 + pp1;\r
p1 = (pp0 - pp1) * cos1_4;\r
p2 = pp2 + pp3;\r
p14 = pp14 + pp15;\r
p15 = (pp14 - pp15) * cos1_4;\r
\r
-\r
// manually doing something that a compiler should handle sucks\r
// coding like this is hard to read\r
@LOC("IN,SynthesisFilter.L4") float tmp2;\r
-// new_v5 = (new_v11 = (new_v13 = (new_v15 = p15) + p7) + p11)\r
-// + p5 + p13;\r
+ // new_v5 = (new_v11 = (new_v13 = (new_v15 = p15) + p7) + p11)\r
+ // + p5 + p13;\r
new_v15 = p15;\r
new_v13 = p15 + p7;\r
new_v11 = p15 + p7 + p11;\r
new_v5 = p15 + p7 + p11 + p5 + p13;\r
- \r
-// new_v7 = (new_v9 = p15 + p11 + p3) + p13;\r
+\r
+ // new_v7 = (new_v9 = p15 + p11 + p3) + p13;\r
new_v9 = p15 + p11 + p3;\r
new_v7 = new_v9 + p13;\r
- \r
- new_v16/*33-17*/ = -(new_v1 = (tmp1 = p13 + p15 + p9) + p1) - p14;\r
- new_v18/*35-17*/ = -(new_v3 = tmp1 + p5 + p7) - p6 - p14;\r
-\r
- new_v22/*39-17*/ = (tmp1 = -p10 - p11 - p14 - p15)\r
- - p13 - p2 - p3;\r
- new_v20/*37-17*/ = tmp1 - p13 - p5 - p6 - p7;\r
- new_v24/*41-17*/ = tmp1 - p12 - p2 - p3;\r
- new_v26/*43-17*/ = tmp1 - p12 - (tmp2 = p4 + p6 + p7);\r
- new_v30/*47-17*/ = (tmp1 = -p8 - p12 - p14 - p15) - p0;\r
- new_v28/*45-17*/ = tmp1 - tmp2;\r
-\r
- // insert V[0-15] (== new_v[0-15]) into actual v: \r
+\r
+ new_v16/* 33-17 */= -(new_v1 = (tmp1 = p13 + p15 + p9) + p1) - p14;\r
+ new_v18/* 35-17 */= -(new_v3 = tmp1 + p5 + p7) - p6 - p14;\r
+\r
+ new_v22/* 39-17 */= (tmp1 = -p10 - p11 - p14 - p15) - p13 - p2 - p3;\r
+ new_v20/* 37-17 */= tmp1 - p13 - p5 - p6 - p7;\r
+ new_v24/* 41-17 */= tmp1 - p12 - p2 - p3;\r
+ new_v26/* 43-17 */= tmp1 - p12 - (tmp2 = p4 + p6 + p7);\r
+ new_v30/* 47-17 */= (tmp1 = -p8 - p12 - p14 - p15) - p0;\r
+ new_v28/* 45-17 */= tmp1 - tmp2;\r
+\r
+ // insert V[0-15] (== new_v[0-15]) into actual v:\r
// float[] x2 = actual_v + actual_write_pos;\r
- //float dest[] = actual_v; //actual_v subbed in so as not to create a new area\r
+ // float dest[] = actual_v; //actual_v subbed in so as not to create a new\r
+ // area\r
\r
- //int pos = actual_write_pos; //substituted to simplify location relations\r
+ // int pos = actual_write_pos; //substituted to simplify location relations\r
\r
v1[0 + actual_write_pos] = new_v0;\r
v1[16 + actual_write_pos] = new_v1;\r
v1[496 + actual_write_pos] = -new_v1;\r
\r
// insert V[32] (== -new_v[0]) into other v:\r
- //dest = (actual_v==v1) ? v2 : v1; //assignment replaced with if statement so that new areas are not created\r
+ // dest = (actual_v==v1) ? v2 : v1; //assignment replaced with if statement\r
+ // so that new areas are not created\r
\r
v2[0 + actual_write_pos] = -new_v0;\r
// insert V[33-48] (== new_v[16-31]) into other v:\r
v2[480 + actual_write_pos] = new_v17;\r
v2[496 + actual_write_pos] = new_v16;\r
}\r
- \r
+\r
/**\r
* Compute PCM Samples.\r
*/\r
- \r
- @LOC("TMP") private float[] _tmpOut = new float[32];\r
- \r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples0(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1; //subbed in variable name instead to reduce areas \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut; //subbed in variable name instread to reduce areas\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
- //final float[] dp = d16[i]; //subbed in variable name instead to reduce areas\r
- pcm_sample = (float)(((v1[0 + dvp] * d16[i][0]) +\r
- (v1[15 + dvp] * d16[i][1]) +\r
- (v1[14 + dvp] * d16[i][2]) +\r
- (v1[13 + dvp] * d16[i][3]) +\r
- (v1[12 + dvp] * d16[i][4]) +\r
- (v1[11 + dvp] * d16[i][5]) +\r
- (v1[10 + dvp] * d16[i][6]) +\r
- (v1[9 + dvp] * d16[i][7]) +\r
- (v1[8 + dvp] * d16[i][8]) +\r
- (v1[7 + dvp] * d16[i][9]) +\r
- (v1[6 + dvp] * d16[i][10]) +\r
- (v1[5 + dvp] * d16[i][11]) +\r
- (v1[4 + dvp] * d16[i][12]) +\r
- (v1[3 + dvp] * d16[i][13]) +\r
- (v1[2 + dvp] * d16[i][14]) +\r
- (v1[1 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LOC("TMP")\r
+ private float[] _tmpOut = new float[32];\r
+\r
+ @LATTICE("IN,THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples0(@LOC("IN") Obuffer buffer) {\r
+ // final float[] vp = v1; //subbed in variable name instead to reduce areas\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut; //subbed in variable name instread to\r
+ // reduce areas\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+ // final float[] dp = d16[i]; //subbed in variable name instead to reduce\r
+ // areas\r
+ pcm_sample =\r
+ (float) (((v1[0 + dvp] * d16[i][0]) + (v1[15 + dvp] * d16[i][1])\r
+ + (v1[14 + dvp] * d16[i][2]) + (v1[13 + dvp] * d16[i][3])\r
+ + (v1[12 + dvp] * d16[i][4]) + (v1[11 + dvp] * d16[i][5])\r
+ + (v1[10 + dvp] * d16[i][6]) + (v1[9 + dvp] * d16[i][7]) + (v1[8 + dvp] * d16[i][8])\r
+ + (v1[7 + dvp] * d16[i][9]) + (v1[6 + dvp] * d16[i][10]) + (v1[5 + dvp] * d16[i][11])\r
+ + (v1[4 + dvp] * d16[i][12]) + (v1[3 + dvp] * d16[i][13])\r
+ + (v1[2 + dvp] * d16[i][14]) + (v1[1 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples1(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1; \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[1 + dvp] * d16[i][0]) +\r
- (v1[0 + dvp] * d16[i][1]) +\r
- (v1[15 + dvp] * d16[i][2]) +\r
- (v1[14 + dvp] * d16[i][3]) +\r
- (v1[13 + dvp] * d16[i][4]) +\r
- (v1[12 + dvp] * d16[i][5]) +\r
- (v1[11 + dvp] * d16[i][6]) +\r
- (v1[10 + dvp] * d16[i][7]) +\r
- (v1[9 + dvp] * d16[i][8]) +\r
- (v1[8 + dvp] * d16[i][9]) +\r
- (v1[7 + dvp] * d16[i][10]) +\r
- (v1[6 + dvp] * d16[i][11]) +\r
- (v1[5 + dvp] * d16[i][12]) +\r
- (v1[4 + dvp] * d16[i][13]) +\r
- (v1[3 + dvp] * d16[i][14]) +\r
- (v1[2 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
-// v1\r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples1(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[1 + dvp] * d16[i][0]) + (v1[0 + dvp] * d16[i][1])\r
+ + (v1[15 + dvp] * d16[i][2]) + (v1[14 + dvp] * d16[i][3])\r
+ + (v1[13 + dvp] * d16[i][4]) + (v1[12 + dvp] * d16[i][5])\r
+ + (v1[11 + dvp] * d16[i][6]) + (v1[10 + dvp] * d16[i][7]) + (v1[9 + dvp] * d16[i][8])\r
+ + (v1[8 + dvp] * d16[i][9]) + (v1[7 + dvp] * d16[i][10]) + (v1[6 + dvp] * d16[i][11])\r
+ + (v1[5 + dvp] * d16[i][12]) + (v1[4 + dvp] * d16[i][13])\r
+ + (v1[3 + dvp] * d16[i][14]) + (v1[2 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+ // v1\r
+ dvp += 16;\r
+ } // for\r
+ }\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples2(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[2 + dvp] * d16[i][0]) + (v1[1 + dvp] * d16[i][1])\r
+ + (v1[0 + dvp] * d16[i][2]) + (v1[15 + dvp] * d16[i][3]) + (v1[14 + dvp] * d16[i][4])\r
+ + (v1[13 + dvp] * d16[i][5]) + (v1[12 + dvp] * d16[i][6])\r
+ + (v1[11 + dvp] * d16[i][7]) + (v1[10 + dvp] * d16[i][8]) + (v1[9 + dvp] * d16[i][9])\r
+ + (v1[8 + dvp] * d16[i][10]) + (v1[7 + dvp] * d16[i][11])\r
+ + (v1[6 + dvp] * d16[i][12]) + (v1[5 + dvp] * d16[i][13])\r
+ + (v1[4 + dvp] * d16[i][14]) + (v1[3 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples2(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[2 + dvp] * d16[i][0]) +\r
- (v1[1 + dvp] * d16[i][1]) +\r
- (v1[0 + dvp] * d16[i][2]) +\r
- (v1[15 + dvp] * d16[i][3]) +\r
- (v1[14 + dvp] * d16[i][4]) +\r
- (v1[13 + dvp] * d16[i][5]) +\r
- (v1[12 + dvp] * d16[i][6]) +\r
- (v1[11 + dvp] * d16[i][7]) +\r
- (v1[10 + dvp] * d16[i][8]) +\r
- (v1[9 + dvp] * d16[i][9]) +\r
- (v1[8 + dvp] * d16[i][10]) +\r
- (v1[7 + dvp] * d16[i][11]) +\r
- (v1[6 + dvp] * d16[i][12]) +\r
- (v1[5 + dvp] * d16[i][13]) +\r
- (v1[4 + dvp] * d16[i][14]) +\r
- (v1[3 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples3(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ @LOC("I") int idx = 0;\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[3 + dvp] * d16[i][0]) + (v1[2 + dvp] * d16[i][1])\r
+ + (v1[1 + dvp] * d16[i][2]) + (v1[0 + dvp] * d16[i][3]) + (v1[15 + dvp] * d16[i][4])\r
+ + (v1[14 + dvp] * d16[i][5]) + (v1[13 + dvp] * d16[i][6])\r
+ + (v1[12 + dvp] * d16[i][7]) + (v1[11 + dvp] * d16[i][8])\r
+ + (v1[10 + dvp] * d16[i][9]) + (v1[9 + dvp] * d16[i][10])\r
+ + (v1[8 + dvp] * d16[i][11]) + (v1[7 + dvp] * d16[i][12])\r
+ + (v1[6 + dvp] * d16[i][13]) + (v1[5 + dvp] * d16[i][14]) + (v1[4 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS") \r
- private void compute_pcm_samples3(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- int idx = 0;\r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float) ( ( (v1[3 + dvp] * d16[i][0]) +\r
- (v1[2 + dvp] * d16[i][1]) +\r
- (v1[1 + dvp] * d16[i][2]) +\r
- (v1[0 + dvp] * d16[i][3]) +\r
- (v1[15 + dvp] * d16[i][4]) +\r
- (v1[14 + dvp] * d16[i][5]) +\r
- (v1[13 + dvp] * d16[i][6]) +\r
- (v1[12 + dvp] * d16[i][7]) +\r
- (v1[11 + dvp] * d16[i][8]) +\r
- (v1[10 + dvp] * d16[i][9]) +\r
- (v1[9 + dvp] * d16[i][10]) +\r
- (v1[8 + dvp] * d16[i][11]) +\r
- (v1[7 + dvp] * d16[i][12]) +\r
- (v1[6 + dvp] * d16[i][13]) +\r
- (v1[5 + dvp] * d16[i][14]) +\r
- (v1[4 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples4(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[4 + dvp] * d16[i][0]) + (v1[3 + dvp] * d16[i][1])\r
+ + (v1[2 + dvp] * d16[i][2]) + (v1[1 + dvp] * d16[i][3]) + (v1[0 + dvp] * d16[i][4])\r
+ + (v1[15 + dvp] * d16[i][5]) + (v1[14 + dvp] * d16[i][6])\r
+ + (v1[13 + dvp] * d16[i][7]) + (v1[12 + dvp] * d16[i][8])\r
+ + (v1[11 + dvp] * d16[i][9]) + (v1[10 + dvp] * d16[i][10])\r
+ + (v1[9 + dvp] * d16[i][11]) + (v1[8 + dvp] * d16[i][12])\r
+ + (v1[7 + dvp] * d16[i][13]) + (v1[6 + dvp] * d16[i][14]) + (v1[5 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS") \r
- private void compute_pcm_samples4(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[4 + dvp] * d16[i][0]) +\r
- (v1[3 + dvp] * d16[i][1]) +\r
- (v1[2 + dvp] * d16[i][2]) +\r
- (v1[1 + dvp] * d16[i][3]) +\r
- (v1[0 + dvp] * d16[i][4]) +\r
- (v1[15 + dvp] * d16[i][5]) +\r
- (v1[14 + dvp] * d16[i][6]) +\r
- (v1[13 + dvp] * d16[i][7]) +\r
- (v1[12 + dvp] * d16[i][8]) +\r
- (v1[11 + dvp] * d16[i][9]) +\r
- (v1[10 + dvp] * d16[i][10]) +\r
- (v1[9 + dvp] * d16[i][11]) +\r
- (v1[8 + dvp] * d16[i][12]) +\r
- (v1[7 + dvp] * d16[i][13]) +\r
- (v1[6 + dvp] * d16[i][14]) +\r
- (v1[5 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples5(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[5 + dvp] * d16[i][0]) + (v1[4 + dvp] * d16[i][1])\r
+ + (v1[3 + dvp] * d16[i][2]) + (v1[2 + dvp] * d16[i][3]) + (v1[1 + dvp] * d16[i][4])\r
+ + (v1[0 + dvp] * d16[i][5]) + (v1[15 + dvp] * d16[i][6]) + (v1[14 + dvp] * d16[i][7])\r
+ + (v1[13 + dvp] * d16[i][8]) + (v1[12 + dvp] * d16[i][9])\r
+ + (v1[11 + dvp] * d16[i][10]) + (v1[10 + dvp] * d16[i][11])\r
+ + (v1[9 + dvp] * d16[i][12]) + (v1[8 + dvp] * d16[i][13])\r
+ + (v1[7 + dvp] * d16[i][14]) + (v1[6 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples5(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- // final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[5 + dvp] * d16[i][0]) +\r
- (v1[4 + dvp] * d16[i][1]) +\r
- (v1[3 + dvp] * d16[i][2]) +\r
- (v1[2 + dvp] * d16[i][3]) +\r
- (v1[1 + dvp] * d16[i][4]) +\r
- (v1[0 + dvp] * d16[i][5]) +\r
- (v1[15 + dvp] * d16[i][6]) +\r
- (v1[14 + dvp] * d16[i][7]) +\r
- (v1[13 + dvp] * d16[i][8]) +\r
- (v1[12 + dvp] * d16[i][9]) +\r
- (v1[11 + dvp] * d16[i][10]) +\r
- (v1[10 + dvp] * d16[i][11]) +\r
- (v1[9 + dvp] * d16[i][12]) +\r
- (v1[8 + dvp] * d16[i][13]) +\r
- (v1[7 + dvp] * d16[i][14]) +\r
- (v1[6 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples6(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[6 + dvp] * d16[i][0]) + (v1[5 + dvp] * d16[i][1])\r
+ + (v1[4 + dvp] * d16[i][2]) + (v1[3 + dvp] * d16[i][3]) + (v1[2 + dvp] * d16[i][4])\r
+ + (v1[1 + dvp] * d16[i][5]) + (v1[0 + dvp] * d16[i][6]) + (v1[15 + dvp] * d16[i][7])\r
+ + (v1[14 + dvp] * d16[i][8]) + (v1[13 + dvp] * d16[i][9])\r
+ + (v1[12 + dvp] * d16[i][10]) + (v1[11 + dvp] * d16[i][11])\r
+ + (v1[10 + dvp] * d16[i][12]) + (v1[9 + dvp] * d16[i][13])\r
+ + (v1[8 + dvp] * d16[i][14]) + (v1[7 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples6(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1; \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[6 + dvp] * d16[i][0]) +\r
- (v1[5 + dvp] * d16[i][1]) +\r
- (v1[4 + dvp] * d16[i][2]) +\r
- (v1[3 + dvp] * d16[i][3]) +\r
- (v1[2 + dvp] * d16[i][4]) +\r
- (v1[1 + dvp] * d16[i][5]) +\r
- (v1[0 + dvp] * d16[i][6]) +\r
- (v1[15 + dvp] * d16[i][7]) +\r
- (v1[14 + dvp] * d16[i][8]) +\r
- (v1[13 + dvp] * d16[i][9]) +\r
- (v1[12 + dvp] * d16[i][10]) +\r
- (v1[11 + dvp] * d16[i][11]) +\r
- (v1[10 + dvp] * d16[i][12]) +\r
- (v1[9 + dvp] * d16[i][13]) +\r
- (v1[8 + dvp] * d16[i][14]) +\r
- (v1[7 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples7(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[7 + dvp] * d16[i][0]) + (v1[6 + dvp] * d16[i][1])\r
+ + (v1[5 + dvp] * d16[i][2]) + (v1[4 + dvp] * d16[i][3]) + (v1[3 + dvp] * d16[i][4])\r
+ + (v1[2 + dvp] * d16[i][5]) + (v1[1 + dvp] * d16[i][6]) + (v1[0 + dvp] * d16[i][7])\r
+ + (v1[15 + dvp] * d16[i][8]) + (v1[14 + dvp] * d16[i][9])\r
+ + (v1[13 + dvp] * d16[i][10]) + (v1[12 + dvp] * d16[i][11])\r
+ + (v1[11 + dvp] * d16[i][12]) + (v1[10 + dvp] * d16[i][13])\r
+ + (v1[9 + dvp] * d16[i][14]) + (v1[8 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples7(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[7 + dvp] * d16[i][0]) +\r
- (v1[6 + dvp] * d16[i][1]) +\r
- (v1[5 + dvp] * d16[i][2]) +\r
- (v1[4 + dvp] * d16[i][3]) +\r
- (v1[3 + dvp] * d16[i][4]) +\r
- (v1[2 + dvp] * d16[i][5]) +\r
- (v1[1 + dvp] * d16[i][6]) +\r
- (v1[0 + dvp] * d16[i][7]) +\r
- (v1[15 + dvp] * d16[i][8]) +\r
- (v1[14 + dvp] * d16[i][9]) +\r
- (v1[13 + dvp] * d16[i][10]) +\r
- (v1[12 + dvp] * d16[i][11]) +\r
- (v1[11 + dvp] * d16[i][12]) +\r
- (v1[10 + dvp] * d16[i][13]) +\r
- (v1[9 + dvp] * d16[i][14]) +\r
- (v1[8 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples8(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[8 + dvp] * d16[i][0]) + (v1[7 + dvp] * d16[i][1])\r
+ + (v1[6 + dvp] * d16[i][2]) + (v1[5 + dvp] * d16[i][3]) + (v1[4 + dvp] * d16[i][4])\r
+ + (v1[3 + dvp] * d16[i][5]) + (v1[2 + dvp] * d16[i][6]) + (v1[1 + dvp] * d16[i][7])\r
+ + (v1[0 + dvp] * d16[i][8]) + (v1[15 + dvp] * d16[i][9])\r
+ + (v1[14 + dvp] * d16[i][10]) + (v1[13 + dvp] * d16[i][11])\r
+ + (v1[12 + dvp] * d16[i][12]) + (v1[11 + dvp] * d16[i][13])\r
+ + (v1[10 + dvp] * d16[i][14]) + (v1[9 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples8(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[8 + dvp] * d16[i][0]) +\r
- (v1[7 + dvp] * d16[i][1]) +\r
- (v1[6 + dvp] * d16[i][2]) +\r
- (v1[5 + dvp] * d16[i][3]) +\r
- (v1[4 + dvp] * d16[i][4]) +\r
- (v1[3 + dvp] * d16[i][5]) +\r
- (v1[2 + dvp] * d16[i][6]) +\r
- (v1[1 + dvp] * d16[i][7]) +\r
- (v1[0 + dvp] * d16[i][8]) +\r
- (v1[15 + dvp] * d16[i][9]) +\r
- (v1[14 + dvp] * d16[i][10]) +\r
- (v1[13 + dvp] * d16[i][11]) +\r
- (v1[12 + dvp] * d16[i][12]) +\r
- (v1[11 + dvp] * d16[i][13]) +\r
- (v1[10 + dvp] * d16[i][14]) +\r
- (v1[9 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples9(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[9 + dvp] * d16[i][0]) + (v1[8 + dvp] * d16[i][1])\r
+ + (v1[7 + dvp] * d16[i][2]) + (v1[6 + dvp] * d16[i][3]) + (v1[5 + dvp] * d16[i][4])\r
+ + (v1[4 + dvp] * d16[i][5]) + (v1[3 + dvp] * d16[i][6]) + (v1[2 + dvp] * d16[i][7])\r
+ + (v1[1 + dvp] * d16[i][8]) + (v1[0 + dvp] * d16[i][9]) + (v1[15 + dvp] * d16[i][10])\r
+ + (v1[14 + dvp] * d16[i][11]) + (v1[13 + dvp] * d16[i][12])\r
+ + (v1[12 + dvp] * d16[i][13]) + (v1[11 + dvp] * d16[i][14]) + (v1[10 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples9(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[9 + dvp] * d16[i][0]) +\r
- (v1[8 + dvp] * d16[i][1]) +\r
- (v1[7 + dvp] * d16[i][2]) +\r
- (v1[6 + dvp] * d16[i][3]) +\r
- (v1[5 + dvp] * d16[i][4]) +\r
- (v1[4 + dvp] * d16[i][5]) +\r
- (v1[3 + dvp] * d16[i][6]) +\r
- (v1[2 + dvp] * d16[i][7]) +\r
- (v1[1 + dvp] * d16[i][8]) +\r
- (v1[0 + dvp] * d16[i][9]) +\r
- (v1[15 + dvp] * d16[i][10]) +\r
- (v1[14 + dvp] * d16[i][11]) +\r
- (v1[13 + dvp] * d16[i][12]) +\r
- (v1[12 + dvp] * d16[i][13]) +\r
- (v1[11 + dvp] * d16[i][14]) +\r
- (v1[10 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples10(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[10 + dvp] * d16[i][0]) + (v1[9 + dvp] * d16[i][1])\r
+ + (v1[8 + dvp] * d16[i][2]) + (v1[7 + dvp] * d16[i][3]) + (v1[6 + dvp] * d16[i][4])\r
+ + (v1[5 + dvp] * d16[i][5]) + (v1[4 + dvp] * d16[i][6]) + (v1[3 + dvp] * d16[i][7])\r
+ + (v1[2 + dvp] * d16[i][8]) + (v1[1 + dvp] * d16[i][9]) + (v1[0 + dvp] * d16[i][10])\r
+ + (v1[15 + dvp] * d16[i][11]) + (v1[14 + dvp] * d16[i][12])\r
+ + (v1[13 + dvp] * d16[i][13]) + (v1[12 + dvp] * d16[i][14]) + (v1[11 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples10(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1; \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[10 + dvp] * d16[i][0]) +\r
- (v1[9 + dvp] * d16[i][1]) +\r
- (v1[8 + dvp] * d16[i][2]) +\r
- (v1[7 + dvp] * d16[i][3]) +\r
- (v1[6 + dvp] * d16[i][4]) +\r
- (v1[5 + dvp] * d16[i][5]) +\r
- (v1[4 + dvp] * d16[i][6]) +\r
- (v1[3 + dvp] * d16[i][7]) +\r
- (v1[2 + dvp] * d16[i][8]) +\r
- (v1[1 + dvp] * d16[i][9]) +\r
- (v1[0 + dvp] * d16[i][10]) +\r
- (v1[15 + dvp] * d16[i][11]) +\r
- (v1[14 + dvp] * d16[i][12]) +\r
- (v1[13 + dvp] * d16[i][13]) +\r
- (v1[12 + dvp] * d16[i][14]) +\r
- (v1[11 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples11(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[11 + dvp] * d16[i][0]) + (v1[10 + dvp] * d16[i][1])\r
+ + (v1[9 + dvp] * d16[i][2]) + (v1[8 + dvp] * d16[i][3]) + (v1[7 + dvp] * d16[i][4])\r
+ + (v1[6 + dvp] * d16[i][5]) + (v1[5 + dvp] * d16[i][6]) + (v1[4 + dvp] * d16[i][7])\r
+ + (v1[3 + dvp] * d16[i][8]) + (v1[2 + dvp] * d16[i][9]) + (v1[1 + dvp] * d16[i][10])\r
+ + (v1[0 + dvp] * d16[i][11]) + (v1[15 + dvp] * d16[i][12])\r
+ + (v1[14 + dvp] * d16[i][13]) + (v1[13 + dvp] * d16[i][14]) + (v1[12 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples11(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[11 + dvp] * d16[i][0]) +\r
- (v1[10 + dvp] * d16[i][1]) +\r
- (v1[9 + dvp] * d16[i][2]) +\r
- (v1[8 + dvp] * d16[i][3]) +\r
- (v1[7 + dvp] * d16[i][4]) +\r
- (v1[6 + dvp] * d16[i][5]) +\r
- (v1[5 + dvp] * d16[i][6]) +\r
- (v1[4 + dvp] * d16[i][7]) +\r
- (v1[3 + dvp] * d16[i][8]) +\r
- (v1[2 + dvp] * d16[i][9]) +\r
- (v1[1 + dvp] * d16[i][10]) +\r
- (v1[0 + dvp] * d16[i][11]) +\r
- (v1[15 + dvp] * d16[i][12]) +\r
- (v1[14 + dvp] * d16[i][13]) +\r
- (v1[13 + dvp] * d16[i][14]) +\r
- (v1[12 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples12(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[12 + dvp] * d16[i][0]) + (v1[11 + dvp] * d16[i][1])\r
+ + (v1[10 + dvp] * d16[i][2]) + (v1[9 + dvp] * d16[i][3]) + (v1[8 + dvp] * d16[i][4])\r
+ + (v1[7 + dvp] * d16[i][5]) + (v1[6 + dvp] * d16[i][6]) + (v1[5 + dvp] * d16[i][7])\r
+ + (v1[4 + dvp] * d16[i][8]) + (v1[3 + dvp] * d16[i][9]) + (v1[2 + dvp] * d16[i][10])\r
+ + (v1[1 + dvp] * d16[i][11]) + (v1[0 + dvp] * d16[i][12])\r
+ + (v1[15 + dvp] * d16[i][13]) + (v1[14 + dvp] * d16[i][14]) + (v1[13 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples12(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1; \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[12 + dvp] * d16[i][0]) +\r
- (v1[11 + dvp] * d16[i][1]) +\r
- (v1[10 + dvp] * d16[i][2]) +\r
- (v1[9 + dvp] * d16[i][3]) +\r
- (v1[8 + dvp] * d16[i][4]) +\r
- (v1[7 + dvp] * d16[i][5]) +\r
- (v1[6 + dvp] * d16[i][6]) +\r
- (v1[5 + dvp] * d16[i][7]) +\r
- (v1[4 + dvp] * d16[i][8]) +\r
- (v1[3 + dvp] * d16[i][9]) +\r
- (v1[2 + dvp] * d16[i][10]) +\r
- (v1[1 + dvp] * d16[i][11]) +\r
- (v1[0 + dvp] * d16[i][12]) +\r
- (v1[15 + dvp] * d16[i][13]) +\r
- (v1[14 + dvp] * d16[i][14]) +\r
- (v1[13 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples13(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[13 + dvp] * d16[i][0]) + (v1[12 + dvp] * d16[i][1])\r
+ + (v1[11 + dvp] * d16[i][2]) + (v1[10 + dvp] * d16[i][3]) + (v1[9 + dvp] * d16[i][4])\r
+ + (v1[8 + dvp] * d16[i][5]) + (v1[7 + dvp] * d16[i][6]) + (v1[6 + dvp] * d16[i][7])\r
+ + (v1[5 + dvp] * d16[i][8]) + (v1[4 + dvp] * d16[i][9]) + (v1[3 + dvp] * d16[i][10])\r
+ + (v1[2 + dvp] * d16[i][11]) + (v1[1 + dvp] * d16[i][12])\r
+ + (v1[0 + dvp] * d16[i][13]) + (v1[15 + dvp] * d16[i][14]) + (v1[14 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples13(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[13 + dvp] * d16[i][0]) +\r
- (v1[12 + dvp] * d16[i][1]) +\r
- (v1[11 + dvp] * d16[i][2]) +\r
- (v1[10 + dvp] * d16[i][3]) +\r
- (v1[9 + dvp] * d16[i][4]) +\r
- (v1[8 + dvp] * d16[i][5]) +\r
- (v1[7 + dvp] * d16[i][6]) +\r
- (v1[6 + dvp] * d16[i][7]) +\r
- (v1[5 + dvp] * d16[i][8]) +\r
- (v1[4 + dvp] * d16[i][9]) +\r
- (v1[3 + dvp] * d16[i][10]) +\r
- (v1[2 + dvp] * d16[i][11]) +\r
- (v1[1 + dvp] * d16[i][12]) +\r
- (v1[0 + dvp] * d16[i][13]) +\r
- (v1[15 + dvp] * d16[i][14]) +\r
- (v1[14 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples14(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ // final float[] dp = d16[i];\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+\r
+ pcm_sample =\r
+ (float) (((v1[14 + dvp] * d16[i][0]) + (v1[13 + dvp] * d16[i][1])\r
+ + (v1[12 + dvp] * d16[i][2]) + (v1[11 + dvp] * d16[i][3])\r
+ + (v1[10 + dvp] * d16[i][4]) + (v1[9 + dvp] * d16[i][5]) + (v1[8 + dvp] * d16[i][6])\r
+ + (v1[7 + dvp] * d16[i][7]) + (v1[6 + dvp] * d16[i][8]) + (v1[5 + dvp] * d16[i][9])\r
+ + (v1[4 + dvp] * d16[i][10]) + (v1[3 + dvp] * d16[i][11])\r
+ + (v1[2 + dvp] * d16[i][12]) + (v1[1 + dvp] * d16[i][13])\r
+ + (v1[0 + dvp] * d16[i][14]) + (v1[15 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples14(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- //final float[] dp = d16[i];\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
-\r
- pcm_sample = (float)(((v1[14 + dvp] * d16[i][0]) +\r
- (v1[13 + dvp] * d16[i][1]) +\r
- (v1[12 + dvp] * d16[i][2]) +\r
- (v1[11 + dvp] * d16[i][3]) +\r
- (v1[10 + dvp] * d16[i][4]) +\r
- (v1[9 + dvp] * d16[i][5]) +\r
- (v1[8 + dvp] * d16[i][6]) +\r
- (v1[7 + dvp] * d16[i][7]) +\r
- (v1[6 + dvp] * d16[i][8]) +\r
- (v1[5 + dvp] * d16[i][9]) +\r
- (v1[4 + dvp] * d16[i][10]) +\r
- (v1[3 + dvp] * d16[i][11]) +\r
- (v1[2 + dvp] * d16[i][12]) +\r
- (v1[1 + dvp] * d16[i][13]) +\r
- (v1[0 + dvp] * d16[i][14]) +\r
- (v1[15 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample;\r
- \r
- dvp += 16;\r
- } // for\r
+\r
+ @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS,GLOBALLOC=THIS")\r
+ private void compute_pcm_samples15(@LOC("THIS") Obuffer buffer) {\r
+ // final float[] vp = v1;\r
+\r
+ // int inc = v_inc;\r
+ // final float[] tmpOut = _tmpOut;\r
+ @LOC("DVP") int dvp = 0;\r
+\r
+ // fat chance of having this loop unroll\r
+ for (@LOC("I") int i = 0; i < 32; i++) {\r
+ @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
+ // final float dp[] = d16[i];\r
+ pcm_sample =\r
+ (float) (((v1[15 + dvp] * d16[i][0]) + (v1[14 + dvp] * d16[i][1])\r
+ + (v1[13 + dvp] * d16[i][2]) + (v1[12 + dvp] * d16[i][3])\r
+ + (v1[11 + dvp] * d16[i][4]) + (v1[10 + dvp] * d16[i][5]) + (v1[9 + dvp] * d16[i][6])\r
+ + (v1[8 + dvp] * d16[i][7]) + (v1[7 + dvp] * d16[i][8]) + (v1[6 + dvp] * d16[i][9])\r
+ + (v1[5 + dvp] * d16[i][10]) + (v1[4 + dvp] * d16[i][11])\r
+ + (v1[3 + dvp] * d16[i][12]) + (v1[2 + dvp] * d16[i][13])\r
+ + (v1[1 + dvp] * d16[i][14]) + (v1[0 + dvp] * d16[i][15])) * scalefactor);\r
+\r
+ _tmpOut[i] = pcm_sample;\r
+ dvp += 16;\r
+ } // for\r
}\r
- @LATTICE("THIS<DVP,DVP<I,DVP*,I*,THISLOC=THIS")\r
- private void compute_pcm_samples15(@LOC("THIS") Obuffer buffer)\r
- {\r
- //final float[] vp = v1;\r
- \r
- //int inc = v_inc;\r
- //final float[] tmpOut = _tmpOut;\r
- @LOC("DVP") int dvp =0;\r
- \r
- // fat chance of having this loop unroll\r
- for(@LOC("I") int i=0; i<32; i++)\r
- {\r
- @LOC("THIS,SynthesisFilter.PCM") float pcm_sample;\r
- //final float dp[] = d16[i];\r
- pcm_sample = (float)(((v1[15 + dvp] * d16[i][0]) +\r
- (v1[14 + dvp] * d16[i][1]) +\r
- (v1[13 + dvp] * d16[i][2]) +\r
- (v1[12 + dvp] * d16[i][3]) +\r
- (v1[11 + dvp] * d16[i][4]) +\r
- (v1[10 + dvp] * d16[i][5]) +\r
- (v1[9 + dvp] * d16[i][6]) +\r
- (v1[8 + dvp] * d16[i][7]) +\r
- (v1[7 + dvp] * d16[i][8]) +\r
- (v1[6 + dvp] * d16[i][9]) +\r
- (v1[5 + dvp] * d16[i][10]) +\r
- (v1[4 + dvp] * d16[i][11]) +\r
- (v1[3 + dvp] * d16[i][12]) +\r
- (v1[2 + dvp] * d16[i][13]) +\r
- (v1[1 + dvp] * d16[i][14]) +\r
- (v1[0 + dvp] * d16[i][15])\r
- ) * scalefactor);\r
-\r
- _tmpOut[i] = pcm_sample; \r
- dvp += 16;\r
- } // for\r
- }\r
- \r
-private void compute_pcm_samples(@LOC("GLOBAL") Obuffer buffer)\r
-{\r
- \r
- switch (actual_write_pos)\r
- {\r
- case 0: \r
- compute_pcm_samples0(buffer);\r
- break;\r
- case 1: \r
- compute_pcm_samples1(buffer);\r
- break;\r
- case 2: \r
- compute_pcm_samples2(buffer);\r
- break;\r
- case 3: \r
- compute_pcm_samples3(buffer);\r
- break;\r
- case 4: \r
- compute_pcm_samples4(buffer);\r
- break;\r
- case 5: \r
- compute_pcm_samples5(buffer);\r
- break;\r
- case 6: \r
- compute_pcm_samples6(buffer);\r
- break;\r
- case 7: \r
- compute_pcm_samples7(buffer);\r
- break;\r
- case 8: \r
- compute_pcm_samples8(buffer);\r
- break;\r
- case 9: \r
- compute_pcm_samples9(buffer);\r
- break;\r
- case 10: \r
- compute_pcm_samples10(buffer);\r
- break;\r
- case 11: \r
- compute_pcm_samples11(buffer);\r
- break;\r
- case 12: \r
- compute_pcm_samples12(buffer);\r
- break;\r
- case 13: \r
- compute_pcm_samples13(buffer);\r
- break;\r
- case 14: \r
- compute_pcm_samples14(buffer);\r
- break;\r
- case 15: \r
- compute_pcm_samples15(buffer);\r
- break;\r
- }\r
- \r
- if (buffer!=null)\r
- { \r
- buffer.appendSamples(channel, _tmpOut);\r
- }\r
- \r
-/*\r
- // MDM: I was considering putting in quality control for\r
- // low-spec CPUs, but the performance gain (about 10-15%) \r
- // did not justify the considerable drop in audio quality.\r
- switch (inc)\r
- {\r
- case 16: \r
- buffer.appendSamples(channel, tmpOut);\r
- break;\r
- case 32:\r
- for (int i=0; i<16; i++)\r
- {\r
- buffer.append(channel, (short)tmpOut[i]);\r
- buffer.append(channel, (short)tmpOut[i]); \r
- }\r
- break; \r
- case 64:\r
- for (int i=0; i<8; i++)\r
- {\r
- buffer.append(channel, (short)tmpOut[i]);\r
- buffer.append(channel, (short)tmpOut[i]);\r
- buffer.append(channel, (short)tmpOut[i]);\r
- buffer.append(channel, (short)tmpOut[i]); \r
- }\r
- break; \r
- \r
- }\r
-*/ \r
+\r
+ @LATTICE("THIS,THISLOC=THIS")\r
+ private void compute_pcm_samples(@LOC("THIS") Obuffer buffer) {\r
+\r
+ switch (actual_write_pos) {\r
+ case 0:\r
+ compute_pcm_samples0(buffer);\r
+ break;\r
+ case 1:\r
+ compute_pcm_samples1(buffer);\r
+ break;\r
+ case 2:\r
+ compute_pcm_samples2(buffer);\r
+ break;\r
+ case 3:\r
+ compute_pcm_samples3(buffer);\r
+ break;\r
+ case 4:\r
+ compute_pcm_samples4(buffer);\r
+ break;\r
+ case 5:\r
+ compute_pcm_samples5(buffer);\r
+ break;\r
+ case 6:\r
+ compute_pcm_samples6(buffer);\r
+ break;\r
+ case 7:\r
+ compute_pcm_samples7(buffer);\r
+ break;\r
+ case 8:\r
+ compute_pcm_samples8(buffer);\r
+ break;\r
+ case 9:\r
+ compute_pcm_samples9(buffer);\r
+ break;\r
+ case 10:\r
+ compute_pcm_samples10(buffer);\r
+ break;\r
+ case 11:\r
+ compute_pcm_samples11(buffer);\r
+ break;\r
+ case 12:\r
+ compute_pcm_samples12(buffer);\r
+ break;\r
+ case 13:\r
+ compute_pcm_samples13(buffer);\r
+ break;\r
+ case 14:\r
+ compute_pcm_samples14(buffer);\r
+ break;\r
+ case 15:\r
+ compute_pcm_samples15(buffer);\r
+ break;\r
+ }\r
+\r
+ if (buffer != null) {\r
+ buffer.appendSamples(channel, _tmpOut);\r
+ }\r
+\r
+ /*\r
+ * // MDM: I was considering putting in quality control for // low-spec\r
+ * CPUs, but the performance gain (about 10-15%) // did not justify the\r
+ * considerable drop in audio quality. switch (inc) { case 16:\r
+ * buffer.appendSamples(channel, tmpOut); break; case 32: for (int i=0;\r
+ * i<16; i++) { buffer.append(channel, (short)tmpOut[i]);\r
+ * buffer.append(channel, (short)tmpOut[i]); } break; case 64: for (int i=0;\r
+ * i<8; i++) { buffer.append(channel, (short)tmpOut[i]);\r
+ * buffer.append(channel, (short)tmpOut[i]); buffer.append(channel,\r
+ * (short)tmpOut[i]); buffer.append(channel, (short)tmpOut[i]); } break;\r
+ * \r
+ * }\r
+ */\r
}\r
\r
/**\r
* Calculate 32 PCM samples and put the into the Obuffer-object.\r
*/\r
- \r
+\r
@LATTICE("THIS<IN,THIS<SH,SH*,THISLOC=THIS")\r
public void calculate_pcm_samples(@LOC("IN") Obuffer buffer) {\r
compute_new_v();\r
for (@LOC("SH") int p = 0; p < 32; p++)\r
samples[p] = 0.0f;\r
}\r
- \r
- \r
- @LOC("EQ") private static final double MY_PI = 3.14159265358979323846;\r
- @LOC("SA") private static final float cos1_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI / 64.0)));\r
- @LOC("SA") private static final float cos3_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 64.0)));\r
- @LOC("SA") private static final float cos5_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0 / 64.0)));\r
- @LOC("SA") private static final float cos7_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0 / 64.0)));\r
- @LOC("SA") private static final float cos9_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0 / 64.0)));\r
- @LOC("SA") private static final float cos11_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 64.0)));\r
- @LOC("SA") private static final float cos13_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 64.0)));\r
- @LOC("SA") private static final float cos15_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 64.0)));\r
- @LOC("SA") private static final float cos17_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 17.0 / 64.0)));\r
- @LOC("SA") private static final float cos19_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 19.0 / 64.0)));\r
- @LOC("SA") private static final float cos21_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 21.0 / 64.0)));\r
- @LOC("SA") private static final float cos23_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 23.0 / 64.0)));\r
- @LOC("SA") private static final float cos25_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 25.0 / 64.0)));\r
- @LOC("SA") private static final float cos27_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 27.0 / 64.0)));\r
- @LOC("SA") private static final float cos29_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 29.0 / 64.0)));\r
- @LOC("SA") private static final float cos31_64 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 31.0 / 64.0)));\r
- @LOC("SA") private static final float cos1_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI / 32.0)));\r
- @LOC("SA") private static final float cos3_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 32.0)));\r
- @LOC("SA") private static final float cos5_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0 / 32.0)));\r
- @LOC("SA") private static final float cos7_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0 / 32.0)));\r
- @LOC("SA") private static final float cos9_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0 / 32.0)));\r
- @LOC("SA") private static final float cos11_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 32.0)));\r
- @LOC("SA") private static final float cos13_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 32.0)));\r
- @LOC("SA") private static final float cos15_32 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 32.0)));\r
- @LOC("SA") private static final float cos1_16 =(float) (1.0 / (2.0 * Math.cos(MY_PI / 16.0)));\r
- @LOC("SA") private static final float cos3_16 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 16.0)));\r
- @LOC("SA") private static final float cos5_16 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0 / 16.0)));\r
- @LOC("SA") private static final float cos7_16 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0 / 16.0)));\r
- @LOC("SA") private static final float cos1_8 =(float) (1.0 / (2.0 * Math.cos(MY_PI / 8.0)));\r
- @LOC("SA") private static final float cos3_8 =(float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 8.0)));\r
- @LOC("SA") private static final float cos1_4 =(float) (1.0 / (2.0 * Math.cos(MY_PI / 4.0)));\r
- \r
+\r
+ @LOC("EQ")\r
+ private static final double MY_PI = 3.14159265358979323846;\r
+ @LOC("SA")\r
+ private static final float cos1_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos3_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos5_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos7_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos9_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos11_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos13_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos15_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos17_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 17.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos19_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 19.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos21_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 21.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos23_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 23.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos25_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 25.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos27_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 27.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos29_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 29.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos31_64 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 31.0 / 64.0)));\r
+ @LOC("SA")\r
+ private static final float cos1_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos3_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos5_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos7_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos9_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 9.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos11_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 11.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos13_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 13.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos15_32 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 15.0 / 32.0)));\r
+ @LOC("SA")\r
+ private static final float cos1_16 = (float) (1.0 / (2.0 * Math.cos(MY_PI / 16.0)));\r
+ @LOC("SA")\r
+ private static final float cos3_16 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 16.0)));\r
+ @LOC("SA")\r
+ private static final float cos5_16 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 5.0 / 16.0)));\r
+ @LOC("SA")\r
+ private static final float cos7_16 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 7.0 / 16.0)));\r
+ @LOC("SA")\r
+ private static final float cos1_8 = (float) (1.0 / (2.0 * Math.cos(MY_PI / 8.0)));\r
+ @LOC("SA")\r
+ private static final float cos3_8 = (float) (1.0 / (2.0 * Math.cos(MY_PI * 3.0 / 8.0)));\r
+ @LOC("SA")\r
+ private static final float cos1_4 = (float) (1.0 / (2.0 * Math.cos(MY_PI / 4.0)));\r
+\r
// Note: These values are not in the same order\r
- // as in Annex 3-B.3 of the ISO/IEC DIS 11172-3 \r
+ // as in Annex 3-B.3 of the ISO/IEC DIS 11172-3\r
// private float d[] = {0.000000000, -4.000442505};\r
- \r
-// @LOC("V2") private static float d[] = null;\r
- \r
- /** \r
- * d[] split into subarrays of length 16. This provides for\r
- * more faster access by allowing a block of 16 to be addressed\r
- * with constant offset. \r
+\r
+ // @LOC("V2") private static float d[] = null;\r
+\r
+ /**\r
+ * d[] split into subarrays of length 16. This provides for more faster access\r
+ * by allowing a block of 16 to be addressed with constant offset.\r
**/\r
- @LOC("V2") private static float d16[][] = null; \r
- \r
- /**\r
- * Converts a 1D array into a number of smaller arrays. This is used\r
- * to achieve offset + constant indexing into an array. Each sub-array\r
- * represents a block of values of the original array. \r
- * @param array The array to split up into blocks.\r
- * @param blockSize The size of the blocks to split the array\r
- * into. This must be an exact divisor of\r
- * the length of the array, or some data\r
- * will be lost from the main array.\r
- * \r
- * @return An array of arrays in which each element in the returned\r
- * array will be of length <code>blockSize</code>.\r
- */\r
- static private float[][] splitArray(final float[] array, final int blockSize)\r
- {\r
- int size = array.length / blockSize;\r
- float[][] split = new float[size][];\r
- for (int i=0; i<size; i++)\r
- {\r
- split[i] = subArray(array, i*blockSize, blockSize);\r
- }\r
- return split;\r
- }\r
- \r
- /**\r
- * Returns a subarray of an existing array.\r
- * \r
- * @param array The array to retrieve a subarra from.\r
- * @param offs The offset in the array that corresponds to\r
- * the first index of the subarray.\r
- * @param len The number of indeces in the subarray.\r
- * @return The subarray, which may be of length 0.\r
- */\r
- static private float[] subArray(final float[] array, final int offs, int len)\r
- {\r
- if (offs+len > array.length)\r
- {\r
- len = array.length-offs;\r
- }\r
- \r
- if (len < 0)\r
- len = 0;\r
- \r
- float[] subarray = new float[len];\r
- for (int i=0; i<len; i++)\r
- {\r
- subarray[i] = array[offs+i];\r
- }\r
- \r
- return subarray;\r
- }\r
- \r
- // The original data for d[]. This data is loaded from a file\r
- // to reduce the overall package size and to improve performance. \r
-\r
- static final float d[] = {\r
- 0.000000000f, -0.000442505f, 0.003250122f, -0.007003784f,\r
- 0.031082153f, -0.078628540f, 0.100311279f, -0.572036743f,\r
- 1.144989014f, 0.572036743f, 0.100311279f, 0.078628540f,\r
- 0.031082153f, 0.007003784f, 0.003250122f, 0.000442505f,\r
- -0.000015259f, -0.000473022f, 0.003326416f, -0.007919312f,\r
- 0.030517578f, -0.084182739f, 0.090927124f, -0.600219727f,\r
- 1.144287109f, 0.543823242f, 0.108856201f, 0.073059082f,\r
- 0.031478882f, 0.006118774f, 0.003173828f, 0.000396729f,\r
- -0.000015259f, -0.000534058f, 0.003387451f, -0.008865356f,\r
- 0.029785156f, -0.089706421f, 0.080688477f, -0.628295898f,\r
- 1.142211914f, 0.515609741f, 0.116577148f, 0.067520142f,\r
- 0.031738281f, 0.005294800f, 0.003082275f, 0.000366211f,\r
- -0.000015259f, -0.000579834f, 0.003433228f, -0.009841919f,\r
- 0.028884888f, -0.095169067f, 0.069595337f, -0.656219482f,\r
- 1.138763428f, 0.487472534f, 0.123474121f, 0.061996460f,\r
- 0.031845093f, 0.004486084f, 0.002990723f, 0.000320435f,\r
- -0.000015259f, -0.000625610f, 0.003463745f, -0.010848999f,\r
- 0.027801514f, -0.100540161f, 0.057617188f, -0.683914185f,\r
- 1.133926392f, 0.459472656f, 0.129577637f, 0.056533813f,\r
- 0.031814575f, 0.003723145f, 0.002899170f, 0.000289917f,\r
- -0.000015259f, -0.000686646f, 0.003479004f, -0.011886597f,\r
- 0.026535034f, -0.105819702f, 0.044784546f, -0.711318970f,\r
- 1.127746582f, 0.431655884f, 0.134887695f, 0.051132202f,\r
- 0.031661987f, 0.003005981f, 0.002792358f, 0.000259399f,\r
- -0.000015259f, -0.000747681f, 0.003479004f, -0.012939453f,\r
- 0.025085449f, -0.110946655f, 0.031082153f, -0.738372803f,\r
- 1.120223999f, 0.404083252f, 0.139450073f, 0.045837402f,\r
- 0.031387329f, 0.002334595f, 0.002685547f, 0.000244141f,\r
- -0.000030518f, -0.000808716f, 0.003463745f, -0.014022827f,\r
- 0.023422241f, -0.115921021f, 0.016510010f, -0.765029907f,\r
- 1.111373901f, 0.376800537f, 0.143264771f, 0.040634155f,\r
- 0.031005859f, 0.001693726f, 0.002578735f, 0.000213623f,\r
- -0.000030518f, -0.000885010f, 0.003417969f, -0.015121460f,\r
- 0.021575928f, -0.120697021f, 0.001068115f, -0.791213989f,\r
- 1.101211548f, 0.349868774f, 0.146362305f, 0.035552979f,\r
- 0.030532837f, 0.001098633f, 0.002456665f, 0.000198364f,\r
- -0.000030518f, -0.000961304f, 0.003372192f, -0.016235352f,\r
- 0.019531250f, -0.125259399f, -0.015228271f, -0.816864014f,\r
- 1.089782715f, 0.323318481f, 0.148773193f, 0.030609131f,\r
- 0.029937744f, 0.000549316f, 0.002349854f, 0.000167847f,\r
- -0.000030518f, -0.001037598f, 0.003280640f, -0.017349243f,\r
- 0.017257690f, -0.129562378f, -0.032379150f, -0.841949463f,\r
- 1.077117920f, 0.297210693f, 0.150497437f, 0.025817871f,\r
- 0.029281616f, 0.000030518f, 0.002243042f, 0.000152588f,\r
- -0.000045776f, -0.001113892f, 0.003173828f, -0.018463135f,\r
- 0.014801025f, -0.133590698f, -0.050354004f, -0.866363525f,\r
- 1.063217163f, 0.271591187f, 0.151596069f, 0.021179199f,\r
- 0.028533936f, -0.000442505f, 0.002120972f, 0.000137329f,\r
- -0.000045776f, -0.001205444f, 0.003051758f, -0.019577026f,\r
- 0.012115479f, -0.137298584f, -0.069168091f, -0.890090942f,\r
- 1.048156738f, 0.246505737f, 0.152069092f, 0.016708374f,\r
- 0.027725220f, -0.000869751f, 0.002014160f, 0.000122070f,\r
- -0.000061035f, -0.001296997f, 0.002883911f, -0.020690918f,\r
- 0.009231567f, -0.140670776f, -0.088775635f, -0.913055420f,\r
- 1.031936646f, 0.221984863f, 0.151962280f, 0.012420654f,\r
- 0.026840210f, -0.001266479f, 0.001907349f, 0.000106812f,\r
- -0.000061035f, -0.001388550f, 0.002700806f, -0.021789551f,\r
- 0.006134033f, -0.143676758f, -0.109161377f, -0.935195923f,\r
- 1.014617920f, 0.198059082f, 0.151306152f, 0.008316040f,\r
- 0.025909424f, -0.001617432f, 0.001785278f, 0.000106812f,\r
- -0.000076294f, -0.001480103f, 0.002487183f, -0.022857666f,\r
- 0.002822876f, -0.146255493f, -0.130310059f, -0.956481934f,\r
- 0.996246338f, 0.174789429f, 0.150115967f, 0.004394531f,\r
- 0.024932861f, -0.001937866f, 0.001693726f, 0.000091553f,\r
- -0.000076294f, -0.001586914f, 0.002227783f, -0.023910522f,\r
- -0.000686646f, -0.148422241f, -0.152206421f, -0.976852417f,\r
- 0.976852417f, 0.152206421f, 0.148422241f, 0.000686646f,\r
- 0.023910522f, -0.002227783f, 0.001586914f, 0.000076294f,\r
- -0.000091553f, -0.001693726f, 0.001937866f, -0.024932861f,\r
- -0.004394531f, -0.150115967f, -0.174789429f, -0.996246338f,\r
- 0.956481934f, 0.130310059f, 0.146255493f, -0.002822876f,\r
- 0.022857666f, -0.002487183f, 0.001480103f, 0.000076294f,\r
- -0.000106812f, -0.001785278f, 0.001617432f, -0.025909424f,\r
- -0.008316040f, -0.151306152f, -0.198059082f, -1.014617920f,\r
- 0.935195923f, 0.109161377f, 0.143676758f, -0.006134033f,\r
- 0.021789551f, -0.002700806f, 0.001388550f, 0.000061035f,\r
- -0.000106812f, -0.001907349f, 0.001266479f, -0.026840210f,\r
- -0.012420654f, -0.151962280f, -0.221984863f, -1.031936646f,\r
- 0.913055420f, 0.088775635f, 0.140670776f, -0.009231567f,\r
- 0.020690918f, -0.002883911f, 0.001296997f, 0.000061035f,\r
- -0.000122070f, -0.002014160f, 0.000869751f, -0.027725220f,\r
- -0.016708374f, -0.152069092f, -0.246505737f, -1.048156738f,\r
- 0.890090942f, 0.069168091f, 0.137298584f, -0.012115479f,\r
- 0.019577026f, -0.003051758f, 0.001205444f, 0.000045776f,\r
- -0.000137329f, -0.002120972f, 0.000442505f, -0.028533936f,\r
- -0.021179199f, -0.151596069f, -0.271591187f, -1.063217163f,\r
- 0.866363525f, 0.050354004f, 0.133590698f, -0.014801025f,\r
- 0.018463135f, -0.003173828f, 0.001113892f, 0.000045776f,\r
- -0.000152588f, -0.002243042f, -0.000030518f, -0.029281616f,\r
- -0.025817871f, -0.150497437f, -0.297210693f, -1.077117920f,\r
- 0.841949463f, 0.032379150f, 0.129562378f, -0.017257690f,\r
- 0.017349243f, -0.003280640f, 0.001037598f, 0.000030518f,\r
- -0.000167847f, -0.002349854f, -0.000549316f, -0.029937744f,\r
- -0.030609131f, -0.148773193f, -0.323318481f, -1.089782715f,\r
- 0.816864014f, 0.015228271f, 0.125259399f, -0.019531250f,\r
- 0.016235352f, -0.003372192f, 0.000961304f, 0.000030518f,\r
- -0.000198364f, -0.002456665f, -0.001098633f, -0.030532837f,\r
- -0.035552979f, -0.146362305f, -0.349868774f, -1.101211548f,\r
- 0.791213989f, -0.001068115f, 0.120697021f, -0.021575928f,\r
- 0.015121460f, -0.003417969f, 0.000885010f, 0.000030518f,\r
- -0.000213623f, -0.002578735f, -0.001693726f, -0.031005859f,\r
- -0.040634155f, -0.143264771f, -0.376800537f, -1.111373901f,\r
- 0.765029907f, -0.016510010f, 0.115921021f, -0.023422241f,\r
- 0.014022827f, -0.003463745f, 0.000808716f, 0.000030518f,\r
- -0.000244141f, -0.002685547f, -0.002334595f, -0.031387329f,\r
- -0.045837402f, -0.139450073f, -0.404083252f, -1.120223999f,\r
- 0.738372803f, -0.031082153f, 0.110946655f, -0.025085449f,\r
- 0.012939453f, -0.003479004f, 0.000747681f, 0.000015259f,\r
- -0.000259399f, -0.002792358f, -0.003005981f, -0.031661987f,\r
- -0.051132202f, -0.134887695f, -0.431655884f, -1.127746582f,\r
- 0.711318970f, -0.044784546f, 0.105819702f, -0.026535034f,\r
- 0.011886597f, -0.003479004f, 0.000686646f, 0.000015259f,\r
- -0.000289917f, -0.002899170f, -0.003723145f, -0.031814575f,\r
- -0.056533813f, -0.129577637f, -0.459472656f, -1.133926392f,\r
- 0.683914185f, -0.057617188f, 0.100540161f, -0.027801514f,\r
- 0.010848999f, -0.003463745f, 0.000625610f, 0.000015259f,\r
- -0.000320435f, -0.002990723f, -0.004486084f, -0.031845093f,\r
- -0.061996460f, -0.123474121f, -0.487472534f, -1.138763428f,\r
- 0.656219482f, -0.069595337f, 0.095169067f, -0.028884888f,\r
- 0.009841919f, -0.003433228f, 0.000579834f, 0.000015259f,\r
- -0.000366211f, -0.003082275f, -0.005294800f, -0.031738281f,\r
- -0.067520142f, -0.116577148f, -0.515609741f, -1.142211914f,\r
- 0.628295898f, -0.080688477f, 0.089706421f, -0.029785156f,\r
- 0.008865356f, -0.003387451f, 0.000534058f, 0.000015259f,\r
- -0.000396729f, -0.003173828f, -0.006118774f, -0.031478882f,\r
- -0.073059082f, -0.108856201f, -0.543823242f, -1.144287109f,\r
- 0.600219727f, -0.090927124f, 0.084182739f, -0.030517578f,\r
- 0.007919312f, -0.003326416f, 0.000473022f, 0.000015259f\r
- };\r
- \r
- \r
+ @LOC("V2")\r
+ private static float d16[][] = null;\r
+\r
+ /**\r
+ * Converts a 1D array into a number of smaller arrays. This is used to\r
+ * achieve offset + constant indexing into an array. Each sub-array represents\r
+ * a block of values of the original array.\r
+ * \r
+ * @param array\r
+ * The array to split up into blocks.\r
+ * @param blockSize\r
+ * The size of the blocks to split the array into. This must be an\r
+ * exact divisor of the length of the array, or some data will be\r
+ * lost from the main array.\r
+ * \r
+ * @return An array of arrays in which each element in the returned array will\r
+ * be of length <code>blockSize</code>.\r
+ */\r
+ static private float[][] splitArray(final float[] array, final int blockSize) {\r
+ int size = array.length / blockSize;\r
+ float[][] split = new float[size][];\r
+ for (int i = 0; i < size; i++) {\r
+ split[i] = subArray(array, i * blockSize, blockSize);\r
+ }\r
+ return split;\r
+ }\r
+\r
+ /**\r
+ * Returns a subarray of an existing array.\r
+ * \r
+ * @param array\r
+ * The array to retrieve a subarra from.\r
+ * @param offs\r
+ * The offset in the array that corresponds to the first index of the\r
+ * subarray.\r
+ * @param len\r
+ * The number of indeces in the subarray.\r
+ * @return The subarray, which may be of length 0.\r
+ */\r
+ static private float[] subArray(final float[] array, final int offs, int len) {\r
+ if (offs + len > array.length) {\r
+ len = array.length - offs;\r
+ }\r
+\r
+ if (len < 0)\r
+ len = 0;\r
+\r
+ float[] subarray = new float[len];\r
+ for (int i = 0; i < len; i++) {\r
+ subarray[i] = array[offs + i];\r
+ }\r
+\r
+ return subarray;\r
+ }\r
+\r
+ // The original data for d[]. This data is loaded from a file\r
+ // to reduce the overall package size and to improve performance.\r
+\r
+ static final float d[] = { 0.000000000f, -0.000442505f, 0.003250122f, -0.007003784f,\r
+ 0.031082153f, -0.078628540f, 0.100311279f, -0.572036743f, 1.144989014f, 0.572036743f,\r
+ 0.100311279f, 0.078628540f, 0.031082153f, 0.007003784f, 0.003250122f, 0.000442505f,\r
+ -0.000015259f, -0.000473022f, 0.003326416f, -0.007919312f, 0.030517578f, -0.084182739f,\r
+ 0.090927124f, -0.600219727f, 1.144287109f, 0.543823242f, 0.108856201f, 0.073059082f,\r
+ 0.031478882f, 0.006118774f, 0.003173828f, 0.000396729f, -0.000015259f, -0.000534058f,\r
+ 0.003387451f, -0.008865356f, 0.029785156f, -0.089706421f, 0.080688477f, -0.628295898f,\r
+ 1.142211914f, 0.515609741f, 0.116577148f, 0.067520142f, 0.031738281f, 0.005294800f,\r
+ 0.003082275f, 0.000366211f, -0.000015259f, -0.000579834f, 0.003433228f, -0.009841919f,\r
+ 0.028884888f, -0.095169067f, 0.069595337f, -0.656219482f, 1.138763428f, 0.487472534f,\r
+ 0.123474121f, 0.061996460f, 0.031845093f, 0.004486084f, 0.002990723f, 0.000320435f,\r
+ -0.000015259f, -0.000625610f, 0.003463745f, -0.010848999f, 0.027801514f, -0.100540161f,\r
+ 0.057617188f, -0.683914185f, 1.133926392f, 0.459472656f, 0.129577637f, 0.056533813f,\r
+ 0.031814575f, 0.003723145f, 0.002899170f, 0.000289917f, -0.000015259f, -0.000686646f,\r
+ 0.003479004f, -0.011886597f, 0.026535034f, -0.105819702f, 0.044784546f, -0.711318970f,\r
+ 1.127746582f, 0.431655884f, 0.134887695f, 0.051132202f, 0.031661987f, 0.003005981f,\r
+ 0.002792358f, 0.000259399f, -0.000015259f, -0.000747681f, 0.003479004f, -0.012939453f,\r
+ 0.025085449f, -0.110946655f, 0.031082153f, -0.738372803f, 1.120223999f, 0.404083252f,\r
+ 0.139450073f, 0.045837402f, 0.031387329f, 0.002334595f, 0.002685547f, 0.000244141f,\r
+ -0.000030518f, -0.000808716f, 0.003463745f, -0.014022827f, 0.023422241f, -0.115921021f,\r
+ 0.016510010f, -0.765029907f, 1.111373901f, 0.376800537f, 0.143264771f, 0.040634155f,\r
+ 0.031005859f, 0.001693726f, 0.002578735f, 0.000213623f, -0.000030518f, -0.000885010f,\r
+ 0.003417969f, -0.015121460f, 0.021575928f, -0.120697021f, 0.001068115f, -0.791213989f,\r
+ 1.101211548f, 0.349868774f, 0.146362305f, 0.035552979f, 0.030532837f, 0.001098633f,\r
+ 0.002456665f, 0.000198364f, -0.000030518f, -0.000961304f, 0.003372192f, -0.016235352f,\r
+ 0.019531250f, -0.125259399f, -0.015228271f, -0.816864014f, 1.089782715f, 0.323318481f,\r
+ 0.148773193f, 0.030609131f, 0.029937744f, 0.000549316f, 0.002349854f, 0.000167847f,\r
+ -0.000030518f, -0.001037598f, 0.003280640f, -0.017349243f, 0.017257690f, -0.129562378f,\r
+ -0.032379150f, -0.841949463f, 1.077117920f, 0.297210693f, 0.150497437f, 0.025817871f,\r
+ 0.029281616f, 0.000030518f, 0.002243042f, 0.000152588f, -0.000045776f, -0.001113892f,\r
+ 0.003173828f, -0.018463135f, 0.014801025f, -0.133590698f, -0.050354004f, -0.866363525f,\r
+ 1.063217163f, 0.271591187f, 0.151596069f, 0.021179199f, 0.028533936f, -0.000442505f,\r
+ 0.002120972f, 0.000137329f, -0.000045776f, -0.001205444f, 0.003051758f, -0.019577026f,\r
+ 0.012115479f, -0.137298584f, -0.069168091f, -0.890090942f, 1.048156738f, 0.246505737f,\r
+ 0.152069092f, 0.016708374f, 0.027725220f, -0.000869751f, 0.002014160f, 0.000122070f,\r
+ -0.000061035f, -0.001296997f, 0.002883911f, -0.020690918f, 0.009231567f, -0.140670776f,\r
+ -0.088775635f, -0.913055420f, 1.031936646f, 0.221984863f, 0.151962280f, 0.012420654f,\r
+ 0.026840210f, -0.001266479f, 0.001907349f, 0.000106812f, -0.000061035f, -0.001388550f,\r
+ 0.002700806f, -0.021789551f, 0.006134033f, -0.143676758f, -0.109161377f, -0.935195923f,\r
+ 1.014617920f, 0.198059082f, 0.151306152f, 0.008316040f, 0.025909424f, -0.001617432f,\r
+ 0.001785278f, 0.000106812f, -0.000076294f, -0.001480103f, 0.002487183f, -0.022857666f,\r
+ 0.002822876f, -0.146255493f, -0.130310059f, -0.956481934f, 0.996246338f, 0.174789429f,\r
+ 0.150115967f, 0.004394531f, 0.024932861f, -0.001937866f, 0.001693726f, 0.000091553f,\r
+ -0.000076294f, -0.001586914f, 0.002227783f, -0.023910522f, -0.000686646f, -0.148422241f,\r
+ -0.152206421f, -0.976852417f, 0.976852417f, 0.152206421f, 0.148422241f, 0.000686646f,\r
+ 0.023910522f, -0.002227783f, 0.001586914f, 0.000076294f, -0.000091553f, -0.001693726f,\r
+ 0.001937866f, -0.024932861f, -0.004394531f, -0.150115967f, -0.174789429f, -0.996246338f,\r
+ 0.956481934f, 0.130310059f, 0.146255493f, -0.002822876f, 0.022857666f, -0.002487183f,\r
+ 0.001480103f, 0.000076294f, -0.000106812f, -0.001785278f, 0.001617432f, -0.025909424f,\r
+ -0.008316040f, -0.151306152f, -0.198059082f, -1.014617920f, 0.935195923f, 0.109161377f,\r
+ 0.143676758f, -0.006134033f, 0.021789551f, -0.002700806f, 0.001388550f, 0.000061035f,\r
+ -0.000106812f, -0.001907349f, 0.001266479f, -0.026840210f, -0.012420654f, -0.151962280f,\r
+ -0.221984863f, -1.031936646f, 0.913055420f, 0.088775635f, 0.140670776f, -0.009231567f,\r
+ 0.020690918f, -0.002883911f, 0.001296997f, 0.000061035f, -0.000122070f, -0.002014160f,\r
+ 0.000869751f, -0.027725220f, -0.016708374f, -0.152069092f, -0.246505737f, -1.048156738f,\r
+ 0.890090942f, 0.069168091f, 0.137298584f, -0.012115479f, 0.019577026f, -0.003051758f,\r
+ 0.001205444f, 0.000045776f, -0.000137329f, -0.002120972f, 0.000442505f, -0.028533936f,\r
+ -0.021179199f, -0.151596069f, -0.271591187f, -1.063217163f, 0.866363525f, 0.050354004f,\r
+ 0.133590698f, -0.014801025f, 0.018463135f, -0.003173828f, 0.001113892f, 0.000045776f,\r
+ -0.000152588f, -0.002243042f, -0.000030518f, -0.029281616f, -0.025817871f, -0.150497437f,\r
+ -0.297210693f, -1.077117920f, 0.841949463f, 0.032379150f, 0.129562378f, -0.017257690f,\r
+ 0.017349243f, -0.003280640f, 0.001037598f, 0.000030518f, -0.000167847f, -0.002349854f,\r
+ -0.000549316f, -0.029937744f, -0.030609131f, -0.148773193f, -0.323318481f, -1.089782715f,\r
+ 0.816864014f, 0.015228271f, 0.125259399f, -0.019531250f, 0.016235352f, -0.003372192f,\r
+ 0.000961304f, 0.000030518f, -0.000198364f, -0.002456665f, -0.001098633f, -0.030532837f,\r
+ -0.035552979f, -0.146362305f, -0.349868774f, -1.101211548f, 0.791213989f, -0.001068115f,\r
+ 0.120697021f, -0.021575928f, 0.015121460f, -0.003417969f, 0.000885010f, 0.000030518f,\r
+ -0.000213623f, -0.002578735f, -0.001693726f, -0.031005859f, -0.040634155f, -0.143264771f,\r
+ -0.376800537f, -1.111373901f, 0.765029907f, -0.016510010f, 0.115921021f, -0.023422241f,\r
+ 0.014022827f, -0.003463745f, 0.000808716f, 0.000030518f, -0.000244141f, -0.002685547f,\r
+ -0.002334595f, -0.031387329f, -0.045837402f, -0.139450073f, -0.404083252f, -1.120223999f,\r
+ 0.738372803f, -0.031082153f, 0.110946655f, -0.025085449f, 0.012939453f, -0.003479004f,\r
+ 0.000747681f, 0.000015259f, -0.000259399f, -0.002792358f, -0.003005981f, -0.031661987f,\r
+ -0.051132202f, -0.134887695f, -0.431655884f, -1.127746582f, 0.711318970f, -0.044784546f,\r
+ 0.105819702f, -0.026535034f, 0.011886597f, -0.003479004f, 0.000686646f, 0.000015259f,\r
+ -0.000289917f, -0.002899170f, -0.003723145f, -0.031814575f, -0.056533813f, -0.129577637f,\r
+ -0.459472656f, -1.133926392f, 0.683914185f, -0.057617188f, 0.100540161f, -0.027801514f,\r
+ 0.010848999f, -0.003463745f, 0.000625610f, 0.000015259f, -0.000320435f, -0.002990723f,\r
+ -0.004486084f, -0.031845093f, -0.061996460f, -0.123474121f, -0.487472534f, -1.138763428f,\r
+ 0.656219482f, -0.069595337f, 0.095169067f, -0.028884888f, 0.009841919f, -0.003433228f,\r
+ 0.000579834f, 0.000015259f, -0.000366211f, -0.003082275f, -0.005294800f, -0.031738281f,\r
+ -0.067520142f, -0.116577148f, -0.515609741f, -1.142211914f, 0.628295898f, -0.080688477f,\r
+ 0.089706421f, -0.029785156f, 0.008865356f, -0.003387451f, 0.000534058f, 0.000015259f,\r
+ -0.000396729f, -0.003173828f, -0.006118774f, -0.031478882f, -0.073059082f, -0.108856201f,\r
+ -0.543823242f, -1.144287109f, 0.600219727f, -0.090927124f, 0.084182739f, -0.030517578f,\r
+ 0.007919312f, -0.003326416f, 0.000473022f, 0.000015259f };\r
+\r
}\r