]> granicus.if.org Git - libjpeg-turbo/commitdiff
Restore compatibility with the jpeg-6b error enum, even if arithmetic coding is enabled.
authorDRC <dcommander@users.sourceforge.net>
Tue, 21 Jun 2011 06:17:10 +0000 (06:17 +0000)
committerDRC <dcommander@users.sourceforge.net>
Tue, 21 Jun 2011 06:17:10 +0000 (06:17 +0000)
git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.1.x@667 632fc199-4ca6-4c93-a231-07263d6284db

ChangeLog.txt
jerror.h

index 6c85ad3d8b9ca76d4efd9ea6b164f5fad47c43eb..f4f774ebba6ad8af20e2df66ef1298a1c0f67c85 100644 (file)
@@ -8,13 +8,11 @@ the application was invoked using I/O redirection
 [2] 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
 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
-libjpeg.  This represents an ABI incompatibility, and it caused problems with
-applications that took specific action based on libjpeg error values.  The fix
-was to include the new error constants conditionally based on whether libjpeg
-v7 or v8 emulation or arithmetic coding support was enabled.  Note that to
-achieve full ABI compatibility with jpeg-6b, it is necessary to build
-libjpeg-turbo without arithmetic coding support.
+the error enum in libjpeg-turbo to sometimes have different values than the
+same enum in libjpeg.  This represents an ABI incompatibility, and it caused
+problems with rare applications that took specific action based on a particular
+error value.  The fix was to include the new error constants conditionally
+based on whether libjpeg v7 or v8 emulation was enabled.
 
 [3] Fixed an issue whereby Windows applications that used libjpeg-turbo would
 fail to compile if the Windows system headers were included before jpeglib.h.
index 0f10f0e9b82c12164e3a105e4b0d79e4e924a139..275086e675e987fdc5b054f9ac48f8cd344de149 100644 (file)
--- a/jerror.h
+++ b/jerror.h
@@ -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_NOTIMPL, "Not implemented yet")
 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")
 #endif
 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_OPEN, "Obtained XMS handle %u")
 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")
 #endif
 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")
 #if JPEG_LIB_VERSION < 70
 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
 
 #ifdef JMAKE_ENUM_LIST