AOMedia AV1 Codec
|
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:
| |
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] |
Top level common structure used by both encoder and decoder.
CurrentFrame AV1Common::current_frame |
Information about the current frame that is being coded.
Referenced by av1_encode(), av1_encode_frame(), av1_encode_strategy(), av1_get_compressed_data(), av1_get_second_pass_params(), av1_rc_pick_q_and_bounds(), av1_rd_pick_inter_mode(), av1_rd_pick_partition(), av1_save_layer_context(), av1_set_rtc_reference_structure_one_layer(), av1_twopass_postencode_update(), dynamic_resize_one_pass_cbr(), encode_b(), encode_frame_internal(), encode_frame_to_data_rate(), encode_with_recode_loop(), encode_without_recode(), find_next_key_frame(), get_rate_correction_factor(), grade_source_content_sb(), motion_mode_rd(), rc_pick_q_and_bounds_no_stats(), rc_pick_q_and_bounds_no_stats_cbr(), recode_loop_update_q(), and set_rate_correction_factor().
struct aom_internal_error_info* AV1Common::error |
Code and details about current error status.
Referenced by av1_encode_strategy(), av1_get_compressed_data(), av1_get_second_pass_params(), av1_receive_raw_frame(), encode_frame_internal(), and encode_without_recode().
int AV1Common::width |
Coded frame width
Referenced by av1_nonrd_pick_inter_mode_sb(), av1_one_pass_cbr_svc_start_layer(), av1_rd_pick_inter_mode(), av1_restore_layer_context(), calculate_gf_length(), define_gf_group(), define_gf_group_pass3(), dynamic_resize_one_pass_cbr(), encode_frame_to_data_rate(), encode_with_recode_loop(), encode_without_recode(), fast_interp_search(), find_predictors(), grade_source_content_sb(), is_calc_src_content_needed(), pick_sb_modes_nonrd(), rc_scene_detection_onepass_rt(), recode_loop_update_q(), and tf_motion_search().
int AV1Common::height |
Coded frame height
Referenced by av1_nonrd_pick_inter_mode_sb(), av1_one_pass_cbr_svc_start_layer(), av1_rd_pick_inter_mode(), av1_restore_layer_context(), calculate_gf_length(), define_gf_group(), define_gf_group_pass3(), dynamic_resize_one_pass_cbr(), encode_frame_to_data_rate(), encode_with_recode_loop(), encode_without_recode(), fast_interp_search(), find_predictors(), grade_source_content_sb(), is_calc_src_content_needed(), pick_sb_modes_nonrd(), rc_scene_detection_onepass_rt(), recode_loop_update_q(), and tf_motion_search().
int AV1Common::render_width |
Rendered frame width
Referenced by encode_with_recode_loop_and_filter(), and rc_scene_detection_onepass_rt().
int AV1Common::render_height |
Rendered frame height
Referenced by encode_with_recode_loop_and_filter(), and rc_scene_detection_onepass_rt().
int AV1Common::superres_upscaled_width |
Super-resolved frame width
int AV1Common::superres_upscaled_height |
Super-resolved frame height
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().
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.
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().
RefCntBuffer* AV1Common::prev_frame |
Buffer where previous frame is stored.
Referenced by encode_frame_internal(), encode_with_recode_loop(), and encode_without_recode().
RefCntBuffer* AV1Common::cur_frame |
Buffer into which the current frame will be stored and other related info. TODO(hkuang): Combine this with cur_buf in macroblockd.
Referenced by av1_encode_frame(), av1_encode_strategy(), av1_rd_pick_inter_mode(), cdef_restoration_frame(), encode_frame_internal(), encode_frame_to_data_rate(), encode_with_recode_loop(), encode_with_recode_loop_and_filter(), encode_without_recode(), loopfilter_frame(), and recode_loop_update_q().
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:
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().
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.
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.
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().
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().
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().
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().
FeatureFlags AV1Common::features |
Whether some features are allowed or not.
Referenced by av1_encode(), av1_encode_frame(), av1_encode_strategy(), av1_get_compressed_data(), av1_interpolation_filter_search(), av1_nonrd_pick_intra_mode(), av1_rd_pick_inter_mode(), av1_rd_pick_intra_sbuv_mode(), av1_rd_pick_intra_sby_mode(), av1_search_intra_uv_modes_in_interframe(), encode_b(), encode_frame_internal(), encode_frame_to_data_rate(), encode_sb_row(), encode_with_recode_loop(), encode_with_recode_loop_and_filter(), encode_without_recode(), fast_interp_search(), find_predictors(), intra_mode_info_cost_uv(), intra_mode_info_cost_y(), loopfilter_frame(), motion_mode_rd(), process_compound_inter_mode(), search_filter_ref(), and tf_motion_search().
CommonModeInfoParams AV1Common::mi_params |
Params related to MB_MODE_INFO arrays and related info.
Referenced by av1_encode_frame(), av1_encode_strategy(), av1_encodedframe_overshoot_cbr(), av1_init_layer_context(), av1_nonrd_pick_inter_mode_sb(), av1_nonrd_use_partition(), av1_one_pass_cbr_svc_start_layer(), av1_rd_use_partition(), av1_tf_do_filtering_row(), av1_update_layer_context_change_config(), define_kf_interval(), encode_frame_internal(), encode_nonrd_sb(), encode_rd_sb(), encode_sb(), encode_sb_row(), encode_without_recode(), get_sb_source_sad(), get_twopass_worst_quality(), handle_inter_mode(), pick_sb_modes_nonrd(), rc_scene_detection_onepass_rt(), rc_spatial_act_keyframe_onepass_rt(), and setup_delta_q().
CommonQuantParams AV1Common::quant_params |
Quantization params.
Referenced by av1_encode_strategy(), av1_get_compressed_data(), av1_handle_intra_y_mode(), av1_postencode_drop_cbr(), av1_rc_update_rate_correction_factors(), av1_twopass_postencode_update(), encode_frame_internal(), encode_frame_to_data_rate(), encode_sb_row(), encode_with_recode_loop(), encode_with_recode_loop_and_filter(), encode_without_recode(), and setup_delta_q().
struct segmentation AV1Common::seg |
Segmentation info for current frame.
Referenced by av1_encode_frame(), av1_nonrd_pick_inter_mode_sb(), av1_rc_update_rate_correction_factors(), av1_rd_pick_inter_mode(), encode_b(), encode_frame_internal(), encode_frame_to_data_rate(), encode_sb_row(), encode_with_recode_loop(), encode_without_recode(), pick_sb_modes(), and pick_sb_modes_nonrd().
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().
loop_filter_info_n AV1Common::lf_info |
Loop filter info
struct loopfilter AV1Common::lf |
Loop filter parameters
Referenced by encode_frame_internal(), encode_frame_to_data_rate(), and loopfilter_frame().
RestorationInfo AV1Common::rst_info[3] |
Loop Restoration filter info
Referenced by cdef_restoration_frame().
int32_t* AV1Common::rst_tmpbuf |
Scratch buffer for self-guided restoration
RestorationLineBuffers* AV1Common::rlbs |
Line buffers needed by loop restoration
YV12_BUFFER_CONFIG AV1Common::rst_frame |
Stores the output of loop restoration
CdefInfo AV1Common::cdef_info |
CDEF (Constrained Directional Enhancement Filter) parameters.
aom_film_grain_t AV1Common::film_grain_params |
Parameters for film grain synthesis.
Referenced by av1_encode_strategy().
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().
WarpedMotionParams AV1Common::global_motion[REF_FRAMES] |
Global motion parameters for each reference frame.
SequenceHeader* AV1Common::seq_params |
Elements part of the sequence header, that are applicable for all the frames in the video.
Referenced by av1_encode(), av1_encode_strategy(), av1_encode_tile(), av1_encodedframe_overshoot_cbr(), av1_get_compressed_data(), av1_handle_intra_y_mode(), av1_interpolation_filter_search(), av1_nonrd_pick_inter_mode_sb(), av1_rd_pick_inter_mode(), av1_rd_pick_intra_sbuv_mode(), av1_rd_pick_intra_sby_mode(), av1_rd_pick_partition(), av1_rd_use_partition(), av1_receive_raw_frame(), av1_twopass_postencode_update(), encode_b(), encode_frame_internal(), encode_frame_to_data_rate(), encode_nonrd_sb(), encode_rd_sb(), encode_sb_row(), encode_with_recode_loop(), encode_with_recode_loop_and_filter(), encode_without_recode(), fast_interp_search(), get_sb_source_sad(), get_twopass_worst_quality(), intra_mode_info_cost_uv(), intra_mode_info_cost_y(), is_calc_src_content_needed(), motion_mode_rd(), palette_rd_y(), pick_sb_modes(), pick_sb_modes_nonrd(), process_compound_inter_mode(), rc_pick_q_and_bounds_no_stats(), rc_scene_detection_onepass_rt(), rc_spatial_act_keyframe_onepass_rt(), rd_pick_intrabc_mode_sb(), recode_loop_update_q(), search_filter_ref(), setup_delta_q(), and tf_setup_filtering_buffer().
FRAME_CONTEXT* AV1Common::fc |
Current CDFs of all the symbols for the current frame.
Referenced by encode_frame_to_data_rate().
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.
CommonTileParams AV1Common::tiles |
Parameters related to tiling.
Referenced by av1_encode_frame(), av1_encode_sb_row(), av1_encode_tile(), encode_frame_internal(), encode_frame_to_data_rate(), encode_rd_sb(), and encode_tiles().
BufferPool* AV1Common::buffer_pool |
External BufferPool passed from outside.
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().
int AV1Common::current_frame_id |
frame ID for the current frame.
Referenced by encode_frame_to_data_rate().
int AV1Common::ref_frame_id[REF_FRAMES] |
frame IDs for the reference frames.
Referenced by encode_frame_to_data_rate().
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
int AV1Common::tpl_mvs_mem_size |
Allocated size of 'tpl_mvs' array. Refer to 'ensure_mv_buffer()' function.
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.
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.
int AV1Common::temporal_layer_id |
Temporal layer ID of this frame (in the range 0 ... (number_temporal_layers - 1)).
int AV1Common::spatial_layer_id |
Spatial layer ID of this frame (in the range 0 ... (number_spatial_layers - 1)).