-
Notifications
You must be signed in to change notification settings - Fork 90
fix an overly strict constraint in the huffman table generation logic, w... #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…, which causes the software to throw an error and reject legal huffman tables
|
I went back a very old version of libjpeg 6b which was patched for lossless support to try and get this working with the Ursula camera images. I saw that your project is GPL3 licensed and we cannot integrate it with our commercial application. The old libjpeg 6b had also complained about invalid huffman tables. I found that the code was completely different than yours, and it contained this comment:
If this is true that no huffman code is allowed to be all ones (is this used for an escape code?) then the camera is generating an illegal stream. Thanks, Adobe. |
|
Richard,
thanks for your report. Would it be possible to send me the image that Anyhow, before you use the git version - there is a later version you As you will find, the official version on jpeg.org is quite a bit ahead Greetings, |
|
Am 05.05.2015 um 20:47 schrieb Richard Goedeken:
It depends what you need. The ISO version of the same software on Note also that there are a couple of corrupt lossless JPEG images around
Actually, there is no (explicit) requirement in the standard that a However, before I can actually make a statement on whether this is a Greetings, |
|
Thanks for the info. I actually found and tried the Jpeg XT library yesterday, but I only ran the ISO licensed version and of course it said that it didn't support the lossless file. I will send you the file at your email address tomorrow for your analysis. If the all-ones huffman code is legal then I'm pretty sure that the code here has a defect, and my patch is the correct fix. I've written huffman codecs before, so I understand the algorithm. My manager should be contacting you in the next day or two to discuss licensing terms. |
...hich causes the software to throw an error and reject legal huffman tables.
I am using your library to decode CinemaDNG images from a new BlackMagic Ursula cinema camera. It failed to decode the images with the following error:
To debug this, I place the following statement at line 546:
The output was:
So it's a legal table, but the last 3 bit lengths have no code values. As a result of the truncated (but legal) table, this huffman generator logic throws an error. My code change applies the correct constraint which allows for tables which end early, but will still fail tables which are actually corrupted.