Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion COPYRIGHT.txt
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ License: BSD-3-clause

Files: thirdparty/libjpeg-turbo/*
Comment: libjpeg-turbo
Copyright: 2009-2024, D. R. Commander
Copyright: 2009-2025, D. R. Commander
2015, Viktor Szathmáry.
1991-2020, Thomas G. Lane, Guido Vollbeding
License: BSD-3-clause and IJG
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ Patches:
## libjpeg-turbo

- Upstream: https://github.com/libjpeg-turbo/libjpeg-turbo
- Version: 3.1.0 (20ade4dea9589515a69793e447a6c6220b464535, 2024)
- Version: 3.1.3 (af9c1c268520a29adf98cad5138dafe612b3d318, 2025)
- License: BSD-3-Clause and IJG

Files extracted from upstream source:
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/libjpeg-turbo/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ intended solely for clarification.
The Modified (3-clause) BSD License
===================================

Copyright (C)2009-2024 D. R. Commander. All Rights Reserved.<br>
Copyright (C)2009-2025 D. R. Commander. All Rights Reserved.<br>
Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
277 changes: 0 additions & 277 deletions thirdparty/libjpeg-turbo/patches/0001-cmake-generated-headers.patch
Original file line number Diff line number Diff line change
@@ -1,280 +1,3 @@
diff --git a/thirdparty/libjpeg-turbo/patches/0001-cmake-generated-headers.patch b/thirdparty/libjpeg-turbo/patches/0001-cmake-generated-headers.patch
index 72354390a6..e69de29bb2 100644
--- a/thirdparty/libjpeg-turbo/patches/0001-cmake-generated-headers.patch
+++ b/thirdparty/libjpeg-turbo/patches/0001-cmake-generated-headers.patch
@@ -1,272 +0,0 @@
-diff --git a/thirdparty/libjpeg-turbo/src/jconfig.h b/thirdparty/libjpeg-turbo/src/jconfig.h
-new file mode 100644
-index 0000000000..42d9654c0f
---- /dev/null
-+++ b/thirdparty/libjpeg-turbo/src/jconfig.h
-@@ -0,0 +1,62 @@
-+// Originally generated by libjpeg-turbo's cmake build, then modified to support multiple platforms.
-+
-+/* Version ID for the JPEG library.
-+ * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60".
-+ */
-+#define JPEG_LIB_VERSION 62
-+
-+/* libjpeg-turbo version */
-+#define LIBJPEG_TURBO_VERSION 3.1.0
-+
-+/* libjpeg-turbo version in integer form */
-+#define LIBJPEG_TURBO_VERSION_NUMBER 3001000
-+
-+/* Support arithmetic encoding when using 8-bit samples */
-+#define C_ARITH_CODING_SUPPORTED 1
-+
-+/* Support arithmetic decoding when using 8-bit samples */
-+#define D_ARITH_CODING_SUPPORTED 1
-+
-+/* Support in-memory source/destination managers */
-+#define MEM_SRCDST_SUPPORTED 1
-+
-+/* Use accelerated SIMD routines when using 8-bit samples */
-+//#define WITH_SIMD 1
-+
-+/* This version of libjpeg-turbo supports run-time selection of data precision,
-+ * 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 define BITS_IN_JSAMPLE to 8 here.
-+ */
-+#ifndef BITS_IN_JSAMPLE
-+#define BITS_IN_JSAMPLE 8
-+#endif
-+
-+#ifdef _WIN32
-+
-+#undef RIGHT_SHIFT_IS_UNSIGNED
-+
-+/* Define "boolean" as unsigned char, not int, per Windows custom */
-+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
-+typedef unsigned char boolean;
-+#endif
-+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
-+
-+/* Define "INT32" as int, not long, per Windows custom */
-+#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */
-+typedef short INT16;
-+typedef signed int INT32;
-+#endif
-+#define XMD_H /* prevent jmorecfg.h from redefining it */
-+
-+#else
-+
-+/* Define if your (broken) compiler shifts signed values as if they were
-+ unsigned. */
-+/* #undef RIGHT_SHIFT_IS_UNSIGNED */
-+
-+#endif
-diff --git a/thirdparty/libjpeg-turbo/src/jconfigint.h b/thirdparty/libjpeg-turbo/src/jconfigint.h
-new file mode 100644
---- /dev/null
-+++ b/thirdparty/libjpeg-turbo/src/jconfigint.h
-@@ -0,0 +1,102 @@
-+// Originally generated by libjpeg-turbo's cmake build, then modified to support multiple platforms.
-+
-+/* libjpeg-turbo build number */
-+#define BUILD "20250317"
-+
-+/* How to hide global symbols. */
-+#ifndef HIDDEN
-+ #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
-+ #define HIDDEN __attribute__((visibility("hidden")))
-+ #else
-+ #define HIDDEN
-+ #endif
-+#endif
-+
-+/* Compiler's inline keyword */
-+#undef inline
-+
-+/* How to obtain function inlining. */
-+#if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
-+ #define INLINE __inline__ __attribute__((always_inline))
-+#else
-+ #define INLINE inline
-+#endif
-+
-+/* How to obtain thread-local storage */
-+#if defined(_MSC_VER)
-+#define THREAD_LOCAL __declspec(thread)
-+#else
-+#define THREAD_LOCAL __thread
-+#endif
-+
-+/* Define to the full name of this package. */
-+#define PACKAGE_NAME "libjpeg-turbo"
-+
-+/* Version number of package */
-+#define VERSION "3.1.0"
-+
-+/* The size of `size_t', as computed by sizeof. */
-+#if defined(__SIZEOF_SIZE_T__)
-+ #define SIZEOF_SIZE_T __SIZEOF_SIZE_T__
-+#elif defined(_WIN64)
-+ #define SIZEOF_SIZE_T 8
-+#elif defined(_WIN32)
-+ #define SIZEOF_SIZE_T 4
-+#else
-+ #error "Cannot determine size of size_t"
-+#endif
-+
-+/* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */
-+#if defined(__GNUC__)
-+ #define HAVE_BUILTIN_CTZL
-+#endif
-+
-+/* Define to 1 if you have the <intrin.h> header file. */
-+/* #undef HAVE_INTRIN_H */
-+
-+#if defined(_MSC_VER) && defined(HAVE_INTRIN_H)
-+#if (SIZEOF_SIZE_T == 8)
-+#define HAVE_BITSCANFORWARD64
-+#elif (SIZEOF_SIZE_T == 4)
-+#define HAVE_BITSCANFORWARD
-+#endif
-+#endif
-+
-+#if defined(__has_attribute)
-+#if __has_attribute(fallthrough)
-+#define FALLTHROUGH __attribute__((fallthrough));
-+#else
-+#define FALLTHROUGH
-+#endif
-+#else
-+#define FALLTHROUGH
-+#endif
-+
-+/*
-+ * Define BITS_IN_JSAMPLE as either
-+ * 8 for 8-bit sample values (the usual setting)
-+ * 12 for 12-bit sample values
-+ * Only 8 and 12 are legal data precisions for lossy JPEG according to the
-+ * JPEG standard, and the IJG code does not support anything else!
-+ */
-+
-+#ifndef BITS_IN_JSAMPLE
-+#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */
-+#endif
-+
-+#undef C_ARITH_CODING_SUPPORTED
-+#undef D_ARITH_CODING_SUPPORTED
-+#undef WITH_SIMD
-+
-+#if BITS_IN_JSAMPLE == 8
-+
-+/* Support arithmetic encoding */
-+#define C_ARITH_CODING_SUPPORTED 1
-+
-+/* Support arithmetic decoding */
-+#define D_ARITH_CODING_SUPPORTED 1
-+
-+/* Use accelerated SIMD routines. */
-+//#define WITH_SIMD 1
-+
-+#endif
-diff --git a/thirdparty/libjpeg-turbo/src/jmorecfg.h b/thirdparty/libjpeg-turbo/src/jmorecfg.h
---- a/thirdparty/libjpeg-turbo/src/jmorecfg.h
-+++ b/thirdparty/libjpeg-turbo/src/jmorecfg.h
-@@ -1,3 +1,5 @@
-+// Modified to remove lossless jpeg support.
-+
- /*
- * jmorecfg.h
- *
-@@ -8,6 +10,6 @@
- * Copyright (C) 1999, Ken Murchison.
- * libjpeg-turbo Modifications:
- * Copyright (C) 2009, 2011, 2014-2015, 2018, 2020, 2022, D. R. Commander.
- * For conditions of distribution and use, see the accompanying README.ijg
- * file.
- *
-@@ -242,7 +244,7 @@ typedef int boolean;
-
- #define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
- #define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
--#define C_LOSSLESS_SUPPORTED /* Lossless JPEG? */
-+//#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
-@@ -259,7 +263,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 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? */
-diff --git a/thirdparty/libjpeg-turbo/src/jversion.h b/thirdparty/libjpeg-turbo/src/jversion.h
-new file mode 100644
---- /dev/null
-+++ b/thirdparty/libjpeg-turbo/src/jversion.h
-@@ -0,0 +18446744073709551615,58 @@
-+// Originally generated by libjpeg-turbo's cmake build, then modified to support multiple platforms.
-+
-+/*
-+ * jversion.h
-+ *
-+ * This file was part of the Independent JPEG Group's software:
-+ * Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding.
-+ * libjpeg-turbo Modifications:
-+ * Copyright (C) 2010, 2012-2024, D. R. Commander.
-+ * For conditions of distribution and use, see the accompanying README.ijg
-+ * file.
-+ *
-+ * This file contains software version identification.
-+ */
-+
-+
-+#if JPEG_LIB_VERSION >= 80
-+
-+#define JVERSION "8d 15-Jan-2012"
-+
-+#elif JPEG_LIB_VERSION >= 70
-+
-+#define JVERSION "7 27-Jun-2009"
-+
-+#else
-+
-+#define JVERSION "6b 27-Mar-1998"
-+
-+#endif
-+
-+/*
-+ * NOTE: It is our convention to place the authors in the following order:
-+ * - libjpeg-turbo authors (2009-) in descending order of the date of their
-+ * most recent contribution to the project, then in ascending order of the
-+ * date of their first contribution to the project, then in alphabetical
-+ * order
-+ * - Upstream authors in descending order of the date of the first inclusion of
-+ * their code
-+ */
-+
-+#define JCOPYRIGHT1 \
-+ "Copyright (C) 2009-2024 D. R. Commander\n" \
-+ "Copyright (C) 2015, 2020 Google, Inc.\n" \
-+ "Copyright (C) 2019-2020 Arm Limited\n" \
-+ "Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \
-+ "Copyright (C) 2011-2016 Siarhei Siamashka\n" \
-+ "Copyright (C) 2015 Intel Corporation\n"
-+#define JCOPYRIGHT2 \
-+ "Copyright (C) 2013-2014 Linaro Limited\n" \
-+ "Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \
-+ "Copyright (C) 2009, 2012 Pierre Ossman for Cendio AB\n" \
-+ "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \
-+ "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \
-+ "Copyright (C) 1999 Ken Murchison\n" \
-+ "Copyright (C) 1991-2020 Thomas G. Lane, Guido Vollbeding\n"
-+
-+#define JCOPYRIGHT_SHORT \
-+ "Copyright (C) 1991-2024 The libjpeg-turbo Project and many others"
diff --git a/thirdparty/libjpeg-turbo/src/jconfig.h b/thirdparty/libjpeg-turbo/src/jconfig.h
new file mode 100644
index 0000000000..42d9654c0f
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
commit 462c1cd875ae8f6b5f6406dda01881fb173ac30c
Author: Daniel Kinsman <danielkinsman@riseup.net>
Date: Thu Mar 20 12:21:28 2025 +1100

