Received: by smtp02.oce.nl (4.1/SMI-4.1)
	id AA07715; Mon, 30 Nov 98 02:09:23 +0100
Received: from sgi.sgi.com (SGI.COM [192.48.153.1])
	by oce.nl (8.9.0/8.9.0) with ESMTP id BAA22585
	for <rvdt@oce.nl>; Mon, 30 Nov 1998 01:42:53 +0100 (MET)
Received: from cthulhu.engr.sgi.com (cthulhu.engr.sgi.com [192.26.80.2]) 
	by sgi.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id QAA07452; Sun, 29 Nov 1998 16:39:00 -0800 (PST)
	mail_from (owner-tiff@sgi.engr.sgi.com)
Received: (from majordomo-owner@localhost)
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	id QAA00944
	for tiff-list;
	Sun, 29 Nov 1998 16:01:38 -0800 (PST)
	mail_from (owner-tiff@sgi.sgi.com)
Received: from sgi.sgi.com (sgi.engr.sgi.com [192.26.80.37])
	by cthulhu.engr.sgi.com (980427.SGI.8.8.8/970903.SGI.AUTOCF)
	via ESMTP id QAA88247
	for <tiff-relay@engr.sgi.com>;
	Sun, 29 Nov 1998 16:01:36 -0800 (PST)
	mail_from (owner-tiff@sgi.sgi.com)
Received: from fusion.eyeonline.com (fusion.eyeonline.com [209.167.239.235]) 
	by sgi.sgi.com (980327.SGI.8.8.8-aspam/980304.SGI-aspam:
       SGI does not authorize the use of its proprietary
       systems or networks for unsolicited or bulk email
       from the Internet.) 
	via ESMTP id QAA05511
	for <tiff@sgi.com>; Sun, 29 Nov 1998 16:01:34 -0800 (PST)
	mail_from (stuart@eyeonline.com)
Received: from ibm_zpro (h24-64-150-83.mt.wave.shaw.ca [24.64.150.83]) by fusion.eyeonline.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2232.9)
	id XV73L666; Sun, 29 Nov 1998 19:00:22 -0500
Message-Id: <008e01be1bf4$65cd34f0$53964018@ibm_zpro.mtmk1.on.wave.home.com>
From: "Stuart MacKinnon" <stuart@eyeonline.com>
To: <tiff@sgi.com>
Subject: Bug report for TIFF library v3.4beta037
Date: Sun, 29 Nov 1998 19:00:10 -0500
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-Msmail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.5
X-Mimeole: Produced By Microsoft MimeOLE V4.72.3110.3
Sender: owner-tiff@fddi-sgi.sgi.com
Precedence: bulk

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  |
+--------------------------------------------------------------------------+


