From: Guido Vollbeding <guido@jpegclub.org>
References: <3023e295-7fe8-5140-271e-475a8bb4ea99@spatialys.com>
 <034560e7-31d7-06d0-3beb-c12a05f2b353@jpegclub.org>
 <b63408f1-e11b-70cb-ffed-2122712e4692@spatialys.com>
Message-ID: <fce09c46-72f8-ffe8-b97b-14a0285d6b1d@jpegclub.org>
Date: Fri, 18 Jun 2021 18:10:00 +0200
MIME-Version: 1.0
In-Reply-To: <b63408f1-e11b-70cb-ffed-2122712e4692@spatialys.com>
Subject: Re: [Tiff] IJG libjpeg-9d breaks libtiff JPEG-in-TIFF compression


Hi Even

Yes, I noticed the special requirements due to the tile/strip mode.

> Regarding being dependent on specific behavior of libjpeg 9d on the 
> decoding side, we cannot do this. libtiff is typically built against 
> other implementations of libjpeg (libjpeg-turbo being quite popular).
>

Again: It is now general consensus for JPEG decoders to work with 
undefined Huffman tables for compatibility with Motion-JPEG streams, 
even those fake implementations!

> We have also to output something that is conformant with the 
> TIFFTechNote2 and any library (possibly not even using libtiff) 
> implementing it should be able to decode what libtiff outputs. This 
> is all about interoperability: there isn't much place for innovation, 
> or it must carefully fits into the degree of freedoms permitted by 
> the specification.
>

The specification is not compatible with Motion-JPEG streams.
The recent JPEG decoders, even the fake ones, ARE compatible with 
Motion-JPEG streams.
It is all about compatibility and consistency!

> I'd be curious to hear your suggestion for a prettier alternative to 
> my workaround though.
>

In a moment... Have you tried the unmodified code with libjpeg 9d 
compression and decompression? Does it work?

Regards
Guido
