summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jmorecfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libjpeg/src/jmorecfg.h')
-rw-r--r--src/3rdparty/libjpeg/src/jmorecfg.h80
1 files changed, 22 insertions, 58 deletions
diff --git a/src/3rdparty/libjpeg/src/jmorecfg.h b/src/3rdparty/libjpeg/src/jmorecfg.h
index d0b930079a..89c7842c87 100644
--- a/src/3rdparty/libjpeg/src/jmorecfg.h
+++ b/src/3rdparty/libjpeg/src/jmorecfg.h
@@ -4,8 +4,10 @@
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
* Modified 1997-2009 by Guido Vollbeding.
+ * Lossless JPEG Modifications:
+ * Copyright (C) 1999, Ken Murchison.
* libjpeg-turbo Modifications:
- * Copyright (C) 2009, 2011, 2014-2015, 2018, D. R. Commander.
+ * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -41,45 +43,29 @@
* arrays is very slow on your hardware, you might want to change these.
*/
-#if BITS_IN_JSAMPLE == 8
-/* JSAMPLE should be the smallest type that will hold the values 0..255.
- * You can use a signed char by having GETJSAMPLE mask it with 0xFF.
- */
-
-#ifdef HAVE_UNSIGNED_CHAR
+/* JSAMPLE should be the smallest type that will hold the values 0..255. */
typedef unsigned char JSAMPLE;
#define GETJSAMPLE(value) ((int)(value))
-#else /* not HAVE_UNSIGNED_CHAR */
+#define MAXJSAMPLE 255
+#define CENTERJSAMPLE 128
-typedef char JSAMPLE;
-#ifdef __CHAR_UNSIGNED__
-#define GETJSAMPLE(value) ((int)(value))
-#else
-#define GETJSAMPLE(value) ((int)(value) & 0xFF)
-#endif /* __CHAR_UNSIGNED__ */
-#endif /* HAVE_UNSIGNED_CHAR */
+/* J12SAMPLE should be the smallest type that will hold the values 0..4095. */
-#define MAXJSAMPLE 255
-#define CENTERJSAMPLE 128
+typedef short J12SAMPLE;
-#endif /* BITS_IN_JSAMPLE == 8 */
+#define MAXJ12SAMPLE 4095
+#define CENTERJ12SAMPLE 2048
-#if BITS_IN_JSAMPLE == 12
-/* JSAMPLE should be the smallest type that will hold the values 0..4095.
- * On nearly all machines "short" will do nicely.
- */
-
-typedef short JSAMPLE;
-#define GETJSAMPLE(value) ((int)(value))
+/* J16SAMPLE should be the smallest type that will hold the values 0..65535. */
-#define MAXJSAMPLE 4095
-#define CENTERJSAMPLE 2048
+typedef unsigned short J16SAMPLE;
-#endif /* BITS_IN_JSAMPLE == 12 */
+#define MAXJ16SAMPLE 65535
+#define CENTERJ16SAMPLE 32768
/* Representation of a DCT frequency coefficient.
@@ -97,22 +83,9 @@ typedef short JCOEF;
* managers, this is also the data type passed to fread/fwrite.
*/
-#ifdef HAVE_UNSIGNED_CHAR
-
typedef unsigned char JOCTET;
#define GETJOCTET(value) (value)
-#else /* not HAVE_UNSIGNED_CHAR */
-
-typedef char JOCTET;
-#ifdef __CHAR_UNSIGNED__
-#define GETJOCTET(value) (value)
-#else
-#define GETJOCTET(value) ((value) & 0xFF)
-#endif /* __CHAR_UNSIGNED__ */
-
-#endif /* HAVE_UNSIGNED_CHAR */
-
/* These typedefs are used for various table entries and so forth.
* They must be at least as wide as specified; but making them too big
@@ -123,23 +96,11 @@ typedef char JOCTET;
/* UINT8 must hold at least the values 0..255. */
-#ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char UINT8;
-#else /* not HAVE_UNSIGNED_CHAR */
-#ifdef __CHAR_UNSIGNED__
-typedef char UINT8;
-#else /* not __CHAR_UNSIGNED__ */
-typedef short UINT8;
-#endif /* __CHAR_UNSIGNED__ */
-#endif /* HAVE_UNSIGNED_CHAR */
/* UINT16 must hold at least the values 0..65535. */
-#ifdef HAVE_UNSIGNED_SHORT
typedef unsigned short UINT16;
-#else /* not HAVE_UNSIGNED_SHORT */
-typedef unsigned int UINT16;
-#endif /* HAVE_UNSIGNED_SHORT */
/* INT16 must hold at least the values -32768..32767. */
@@ -273,22 +234,24 @@ typedef int boolean;
/* Capability options common to encoder and decoder: */
-#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */
-#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */
-#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */
+#define DCT_ISLOW_SUPPORTED /* accurate integer method */
+#define DCT_IFAST_SUPPORTED /* less accurate int method [legacy feature] */
+#define DCT_FLOAT_SUPPORTED /* floating-point method [legacy feature] */
/* Encoder capability options: */
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
+#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */
#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */
/* Note: if you selected 12-bit data precision, it is dangerous to turn off
* ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit
* precision, so jchuff.c normally uses entropy optimization to compute
* usable tables for higher precision. If you don't want to do optimization,
* you'll have to supply different default Huffman tables.
- * The exact same statements apply for progressive JPEG: the default tables
- * don't work for progressive mode. (This may get fixed, however.)
+ * The exact same statements apply for progressive and lossless JPEG:
+ * the default tables don't work for progressive mode or lossless mode.
+ * (This may get fixed, however.)
*/
#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */
@@ -296,6 +259,7 @@ typedef int boolean;
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
+#define D_LOSSLESS_SUPPORTED /* Lossless JPEG? */
#define SAVE_MARKERS_SUPPORTED /* jpeg_save_markers() needed? */
#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */