|
460dfe40
|
2020-10-14T14:46:30
|
|
ChangeLog: Acknowledge 2.0.6 release
|
|
ae08115d
|
2020-10-15T10:25:46
|
|
Merge branch 'master' into dev
|
|
b5a14727
|
2020-10-15T10:22:51
|
|
Build: Fix permissions
|
|
190382b7
|
2020-10-14T15:14:26
|
|
ChangeLog: Fix minor formatting issue
|
|
8789a5e2
|
2020-10-01T21:27:47
|
|
Merge branch 'master' into dev
|
|
89c88c25
|
2020-10-01T21:24:27
|
|
ChangeLog.md: jpeg_crop_scanline(), not scanlines
|
|
2ec4a5eb
|
2020-10-01T19:18:44
|
|
Fix dec artifacts w/cropped+smoothed prog DC scans
This commit modifies decompress_smooth_data(), adding missing MCU column
offsets to the prev_block_row and next_block_row indices that are used
for block rows other than the first and last. Effectively, this
eliminates unexpected visual artifacts when using jpeg_crop_scanline()
along with interblock smoothing while decompressing the DC scan of a
progressive JPEG image.
Based on:
https://github.com/mo271/libjpeg-turbo/commit/0227d4fb484e6baf1565163211ee64e52e7b96bd
Fixes #456
Closes #457
|
|
1d7faf84
|
2020-10-01T18:17:46
|
|
Merge branch 'master' into dev
|
|
8e895c79
|
2020-10-01T18:13:35
|
|
Java dox: Fix errors w/ javadoc in Java 8 or later
|
|
2b121d39
|
2020-10-01T16:20:14
|
|
Merge branch 'master' into dev
|
|
2d14fc2e
|
2020-10-01T14:35:46
|
|
Dox: Re-generate using Doxygen 1.8.20
This fixes a GitHub Dependabot alert regarding jquery.js.
Fixes #421
|
|
6ab61fa1
|
2020-09-13T17:02:09
|
|
Merge branch 'master' into dev
|
|
fe5b6a1c
|
2020-09-13T16:58:08
|
|
TJPEG: Remove unnecessary setCompDefaults() retval
setCompDefaults() hasn't thrown an error since
aa7459050d7a50e1d8a99488902d41fbc118a50f was introduced in 2.0.x.
|
|
6ee5d5f5
|
2020-07-28T18:06:20
|
|
ARMv8 NEON: Support Windows builds w/AArch64 MinGW
Based on:
https://github.com/mstorsjo/libjpeg-turbo/commit/c5ef6659285a7d5bc74c679aa87ad187186cf7e1
Closes #438
|
|
fe79f56b
|
2020-07-28T15:09:00
|
|
Merge branch 'master' into dev
|
|
c1037f43
|
2020-07-28T14:57:47
|
|
Fix bad return val when skipping past end of image
Fixes #439
|
|
30282a87
|
2020-07-28T13:00:39
|
|
README.md, jquant2.c: Use gender-neutral pronouns
Closes #444
|
|
a46c111d
|
2020-07-27T14:21:23
|
|
Further jpeg_skip_scanlines() fixes
- Introduce a partial image decompression regression test script that
validates the correctness of jpeg_skip_scanlines() and
jpeg_crop_scanlines() for a variety of cropping regions and libjpeg
settings.
This regression test catches the following issues:
#182, fixed in 5bc43c7821df982f65aa1c738f67fbf7cba8bd69
#237, fixed in 6e95c08649794f5018608f37250026a45ead2db8
#244, fixed in 398c1e9acc9b4531edceb3d77da0de5744675052
#441, fully fixed in this commit
It does not catch the following issues:
#194, fixed in 773040f9d949d5f313caf7507abaf4bd5d7ffa12
#244 (additional segfault), fixed in
9120a247436e84c0b4eea828cb11e8f665fcde30
- Modify the libjpeg-turbo regression test suite (make test) so that it
checks for the issue reported in #441 (segfault in
jpeg_skip_scanlines() when used with 4:2:0 merged upsampling/color
conversion.)
- Fix issues in jpeg_skip_scanlines() that caused incorrect output with
h2v2 (4:2:0) merged upsampling/color conversion. The previous commit
fixed the segfault reported in #441, but that was a symptom of a
larger problem. Because merged 4:2:0 upsampling uses a "spare row"
buffer, it is necessary to allow the upsampler to run when skipping
rows (fancy 4:2:0 upsampling, which uses context rows, also requires
this.) Otherwise, if skipping starts at an odd-numbered row, the
output image will be incorrect.
- Throw an error if jpeg_skip_scanlines() is called with two-pass color
quantization enabled. With two-pass color quantization, the first
pass occurs within jpeg_start_decompress(), so subsequent calls to
jpeg_skip_scanlines() interfere with the multipass state and prevent
the second pass from occurring during subsequent calls to
jpeg_read_scanlines().
|
|
9120a247
|
2020-07-23T21:24:38
|
|
Fix jpeg_skip_scanlines() segfault w/merged upsamp
The additional segfault mentioned in #244 was due to the fact that
the merged upsamplers use a different private structure than the
non-merged upsamplers. jpeg_skip_scanlines() was assuming the latter, so
when merged upsampling was enabled, jpeg_skip_scanlines() clobbered one
of the IDCT method pointers in the merged upsampler's private structure.
For reasons unknown, the test image in #441 did not encounter this
segfault (too small?), but it encountered an issue similar to the one
fixed in 5bc43c7821df982f65aa1c738f67fbf7cba8bd69, whereby it was
necessary to set up a dummy postprocessing function in
read_and_discard_scanlines() when merged upsampling was enabled.
Failing to do so caused either a segfault in merged_2v_upsample() (due
to a NULL pointer being passed to jcopy_sample_rows()) or an error
("Corrupt JPEG data: premature end of data segment"), depending on the
number of scanlines skipped and whether the first scanline skipped was
an odd- or even-numbered row.
Fixes #441
Fixes #244 (for real this time)
|
|
c965dc7a
|
2020-07-22T13:59:27
|
|
ChangeLog.md: Add missing sub-header for 2.0.6
|
|
b9142b21
|
2020-07-22T13:24:51
|
|
Android: Fix "using JNI after critical get" errors
(again.)
Fixes #300
|
|
7d829bfa
|
2020-07-07T10:16:29
|
|
Bump version to 2.0.6 to prepare for new commits
|
|
fb6f5e8b
|
2020-06-25T21:31:11
|
|
Java/Mac:Remove obsolete libturbojpeg.jnilib alias
IIRC, this was only necessary with the version of Java 1.5 that shipped
with OS X 10.4 "Tiger". Apple's implementation of Java 6 ("Java for
OS X Systems") supported both .jnilib and .dylib extensions for JNI
libraries, but Oracle's implementation of Java has only ever supported
the .dylib extension.
|
|
c77783ed
|
2020-06-25T21:28:33
|
|
BUILDING.md: Undocument 32-bit Mac build/packaging
(oversight from previous commit)
|
|
4c5a15c3
|
2020-06-25T19:08:19
|
|
Eliminate 32-bit Mac build/packaging support
The scales have now tilted overwhelmingly in favor of eliminating
support for 32-bit Macs:
- 32-bit applications are only necessary in order to support OS X 10.5
"Leopard" and OS X 10.6 "Snow Leopard". OS X 10.7 "Lion" requires a
64-bit Mac and supports all 64-bit Macs.
- 32-bit applications are no longer allowed in the macOS App Store.
- 32-bit applications no longer run in macOS 10.15 "Catalina".
- 32-bit applications do not support thread-local storage, so the
TurboJPEG API library's global error handler is not thread-safe with
such applications.
- libjpeg-turbo 2.1.x no longer supports 32-bit iOS apps, so it makes
sense to also eliminate support for 32-bit macOS applications.
It's time.
|
|
b797f700
|
2020-06-25T19:05:45
|
|
Build: Eliminate Cygwin packaging support
We haven't provided official Cygwin builds since 1.4.x, since Cygwin
now supplies its own libjpeg-turbo packages (although they apparently
haven't been updated past 1.5.3.)
|
|
80d77720
|
2020-06-19T00:22:49
|
|
AppVeyor: We no longer build/package JNI JARs
This was done solely to support Java Web Start, which is now obsolete.
|
|
aecee256
|
2020-06-19T00:03:51
|
|
Merge branch 'master' into dev
|
|
ae87a958
|
2020-06-16T13:52:39
|
|
TurboJPEG: Make global error handling thread-safe
... on platforms that support thread-local storage. This currently
includes all supported platforms except 32-bit macOS.
Fixes #396
|
|
b443c541
|
2020-06-03T16:08:08
|
|
ChangeLog.md: Add missing sub-header for 2.0.5
|
|
cf483eee
|
2020-06-03T16:04:06
|
|
ChangeLog.md: List CVE ID fixed by previous commit
|
|
70040cb7
|
2020-06-02T15:05:43
|
|
Merge branch 'master' into dev
|
|
3de15e0c
|
2020-06-02T14:15:37
|
|
rdppm.c: Fix buf overrun caused by bad binary PPM
This extends the fix in 1e81b0c3ea26f4ea8f56de05367469333de64a9f to
include binary PPM files with maximum values < 255, thus preventing a
malformed binary PPM input file with those specifications from
triggering an overrun of the rescale array and potentially crashing
cjpeg, TJBench, or any program that uses the tjLoadImage() function.
Fixes #433
|
|
a2291b25
|
2020-05-05T14:38:39
|
|
Build: Add missing jpegtran-icc test dependency
The jpegtran-icc test must run after the cjpeg-rgb-islow test, since
the latter generates testout_rgb_islow.jpg.
|
|
219e8e8f
|
2020-04-02T22:26:19
|
|
Merge branch 'master' into dev
|
|
a36deef5
|
2020-04-02T22:23:02
|
|
rdswitch.c: Eliminate spaces before semicolons
(detected with a modified version of checkstyle)
|
|
b0f92a1d
|
2020-03-04T11:06:45
|
|
Merge branch 'master' into dev
|
|
8cc1277b
|
2020-02-24T13:29:50
|
|
TJCompressor.compress(int): Fix YUV-to-JPEG error
Due to an oversight, the TJCompressor.compress(int) method did not
handle YUV source images.
Fixes #413
|
|
77ff3bd6
|
2020-02-18T12:56:01
|
|
Merge branch 'master' into dev
|
|
ecf5f9a9
|
2020-02-18T10:43:23
|
|
Bump version to 2.0.5; Document previous commit
|
|
00d48d7e
|
2020-02-17T18:14:10
|
|
Merge branch 'master' into dev
|
|
035262a1
|
2020-02-17T18:03:10
|
|
MIPS DSPr2: Work around various 'make test' errors
Referring to #408, this commit #ifdefs DSPr2 SIMD functions that only
work on little endian processors, and it completely excludes
jsimd_h2v1_downsample_dspr2() and jsimd_h2v2_downsample_dspr2(). The
latter two functions fail with the TJBench tiling regression tests, most
likely because the implementation of the functions predates those tests.
|
|
ed7cab47
|
2020-02-17T16:35:00
|
|
MIPS DSPr2: Fix compiler warning with -mdspr2
If -mdspr2 is passed to the compiler, __mips_dsp will be defined, and
__mips_dsp_rev will be >= 2, so parse_proc_cpuinfo() will not be used.
|
|
42d679b9
|
2020-02-17T15:19:32
|
|
MIPS SIMD: Always honor JSIMD_FORCE* env vars
Previously, these environment variables were not honored unless a 74K
CPU was detected, but this detection doesn't work properly with QEMU's
user mode emulation. With all other CPU types, libjpeg-turbo honors
JSIMD_FORCE* regardless of CPU detection.
|
|
044c22e1
|
2020-02-17T13:41:26
|
|
Test: Honor CMAKE_CROSSCOMPILING_EMULATOR variable
This CMake variable is intended to define a wrapper program for
executing cross-compiled executables. However, CTest doesn't use
CMAKE_CROSSCOMPILING_EMULATOR, because it isn't obvious which tests
should be executed with the wrapper and which tests are scripts that
don't need it. This commit manually prepends
${CMAKE_CROSSCOMPILING_EMULATOR} to all unit test command lines that
execute a program built by the libjpeg-turbo build system. Thus, one
can set CMAKE_CROSSCOMPILING_EMULATOR in a CMake toolchain file to (for
instance) "qemu-{architecture} {qemu_arguments}") in order to execute
all eligible unit tests using QEMU.
|
|
9a2cf323
|
2020-02-11T13:41:43
|
|
Build: Enable separate iOS pkg/DMG w/ sim support
Refer to #406
|
|
6aabca86
|
2020-02-11T12:47:12
|
|
Merge branch 'master' into dev
|
|
70327296
|
2020-02-07T17:04:30
|
|
makemacpkg.in: Allow universal DMG w/o ARMv8 arch
(buglet)
|
|
379edfd8
|
2020-01-16T20:52:58
|
|
AppVeyor: Use Visual C++ 2015 instead of 2010
Visual C++ < 2015 is no longer under mainstream support, and Visual C++
2010 will not be supported at all after July of this year.
(https://docs.microsoft.com/en-us/visualstudio/releases/2019/servicing)
|
|
ada6ea51
|
2020-01-16T20:52:15
|
|
BUILDING.md: Update Visual C++ recommendations
|
|
167b5a80
|
2020-01-08T15:02:58
|
|
Merge branch 'master' into dev
|
|
f81833ae
|
2020-01-08T15:01:38
|
|
Remove more unnecessary NULL checks before free()
|
|
4c57ad47
|
2020-01-08T14:26:02
|
|
Merge branch 'master' into dev
|
|
00607ec2
|
2020-01-08T14:22:35
|
|
Eliminate unnecessary NULL checks before tjFree()
+ document that tjFree() accepts NULL pointers without complaint.
Effectively, it has had that behavior all along, but the API does not
guarantee that tjFree() will be implemented with free() behind the
scenes, so it's best to formalize the behavior.
|
|
04d3143a
|
2020-01-07T16:21:03
|
|
Merge branch 'master' into dev
|
|
fdf89033
|
2020-01-07T15:23:08
|
|
Eliminate unnecessary NULL checks before free()
This programming practice (which exists in other code bases as well)
is a by-product of having used early C compilers that did not properly
handle free(NULL). All modern compilers should properly handle that.
Fixes #398
|
|
b34c85ea
|
2019-12-31T01:20:12
|
|
Merge branch 'master' into dev
|
|
166e3421
|
2019-12-31T01:10:30
|
|
simd/arm64/jsimd_neon.S: Fix checkstyle issue
|
|
c4675d62
|
2019-12-31T00:42:53
|
|
Merge branch 'master' into dev
|
|
6367924a
|
2019-12-31T00:32:30
|
|
tjTransform(): Use instance err. for bad crop spec
Addresses a concern raised in #396
|
|
29f718ee
|
2019-12-31T00:06:11
|
|
README.md, package specs: Various tweaks
- Don't enumerate the types of SIMD instructions that libjpeg-turbo
supports, as this can change without notice.
- Use more clear terminology when describing support for libjpeg v7/v8
features ("libjpeg" is, colloquially but not officially, the name for
the IJG's software, whereas the "libjpeg API" refers to our emulation
of said software.)
- "PhotoShop" = "Photoshop" (StudLy Caps Police)
- Adjust dynamic library versions to reflect the addition of
jpeg_read_icc_profile() and jpeg_write_icc_profile() in
libjpeg-turbo 2.0.x.
|
|
fe50cd99
|
2019-12-30T23:52:34
|
|
djpeg.c: Fix compiler warning w/o mem. src manager
insize is only used when the in-memory source manager is compiled in.
|
|
b542e4c8
|
2019-12-20T13:18:23
|
|
ARMv8 SIMD: Support execute-only memory (XOM)
Move constants out of the .text section in simd/arm64/jsimd_neon.S and
into a .rodata section. This ensures that the ARMv8 NEON SIMD
extensions are compatible with memory layouts that are marked
execute-only (and thus unreadable.)
Based on:
https://github.com/ivanloz/libjpeg-turbo/commit/88f3ca7664fadfb5e106efecb7845753aaf330b7
Closes #318
|
|
80acd5c4
|
2019-12-19T10:20:52
|
|
Remove code for the obsolete RLE image format
libjpeg-turbo never included that code, because it requires an external
library (the Utah Raster Toolkit.) The RLE image format was supplanted
by GIF in the late 1980s, so it is rarely seen these days. (It had a
lousy Weissman score, anyhow.)
|
|
5000eaa3
|
2019-12-19T10:13:05
|
|
cdjpeg.c: Fix Visual C++ compiler warning
(introduced by previous commit)
|
|
e98b0612
|
2019-12-18T15:12:33
|
|
Add fault tolerance features to djpeg and jpegtran
- Enable progress reporting at run time using a new -report argument
(cjpeg now supports that argument as well)
- Limit the allowable number of scans using a new -maxscans argument
- Treat warnings as fatal using a new -strict argument
This mainly demonstrates how to work around the two issues with the
JPEG standard described here:
https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf
since those and similar issues continue to be erroneously reported as
libjpeg-turbo bugs.
|
|
54288598
|
2019-12-17T15:37:50
|
|
ChangeLog.md: Document 81b8c0ee
|
|
81b8c0ee
|
2019-12-17T14:18:35
|
|
Loongson MMI: Merge with MIPS64/add auto-detection
Modern Loongson processors are MIPS64-compatible, and MMI instructions
are now supported in the mainline of GCC. Thus, this commit adds
compile-time and run-time auto-detection of MMI instructions and moves
the MMI SIMD extensions for libjpeg-turbo from simd/loongson/ to
simd/mips64/. That will allow MMI and MSA instructions to co-exist
in the same build once #377 has been integrated.
Based on:
https://github.com/FlyGoat/libjpeg-turbo/commit/82953ddd61549428f58066f7eff0d60ce7429865
Closes #383
|
|
52fef349
|
2019-12-10T19:10:55
|
|
Eliminate internal use of GETJOCTET() macro
Because of 01e30323546d37792e4f682d78d58bb8b3e185ab (officially
eliminating support for compilers without unsigned char, since we never
effectively supported those compilers anyhow), GETJOCTET() is now a
no-op. Since that macro is in jmorecfg.h, it is part of the de facto
libjpeg API and must remain in the public headers. However, there is no
reason to continue using it internally, and eliminating its internal use
improves code readability.
|
|
e821464f
|
2018-04-03T12:47:54
|
|
ARM64 NEON SIMD impl. of prog. Huffman encoding
This commit adds ARM64 NEON optimizations for the
encode_mcu_AC_first() and encode_mcu_AC_refine() functions used in
progressive Huffman encoding.
Compression speedups for the typical set of five libjpeg-turbo test
images (https://libjpeg-turbo.org/About/Performance):
Cortex-A53: 23.8-39.2% (avg. 32.2%)
Cortex-A72: 26.8-41.1% (avg. 33.5%)
Apple A7: 29.7-45.9% (avg. 39.6%)
Closes #229
|
|
b8a7680e
|
2019-12-05T22:38:05
|
|
Merge branch 'master' into dev
|
|
52291467
|
2019-12-05T21:25:20
|
|
Travis: Use MacPorts instead of Homebrew
Homebrew tends to drop support for a macOS release the second that Apple
stops releasing security updates for it, and that makes HB difficult to
use with some of the Travis macOS images. Furthermore, even on
supported macOS releases, HB sometimes tries to build GCC from source
even if a binary (bottle) is available. Long story short, MacPorts just
generally has better backward compatibility. MacPorts is also what I
personally use on the official libjpeg-turbo build machine.
|
|
f64c5508
|
2019-12-05T15:39:28
|
|
Merge branch 'master' into dev
|
|
c76f4a08
|
2019-12-05T13:12:28
|
|
Huffman enc.: Fix very rare local buffer overrun
... detected by ASan. This is a similar issue to the issue that was
fixed with 402a715f82313384ef4606660c32d8678c79f197. Apparently it is
possible to create a malformed JPEG image that exceeds the Huffman
encoder's 256-byte local buffer when attempting to losslessly tranform
the image. That makes sense, given that it was necessary to extend the
Huffman decoder's local buffer to 512 bytes in order to handle all
pathological cases (refer to 0463f7c9aad060fcd56e98d025ce16185279e2bc.)
Since this issue affected only lossless transformation, a workflow that
isn't generally exposed to arbitrary data exploits, and since the
overrun did not overflow the stack (i.e. it did not result in a segfault
or other user-visible issue, and valgrind didn't even detect it), it did
not likely pose a security risk.
Fixes #392
|
|
26b4d62a
|
2019-11-15T13:57:56
|
|
Merge branch 'master' into dev
|
|
c0b16e3d
|
2019-11-15T13:29:11
|
|
TurboJPEG: Fix erroneous subsampling detection
... that caused some JPEG images with unusual sampling factors to be
misidentified as 4:4:4. This led to a buffer overflow when attempting
to decompress some such images using tjDecompressToYUV*().
Regression introduced by 479501b07c0afd8912a0e0f5b4740cfce9a89a4c
The correct behavior is for the TurboJPEG API to refuse to decompress
such images, which it did prior to the aforementioned commit.
Fixes #389
|
|
6cedf37c
|
2019-11-15T12:36:11
|
|
ChangeLog.md: List CVE IDs for specific fixes
|
|
9c6f79e9
|
2019-11-13T14:36:37
|
|
Fix formatting issues detected by checkstyle
|
|
f60b6dd3
|
2019-11-12T17:42:39
|
|
Remove vestigial jpeg_nbits_table.inc
Not needed since 087c29e07f7533ec82fd7eb1dafc84c29e7870ec
|
|
c43a5081
|
2019-11-12T17:07:46
|
|
Merge branch 'master' into dev
|
|
bd20344b
|
2019-11-12T15:45:20
|
|
tjDecompressToYUV*(): Fix OOB write/double free
... when attempting to decompress grayscale JPEG images with sampling
factors != 1.
Fixes #387
|
|
c30b1e72
|
2019-11-12T12:27:22
|
|
64-bit tjbench: Fix signed int overflow/segfault
... that occurred when attempting to decompress images with more than
715827882 (2048*1024*1024 / 3) pixels.
Fixes #388
|
|
713c451f
|
2019-11-08T14:53:55
|
|
Enable SSE2 progressive Huffman encoder for x32
Referring to #289, I'm not sure where I arrived at the conclusion that
the SSE2 progressive Huffman encoder doesn't provide any speedup for
x32. Upon re-testing, I discovered it to be about 50% faster than the
C encoder.
This commit also re-purposes one of the CI tests (specifically, the
jpeg-7 API/ABI test) so that it tests x32 as well.
|
|
2234deee
|
2019-11-08T13:51:34
|
|
Fix MSan use-of-uninitialized-value error
... introduced by 42825b68d570fb07fe820ac62ad91017e61e9a25. In fact,
fault-tolerant multi-scan block smoothing cannot currently be used with
the arithmetic decoder, because that decoder doesn't have any way of
distinguishing a normal end of scan from an unexpected end of scan.
Thus, this commit also modifies the change log to reset the expectations
regarding the scope of the fault-tolerant multi-scan block smoothing
feature. If, at some point in the future, the arithmetic decoder can be
modified to detect an unexpected end of scan, then one would need only
set entropy->pub.insufficient_data = TRUE when the arithmetic decoder
encounters an unexpected end of scan in order to make fault-tolerant
block smoothing work properly with that decoder.
|
|
82695cfd
|
2019-11-07T15:15:36
|
|
ChangeLog: Acknowledge 2.0.3/de-acknowledge 2.0.4
It is very unlikely that there will be an official 2.0.4 release.
|
|
42825b68
|
2019-11-07T14:03:23
|
|
Fault-tolerant multi-scan block smoothing
This commit modifies the behavior of the block smoothing algorithm in
the libjpeg API library so that, if a scan in a multi-scan JPEG image is
incomplete (due to premature termination of the image stream), the block
smoothing parameters from the previous (complete) scan are used to
smooth any iMCU rows that the incomplete scan does not contain.
Closes #343
|
|
f2d4b473
|
2019-11-07T02:13:09
|
|
Travis: Use Docker tag that matches Git branch
dcommander/buildljt:dev is a CentOS 6 container with YASM 1.2.0 rather
than NASM 2.10, so it can build the new optimized SSE2 Huffman encoder.
|
|
45dff48c
|
2019-11-06T23:02:03
|
|
Merge branch 'master' into dev
|
|
622c462e
|
2019-11-06T17:24:08
|
|
Fix copyright header formatting buglets
|
|
410c028f
|
2019-11-06T14:17:10
|
|
example.txt: Avoid undefined setjmp() behavior
Modifying a locally-defined non-volatile variable below the setjmp()
return point results in undefined behavior whereby the variable may not
have the expected value after setjmp() returns.
Fixes #379
|
|
d70047fc
|
2019-11-05T17:45:10
|
|
Travis: Use GCC 6 for Mac pre-release builds
The primary impetus for this is to eliminate build warnings, such as
(32-bit only)
section "__textcoal_nt" is deprecated
object file (XXXXXX.o) was built for newer OSX version (10.XX) than
being linked (10.5)
Upgrading to GCC 6 results in neutral performance for compression,
a measured average overall decompression speedup of 2.5% for 64-bit
code, and a measured average overall decompression speedup of -4.3% for
32-bit code on a 3 GHz Core i7. The 4.3% slow-down for 32-bit code is
deemed acceptable, given that 32-bit macOS apps are deprecated.
|
|
cbf0fcc8
|
2019-11-05T11:56:06
|
|
i386 SSE2 Huffman: Fix pointer arithmetic issue
Splitting the pointer arithmetic in GET_SYM() into a separate add and
sub instruction was an attempt to work around an error ("invalid operand
type") that occurred when assembling the file with NASM. However, this
created a link error on macOS ("ld: illegal text-relocation to
'_jconst_huff_encode_one_block' in
simd/CMakeFiles/simd.dir/i386/jchuff-sse2.asm.o from
'_jsimd_huff_encode_one_block_sse2' in
simd/CMakeFiles/simd.dir/i386/jchuff-sse2.asm.o for architecture i386")
and also changed the alignment of the code in ways that might have
affected the previous benchmark results (which took a great deal of time
to obtain.) Ultimately, the path of least resistance is just to
require NASM 2.13 or later.
|
|
bbedb4b5
|
2019-11-05T15:43:21
|
|
Merge branch 'master' into dev
|
|
cf54623b
|
2019-11-05T12:21:25
|
|
Mac: Support hiding SIMD fct symbols w/ NASM 2.14+
(NASM 2.14+ now supports the private_extern section directive, which was
previously only available with YASM.)
|
|
087c29e0
|
2018-10-22T10:05:18
|
|
Optimize Huffman encoding
This commit improves the C and SSE2 Huffman encoding implementations in
the following ways:
- Avoid using xmm8-xmm15 in the x86-64 SSE2 implementation. There is no
actual need to use those registers, and avoiding them produces a
cleaner WIN64 function entry/exit-- as well as shorter code, since REX
prefixes can be avoided (this is helpful on certain CPUs, such as
Intel Atom, for which instruction fetch and decoding can be a
bottleneck.)
- Optimize register usage so that fewer REX prefixes and
register-register moves are needed.
- Use the bit counter to store the number of free bits in the bit buffer
rather than the number of bits in the bit buffer. This changes the
method for inserting a code into the bit buffer to:
(put_buffer |= code << (free_bits -= code_size));
As a result:
* Only one bit counter needs to stay in a register (we just keep it in
cl.)
* The bit buffer contents are already properly aligned to be written
out (after a byte swap.)
* Adjusting the free bits counter and checking if the bit buffer is
full can be combined into a single operation.
* We can wait to flush the bit buffer until the buffer is actually
full and not just in danger of becoming full. Thus, eight bytes can
be flushed at a time.
- Speed is quite sensitive to the alignment of branch target labels, so
insert some padding and remove branches from the flush code.
(Flushing this way isn't actually faster when compared to using
branches, but the branchless code doesn't need extra alignment and is
thus smaller.)
- Speculatively write out the bit buffer as a single 8-byte write,
falling back to a byte-by-byte write only if there are any 0xFF bytes
in the bit buffer that need to be encoded as 0xFF 0x00.
- Use MMX registers for the 32-bit implementation (so the bit buffer can
be 64 bits wide.)
- Slightly reduce overall function code size.
- Eliminate or combine a few SSE instructions.
- Make some minor improvements to instruction scheduling.
- Adjust flush_bits() in jchuff.c to handle cases in which the bit
buffer has less than 7 free bits (apparently that couldn't happen
before.)
Based on:
https://github.com/1camper/libjpeg-turbo/commit/947a09defa2ec848322b1bae050d1b57b316a32a
https://github.com/1camper/libjpeg-turbo/commit/262ebb6b816fd8a49ff4d7185f6c5153dddde02f
https://github.com/1camper/libjpeg-turbo/commit/6e9a091221bb244c8ba232a942650e94254ffcf0
See change log for performance claims.
Closes #292
|
|
d92ae5df
|
2019-11-04T18:50:45
|
|
Merge branch 'master' into dev
|
|
ac59b2c5
|
2019-11-04T18:49:46
|
|
TJBench: Fix output with -componly -quiet
|
|
6902cdb1
|
2019-10-28T14:28:29
|
|
Build: Don't require ASM_NASM if !REQUIRE_SIMD
The build system is supposed to fall back to a non-SIMD build if
WITH_SIMD==1 but REQUIRE_SIMD==0.
Based on:
https://github.com/emlix/libjpeg-turbo/commit/972df912d08b755db3ca60d93b058a42e97a79eb
Closes #384
|
|
adf9cc94
|
2019-10-16T20:11:59
|
|
j*huff.c: Remove crufty ASSIGN_STATE() macro
This macro is a relic of libjpeg's historic need to support a wide
variety of C compilers with varying degrees of compatibility. Such was
necessary during the open systems era, because C compilers were often
supplied by the system vendor. Prior to 1989, there was no C standard
per se, and even after ANSI C became a thing, there were still compilers
in use that didn't conform to it (libjpeg was first released in 1991.)
Realistically, only a handful of C compilers are in widespread use these
days, and all modern C compilers should support structure assignment.
|
|
95f4d6ef
|
2019-10-24T02:13:23
|
|
Merge branch 'master' into dev
|