remove unneeded source files and lossless jpeg support

diff --git a/thirdparty/README.md b/thirdparty/README.md
index c22ef77af7..52b635df05 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -539,7 +539,7 @@ Patches:
## libjpeg-turbo

- Upstream: https://github.com/libjpeg-turbo/libjpeg-turbo
-- Version: 3.1.0 (20ade4dea9589515a69793e447a6c6220b464535, 2024)
+- Version: 3.1.3 (af9c1c268520a29adf98cad5138dafe612b3d318, 2025)
- License: BSD-3-Clause and IJG

Files extracted from upstream source:
diff --git a/thirdparty/libjpeg-turbo/src/turbojpeg.c b/thirdparty/libjpeg-turbo/src/turbojpeg.c
index 389aea55d3..eec8e2a616 100644
index 45fc0f954c..d514da43d2 100644
--- a/thirdparty/libjpeg-turbo/src/turbojpeg.c
+++ b/thirdparty/libjpeg-turbo/src/turbojpeg.c
@@ -1200,9 +1200,6 @@ bailout:
@@ -1196,9 +1196,6 @@ bailout:
#define BITS_IN_JSAMPLE 12
#include "turbojpeg-mp.c"
#undef BITS_IN_JSAMPLE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
diff --git a/thirdparty/README.md b/thirdparty/README.md
index c22ef77af7..52b635df05 100644
--- a/thirdparty/README.md
+++ b/thirdparty/README.md
@@ -539,7 +539,7 @@ Patches:
## libjpeg-turbo

