| AOMedia AV1 Codec

AV1_PRIMARY Struct Reference

Top level primary encoder structure. More...

`#include <encoder.h>`

## Data Fields
struct AV1_COMP * | parallel_cpi [4]
struct AV1_COMP_DATA | parallel_frames_data [4 - 1]
RefCntBuffer * | ref_frame_map_copy [REF_FRAMES]
int64_t | ts_start_last_show_frame
int64_t | ts_end_last_show_frame
int | num_fp_contexts
int | filter_level [2]
int | filter_level_u
int | filter_level_v
struct AV1_COMP * | cpi
struct AV1_COMP * | cpi_lap
struct lookahead_ctx * | lookahead
int | seq_params_locked
struct aom_codec_pkt_list * | output_pkt_list
int | internal_altref_allowed
int | show_existing_alt_ref
GF_GROUP | gf_group
GF_STATE | gf_state
int | lap_enabled
AV1LevelParams | level_params
int | b_calculate_psnr
int | frames_left
TWO_PASS | twopass
PRIMARY_RATE_CONTROL | p_rc
TEMPORAL_FILTER_INFO | tf_info
SequenceHeader | seq_params
int | use_svc
bool | buffer_removal_time_present
unsigned int | number_temporal_layers
unsigned int | number_spatial_layers
struct aom_internal_error_info | error
aom_variance_fn_ptr_t | fn_ptr [BLOCK_SIZES_ALL]
double * | tpl_sb_rdmult_scaling_factors
TplParams | tpl_data
MV_STATS | mv_stats
int | fb_of_context_type [REF_FRAMES]
PrimaryMultiThreadInfo | p_mt_info
FrameProbInfo | frame_probs
int | valid_gm_model_found [FRAME_UPDATE_TYPES]
RTC_REF | rtc_ref
AV1EncRowMultiThreadSync | intra_row_mt_sync
int | b_freeze_internal_state

## Detailed Description

Top level primary encoder structure.

## Field Documentation

## ◆ parallel_cpi

struct AV1_COMP* AV1_PRIMARY::parallel_cpi[4]

Array of frame level encoder stage top level structures

## ◆ parallel_frames_data

struct AV1_COMP_DATA AV1_PRIMARY::parallel_frames_data[4 - 1]

Array of structures to hold data of frames encoded in a given parallel encode set.

## ◆ ref_frame_map_copy

RefCntBuffer* AV1_PRIMARY::ref_frame_map_copy[REF_FRAMES]

Copy of cm->ref_frame_map maintained to facilitate sequential update of ref_frame_map by lower layer depth frames encoded ahead of time in a parallel encode set.

## ◆ ts_start_last_show_frame

int64_t AV1_PRIMARY::ts_start_last_show_frame

Start time stamp of the last encoded show frame

## ◆ ts_end_last_show_frame

int64_t AV1_PRIMARY::ts_end_last_show_frame

End time stamp of the last encoded show frame

## ◆ num_fp_contexts

int AV1_PRIMARY::num_fp_contexts

Number of frame level contexts(cpis)

## ◆ filter_level

int AV1_PRIMARY::filter_level[2]

Loopfilter levels of the previous encoded frame.

## ◆ filter_level_u

int AV1_PRIMARY::filter_level_u

Chrominance component loopfilter level of the previous encoded frame.

## ◆ filter_level_v

int AV1_PRIMARY::filter_level_v

Chrominance component loopfilter level of the previous encoded frame.

## ◆ cpi

struct AV1_COMP* AV1_PRIMARY::cpi

Encode stage top level structure During frame parallel encode, this is the same as parallel_cpi[0]

## ◆ cpi_lap

struct AV1_COMP* AV1_PRIMARY::cpi_lap

Lookahead processing stage top level structure

## ◆ lookahead

struct lookahead_ctx* AV1_PRIMARY::lookahead

Look-ahead context.

Referenced by av1_encode_strategy(), av1_receive_raw_frame(), and tf_setup_filtering_buffer().

## ◆ seq_params_locked

int AV1_PRIMARY::seq_params_locked

