int g = y + ((CbGTable[cb] + CrGTable[cr]) / 65536);
int g = y + ((CbGTable[cb] + CrGTable[cr]) >> 16);
byte[] convertYCbCrToRGB() {	/**	 * Convert existing image components into an RGB format.	 * YCbCr is defined per CCIR 601-1, except that Cb and Cr are	 * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.	 * The conversion equations to be implemented are therefore	 * 	R = Y                + 1.40200 * Cr	 * 	G = Y - 0.34414 * Cb - 0.71414 * Cr	 * 	B = Y + 1.77200 * Cb	 * where Cb and Cr represent the incoming values less MAXJSAMPLE/2.	 * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)	 * 	 * To avoid floating-point arithmetic, we represent the fractional constants	 * as integers scaled up by 2^16 (about 4 digits precision); we have to divide	 * the products by 2^16, with appropriate rounding, to get the correct answer.	 * Notice that Y, being an integral input, does not contribute any fraction	 * so it need not participate in the rounding.	 * 	 * For even more speed, we avoid doing any multiplications in the inner loop	 * by precalculating the constants times Cb and Cr for all possible values.	 * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);	 * for 12-bit samples it is still acceptable.  It's not very reasonable for	 * 16-bit samples, but if you want lossless storage you shouldn't be changing	 * colorspace anyway.	 * The Cr=>R and Cb=>B values can be rounded to integers in advance; the	 * values for the G calculation are left scaled up, since we must add them	 * together before rounding.	 */	int bSize = imageWidth * imageHeight * nComponents;	byte[] rgbData = new byte[bSize];	int destIndex = 0;	expandImageComponents();	byte[] yComp = imageComponents[ID_Y];	byte[] cbComp = imageComponents[ID_CB];	byte[] crComp = imageComponents[ID_CR];	int compWidth = frameComponents[componentIds[ID_Y]][CW];	for (int v = 0; v < imageHeight; v++) {		int srcIndex = v * compWidth;		for (int i = 0; i < imageWidth; i++) {			int y = yComp[srcIndex] & 0xFF;			int cb = cbComp[srcIndex] & 0xFF;			int cr = crComp[srcIndex] & 0xFF;			int r = y + CrRTable[cr];			int g = y + ((CbGTable[cb] + CrGTable[cr]) / 65536);			int b = y + CbBTable[cb];			if (r < 0) {				r = 0;			} else {				if (r > 255) r = 255;			}			if (g < 0) {				g = 0;			} else {				if (g > 255) g = 255;			}			if (b < 0) {				b = 0;			} else {				if (b > 255) b = 255;			}			rgbData[destIndex] = (byte)b;			rgbData[destIndex + 1] = (byte)g;			rgbData[destIndex + 2] = (byte)r;			destIndex += 3;			srcIndex++;		}	}	return rgbData;}