Log

Author Commit Date CI Message
DRC 1c839761 2020-11-24T18:51:16 Force Git to treat testorig.ppm as a binary file Otherwise, because the file begins with an ASCII header, Git will erroneously treat is as an ASCII file, and if Git for Windows is configured with default options (specifically, "Checkout windows-style, commit Unix-style line endings"), it will add carriage return characters to all of the "linefeed" characters in the PPM file, thus corrupting it and causing libjpeg-turbo's regression tests to fail.
DRC 6d2e8837 2020-11-18T13:25:06 jpeg_skip_scanlines(): Avoid NULL + 0 UBSan error This error occurs at the call to (*cinfo->cconvert->color_convert)() in sep_upsample() whenever cinfo->upsample->need_context_rows == TRUE (i.e. whenever h2v2 or h1v2 fancy upsampling is used.) The error is innocuous, since (*cinfo->cconvert->color_convert)() points to a dummy function (noop_convert()) in that case. Fixes #470
DRC f7c54892 2020-11-18T10:11:21 Travis: Add /opt/local/bin to PATH for Mac build (oversight from previous commit) macports-ci does this, and it's necessary in order for the build script to find md5sum.
DRC 10ba6ed3 2020-11-16T17:30:37 Travis: Install MacPorts without using macports-ci
DRC 88bf1d16 2020-11-16T14:38:15 Build: Set FLOATTEST more intelligently The "32bit" vs. "64bit" floating point test results actually have nothing to do with the FPU. That was a fallacious assumption based on the observation that, with multiple CPU types, 32-bit and 64-bit builds produce different floating point test results. It seems that this is, in fact, due to differing compiler behavior-- more specifically, whether fused multiply-add (FMA) instructions are used to combine multiple floating point operations into a single instruction ("floating point expression contraction".) GCC does this by default if the target supports FMA instructions, which PowerPC and AArch64 targets both do. Fixes #468
DRC 42f7c78f 2020-11-13T15:18:35 BUILDING.md: Use min. iOS v8 in iOS Armv8 example This is necessary in order to enable thread-local storage.
DRC 3e9e7c70 2020-11-11T17:54:06 Fix build if WITH_12BIT==1 && WITH_JPEG(7|8)==1 Fixes #466
DRC 02227e48 2020-11-09T16:31:49 Travis: Combine PPC/Arm tests with jpeg-7/8 tests There is no reason not to, since the jpeg-7 and jpeg-8 API/ABI tests do not exercise the SIMD extensions any differently than the other tests.
DRC 40557b23 2020-11-06T18:51:55 Build: Fix test failures w/ Arm Neon SIMD exts Regression caused by a46c111d9f3642f0ef3819e7298846ccc61869e0 Because of 7723d7f7d0aa40349d5bdd1fbe4f8631fd5a2b57, which was introduced in libjpeg-turbo 1.5.1 in response to #81, merged upsampling/ color conversion is disabled on platforms that have SIMD-accelerated YCbCr -> RGB color conversion but not SIMD-accelerated merged upsampling/color conversion. This was intended to improve performance with the Neon SIMD extensions, since those are the only SIMD extensions for which those circumstances apply. Under normal circumstances, the separate "plain" (non-fancy) upsampling and color conversion routines will produce bitwise-identical output to the merged upsampling/color conversion routines, but that is not the case when skipping scanlines starting at an odd-numbered scanline. The modified test introduced in a46c111d9f3642f0ef3819e7298846ccc61869e0 does precisely that in order to validate the fixes introduced in 9120a247436e84c0b4eea828cb11e8f665fcde30 and a46c111d9f3642f0ef3819e7298846ccc61869e0. Because of 7723d7f7d0aa40349d5bdd1fbe4f8631fd5a2b57, the segfault fixed in 9120a247436e84c0b4eea828cb11e8f665fcde30 and a46c111d9f3642f0ef3819e7298846ccc61869e0 didn't affect the Neon SIMD extensions, so this commit effectively reverts the test modifications in a46c111d9f3642f0ef3819e7298846ccc61869e0 when using those SIMD extensions. We can get rid of this hack, as well as 7723d7f7d0aa40349d5bdd1fbe4f8631fd5a2b57, once a Neon implementation of merged upsampling/color conversion is available.
DRC a524b9b0 2020-11-06T17:24:16 Travis: Regression-test Armv8 and PPC SIMD exts Currently this only tests the 64-bit code paths, but it's better than nothing.
DRC 6e632af9 2020-11-04T10:13:06 Demote "fast" [I]DCT algorithms to legacy status - Refer to the "slow" [I]DCT algorithms as "accurate" instead, since they are not slow under libjpeg-turbo. - Adjust documentation claims to reflect the fact that the "slow" and "fast" algorithms produce about the same performance on AVX2-equipped CPUs (because of the dual-lane nature of AVX2, it was not possible to accelerate the "fast" algorithm beyond what was achievable with SSE2.) Also adjust the claims to reflect the fact that the "fast" algorithm tends to be ~5-15% faster than the "slow" algorithm on non-AVX2-equipped CPUs, regardless of the use of the libjpeg-turbo SIMD extensions. - Indicate the legacy status of the "fast" and float algorithms in the documentation and cjpeg/djpeg usage info. - Remove obsolete paragraph in the djpeg man page that suggested that the float algorithm could be faster than the "fast" algorithm on some CPUs.
DRC c3bfbde2 2020-10-27T15:36:19 jpegtran.c: "subarea" = "region" It is our convention to use the term "region" when referring to crop specs, since this is more consistent with the terminology used by the rest of the image processing community.
DRC a8656d70 2020-10-27T15:35:21 jpegtran.1: Minor formatting tweak
DRC 9ecb67c2 2020-10-27T15:32:46 transupp.c: Code formatting tweaks
DRC 53c685b7 2020-10-27T15:16:13 cdjpeg.h: Remove unused function stub enable_signal_catcher() was only needed with libjpeg's temp. file memory manager (jmemname.c), which libjpeg-turbo has never supported.
DRC d27b935a 2020-10-27T15:04:39 Consistify formatting to simplify checkstyle The checkstyle script was hastily developed prior to libjpeg-turbo 2.0 beta1, so it has a lot of exceptions and is thus prone to false negatives. This commit eliminates some of those exceptions.
DRC 26e3aedb 2020-10-22T23:04:24 README.ijg: Update URLs; remove Usenet info
DRC b4525f9f 2020-10-19T22:05:09 jversion.h: Update copyrights
DRC f7ca3c5a 2020-10-19T15:34:03 Build: Improve Arm 32-bit cross-comp./packaging - Set CPU_TYPE=arm if performing a 32-bit build on an AArch64 system. This eliminates the need to use a CMake toolchain file. - Set RPMARCH=armv7hl if building on a 32-bit Arm system with an FPU. - Set RPMARCH=armv7hl and DEBARCH=armhf if performing a 32-bit build using a gnueabihf toolchain. - If performing a 32-bit Arm build, generate a 32-bit supplementary DEB package for AArch64 systems.
DRC 1ed312ea 2020-10-15T17:47:31 "ARM"="Arm", "NEON"="Neon" Refer to: https://www.arm.com/company/policies/trademarks/arm-trademark-list/arm-trademark https://www.arm.com/company/policies/trademarks/arm-trademark-list/neon-trademark NOTE: These changes are only applied to change log entries for 2.0.x and later, since the change log is a historical record and Arm's new trademark policy did not go into effect until late 2017.
DRC b5a14727 2020-10-15T10:22:51 Build: Fix permissions
DRC 190382b7 2020-10-14T15:14:26 ChangeLog: Fix minor formatting issue
DRC 89c88c25 2020-10-01T21:24:27 ChangeLog.md: jpeg_crop_scanline(), not scanlines
DRC 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
DRC 8e895c79 2020-10-01T18:13:35 Java dox: Fix errors w/ javadoc in Java 8 or later
DRC 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
DRC 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.
DRC 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
DRC c1037f43 2020-07-28T14:57:47 Fix bad return val when skipping past end of image Fixes #439
DRC 30282a87 2020-07-28T13:00:39 README.md, jquant2.c: Use gender-neutral pronouns Closes #444
DRC 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().
DRC 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)
DRC c965dc7a 2020-07-22T13:59:27 ChangeLog.md: Add missing sub-header for 2.0.6
DRC b9142b21 2020-07-22T13:24:51 Android: Fix "using JNI after critical get" errors (again.) Fixes #300
DRC 7d829bfa 2020-07-07T10:16:29 Bump version to 2.0.6 to prepare for new commits
DRC 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
DRC b443c541 2020-06-03T16:08:08 ChangeLog.md: Add missing sub-header for 2.0.5
DRC cf483eee 2020-06-03T16:04:06 ChangeLog.md: List CVE ID fixed by previous commit
DRC 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
Andrew Childs 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.
DRC a36deef5 2020-04-02T22:23:02 rdswitch.c: Eliminate spaces before semicolons (detected with a modified version of checkstyle)
DRC 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
DRC ecf5f9a9 2020-02-18T10:43:23 Bump version to 2.0.5; Document previous commit
DRC 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.
DRC 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.
DRC 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.
DRC 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.
DRC 70327296 2020-02-07T17:04:30 makemacpkg.in: Allow universal DMG w/o ARMv8 arch (buglet)
DRC f81833ae 2020-01-08T15:01:38 Remove more unnecessary NULL checks before free()
DRC 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.
DRC 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
DRC 166e3421 2019-12-31T01:10:30 simd/arm64/jsimd_neon.S: Fix checkstyle issue
DRC 6367924a 2019-12-31T00:32:30 tjTransform(): Use instance err. for bad crop spec Addresses a concern raised in #396
DRC 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.
DRC 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.
DRC 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
DRC 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.
DRC 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
DRC 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
DRC 6cedf37c 2019-11-15T12:36:11 ChangeLog.md: List CVE IDs for specific fixes
DRC 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
DRC 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
DRC 622c462e 2019-11-06T17:24:08 Fix copyright header formatting buglets
DRC 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
DRC 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.)
DRC ac59b2c5 2019-11-04T18:49:46 TJBench: Fix output with -componly -quiet
DRC 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
DRC 55de9720 2019-10-24T01:50:35 AppVeyor: Use MinGW-builds instead of MSYS2 MinGW ... to avoid backward compatibility issues with GCC 4-6 MinGW toolchains. Apparently GCC 7+ MinGW toolchains introduce a link-time dependency with internal MinGW CRT functions that are meant to provide compatibility with Microsoft's Universal CRT (ucrt) library, but those internal functions are not available in GCC 4-6 MinGW toolchains. This made it impossible to use the official builds of libjpeg.a and libturbojpeg.a with GCC 4-6 MinGW toolchains (a fatal link error-- "undefined reference to '__imp___acrt_iob_func'"-- occurred.) This problem was not immediately apparent after switching to the MSYS2 implementation of MinGW (d6d7b539682abb50b04207abd21726573c0fb845) because, for a while, MSYS2 was still using GCC 5 and 6. Refer to libjpeg-turbo/libjpeg-turbo#382
DRC 708f013f 2019-10-22T20:08:57 Win packaging: Fix 64-bit VC/GCC co-install issue
DRC 163f0b19 2019-10-22T19:39:38 Bump version to 2.0.4 to prepare for new commits
DRC 3a32d199 2019-10-17T19:59:01 x86 SIMD: Consistify capitalization of NASM types byte, word, dword, qword, oword, and yword are all assembler keywords, so it makes sense to use lowercase for these so as not to mistake them for macros or constants.
DRC 9a51a87a 2019-10-17T11:21:32 x86 SIMD: Remove obsolete [TAB8] comments With apologies to Richard Hendricks, our assembly code no longer uses tabs.
DRC 74aeaddf 2019-10-16T21:16:43 jc*huff.c: Consistify preproc directive formatting The rest of the libjpeg API code uses "#if defined(condition)" rather than "#if defined condition".
DRC ab6c4a5d 2019-10-04T15:02:18 Travis: Fix macOS build Java 6 has moved to homebrew/cask-versions.
DRC ec4cacc1 2019-10-02T16:35:17 BUILDING.md: Document need for CRB/PowerTools repo NASM and YASM are located in this non-default repository on (respectively) RHEL and CentOS.
DRC 5db6a681 2019-08-30T12:02:50 README.md: Document memory debugger pitfalls (more specifically, the need to disable libjpeg-turbo's SIMD extensions when testing with valgrind, MSan, etc.) Addresses a concern expressed in #365
DRC f448279b 2019-08-30T11:15:47 README.md: Remove vestigial autotools references
DRC ded5a504 2019-08-15T13:24:25 tjDecodeYUV*: Fix err if TJ inst used for prog dec If the TurboJPEG instance passed to tjDecodeYUV[Planes]() was previously used to decompress a progressive JPEG image, then we need to disable the progressive decompression parameters in the underlying libjpeg instance before calling jinit_master_decompress(). This commit also modifies the build system so that the "tjtest" target will test for this issue, and it corrects a previous oversight in the build system whereby tjbenchtest did not test progressive compression/decompression unless WITH_JAVA was true.
DRC c0d0fe86 2019-08-14T22:08:44 ChangeLog.md: Wordsmithing
DRC a81a8c13 2019-08-14T13:17:11 SSE2 SIMD: Fix prog Huffman enc. error if Sl%16==0 (regression introduced by 5b177b3cab5cfb661256c1e74df160158ec6c34e) The SSE2 implementation of progressive Huffman encoding performed extraneous iterations when the scan length was a multiple of 16. Based on: https://github.com/rouault/libjpeg-turbo/commit/bb7f1ef98305da915e581b59bd0ec2ef7bdb8468 Fixes #335 Closes #367
DRC 02f7bcdb 2019-08-13T16:03:48 Travis: Enable additional sanitizer tests - Re-purpose the non-SIMD test to test with MSan as well. - Re-purpose the ASan test to test with UBSan as well. - Use the default Travis build environment rather than specifying Ubuntu 14.04. I think I added 'dist: trusty' back when 14.04 was newer than the default, but now it's older than the default. - Enable verbose output for any unit tests that fail (so we can see the sanitizer output.)
DRC 5ced1f59 2019-07-18T14:25:25 Travis: Cache Homebrew downloads ... to speed up the Mac CI builds.
DRC b98ee192 2019-07-18T14:14:47 Travis: Update Homebrew/fix Mac CI build Updating Homebrew wasn't necessary when the CI build first started using the xcode8.3 image (see c8e52741fdb623698a27a4c55cf63db93c95aa14), but apparently it now is.
DRC ad8330af 2019-07-12T17:28:55 TJBench.java: Remove space in method invocation (to make checkstyle happy)
DRC b25adabc 2019-07-12T17:27:37 tjbench.c: Fix minor code formatting errors (introduced by 2a9e3bd7430cfda1bc812d139e0609c6aca0b884)
DRC 875e873f 2019-07-11T17:05:15 tjutil.c: Fix compiler warning with Visual Studio Apparently windows.h includes stdlib.h, which defines the max() and min() macros, so we need to ensure that tjutil.h is included after that.
DRC 2a9e3bd7 2019-07-11T15:30:04 TurboJPEG: Properly handle gigapixel images Prevent several integer overflow issues and subsequent segfaults that occurred when attempting to compress or decompress gigapixel images with the TurboJPEG API: - Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid integer overflow when computing the return values and to return an error if such an overflow is unavoidable. - Modify tjunittest to validate the above. - Modify tjCompress2(), tjEncodeYUVPlanes(), tjDecompress2(), and tjDecodeYUVPlanes() to avoid integer overflow when computing the row pointers in the 64-bit TurboJPEG C API. - Modify TJBench (both C and Java versions) to avoid overflowing the size argument to malloc()/new and to fail gracefully if such an overflow is unavoidable. In general, this allows gigapixel images to be accommodated by the 64-bit TurboJPEG C API when using automatic JPEG buffer (re)allocation. Such images cannot currently be accommodated without automatic JPEG buffer (re)allocation, due to the fact that tjAlloc() accepts a 32-bit integer argument (oops.) Such images cannot be accommodated in the TurboJPEG Java API due to the fact that Java always uses a signed 32-bit integer as an array index. Fixes #361
DRC f37b7c1f 2019-07-02T11:28:26 Build: Fix build/install with Xcode IDE Closes #355
Jonathan Wright 509c2680 2019-05-09T13:46:53 Use bias pattern for 4:4:0 (h1v2) fancy upsampling This commit modifies h1v2_fancy_upsample() so that it uses an ordered dither pattern, similar to that of h2v1_fancy_upsample(), rounding up or down the result for alternate pixels rather than always rounding down. This ensures that the decompression error pattern for a 4:4:0 JPEG image will be similar to the rotated decompression error pattern for a 4:2:2 JPEG image. Thus, the final result will be similar regardless of whether a 4:2:2 JPEG image is rotated or transposed before or after decompression. Closes #356
DRC ec5adb83 2019-05-18T17:58:50 Build/packaging: Support macOS package/DMG signing
DRC c8e52741 2019-05-09T09:11:09 Travis: Use xcode8.3 image xcode7.3 is based on El Capitan, which is EOL, and Homebrew no longer provides El Cap bottles (pre-compiled binaries.) Thus, Homebrew was trying to build GCC 5, YASM, and the other packages we need from source, which caused the Mac CI builds to time out. I tried goading Homebrew into installing GCC 5.5.0_2 and YASM 1.3.0_1, which still have El Cap bottles available, by using the URLs of those specific versions of the formulae (from the Homebrew GitHub repository) as package names. This failed, however, because 'brew bundle' converted the URLs to all lowercase. I then tried explicitly installing the old formulae by using 'brew install' with the aforementioned URLs (bypassing the Travis Homebrew addon), but Homebrew still tried to build all of the dependencies from source. Upgrading to Xcode 8.3.x necessitated regression testing the performance on iOS, but that proved less of a pain than figuring out how to install all of the old Homebrew bottles we needed. Also, this future-proofs the CI builds against the inevitable discontinuation of the xcode7.3 image. Note that Xcode 8.3.x improves iOS 64-bit decompression performance significantly relative to Xcode 7.2.x or 7.3.x. iOS 32-bit performance unfortunately regresses by as much as 5%, but it can't be helped (32-bit iOS apps are no longer supported on iOS 11+ anyhow, and the next major release of libjpeg-turbo will remove support for them as well.)
DRC 6399d0a6 2019-04-23T14:10:04 Fix code formatting/style issues ... ... including, but not limited to: - unused macros - private functions not marked as static - unprototyped global functions - variable shadowing (detected by various non-default GCC 8 warning options)
Chris Blume aa9db616 2019-04-15T17:55:47 x86 SIMD: Check for CPUID leaf 07H before using According to Intel's manual [1], "If a value entered for CPUID.EAX is higher than the maximum input value for basic or extended function for that processor then the data for the highest basic information leaf is returned." Right now, libjpeg-turbo doesn't first check that leaf 07H is supported before attempting to use it, so the ostensible AVX2 bit (Bit 05) of the CPUID result might actually be Bit 05 from a lower leaf. That bit might be set, even if the CPU doesn't support AVX2. This commit modifies the x86 and x86-64 SIMD feature detection code so that it first checks whether CPUID leaf 07H is supported before attempting to use it to check for AVX2 instruction support. DRC: This commit should fix https://bugzilla.mozilla.org/show_bug.cgi?id=1520760 However, I have not personally been able to reproduce that issue, despite using a Nehalem (pre-AVX2) CPU on which the maximum CPUID leaf has been limited via a BIOS setting. Closes #348 [1] "IntelĀ® 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (2A, 2B, 2C & 2D): Instruction Set Reference, A-Z", https://software.intel.com/sites/default/files/managed/a4/60/325383-sdm-vol-2abcd.pdf, page 3-192.
DRC 2b05d47b 2019-04-15T13:38:15 ChangeLog.md: Document 33011754
DRC 7bc9fca4 2019-04-12T09:07:35 jdhuff.c: Silence UBSan signed int overflow err #2 Same as d3a3a73f64041c6a6905faf6f9f9832e735fd880 but in the fast decode path. It was necessary to use a different-sized test image in order to trigger the error in this location. Refer to #347
DRC bb16b944 2019-04-12T08:53:45 GitHub: Remove new lines from feature-request.md (to make checkstyle happy)
DRC 33011754 2019-04-12T08:47:28 Android: Fix "using JNI after critical get" errors 5ea77d8b771bf7b0be7acc7fb70c255f8c9c8f77 was insufficient to fix all of these. In particular, we need to always release the primitive arrays before throwing an exception, because throwing an exception qualifies as "using JNI." Refer to #300
DRC bce58f48 2019-04-12T07:49:35 Consistify formatting of macros in TurboJPEG code
DRC ce067a6c 2019-04-10T15:16:55 GitHub: Template tweaks CONTRIBUTING.md: Correct misuse of "as such" (Grammar Police) bug-report.md: Clarify that the submitter should always test against the latest stable code base.
DRC d3a3a73f 2019-04-10T14:28:47 jdhuff.c: Silence UBSan signed int overflow error Some pathological test images have been created that can cause s to overflow or underflow the signed int data type during decompression. This is technically undefined behavior according to the C spec, although every modern implementation I'm aware of will treat the signed int as a 2's complement unsigned int, thus causing the value to wrap around to INT_MIN if it exceeds INT_MAX. This commit simply makes that behavior explicit in order to shut up UBSan. At least when building for x86-64 or i386 using Clang or GCC, this commit does not change the compiler-generated assembly code at all. The code that triggered this error has existed in the libjpeg code base for at least 20 years (and probably much longer), so the fact that it hasn't produced a user-visible problem in all of that time strongly suggests that UBSan is being overly pedantic here. But if someone can cough up a platform that doesn't wrap around to INT_MIN when 1 is added to INT_MAX, then I'll happily change my opinion. Fixes #347