
Thread
2012.12.18 18:53 "[Tiff] More problems with libjpeg cross-version differences", by Tom Lane
I'm currently failing to build libtiff 4.0.3 in Fedora rawhide, because raw_decode fails like this:
FAIL: raw_decode
================
Pixel 0 did not match expected results.
Expect: 18 0 41
Got: 15 0 18
Pixel 64 did not match expected results.
Expect: 0 0 0
Got: 0 0 2
Pixel 512 did not match expected results.
Expect: 5 34 196
Got: 6 36 182
Pixel 0 did not match expected results.
Expect: 18 0 41 255
Got: 15 0 18 255
Pixel 64 did not match expected results.
Expect: 0 0 0 255
Got: 0 0 2 255
Pixel 512 did not match expected results.
Expect: 5 34 196 255
Got: 6 36 182 255
If you look closely, the actual results are those that raw_decode expects from pre-IJG7 libjpeg versions, but it's thinking it should get the IJG7 results. This is probably because Fedora uses libjpeg-turbo and recently switched over to the libjpeg 8 API --- but evidently, libjpeg-turbo only adopted the API changes and did not change the default decompression/upsampling algorithms.
We could try to hack the "#if JPEG_LIB_VERSION >= 70" test to make this pass in all cases, but I'm thinking that expecting exact pixel values out of libjpeg is a bad idea from the get-go. What I'd recommend instead is allowing a range of acceptable pixel values.
Thoughts?
regards, tom lane