Merge branch 'main' into dev

This commit is contained in:
DRC
2024-09-04 08:38:13 -04:00
23 changed files with 51 additions and 61 deletions

View File

@@ -1396,7 +1396,7 @@ foreach(libtype ${TEST_LIBTYPES})
set(TESTORIG testorig12.jpg) set(TESTORIG testorig12.jpg)
set(MD5_JPEG_RGB_ISLOW 9d7369207c520d37f2c1cbfcb82b2964) set(MD5_JPEG_RGB_ISLOW 9d7369207c520d37f2c1cbfcb82b2964)
set(MD5_JPEG_RGB_ISLOW2 a00bd20d8ae49684640ef7177d2e0b64) set(MD5_JPEG_RGB_ISLOW2 e619791332a99813bdca9f56fd60f9f9)
set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0) set(MD5_PPM_RGB_ISLOW f3301d2219783b8b3d942b7239fa50c0)
set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4) set(MD5_JPEG_422_IFAST_OPT 7322e3bd2f127f7de4b40d4480ce60e4)
set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950) set(MD5_PPM_422_IFAST 79807fa552899e66a04708f533e16950)
@@ -1462,7 +1462,7 @@ foreach(libtype ${TEST_LIBTYPES})
set(TESTORIG testorig.jpg) set(TESTORIG testorig.jpg)
set(MD5_JPEG_RGB_ISLOW 1d44a406f61da743b5fd31c0a9abdca3) set(MD5_JPEG_RGB_ISLOW 1d44a406f61da743b5fd31c0a9abdca3)
set(MD5_JPEG_RGB_ISLOW2 31d121e57b6c2934c890a7fc7763bcd4) set(MD5_JPEG_RGB_ISLOW2 b811e5ad807beb9384e51ef6a47f715d)
set(MD5_PPM_RGB_ISLOW 00a257f5393fef8821f2b88ac7421291) set(MD5_PPM_RGB_ISLOW 00a257f5393fef8821f2b88ac7421291)
set(MD5_BMP_RGB_ISLOW_565 f07d2e75073e4bb10f6c6f4d36e2e3be) set(MD5_BMP_RGB_ISLOW_565 f07d2e75073e4bb10f6c6f4d36e2e3be)
set(MD5_BMP_RGB_ISLOW_565D 4cfa0928ef3e6bb626d7728c924cfda4) set(MD5_BMP_RGB_ISLOW_565D 4cfa0928ef3e6bb626d7728c924cfda4)
@@ -1556,7 +1556,7 @@ foreach(libtype ${TEST_LIBTYPES})
set_tests_properties(${djpeg}-${libtype}-rgb-islow-icc-cmp PROPERTIES set_tests_properties(${djpeg}-${libtype}-rgb-islow-icc-cmp PROPERTIES
DEPENDS ${djpeg}-${libtype}-rgb-islow) DEPENDS ${djpeg}-${libtype}-rgb-islow)
add_bittest(${jpegtran} icc "-copy;all;-icc;${TESTIMAGES}/test2.icc" add_bittest(${jpegtran} icc "-copy;all;-icc;${TESTIMAGES}/test3.icc"
${testout}_rgb_islow2.jpg ${testout}_rgb_islow.jpg ${testout}_rgb_islow2.jpg ${testout}_rgb_islow.jpg
${MD5_JPEG_RGB_ISLOW2} ${cjpeg}-${libtype}-rgb-islow) ${MD5_JPEG_RGB_ISLOW2} ${cjpeg}-${libtype}-rgb-islow)

View File

@@ -123,6 +123,10 @@ cropping regions to be unduly rejected when performing 90-degree rotation,
270-degree rotation, transposition, transverse transposition, or grayscale 270-degree rotation, transposition, transverse transposition, or grayscale
conversion. conversion.
8. Fixed an issue whereby the TurboJPEG lossless transformation function and
methods did not honor `TJXOPT_COPYNONE`/`TJTransform.OPT_COPYNONE` unless it
was specified for all lossless transforms.
3.0.3 3.0.3
===== =====

View File

@@ -329,7 +329,7 @@ $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
<dt><span class="memberNameLink"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()">getCompressedSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt> <dt><span class="memberNameLink"><a href="org/libjpegturbo/turbojpeg/TJCompressor.html#getCompressedSize()">getCompressedSize()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJCompressor.html" title="class in org.libjpegturbo.turbojpeg">TJCompressor</a></dt>
<dd> <dd>
<div class="block">Returns the size of the image (in bytes) generated by the most recent <div class="block">Returns the size of the image (in bytes) generated by the most recent
compress operation.</div> compression operation.</div>
</dd> </dd>
<dt><span class="memberNameLink"><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt> <dt><span class="memberNameLink"><a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html#getDenom()">getDenom()</a></span> - Method in class org.libjpegturbo.turbojpeg.<a href="org/libjpegturbo/turbojpeg/TJScalingFactor.html" title="class in org.libjpegturbo.turbojpeg">TJScalingFactor</a></dt>
<dd> <dd>

