How to Control Directional Intra-Prediction in libaom?
The libaom reference encoder for AV1 leverages directional intra-prediction to drastically maximize compression efficiency by analyzing spatial textures across 56 distinct angles. Because analyzing these granular prediction paths is computationally expensive, libaom includes advanced configurations to manage encoder performance. Understanding the specific command-line flags and parameters dedicated to directional intra-prediction allows users to fine-tune the encoder, effectively trading compression efficiency for faster execution times during video processing.
Key Flags for Directional Intra-Prediction
To control the spatial prediction behavior within the AV1 framework, libaom exposes precise boolean switches. In a native environment or when using a wrapper like FFmpeg, the following parameters target the directional intra-prediction pipeline:
--enable-angle-delta(or-enable-angle-deltain FFmpeg)Description: This flag controls the use of intra delta angles. AV1 extends traditional nominal prediction angles with a finer granularity of +/- 3 degrees between consecutive modes. Disabling this restricts the encoder to nominal directions, significantly saving CPU cycles at the cost of slight compression overhead.
--enable-intra-edge-filter(or-enable-intra-edge-filterin FFmpeg)Description: For angular/directional modes, a spatial filter is applied to reference samples surrounding the block boundaries based on the prediction angle. Disabling this flag skips the filtering process, cutting down on computational complexity during intra analysis.
Related Non-Directional and General Intra Controls
To further optimize or completely prioritize directional prediction over other tools, libaom provides toggle parameters for alternative intra-prediction modes. Modifying these flags shapes how the encoder evaluates spatial data:
--enable-smooth-intra(controls alternative smooth gradient prediction modes)--enable-paeth-intra(controls the Paeth predictor logic)--enable-filter-intra(controls the 4x2 sub-block filter matrix modes)--use-intra-dct-only(forces the encoder to use a discrete cosine transform only for intra-coded macroblocks, minimizing transform searching)
Speed Versus Efficiency Tuning
In practice, direct manipulation of individual intra-prediction flags is often overridden or automatically scaled by the general speed modifier.
The --cpu-used (or
-cpu-used in FFmpeg) flag, ranging from 0 to 8, acts as an
overarching preset. At lower values (e.g., 0 to 3), libaom aggressively
searches all 56 directional intra angles and angle deltas to extract
maximum quality per bit. At higher speed tiers (e.g., 5 to 8), the
encoder bypasses minor directional shifts and limits its evaluation to
common angles, accelerating processing times for real-time
applications.