libjpeg: Update to version 3.1.1
Commit Message
- Update from version 3.0.4 to 3.1.1
- Update of rootfile
- Changelog
3.1.1
Hardened the libjpeg API against hypothetical calling applications that may
erroneously change the value of the `data_precision` field in
`jpeg_compress_struct` or `jpeg_decompress_struct` after calling
`jpeg_start_compress()` or `jpeg_start_decompress()`.
3.1.0
Fixed an issue in the TurboJPEG API whereby, when generating a
lossless JPEG image with more than 8 bits per sample, specifying a point
transform value greater than 7 resulted in an error ("Parameter value out of
range") unless `TJPARAM_PRECISION`/`TJ.PARAM_PRECISION` was specified before
`TJPARAM_LOSSLESSPT`/`TJ.PARAM_LOSSLESSPT`.
Fixed a regression introduced by 1.4 beta1[3] that prevented
`jpeg_set_defaults()` from resetting the Huffman tables to default (baseline)
values if Huffman table optimization or progressive mode was previously enabled
in the same libjpeg instance.
Fixed an issue whereby lossless JPEG compression could not be disabled if it
was previously enabled in a libjpeg or TurboJPEG instance.
`jpeg_set_defaults()` now disables lossless JPEG compression in a libjpeg
instance, and setting `TJPARAM_LOSSLESS`/`TJ.PARAM_LOSSLESS` to `0` now
disables lossless JPEG compression in a TurboJPEG instance.
3.1 beta1
The libjpeg-turbo source tree has been reorganized to make it easier to find
the README files, license information, and build instructions. The
documentation for the libjpeg API library and associated programs has been
moved into the **doc/** subdirectory, all C source code and headers have been
moved into a new **src/** subdirectory, and test scripts have been moved into a
new **test/** subdirectory.
cjpeg no longer allows GIF input files to be converted into
12-bit-per-sample JPEG files. That was never a useful feature, since GIF
images have at most 256 colors referenced from a palette of 8-bit-per-component
RGB values.
Added support for lossless JPEG images with 2 to 15 bits per sample to the
libjpeg and TurboJPEG APIs. When creating or decompressing a lossless JPEG
image and when loading or saving a PBMPLUS image, functions/methods specific to
8-bit samples now handle 8-bit samples with 2 to 8 bits of data precision
(specified using the `data_precision` field in `jpeg_compress_struct` or
`jpeg_decompress_struct` or using `TJPARAM_PRECISION`/`TJ.PARAM_PRECISION`),
functions/methods specific to 12-bit samples now handle 12-bit samples with 9
to 12 bits of data precision, and functions/methods specific to 16-bit samples
now handle 16-bit samples with 13 to 16 bits of data precision. Refer to
[libjpeg.txt](doc/libjpeg.txt), [usage.txt](doc/usage.txt), and the TurboJPEG
API documentation for more details.
All deprecated constants and methods in the TurboJPEG Java API have been
removed.
TJBench command-line arguments are now more consistent with those of cjpeg,
djpeg, and jpegtran. More specifically:
- `-copynone` has been replaced with `-copy none`.
- `-fastdct` has been replaced with `-dct fast`.
- `-fastupsample` has been replaced with `-nosmooth`.
- `-hflip` and `-vflip` have been replaced with
`-flip {horizontal|vertical}`.
- `-limitscans` has been replaced with `-maxscans`, which allows the scan
limit to be specified.
- `-rgb`, `-bgr`, `-rgbx`, `-bgrx`, `-xbgr`, `-xrgb`, and `-cmyk` have
been replaced with `-pixelformat {rgb|bgr|rgbx|bgrx|xbgr|xrgb|cmyk}`.
- `-rot90`, `-rot180`, and `-rot270` have been replaced with
`-rotate {90|180|270}`.
- `-stoponwarning` has been replaced with `-strict`.
- British spellings for `gray` (`grey`) and `optimize` (`optimise`) are
now allowed.
The old command-line arguments are deprecated and will be removed in a
future release. TJBench command-line arguments can now be abbreviated as well.
(Where possible, the abbreviations are the same as those supported by cjpeg,
djpeg, and jpegtran.)
Added a new TJBench option (`-pixelformat gray`) that can be used to test
the performance of compressing/decompressing a grayscale JPEG image from/to a
packed-pixel grayscale image.
Fixed an issue whereby, if `TJPARAM_NOREALLOC` was set, TurboJPEG
compression and lossless transformation functions ignored the JPEG buffer
size(s) passed to them and assumed that the JPEG buffer(s) had been allocated
to a worst-case size returned by `tj3JPEGBufSize()`. This behavior was never
documented, although the documentation was unclear regarding whether the JPEG
buffer size should be specified if a JPEG buffer is pre-allocated to a
worst-case size.
The TurboJPEG C and Java APIs have been improved in the following ways:
- New image I/O methods (`TJCompressor.loadSourceImage()` and
`TJDecompressor.saveImage()`) have been added to the Java API. These methods
work similarly to the `tj3LoadImage*()` and `tj3SaveImage*()` functions in the
C API.
- The TurboJPEG lossless transformation function and methods now add
restart markers to all destination images if
`TJPARAM_RESTARTBLOCKS`/`TJ.PARAM_RESTARTBLOCKS` or
`TJPARAM_RESTARTROWS`/`TJ.PARAM_RESTARTROWS` is set.
- New functions/methods (`tj3SetICCProfile()` /
`TJCompressor.setICCProfile()` / `TJTransformer.setICCProfile()` and
`tj3GetICCProfile()` / `TJDecompressor.getICCProfile()`) can be used to embed
and retrieve ICC profiles.
- A new parameter (`TJPARAM_SAVEMARKERS`/`TJ.PARAM_SAVEMARKERS`) can be
used to specify the types of markers that will be copied from the source image
to the destination image during lossless transformation if
`TJXOPT_COPYNONE`/`TJTransform.OPT_COPYNONE` is not specified.
- A new convenience function/method (`tj3TransformBufSize()` /
`TJTransformer.bufSize()`) can be used to compute the worst-case destination
buffer size for a given lossless transform, taking into account cropping,
transposition of the width and height, grayscale conversion, and the embedded
or extracted ICC profile.
TJExample has been replaced with three programs (TJComp, TJDecomp, and
TJTran) that demonstrate how to approximate the functionality of cjpeg, djpeg,
and jpegtran using the TurboJPEG C and Java APIs.
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
---
config/rootfiles/common/libjpeg | 6 ++++--
lfs/libjpeg | 20 ++++++++++----------
2 files changed, 14 insertions(+), 12 deletions(-)
@@ -19,7 +19,7 @@ usr/lib/libjpeg.so.8
usr/lib/libjpeg.so.8.3.2
#usr/lib/libturbojpeg.so
usr/lib/libturbojpeg.so.0
-usr/lib/libturbojpeg.so.0.3.0
+usr/lib/libturbojpeg.so.0.4.0
#usr/lib/pkgconfig/libjpeg.pc
#usr/lib/pkgconfig/libturbojpeg.pc
#usr/share/doc/libjpeg-turbo
@@ -29,7 +29,9 @@ usr/lib/libturbojpeg.so.0.3.0
#usr/share/doc/libjpeg-turbo/example.c
#usr/share/doc/libjpeg-turbo/libjpeg.txt
#usr/share/doc/libjpeg-turbo/structure.txt
-#usr/share/doc/libjpeg-turbo/tjexample.c
+#usr/share/doc/libjpeg-turbo/tjcomp.c
+#usr/share/doc/libjpeg-turbo/tjdecomp.c
+#usr/share/doc/libjpeg-turbo/tjtran.c
#usr/share/doc/libjpeg-turbo/usage.txt
#usr/share/doc/libjpeg-turbo/wizard.txt
#usr/share/man/man1/cjpeg.1
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> #
+# Copyright (C) 2007-2025 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -24,7 +24,7 @@
include Config
-VER = 3.0.4
+VER = 3.1.1
THISAPP = libjpeg-turbo-$(VER)
DL_FILE = $(THISAPP).tar.gz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_BLAKE2 = cf951582ce7cdf0dce39075bb1cc58f6a61fa0bdaca4874a4f06a03d2cd11775bc626c8d391d4fc76574d302a781ba47e5c90e2aa2d6a21a8b8d06712437e241
+$(DL_FILE)_BLAKE2 = 813781b1c91ed132b2d1b6e3d7834673e202765362cc9e77a6e7d4a92e89c0192312405ae8197e1c306ad3c89e23cd6dc5e418bb9f3570f110014ab79f717401
install : $(TARGET)
@@ -72,13 +72,13 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && mkdir -pv build
cd $(DIR_APP)/build && cmake .. \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=RELEASE \
- -DENABLE_STATIC=FALSE \
- -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo \
- -DCMAKE_INSTALL_MANDIR=/usr/share/man \
- -DCMAKE_INSTALL_DEFAULT_LIBDIR=/usr/lib \
- -DWITH_JPEG8=1
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE=RELEASE \
+ -DENABLE_STATIC=FALSE \
+ -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/libjpeg-turbo \
+ -DCMAKE_INSTALL_MANDIR=/usr/share/man \
+ -DCMAKE_INSTALL_DEFAULT_LIBDIR=/usr/lib \
+ -DWITH_JPEG8=1
cd $(DIR_APP)/build && make $(MAKETUNING)
cd $(DIR_APP)/build && make install