Binary file not shown.

View File

@@ -276,7 +276,7 @@ implements java.io.Closeable</pre>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCompressedSize()">getCompressedSize</a></span>()</code></th> <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCompressedSize()">getCompressedSize</a></span>()</code></th>
<td class="colLast"> <td class="colLast">
<div class="block">Returns the size of the image (in bytes) generated by the most recent <div class="block">Returns the size of the image (in bytes) generated by the most recent
compress operation.</div> compression operation.</div>
</td> </td>
</tr> </tr>
<tr id="i9" class="rowColor"> <tr id="i9" class="rowColor">
@@ -1025,11 +1025,11 @@ implements java.io.Closeable</pre>
<h4>getCompressedSize</h4> <h4>getCompressedSize</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getCompressedSize()</pre> <pre class="methodSignature">public&nbsp;int&nbsp;getCompressedSize()</pre>
<div class="block">Returns the size of the image (in bytes) generated by the most recent <div class="block">Returns the size of the image (in bytes) generated by the most recent
compress operation.</div> compression operation.</div>
<dl> <dl>
<dt><span class="returnLabel">Returns:</span></dt> <dt><span class="returnLabel">Returns:</span></dt>
<dd>the size of the image (in bytes) generated by the most recent <dd>the size of the image (in bytes) generated by the most recent
compress operation.</dd> compression operation.</dd>
</dl> </dl>
</li> </li>
</ul> </ul>

Binary file not shown.

Binary file not shown.

View File