Sequence parameters have been transmitted already and locked or not. Once locked av1_change_config cannot change the seq parameters. Note that for SVC encoding the sequence parameters (operating_points_cnt_minus_1, operating_point_idc[], has_nonzero_operating_point_idc) should be updated whenever the number of layers is changed. This is done in the ctrl_set_svc_params().

## ◆ output_pkt_list

struct aom_codec_pkt_list* AV1_PRIMARY::output_pkt_list

Pointer to internal utility functions that manipulate aom_codec_* data structures.

## ◆ internal_altref_allowed

int AV1_PRIMARY::internal_altref_allowed

When set, indicates that internal ARFs are enabled.

Referenced by define_gf_group().

## ◆ show_existing_alt_ref

int AV1_PRIMARY::show_existing_alt_ref

Tell if OVERLAY frame shows existing alt_ref frame.

Referenced by av1_encode_strategy().

## ◆ gf_group

GF_GROUP AV1_PRIMARY::gf_group

Information related to a gf group.

Referenced by av1_encode(), av1_encode_strategy(), av1_get_compressed_data(), av1_get_second_pass_params(), av1_rc_pick_q_and_bounds(), av1_rd_pick_partition(), av1_tf_do_filtering_row(), av1_twopass_postencode_update(), define_gf_group(), define_gf_group_pass0(), encode_frame_internal(), encode_frame_to_data_rate(), encode_with_recode_loop(), encode_without_recode(), find_next_key_frame(), get_q(), get_rate_correction_factor(), motion_mode_rd(), rc_pick_q_and_bounds(), rc_pick_q_and_bounds_no_stats(), recode_loop_update_q(), set_rate_correction_factor(), and tf_setup_filtering_buffer().

## ◆ gf_state

GF_STATE AV1_PRIMARY::gf_state

Track prior gf group state.

Referenced by av1_get_second_pass_params(), and calculate_gf_length().

## ◆ lap_enabled

int AV1_PRIMARY::lap_enabled

Flag indicating whether look ahead processing (LAP) is enabled.

Referenced by av1_get_second_pass_params(), av1_twopass_postencode_update(), calculate_gf_length(), define_gf_group(), define_kf_interval(), find_next_key_frame(), and has_no_stats_stage().

## ◆ level_params

AV1LevelParams AV1_PRIMARY::level_params

Parameters for AV1 bitstream levels.

Referenced by recode_loop_update_q().

## ◆ b_calculate_psnr

int AV1_PRIMARY::b_calculate_psnr

Calculates PSNR on each frame when set to 1.

## ◆ frames_left

int AV1_PRIMARY::frames_left

Number of frames left to be encoded, is 0 if limit is not set.

## ◆ twopass

TWO_PASS AV1_PRIMARY::twopass

Information related to two pass encoding.

Referenced by av1_encode_strategy(), av1_get_second_pass_params(), av1_twopass_postencode_update(), calculate_gf_length(), calculate_total_gf_group_bits(), define_gf_group(), define_kf_interval(), find_next_key_frame(), get_q(), get_twopass_worst_quality(), and tf_setup_filtering_buffer().

## ◆ p_rc

PRIMARY_RATE_CONTROL AV1_PRIMARY::p_rc

Rate control related parameters.

Referenced by av1_encode_strategy(), av1_encodedframe_overshoot_cbr(), av1_get_second_pass_params(), av1_gop_bit_allocation(), av1_postencode_drop_cbr(), av1_rc_pick_q_and_bounds(), av1_restore_layer_context(), av1_save_layer_context(), av1_twopass_postencode_update(), av1_update_layer_context_change_config(), calculate_gf_length(), calculate_total_gf_group_bits(), define_gf_group(), define_gf_group_pass0(), define_kf_interval(), dynamic_resize_one_pass_cbr(), encode_with_recode_loop_and_filter(), find_next_key_frame(), get_q(), get_rate_correction_factor(), rc_pick_q_and_bounds(), rc_pick_q_and_bounds_no_stats(), rc_pick_q_and_bounds_no_stats_cbr(), recode_loop_update_q(), set_rate_correction_factor(), and tf_setup_filtering_buffer().

## ◆ tf_info

TEMPORAL_FILTER_INFO AV1_PRIMARY::tf_info

Info and resources used by temporal filtering.

Referenced by av1_get_second_pass_params().

