libdav1d vs libaom AV1 Decoding Speed Comparison

This article provides a direct comparison of the AV1 decoding speeds between libdav1d and libaom. While libaom serves as the official reference library for the AV1 codec, libdav1d was developed by the VideoLAN and Videolabs communities with a singular focus on speed and efficiency. Below, we examine the design philosophies, multi-threading capabilities, and performance benchmarks that position libdav1d as the superior decoder for media playback.

Key Differences in Design Philosophy

libaom is the reference software created by the Alliance for Open Media (AOMedia). Its primary goal is to serve as a complete, standard-compliant implementation of the AV1 specification, focusing heavily on encoding tools. Because it acts as the baseline, decoding speed was not the primary engineering priority.

Conversely, libdav1d was engineered from scratch with the sole purpose of being a lightweight, ultra-fast, and cross-platform AV1 decoder. It does not contain any encoding capabilities, allowing developers to focus entirely on optimizing the decoding pipeline.

Decoding Speed and Performance

In terms of raw decoding speed, libdav1d consistently and significantly outperforms libaom. Across various hardware configurations, libdav1d is typically 2x to 5x faster than the libaom decoder.

This performance gap is driven by two main factors: * Hand-Optimized Assembly: libdav1d features extensive, hand-written assembly code for x86 processors (leveraging SSE, AVX2, and AVX-512 instruction sets) and ARM processors (leveraging NEON). While libaom has assembly optimizations, they are not as aggressively tuned for modern consumer hardware. * Low Resource Overhead: libdav1d is designed to have a small memory footprint, which reduces cache misses and improves CPU instruction efficiency.

Multi-Threading Efficiency

Efficiently utilizing multi-core processors is critical for decoding high-resolution video, such as 4K and 8K. * libdav1d: Features an advanced threading model that combines both frame-level and tile-level threading. This allows the decoder to distribute work evenly across multiple CPU cores, resulting in highly efficient scaling. * libaom: Its decoding threading model is less optimized, which often leads to uneven CPU utilization, lower frame rates, and dropped frames during high-bitrate playback.

Industry Adoption

Because of its superior speed and lower battery consumption on mobile devices, libdav1d has become the industry standard for software AV1 decoding. It is the default decoder used in major web browsers like Google Chrome, Chromium, and Mozilla Firefox, as well as popular media players like VLC and FFmpeg. libaom is rarely used for consumer-facing playback and is instead utilized primarily for AV1 video encoding.