How AV1 Suppresses Artifacts on Text Documents
AV1 screen content mode eliminates the blurring, ringing, and ghosting typically caused by standard video compression on high-contrast text through a specialized suite of screen content coding (SCC) tools. Standard motion compensation uses fractional-pixel interpolation filters and frequency-domain transforms designed for continuous-tone camera footage, which inherently degrade the sharp, bi-level edges of text characters. AV1 suppresses these artifacts during text rendering and scrolling by employing integer-precision motion vectors, Intra Block Copy (IntraBC), palette coding, and transform skip modes, preserving razor-sharp text edges without the distortion of standard motion-compensated inter-prediction.
Integer Motion Vector Precision
Standard motion compensation achieves compression efficiency on real-world video by using fractional-pixel (half-pel or quarter-pel) motion vectors. These vectors require interpolation filters to estimate intermediate pixel values. While effective for natural textures, fractional-pixel interpolation acts as a low-pass filter that softens high-contrast edges, blurring glyphs and leaving halos around letters when scrolling through documents.
AV1 screen content mode detects document and interface characteristics and allows the encoder to restrict motion vectors strictly to full-pixel (integer) accuracy. By forcing integer displacements:
- Sub-pixel interpolation filters are bypassed entirely.
- Exact pixel alignments are maintained from frame to frame during window movement and vertical document scrolling.
- Edge sharpness remains intact, preventing the typical temporal "smear" seen in scrolling text.
Intra Block Copy (IntraBC)
IntraBC functions like motion compensation, but instead of referencing previous frames in time, it references previously reconstructed areas within the same frame.
Because text documents are composed of repeating typographic elements—such as recurring letterforms, words, icons, and UI components—IntraBC allows the encoder to copy entire blocks of pixels directly from elsewhere on the page. Because IntraBC relies on integer displacements within the spatial domain:
- Text patterns are duplicated with zero generation loss.
- The encoder avoids generating heavy prediction residuals that would otherwise require lossy transform operations.
- Motion vector searches prioritize identical glyph matches across the document, bypassing temporal prediction dependencies.
Palette Mode
Text documents are dominated by a minimal set of distinct colors—typically dark glyphs against a light background. Conventional inter-frame and intra-frame prediction models expect continuous gradients and struggle with abrupt transitions, resulting in color bleeding and edge noise.
AV1's palette mode bypasses traditional transform and quantization pipelines:
- The encoder creates a localized color index (a palette) containing up to eight distinct colors for a given block.
- Individual pixels within the block are assigned a direct palette index rather than being derived from motion vectors or directional intra predictions.
- Because the color values are mapped discretely, there is no spatial or temporal motion error to propagate, effectively preventing edge degradation, mosquito noise, and color fringing around text boundaries.
Identity Transform (Transform Skip)
When motion compensation produces a prediction residual (the difference between the predicted block and the actual text), standard codecs run this residual through discrete cosine transforms (DCT) or asymmetric discrete sine transforms (ADST). High-contrast step edges—such as the transition from black font to white paper—create high-frequency coefficients in the transform domain. When quantized, this causes truncation, leading to Gibbs phenomenon (ringing artifacts) along the text borders.
AV1 addresses this with the Identity Transform (IDTX), which skips frequency-domain conversion entirely:
- Residuals are quantized and coded directly in the spatial domain.
- The absence of frequency truncation eliminates ringing artifacts around glyphs.
- Combined with motion compensation, any minute prediction errors left over after text movement are corrected without introducing surrounding blur or noise.