Five years after the formation of the branch 2.x, libjpeg-turbo has announced the release of version 3.0.0.0 of their high-performance library for encoding and decoding images in JPEG format. The library, compatible at the API/Abi level with the classic libjpeg library, aims to provide maximum speed for coding and decoding. In addition to the standard Libjpeg API, libjpeg-turbo offers its own Turbojpeg API, along with extensions for compressing and decoding images in 32-bit pixel buffers such as RGBX and XBGR. The code is available under three BSD-like licenses, and binary assemblies are prepared for Linux, MacOS, and Windows platforms.
Compared to Libjpeg, libjpeg-turbo library allows for accelerated JPEG encoding and decoding using SIMD (MMX, SSE2, Neon, AltiveC VMX) on different architectures such as X86, X86-64, PowerPC, and ARM. Although the acceleration is not as significant on other architectures, the library still outperforms Libjpeg thanks to optimized Huffman coding functions. Mozjpeg, a fork of libjpeg-turbo, focuses on optimizing the size of resulting images and is being developed separately.
The main innovations in this release include:
- Added support for color subdicretization 4:1:1, enabling lossless conversion, cropping, and rotation of JPEG images with 4:1:1 subdicretization, as well as unpacking and transfer to the YUV color model.
- Significantly accelerated Huffman’s optimal tables, reducing compression time by half for small images (256×256).
- Added support for using arithmetic entropy coding for JPEG images with a 12-bit color representation per channel.
- The Turbojpeg API has been significantly redesigned to eliminate restrictions and improve expandability. Si-functions now have a “TJ3” prefix and many flags and modes have been transformed into general parameters of the API.
- The Libjpeg and Turbojpeg APIs now support images with 12 and 16 bits of color per channel in both lossy and lossless modes.