Inconsistencies in IJG codes

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
cureos
Posts: 2
Joined: Thu, 2015-08-20, 13:14

Inconsistencies in IJG codes

#1 Post by cureos »

I am new to this forum, and I have not found a more suitable place to report DCMTK code issues, so I am posting my concern here in this forum. If code issues should be reported elsewhere, I would be more than happy if someone could point me in the right direction.

While delving deep into the IJG based code, I noticed a few inconsistencies between the different n-bit implementations. The most critical inconsistency is in the files jpeglib##.h, jpeg_decompress_struct, where the 16-bit declaration ends with the field

Code: Select all

unsigned int workaround_options;
whereas the 8- and 12-bit implementations do not. Under certain build conditions (at least Windows, x64, Debug) this has lead to this link error when including the three static IJG libraries in one executable:
LNK 2022: Inconsistent layout information in duplicated types
I guess it should not be any issues involved with adding the workaround_options field to jpeg_decompress_struct in jpeglib8.h and jpeglib12.h, so I recommend that the files are synced for a more reliable build experience.

While I am at it, I can also point out that the implementations of the get_dac function in the jdmarker.c file uses a variable denoted index in the 12-bit implementation and idx in the 8- and 16-bit implementations. This of course has no practical consequences for the compiled code, but I suppose you would like to keep the *.c files as synchronized as possible in the different bit implementations.

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Inconsistencies in IJG codes

#2 Post by J. Riesmeier »

Thank you for reporting these issues, and welcome to the forum :-)

Bugs and other issues (like the ones you've reported) can also be reported by email to "bugs/at/dcmtk/dot/org".

J. Riesmeier
DCMTK Developer
Posts: 2501
Joined: Tue, 2011-05-03, 14:38
Location: Oldenburg, Germany
Contact:

Re: Inconsistencies in IJG codes

#3 Post by J. Riesmeier »

I've just created a new issue for this in our tracker system (so it doesn't get lost): http://support.dcmtk.org/redmine/issues/654

cureos
Posts: 2
Joined: Thu, 2015-08-20, 13:14

Re: Inconsistencies in IJG codes

#4 Post by cureos »

Thanks, Jörg, for taking care of this!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest