Which Testing Frameworks Are Used in Libaom?

The libaom build system, which is the reference software library for the AV1 video codec, integrates specific testing frameworks to ensure code quality, performance, and stability across different platforms. This article provides an overview of the primary testing tools embedded within the libaom CMake build infrastructure, focusing on Google Test (GTest) for unit and integration testing, alongside the benchmarking utilities used to measure performance. Understanding these frameworks is essential for developers looking to contribute to or validate the AV1 reference encoder and decoder.

Google Test (GTest) Integration

The cornerstone of the libaom testing suite is Google Test (GTest). The CMake build system is configured to automatically download, configure, and compile GTest when testing is enabled.

WebM Test Data and Vector Validation

To complement the GTest framework, the libaom build system integrates a mechanism to download and manage external test vectors, often referred to as the WebM test data.

Performance Benchmarking Tools

While GTest handles correctness, libaom also includes micro-benchmarks to track the execution speed of critical code paths, especially assembly optimizations (like AVX2, AVX-512, and NEON).

Enabling Tests in the Build System

To utilize these integrated frameworks, developers must explicitly enable them during the CMake generation phase. By default, tests may be disabled to speed up compilation.