![]() |
AOMedia AV1 Codec
|
![]() |
Functions | |
static void | calculate_gf_length (AV1_COMP *cpi, int max_gop_length, int max_intervals) |
Determine the length of future GF groups. More... | |
static void | define_gf_group_pass0 (AV1_COMP *cpi) |
Define a GF group in one pass mode when no look ahead stats are available. More... | |
static void | define_gf_group (AV1_COMP *cpi, FIRSTPASS_STATS *this_frame, EncodeFrameParams *frame_params, int max_gop_length, int is_final_pass) |
Define a GF group. More... | |
static int | define_kf_interval (AV1_COMP *cpi, FIRSTPASS_STATS *this_frame, double *kf_group_err, int num_frames_to_detect_scenecut) |
Determine the location of the next key frame. More... | |
static void | find_next_key_frame (AV1_COMP *cpi, FIRSTPASS_STATS *this_frame) |
Determine the next key frame group. More... | |
Algorithms regarding determining the length of GF groups and defining GF group structures.
|
static |
Determine the length of future GF groups.
This function decides the gf group length of future frames in batch
[in] | cpi | Top-level encoder structure |
[in] | max_gop_length | Maximum length of the GF group |
[in] | max_intervals | Maximum number of intervals to decide |
References RATE_CONTROL::cur_gf_index, AV1_COMP::frame_info, RATE_CONTROL::frames_to_key, KeyFrameCfg::fwd_kf_enabled, RATE_CONTROL::gf_intervals, AV1_COMP::gf_state, has_no_stats_stage(), RATE_CONTROL::intervals_till_gf_calculate_due, AV1EncoderConfig::kf_cfg, AV1_COMP::lap_enabled, AV1_COMP::oxcf, AV1_COMP::rc, and AV1_COMP::twopass.
Referenced by av1_get_second_pass_params().
|
static |
Define a GF group in one pass mode when no look ahead stats are available.
This function defines the structure of a GF group, along with various parameters regarding bit-allocation and quality setup in the special case of one pass encoding where no lookahead stats are avialable.
[in] | cpi | Top-level encoder structure |
References AOM_CBR, av1_calc_iframe_target_size_one_pass_cbr(), av1_calc_iframe_target_size_one_pass_vbr(), av1_calc_pframe_target_size_one_pass_cbr(), av1_calc_pframe_target_size_one_pass_vbr(), av1_cyclic_refresh_set_golden_update(), av1_gop_setup_structure(), RATE_CONTROL::cur_gf_index, RATE_CONTROL::frames_to_key, AV1_COMP::gf_group, RATE_CONTROL::gf_intervals, RATE_CONTROL::gfu_boost, RATE_CONTROL::intervals_till_gf_calculate_due, RateControlCfg::mode, AV1_COMP::oxcf, AV1_COMP::rc, and AV1EncoderConfig::rc_cfg.
Referenced by define_gf_group().
|
static |
Define a GF group.
This function defines the structure of a GF group, along with various parameters regarding bit-allocation and quality setup.
[in] | cpi | Top-level encoder structure |
[in] | this_frame | First pass statistics structure |
[in] | frame_params | Structure with frame parameters |
[in] | max_gop_length | Maximum length of the GF group |
[in] | is_final_pass | Whether this is the final pass for the GF group, or a trial (non-zero) |
References RATE_CONTROL::active_worst_quality, AOM_Q, av1_gop_bit_allocation(), av1_gop_setup_structure(), calculate_total_gf_group_bits(), FIRSTPASS_STATS::coded_error, AV1_COMP::common, RateControlCfg::cq_level, RATE_CONTROL::cur_gf_index, define_gf_group_pass0(), AV1_COMP::frame_info, EncodeFrameParams::frame_type, RATE_CONTROL::frames_till_gf_update_due, RATE_CONTROL::frames_to_key, get_twopass_worst_quality(), AV1_COMP::gf_frame_index, AV1_COMP::gf_group, RATE_CONTROL::gf_group_bits, RATE_CONTROL::gf_intervals, AV1_COMP::gf_state, RATE_CONTROL::gfu_boost, has_no_stats_stage(), AV1_COMP::initial_mbs, AV1_PRIMARY::internal_altref_allowed, RATE_CONTROL::intervals_till_gf_calculate_due, AV1_COMP::lap_enabled, CommonModeInfoParams::mb_rows, CommonModeInfoParams::MBs, AV1Common::mi_params, RateControlCfg::mode, AV1_COMP::oxcf, AV1_COMP::ppi, AV1_COMP::rc, AV1EncoderConfig::rc_cfg, EncodeFrameParams::show_frame, FIRSTPASS_STATS::sr_coded_error, FIRSTPASS_STATS::tr_coded_error, and AV1_COMP::twopass.
Referenced by av1_get_second_pass_params().
|
static |
Determine the location of the next key frame.
This function decides the placement of the next key frame when a scenecut is detected or the maximum key frame distance is reached.
[in] | cpi | Top-level encoder structure |
[in] | this_frame | Pointer to first pass stats |
[out] | kf_group_err | The total error in the KF group |
[in] | num_frames_to_detect_scenecut | Maximum lookahead frames. |
References KeyFrameCfg::auto_key, AV1_COMP::frame_info, RATE_CONTROL::frames_to_key, KeyFrameCfg::fwd_kf_enabled, KeyFrameCfg::key_freq_max, KeyFrameCfg::key_freq_min, AV1EncoderConfig::kf_cfg, AV1_COMP::lap_enabled, RateControlCfg::mode, AV1_COMP::oxcf, AV1_COMP::rc, AV1EncoderConfig::rc_cfg, and AV1_COMP::twopass.
Referenced by av1_get_second_pass_params(), and find_next_key_frame().
|
static |
Determine the next key frame group.
This function decides the placement of the next key frame, and calculates the bit allocation of the KF group and the keyframe itself.
[in] | cpi | Top-level encoder structure |
[in] | this_frame | Pointer to first pass stats |
References AOM_Q, KeyFrameCfg::auto_key, AV1_COMP::common, AV1Common::current_frame, define_kf_interval(), AV1_COMP::frame_info, AV1_COMP::framerate, RATE_CONTROL::frames_till_gf_update_due, RATE_CONTROL::frames_to_key, KeyFrameCfg::fwd_kf_enabled, AV1_COMP::gf_frame_index, AV1_COMP::gf_group, has_no_stats_stage(), FIRSTPASS_STATS::intra_error, KeyFrameCfg::key_freq_max, RATE_CONTROL::kf_boost, AV1EncoderConfig::kf_cfg, AV1_COMP::lap_enabled, RateControlCfg::mode, AV1_COMP::oxcf, AV1_COMP::rc, AV1EncoderConfig::rc_cfg, AV1_COMP::twopass, and RateControlCfg::vbr_corpus_complexity_lap.
Referenced by av1_get_second_pass_params().