Skip to content

HEIC vs AVIF Benchmark

Dirk Farin edited this page Oct 14, 2022 · 2 revisions

This page shows the quality, compression factor, and encoding time for HEIC using the x265 encoder compared to different AVIF encoders. The image used in these tests was dsc_1385.jpg. Resolution of this image is 4288x2848 pixels. You can use the image file to reproduce these experiments. PSNR values were computed with the heif-enc --benchmark option. The PSNR is computed on the luminance channel only.

The encoders used were:

  • x265 v3.5
  • AOM v3.3.0
  • SVT-AV1 v1.2.1

I have omitted the rav1e encoder. See the the AVIF encoder benchmark for rav1e results.

All tests were run on an i7-4770K @3.50 GHz.

We first show the rate-distortion curves for different speed presets of x265. The numbers along the curve are the encoding times in seconds.

x265 v3.5

201014-x265-all-presets As can be seen, only the three presets ultrafast, superfast, slow are relevant for still image coding, since the other presets give almost identical results. 201014-x265-relevant-presets

HEIC vs AVIF

Operating point: 'slow' preset

In order to compare the execution speed between HEIC and AVIF, I have selected the 'slow' preset for HEIC and selected speed settings for the AVIF encoders to match this as close as possible.

It shows that HEIC and SVT-AV1 are very close in speed, with HEIC being slightly faster. AOM is about 2x slower.

201014-heic-vs-avif-slow-preset 201014-heic-vs-avif-slow-preset-magnification

Fastest speed

Finally, we show the encoder performance with each encoder set to the maximum speed settings. At the fastest speed settings, HEIC/x265 gives better compression at a lower computational complexity then the AVIF encoders. AOM can encode a bit faster at its fastest setting (speed=9) than x265, but at a considerably lower quality. Hence I think that AOM at speed=8 is the fair comparison to x265 at ultrafast.

201014-heic-vs-avif-fast 201014-heic-vs-avif-fast-magnification