Jpegli:一个新的 JPEG 编码库
Jpegli: A new JPEG coding library

原始链接: https://opensource.googleblog.com/2024/04/introducing-jpegli-new-jpeg-coding-library.html

Jpegli 是一个尖端的 JPEG 编码库,可增强图像压缩和交付,并保持与现有系统的向后兼容性。 与传统 JPEG 相比,Jpegli 在高质量下压缩比提高了 35%,可提供卓越的清晰度和更少的可观察到的伪影。 Jpegli 专为快速和高效而设计,在不影响速度的情况下补充了当前的开发人员工作流程。 Jpegli 在标准 8 位框架内支持每个组件 10 位以上的编码,消除了明显的条带伪影,从而获得更密集的图像并节省带宽和存储。 Jpegli 采用自适应量化、卓越的量化矩阵选择、精确的中间计算,甚至可选择使用 JPEG XL 的 XYB 色彩空间等创新方法,提供更清晰的视觉效果。 在针对 libjpeg-turbo 和 MozJPEG 的测试中,Jpegli 展示了显着的图像质量增强和具有竞争力的速度。 Jpegli 的创建者包括来自 Google Research 的 Zoltan Szabadka、Martin Bruse 和 Jyrki Alakuijala。

Jpegli 是一种新的图像压缩技术,旨在提供比 WebP 和 JPEG XL 等现有格式更高的压缩率。 据报道,Jpegli 提供与 WebP 类似的压缩级别,在中高质量场景中超越 JPEG XL。 然而,与 JPEG Turbo 和 MozJPEG 相比,它在中低质量下的表现较差。 一些研究人员认为,根据图像大小和质量,Jpegli 甚至可能超越 AVIF。 此外,Jpegli 提供了显着的处理速度增益,使其成为需要快速图像渲染的应用程序的有吸引力的替代方案。 尽管如此,它的更广泛接受度和与流行系统的集成仍然不确定,特别是考虑到围绕它的引入和与既定格式的竞争正在进行的辩论和争议。
相关文章

原文

The internet has changed the way we live, work, and communicate. However, it can turn into a source of frustration when pages load slowly. At the heart of this issue lies the encoding of images. To improve on this, we are introducing Jpegli, an advanced JPEG coding library that maintains high backward compatibility while offering enhanced capabilities and a 35% compression ratio improvement at high quality compression settings.

Jpegli is a new JPEG coding library that is designed to be faster, more efficient, and more visually pleasing than traditional JPEG. It uses a number of new techniques to achieve these goals, including:

  • It provides both a fully interoperable encoder and decoder complying with the original JPEG standard and its most conventional 8-bit formalism, and API/ABI compatibility with libjpeg-turbo and MozJPEG.
  • High quality results. When images are compressed or decompressed through Jpegli, more precise and psychovisually effective computations are performed and images will look clearer and have fewer observable artifacts.
  • Fast. While improving on image quality/compression density ratio, Jpegli's coding speed is comparable to traditional approaches, such as libjpeg-turbo and MozJPEG. This means that web developers can effortlessly integrate Jpegli into their existing workflows without sacrificing coding speed performance or memory use.
  • 10+ bits. Jpegli can be encoded with 10+ bits per component. Traditional JPEG coding solutions offer only 8 bit per component dynamics causing visible banding artifacts in slow gradients. Jpegli's 10+ bits coding happens in the original 8-bit formalism and the resulting images are fully interoperable with 8-bit viewers. 10+ bit dynamics are available as an API extension and application code changes are needed to benefit from it.
  • More dense: Jpegli compresses images more efficiently than traditional JPEG codecs, which can save bandwidth and storage space, and speed up web pages.

How Jpegli works

Jpegli works by using a number of new techniques to reduce noise and improve image quality; mainly adaptive quantization heuristics from the JPEG XL reference implementation, improved quantization matrix selection, calculating intermediate results precisely, and having the possibility to use a more advanced colorspace. All the new methods have been carefully crafted to use the traditional 8-bit JPEG formalism, so newly compressed images are compatible with existing JPEG viewers such as browsers, image processing software, and others.

Adaptive quantization heuristics

Jpegli uses adaptive quantization to reduce noise and improve image quality. This is done by spatially modulating the dead zone in quantization based on psychovisual modeling. Using adaptive quantization heuristics that we originally developed for JPEG XL, the result is improved image quality and reduced file size. These heuristics are much faster than a similar approach originally used in guetzli.

Improved quantization matrix selection

Jpegli also uses a set of quantization matrices that were selected by optimizing for a mix of psychovisual quality metrics. Precise intermediate results in Jpegli improve image quality, and both encoding and decoding produce higher quality results. Jpegli can use JPEG XL's XYB colorspace for further quality and density improvements.


Testing Jpegli

In order to quantify Jpegli's image quality improvement we enlisted the help of crowdsourcing raters to compare pairs of images from Cloudinary Image Dataset '22, encoded using three codecs: Jpegli, libjpeg-turbo and MozJPEG, at several bitrates.

In this comparison we limited ourselves to comparing the encoding only, decoding was always performed using libjpeg-turbo. We conducted the study with the XYB ICC color profile disabled since that is how we anticipate most users would initially use Jpegli. To simplify comparing the results across the codecs and settings, we aggregated all the rater decisions using chess rankings inspired ELO scoring.


Results

Our results show that Jpegli can compress high quality images 35% more than traditional JPEG codecs.

Jpegli is a promising new technology that has the potential to make the internet faster and more beautiful.

By Zoltan Szabadka, Martin Bruse and Jyrki Alakuijala – Paradigms of Intelligence, Google Research

联系我们 contact @ memedata.com