Understanding Show Existing Frame in AV1
This article provides an overview of the
show_existing_frame syntax element in the AV1 video codec,
explaining its core function, structural mechanics, and operational
benefits. Readers will learn how this flag instructs decoders to display
previously decoded reference frames without transmitting new picture
data, and how this mechanism facilitates advanced video compression
techniques such as non-displayed frames, temporal scalability, and film
grain synthesis.
What is Show Existing Frame?
In the AV1 bitstream specification, show_existing_frame
is a 1-bit flag located in the uncompressed frame header. Its primary
function is to instruct the video decoder to immediately output a frame
that is already stored in the decoder's reference frame buffer, rather
than decoding a new frame from residual data and transform
coefficients.
When a frame header contains show_existing_frame = 1,
the bitstream does not contain typical frame components such as tile
data, transform blocks, motion vectors, or intra-prediction modes.
Instead, the frame header terminates early after identifying which
stored frame to output.
How the Syntax Element Works
The mechanism operates through a simple indexing workflow:
- Flag Evaluation: The decoder reads
show_existing_frame. If the value is1, the decoder knows that no new pixel payload follows. - Buffer Selection
(
frame_to_show_map_idx): The bitstream provides an index (typically 3 bits) pointing to one of the eight reference frame slots in the AV1 reference picture buffer. - Display Output: The decoder retrieves the image data from the designated buffer slot, updates the display timing and frame counter, and outputs the frame for presentation.
- Metadata Updates: Depending on the stream configuration, the header may still carry metadata such as presentation timestamps (PTS) or film grain synthesis parameters to be applied to the output.
Key Applications in AV1 Encoding
The show_existing_frame element enables several
foundational features of AV1 compression:
1. Alternate Reference Frames (Non-Displayed Frames)
AV1 decoders can decode frames that are not immediately shown to the
viewer. This is controlled by setting the show_frame flag
to 0. These "hidden" or "alternate reference frames"
(altrefs) are constructed using high-quality coding passes to serve as
references for future frames. Once the presentation timeline reaches the
intended moment for that frame, an encoder transmits a tiny frame header
with show_existing_frame = 1 to show the stored
picture.
2. Temporal Scalability
In scalable video coding scenarios (such as video conferencing or
adaptive streaming), bitstreams are organized into hierarchical temporal
layers. The show_existing_frame syntax allows higher-rate
layers to pull forward base-layer frames or display reference frames at
different timestamps, maintaining flexible framerates without
transmitting redundant visual data.
3. Emulating Complex B-Frame Hierarchies
Decoders often decode forward-reference frames out of chronological
order. With show_existing_frame, an encoder can process a
frame early, use it to predict intermediate bidirectional frames, and
then formally output it at its scheduled display time with near-zero
bitrate overhead.
4. Film Grain Synthesis
AV1 separates synthetic film grain from the underlying compressed frame to save bandwidth. When showing an existing frame, an encoder can signal new film grain parameters to change or refresh the grain noise pattern applied to the retrieved reference frame before it is rendered on screen.
Efficiency Impact
By allowing complete frames to be referenced and displayed using only
a few bytes of header syntax, show_existing_frame
drastically reduces bitrate overhead in complex GOP (Group of Pictures)
structures. It ensures that the display pipeline remains decoupled from
the decoding order, maximizing compression efficiency across diverse
streaming and playback scenarios.