Firefox Developer Conducted Comparative Testing Of JPEG XL And AVIF Formats

Jake Archibald, who is involved in the development of Firefox, conducted a study comparing JPEG XL and AVIF formats using the standard codec libavif, the standard libjxl codec and the new jixel codec, written in Rust and used in Firefox and Chrome. The formats were tested under the same conditions, which included lossy encoding, and SSIMULACRA2 metrics were used to analyze the results, which determine the degree of difference from the original lossless image. In most tests, the AVIF format showed better results and, at a similar level of quality, allowed the creation of smaller files that required less processor time for compression and decompression.

When lossy compression of photos for web resources with compression efficiency settings (effort, the ratio between encoding time and compression level) by default, JPEG XL files were usually 15-25% larger than similar AVIF files. At maximum compression levels, the gap was reduced to 6-20%. In some tests, JPEG XL came close to or even beat AVIF. However, JPEG XL results are influenced by the choice of encoder: the new jixel encoder tends to produce smaller files than libjxl, unless the image contains complex transparency.

For screenshots and illustrations, AVIF is significantly better than JPEG XL. At default settings, JPEG XL file sizes were 30-90% larger, and at maximum compression levels they were 20-70% larger. It is noted that AVIF copes well with such images when compressed with loss, so the use of lossless formats is justified only in cases where absolute data transfer accuracy (bit-by-bit matching) is required.

/Reports, release notes, official announcements.