Skip to content

Commit fd56921

Browse files
committed
Merge commit '8162eddf041e0be26f5c671bb6528723c55fed9d'
* commit '8162eddf041e0be26f5c671bb6528723c55fed9d': (24 commits) Fix issues w/ partial img decompr + buf img mode Re-fix buf img mode decompr err w/short prog JPEGs jdcoefct.c: Fix signed/unsigned mismatch VC++ wrng Fix buf image mode decompr err w/ short prog JPEGs PowerPC: Detect AltiVec support on OS X tjDecompressHeader3(): Accept tables-only streams Fix build if UPSAMPLE_MERGING_SUPPORTED undefined Build: Don't enable Loongson MMI with MIPS R6+ MinGW: Fix str*casecmp() macro redef. warning OSS-Fuzz: '.' --> '_' in fuzzer suffix Don't install libturbojpeg.pc if WITH_TURBOJPEG=0 Fix non-SIMD alignment if void* bigger than double OSS-Fuzz: Allow fuzzer suffix to be specified CI: Un-integrate CIFuzz BUILDING.md: Generify PowerTools repo advice Build: Don't set DEFAULT_FLOATTEST for x86 MSVC Build/Win: Fix CMake warning when WITH_TURBOJPEG=0 Win: Fix build with Visual Studio 2010 Link Sponsor button to GitHub Sponsors ... example.txt: Fix a typo ...
2 parents a2d2907 + 8162edd commit fd56921

46 files changed

Lines changed: 274 additions & 230 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

BUILDING.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Build Requirements
2626
slashes rather than backslashes in the path (for example,
2727
**c:/nasm/nasm.exe**).
2828
* NASM and Yasm are located in the CRB (Code Ready Builder) repository on
29-
Red Hat Enterprise Linux 8 and in the PowerTools repository on CentOS 8,
30-
which is not enabled by default.
29+
Red Hat Enterprise Linux 8 and in the PowerTools repository on RHEL
30+
derivatives, which is not enabled by default.
3131

3232
### Un*x Platforms (including Linux, Mac, FreeBSD, Solaris, and Cygwin)
3333

@@ -97,6 +97,14 @@ Build Requirements
9797
* If using JDK 11 or later, CMake 3.10.x or later must also be used.
9898

9999

100+
Sub-Project Builds
101+
------------------
102+
103+
The libjpeg-turbo build system does not support being included as a sub-project
104+
using the CMake `add_subdirectory()` function. Use the CMake
105+
`ExternalProject_Add()` function instead.
106+
107+
100108
Out-of-Tree Builds
101109
------------------
102110

CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ if(CMAKE_EXECUTABLE_SUFFIX)
1010
endif()
1111

