Bug 2414 - raw_decode test does not work with libjpeg-turbo
: raw_decode test does not work with libjpeg-turbo
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Linux
: P2 normal
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2012-10-23 14:34 by
Modified: 2019-10-01 14:19 (History)


Attachments
tiff-4.0.3-raw-decode-test.diff (2.61 KB, patch)
2012-10-23 14:35, David Walser
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2012-10-23 14:34:13
In test/raw_decode.c in libtiff 4.0.3, a macro was added to distinguish the
libjpeg version and look for two different possible sets of values.

These tests seem to work correctly with libjpeg 6b and 8b from ijg.org.  They
do not work correctly with libjpeg-turbo 1.2.0 from
http://sourceforge.net/projects/libjpeg-turbo

The macro looks for JPEG_LIB_VERSION, and both 8b and turbo report the value as
80.  libjpeg-turbo, however, produces the same values in the test as 6b (same
as the test looked for in 4.0.2), so the test fails.
------- Comment #1 From 2012-10-23 14:35:01 -------
Created an attachment (id=492) [details]
tiff-4.0.3-raw-decode-test.diff

I worked around it by patching it to fail if the values it gets fail to match
either possible set of values.
------- Comment #2 From 2012-12-01 14:59:45 -------
Hi.  Mr. libjpeg-turbo here.  In libjpeg-turbo, the v8 API/ABI emulation
doesn't actually change anything about the underlying computation.  It just
emulates the libjpeg v8 API/ABI for backward compatibility purposes, but the
output is still mathematically compatible with libjpeg v6b.

As far as I'm aware, libjpeg v7+ should generate the same output as libjpeg v6b
as long as the same settings are used, but I do remember running into a problem
whereby disabling one of the default settings in libjpeg v7+ had no effect (it
may have been fancy downsampling-- I can't remember exactly.)  If you can
provide more details about how you're using the libjpeg API to decode this
particular file, I may be able to provide a more intelligent answer.  I don't
have time to troll through the libtiff code.

Also, note that you can check for whether JCS_EXTENSIONS is defined to figure
out whether you're using libjpeg-turbo or not.  Unless libjpeg ever decided to
adopt our colorspace extensions (probably not going to happen), JCS_EXTENSIONS
will only be defined in libjpeg-turbo.
------- Comment #3 From 2017-01-11 15:02:26 -------
*** Bug 2437 has been marked as a duplicate of this bug. ***
------- Comment #4 From 2019-10-01 14:19:38 -------
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets,
such as this one, have been migrated to the libtiff GitLab instance at
https://gitlab.com/libtiff/libtiff/issues .

The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is
the initial Bugzilla issue number.