12 #ifndef AOM_AV1_ENCODER_FIRSTPASS_H_ 13 #define AOM_AV1_ENCODER_FIRSTPASS_H_ 15 #include "av1/common/av1_common_int.h" 18 #include "av1/encoder/ratectrl.h" 24 #define DOUBLE_DIVIDE_CHECK(x) ((x) < 0 ? (x)-0.000001 : (x) + 0.000001) 26 #define MIN_ZERO_MOTION 0.95 27 #define MAX_SR_CODED_ERROR 40 28 #define MAX_RAW_ERR_VAR 2000 29 #define MIN_MV_IN_OUT 0.4 31 #define VLOW_MOTION_THRESHOLD 950 159 #define FC_ANIMATION_THRESH 0.15 162 FC_GRAPHICS_ANIMATION = 1,
163 FRAME_CONTENT_TYPES = 2
164 } UENUM1BYTE(FRAME_CONTENT_TYPE);
174 FRAME_UPDATE_TYPE update_type[MAX_STATIC_GF_GROUP_LENGTH];
175 unsigned char arf_src_offset[MAX_STATIC_GF_GROUP_LENGTH];
178 unsigned char cur_frame_idx[MAX_STATIC_GF_GROUP_LENGTH];
179 int layer_depth[MAX_STATIC_GF_GROUP_LENGTH];
180 int arf_boost[MAX_STATIC_GF_GROUP_LENGTH];
182 int max_layer_depth_allowed;
184 unsigned char q_val[MAX_STATIC_GF_GROUP_LENGTH];
185 int bit_allocation[MAX_STATIC_GF_GROUP_LENGTH];
187 FRAME_TYPE frame_type[MAX_STATIC_GF_GROUP_LENGTH];
189 REFBUF_STATE refbuf_state[MAX_STATIC_GF_GROUP_LENGTH];
198 int arf_gf_boost_lst;
216 unsigned int section_intra_rating;
221 int frame_stats_next_idx;
223 STATS_BUFFER_CTX *stats_buf_ctx;
226 double modified_error_min;
227 double modified_error_max;
228 double modified_error_left;
230 double frame_avg_haar_energy;
233 FRAME_CONTENT_TYPE fr_content_type;
236 int64_t kf_group_bits;
239 int64_t kf_group_error_left;
245 int rolling_arf_group_target_bits;
246 int rolling_arf_group_actual_bits;
250 int kf_zeromotion_pct;
251 int last_kfgroup_zeromotion_pct;
254 int extend_minq_fast;
266 int64_t frame_avg_wavelet_energy;
270 int64_t sr_coded_error;
272 int64_t tr_coded_error;
279 int second_ref_count;
283 double neutral_count;
285 int intra_skip_count;
287 int image_data_start_row;
307 double brightness_factor;
315 FRAME_STATS *mb_stats;
320 int *raw_motion_err_list;
328 int av1_get_unit_rows_in_tile(TileInfo tile,
const BLOCK_SIZE fp_block_size);
329 int av1_get_unit_cols_in_tile(TileInfo tile,
const BLOCK_SIZE fp_block_size);
331 void av1_rc_get_first_pass_params(
struct AV1_COMP *cpi);
332 void av1_first_pass_row(
struct AV1_COMP *cpi,
struct ThreadData *td,
333 struct TileDataEnc *tile_data,
const int mb_row,
334 const BLOCK_SIZE fp_block_size);
335 void av1_end_first_pass(
struct AV1_COMP *cpi);
366 #endif // AOM_AV1_ENCODER_FIRSTPASS_H_ double weight
Definition: firstpass.h:47
double tr_coded_error
Definition: firstpass.h:67
double MVrv
Definition: firstpass.h:127
double pcnt_third_ref
Definition: firstpass.h:85
double sr_coded_error
Definition: firstpass.h:63
double frame
Definition: firstpass.h:41
double mv_in_out_count
Definition: firstpass.h:137
double pcnt_motion
Definition: firstpass.h:75
double pcnt_second_ref
Definition: firstpass.h:81
double MVcv
Definition: firstpass.h:131
Data related to the current GF/ARF group and the individual frames within the group.
Definition: firstpass.h:171
Two pass status and control data.
Definition: firstpass.h:214
contains per-frame encoding parameters decided upon by av1_encode_strategy() and passed down to av1_e...
Definition: encoder.h:2726
double mvc_abs
Definition: firstpass.h:123
double inactive_zone_rows
Definition: firstpass.h:103
double new_mv_count
Definition: firstpass.h:141
Describes look ahead buffer operations.
double MVc
Definition: firstpass.h:119
double pcnt_inter
Definition: firstpass.h:71
The stucture of acummulated frame stats in the first pass.
Definition: firstpass.h:36
double intra_skip_pct
Definition: firstpass.h:99
double count
Definition: firstpass.h:150
void av1_first_pass(struct AV1_COMP *cpi, const int64_t ts_duration)
AV1 first pass encoding.
double duration
Definition: firstpass.h:145
Top level encoder structure.
Definition: encoder.h:2095
double intra_error
Definition: firstpass.h:51
double coded_error
Definition: firstpass.h:59
Main encoder configuration data structure.
Definition: encoder.h:805
double inactive_zone_cols
Definition: firstpass.h:107
double frame_avg_wavelet_energy
Definition: firstpass.h:55
double mvr_abs
Definition: firstpass.h:115
double raw_error_stdev
Definition: firstpass.h:154
double MVr
Definition: firstpass.h:111
double pcnt_neutral
Definition: firstpass.h:91