z3 = z3 + z5; z4 = z4 + z5;
z3 += z5; z4 += z5;
void forwardDCT(int[] dataUnit) {	for (int row = 0; row < 8; row++) {		int rIndex = row * DCTSIZE;		int tmp0 = dataUnit[rIndex] + dataUnit[rIndex + 7];		int tmp7 = dataUnit[rIndex] - dataUnit[rIndex + 7];		int tmp1 = dataUnit[rIndex + 1] + dataUnit[rIndex + 6];		int tmp6 = dataUnit[rIndex + 1] - dataUnit[rIndex + 6];		int tmp2 = dataUnit[rIndex + 2] + dataUnit[rIndex + 5];		int tmp5 = dataUnit[rIndex + 2] - dataUnit[rIndex + 5];		int tmp3 = dataUnit[rIndex + 3] + dataUnit[rIndex + 4];		int tmp4 = dataUnit[rIndex + 3] - dataUnit[rIndex + 4];		/**		 * Even part per LL&M figure 1 --- note that published figure 		 * is faulty; rotator 'sqrt(2)*c1' should be 'sqrt(2)*c6'.		 */		int tmp10 = tmp0 + tmp3;		int tmp13 = tmp0 - tmp3;		int tmp11 = tmp1 + tmp2;		int tmp12 = tmp1 - tmp2;		dataUnit[rIndex] = (tmp10 + tmp11) * 4;		dataUnit[rIndex + 4]  = (tmp10 - tmp11) * 4;		int z1 = (tmp12 + tmp13) * FIX_0_541196100;		int scaleFactor1 = ExtendTest[11];		int scaleFactor2 = ExtendTest[12];		int n = z1 + (tmp13 * FIX_0_765366865) + scaleFactor1;		dataUnit[rIndex + 2] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[rIndex + 2]--;		n = z1 + (tmp12 * (0 - FIX_1_847759065)) + scaleFactor1; 		dataUnit[rIndex + 6] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[rIndex + 6]--;		/**		 * Odd part per figure 8 --- note paper omits factor of sqrt(2).		 * cK represents cos(K*pi/16).		 * i0..i3 in the paper are tmp4..tmp7 here.		 */		z1 = tmp4 + tmp7;		int z2 = tmp5 + tmp6;		int z3 = tmp4 + tmp6;		int z4 = tmp5 + tmp7;		int z5 = (z3 + z4) * FIX_1_175875602;	// sqrt(2) * c3		tmp4 = tmp4 * FIX_0_298631336;	// sqrt(2) * (-c1+c3+c5-c7)		tmp5 = tmp5 * FIX_2_053119869;	// sqrt(2) * ( c1+c3-c5+c7)		tmp6 = tmp6 * FIX_3_072711026;	// sqrt(2) * ( c1+c3+c5-c7)		tmp7 = tmp7 * FIX_1_501321110;	// sqrt(2) * ( c1+c3-c5-c7)		z1 = z1 * (0 - FIX_0_899976223);	// sqrt(2) * (c7-c3)		z2 = z2 * (0 - FIX_2_562915447);	// sqrt(2) * (-c1-c3)		z3 = z3 * (0 - FIX_1_961570560);	// sqrt(2) * (-c3-c5)		z4 = z4 * (0 - FIX_0_390180644);	// sqrt(2) * (c5-c3)		z3 = z3 + z5;		z4 = z4 + z5;		n = tmp4 + z1 + z3 + scaleFactor1;		dataUnit[rIndex + 7] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[rIndex + 7]--;		n = tmp5 + z2 + z4 + scaleFactor1;		dataUnit[rIndex + 5] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[rIndex + 5]--;		n = tmp6 + z2 + z3 + scaleFactor1;		dataUnit[rIndex + 3] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[rIndex + 3]--;		n = tmp7 + z1 + z4 + scaleFactor1;		dataUnit[rIndex + 1] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[rIndex + 1]--;	}	/**	 * Pass 2: process columns.	 * Note that we must descale the results by a factor of 8 == 2**3,	 * and also undo the PASS1_BITS scaling.	 */	for (int col = 0; col < 8; col++) {		int c0 = col;		int c1 = col + 8;		int c2 = col + 16;		int c3 = col + 24;		int c4 = col + 32;		int c5 = col + 40;		int c6 = col + 48;		int c7 = col + 56;		int tmp0 = dataUnit[c0] + dataUnit[c7];		int tmp7 = dataUnit[c0] - dataUnit[c7];		int tmp1 = dataUnit[c1] + dataUnit[c6];		int tmp6 = dataUnit[c1] - dataUnit[c6];		int tmp2 = dataUnit[c2] + dataUnit[c5];		int tmp5 = dataUnit[c2] - dataUnit[c5];		int tmp3 = dataUnit[c3] + dataUnit[c4];		int tmp4 = dataUnit[c3] - dataUnit[c4];		/**		 * Even part per LL&M figure 1 --- note that published figure 		 * is faulty; rotator 'sqrt(2)*c1' should be 'sqrt(2)*c6'.		 */		int tmp10 = tmp0 + tmp3;		int tmp13 = tmp0 - tmp3;		int tmp11 = tmp1 + tmp2;		int tmp12 = tmp1 - tmp2;		int scaleFactor1 = ExtendTest[5];		int scaleFactor2 = ExtendTest[6];		int n = tmp10 + tmp11 + scaleFactor1;		dataUnit[c0] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c0]--;		n = tmp10 - tmp11 + scaleFactor1;		dataUnit[c4] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c4]--;		int z1 = (tmp12 + tmp13) * FIX_0_541196100;		scaleFactor1 = ExtendTest[18];		scaleFactor2 = ExtendTest[19];		n = z1 + (tmp13 * FIX_0_765366865) + scaleFactor1;		dataUnit[c2] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c2]--;		n = z1 + (tmp12 * (0 - FIX_1_847759065)) + scaleFactor1;		dataUnit[c6] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c6]--;		/**		 * Odd part per figure 8 --- note paper omits factor of sqrt(2).		 * cK represents cos(K*pi/16).		 * i0..i3 in the paper are tmp4..tmp7 here.		 */		z1 = tmp4 + tmp7;		int z2 = tmp5 + tmp6;		int z3 = tmp4 + tmp6;		int z4 = tmp5 + tmp7;		int z5 = (z3 + z4) * FIX_1_175875602;	// sqrt(2) * c3		tmp4 = tmp4 * FIX_0_298631336;	// sqrt(2) * (-c1+c3+c5-c7)		tmp5 = tmp5 * FIX_2_053119869;	// sqrt(2) * ( c1+c3-c5+c7)		tmp6 = tmp6 * FIX_3_072711026;	// sqrt(2) * ( c1+c3+c5-c7)		tmp7 = tmp7 * FIX_1_501321110;	// sqrt(2) * ( c1+c3-c5-c7)		z1 = z1 * (0 - FIX_0_899976223);	// sqrt(2) * (c7-c3)		z2 = z2 * (0 - FIX_2_562915447);	// sqrt(2) * (-c1-c3)		z3 = z3 * (0 - FIX_1_961570560);	// sqrt(2) * (-c3-c5)		z4 = z4 * (0 - FIX_0_390180644);	// sqrt(2) * (c5-c3)		z3 = z3 + z5;		z4 = z4 + z5;		n = tmp4 + z1 + z3 + scaleFactor1;		dataUnit[c7] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c7]--;		n = tmp5 + z2 + z4 + scaleFactor1;		dataUnit[c5] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c5]--;		n = tmp6 + z2 + z3 + scaleFactor1;		dataUnit[c3] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c3]--;		n = tmp7 + z1 + z4 + scaleFactor1;		dataUnit[c1] = n / scaleFactor2;		if ((n < 0) && (n % scaleFactor2 != 0)) dataUnit[c1]--;	}}