1998.11.30 00:00 "Bug report for TIFF library v3.4beta037", by Stuart MacKinnon
I am using TIFF Library v3.4beta037 under Win32 (not using the standard Win32 contrib code - using different file I/O classes internal to our app).
Using rgb2ycbcr I produced an image with 1:1 sampling. I then attempted to use TIFFRGBAImage (ie. tif_getimage.c) to read the ycbcr image. It crashed. The reason being that the putcontig8bitYCbCr11tile callback to decode the pixels only does w>>1 pixels - which is wrong. There is no subsampling so it should infact be doing the whole width.
More specifically:
/*
* 8-bit packed YCbCr samples w/ no subsampling => RGB
*/
DECLAREContigPutFunc(putcontig8bitYCbCr11tile)
{
YCbCrSetup;
(void) y;
/* XXX adjust fromskew */
do {
x = w>>1; <----------------- **** This is wrong! ****
do {
int Cb = pp[1];
int Cr = pp[2];
YCbCrtoRGB(*cp++, pp[0]);
pp += 3;
} while (--x);
cp += toskew;
pp += fromskew;
} while (--h);
}
The code should be changed to make x = w
Regards,
--
+- Stuart MacKinnon ------------------------------ stuart@eyeonline.com ---+
| Senior Programmer at eyeon Software http://www.eyeonline.com |
+--------------------------------------------------------------------------+