diff options
author | robot-piglet <[email protected]> | 2025-06-15 15:44:41 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-06-15 15:55:30 +0300 |
commit | ea626d7b15346c0da649291483f80f1ae6e1d7e7 (patch) | |
tree | 24ae3c2aa7f259f3ba95af8450b5bce9a4bdb10d /contrib/libs/libjpeg-turbo/jconfig.h | |
parent | 726087f32fb38c191ff0c3ef8c6646aa940d987e (diff) |
Intermediate changes
commit_hash:79edafb911368bba0a4d2f7f151a6c8a37c349f3
Diffstat (limited to 'contrib/libs/libjpeg-turbo/jconfig.h')
-rw-r--r-- | contrib/libs/libjpeg-turbo/jconfig.h | 51 |
1 files changed, 37 insertions, 14 deletions
diff --git a/contrib/libs/libjpeg-turbo/jconfig.h b/contrib/libs/libjpeg-turbo/jconfig.h index 7dffead627a..47cb0e8c889 100644 --- a/contrib/libs/libjpeg-turbo/jconfig.h +++ b/contrib/libs/libjpeg-turbo/jconfig.h @@ -4,34 +4,57 @@ #define JPEG_LIB_VERSION 62 /* libjpeg-turbo version */ -#define LIBJPEG_TURBO_VERSION 2.1.4 +#define LIBJPEG_TURBO_VERSION 3.1.1 /* libjpeg-turbo version in integer form */ -#define LIBJPEG_TURBO_VERSION_NUMBER 2001004 +#define LIBJPEG_TURBO_VERSION_NUMBER 3001001 -/* Support arithmetic encoding */ +/* Support arithmetic encoding when using 8-bit samples */ #define C_ARITH_CODING_SUPPORTED 1 -/* Support arithmetic decoding */ +/* 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 +#define MEM_SRCDST_SUPPORTED 1 -/* Use accelerated SIMD routines. */ +/* Use accelerated SIMD routines when using 8-bit samples */ #define WITH_SIMD 1 -/* - * 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! - * We do not support run-time selection of data precision, sorry. +/* 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 -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ +#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 |