What Languages Make Up the Libaom Codebase?

The libaom codebase, which serves as the open-source reference software implementation for the AV1 video codec by the Alliance for Open Media (AOMedia), is primarily composed of the C programming language. C forms the vast majority of the repository, handling core encoding and decoding logic. It is heavily supplemented by C++ for infrastructure like testing frameworks, along with assembly language optimized for diverse CPU architectures to maximize media processing performance.

The Dominance of C in Libaom

The main foundation of libaom is written in C. Video encoding and decoding demand extreme control over system memory, hardware execution, and low-level optimization. Because libaom directly inherited substantial engineering paradigms from its predecessor codecs, namely WebM’s VP8 and VP9 implementations (libvpx), utilizing pure C ensures predictable performance across various platforms. The operational algorithms governing block partitioning, intra/inter prediction, and transform loops rely natively on C source files.

C++ for Testing and Tooling

While C dominates the engine, C++ holds a prominent secondary position in the codebase. Its primary utilization is found in the verification and validation suites. The libaom project implements a comprehensive unit testing architecture built on the GoogleTest (GTest) framework, which requires a C++ compiler environment to execute structural diagnostics and integration tests.

Assembly Language and Platform Optimization

To make software-based AV1 compression usable in real-time or production scenarios, processing bottlenecks must be resolved at the hardware level. To achieve this, libaom includes hand-optimized SIMD (Single Instruction, Multiple Data) code segments written in Assembly or using compiler intrinsics. These localized optimizations specifically target different hardware architectures:

Configuration and Build Tools

Managing compilation configurations across varied platforms requires dedicated build orchestration script languages. The project uses CMake as its primary build automation tool. In addition, peripheral scripts written in languages like Python and Perl are bundled into the codebase to manage test data sharding, automate code generation, and parse build dependencies.