Update dependency libjpeg-turbo/libjpeg-turbo to v3 #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.1.5.1->3.0.3Release Notes
libjpeg-turbo/libjpeg-turbo (libjpeg-turbo/libjpeg-turbo)
v3.0.3Compare Source
=====
Significant changes relative to 3.0.2:
Fixed an issue in the build system, introduced in 3.0.2, that caused all
libjpeg-turbo components to depend on the Visual C++ run-time DLL when built
with Visual C++ and CMake 3.15 or later, regardless of value of the
WITH_CRT_DLLCMake variable.The x86-64 SIMD extensions now include support for Intel Control-flow
Enforcement Technology (CET), which is enabled automatically if CET is enabled
in the C compiler.
Fixed a regression introduced by 3.0 beta2[6] that made it impossible for
calling applications to supply custom Huffman tables when generating
12-bit-per-component lossy JPEG images using the libjpeg API.
Fixed a segfault that occurred when attempting to use the jpegtran
-dropoption with a specially-crafted malformed input image or drop image
(specifically an image in which all of the scans contain fewer components than
the number of components specified in the Start Of Frame segment.)
v3.0.2Compare Source
=====
Significant changes relative to 3.0.1:
Fixed a signed integer overflow in the
tj3CompressFromYUV8(),tj3DecodeYUV8(),tj3DecompressToYUV8(), andtj3EncodeYUV8()functions,detected by the Clang and GCC undefined behavior sanitizers, that could be
triggered by setting the
alignparameter to an unreasonably large value.This issue did not pose a security threat, but removing the warning made it
easier to detect actual security issues, should they arise in the future.
Introduced a new parameter (
TJPARAM_MAXMEMORYin the TurboJPEG C API andTJ.PARAM_MAXMEMORYin the TurboJPEG Java API) and a corresponding TJBenchoption (
-maxmemory) for specifying the maximum amount of memory (inmegabytes) that will be allocated for intermediate buffers, which are used with
progressive JPEG compression and decompression, optimized baseline entropy
coding, lossless JPEG compression, and lossless transformation. The new
parameter and option serve the same purpose as the
max_memory_to_usefield inthe
jpeg_memory_mgrstruct in the libjpeg API, theJPEGMEMenvironmentvariable, and the cjpeg/djpeg/jpegtran
-maxmemoryoption.Introduced a new parameter (
TJPARAM_MAXPIXELSin the TurboJPEG C API andTJ.PARAM_MAXPIXELSin the TurboJPEG Java API) and a corresponding TJBenchoption (
-maxpixels) for specifying the maximum number of pixels that thedecompression, lossless transformation, and packed-pixel image loading
functions/methods will process.
Fixed an error ("Unsupported color conversion request") that occurred when
attempting to decompress a 3-component lossless JPEG image without an Adobe
APP14 marker. The decompressor now assumes that a 3-component lossless JPEG
image without an Adobe APP14 marker uses the RGB colorspace if its component
IDs are 1, 2, and 3.
v3.0.1Compare Source
=====
Significant changes relative to 3.0.0:
The x86-64 SIMD functions now use a standard stack frame, prologue, and
epilogue so that debuggers and profilers can reliably capture backtraces from
within the functions.
Fixed two minor issues in the interblock smoothing algorithm that caused
mathematical (but not necessarily perceptible) edge block errors when
decompressing progressive JPEG images exactly two MCU blocks in width or that
use vertical chrominance subsampling.
Fixed a regression introduced by 3.0 beta2[6] that, in rare cases, caused
the C Huffman encoder (which is not used by default on x86 and Arm CPUs) to
generate incorrect results if the Neon SIMD extensions were explicitly disabled
at build time (by setting the
WITH_SIMDCMake variable to0) in an AArch64build of libjpeg-turbo.
v3.0.0Compare Source
=====
Significant changes relative to 3.0 beta2:
The TurboJPEG API now supports 4:4:1 (transposed 4:1:1) chrominance
subsampling, which allows losslessly transposed or rotated 4:1:1 JPEG images to
be losslessly cropped, partially decompressed, or decompressed to planar YUV
images.
Fixed various segfaults and buffer overruns (CVE-2023-2804) that occurred
when attempting to decompress various specially-crafted malformed
12-bit-per-component and 16-bit-per-component lossless JPEG images using color
quantization or merged chroma upsampling/color conversion. The underlying
cause of these issues was that the color quantization and merged chroma
upsampling/color conversion algorithms were not designed with lossless
decompression in mind. Since libjpeg-turbo explicitly does not support color
conversion when compressing or decompressing lossless JPEG images, merged
chroma upsampling/color conversion never should have been enabled for such
images. Color quantization is a legacy feature that serves little or no
purpose with lossless JPEG images, so it is also now disabled when
decompressing such images. (As a result, djpeg can no longer decompress a
lossless JPEG image into a GIF image.)
Fixed an oversight in 1.4 beta1[8] that caused various segfaults and buffer
overruns when attempting to decompress various specially-crafted malformed
12-bit-per-component JPEG images using djpeg with both color quantization and
RGB565 color conversion enabled.
Fixed an issue whereby
jpeg_crop_scanline()sometimes miscalculated thedownsampled width for components with 4x2 or 2x4 subsampling factors if
decompression scaling was enabled. This caused the components to be upsampled
incompletely, which caused the color converter to read from uninitialized
memory. With 12-bit data precision, this caused a buffer overrun or underrun
and subsequent segfault if the sample value read from uninitialized memory was
outside of the valid sample range.
Fixed a long-standing issue whereby the
tj3Transform()function, when usedwith the
TJXOP_TRANSPOSE,TJXOP_TRANSVERSE,TJXOP_ROT90, orTJXOP_ROT270transform operation and without automatic JPEG destinationbuffer (re)allocation or lossless cropping, computed the worst-case transformed
JPEG image size based on the source image dimensions rather than the
transformed image dimensions. If a calling program allocated the JPEG
destination buffer based on the transformed image dimensions, as the API
documentation instructs, and attempted to transform a specially-crafted 4:2:2,
4:4:0, 4:1:1, or 4:4:1 JPEG source image containing a large amount of metadata,
the issue caused
tj3Transform()to overflow the JPEG destination bufferrather than fail gracefully. The issue could be worked around by setting
TJXOPT_COPYNONE. Note that, irrespective of this issue,tj3Transform()cannot reliably transform JPEG source images that contain a large amount of
metadata unless automatic JPEG destination buffer (re)allocation is used or
TJXOPT_COPYNONEis set.Fixed a regression introduced by 3.0 beta2[6] that prevented the djpeg
-mapoption from working when decompressing 12-bit-per-component lossy JPEGimages.
Fixed an issue that caused the C Huffman encoder (which is not used by
default on x86 and Arm CPUs) to read from uninitialized memory when attempting
to transform a specially-crafted malformed arithmetic-coded JPEG source image
into a baseline Huffman-coded JPEG destination image.
v2.1.91Compare Source
==================
Significant changes relative to 2.1.5.1:
Significantly sped up the computation of optimal Huffman tables. This
speeds up the compression of tiny images by as much as 2x and provides a
noticeable speedup for images as large as 256x256 when using optimal Huffman
tables.
All deprecated fields, constructors, and methods in the TurboJPEG Java API
have been removed.
Arithmetic entropy coding is now supported with 12-bit-per-component JPEG
images.
Overhauled the TurboJPEG API to address long-standing limitations and to
make the API more extensible and intuitive:
tj3, and all versionsuffixes have been removed from the function names. Future API overhauls will
increment the prefix to
tj4, etc., thus retaining backward API/ABIcompatibility without versioning each individual function.
parameters, the values of which persist between function calls. New
functions/methods (
tj3Set()/TJCompressor.set()/TJDecompressor.set()andtj3Get()/TJCompressor.get()/TJDecompressor.get()) can be used to set andquery the value of a particular API parameter.
parameters rather than stateless function arguments (C) or dedicated set/get
methods (Java.)
tj3DecompressHeader()now stores all relevant information about theJPEG image, including the width, height, subsampling type, entropy coding
algorithm, etc., in API parameters rather than returning that information
through pointer arguments.
TJFLAG_LIMITSCANS/TJ.FLAG_LIMITSCANShas been reimplemented as anAPI parameter (
TJPARAM_SCANLIMIT/TJ.PARAM_SCANLIMIT) that allows the numberof scans to be specified.
tables, as opposed to using the default Huffman tables) can now be specified,
using a new API parameter (
TJPARAM_OPTIMIZE/TJ.PARAM_OPTIMIZE), a newtransform option (
TJXOPT_OPTIMIZE/TJTransform.OPT_OPTIMIZE), and a newTJBench option (
-optimize.)API parameter (
TJPARAM_ARITHMETIC/TJ.PARAM_ARITHMETIC), a new transformoption (
TJXOPT_ARITHMETIC/TJTransform.OPT_ARITHMETIC), and a new TJBenchoption (
-arithmetic.)parameters (
TJPARAM_RESTARTROWS/TJ.PARAM_RESTARTROWSandTJPARAM_RESTARTBLOCKS/TJ.PARAM_RESTARTBLOCKS) and a new TJBench option(
-restart.)(
TJPARAM_XDENSITY/TJ.PARAM_XDENSITY,TJPARAM_YDENSITY/TJ.PARAM_YDENSITY, andTJPARAM_DENSITYUNITS/TJ.PARAM_DENSITYUNITS.)compression and decompression, since the "fast" algorithms are considered to be
a legacy feature. (The "fast" algorithms do not pass the ISO compliance tests,
and those algorithms are not any faster than the accurate algorithms on modern
x86 CPUs.)
(
tj3Init()) that accepts an integer argument specifying the subsystems toinitialize.
constkeyword for pointer arguments thatpoint to unmodified buffers (and for both dimensions of pointer arguments that
point to sets of unmodified buffers.)
size_trather thanunsigned longtorepresent buffer sizes, for compatibility with
malloc()and to avoiddisparities in the size of
unsigned longbetween LP64 (Un*x) and LLP64(Windows) operating systems.
trying to awkwardly return -1 in an unsigned data type (which could easily be
misinterpreted as a very large value.)
function/method (
tj3SetScalingFactor()/TJDecompressor.setScalingFactor()),rather than implicitly using awkward "desired width"/"desired height"
arguments.
function/method (
tj3SetCroppingRegion()/TJDecompressor.setCroppingRegion())and a new TJBench option (
-crop.)using a new API parameter (
TJPARAM_COLORSPACE/TJ.PARAM_COLORSPACE.) Thisallows JPEG images with the RGB and CMYK colorspaces to be created.
functionality is already available in ImageMagick.
fully decompressed into packed-pixel images or losslessly transformed (with the
exception of lossless cropping.) They cannot currently be partially
decompressed or decompressed into planar YUV images.
tj3Destroy()now silently accepts a NULL handle.tj3Alloc()andtj3Free()now return/accept void pointers, asmalloc()andfree()do.is used to transmit/receive API parameter values and to receive error
information.
Added support for 8-bit-per-component, 12-bit-per-component, and
16-bit-per-component lossless JPEG images. A new libjpeg API function
(
jpeg_enable_lossless()), TurboJPEG API parameters(
TJPARAM_LOSSLESS/TJ.PARAM_LOSSLESS,TJPARAM_LOSSLESSPSV/TJ.PARAM_LOSSLESSPSV, andTJPARAM_LOSSLESSPT/TJ.PARAM_LOSSLESSPT), and a cjpeg/TJBench option(
-lossless) can be used to create a lossless JPEG image. (Decompression oflossless JPEG images is handled automatically.) Refer to
libjpeg.txt, usage.txt, and the TurboJPEG API
documentation for more details.
Added support for 12-bit-per-component (lossy and lossless) and
16-bit-per-component (lossless) JPEG images to the libjpeg and TurboJPEG APIs:
data_precisionfield injpeg_compress_structandjpeg_decompress_structhas been repurposed to enable the creation of12-bit-per-component and 16-bit-per-component JPEG images or to detect whether
a 12-bit-per-component or 16-bit-per-component JPEG image is being
decompressed.
jpeg_write_scanlines()andjpeg_read_scanlines(), as well as new12-bit-per-component versions of
jpeg_write_raw_data(),jpeg_skip_scanlines(),jpeg_crop_scanline(), andjpeg_read_raw_data(),provide interfaces for compressing from/decompressing to 12-bit-per-component
and 16-bit-per-component packed-pixel and planar YUV image buffers.
decompression, and image I/O functions/methods have been added to the TurboJPEG
API, and a new API parameter (
TJPARAM_PRECISION/TJ.PARAM_PRECISION) can beused to query the data precision of a JPEG image. (YUV functions are currently
limited to 8-bit data precision but can be expanded to accommodate 12-bit data
precision in the future, if such is deemed beneficial.)
-precision) can be usedto create a 12-bit-per-component or 16-bit-per-component JPEG image.
(Decompression and transformation of 12-bit-per-component and
16-bit-per-component JPEG images is handled automatically.)
Refer to libjpeg.txt, usage.txt, and the
TurboJPEG API documentation for more details.
v2.1.90: (3.0 beta1)Compare Source
Assets
Packaging Changes
Support
Code Quality: Beta
Current Support Category: EOL
Release Sponsors
This release was made possible via funding from MathWorks.
Release Notes
Significant changes relative to 2.1.5:
Significantly sped up the computation of optimal Huffman tables. This speeds up the compression of tiny images by as much as 2x and provides a noticeable speedup for images as large as 256x256 when using optimal Huffman tables.
All deprecated fields, constructors, and methods in the TurboJPEG Java API have been removed.
Arithmetic entropy coding is now supported with 12-bit-per-component JPEG images.
Overhauled the TurboJPEG API to address long-standing limitations and to make the API more extensible and intuitive:
tj3, and all version suffixes have been removed from the function names. Future API overhauls will increment the prefix totj4, etc., thus retaining backward API/ABI compatibility without versioning each individual function.tj3Set()/TJCompressor.set()/TJDecompressor.set()andtj3Get()/TJCompressor.get()/TJDecompressor.get()) can be used to set and query the value of a particular API parameter.tj3DecompressHeader()now stores all relevant information about the JPEG image, including the width, height, subsampling type, entropy coding algorithm, etc., in API parameters rather than returning that information through pointer arguments.TJFLAG_LIMITSCANS/TJ.FLAG_LIMITSCANShas been reimplemented as an API parameter (TJPARAM_SCANLIMIT/TJ.PARAM_SCANLIMIT) that allows the number of scans to be specified.TJPARAM_OPTIMIZE/TJ.PARAM_OPTIMIZE), a new transform option (TJXOPT_OPTIMIZE/TJTransform.OPT_OPTIMIZE), and a new TJBench option (-optimize.)TJPARAM_ARITHMETIC/TJ.PARAM_ARITHMETIC), a new transform option (TJXOPT_ARITHMETIC/TJTransform.OPT_ARITHMETIC), and a new TJBench option (-arithmetic.)TJPARAM_RESTARTROWS/TJ.PARAM_RESTARTROWSandTJPARAM_RESTARTBLOCKS/TJ.PARAM_RESTARTBLOCKS) and a new TJBench option (-restart.)TJPARAM_XDENSITY/TJ.PARAM_XDENSITY,TJPARAM_YDENSITY/TJ.PARAM_YDENSITY, andTJPARAM_DENSITYUNITS/TJ.PARAM_DENSITYUNITS.)tj3Init()) that accepts an integer argument specifying the subsystems to initialize.constkeyword for pointer arguments that point to unmodified buffers (and for both dimensions of pointer arguments that point to sets of unmodified buffers.)size_trather thanunsigned longto represent buffer sizes, for compatibility withmalloc()and to avoid disparities in the size ofunsigned longbetween LP64 (Un*x) and LLP64 (Windows) operating systems.tj3SetScalingFactor()/TJDecompressor.setScalingFactor()), rather than implicitly using awkward "desired width"/"desired height" arguments.tj3SetCroppingRegion()/TJDecompressor.setCroppingRegion()) and a new TJBench option (-crop.)TJPARAM_COLORSPACE/TJ.PARAM_COLORSPACE.) This allows JPEG images with the RGB and CMYK colorspaces to be created.tj3Destroy()now silently accepts a NULL handle.tj3Alloc()andtj3Free()now return/accept void pointers, asmalloc()andfree()do.Added support for 8-bit-per-component, 12-bit-per-component, and 16-bit-per-component lossless JPEG images. A new libjpeg API function (
jpeg_enable_lossless()), TurboJPEG API parameters (TJPARAM_LOSSLESS/TJ.PARAM_LOSSLESS,TJPARAM_LOSSLESSPSV/TJ.PARAM_LOSSLESSPSV, andTJPARAM_LOSSLESSPT/TJ.PARAM_LOSSLESSPT), and a cjpeg/TJBench option (-lossless) can be used to create a lossless JPEG image. (Decompression of lossless JPEG images is handled automatically.) Refer to libjpeg.txt, usage.txt, and the TurboJPEG API documentation for more details.Added support for 12-bit-per-component (lossy and lossless) and 16-bit-per-component (lossless) JPEG images to the libjpeg and TurboJPEG APIs:
data_precisionfield injpeg_compress_structandjpeg_decompress_structhas been repurposed to enable the creation of 12-bit-per-component and 16-bit-per-component JPEG images or to detect whether a 12-bit-per-component or 16-bit-per-component JPEG image is being decompressed.jpeg_write_scanlines()andjpeg_read_scanlines(), as well as new 12-bit-per-component versions ofjpeg_write_raw_data(),jpeg_skip_scanlines(),jpeg_crop_scanline(), andjpeg_read_raw_data(), provide interfaces for compressing from/decompressing to 12-bit-per-component and 16-bit-per-component packed-pixel and planar YUV image buffers.TJPARAM_PRECISION/TJ.PARAM_PRECISION) can be used to query the data precision of a JPEG image. (YUV functions are currently limited to 8-bit data precision but can be expanded to accommodate 12-bit data precision in the future, if such is deemed beneficial.)-precision) can be used to create a 12-bit-per-component or 16-bit-per-component JPEG image. (Decompression and transformation of 12-bit-per-component and 16-bit-per-component JPEG images is handled automatically.)Refer to libjpeg.txt, usage.txt, and the TurboJPEG API documentation for more details.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.