- Upstream: https://github.com/libjpeg-turbo/libjpeg-turbo
-- Version: 3.1.0 (20ade4dea9589515a69793e447a6c6220b464535, 2024)
+- Version: 3.1.3 (af9c1c268520a29adf98cad5138dafe612b3d318, 2025)
- License: BSD-3-Clause and IJG

Files extracted from upstream source:
diff --git a/thirdparty/libjpeg-turbo/src/turbojpeg-mp.c b/thirdparty/libjpeg-turbo/src/turbojpeg-mp.c
index 1fa63b8185..72f99e236a 100644
index 6fecc5cb80..21d26536c1 100644
--- a/thirdparty/libjpeg-turbo/src/turbojpeg-mp.c
+++ b/thirdparty/libjpeg-turbo/src/turbojpeg-mp.c
@@ -286,271 +286,6 @@ bailout:
Expand Down Expand Up @@ -275,10 +288,20 @@ index 1fa63b8185..72f99e236a 100644
#undef _JSAMPROW
#undef _buffer
diff --git a/thirdparty/libjpeg-turbo/src/turbojpeg.c b/thirdparty/libjpeg-turbo/src/turbojpeg.c
index eec8e2a616..8ce446148a 100644
index 45fc0f954c..969174f72e 100644
--- a/thirdparty/libjpeg-turbo/src/turbojpeg.c
+++ b/thirdparty/libjpeg-turbo/src/turbojpeg.c
@@ -3095,48 +3095,3 @@ bailout:
@@ -1196,9 +1196,6 @@ bailout:
#define BITS_IN_JSAMPLE 12
#include "turbojpeg-mp.c"
#undef BITS_IN_JSAMPLE
-#define BITS_IN_JSAMPLE 16
-#include "turbojpeg-mp.c"
-#undef BITS_IN_JSAMPLE

/* TurboJPEG 1.2+ */
DLLEXPORT int tjCompress2(tjhandle handle, const unsigned char *srcBuf,
@@ -3094,48 +3091,3 @@ bailout:
free(sizes);
return retval;
}
Expand Down
Loading