Commit 8b9bc4b9635a2a047fb23ebe70c9acd728d3f99b

DRC 2022-11-23T16:26:42

jconfig.h: Restore BITS_IN_JSAMPLE macro Because of e8b40f3c2ba187ba95c13c3e8ce21c8534256df7, we now support multiple data precisions in the same libjpeg API library, so BITS_IN_JSAMPLE is no longer used to specify the data precision at build time. However, some downstream software expects the macro to be defined. Since 12-bit data precision is an opt-in feature that requires explicitly calling 12-bit-specific libjpeg API functions and using 12-bit-specific data types, the unmodified portion of the libjpeg API still behaves as if it were built for 8-bit precision, and JSAMPLE is still literally an 8-bit data type. Thus, it is correct to externally define BITS_IN_JSAMPLE to 8 in jconfig.h. Since the build system also uses BITS_IN_JSAMPLE internally to build both 8-bit and 12-bit versions of relevant modules, the definition of BITS_IN_JSAMPLE in jconfig.h is now guarded by #ifndef BITS_IN_JSAMPLE. (Hopefully that doesn't cause any problems.) Fixes #632