AV1 Wedge-Based Prediction Block Segmentation

Wedge-based prediction is a specialized compound inter-prediction tool in the AV1 video codec that segments rectangular coding blocks into two non-rectangular regions using predefined directional dividing lines. By moving beyond traditional horizontal and vertical block partitions, this tool allows AV1 to accurately track moving object boundaries that run diagonally across a block. The two resulting sub-regions are assigned distinct motion vectors, which are then combined using a smooth blending mask along the boundary to prevent visual artifacts and maximize compression efficiency.

Predefined Wedge Codebooks

Rather than transmitting arbitrary boundary coordinates, which would consume significant bitrate, AV1 relies on a fixed codebook of predefined wedge patterns.

Region Assignment and Motion Vectors

During inter coding, an AV1 block evaluated for wedge prediction receives two separate motion vectors (\(MV_0\) and \(MV_1\)). These vectors can reference the same reference frame or two different reference frames:

  1. Partitioning: The wedge line splits the block area into Region 0 and Region 1.
  2. Directional Mapping: One motion vector predicts the pixel data for Region 0, while the other predicts the pixel data for Region 1.
  3. Sign Inversion: The encoder signals a 1-bit direction flag indicating whether \(MV_0\) maps to Region 0 and \(MV_1\) to Region 1, or vice versa.

Soft Blending Masks

To eliminate hard, artificial edges that would otherwise require high-frequency transform coefficients to encode, AV1 implements soft blending along the wedge partition line:

Signaling and Encoder Decision

During the rate-distortion optimization (RDO) search, the encoder tests standard compound prediction alongside the available wedge patterns. If a wedge pattern yields the lowest rate-distortion cost, the encoder signals the compound mode as wedge prediction, followed by the specific wedge index from the codebook, the sign bit, and the two associated motion vectors.