## ◆ seq_params

SequenceHeader AV1_PRIMARY::seq_params

Elements part of the sequence header, that are applicable for all the frames in the video.

## ◆ use_svc

int AV1_PRIMARY::use_svc

Indicates whether to use SVC.

Referenced by av1_encode_strategy(), av1_get_compressed_data(), av1_nonrd_pick_inter_mode_sb(), av1_rc_update_rate_correction_factors(), encode_nonrd_sb(), encode_without_recode(), get_rate_correction_factor(), grade_source_content_sb(), and set_rate_correction_factor().

## ◆ buffer_removal_time_present

bool AV1_PRIMARY::buffer_removal_time_present

If true, buffer removal times are present.

## ◆ number_temporal_layers

unsigned int AV1_PRIMARY::number_temporal_layers

Number of temporal layers: may be > 1 for SVC (scalable vector coding).

## ◆ number_spatial_layers

unsigned int AV1_PRIMARY::number_spatial_layers

Number of spatial layers: may be > 1 for SVC (scalable vector coding).

## ◆ error

struct aom_internal_error_info AV1_PRIMARY::error

Code and details about current error status.

## ◆ fn_ptr

aom_variance_fn_ptr_t AV1_PRIMARY::fn_ptr[BLOCK_SIZES_ALL]

Function pointers to variants of sse/sad/variance computation functions. fn_ptr[i] indicates the list of function pointers corresponding to block size i.

Referenced by av1_tf_do_filtering_row(), handle_inter_mode(), rc_spatial_act_onepass_rt(), and tf_motion_search().

## ◆ tpl_sb_rdmult_scaling_factors

double* AV1_PRIMARY::tpl_sb_rdmult_scaling_factors

tpl_sb_rdmult_scaling_factors[i] stores the RD multiplier scaling factor of the ith 16 x 16 block in raster scan order.

## ◆ tpl_data

TplParams AV1_PRIMARY::tpl_data

Parameters related to tpl.

Referenced by av1_encode(), av1_encode_strategy(), av1_get_second_pass_params(), and handle_inter_mode().

## ◆ mv_stats

MV_STATS AV1_PRIMARY::mv_stats

Motion vector stats of the previous encoded frame.

Referenced by av1_encode_strategy().

## ◆ fb_of_context_type

int AV1_PRIMARY::fb_of_context_type[REF_FRAMES]

For each type of reference frame, this contains the index of a reference frame buffer for a reference frame of the same type. We use this to choose our primary reference frame (which is the most recent reference frame of the same type as the current frame).

## ◆ p_mt_info

PrimaryMultiThreadInfo AV1_PRIMARY::p_mt_info

Primary Multi-threading parameters.

## ◆ frame_probs

FrameProbInfo AV1_PRIMARY::frame_probs

Probabilities for pruning of various AV1 tools.

Referenced by av1_twopass_postencode_update(), encode_frame_internal(), and motion_mode_rd().

## ◆ valid_gm_model_found

int AV1_PRIMARY::valid_gm_model_found[FRAME_UPDATE_TYPES]

Indicates if a valid global motion model has been found in the different frame update types of a GF group. valid_gm_model_found[i] indicates if valid global motion model has been found in the frame update type with enum value equal to i

## ◆ rtc_ref

RTC_REF AV1_PRIMARY::rtc_ref

Struct for the reference structure for RTC.

Referenced by av1_check_ref_is_low_spatial_res_super_frame(), av1_encode_strategy(), av1_restore_layer_context(), av1_set_rtc_reference_structure_one_layer(), cdef_restoration_frame(), encode_frame_to_data_rate(), encode_nonrd_sb(), encode_with_recode_loop_and_filter(), encode_without_recode(), and loopfilter_frame().

## ◆ intra_row_mt_sync

AV1EncRowMultiThreadSync AV1_PRIMARY::intra_row_mt_sync

Struct for all intra mode row multi threading in the preprocess stage when –deltaq-mode=3.

## ◆ b_freeze_internal_state

int AV1_PRIMARY::b_freeze_internal_state

If set to 1, the encoder should not update any internal state after completing the encode. E.g. no updates to reference buffers, CDF tables or RC state.

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

- av1/encoder/encoder.h