Hi, I'm having trouble using IJL 1.5.1 to compress a YUV buffer to a JPEG buffer. When I convert from YUV to RGB and compress the RGB buffer it works fine, but when I try to directly compress the YUV 422 format, it doubles in size and looks really strange when I decompress it (using Sun's Java JPEG decompressor).
Am I correct in assuming that the input (props.DIBBytes) to ijlWrite when using JBUFF (as opposed to JFILE) is an array of bytes in the format of:
Y0 U0 Y1 V0
props.JPGColor = IJL_YCBCR; //JPEG is stored as YUV 411?
props.JPGSubsampling = IJL_411;
props.JPGChannels = 3;
props.DIBColor = IJL_YCBCR; //My buffer is YUV 422
props.DIBSubsampling = IJL_422;
props.DIBChannels = 3;
(If you're wondering why, I'm writing code for a mobile robot to JPEG compress camera images that are obtained in PAL format which is YUV 422, send this data across the net, and then decompress the JPEG data inside a Java applet).