AOMedia AV1 Codec
|
Data Structures | |
struct | LAYER_CONTEXT |
The stucture of quantities related to each spatial and temporal layer. More... | |
struct | SVC |
The stucture of SVC. More... | |
Typedefs | |
typedef struct SVC | SVC |
The stucture of SVC. | |
Functions | |
void | av1_init_layer_context (struct AV1_COMP *const cpi) |
Initialize layer context data from init_config(). | |
bool | av1_alloc_layer_context (struct AV1_COMP *cpi, int num_layers) |
Allocate layer context data. | |
void | av1_update_layer_context_change_config (struct AV1_COMP *const cpi, const int64_t target_bandwidth) |
Update the layer context from a change_config() call. | |
void | av1_update_temporal_layer_framerate (struct AV1_COMP *const cpi) |
Prior to encoding the frame, update framerate-related quantities for the current temporal layer. | |
bool | av1_check_ref_is_low_spatial_res_super_frame (struct AV1_COMP *const cpi, int ref_frame) |
Prior to check if reference is lower spatial layer at the same timestamp/superframe. | |
void | av1_restore_layer_context (struct AV1_COMP *const cpi) |
Prior to encoding the frame, set the layer context, for the current layer to be encoded, to the cpi struct. | |
void | av1_save_layer_context (struct AV1_COMP *const cpi) |
Save the layer context after encoding the frame. | |
void | av1_free_svc_cyclic_refresh (struct AV1_COMP *const cpi) |
Free the memory used for cyclic refresh in layer context. | |
void | av1_svc_reset_temporal_layers (struct AV1_COMP *const cpi, int is_key) |
Reset on key frame: reset counters, references and buffer updates. | |
void | av1_one_pass_cbr_svc_start_layer (struct AV1_COMP *const cpi) |
Before encoding, set resolutions and allocate compressor data. | |
int | av1_svc_primary_ref_frame (const struct AV1_COMP *const cpi) |
Get primary reference frame for current layer. | |
void | av1_get_layer_resolution (const int width_org, const int height_org, const int num, const int den, int *width_out, int *height_out) |
Get resolution for current layer. | |
This module describes scalable video coding algorithm in AV1. More details will be added.
void av1_init_layer_context | ( | struct AV1_COMP *const | cpi | ) |
Initialize layer context data from init_config().
[in] | cpi | Top level encoder structure |
References LAYER_CONTEXT::actual_num_seg1_blocks, LAYER_CONTEXT::actual_num_seg2_blocks, PRIMARY_RATE_CONTROL::avg_frame_qindex, PRIMARY_RATE_CONTROL::avg_q, RATE_CONTROL::best_quality, PRIMARY_RATE_CONTROL::bits_off_target, PRIMARY_RATE_CONTROL::buffer_level, AV1_COMP::common, LAYER_CONTEXT::counter_encode_maxq_scene_change, downsample_filter_phase, downsample_filter_type, drop_spatial_layer, force_zero_mode_spatial_ref, has_lower_quality_layer, last_layer_dropped, PRIMARY_RATE_CONTROL::last_q, layer_context, LAYER_CONTEXT::map, CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, AV1_COMP::oxcf, PRIMARY_RATE_CONTROL::rate_correction_factors, AV1EncoderConfig::rc_cfg, LAYER_CONTEXT::sb_index, RateControlCfg::starting_buffer_level_ms, AV1_COMP::svc, PRIMARY_RATE_CONTROL::total_actual_bits, RateControlCfg::worst_allowed_q, and RATE_CONTROL::worst_quality.
bool av1_alloc_layer_context | ( | struct AV1_COMP * | cpi, |
int | num_layers ) |
Allocate layer context data.
[in] | cpi | Top level encoder structure |
[in] | num_layers | Number of layers to be allocated |
References layer_context, num_allocated_layers, and AV1_COMP::svc.
void av1_update_layer_context_change_config | ( | struct AV1_COMP *const | cpi, |
const int64_t | target_bandwidth ) |
Update the layer context from a change_config() call.
[in] | cpi | Top level encoder structure |
[in] | target_bandwidth | Total target bandwidth |
References LAYER_CONTEXT::actual_num_seg1_blocks, LAYER_CONTEXT::actual_num_seg2_blocks, RATE_CONTROL::best_quality, PRIMARY_RATE_CONTROL::bits_off_target, PRIMARY_RATE_CONTROL::buffer_level, AV1_COMP::common, LAYER_CONTEXT::counter_encode_maxq_scene_change, AV1_COMP::framerate, layer_context, LAYER_CONTEXT::map, PRIMARY_RATE_CONTROL::maximum_buffer_size, CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, PRIMARY_RATE_CONTROL::optimal_buffer_level, AV1_PRIMARY::p_rc, AV1_COMP::ppi, AV1_COMP::rc, LAYER_CONTEXT::sb_index, PRIMARY_RATE_CONTROL::starting_buffer_level, AV1_COMP::svc, and RATE_CONTROL::worst_quality.
void av1_update_temporal_layer_framerate | ( | struct AV1_COMP *const | cpi | ) |
Prior to encoding the frame, update framerate-related quantities for the current temporal layer.
[in] | cpi | Top level encoder structure |
References AV1_COMP::framerate, get_layer_context(), layer_context, AV1_COMP::rc, and AV1_COMP::svc.
Referenced by av1_svc_reset_temporal_layers().
bool av1_check_ref_is_low_spatial_res_super_frame | ( | struct AV1_COMP *const | cpi, |
int | ref_frame ) |
Prior to check if reference is lower spatial layer at the same timestamp/superframe.
[in] | cpi | Top level encoder structure |
[in] | ref_frame | Reference frame |
References AV1_COMP::ppi, AV1_PRIMARY::rtc_ref, and AV1_COMP::svc.
Referenced by av1_restore_layer_context().
void av1_restore_layer_context | ( | struct AV1_COMP *const | cpi | ) |
Prior to encoding the frame, set the layer context, for the current layer to be encoded, to the cpi struct.
[in] | cpi | Top level encoder structure |
References CYCLIC_REFRESH::actual_num_seg1_blocks, LAYER_CONTEXT::actual_num_seg1_blocks, CYCLIC_REFRESH::actual_num_seg2_blocks, LAYER_CONTEXT::actual_num_seg2_blocks, av1_check_ref_is_low_spatial_res_super_frame(), AV1_COMP::common, LAYER_CONTEXT::counter_encode_maxq_scene_change, AV1_COMP::cyclic_refresh, force_zero_mode_spatial_ref, RATE_CONTROL::frames_to_key, get_layer_context(), AV1_COMP::gf_frame_index, AV1Common::height, CYCLIC_REFRESH::map, LAYER_CONTEXT::map, LAYER_CONTEXT::max_mv_magnitude, MotionVectorSearchParams::max_mv_magnitude, AV1_COMP::mv_search_params, AV1_COMP::oxcf, AV1_PRIMARY::p_rc, AV1_COMP::ppi, AV1_COMP::rc, AV1EncoderConfig::rc_cfg, SPEED_FEATURES::rt_sf, AV1_PRIMARY::rtc_ref, CYCLIC_REFRESH::sb_index, LAYER_CONTEXT::sb_index, AV1_COMP::sf, AV1_COMP::svc, RateControlCfg::target_bandwidth, and AV1Common::width.
Referenced by av1_svc_reset_temporal_layers().
void av1_save_layer_context | ( | struct AV1_COMP *const | cpi | ) |
Save the layer context after encoding the frame.
[in] | cpi | Top level encoder structure |
References CYCLIC_REFRESH::actual_num_seg1_blocks, LAYER_CONTEXT::actual_num_seg1_blocks, CYCLIC_REFRESH::actual_num_seg2_blocks, LAYER_CONTEXT::actual_num_seg2_blocks, AV1_COMP::common, LAYER_CONTEXT::counter_encode_maxq_scene_change, AV1Common::current_frame, AV1_COMP::cyclic_refresh, drop_spatial_layer, AV1_COMP::framerate, get_layer_context(), AV1_COMP::gf_frame_index, LAYER_CONTEXT::group_index, CYCLIC_REFRESH::map, LAYER_CONTEXT::map, LAYER_CONTEXT::max_mv_magnitude, MotionVectorSearchParams::max_mv_magnitude, AV1_COMP::mv_search_params, AV1_COMP::oxcf, AV1_PRIMARY::p_rc, AV1_COMP::ppi, AV1_COMP::rc, AV1EncoderConfig::rc_cfg, CYCLIC_REFRESH::sb_index, LAYER_CONTEXT::sb_index, AV1_COMP::svc, and RateControlCfg::target_bandwidth.
void av1_free_svc_cyclic_refresh | ( | struct AV1_COMP *const | cpi | ) |
Free the memory used for cyclic refresh in layer context.
[in] | cpi | Top level encoder structure |
References layer_context, LAYER_CONTEXT::map, and AV1_COMP::svc.
void av1_svc_reset_temporal_layers | ( | struct AV1_COMP *const | cpi, |
int | is_key ) |
Reset on key frame: reset counters, references and buffer updates.
[in] | cpi | Top level encoder structure |
[in] | is_key | Whether current layer is key frame |
References av1_restore_layer_context(), av1_update_temporal_layer_framerate(), layer_context, and AV1_COMP::svc.
void av1_one_pass_cbr_svc_start_layer | ( | struct AV1_COMP *const | cpi | ) |
Before encoding, set resolutions and allocate compressor data.
[in] | cpi | Top level encoder structure |
References av1_get_layer_resolution(), AV1_COMP::common, downsample_filter_type, has_lower_quality_layer, AV1Common::height, layer_context, CommonModeInfoParams::mi_cols, AV1Common::mi_params, CommonModeInfoParams::mi_rows, AV1_COMP::oxcf, AV1_COMP::svc, and AV1Common::width.
Referenced by av1_get_compressed_data().
int av1_svc_primary_ref_frame | ( | const struct AV1_COMP *const | cpi | ) |
Get primary reference frame for current layer.
[in] | cpi | Top level encoder structure |
void av1_get_layer_resolution | ( | const int | width_org, |
const int | height_org, | ||
const int | num, | ||
const int | den, | ||
int * | width_out, | ||
int * | height_out ) |
Get resolution for current layer.
[in] | width_org | Original width, unscaled |
[in] | height_org | Original height, unscaled |
[in] | num | Numerator for the scale ratio |
[in] | den | Denominator for the scale ratio |
[in] | width_out | Output width, scaled for current layer |
[in] | height_out | Output height, scaled for current layer |
Referenced by av1_one_pass_cbr_svc_start_layer().