HEIC and AVIF reuse the intra-frame tools of HEVC and AV1 for still images, producing files about half the size of JPEG. Here is why, and why AVIF wins on the web.
Everything in this chapter comes together here. Video codecs' intra-frame tools have advanced far beyond JPEG, so why not use them to compress a single still image? That idea gave us HEIF and AVIF.
Everything you learned in Chapter 3 applies directly — variable block partitioning (not JPEG's fixed 8×8, but up to 64×64 in HEVC and up to 128×128 in AV1, depending on the content), dozens of intra prediction modes (JPEG has only the DC difference), sophisticated entropy coding based on arithmetic coding such as CABAC (far more efficient than JPEG's simple Huffman), and in-loop filters (JPEG has none at all). As a result, AVIF is known to produce files that are on average 40–50% smaller than JPEG at the same quality.
HEIF and AVIF are not just image formats but containers (a concept covered in detail in Chapter 10). That makes the following possible.
HEIC is based on HEVC and so carries patent royalties, which makes the browser camp (Chrome, Firefox) reluctant. AVIF is based on AV1 and is royalty-free (a core principle of AOMedia, covered in Chapter 7), so it spread much faster as a web standard. iOS uses a dual strategy: HEIC for capture, and AVIF support for the web. It is a good example of how codec choice is tied up not just with pure technology but with patent and business issues — a theme you will keep meeting in Chapters 5–8.
An image container based on HEVC intra frames. Adopted by Apple as its default.
A royalty-free image format based on AV1 intra frames.
A next-generation image format combining the Modular transform and VarDCT. Supports lossless JPEG recompression.
What is the main reason AVIF has been adopted more widely than HEIC in web browsers?
What is the fundamental reason HEIC/AVIF files are much smaller than JPEG at the same quality?