loc.gov

Description

JPEG XL is a standard for a compression codec for raster graphic images designed to support lossy and lossless compression, particularly for display on the web and the needs for the web environment on a multitude of devices. JPEG XL is being developed to outperform other popular web image formats such as PNG, JPEG 2000, GIF, and WebP with higher quality images and improved compression ratios. The codec improves on previous JPEG codecs and file formats, particularly as existing JPEG files can be losslessly encoded as JPEG XL files and restored to the initial JPEG file, ensuring backwards compatibility. The "jbrd" box, the JPEG Bitstream Reconstruction Data, contains the information needed to reconstruct the bit-identical file. The JPEG XL bitstream reconstruction data uses the image data along with any other metadata present, such as Exif, XMP, or JUMBF, to reconstruct the original JPEG file. This inherent compatibility allows for an efficient transition from JPEG formats to JPEG XL without the need to store two files.

The Overview of JPEG XL highlights three primary criteria:

  • High fidelity to source image. JPEG XL was designed with high-fidelity image encoding capabilities. The JPEG XL encoder can automatically perform high-fidelity encoding, and compresses images as much as possible with no visible differences. The JPEG XL reference encoder is configured based on a perceptual fidelity target rather than technical parameters like traditional image encoders. See Cloudinary's blog post on image compression and fidelity.
  • Encoding and decoding speed. Testing has shown that JPEG XL with 4 threads outperformed both libjpeg and libjpeg-turbo, two JPEG codec implementations. Additional testing showed that the default JPEG XL speed, "squirrel" is 3 times as fast as HEVC-x265, while the JPEG XL "cheetah" speed is 13 times as fast. The JPEG XL decoder is 9 times faster than FFmpeg. Published results and experiment descriptions can be found in Benchmarking JPEG XL image compression paper from the Multimedia Signal Processing Group. The JPEG XL codec has an encoding speed of 50 MP/s and decoding speeds of 132 MP/s. The responsiveness functionality of JPEG XL codec allows for the support of progressively decode images which other formats based on video codecs, such as WebP, HEIC, and AVIF, do not support.
  • Compression ratios. The JPEG XL compression improves upon previous JPEG encodings. Studies and testing of compression, encoding, and decoding speeds JPEG XL developers highlight the vast improvement in encoding and decoding speeds. Testing concluded that JPEG XL and HEVC were indistinguishable from the original at bitrates near 1 but JPEG XL reached higher perceptual quality compared to other codecs when using objective quality metrics. According to the XL overview on Gitlab, lossless compression reduces JPEG XL files to "60-75%" of PNG files and smaller than WebP files for photos.

Some of the key features for the JPEG XL codec as described by the JPEG group’s white paper are:

  • improved functionality and efficiency compared to traditional image formats (e.g. JPEG, GIF and PNG)
  • progressive decoding (by resolution and precision)
  • lossless JPEG transcoding
  • support for both photographic and synthetic imagery
  • graceful quality degradation across a large range of bitrates
  • perceptually optimized reference encoder
  • support for wide color gamut and high dynamic range (HDR)
  • support for animated content
  • efficient encoding and decoding without requiring specialized hardware

The JPEG XL codec utilizes a number of coding tools. See the JPEG XL white paper for descriptions of all coding tools.

The codestream contains one or more frames which can be looped (infinitely or number of times) in the case of animated images. Zero-duration frames are also possible and represent different image layers. By default, the decoder will blend and coalesce frames, producing only a single output frame where all multiple zero-duration frames and all output frames are of the same size (the size of the image canvas). All output frames can have either no duration or non-zero duration. Each frame contains pixel data in one of two modes:

  • VarDCT mode, where variable-sized DCT transforms are applied and the image data is encoded in the form of DCT coefficients. This mode is always lossy, but can also be used to losslessly represent an existing JPEG image. Find an example of the JPEG XL VarDCT block size selection here.
  • The other mode used is modular mode, where only integer arithmetic is used, enabling lossless compression.

Both modes can separately encode supplementary "image features" that are rendered on top of the decoded image. You can read more about those image features such as patches, splines, and noise, on JPEG XL's GitLab.

One of the benefits to the JPEG XL codec and its improved compression ratios is the resulting impact on server storage. Figure 1. (on page 1) of the JPEG XL white paper highlights a usage scenario of a JPEG image encoded as a JPEG XL and the decoding process to reduce server costs. Figure 3. of the white paper, as well as the Wikipedia entry for JPEG XL, illustrates the architecture of the codec. An input image can be encoded as a compressed JPEG XL codestream in either lossy or lossless methods. See Cloudinary’s blog post about JPEG XL which illustrates visual comparisons to other image files formats such as JPEG, HEIC, and WebP.

The "X" of the JPEG XL file name is based in part on the JPEG group's naming convention for many of its new standards since 2000 including, JPEG XT, JPEG XR, and JPEG XS. The authors used the "L" as an indication of the hopeful longevity of the file format as it will replace the legacy JPEG. Comments welcome.

Read the original on loc.gov ↗