12#ifndef AOM_AV1_ENCODER_SVC_LAYERCONTEXT_H_
13#define AOM_AV1_ENCODER_SVC_LAYERCONTEXT_H_
15#include "aom_scale/yv12config.h"
16#include "av1/encoder/aq_cyclicrefresh.h"
18#include "av1/encoder/ratectrl.h"
33 int64_t layer_target_bitrate;
34 int scaling_factor_num;
35 int scaling_factor_den;
36 int64_t target_bandwidth;
37 int64_t spatial_layer_target_bandwidth;
42 int frames_from_key_frame;
92 int temporal_layer_id;
93 int number_spatial_layers;
94 int number_temporal_layers;
95 int prev_number_spatial_layers;
96 int use_flexible_mode;
101 double base_framerate;
102 unsigned int current_superframe;
103 int skip_mvsearch_last;
104 int skip_mvsearch_gf;
105 int skip_mvsearch_altref;
106 int spatial_layer_fb[REF_FRAMES];
107 int temporal_layer_fb[REF_FRAMES];
108 int num_encoded_top_layer;
109 int first_layer_denoise;
111 int mi_cols_full_resoln;
112 int mi_rows_full_resoln;
211 const int64_t target_bandwidth);
321 const int num,
const int den,
int *width_out,
324void av1_set_svc_fixed_mode(
struct AV1_COMP *
const cpi);
326void av1_svc_check_reset_layer_rc_flag(
struct AV1_COMP *
const cpi);
328void av1_svc_set_last_source(
struct AV1_COMP *
const cpi,
332void av1_svc_update_buffer_slot_refreshed(
struct AV1_COMP *
const cpi);
334int av1_svc_get_min_ref_dist(
const struct AV1_COMP *cpi);
336void av1_svc_set_reference_was_previous(
struct AV1_COMP *cpi);
Declares top-level encoder structures and functions.
int av1_svc_primary_ref_frame(const struct AV1_COMP *const cpi)
Get primary reference frame for current layer.
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.
Definition svc_layercontext.c:183
void av1_svc_reset_temporal_layers(struct AV1_COMP *const cpi, int is_key)
Reset on key frame: reset counters, references and buffer updates.
Definition svc_layercontext.c:391
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,...
Definition svc_layercontext.c:221
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.
Definition svc_layercontext.c:211
void av1_save_layer_context(struct AV1_COMP *const cpi)
Save the layer context after encoding the frame.
Definition svc_layercontext.c:308
bool av1_alloc_layer_context(struct AV1_COMP *cpi, int num_layers)
Allocate layer context data.
Definition svc_layercontext.c:89
void av1_init_layer_context(struct AV1_COMP *const cpi)
Initialize layer context data from init_config().
Definition svc_layercontext.c:26
struct SVC SVC
The stucture of SVC.
void av1_free_svc_cyclic_refresh(struct AV1_COMP *const cpi)
Free the memory used for cyclic refresh in layer context.
Definition svc_layercontext.c:379
void av1_one_pass_cbr_svc_start_layer(struct AV1_COMP *const cpi)
Before encoding, set resolutions and allocate compressor data.
Definition svc_layercontext.c:423
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.
Definition svc_layercontext.c:404
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.
Definition svc_layercontext.c:104
AOM_SVC_FRAME_DROP_MODE
Definition aomcx.h:1740
#define AOM_MAX_SS_LAYERS
Definition aomcx.h:1694
Top level encoder structure.
Definition encoder.h:2873
The stucture of quantities related to each spatial and temporal layer.
Definition svc_layercontext.h:28
int actual_num_seg1_blocks
Definition svc_layercontext.h:56
int sb_index
Definition svc_layercontext.h:48
int counter_encode_maxq_scene_change
Definition svc_layercontext.h:65
uint8_t speed
Definition svc_layercontext.h:70
int actual_num_seg2_blocks
Definition svc_layercontext.h:61
int max_mv_magnitude
Definition svc_layercontext.h:82
int is_key_frame
Definition svc_layercontext.h:78
unsigned char group_index
Definition svc_layercontext.h:74
int8_t * map
Definition svc_layercontext.h:52
Primary Rate Control parameters and status.
Definition ratectrl.h:299
Rate Control parameters and status.
Definition ratectrl.h:134
The stucture of SVC.
Definition svc_layercontext.h:89
bool drop_spatial_layer[4]
Definition svc_layercontext.h:167
bool last_layer_dropped[4]
Definition svc_layercontext.h:162
AOM_SVC_FRAME_DROP_MODE framedrop_mode
Definition svc_layercontext.h:156
int num_allocated_layers
Definition svc_layercontext.h:126
int force_zero_mode_spatial_ref
Definition svc_layercontext.h:142
int has_lower_quality_layer
Definition svc_layercontext.h:150
LAYER_CONTEXT * layer_context
Definition svc_layercontext.h:120
InterpFilter downsample_filter_type[4]
Definition svc_layercontext.h:131
int downsample_filter_phase[4]
Definition svc_layercontext.h:137
YV12 frame buffer data structure.
Definition yv12config.h:46