AV1 Self-Guided Filter in Loop Restoration Explained

The Self-Guided filter mode in AV1 Loop Restoration is an edge-preserving in-loop filtering tool designed to remove coding artifacts and recover fine details lost during lossy compression. Acting as one of two switchable restoration methods alongside the separable Wiener filter, the Self-Guided filter uses the reconstructed video frame as its own reference guide. This overview explains how the algorithm works, its role within the AV1 decoding pipeline, and its practical benefits for video fidelity and processing efficiency.

Role in the AV1 In-Loop Pipeline

In the AV1 video codec, in-loop filtering is applied sequentially in three distinct stages:

  1. Deblocking Filter: Smooths hard block boundaries resulting from transform and prediction operations.
  2. Constrained Directional Enhancement Filter (CDEF): Identifies directional edges within blocks to eliminate ringing artifacts.
  3. Loop Restoration (LR): Operates on larger image regions, termed Restoration Units (typically 64x64 to 256x256 pixels), to restore high-frequency information and match the reconstructed frame closer to the original source.

Within the Loop Restoration stage, the encoder chooses between the separable symmetric Wiener filter, the Self-Guided filter, or switching restoration off entirely on a per-unit basis.

Core Mechanics of the Self-Guided Filter

The Self-Guided filter is derived from the classical guided image filtering technique. In general guided filtering, a secondary reference image guides the filtering of the target image. Because a pristine reference image is unavailable at the decoder, the AV1 implementation uses the degraded, reconstructed frame as its own guide—hence the term "self-guided."

The filter operates through the following steps:

\[\hat{I} = I + x(X_1 - I) + y(X_2 - I)\]

Where \(I\) is the input reconstructed sample, \(X_1\) and \(X_2\) are the filtered outputs from the two passes, and \(x\) and \(y\) are the signaled restoration weights.

Advantages and Practical Use