 |
AOMedia AV1 Codec
|
Go to the documentation of this file.
15 #ifndef AOM_AV1_ENCODER_ENCODE_STRATEGY_H_
16 #define AOM_AV1_ENCODER_ENCODE_STRATEGY_H_
27 #include "av1/encoder/firstpass.h"
55 uint8_t *
const dest,
unsigned int *frame_flags,
56 int64_t *
const time_stamp, int64_t *
const time_end,
57 const aom_rational64_t *
const timestamp_ratio,
64 void av1_configure_buffer_updates(
66 const FRAME_UPDATE_TYPE type,
const FRAME_TYPE frame_type,
67 int force_refresh_all);
69 int av1_get_refresh_frame_flags(
const AV1_COMP *
const cpi,
71 FRAME_UPDATE_TYPE frame_update_type,
72 const RefBufferStack *
const ref_buffer_stack);
74 int av1_get_refresh_ref_frame_map(
int refresh_frame_flags);
76 void av1_update_ref_frame_map(
AV1_COMP *cpi,
77 FRAME_UPDATE_TYPE frame_update_type,
78 FRAME_TYPE frame_type,
int show_existing_frame,
80 RefBufferStack *ref_buffer_stack);
82 void av1_get_ref_frames(
AV1_COMP *
const cpi, RefBufferStack *ref_buffer_stack);
84 int is_forced_keyframe_pending(
struct lookahead_ctx *lookahead,
85 const int up_to_index,
86 const COMPRESSOR_STAGE compressor_stage);
92 #endif // AOM_AV1_ENCODER_ENCODE_STRATEGY_H_
REAL_TIME_SPEED_FEATURES rt_sf
Definition: speed_features.h:1184
Declares top-level encoder structures and functions.
InterpFilter interp_filter
Definition: av1_common_int.h:383
void av1_cyclic_refresh_update_parameters(struct AV1_COMP *const cpi)
Set the global/frame level parameters for cyclic refresh.
bool alt_ref_frame
Definition: encoder.h:1876
ExternalFlags ext_flags
Definition: encoder.h:2246
int ref_frame_flags
Definition: encoder.h:2756
unsigned int number_spatial_layers
Definition: av1_common_int.h:1029
unsigned int number_temporal_layers
Definition: av1_common_int.h:1019
Data related to the current GF/ARF group and the individual frames within the group.
Definition: firstpass.h:171
Refresh frame flags for different type of frames.
Definition: encoder.h:1767
#define AOM_EFLAG_SET_S_FRAME
Enable s frame mode.
Definition: aomcx.h:158
bool use_error_resilient
Definition: encoder.h:1916
ExtRefreshFrameFlagsInfo refresh_frame
Definition: encoder.h:1895
void av1_set_reference_structure_one_pass_rt(AV1_COMP *cpi, int gf_update)
Setup the reference prediction structure for 1 pass real-time.
Definition: ratectrl.c:2171
bool error_resilient_mode
Definition: av1_common_int.h:376
bool enable_tpl_model
Definition: encoder.h:753
CommonTileParams tiles
Definition: av1_common_int.h:969
int use_svc
Definition: encoder.h:2632
SPEED_FEATURES sf
Definition: encoder.h:2314
bool use_s_frame
Definition: encoder.h:1921
ThreadData td
Definition: encoder.h:2110
unsigned char gf_frame_index
Definition: encoder.h:2362
struct lookahead_entry * av1_lookahead_pop(struct lookahead_ctx *ctx, int drain, COMPRESSOR_STAGE stage)
Get the next source buffer to encode.
bool fwd_kf_enabled
Definition: encoder.h:414
COMPRESSOR_STAGE compressor_stage
Definition: encoder.h:2645
bool use_primary_ref_none
Definition: encoder.h:1927
int arnr_max_frames
Definition: encoder.h:735
bool golden_frame
Definition: encoder.h:1873
int ref_frame_flags
Definition: encoder.h:1890
bool alt2_ref_frame
Definition: encoder.h:1875
TWO_PASS twopass
Definition: encoder.h:2352
@ AOM_CODEC_OK
Operation completed without error.
Definition: aom_codec.h:157
KeyFrameCfg kf_cfg
Definition: encoder.h:822
bool allow_ref_frame_mvs
Definition: av1_common_int.h:357
bool golden_frame
Definition: encoder.h:1768
#define AOM_EFLAG_FORCE_KF
Force this frame to be a keyframe.
Definition: aom_encoder.h:359
Describes the codec algorithm interface to applications.
Main encoder configuration data structure.
Definition: encoder.h:805
int fb_of_context_type[REF_FRAMES]
Definition: encoder.h:2241
RefCntBuffer * cur_frame
Definition: av1_common_int.h:809
bool refresh_frame_context
Definition: encoder.h:1900
@ AOM_CODEC_ERROR
Unspecified error.
Definition: aom_codec.h:160
GF_GROUP gf_group
Definition: encoder.h:2357
Top level encoder structure.
Definition: encoder.h:2095
int remapped_ref_idx[REF_FRAMES]
Definition: encoder.h:2761
Frame time stamps.
Definition: encoder.h:2020
int height
Definition: av1_common_int.h:749
int droppable
Definition: encoder.h:2438
The stucture of SVC.
Definition: svc_layercontext.h:91
void av1_get_second_pass_params(struct AV1_COMP *cpi, struct EncodeFrameParams *const frame_params, const EncodeFrameInput *const frame_input, unsigned int frame_flags)
Main per frame entry point for second pass of two pass encode.
Definition: pass2_strategy.c:3505
YV12_BUFFER_CONFIG * unscaled_source
Definition: encoder.h:2176
int av1_encode(AV1_COMP *const cpi, uint8_t *const dest, const EncodeFrameInput *const frame_input, const EncodeFrameParams *const frame_params, EncodeFrameResults *const frame_results)
Run 1-pass/2-pass encoding.
Definition: encoder.c:3389
int64_t prev_ts_end
Definition: encoder.h:2028
#define AOM_EFLAG_ERROR_RESILIENT
Enable error resilient frame.
Definition: aomcx.h:152
enum aom_rc_mode mode
Definition: encoder.h:514
FRAME_TYPE frame_type
Definition: encoder.h:2734
struct lookahead_ctx * lookahead
Definition: encoder.h:2071
AV1_COMMON common
Definition: encoder.h:2138
int error_resilient_mode
Definition: encoder.h:2730
REFRESH_FRAME_CONTEXT_MODE refresh_frame_context
Definition: av1_common_int.h:397
int superres_upscaled_width
Definition: av1_common_int.h:772
TplParams tpl_data
Definition: encoder.h:2202
bool last_frame
Definition: encoder.h:1872
int show_existing_frame
Definition: av1_common_int.h:877
bool using_qmatrix
Definition: av1_common_int.h:669
Declares frame encoding functions.
void av1_twopass_postencode_update(struct AV1_COMP *cpi)
Adjustments to two pass and rate control after each frame.
Definition: pass2_strategy.c:3865
aom_film_grain_t film_grain_params
Definition: av1_common_int.h:937
int frames_till_gf_update_due
Definition: ratectrl.h:189
uint32_t frame_presentation_time
Definition: av1_common_int.h:798
void av1_get_one_pass_rt_params(AV1_COMP *cpi, EncodeFrameParams *const frame_params, unsigned int frame_flags)
Setup the rate control parameters for 1 pass real-time mode.
Definition: ratectrl.c:2551
aom_film_grain_table_t * film_grain_table
Definition: encoder.h:2528
int av1_lookahead_pop_sz(struct lookahead_ctx *ctx, COMPRESSOR_STAGE stage)
Get pop_sz value.
int av1_encode_strategy(AV1_COMP *const cpi, size_t *const size, uint8_t *const dest, unsigned int *frame_flags, int64_t *const time_stamp, int64_t *const time_end, const aom_rational64_t *const timestamp_ratio, int flush)
Implement high-level encode strategy.
Definition: encode_strategy.c:1085
bool bwd_ref_frame
Definition: encoder.h:1769
static int has_no_stats_stage(const AV1_COMP *const cpi)
Check if the current stage has statistics.
Definition: encoder.h:3053
RefreshFrameFlagsInfo refresh_frame
Definition: encoder.h:2233
int av1_tpl_setup_stats(struct AV1_COMP *cpi, int gop_eval, const struct EncodeFrameParams *const frame_params, const struct EncodeFrameInput *const frame_input)
Implements temporal dependency modelling for a GOP (GF/ARF group) and selects between 16 and 32 frame...
RefBufferStack ref_buffer_stack
Definition: encoder.h:2372
@ AOM_CODEC_MEM_ERROR
Memory operation failed.
Definition: aom_codec.h:163
YV12_BUFFER_CONFIG alt_ref_buffer
Definition: encoder.h:2378
enum aom_enc_pass pass
Definition: encoder.h:930
int show_existing_alt_ref
Definition: encoder.h:2383
int speed
Definition: encoder.h:2772
int show_frame
Definition: av1_common_int.h:862
unsigned int large_scale
Definition: av1_common_int.h:464
int64_t prev_ts_start
Definition: encoder.h:2024
TPL_SPEED_FEATURES tpl_sf
Definition: speed_features.h:1129
bool alt_ref_frame
Definition: encoder.h:1770
CommonQuantParams quant_params
Definition: av1_common_int.h:899
YV12 frame buffer data structure.
Definition: yv12config.h:38
void av1_save_layer_context(AV1_COMP *const cpi)
Save the layer context after encoding the frame.
Definition: svc_layercontext.c:213
TimeStamps time_stamps
Definition: encoder.h:2289
int no_show_fwd_kf
Definition: encoder.h:2148
Describes the encoder algorithm interface to applications.
Flags signalled by the external interface at frame level.
Definition: encoder.h:1886
RATE_CONTROL rc
Definition: encoder.h:2294
Top level common structure used by both encoder and decoder.
Definition: av1_common_int.h:723
bool use_ref_frame_mvs
Definition: encoder.h:1911
YV12_BUFFER_CONFIG * unfiltered_source
Definition: encoder.h:2197
int av1_svc_primary_ref_frame(const struct AV1_COMP *const cpi)
Get primary reference frame for current layer.
@ AOM_Q
Definition: aom_encoder.h:169
AlgoCfg algo_cfg
Definition: encoder.h:817
YV12_BUFFER_CONFIG scaled_source
Definition: encoder.h:2181
double framerate
Definition: encoder.h:2299
struct lookahead_entry * av1_lookahead_peek(struct lookahead_ctx *ctx, int index, COMPRESSOR_STAGE stage)
Get a future source buffer to encode.
contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_e...
Definition: encoder.h:2726
AV1_PRIMARY * ppi
Definition: encoder.h:2099
Variables related to current coding block.
Definition: blockd.h:568
int enable_keyframe_filtering
Definition: encoder.h:391
int superres_upscaled_height
Definition: av1_common_int.h:773
bool refresh_frame_context_pending
Definition: encoder.h:1906
MACROBLOCKD e_mbd
Decoder's view of current coding block.
Definition: block.h:864
bool bwd_ref_frame
Definition: encoder.h:1874
unsigned int av1_lookahead_depth(struct lookahead_ctx *ctx, COMPRESSOR_STAGE stage)
Get the number of frames currently in the lookahead queue.
bool enable_sframe
Definition: encoder.h:419
int width
Definition: av1_common_int.h:748
AV1EncoderConfig oxcf
Definition: encoder.h:2143
SequenceHeader seq_params
Definition: av1_common_int.h:953
int64_t first_ts_start
Definition: encoder.h:2032
Frame refresh flags set by the external interface.
Definition: encoder.h:1871
int av1_temporal_filter(struct AV1_COMP *cpi, const int filter_frame_lookahead_idx, FRAME_UPDATE_TYPE update_type, int is_forward_keyframe, int *show_existing_arf)
Performs temporal filtering if needed on a source frame. For example to create a filtered alternate r...
RateControlCfg rc_cfg
Definition: encoder.h:827
bool update_pending
Definition: encoder.h:1880
int showable_frame
Definition: av1_common_int.h:870
CurrentFrame current_frame
Definition: av1_common_int.h:727
FeatureFlags features
Definition: av1_common_int.h:882
RefreshFrameFlagsInfo refresh_frame
Definition: encoder.h:2767
YV12_BUFFER_CONFIG * source
Definition: encoder.h:2161
CommonModeInfoParams mi_params
Definition: av1_common_int.h:887
int show_frame
Definition: encoder.h:2744
Encoder's parameters related to the current coding block.
Definition: block.h:846
int skip_tpl_setup_stats
Definition: tpl_model.h:203
int remapped_ref_idx[REF_FRAMES]
Definition: av1_common_int.h:831
int frames_to_key
Definition: ratectrl.h:223
int key_freq_max
Definition: encoder.h:386
SVC svc
Definition: encoder.h:2636