AOMedia AV1 Codec
AV1Common Struct Reference

Top level common structure used by both encoder and decoder. More...

#include <av1_common_int.h>

Data Fields

CurrentFrame current_frame
 
struct aom_internal_error_info * error
 
uint8_t superres_scale_denominator
 
uint32_t buffer_removal_times [(8 *4)+1]
 
uint32_t frame_presentation_time
 
RefCntBuffer * prev_frame
 
RefCntBuffer * cur_frame
 
int remapped_ref_idx [REF_FRAMES]
 
struct scale_factors sf_identity
 
struct scale_factors ref_scale_factors [REF_FRAMES]
 
RefCntBuffer * ref_frame_map [REF_FRAMES]
 
int show_frame
 
int showable_frame
 
int show_existing_frame
 
FeatureFlags features
 
CommonModeInfoParams mi_params
 
CommonQuantParams quant_params
 
struct segmentation seg
 
uint8_t * last_frame_seg_map
 
CdefInfo cdef_info
 
aom_film_grain_t film_grain_params
 
DeltaQInfo delta_q_info
 
WarpedMotionParams global_motion [REF_FRAMES]
 
SequenceHeader * seq_params
 
FRAME_CONTEXT * fc
 
FRAME_CONTEXT * default_frame_context
 
CommonTileParams tiles
 
BufferPool * buffer_pool
 
CommonContexts above_contexts
 
TPL_MV_REF * tpl_mvs
 
int tpl_mvs_mem_size
 
int ref_frame_sign_bias [REF_FRAMES]
 
int8_t ref_frame_side [REF_FRAMES]
 
int temporal_layer_id
 
int spatial_layer_id
 
Coded frame dimensions.

AV1 allows two types of frame scaling operations:

  1. Frame super-resolution: that allows coding a frame at lower resolution and after decoding the frame, normatively scales and restores the frame – inside the coding loop.
  2. Frame resize: that allows coding frame at lower/higher resolution, and then non-normatively upscale the frame at the time of rendering – outside the coding loop. Hence, the need for 3 types of dimensions.
int width
 
int height
 
Rendered frame dimensions.

Dimensions after applying both super-resolution and resize to the coded frame. Different from coded dimensions if super-resolution and/or resize are being used for this frame.

int render_width
 
int render_height
 
Super-resolved frame dimensions.

Frame dimensions after applying super-resolution to the coded frame (if present), but before applying resize. Larger than the coded dimensions if super-resolution is being used for this frame. Different from rendered dimensions if resize is being used for this frame.

int superres_upscaled_width
 
int superres_upscaled_height
 
Deblocking filter parameters.
loop_filter_info_n lf_info
 
struct loopfilter lf
 
Loop Restoration filter parameters.
RestorationInfo rst_info [3]
 
int32_t * rst_tmpbuf
 
RestorationLineBuffers * rlbs
 
YV12_BUFFER_CONFIG rst_frame
 
Signaled when cm->seq_params->frame_id_numbers_present_flag == 1
int current_frame_id
 
int ref_frame_id [REF_FRAMES]
 

Detailed Description

Top level common structure used by both encoder and decoder.

Field Documentation

◆ current_frame

◆ error

struct aom_internal_error_info* AV1Common::error

◆ width

◆ height

◆ render_width

int AV1Common::render_width

◆ render_height

int AV1Common::render_height

Rendered frame height

Referenced by encode_with_recode_loop_and_filter(), and rc_scene_detection_onepass_rt().

◆ superres_upscaled_width

int AV1Common::superres_upscaled_width

Super-resolved frame width

◆ superres_upscaled_height

int AV1Common::superres_upscaled_height

Super-resolved frame height

◆ superres_scale_denominator

uint8_t AV1Common::superres_scale_denominator

The denominator of the superres scale used by this frame. Note: The numerator is fixed to be SCALE_NUMERATOR.

Referenced by encode_with_recode_loop(), rc_pick_q_and_bounds(), and rc_pick_q_and_bounds_no_stats().

◆ buffer_removal_times

uint32_t AV1Common::buffer_removal_times[(8 *4)+1]

