Common SVT-AV1 Compilation Flags for Building From Source

Building the Scalable Video Technology AV1 (SVT-AV1) encoder from source code allows developers and video engineers to optimize the binary for specific hardware and use cases. This article covers the most common CMake compilation flags used during the SVT-AV1 build process, explaining how to control build types, target specific CPU architectures, toggle component builds, and configure library types for optimal performance.

Standard CMake Build Flags

SVT-AV1 uses the CMake build system. The following standard CMake flags are crucial for defining the overall build environment:

Component Selection Flags

SVT-AV1 consists of an encoder, a decoder, and sample applications. You can use flags to exclude components you do not need, reducing compilation time and binary size:

Hardware and Optimization Flags

SVT-AV1 relies heavily on assembly optimizations (AVX2, AVX-512, NEON) to achieve high-speed encoding.

CPU-Specific Tuning Flags

To squeeze the absolute maximum performance out of SVT-AV1 on a specific machine, you can pass custom flags directly to the compiler via CMake: