AV1 Block Partition Sizes for AVIF Images
The AVIF image format derives its high compression efficiency directly from the AV1 video codec, which relies on a flexible, hierarchical block-partitioning system to encode image data. This article outlines the complete range of block partition sizes available to the AV1 encoder when compressing AVIF images, detailing the initial superblock structures, the partition tree modes, and the full list of resulting rectangular and square dimensions from 128x128 down to 4x4 pixels.
Superblock Architecture
At the root of AV1 image encoding is the superblock (SB). An AVIF image canvas is first divided into uniform, non-overlapping superblocks. The AV1 specification defines two base superblock sizes:
- 128x128 pixels: The default and most common superblock size in modern AV1 encoders, offering maximum compression efficiency for high-resolution images.
- 64x64 pixels: An alternative configuration often used for low-resolution content or constrained encoding profiles.
Once the superblock size is established, the encoder recursively evaluates and partitions the block into smaller sub-blocks based on image complexity.
AV1 Partition Tree Modes
Unlike older codecs (such as VP9 or H.264) that rely strictly on standard quad-tree (four-way) splitting, the AV1 encoder supports a 10-way partition tree structure. This allows the encoder to adaptively match natural edges and textures in images:
- NONE: No split; the block remains a single unit.
- SPLIT: Standard quad-tree division into four equal sub-blocks (2x2 grid).
- HORZ: Horizontal split into two equal rectangles (1:2 aspect ratio).
- VERT: Vertical split into two equal rectangles (2:1 aspect ratio).
- HORZ_A: Top half is split vertically into two squares; bottom half remains an intact rectangle.
- HORZ_B: Top half remains an intact rectangle; bottom half is split vertically into two squares.
- VERT_A: Left half is split horizontally into two squares; right half remains an intact rectangle.
- VERT_B: Left half remains an intact rectangle; right half is split horizontally into two squares.
- HORZ_4: 1:4 aspect ratio split (divides a block horizontally into four thin stripes).
- VERT_4: 4:1 aspect ratio split (divides a block vertically into four tall stripes).
Complete List of Available Block Sizes
Through recursive division across these 10 partition modes, the AV1 encoder can produce 22 distinct block dimensions. The absolute smallest dimension supported is 4 pixels.
Square Blocks (1:1 Ratio)
- 128x128
- 64x64
- 32x32
- 16x16
- 8x8
- 4x4
2:1 and 1:2 Rectangular Blocks
- 128x64 and 64x128
- 64x32 and 32x64
- 32x16 and 16x32
- 16x8 and 8x16
- 8x4 and 4x8
4:1 and 1:4 Non-Square Blocks
- 64x16 and 16x64
- 32x8 and 8x32
- 16x4 and 4x16
(Note: 128x32 and 32x128 are not valid partition sizes under the 10-way tree rules, restricting 1:4 and 4:1 partitions to blocks sized 64x64 or smaller).
Application to AVIF Encoding
When encoding an AVIF file, the encoder’s rate-distortion optimization (RDO) algorithm evaluates these sizes dynamically:
- Large partitions (128x128, 64x64, 64x32): Used across flat areas, smooth gradients, and low-contrast regions (such as clear skies) to minimize header overhead and maximize compression.
- Small partitions (8x8, 4x8, 4x4): Allocated to complex textures, high-frequency details, and sharp transitions to prevent ringing artifacts and preserve fine fidelity.
- 1:4 and 4:1 partitions (such as 64x16 or 16x4): Selected along sharp vertical or horizontal boundaries, such as architecture lines, text edges, and UI elements.