Path: blob/master/thirdparty/libjpeg-turbo/patches/0002-disable-16bitlossless.patch
22233 views
diff --git a/thirdparty/libjpeg-turbo/src/jmorecfg.h b/thirdparty/libjpeg-turbo/src/jmorecfg.h1index 89c7842c87..c96edd2300 1006442--- a/thirdparty/libjpeg-turbo/src/jmorecfg.h3+++ b/thirdparty/libjpeg-turbo/src/jmorecfg.h4@@ -1,3 +1,5 @@5+// Modified to remove lossless jpeg support.6+7/*8* jmorecfg.h9*10@@ -242,7 +244,7 @@ typedef int boolean;1112#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */13#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/14-#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */15+//#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */16#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */17/* Note: if you selected 12-bit data precision, it is dangerous to turn off18* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit19@@ -259,7 +261,7 @@ typedef int boolean;2021#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */22#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/23-#define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */24+//#define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */25#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */26#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */27#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */28diff --git a/thirdparty/libjpeg-turbo/src/turbojpeg.c b/thirdparty/libjpeg-turbo/src/turbojpeg.c29index 23dbe6bb75..969174f72e 10064430--- a/thirdparty/libjpeg-turbo/src/turbojpeg.c31+++ b/thirdparty/libjpeg-turbo/src/turbojpeg.c32@@ -1196,9 +1196,6 @@ bailout:33#define BITS_IN_JSAMPLE 1234#include "turbojpeg-mp.c"35#undef BITS_IN_JSAMPLE36-#define BITS_IN_JSAMPLE 1637-#include "turbojpeg-mp.c"38-#undef BITS_IN_JSAMPLE3940/* TurboJPEG 1.2+ */41DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf,424344