z3 = z3 + z5; z4 = z4 + z5;
z3 += z0; z4 += z0;
void inverseDCT(int[] dataUnit) {	for (int row = 0; row < 8; row++) {		int rIndex = row * DCTSIZE;		/**		 * Due to quantization, we will usually find that many of the input		 * coefficients are zero, especially the AC terms.  We can exploit this		 * by short-circuiting the IDCT calculation for any row in which all		 * the AC terms are zero.  In that case each output is equal to the		 * DC coefficient (with scale factor as needed).		 * With typical images and quantization tables, half or more of the		 * row DCT calculations can be simplified this way.		 */		if (isZeroInRow(dataUnit, rIndex)) {			int dcVal = dataUnit[rIndex] * 4;			for (int i = rIndex; i < rIndex + 8; i++) {				dataUnit[i] = dcVal;			}		} else {			/**			 * Even part: reverse the even part of the forward DCT.			 * The rotator is sqrt(2)*c(-6).			 */			int z2 = dataUnit[rIndex + 2];			int z3 = dataUnit[rIndex + 6];			int z1 = (z2 + z3) * FIX_0_541196100;			int tmp2 = z1 + (z3 * (0 - FIX_1_847759065));			int tmp3 = z1 + (z2 * FIX_0_765366865);			int tmp0 = (dataUnit[rIndex] + dataUnit[rIndex + 4]) * 8192;			int tmp1 = (dataUnit[rIndex] - dataUnit[rIndex + 4]) * 8192;			int tmp10 = tmp0 + tmp3;			int tmp13 = tmp0 - tmp3;			int tmp11 = tmp1 + tmp2;			int tmp12 = tmp1 - tmp2;			/**			 * Odd part per figure 8; the matrix is unitary and hence its			 * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.			 */			tmp0 = dataUnit[rIndex + 7];			tmp1 = dataUnit[rIndex + 5];			tmp2 = dataUnit[rIndex + 3];			tmp3 = dataUnit[rIndex + 1];			z1 = tmp0 + tmp3;			z2 = tmp1 + tmp2;			z3 = tmp0 + tmp2;			int z4 = tmp1 + tmp3;			int z5 = (z3 + z4)* FIX_1_175875602; /* sqrt(2) * c3 */			  			tmp0 = tmp0 * FIX_0_298631336;		/* sqrt(2) * (-c1+c3+c5-c7) */			tmp1 = tmp1 * FIX_2_053119869;		/* sqrt(2) * ( c1+c3-c5+c7) */			tmp2 = tmp2 * FIX_3_072711026;		/* sqrt(2) * ( c1+c3+c5-c7) */			tmp3 = tmp3 * 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;			tmp0 = tmp0 + z1 + z3;			tmp1 = tmp1 + z2 + z4;			tmp2 = tmp2 + z2 + z3;			tmp3 = tmp3 + z1 + z4;			int descaleFactor1 = ExtendTest[11];			int descaleFactor2 = ExtendTest[12];			dataUnit[rIndex] = (tmp10 + tmp3 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 7] = (tmp10 - tmp3 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 1] = (tmp11 + tmp2 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 6] = (tmp11 - tmp2 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 2] = (tmp12 + tmp1 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 5] = (tmp12 - tmp1 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 3] = (tmp13 + tmp0 + descaleFactor1) / descaleFactor2;			dataUnit[rIndex + 4] = (tmp13 - tmp0 + descaleFactor1) / descaleFactor2;		 }	}	/**	 * 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;		if (isZeroInColumn(dataUnit, col)) {			int dcVal = (dataUnit[c0] + 16) / 32;			dataUnit[c0] = dcVal;			dataUnit[c1] = dcVal;			dataUnit[c2] = dcVal;			dataUnit[c3] = dcVal;			dataUnit[c4] = dcVal;			dataUnit[c5] = dcVal;			dataUnit[c6] = dcVal;			dataUnit[c7] = dcVal;		} else {			/**			 * Even part: reverse the even part of the forward DCT.			 * The rotator is sqrt(2)*c(-6).			 */			int z2 = dataUnit[c2];			int z3 = dataUnit[c6];			int z1 = (z2 + z3) * FIX_0_541196100;			int tmp2 = z1 + (z3 * (0 - FIX_1_847759065));			int tmp3 = z1 + (z2 * FIX_0_765366865);			int tmp0 = (dataUnit[c0] + dataUnit[c4]) * 8192;			int tmp1 = (dataUnit[c0] - dataUnit[c4]) * 8192;			int tmp10 = tmp0 + tmp3;			int tmp13 = tmp0 - tmp3;			int tmp11 = tmp1 + tmp2;			int tmp12 = tmp1 - tmp2;			/**			 * Odd part per figure 8; the matrix is unitary and hence its			 * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively.			 */			tmp0 = dataUnit[c7];			tmp1 = dataUnit[c5];			tmp2 = dataUnit[c3];			tmp3 = dataUnit[c1];			z1 = tmp0 + tmp3;			z2 = tmp1 + tmp2;			z3 = tmp0 + tmp2;			int z4 = tmp1 + tmp3;			int z5 = (z3 + z4) * FIX_1_175875602;	/* sqrt(2) * c3 */						tmp0 = tmp0 * FIX_0_298631336;		/* sqrt(2) * (-c1+c3+c5-c7) */			tmp1 = tmp1 * FIX_2_053119869;		/* sqrt(2) * ( c1+c3-c5+c7) */			tmp2 = tmp2 * FIX_3_072711026;		/* sqrt(2) * ( c1+c3+c5-c7) */			tmp3 = tmp3 * 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;						tmp0 = tmp0 + z1 + z3;			tmp1 = tmp1 + z2 + z4;			tmp2 = tmp2 + z2 + z3;			tmp3 = tmp3 + z1 + z4;			/* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */			int descaleFactor1 = ExtendTest[18];			int descaleFactor2 = ExtendTest[19];			dataUnit[c0] = (tmp10 + tmp3 + descaleFactor1) / descaleFactor2;			dataUnit[c7] = (tmp10 - tmp3 + descaleFactor1) / descaleFactor2;			dataUnit[c1] = (tmp11 + tmp2 + descaleFactor1) / descaleFactor2;			dataUnit[c6] = (tmp11 - tmp2 + descaleFactor1) / descaleFactor2;			dataUnit[c2] = (tmp12 + tmp1 + descaleFactor1) / descaleFactor2;			dataUnit[c5] = (tmp12 - tmp1 + descaleFactor1) / descaleFactor2;			dataUnit[c3] = (tmp13 + tmp0 + descaleFactor1) / descaleFactor2;			dataUnit[c4] = (tmp13 - tmp0 + descaleFactor1) / descaleFactor2;		}	}}