AV1 Transform Syntax: Zigzag vs Col-Scan Modes

In the AV1 video codec, scanning orders determine how two-dimensional arrays of quantized transform coefficients are linearized into a one-dimensional sequence for entropy coding. This article examines the primary differences between the Zigzag and Col-Scan modes within AV1 transform syntax, detailing how their distinct coefficient traversal paths optimize coding efficiency based on the directional characteristics of the residual signal.

The primary difference between Zigzag and Col-Scan modes lies in the geometric path used to read coefficients from the transform matrix, which directly affects the clustering of non-zero values and the placement of the End-of-Block (EOB) marker during entropy coding.

Traversal Direction and Pattern

Energy Distribution and Transform Pairing

AV1 adapts its scan order to match the selected 2D transform type (tx_type) and the underlying intra prediction direction:

Impact on Entropy Coding Efficiency

The AV1 syntax relies on grouping non-zero coefficients as early as possible in the 1D scan array. By matching the scan order to the coefficient energy distribution:

  1. Earlier EOB Signaling: Col-Scan groups non-zero vertical frequencies ahead of zeroed horizontal frequencies. This ensures that trailing zeros appear earlier in the stream, allowing the encoder to signal the EOB marker sooner and truncate the coefficient stream.
  2. Context Modeling: AV1’s arithmetic coder uses neighbor-based context models that depend on previously coded coefficients in scan order. Using Col-Scan for vertically dominant residuals ensures probability models accurately reflect the likelihood of consecutive non-zero coefficients along columns.