A high-performance JPEG image codec that uses SIMD instructions to accelerate compression and decompression, typically 2-6x faster than libjpeg.
libjpeg-turbo is a high-performance JPEG image codec library that accelerates JPEG compression and decompression using SIMD (Single Instruction, Multiple Data) instructions on modern CPUs. It solves the performance limitations of the standard libjpeg library by providing dramatically faster processing speeds—typically 2-6 times faster—while maintaining full compatibility. The library serves as a drop-in replacement for libjpeg in applications that require efficient JPEG image handling.
Developers and software projects that need fast JPEG compression/decompression, including applications in computer vision, image processing pipelines, web servers, and multimedia software. It's particularly valuable for performance-sensitive applications where JPEG processing is a bottleneck.
Developers choose libjpeg-turbo because it provides significant performance improvements over standard libjpeg without sacrificing compatibility. Its SIMD-accelerated algorithms deliver speeds that often rival proprietary JPEG codecs, while its dual API support (traditional libjpeg and simpler TurboJPEG) offers flexibility for different use cases. As an open-source, standards-compliant implementation, it combines speed with reliability.
Main libjpeg-turbo repository
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses CPU SIMD instructions to achieve 2-6 times faster JPEG compression and decompression than standard libjpeg, as highlighted in the README for baseline and progressive JPEG.
Offers both the traditional libjpeg API for advanced control and the simpler TurboJPEG API for easier integration, with examples provided in the README for different use cases.
Supports direct compression from and decompression to 32-bit and big-endian pixel buffers (e.g., RGBX, XBGR, ARGB) through colorspace extensions, enhancing compatibility with various image formats.
Mathematically compatible with libjpeg v6b and configurable to emulate libjpeg v7/v8 API/ABI, allowing it to serve as a drop-in replacement in many existing projects without recompilation.
Lacks support for key features like DCT scaling, SmartScale, and fancy downsampling, as admitted in the README, limiting full compatibility with applications built for newer libjpeg versions.
Decompression performance can drop by up to 20% with restart markers, and encoding at high quality levels (98-100) can reduce speed by 40% due to SIMD limitations, as noted in the Performance Pitfalls section.
SIMD extensions can cause false positives in tools like Valgrind and Memory Sanitizer, requiring workarounds such as disabling SIMD during build or runtime, which adds complexity.