AOMedia AV1 Codec
Scalable Video Coding
Collaboration diagram for Scalable Video Coding:

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(). More...
 
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. More...
 
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. More...
 
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. More...
 
void av1_save_layer_context (struct AV1_COMP *const cpi)
 Save the layer context after encoding the frame. More...
 
void av1_free_svc_cyclic_refresh (struct AV1_COMP *const cpi)
 Free the memory used for cyclic refresh in layer context. More...
 
void av1_svc_reset_temporal_layers (struct AV1_COMP *const cpi, int is_key)
 Reset on key frame: reset counters, references and buffer updates. More...
 
void av1_one_pass_cbr_svc_start_layer (struct AV1_COMP *const cpi)
 Before encoding, set resolutions and allocate compressor data. More...
 
int av1_svc_primary_ref_frame (const struct AV1_COMP *const cpi)
 Get primary reference frame for current layer. More...
 
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. More...
 

Detailed Description

This module describes scalable video coding algorithm in AV1. More details will be added.

Function Documentation

◆ av1_init_layer_context()

◆ av1_update_layer_context_change_config()

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.

Parameters
[in]cpiTop level encoder structure
[in]target_bandwidthTotal target bandwidth
Returns
Nothing returned. Buffer level for each layer is set.

References RATE_CONTROL::best_quality, PRIMARY_RATE_CONTROL::bits_off_target, PRIMARY_RATE_CONTROL::buffer_level, layer_context, PRIMARY_RATE_CONTROL::maximum_buffer_size, PRIMARY_RATE_CONTROL::optimal_buffer_level, PRIMARY_RATE_CONTROL::starting_buffer_level, and RATE_CONTROL::worst_quality.

◆ av1_update_temporal_layer_framerate()

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.

Parameters
[in]cpiTop level encoder structure
Returns
Nothing returned. Frame related quantities for current temporal layer are updated.

References get_layer_context(), and layer_context.

Referenced by av1_get_one_pass_rt_params(), and av1_svc_reset_temporal_layers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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.

Parameters
[in]cpiTop level encoder structure
Returns
Nothing returned. Layer context for current layer is set.

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, force_zero_mode_spatial_ref, get_layer_context(), AV1Common::height, CYCLIC_REFRESH::map, LAYER_CONTEXT::map, LAYER_CONTEXT::max_mv_magnitude, CYCLIC_REFRESH::sb_index, LAYER_CONTEXT::sb_index, and AV1Common::width.

Referenced by av1_get_one_pass_rt_params(), and av1_svc_reset_temporal_layers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ av1_save_layer_context()

void av1_save_layer_context ( struct AV1_COMP *const  cpi)

◆ av1_free_svc_cyclic_refresh()

void av1_free_svc_cyclic_refresh ( struct AV1_COMP *const  cpi)

Free the memory used for cyclic refresh in layer context.

Parameters
[in]cpiTop level encoder structure
Returns
Nothing returned.

References layer_context, and LAYER_CONTEXT::map.

◆ av1_svc_reset_temporal_layers()

void av1_svc_reset_temporal_layers ( struct AV1_COMP *const  cpi,
int  is_key 
)

Reset on key frame: reset counters, references and buffer updates.

Parameters
[in]cpiTop level encoder structure
[in]is_keyWhether current layer is key frame
Returns
Nothing returned.

References av1_restore_layer_context(), and av1_update_temporal_layer_framerate().

Referenced by av1_get_one_pass_rt_params().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ av1_one_pass_cbr_svc_start_layer()

void av1_one_pass_cbr_svc_start_layer ( struct AV1_COMP *const  cpi)

Before encoding, set resolutions and allocate compressor data.

Parameters
[in]cpiTop level encoder structure
Returns
Nothing returned.

References av1_get_layer_resolution(), downsample_filter_type, and layer_context.

Here is the call graph for this function:

◆ av1_svc_primary_ref_frame()

int av1_svc_primary_ref_frame ( const struct AV1_COMP *const  cpi)

Get primary reference frame for current layer.

Parameters
[in]cpiTop level encoder structure
Returns
The primary reference frame for current layer.

◆ av1_get_layer_resolution()

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.

Parameters
[in]width_orgOriginal width, unscaled
[in]height_orgOriginal height, unscaled
[in]numNumerator for the scale ratio
[in]denDenominator for the scale ratio
[in]width_outOutput width, scaled for current layer
[in]height_outOutput height, scaled for current layer
Returns
Nothing is returned. Instead the scaled width and height are set.

Referenced by av1_one_pass_cbr_svc_start_layer().