JPEG subsampled raw decoding
Summary
When reading quad-jpeg.tif as YCC (and not as RGB), half of pixels are missing and strips are shifted (see )
Version
v4.3.0
Steps to reproduce
Open the image as YCC. Image is sub-sampled. When calling TIFFReadEncodedStrip, JPEGDecodeRaw function fills the output buffer, 2 lines by 2 lines (because of downsampling). But the pointer on output buffer is incremented of only 1-line-size. At each iteration, a line is overwritten.
Line 1631 in tif_jpeg.c:
buf += sp->bytesperline; <---- buf is incremented of one line, instead of 2 (in this case)
cc -= sp->bytesperline;
nrows -= sp->v_sampling; <--- v_sampling is 2
Platform
Windows - VC15
(Operating system, architecture, compiler details)