summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libjpeg/src/jchuff.h
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2023-02-03 09:34:03 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2023-02-13 12:38:10 +0100
commit94efcf9be4c5e46dff463806e278fcee90ff4d53 (patch)
tree428c2aede34ba5081bb71f3e778409c3d74e45af /src/3rdparty/libjpeg/src/jchuff.h
parentfbfee2d7c59a7c6cd17ae7a3f63f983b9f3316f5 (diff)
Update bundled libjpeg-turbo to version 2.1.5
[ChangeLog][Third-Party Code] libjpeg-turbo was updated to version 2.1.5 Pick-to: 6.5 6.4 6.2 5.15 Task-number: QTBUG-110336 Change-Id: Ifc08ad7f1a3c5b3e66b11e5a51d523b091288790 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/3rdparty/libjpeg/src/jchuff.h')
-rw-r--r--src/3rdparty/libjpeg/src/jchuff.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/3rdparty/libjpeg/src/jchuff.h b/src/3rdparty/libjpeg/src/jchuff.h
index 314a2325c9..da7809a94b 100644
--- a/src/3rdparty/libjpeg/src/jchuff.h
+++ b/src/3rdparty/libjpeg/src/jchuff.h
@@ -3,8 +3,8 @@
*
* This file was part of the Independent JPEG Group's software:
* Copyright (C) 1991-1997, Thomas G. Lane.
- * It was modified by The libjpeg-turbo Project to include only code relevant
- * to libjpeg-turbo.
+ * libjpeg-turbo Modifications:
+ * Copyright (C) 2022, D. R. Commander.
* For conditions of distribution and use, see the accompanying README.ijg
* file.
*
@@ -25,6 +25,14 @@
#define MAX_COEF_BITS 14
#endif
+/* The progressive Huffman encoder uses an unsigned 16-bit data type to store
+ * absolute values of coefficients, because it is possible to inject a
+ * coefficient value of -32768 into the encoder by attempting to transform a
+ * malformed 12-bit JPEG image, and the absolute value of -32768 would overflow
+ * a signed 16-bit integer.
+ */
+typedef unsigned short UJCOEF;
+
/* Derived data constructed for each Huffman table */
typedef struct {