buffer_removal_times[op_num] specifies the frame removal time in units of DecCT clock ticks counted from the removal time of the last random access point for operating point op_num. TODO(urvang): We probably don't need the +1 here.

◆ frame_presentation_time

uint32_t AV1Common::frame_presentation_time

Presentation time of the frame in clock ticks DispCT counted from the removal time of the last random access point for the operating point that is being decoded.

Referenced by av1_encode_strategy().

◆ prev_frame

RefCntBuffer* AV1Common::prev_frame

Buffer where previous frame is stored.

Referenced by encode_frame_internal(), encode_with_recode_loop(), and encode_without_recode().

◆ cur_frame

RefCntBuffer* AV1Common::cur_frame

◆ remapped_ref_idx

int AV1Common::remapped_ref_idx[REF_FRAMES]

For encoder, we have a two-level mapping from reference frame type to the corresponding buffer in the buffer pool:

  • 'remapped_ref_idx[i - 1]' maps reference type 'i' (range: LAST_FRAME ... EXTREF_FRAME) to a remapped index 'j' (in range: 0 ... REF_FRAMES - 1)
  • Later, 'cm->ref_frame_map[j]' maps the remapped index 'j' to a pointer to the reference counted buffer structure RefCntBuffer, taken from the buffer pool cm->buffer_pool->frame_bufs.

LAST_FRAME, ..., EXTREF_FRAME | | v v remapped_ref_idx[LAST_FRAME - 1], ..., remapped_ref_idx[EXTREF_FRAME - 1] | | v v ref_frame_map[], ..., ref_frame_map[]

Note: INTRA_FRAME always refers to the current frame, so there's no need to have a remapped index for the same.

Referenced by av1_encode(), and av1_encode_strategy().

◆ sf_identity

struct scale_factors AV1Common::sf_identity

Scale of the current frame with respect to itself. This is currently used for intra block copy, which behaves like an inter prediction mode, where the reference frame is the current frame itself.

◆ ref_scale_factors

struct scale_factors AV1Common::ref_scale_factors[REF_FRAMES]

Scale factors of the reference frame with respect to the current frame. This is required for generating inter prediction and will be non-identity for a reference frame, if it has different dimensions than the coded dimensions of the current frame.

◆ ref_frame_map

RefCntBuffer* AV1Common::ref_frame_map[REF_FRAMES]

For decoder, ref_frame_map[i] maps reference type 'i' to a pointer to the buffer in the buffer pool 'cm->buffer_pool.frame_bufs'. For encoder, ref_frame_map[j] (where j = remapped_ref_idx[i]) maps remapped reference index 'j' (that is, original reference type 'i') to a pointer to the buffer in the buffer pool 'cm->buffer_pool.frame_bufs'.

Referenced by av1_encode_strategy().

◆ show_frame

int AV1Common::show_frame

If true, this frame is actually shown after decoding. If false, this frame is coded in the bitstream, but not shown. It is only used as a reference for other frames coded later.

Referenced by av1_encode(), av1_get_compressed_data(), av1_rd_pick_partition(), av1_twopass_postencode_update(), and encode_frame_to_data_rate().

◆ showable_frame

int AV1Common::showable_frame

If true, this frame can be used as a show-existing frame for other frames coded later. When 'show_frame' is true, this is always true for all non-keyframes. When 'show_frame' is false, this value is transmitted in the bitstream.

Referenced by av1_get_compressed_data().

◆ show_existing_frame

int AV1Common::show_existing_frame

If true, show an existing frame coded before, instead of actually coding a frame. The existing frame comes from one of the existing reference buffers, as signaled in the bitstream.

Referenced by av1_encode(), and av1_get_compressed_data().

◆ features

◆ mi_params

◆ quant_params

◆ seg

◆ last_frame_seg_map

uint8_t* AV1Common::last_frame_seg_map

Segmentation map for previous frame.

Referenced by encode_frame_internal(), encode_frame_to_data_rate(), and encode_sb_row().

◆ lf_info

loop_filter_info_n AV1Common::lf_info

Loop filter info

