Possible regression in jpegtran 3.4.0 for custom scan script
Hi,
I came across some very weird behaviour using jpegtran in mozjpeg version 3.4.0 (build 20190114) (built from source).
If I use -scans to transform a baseline JPEG into a progressive one, and my scan script contains a scan performing spectral selection including exactly the first 16 AC coefficients (for any channel), then jpegtran fails with Missing Huffman code table entry on literally every image I tested.
Here is a scan script to reproduce:
0 1 2: 0 0 0 0;
0: 1 16 0 0;
0: 17 63 0 0;
1: 1 63 0 0;
2: 1 63 0 0;
Invocation of jpegtran to reproduce:
$ jpegtran -copy all -scans test.scan lena10.jpg > /dev/null
Missing Huffman code table entry
Replacing the 16 with any other number seems to fix the issue.
The same scan script works fine with mozjpeg version 3.3.1 (build 20190105) (installed with homebrew).
Same with libjpeg-turbo (I tried version 2.0.2)
Could you file a bug in libjpeg-turbo?
Opened an issue for libjpeg-turbo: https://github.com/libjpeg-turbo/libjpeg-turbo/issues/335
This is fixed upstream.
Should be fixed now