What Assembly Compiler Does libdav1d Use

This article explores the assembly compilers used during the build process of libdav1d, the highly optimized AV1 video decoder developed by VideoLAN. It details the specific assemblers required for compiling x86 and ARM architectures, helping developers configure their build environments correctly.

To achieve its industry-leading decoding speeds, libdav1d relies heavily on hand-written assembly language rather than relying solely on C compiler optimizations. The specific assembly compiler used depends on the target hardware architecture.

For x86 and x86_64 Architectures: NASM

For Intel and AMD processors, libdav1d makes extensive use of SIMD instruction sets such as SSE, AVX2, and AVX-512. To compile these optimization paths, the build process requires:

For ARM and ARM64 (AArch64) Architectures: GAS / Clang

For ARM-based systems, such as mobile devices, Apple Silicon, and Raspberry Pi single-board computers, libdav1d utilizes NEON instructions. The assembly compilation on these platforms uses:

Build System Orchestration

The compilation of these assembly files is orchestrated by the Meson build system in combination with Ninja. When you configure the build, Meson automatically searches the host system environment for nasm (for x86 targets) or the appropriate C/C++ compiler toolchain (for ARM targets) to compile the assembly source files into the final binary.