1212
project(mozjpeg C)
13-
set(VERSION 4.1.1)
13+
set(VERSION 4.1.2)
14+
set(COPYRIGHT_YEAR "1991-2022")
1415
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
1516
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
1617
list(GET VERSION_TRIPLET 1 VERSION_MINOR)
@@ -956,10 +957,8 @@ if(CPU_TYPE STREQUAL "x86_64" OR CPU_TYPE STREQUAL "i386")
956957
set(DEFAULT_FLOATTEST sse)
957958
elseif(CPU_TYPE STREQUAL "x86_64")
958959
set(DEFAULT_FLOATTEST no-fp-contract)
959-
elseif(CPU_TYPE STREQUAL "i386" AND MSVC)
960-
set(DEFAULT_FLOATTEST msvc)
961960
# else we can't really set an intelligent default for i386. The appropriate
962-
# value could be 387, no-fp-contract, or fp-contract, depending on the
961+
# value could be no-fp-contract, fp-contract, 387, or msvc, depending on the
963962
# compiler and compiler options. We leave it to the user to set FLOATTEST
964963
# manually.
965964
endif()
@@ -1510,8 +1509,11 @@ if(UNIX OR MINGW)
15101509
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1)
15111510
endif()
15121511
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libjpeg.pc
1513-
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc
15141512
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
1513+
if(WITH_TURBOJPEG)
1514+
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/libturbojpeg.pc
1515+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
1516+
endif()
15151517
install(FILES
15161518
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/${CMAKE_PROJECT_NAME}Config.cmake
15171519
${CMAKE_CURRENT_BINARY_DIR}/pkgscripts/${CMAKE_PROJECT_NAME}ConfigVersion.cmake

ChangeLog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
2.1.4
2+
=====
3+
4+
### Significant changes relative to 2.1.3
5+
6+
1. Fixed a regression introduced in 2.1.3 that caused build failures with
7+
Visual Studio 2010.
8+
9+
2. The `tjDecompressHeader3()` function in the TurboJPEG C API and the
10+
`TJDecompressor.setSourceImage()` method in the TurboJPEG Java API now accept
11+
"abbreviated table specification" (AKA "tables-only") datastreams, which can be
12+
used to prime the decompressor with quantization and Huffman tables that can be
13+
used when decompressing subsequent "abbreviated image" datastreams.
14+
15+
3. libjpeg-turbo now performs run-time detection of AltiVec instructions on
16+
OS X/PowerPC systems if AltiVec instructions are not enabled at compile time.
17+
This allows both AltiVec-equipped (PowerPC G4 and G5) and non-AltiVec-equipped
18+
(PowerPC G3) CPUs to be supported using the same build of libjpeg-turbo.
19+
20+
4. Fixed an error ("Bogus virtual array access") that occurred when attempting
21+
to decompress a progressive JPEG image with a height less than or equal to one
22+
iMCU (8 * the vertical sampling factor) using buffered-image mode with
23+
interblock smoothing enabled. This was a regression introduced by
24+
2.1 beta1[6(b)].
25+
26+
5. Fixed two issues that prevented partial image decompression from working
27+
properly with buffered-image mode:
28+
29+
- Attempting to call `jpeg_crop_scanline()` after
30+
`jpeg_start_decompress()` but before `jpeg_start_output()` resulted in an error
31+
("Improper call to JPEG library in state 207".)
32+
- Attempting to use `jpeg_skip_scanlines()` resulted in an error ("Bogus
33+
virtual array access") under certain circumstances.
34+
35+
136
2.1.3
237
=====
338

cjpeg.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@
3939
#include "jversion.h" /* for version message */
4040
#include "jconfigint.h"
4141

42-
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
43-
#ifdef __MWERKS__
44-
#include <SIOUX.h> /* Metrowerks needs this */
45-
#include <console.h> /* ... and this */
46-
#endif
47-
#ifdef THINK_C
48-
#include <console.h> /* Think declares it here */
49-
#endif
50-
#endif
51-
5242

5343
/* Create the add-on message string table. */
5444

@@ -743,11 +733,6 @@ main(int argc, char **argv)
743733
unsigned long outsize = 0;
744734
JDIMENSION num_scanlines;
745735

746-
/* On Mac, fetch a command line. */
747-
#ifdef USE_CCOMMAND
748-
argc = ccommand(&argv);
749-
#endif
750-
751736
progname = argv[0];
752737
if (progname == NULL || progname[0] == 0)
753738
progname = "cjpeg"; /* in case C library doesn't provide it */

cmakescripts/BuildPackages.cmake

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ configure_file(win/${INST_ID}/projectTargets-release.cmake.in
109109
if(WITH_JAVA)
110110
set(JAVA_DEPEND turbojpeg-java)
111111
endif()
112+
if(WITH_TURBOJPEG)
113+
set(TURBOJPEG_DEPEND turbojpeg turbojpeg-static tjbench)
114+
endif()
112115
add_custom_target(installer
113116
makensis -nocd ${INST_DEFS} installer.nsi
114-
DEPENDS jpeg jpeg-static turbojpeg turbojpeg-static rdjpgcom wrjpgcom
115-
cjpeg djpeg jpegtran tjbench ${JAVA_DEPEND}
117+
DEPENDS jpeg jpeg-static rdjpgcom wrjpgcom cjpeg djpeg jpegtran
118+
${JAVA_DEPEND} ${TURBOJPEG_DEPEND}
116119
SOURCES installer.nsi)
117120

118121
endif() # WIN32
@@ -159,7 +162,9 @@ add_custom_target(tarball pkgscripts/maketarball
159162

160163
configure_file(release/libjpeg.pc.in pkgscripts/libjpeg.pc @ONLY)
161164

162-
configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY)
165+
if(WITH_TURBOJPEG)
166+
configure_file(release/libturbojpeg.pc.in pkgscripts/libturbojpeg.pc @ONLY)
167+
endif()
163168

164169
include(CMakePackageConfigHelpers)
165170
write_basic_package_version_file(

djpeg.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,6 @@
3838

3939
#include <ctype.h> /* to declare isprint() */
4040

41-
#ifdef USE_CCOMMAND /* command-line reader for Macintosh */
42-
#ifdef __MWERKS__
43-
#include <SIOUX.h> /* Metrowerks needs this */
44-
#include <console.h> /* ... and this */
45-
#endif
46-
#ifdef THINK_C
47-
#include <console.h> /* Think declares it here */
48-
#endif
49-
#endif
50-
5141

5242
/* Create the add-on message string table. */
5343

@@ -550,11 +540,6 @@ main(int argc, char **argv)
550540
#endif
551541
JDIMENSION num_scanlines;
552542

553-
/* On Mac, fetch a command line. */
554-
#ifdef USE_CCOMMAND
555-
argc = ccommand(&argv);
556-
#endif
557-
558543
progname = argv[0];
559544
if (progname == NULL || progname[0] == 0)
560545
progname = "djpeg"; /* in case C library doesn't provide it */

doc/html/annotated.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<tr style="height: 56px;">
2424
<td id="projectalign" style="padding-left: 0.5em;">
2525
<div id="projectname">TurboJPEG
26-
&#160;<span id="projectnumber">2.1</span>
26+
&#160;<span id="projectnumber">2.1.4</span>
2727
</div>
2828
</td>
2929
</tr>

doc/html/classes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<tr style="height: 56px;">
2424
<td id="projectalign" style="padding-left: 0.5em;">
2525
<div id="projectname">TurboJPEG
26-
&#160;<span id="projectnumber">2.1</span>
26+
&#160;<span id="projectnumber">2.1.4</span>
2727
</div>
2828
</td>
2929
</tr>

doc/html/functions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<tr style="height: 56px;">
2424
<td id="projectalign" style="padding-left: 0.5em;">
2525
<div id="projectname">TurboJPEG
26-
&#160;<span id="projectnumber">2.1</span>
26+
&#160;<span id="projectnumber">2.1.4</span>
2727
</div>
2828
</td>
2929
</tr>

doc/html/functions_vars.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<tr style="height: 56px;">
2424
<td id="projectalign" style="padding-left: 0.5em;">
2525
<div id="projectname">TurboJPEG
26-
&#160;<span id="projectnumber">2.1</span>
26+
&#160;<span id="projectnumber">2.1.4</span>
2727
</div>
2828
</td>
2929
</tr>

0 commit comments

Comments
 (0)