AV1 Golden Frames and AltRef Frames Explained
This article explores the roles of Golden Frames and Alternative Reference (AltRef) frames within the AV1 video codec's architectural hierarchy. While traditional codecs rely heavily on rigid I-, P-, and B-frame sequences, AV1 uses a flexible reference frame buffer system to boost compression efficiency and visual fidelity. Understanding how Golden Frames provide long-term visual anchors and how AltRef frames act as synthetic, invisible reference targets reveals the core mechanics behind AV1's high compression performance.
The AV1 Reference Buffer Hierarchy
Unlike older video standards that restrict motion compensation to
immediately preceding or succeeding frames, the AV1 architecture
maintains a dynamic buffer pool of up to eight reference frame slots.
For any given inter-coded frame, an encoder can select from up to seven
reference frames: LAST, LAST2,
LAST3, GOLDEN, BWDREF,
ALTREF2, and ALTREF.
This pool allows the encoder to decouple the decode order from the presentation order, enabling multi-directional and non-consecutive temporal prediction. Golden Frames and AltRef frames are the two most critical components of this extended reference system.
What Is a Golden Frame?
The concept of the Golden Frame originated in VP8 and VP9 and remains a core feature in AV1. A Golden Frame is typically a displayed frame that serves as an anchor for long-term reference.
- Temporal Stability: While
LASTframes point to recently decoded images, a Golden Frame is maintained in the buffer over a longer temporal window. It often captures static background elements that may be temporarily occluded by moving foreground objects. - Scene Recovery: When an object moves out of view to reveal a previously seen background, the encoder can reference the Golden Frame directly instead of expending bits to re-encode the background textures.
- Update Frequency: Golden Frames are refreshed periodically, either by promoting a newly decoded frame to the golden slot or by updating specific background regions using refresh flags.
What Is an AltRef Frame?
An Alternative Reference (AltRef) frame is an invisible,
non-displayed reference frame that AV1 uses exclusively for
motion-compensated prediction. In the stream headers, an AltRef frame
has its show_frame flag set to zero, meaning the decoder
decodes and buffers the frame without rendering it to the display.
- Temporal Filtering: Encoders typically create an AltRef frame by taking a lookahead window of several future frames and applying a temporal filter (such as a weighted average motion blur/denoise algorithm). This creates a high-quality, noise-free composite of the upcoming scene.
- Prediction Target: Subsequent frames are then coded by predicting against this optimized, synthetic frame. Because the AltRef frame is denoised and represents the true structural essence of the scene, predicting from it requires significantly fewer bits.
- Hierarchical B-Frame Alternative: While traditional H.264/H.265 codecs use bidirectional B-frames that are eventually displayed, AV1 uses AltRef frames as the apex of a hierarchical temporal pyramid. A later frame can display the actual scene data, while the earlier invisible AltRef frame acts strictly as a predictive baseline.
How They Differ in the Architecture
The fundamental difference between the two frame types lies in their visibility and generation:
| Feature | Golden Frame | AltRef Frame |
|---|---|---|
| Visibility | Displayed
(show_frame = 1) |
Invisible
(show_frame = 0) |
| Origin | Actual scene frame chosen as an anchor | Synthetically filtered composite from lookahead |
| Primary Role | Long-term background and occlusion reference | Denoised, high-fidelity target for bidirectional prediction |
| Position in Pyramid | Base or intermediate reference layer | Apex of temporal prediction sub-groups |
By combining Golden Frames for background persistence and AltRef frames for synthetic lookahead estimation, AV1 achieves superior rate-distortion performance, minimizing bandwidth while preserving structural sharpness across complex motion sequences.