libjpeg-turbo Changelog

What's new in libjpeg-turbo 1.4.0

Jan 13, 2015
  • Fixed a build issue on OS X PowerPC platforms (md5cmp failed to build because OS X does not provide the le32toh() and htole32() functions.).
  • The non-SIMD RGB565 color conversion code did not work correctly on big endian machines. This has been fixed.
  • Fixed an issue in tjPlaneSizeYUV() whereby it would erroneously return 1 instead of -1 if componentID was > 0 and subsamp was TJSAMP_GRAY.
  • Fixed an issue in tjBufSizeYUV2() wherby it would erroneously return 0 instead of -1 if width was < 1.
  • The Huffman encoder now uses clz and bsr instructions for bit counting on ARM64 platforms.
  • The close() method in the TJCompressor and TJDecompressor Java classes is now idempotent. Previously, that method would call the native tjDestroy() function even if the TurboJPEG instance had already been destroyed. This caused an exception to be thrown during finalization, if the close() method had already been called. The exception was caught, but it was still an expensive operation.
  • The TurboJPEG API previously generated an error ("Could not determine subsampling type for JPEG image") when attempting to decompress grayscale JPEG images that were compressed with a sampling factor other than 1 (for instance, with 'cjpeg -grayscale -sample 2x2'). Subsampling technically has no meaning with grayscale JPEGs, and thus the horizontal and vertical sampling factors for such images are ignored by the decompressor. However, the TurboJPEG API was being too rigid and was expecting the sampling factors to be equal to 1 before it treated the image as a grayscale JPEG.
  • cjpeg, djpeg, and jpegtran now accept an argument of -version, which will print the library version and exit.
  • Referring to 1.4 beta1 [15], another extremely rare circumstance was discovered under which the Huffman encoder's local buffer can be overrun when a buffered destination manager is being used and an extremely-high-frequency block (basically junk image data) is being encoded. Even though the Huffman local buffer was increased from 128 bytes to 136 bytes to address the previous issue, the new issue caused even the larger buffer to be overrun. Further analysis reveals that, in the absolute worst case (such as setting alternating AC coefficients to 32767 and -32768 in the JPEG scanning order), the Huffman encoder can produce encoded blocks that approach double the size of the unencoded blocks. Thus, the Huffman local buffer was increased to 256 bytes, which should prevent any such issue from re-occurring in the future.
  • The new tjPlaneSizeYUV(), tjPlaneWidth(), and tjPlaneHeight() functions were not actually usable on any platform except OS X and Windows, because those functions were not included in the libturbojpeg mapfile. This has been fixed.
  • Restored the JPP(), JMETHOD(), and FAR macros in the libjpeg-turbo header files. The JPP() and JMETHOD() macros were originally implemented in libjpeg as a way of supporting non-ANSI compilers that lacked support for prototype parameters. libjpeg-turbo has never supported such compilers, but some software packages still use the macros to define their own prototypes. Similarly, libjpeg-turbo has never supported MS-DOS and other platforms that have far symbols, but some software packages still use the FAR macro. A pretty good argument can be made that this is a bad practice on the part of the software in question, but since this affects more than one package, it's just easier to fix it here.
  • Fixed issues that were preventing the ARM 64-bit SIMD code from compiling for iOS, and included an ARMv8 architecture in all of the binaries installed by the "official" libjpeg-turbo SDK for OS X.

New in libjpeg-turbo 1.3.0 (Dec 11, 2013)

  • [1] 'make test' now works properly on FreeBSD, and it no longer requires the md5sum executable to be present on other Un*x platforms.
  • [2] Overhauled the packaging system: -- To avoid conflict with vendor-supplied libjpeg-turbo packages, the official RPMs and DEBs for libjpeg-turbo have been renamed to "libjpeg-turbo-official". -- The TurboJPEG libraries are now located under /opt/libjpeg-turbo in the official Linux and Mac packages, to avoid conflict with vendor-supplied packages and also to streamline the packaging system. -- Release packages are now created with the directory structure defined by the configure variables "prefix", "bindir", "libdir", etc. (Un*x) or by the CMAKE_INSTALL_PREFIX variable (Windows.) The exception is that the docs are always located under the system default documentation directory on Un*x and Mac systems, and on Windows, the TurboJPEG DLL is always located in the Windows system directory. -- To avoid confusion, official libjpeg-turbo packages on Linux/Unix platforms (except for Mac) will always install the 32-bit libraries in /opt/libjpeg-turbo/lib32 and the 64-bit libraries in /opt/libjpeg-turbo/lib64. -- Fixed an issue whereby, in some cases, the libjpeg-turbo executables on Un*x systems were not properly linking with the shared libraries installed by the same package. -- Fixed an issue whereby building the "installer" target on Windows when WITH_JAVA=1 would fail if the TurboJPEG JAR had not been previously built. -- Building the "install" target on Windows now installs files into the same places that the installer does.
  • [3] Fixed a Huffman encoder bug that prevented I/O suspension from working properly.

New in libjpeg-turbo 1.2.0 (Feb 11, 2012)

  • A build issue encountered when using YASM on Unix systems was fixed.
  • An out-of-bounds read in the SSE2 SIMD code was fixed.
  • New colorspace extension constants that allow applications to specify that the unused byte in a 4-byte RGB buffer should be treated as an alpha channel when decompressing were added.
  • A regression issue encountered when building DevIL with libjpeg-turbo was fixed.
  • iOS support was added to the libjpeg-turbo SDK for Mac.

New in libjpeg-turbo 1.1 Beta 1 (Jan 6, 2011)

  • libjpeg-turbo can be built to emulate the libjpeg v7 or v8b API/ABI.
  • The Windows build system now uses CMake.
  • TurboJPEG/OSS can now compress from/decompress to grayscale bitmaps and convert RGB or JPEG images to YUV planar output.
  • jpgtest can be used to test decompression performance with existing JPEG images.
  • Optional arithmetic encoding and decoding support was added.
  • Further protections were added against invalid Huffman codes.

New in libjpeg-turbo 1.0.0 (Jul 3, 2010)

  • Further build improvements on FreeBSD.
  • Unix/Linux packages now include libjpeg run-time programs (cjpeg, etc.) and man pages.
  • There is a 32-bit supplementary package for amd64 Debian systems.
  • Cygwin support.
  • Full support for building/testing on non-x86 architectures.
  • 64-bit OS X binaries are now backward compatible with OS X 10.4.
  • There are various Linux packaging tweaks.

New in libjpeg-turbo 0.0.91 (Mar 22, 2010)

  • Added documentation to .deb packages
  • Fixed data corruption issues when decompressing large JPEG images and/or using buffered I/O with the libjpeg-turbo decompressor