Restore compatibility with the jpeg-6b error enum, even if arithmetic coding is enabled.

This commit is contained in:
DRC
2011-06-21 06:13:16 +00:00
parent 71be635a89
commit 2bfd5d8c7d
2 changed files with 11 additions and 9 deletions

View File

@@ -45,13 +45,11 @@ the application was invoked using I/O redirection
[13] The inclusion of libjpeg v7 and v8 emulation as well as arithmetic coding [13] The inclusion of libjpeg v7 and v8 emulation as well as arithmetic coding
support in libjpeg-turbo v1.1.0 introduced several new error constants in support in libjpeg-turbo v1.1.0 introduced several new error constants in
jerror.h, and these were mistakenly enabled for all emulation modes, causing jerror.h, and these were mistakenly enabled for all emulation modes, causing
the error enum in libjpeg-turbo to have different values than the same enum in the error enum in libjpeg-turbo to sometimes have different values than the
libjpeg. This represents an ABI incompatibility, and it caused problems with same enum in libjpeg. This represents an ABI incompatibility, and it caused
applications that took specific action based on libjpeg error values. The fix problems with rare applications that took specific action based on a particular
was to include the new error constants conditionally based on whether libjpeg error value. The fix was to include the new error constants conditionally
v7 or v8 emulation or arithmetic coding support was enabled. Note that to based on whether libjpeg v7 or v8 emulation was enabled.
achieve full ABI compatibility with jpeg-6b, it is necessary to build
libjpeg-turbo without arithmetic coding support.
[14] Fixed an issue whereby Windows applications that used libjpeg-turbo would [14] Fixed an issue whereby Windows applications that used libjpeg-turbo would
fail to compile if the Windows system headers were included before jpeglib.h. fail to compile if the Windows system headers were included before jpeglib.h.

View File

@@ -103,7 +103,7 @@ JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data")
JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change")
JMESSAGE(JERR_NOTIMPL, "Not implemented yet") JMESSAGE(JERR_NOTIMPL, "Not implemented yet")
JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time")
#if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) || JPEG_LIB_VERSION >= 70 #if JPEG_LIB_VERSION >= 70
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
#endif #endif
JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported")
@@ -183,7 +183,7 @@ JMESSAGE(JTRC_UNKNOWN_IDS,
JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
#if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) || JPEG_LIB_VERSION >= 70 #if JPEG_LIB_VERSION >= 70
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
#endif #endif
JMESSAGE(JWRN_BOGUS_PROGRESSION, JMESSAGE(JWRN_BOGUS_PROGRESSION,
@@ -200,6 +200,10 @@ JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG")
JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines")
#if JPEG_LIB_VERSION < 70 #if JPEG_LIB_VERSION < 70
JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request")
#if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED)
JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined")
JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code")
#endif
#endif #endif
#ifdef JMAKE_ENUM_LIST #ifdef JMAKE_ENUM_LIST