@@ -711,10 +711,10 @@ public class TJCompressor implements Closeable {
/** /**
* Returns the size of the image (in bytes) generated by the most recent * Returns the size of the image (in bytes) generated by the most recent
* compress operation. * compression operation.
* *
* @return the size of the image (in bytes) generated by the most recent * @return the size of the image (in bytes) generated by the most recent
* compress operation. * compression operation.
*/ */
public int getCompressedSize() { public int getCompressedSize() {
return compressedSize; return compressedSize;

View File

@@ -2315,19 +2315,20 @@ jcopy_markers_setup(j_decompress_ptr srcinfo, JCOPY_OPTION option)
#ifdef SAVE_MARKERS_SUPPORTED #ifdef SAVE_MARKERS_SUPPORTED
int m; int m;
/* Save comments except under NONE option */ /* Save comments unless JCOPYOPT_NONE or JCOPYOPT_ICC specified */
if (option != JCOPYOPT_NONE && option != JCOPYOPT_ICC) { if (option != JCOPYOPT_NONE && option != JCOPYOPT_ICC) {
jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF); jpeg_save_markers(srcinfo, JPEG_COM, 0xFFFF);
} }
/* Save all types of APPn markers iff ALL option */ /* Save all APPn markers iff JCOPYOPT_ALL* specified ... */
if (option == JCOPYOPT_ALL || option == JCOPYOPT_ALL_EXCEPT_ICC) { if (option == JCOPYOPT_ALL || option == JCOPYOPT_ALL_EXCEPT_ICC) {
for (m = 0; m < 16; m++) { for (m = 0; m < 16; m++) {
/* ... except APP2 markers if JCOPYOPT_ALL_EXCEPT_ICC specified */
if (option == JCOPYOPT_ALL_EXCEPT_ICC && m == 2) if (option == JCOPYOPT_ALL_EXCEPT_ICC && m == 2)
continue; continue;
jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF); jpeg_save_markers(srcinfo, JPEG_APP0 + m, 0xFFFF);
} }
} }
/* Save only APP2 markers if ICC option selected */ /* Save only APP2 markers if JCOPYOPT_ICC specified */
if (option == JCOPYOPT_ICC) { if (option == JCOPYOPT_ICC) {
jpeg_save_markers(srcinfo, JPEG_APP0 + 2, 0xFFFF); jpeg_save_markers(srcinfo, JPEG_APP0 + 2, 0xFFFF);
} }
@@ -2347,12 +2348,22 @@ jcopy_markers_execute(j_decompress_ptr srcinfo, j_compress_ptr dstinfo,
{ {
jpeg_saved_marker_ptr marker; jpeg_saved_marker_ptr marker;
/* In the current implementation, we don't actually need to examine the
* option flag here; we just copy everything that got saved.
* But to avoid confusion, we do not output JFIF and Adobe APP14 markers
* if the encoder library already wrote one.
*/
for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) { for (marker = srcinfo->marker_list; marker != NULL; marker = marker->next) {
if (option == JCOPYOPT_NONE)
continue;
else if (option == JCOPYOPT_COMMENTS) {
if (marker->marker != JPEG_COM)
continue;
} else if (option == JCOPYOPT_ALL_EXCEPT_ICC) {
if (marker->marker == JPEG_APP0 + 2)
continue;
} else if (option == JCOPYOPT_ICC) {
if (marker->marker != JPEG_APP0 + 2)
continue;
}
/* To avoid confusion, we do not output JFIF and Adobe APP14 markers if the
* encoder library already wrote one.
*/
if (dstinfo->write_JFIF_header && if (dstinfo->write_JFIF_header &&
marker->marker == JPEG_APP0 && marker->marker == JPEG_APP0 &&
marker->data_length >= 5 && marker->data_length >= 5 &&

View File

@@ -20,7 +20,7 @@ runme()
} }
EXT=bmp EXT=bmp
IMAGES="vgl_5674_0098.${EXT} vgl_6434_0018a.${EXT} vgl_6548_0026a.${EXT} big_tree8.${EXT}" IMAGES="vgl_5674_0098.${EXT} vgl_6434_0018a.${EXT} vgl_6548_0026a.${EXT} shira_bird8.${EXT}"
IMGDIR=@CMAKE_SOURCE_DIR@/testimages IMGDIR=@CMAKE_SOURCE_DIR@/testimages
OUTDIR=`mktemp -d /tmp/__tjbenchtest_output.XXXXXX` OUTDIR=`mktemp -d /tmp/__tjbenchtest_output.XXXXXX`
EXEDIR=@CMAKE_BINARY_DIR@ EXEDIR=@CMAKE_BINARY_DIR@
@@ -64,12 +64,12 @@ while [ $# -gt 0 ]; do
# each downsampled dimension is an odd number or is evenly divisible by the MCU # each downsampled dimension is an odd number or is evenly divisible by the MCU
# width/height. This disagreement basically amounts to a round-off error, but # width/height. This disagreement basically amounts to a round-off error, but
# there is no easy way around it, so for now, we just test the only image that # there is no easy way around it, so for now, we just test the only image that
# works. (NOTE: big_tree8 does not suffer from the above issue, but it suffers # works. (NOTE: shira_bird8 does not suffer from the above issue, but it
# from an unrelated problem whereby the combination of tj3DecompressToYUV*() # suffers from an unrelated problem whereby the combination of
# and tj3DecodeYUV*() do not produce bitwise-identical results to # tj3DecompressToYUV*() and tj3DecodeYUV*() do not produce bitwise-identical
# tj3Decompress*() if decompression scaling is enabled. This latter phenomenon # results to tj3Decompress*() if decompression scaling is enabled. This latter
# is not yet fully understood but is also believed to be some sort of round-off # phenomenon is not yet fully understood but is also believed to be some sort
# error.) # of round-off error.)
IMAGES="vgl_6548_0026a.${EXT}" IMAGES="vgl_6548_0026a.${EXT}"
;; ;;
-alloc) -alloc)
@@ -110,7 +110,7 @@ while [ $# -gt 0 ]; do
PRECISION=$1 PRECISION=$1
if [ $PRECISION != 8 ]; then if [ $PRECISION != 8 ]; then
EXT=ppm EXT=ppm
IMAGES="big_building16.${EXT}" IMAGES="monkey16.${EXT}"
BMPARG= BMPARG=
fi fi
;; ;;
@@ -125,7 +125,7 @@ if [ $PRECISION = 8 -a "$YUVARG" = "" ]; then
IMAGES="vgl_6548_0026a.${EXT}" IMAGES="vgl_6548_0026a.${EXT}"
elif [ "$ENTROPYARG" = "-arithmetic" -o \ elif [ "$ENTROPYARG" = "-arithmetic" -o \
"$ENTROPYARG" = "-progressive-arithmetic" ]; then "$ENTROPYARG" = "-progressive-arithmetic" ]; then
IMAGES="big_tree8.${EXT}" IMAGES="shira_bird8.${EXT}"
fi fi
fi fi

View File

@@ -58,8 +58,8 @@ for precision in 8 12; do
RGBIMG=$IMGDIR/testorig.ppm RGBIMG=$IMGDIR/testorig.ppm
GRAYIMG=$IMGDIR/testorig.pgm GRAYIMG=$IMGDIR/testorig.pgm
else else
RGBIMG=$IMGDIR/big_building16.ppm RGBIMG=$IMGDIR/monkey16.ppm
GRAYIMG=$IMGDIR/big_building16.pgm GRAYIMG=$IMGDIR/monkey16.pgm
fi fi
for restartarg in "" "-r 1" "-r 1b"; do for restartarg in "" "-r 1" "-r 1b"; do
for ariarg in "" "-a"; do for ariarg in "" "-a"; do
@@ -151,8 +151,8 @@ for precision in {2..16}; do
RGBIMG=$IMGDIR/testorig.ppm RGBIMG=$IMGDIR/testorig.ppm
GRAYIMG=$IMGDIR/testorig.pgm GRAYIMG=$IMGDIR/testorig.pgm
else else
RGBIMG=$IMGDIR/big_building16.ppm RGBIMG=$IMGDIR/monkey16.ppm
GRAYIMG=$IMGDIR/big_building16.pgm GRAYIMG=$IMGDIR/monkey16.pgm
fi fi
for psv in {1..7}; do for psv in {1..7}; do
for pt in {0..15}; do for pt in {0..15}; do

View File

@@ -58,8 +58,8 @@ for precision in 8 12; do
RGBIMG=$IMGDIR/testorig.ppm RGBIMG=$IMGDIR/testorig.ppm
GRAYIMG=$IMGDIR/testorig.pgm GRAYIMG=$IMGDIR/testorig.pgm
else else
RGBIMG=$IMGDIR/big_building16.ppm RGBIMG=$IMGDIR/monkey16.ppm
GRAYIMG=$IMGDIR/big_building16.pgm GRAYIMG=$IMGDIR/monkey16.pgm
fi fi
for sampi in {0..6}; do for sampi in {0..6}; do
@@ -166,8 +166,8 @@ for precision in {2..16}; do
RGBIMG=$IMGDIR/testorig.ppm RGBIMG=$IMGDIR/testorig.ppm
GRAYIMG=$IMGDIR/testorig.pgm GRAYIMG=$IMGDIR/testorig.pgm
else else
RGBIMG=$IMGDIR/big_building16.ppm RGBIMG=$IMGDIR/monkey16.ppm
GRAYIMG=$IMGDIR/big_building16.pgm GRAYIMG=$IMGDIR/monkey16.pgm
fi fi
basename=`basename $RGBIMG .ppm` basename=`basename $RGBIMG .ppm`

View File

@@ -58,8 +58,8 @@ for precision in 8 12; do
RGBIMG=$IMGDIR/testorig.ppm RGBIMG=$IMGDIR/testorig.ppm
GRAYIMG=$IMGDIR/testorig.pgm GRAYIMG=$IMGDIR/testorig.pgm
else else
RGBIMG=$IMGDIR/big_building16.ppm RGBIMG=$IMGDIR/monkey16.ppm
GRAYIMG=$IMGDIR/big_building16.pgm GRAYIMG=$IMGDIR/monkey16.pgm
fi fi
for sampi in {0..6}; do for sampi in {0..6}; do

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -1,25 +0,0 @@
libjpeg-turbo note: This image was extracted from the 8-bit big_tree image.
The original can be downloaded at the link below.
The New Image Compression Test Set - Jan 2008
http://www.imagecompression.info/test_images
The images historically used for compression research (lena, barbra, pepper etc...) have outlived their useful life and its about time they become a part of history only. They are too small, come from data sources too old and are available in only 8-bit precision.
These images have been carefully selected to aid in image compression algorithm research and evaluation. These are photographic images chosen to come from a wide variety of sources and each one picked to stress different aspects of algorithms. Images are available in 8-bit, 16-bit and 16-bit linear variations, RGB and gray.
Images are available without any prohibitive copyright restrictions.
These images are (c) there respective owners. You are granted full redistribution and publication rights on these images provided:
1. The origin of the pictures must not be misrepresented; you must not claim that you took the original pictures. If you use, publish or redistribute them, an acknowledgment would be appreciated but is not required.
2. Altered versions must be plainly marked as such, and must not be misinterpreted as being the originals.
3. No payment is required for distribution this material, it must be available freely under the conditions stated here. That is, it is prohibited to sell the material.
4. This notice may not be removed or altered from any distribution.
Acknowledgments: A lot of people contributed a lot of time and effort in making this test set possible. Thanks to everyone who voiced their opinion in any of the discussions online. Thanks to Axel Becker, Thomas Richter and Niels Fröhling for their extensive help in picking images, running all the various tests etc... Thanks to Pete Fraser, Tony Story, Wayne J. Cosshall, David Coffin, Bruce Lindbloom and raw.fotosite.pl for the images which make up this set.
Sachin Garg [India]
sachingarg@c10n.info
www.sachingarg.com | www.c10n.info | www.imagecompression.info

BIN
testimages/monkey16.pgm Normal file

Binary file not shown.

BIN
testimages/monkey16.ppm Normal file

Binary file not shown.

BIN
testimages/shira_bird8.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

BIN
testimages/test3.icc Normal file

Binary file not shown.