4 comments

[ 2.5 ms ] story [ 21.9 ms ] thread
From libjpeg to libjpeg-turbo, then mozjpeg, and now jpegli, is this another great leap forward in coding efficiency? Jpegli compared to mozjpeg, WebP, AVIF & JXL.
Jpegli has three main deficiencies against true modern formats. First is entropy coding having no context modeling, no arithmetic coding. Second is no large integral transforms. Third is no blur-filtering, aka loop filtering.

The first deficiency can be mitigated by packing jpegli into jpeg xl, giving a ~20 % improvement.

The second and third deficiencies are not a big issues at high quality (libjpeg q85+), but reduces Jpegli's ability to compete in the lowest quality class, like q75-.

Overall I believe jpegli is in its own class of jpeg codecs, combining the quality of guetzli while being faster than mozjpeg and allowing 10+ bits of dynamics for "8 bit" jpegs.

I believe Jpegli and jpeg xl lead in the highest quality category (5 BPP). In mid quality (1.5 BPP) jpeg xl and AVIF are the leaders, Jpegli likely better than WebP. In low quality (0.5 BPP) AVIF will be great for graphics and indoor photos while JPEG XL can still outperform AVIF in nature photos. In low quality WebP can be better than jpegli.

Disclaimer: I participated in development of all four formats/codecs.

Looking forward to hearing more about this bit:

> The way jpegli handles XYB color in a JPEG image is by applying an ICC color profile that maps the existing JPEG color channels to XYB. This actually has the potential to increase the bit depth of the image, which could allow 10 bit JPEGs in the future. I'm excited to see XYB JPEG continue to improve via jpegli, but for now we're just going going to use libjxl's included cjpegli binary to test some photographic images.

Note that XYB JPEG isn't the only way to increase the effective bit depth of the image. Using a typical color space but using a different transfer function such as Perceptual Quantizer or Hybrid Log-Gamma has a similar effect, and this is exploited right now. Take an HDR JXL file and tell djxl to decode it to a jpeg or a png, and you'll get a PQ-encoded file with an ICC profile containing the appropriate information for HDR rendering and for tone-mapped SDR rendering :)