private void imdct12(float[] xrch, float[] pre, int off) {
		final float[] io = xrch;
		int i,j;
		float in1,in2,in3,in4;
		float out0, out1, out2, out3, out4, out5, tmp;
		float out6=0, out7=0, out8=0, out9=0, out10=0, out11=0;
		float out12=0, out13=0, out14=0, out15=0, out16=0, out17=0;
		float f0 = 0, f1 = 0, f2 = 0, f3 = 0, f4 = 0, f5 = 0;

		for (j = 0; j != 3; j++) {
			i = j + off;
			//>>>>>>>>>>>> 12-point IMDCT
			//>>>>>> 6-point IDCT
			io[15 + i] += (io[12 + i] += io[9 + i]) + io[6 + i];
			io[9 + i] += (io[6 + i] += io[3 + i]) + io[i];
			io[3 + i] += io[i];

			//>>> 3-point IDCT on even
			out1 = (in1 = io[i]) - (in2 = io[12 + i]);
			in3 = in1 + in2 * 0.5f;
			in4 = io[6 + i] * 0.8660254f;
			out0 = in3 + in4;
			out2 = in3 - in4;
			//<<< End 3-point IDCT on even

			//>>> 3-point IDCT on odd (for 6-point IDCT)
			out4 = ((in1 = io[3 + i]) - (in2 = io[15 + i])) * 0.7071068f;
			in3 = in1 + in2 * 0.5f;
			in4 = io[9 + i] * 0.8660254f;
			out5 = (in3 + in4) * 0.5176381f;
			out3 = (in3 - in4) * 1.9318516f;
			//<<< End 3-point IDCT on odd

			// Output: butterflies on 2,3-point IDCT's (for 6-point IDCT)
			tmp = out0; out0 += out5; out5 = tmp - out5;
			tmp = out1; out1 += out4; out4 = tmp - out4;
			tmp = out2; out2 += out3; out3 = tmp - out3;
			//<<<<<< End 6-point IDCT
			//<<<<<<<<<<<< End 12-point IDCT

			tmp = out3 * 0.1072064f;
			switch(j) {
			case 0:
				out6  = tmp;
				out7  = out4 * 0.5f;
				out8  = out5 * 2.3319512f;
				out9  = -out5 * 3.0390580f;
				out10 = -out4 * 1.2071068f;
				out11 = -tmp  * 7.5957541f;

				f0 = out2 * 0.6248445f;
				f1 = out1 * 0.5f;
				f2 = out0 * 0.4000996f;
				f3 = out0 * 0.3070072f;
				f4 = out1 * 0.2071068f;
				f5 = out2 * 0.0822623f;
				break;
			case 1:
				out12 = tmp - f0;
				out13 = out4 * 0.5f - f1;
				out14 = out5 * 2.3319512f - f2;
				out15 = -out5 * 3.0390580f - f3;
				out16 = -out4 * 1.2071068f - f4;
				out17 = -tmp * 7.5957541f - f5;

				f0 = out2 * 0.6248445f;
				f1 = out1 * 0.5f;
				f2 = out0 * 0.4000996f;
				f3 = out0 * 0.3070072f;
				f4 = out1 * 0.2071068f;
				f5 = out2 * 0.0822623f;
				break;
			case 2:
				// output
				i = off;
				io[i + 0] = pre[i + 0];
				io[i + 1] = pre[i + 1];
				io[i + 2] = pre[i + 2];
				io[i + 3] = pre[i + 3];
				io[i + 4] = pre[i + 4];
				io[i + 5] = pre[i + 5];
				io[i + 6] = pre[i + 6] + out6;
				io[i + 7] = pre[i + 7] + out7;
				io[i + 8] = pre[i + 8] + out8;
				io[i + 9] = pre[i + 9] + out9;
				io[i + 10] = pre[i + 10] + out10;
				io[i + 11] = pre[i + 11] + out11;
				io[i + 12] = pre[i + 12] + out12;
				io[i + 13] = pre[i + 13] + out13;
				io[i + 14] = pre[i + 14] + out14;
				io[i + 15] = pre[i + 15] + out15;
				io[i + 16] = pre[i + 16] + out16;
				io[i + 17] = pre[i + 17] + out17;

				pre[i + 0] = tmp - f0;
				pre[i + 1] = out4 * 0.5f - f1;
				pre[i + 2] = out5 * 2.3319512f - f2;
				pre[i + 3] = -out5 * 3.0390580f - f3;
				pre[i + 4] = -out4 * 1.2071068f - f4;
				pre[i + 5] = -tmp * 7.5957541f - f5;
				pre[i + 6] = -out2 * 0.6248445f;
				pre[i + 7] = -out1 * 0.5f;
				pre[i + 8] = -out0 * 0.4000996f;
				pre[i + 9] = -out0 * 0.3070072f;
				pre[i + 10] = -out1 * 0.2071068f;
				pre[i + 11] = -out2 * 0.0822623f;
				pre[i + 12] = pre[i + 13] = pre[i + 14] = 0;
				pre[i + 15] = pre[i + 16] = pre[i + 17] = 0;
			}
		}
	}