Tags: jzubizarreta/libjpeg-turbo
Tags
jerror.c: Silence MSan uninitialized value warning If an error manager instance is passed to jpeg_std_error(), then its format_message() method will point to the format_message() function in jerror.c. The format_message() function passes all eight values from the jpeg_error_mgr::msg_parm.i[] array as arguments to snprintf()/_snprintf_s(), even if the format string doesn't use all of those values. Subsequently invoking one of the ERREXIT[1-6]() macros will leave the unused values uninitialized, and if the -fsanitize-memory-param-retval option (introduced in Clang 14) is enabled (which it is by default in Clang 16 and later), then MSan will complain when the format_message() function tries to pass the uninitialized-but-unused values as function arguments. This commit modifies jpeg_std_error() so that it zeroes out the error manager instance passed to it, thus working around the warning as well as simplifying the code. Closes libjpeg-turbo#761
AppVeyor: Use SignPath release cert/only sign tags The SignPath release certificate for our project is not yet available as of this writing, but this commit prepares the CI system to use the release certificate whenever it becomes available. It also restricts signing only to tags, which correspond to official releases. (That mimics our traditional policy of not signing pre-release builds.)
Fix i386 transform fuzzer build Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55447
BUILDING.md: Specify install prefix for MinGW/Un*x The default install prefix when building under MinGW is chosen based on the needs of the official build system, which uses MSYS2 to generate Windows installer packages that install under c:\libjpeg-turbo-gcc[64]. However, attempting to configure the build with that install prefix on a Un*x machine causes a CMake error. Fixes libjpeg-turbo#641
Clean up the lossless JPEG feature - Rename jpeg_simple_lossless() to jpeg_enable_lossless() and modify the function so that it stores the lossless parameters directly in the Ss and Al fields of jpeg_compress_struct rather than using a scan script. - Move the cjpeg -lossless switch into "Switches for advanced users". - Document the libjpeg API and run-time features that are unavailable in lossless mode, and ensure that all parameters, functions, and switches related to unavailable features are ignored or generate errors in lossless mode. - Defer any action that depends on whether lossless mode is enabled until jpeg_start_compress()/jpeg_start_decompress() is called. - Document the purpose of the point transform value. - "Codec" stands for coder/decoder, so it is a bit awkward to say "lossless compression codec" and "lossless decompression codec". Use "lossless compressor" and "lossless decompressor" instead. - Restore backward API/ABI compatibility with libjpeg v6b: * Move the new 'lossless' field from the exposed jpeg_compress_struct and jpeg_decompress_struct structures into the opaque jpeg_comp_master and jpeg_decomp_master structures, and allocate the master structures in the body of jpeg_create_compress() and jpeg_create_decompress(). * Remove the new 'process' field from jpeg_compress_struct and jpeg_decompress_struct and replace it with the old 'progressive_mode' field and the new 'lossless' field. * Remove the new 'data_unit' field from jpeg_compress_struct and jpeg_decompress_struct and replace it with a locally-computed data unit variable. * Restore the names of macros and fields that refer to DCT blocks, and document that they have a different meaning in lossless mode. (Most of them aren't very meaningful in lossless mode anyhow.) * Remove the new alloc_darray() method from jpeg_memory_mgr and replace it with an internal macro that wraps the alloc_sarray() method. * Move the JDIFF* data types from jpeglib.h and jmorecfg.h into jpegint.h. * Remove the new 'codec' field from jpeg_compress_struct and jpeg_decompress_struct and instead reuse the existing internal coefficient control, forward/inverse DCT, and entropy encoding/decoding structures for lossless compression/decompression. * Repurpose existing error codes rather than introducing new ones. (The new JERR_BAD_RESTART and JWRN_MUST_DOWNSCALE codes remain, although JWRN_MUST_DOWNSCALE will probably be removed in libjpeg-turbo, since we have a different way of handling multiple data precisions.) - Automatically enable lossless mode when a scan script with parameters that are only valid for lossless mode is detected, and document the use of scan scripts to generate lossless JPEG images. - Move the sequential and shared Huffman routines back into jchuff.c and jdhuff.c, and document that those routines are shared with jclhuff.c and jdlhuff.c as well as with jcphuff.c and jdphuff.c. - Move MAX_DIFF_BITS from jchuff.h into jclhuff.c, the only place where it is used. - Move the predictor and scaler code into jclossls.c and jdlossls.c. - Streamline register usage in the [un]differencers (inspired by similar optimizations in the color [de]converters.) - Restructure the logic in a few places to reduce duplicated code. - Ensure that all lossless-specific code is guarded by C_LOSSLESS_SUPPORTED or D_LOSSLESS_SUPPORTED and that the library can be built successfully if either or both of those macros is undefined. - Remove all short forms of external names introduced by the lossless JPEG patch. (These will not be needed by libjpeg-turbo, so there is no use cleaning them up.) - Various wordsmithing, formatting, and punctuation tweaks - Eliminate various compiler warnings.
Lossless JPEG support: Add copyright attributions Referring to libjpeg-turbo#402 (comment) and libjpeg-turbo#402 (comment) Ken Murchison clarified that it was his intent to release the lossless JPEG patch under the IJG License and that adding his name to the copyright headers would be sufficient to acknowledge that any derivatives are based on his work.
PreviousNext