There are a lot of contenders for the potential replacement of JPEG. Here are the main candidates outside of the JPEG Group.
Read the first part of this article here.
HEIF
Moving away from JPEG’s work, let’s consider Apple’s image files which are usually named with a .heic extension but perhaps more accurately called HEIF, for High Efficiency Image File. The format, finalised in 2015, is discussed in some detail here. HEIFs as created by iOS devices can include brief image sequences and other metadata, but in the wild, in mid-2019, they’ll mainly be encountered as photos taken by iPhone users. What’s interesting is that it’s the first of several stills formats we’ll consider – or at least formats mostly used for stills – which is based on a video codec.
HEIFs generally use the same compression algorithm as HEVC video; a HEIF still is a HEVC intra frame. That’s a good idea, on the face of it, because the work has already been done and it means the stills format inherits lots of capability from the video codec. HEIFs support high bit depth, RGB as well as YCrCb, alpha channel – some sources even talk about using an extra channel to contain depth mapping. HEVC compression is very clever (though inevitably heavier on the CPU, especially when encoding) and the claimed compression benefit is that a JPEG-2000 still would be 150% the size of a HEIF of equivalent quality.
Wonderful. The problem, of course, is the same problem that besets every other application of HEVC: patents, as we discussed here. It clearly works – Apple are shipping it – but there’s no denying that patent issues have put people off HEVC, and might hold back more general adoption of HEIF for exactly the same reason.
AVIF
A potential alternative arises in AVIF, a stills format derived from the AV1 moving-picture codec in the same way that HEIF stills derive from the HEVC video codec. AV1 was designed by the Alliance for Open Media (AOMedia) more or less specifically with the intention of avoiding the licensing problems which dog HEVC. Both HEIF and AVIF use the ISO Base Media File Format, which is essentially the MP4 file layout, itself closely based on Apple’s QuickTime movies.
Therefore, strictly speaking, AVIF is a type of HEIF, just using a different compressor and some of the constraints described in the Multi-Image Application Framework. Yes, this is becoming complicated, and a full map of exactly which stack of specs are used to build each filetype would fill a whiteboard with three-point text and a dozen overlaid spiderwebs of relationships.
All this puts Apple in a rather odd position of having a foot in both the AV1 and HEVC camps, but AVIF itself is very capable. It supports transparency, HDR, wide colour gamut and all the niceties of the AV1 codec itself. Conclusions on the compression performance vary but the underlying video codec is widely reckoned to be perhaps 50% better than H.264 in many circumstances. Some sources claim that’s not quite as good as HEVC but if it’s actually usable from a legal perspective, it’s likely to be enough.
WebP
If any of these formats can claim to have actually found support at least in web browsers, Google’s WebP, announced toward the end of 2010, is it. WebP images are viewable in Chrome, Firefox, Opera, and others, including Edge via an extension that’s installed by default. There is currently no support on Apple’s operating systems, though reportedly some beta versions did include it; the politics of this are open to interpretation.
WebP uses features of the VP8 video codec that Google acquired via its purchase of On2 Technologies, contained in a RIFF file structure as found in things like AVI files. It is, therefore, somewhat analogous to HEIC in that HEIC is HEVC in an ISO Base Media File, whereas WebP is VP8 in a RIFF file. The difference is simply in the effectiveness of the underlying codec. WebP began as solely an 8-bit, YCrCb 4:2:0 format. There is now a lossless mode with RGB colour representation and alpha channel support.
The format therefore does only slightly more than a basic JPEG, and the key is whether the compression is any better. Claims have been made that it isn’t, and while other sources find up to 30% bitrate reduction over JPEG, it’s probably true that WebP is the most adopted but least effective alternative. Supporters would claim that it is designed for by far the most common JPEG use case – the web – and it does everything that’s needed there, which is true.
A winner?
There are several other things we could have discussed, including the JPEG XT extensions for HDR and Fabrice Bellard’s BPG format, which is really just another wrapper for HEVC. Any or all of these formats could do the job, to varying degrees – although actually we specifically don’t want all of them succeeding; we really want one clear winner. What’ll decide that, as ever, is adoption, and what’ll decide that is by far the largest deployment of JPEG images: the world wide web.
So far, the people who make the decisions about what browsers support what have been indecisive, and the crystal ball remains dull.
Tags: Technology
Comments