◆ lf

struct loopfilter AV1Common::lf

Loop filter parameters

Referenced by encode_frame_internal(), encode_frame_to_data_rate(), and loopfilter_frame().

◆ rst_info

RestorationInfo AV1Common::rst_info[3]

Loop Restoration filter info

Referenced by cdef_restoration_frame().

◆ rst_tmpbuf

int32_t* AV1Common::rst_tmpbuf

Scratch buffer for self-guided restoration

◆ rlbs

RestorationLineBuffers* AV1Common::rlbs

Line buffers needed by loop restoration

◆ rst_frame

YV12_BUFFER_CONFIG AV1Common::rst_frame

Stores the output of loop restoration

◆ cdef_info

CdefInfo AV1Common::cdef_info

CDEF (Constrained Directional Enhancement Filter) parameters.

◆ film_grain_params

aom_film_grain_t AV1Common::film_grain_params

Parameters for film grain synthesis.

Referenced by av1_encode_strategy().

◆ delta_q_info

DeltaQInfo AV1Common::delta_q_info

Parameters for delta quantization and delta loop filter level.

Referenced by encode_b(), encode_frame_internal(), encode_rd_sb(), encode_sb_row(), encode_with_recode_loop(), and setup_delta_q().

◆ global_motion

WarpedMotionParams AV1Common::global_motion[REF_FRAMES]

Global motion parameters for each reference frame.

◆ seq_params

◆ fc

FRAME_CONTEXT* AV1Common::fc

Current CDFs of all the symbols for the current frame.

Referenced by encode_frame_to_data_rate().

◆ default_frame_context

FRAME_CONTEXT* AV1Common::default_frame_context

Default CDFs used when features.primary_ref_frame = PRIMARY_REF_NONE (e.g. for a keyframe). These default CDFs are defined by the bitstream and copied from default CDF tables for each symbol.

◆ tiles

◆ buffer_pool

BufferPool* AV1Common::buffer_pool

External BufferPool passed from outside.

◆ above_contexts

CommonContexts AV1Common::above_contexts

Above context buffers and their sizes. Note: above contexts are allocated in this struct, as their size is dependent on frame width, while left contexts are declared and allocated in MACROBLOCKD struct, as they have a fixed size.

Referenced by av1_encode_tile(), av1_nonrd_use_partition(), av1_rd_pick_partition(), and av1_rd_use_partition().

◆ current_frame_id

int AV1Common::current_frame_id

frame ID for the current frame.

Referenced by encode_frame_to_data_rate().

◆ ref_frame_id

int AV1Common::ref_frame_id[REF_FRAMES]

frame IDs for the reference frames.

Referenced by encode_frame_to_data_rate().

◆ tpl_mvs

TPL_MV_REF* AV1Common::tpl_mvs

Motion vectors provided by motion field estimation. tpl_mvs[row * stride + col] stores MV for block at [mi_row, mi_col] where: mi_row = 2 * row, mi_col = 2 * col, and stride = cm->mi_params.mi_stride / 2

◆ tpl_mvs_mem_size

int AV1Common::tpl_mvs_mem_size

Allocated size of 'tpl_mvs' array. Refer to 'ensure_mv_buffer()' function.

◆ ref_frame_sign_bias

int AV1Common::ref_frame_sign_bias[REF_FRAMES]

ref_frame_sign_bias[k] is 1 if relative distance between reference 'k' and current frame is positive; and 0 otherwise.

◆ ref_frame_side

int8_t AV1Common::ref_frame_side[REF_FRAMES]

ref_frame_side[k] is 1 if relative distance between reference 'k' and current frame is positive, -1 if relative distance is 0; and 0 otherwise. TODO(jingning): This can be combined with sign_bias later.

◆ temporal_layer_id

int AV1Common::temporal_layer_id

Temporal layer ID of this frame (in the range 0 ... (number_temporal_layers - 1)).

◆ spatial_layer_id

int AV1Common::spatial_layer_id

Spatial layer ID of this frame (in the range 0 ... (number_spatial_layers - 1)).


The documentation for this struct was generated from the following file: