11#ifndef AOM_AOM_AOM_EXTERNAL_PARTITION_H_
12#define AOM_AOM_AOM_EXTERNAL_PARTITION_H_
37#define AOM_EXT_PART_ABI_VERSION 8
50#define AOM_EXT_PART_SIZE_DIRECT_SPLIT 17
56#define AOM_EXT_PART_SIZE_PRUNE_PART 25
61#define AOM_EXT_PART_SIZE_PRUNE_NONE 4
67#define AOM_EXT_PART_SIZE_TERM_NONE 28
71#define AOM_EXT_PART_SIZE_TERM_SPLIT 31
76#define AOM_EXT_PART_SIZE_PRUNE_RECT 9
81#define AOM_EXT_PART_SIZE_PRUNE_AB 10
86#define AOM_EXT_PART_SIZE_PRUNE_4_WAY 18
97 AOM_EXT_PART_WHOLE_TREE = 0,
98 AOM_EXT_PART_RECURSIVE = 1,
165 AOM_EXT_PART_FEATURE_BEFORE_NONE,
166 AOM_EXT_PART_FEATURE_BEFORE_NONE_PART2,
167 AOM_EXT_PART_FEATURE_AFTER_NONE,
168 AOM_EXT_PART_FEATURE_AFTER_NONE_PART2,
169 AOM_EXT_PART_FEATURE_AFTER_SPLIT,
170 AOM_EXT_PART_FEATURE_AFTER_SPLIT_PART2,
171 AOM_EXT_PART_FEATURE_AFTER_RECT,
172 AOM_EXT_PART_FEATURE_AFTER_AB
struct aom_partition_features_split aom_partition_features_split_t
Features pass to the external model to make partition decisions. Specifically, features collected aft...
struct aom_partition_features_ab aom_partition_features_ab_t
Features pass to the external model to make partition decisions. Specifically, features collected aft...
aom_ext_part_status_t(* aom_ext_part_create_model_fn_t)(void *priv, const aom_ext_part_config_t *part_config, aom_ext_part_model_t *ext_part_model)
Callback of creating an external partition model.
Definition aom_external_partition.h:354
#define AOM_EXT_PART_SIZE_PRUNE_4_WAY
Number of features to prune 4-way partition using stats collected after AB partition.
Definition aom_external_partition.h:86
AOM_EXT_PART_FEATURE_ID
Feature id to tell the external model the current stage in partition pruning and what features to use...
Definition aom_external_partition.h:164
#define AOM_EXT_PART_SIZE_TERM_NONE
Number of features to terminates partition after partition none using simple_motion_search features a...
Definition aom_external_partition.h:67
#define AOM_EXT_PART_SIZE_PRUNE_PART
Number of features to use simple motion search to prune out rectangular partition in some direction....
Definition aom_external_partition.h:56
aom_ext_part_status_t(* aom_ext_part_send_partition_stats_fn_t)(aom_ext_part_model_t ext_part_model, const aom_partition_stats_t *ext_part_stats)
Callback of sending stats to the external partition model.
Definition aom_external_partition.h:391
struct aom_partition_features aom_partition_features_t
Features pass to the external model to make partition decisions.
struct aom_partition_features_before_none aom_partition_features_before_none_t
Features pass to the external model to make partition decisions. Specifically, features collected bef...
enum aom_ext_part_status aom_ext_part_status_t
Enum for return status.
aom_ext_part_status
Enum for return status.
Definition aom_external_partition.h:339
#define AOM_EXT_PART_SIZE_PRUNE_RECT
Number of features to prune rectangular partition using stats collected after partition split.
Definition aom_external_partition.h:76
aom_ext_part_decision_mode
Decision mode of the external partition model. AOM_EXT_PART_WHOLE_TREE: the external partition model ...
Definition aom_external_partition.h:96
struct aom_sb_simple_motion_features aom_sb_simple_motion_features_t
Features collected from the simple motion process.
struct aom_ext_part_config aom_ext_part_config_t
Config information sent to the external partition model.
aom_ext_part_status_t(* aom_ext_part_send_features_fn_t)(aom_ext_part_model_t ext_part_model, const aom_partition_features_t *part_features)
Callback of sending features to the external partition model.
Definition aom_external_partition.h:366
void * aom_ext_part_model_t
Abstract external partition model handler.
Definition aom_external_partition.h:45
aom_ext_part_status_t(* aom_ext_part_delete_model_fn_t)(aom_ext_part_model_t ext_part_model)
Callback of deleting the external partition model.
Definition aom_external_partition.h:402
struct aom_partition_stats aom_partition_stats_t
Encoding stats for the given partition decision.
struct aom_ext_part_funcs aom_ext_part_funcs_t
Callback function set for external partition model.
enum aom_ext_part_decision_mode aom_ext_part_decision_mode_t
Decision mode of the external partition model. AOM_EXT_PART_WHOLE_TREE: the external partition model ...
struct aom_sb_features aom_sb_features_t
Features of each super block.
struct aom_partition_features_rect aom_partition_features_rect_t
Features pass to the external model to make partition decisions. Specifically, features collected aft...
struct aom_sb_tpl_features aom_sb_tpl_features_t
Features collected from the tpl process.
#define AOM_EXT_PART_SIZE_PRUNE_AB
Number of features to prune AB partition using stats collected after rectangular partition....
Definition aom_external_partition.h:81
#define AOM_EXT_PART_SIZE_DIRECT_SPLIT
Number of features to determine whether to skip partition none and do partition split directly....
Definition aom_external_partition.h:50
struct aom_partition_decision aom_partition_decision_t
Partition decisions received from the external model.
struct aom_partition_features_none aom_partition_features_none_t
Features pass to the external model to make partition decisions. Specifically, features collected aft...
aom_ext_part_status_t(* aom_ext_part_get_decision_fn_t)(aom_ext_part_model_t ext_part_model, aom_partition_decision_t *ext_part_decision)
Callback of receiving partition decisions from the external partition model.
Definition aom_external_partition.h:379
#define AOM_EXT_PART_SIZE_PRUNE_NONE
Number of features to prune split and rectangular partition after PARTITION_NONE.
Definition aom_external_partition.h:61
#define AOM_EXT_PART_SIZE_TERM_SPLIT
Number of features to terminates partition after partition split.
Definition aom_external_partition.h:71
@ AOM_EXT_PART_TEST
Status used for tests.
Definition aom_external_partition.h:342
@ AOM_EXT_PART_ERROR
Status of failure.
Definition aom_external_partition.h:341
@ AOM_EXT_PART_OK
Status of success.
Definition aom_external_partition.h:340
Config information sent to the external partition model.
Definition aom_external_partition.h:105
int superblock_size
super block size (either 64x64 or 128x128)
Definition aom_external_partition.h:106
Callback function set for external partition model.
Definition aom_external_partition.h:410
aom_ext_part_delete_model_fn_t delete_model
Definition aom_external_partition.h:434
aom_ext_part_get_decision_fn_t get_partition_decision
Definition aom_external_partition.h:424
void * priv
Definition aom_external_partition.h:444
aom_ext_part_decision_mode_t decision_mode
Definition aom_external_partition.h:439
aom_ext_part_create_model_fn_t create_model
Definition aom_external_partition.h:414
aom_ext_part_send_features_fn_t send_features
Definition aom_external_partition.h:419
aom_ext_part_send_partition_stats_fn_t send_partition_stats
Definition aom_external_partition.h:429
Partition decisions received from the external model.
Definition aom_external_partition.h:302
int is_final_decision
The flag whether it's the final decision.
Definition aom_external_partition.h:304
int do_square_split
Try square split partition.
Definition aom_external_partition.h:314
int verta_partition_allowed
Allow VERT_A partition.
Definition aom_external_partition.h:318
int terminate_partition_search
Terminate further partition search.
Definition aom_external_partition.h:310
int partition_vert4_allowed
Allow VERT4 partition.
Definition aom_external_partition.h:321
int vertb_partition_allowed
Allow VERT_B partition.
Definition aom_external_partition.h:319
int horzb_partition_allowed
Allow HORZ_B partition.
Definition aom_external_partition.h:317
int partition_rect_allowed[2]
Allow rectangular partitions.
Definition aom_external_partition.h:312
int num_nodes
The number of leaf nodes.
Definition aom_external_partition.h:305
int horza_partition_allowed
Allow HORZ_A partition.
Definition aom_external_partition.h:316
int partition_none_allowed
Allow partition none type.
Definition aom_external_partition.h:311
int do_rectangular_split
Try rectangular split partition.
Definition aom_external_partition.h:313
int partition_horz4_allowed
Allow HORZ4 partition.
Definition aom_external_partition.h:320
int partition_decision[2048]
Partition decisions.
Definition aom_external_partition.h:306
int current_decision
Partition decision for the current block.
Definition aom_external_partition.h:307
int prune_rect_part[2]
Prune rectangular partition.
Definition aom_external_partition.h:315
Features pass to the external model to make partition decisions. Specifically, features collected aft...
Definition aom_external_partition.h:156
float f[18]
Definition aom_external_partition.h:158
Features pass to the external model to make partition decisions. Specifically, features collected bef...
Definition aom_external_partition.h:117
float f[17]
Definition aom_external_partition.h:119
float f_part2[25]
Definition aom_external_partition.h:121
Features pass to the external model to make partition decisions. Specifically, features collected aft...
Definition aom_external_partition.h:127
float f_terminate[28]
Definition aom_external_partition.h:131
float f[4]
Definition aom_external_partition.h:129
Features pass to the external model to make partition decisions. Specifically, features collected aft...
Definition aom_external_partition.h:147
float f[10]
Definition aom_external_partition.h:149
Features pass to the external model to make partition decisions. Specifically, features collected aft...
Definition aom_external_partition.h:137
float f_terminate[31]
Definition aom_external_partition.h:139
float f_prune_rect[9]
Definition aom_external_partition.h:141
Features pass to the external model to make partition decisions.
Definition aom_external_partition.h:225
unsigned int sub_block_sse[4]
SSE of sub blocks.
Definition aom_external_partition.h:278
int64_t tpl_mc_dep_cost
Motion compensated dependency cost in tpl model.
Definition aom_external_partition.h:290
int above_block_height
Height of the above block, -1 if not exist.
Definition aom_external_partition.h:261
aom_partition_features_rect_t after_part_rect
Definition aom_external_partition.h:236
aom_partition_features_ab_t after_part_ab
Definition aom_external_partition.h:238
int left_block_height
Height of the left block, -1 if not exist.
Definition aom_external_partition.h:264
unsigned int block_var
Variance of motion compensated residual.
Definition aom_external_partition.h:277
unsigned int vert_block_var[2]
Variance of vert sub blocks.
Definition aom_external_partition.h:283
AOM_EXT_PART_FEATURE_ID id
Definition aom_external_partition.h:228
unsigned int horz_block_var[2]
Variance of horz sub blocks.
Definition aom_external_partition.h:281
unsigned int block_sse
SSE of motion compensated residual.
Definition aom_external_partition.h:276
int has_above_block
Has above neighbor block.
Definition aom_external_partition.h:259
aom_partition_features_none_t after_part_none
Definition aom_external_partition.h:232
int64_t tpl_inter_cost
Inter cost in tpl model.
Definition aom_external_partition.h:289
int frame_width
Frame width.
Definition aom_external_partition.h:244
int update_type
Frame update type, defined in ratectrl.h.
Definition aom_external_partition.h:255
int left_block_width
Width of the left block, -1 if not exist.
Definition aom_external_partition.h:263
int block_size
As "BLOCK_SIZE" in av1/common/enums.h.
Definition aom_external_partition.h:246
int above_block_width
Width of the above block, -1 if not exist.
Definition aom_external_partition.h:260
int pyramid_level
The level of this frame in the hierarchical structure.
Definition aom_external_partition.h:258
unsigned int sub_block_var[4]
Variance of sub blocks.
Definition aom_external_partition.h:279
int mi_row
Mi_row position of the block.
Definition aom_external_partition.h:242
unsigned int vert_block_sse[2]
SSE of vert sub blocks.
Definition aom_external_partition.h:282
int64_t tpl_intra_cost
Intra cost, ref to "TplDepStats" in tpl_model.h.
Definition aom_external_partition.h:288
aom_partition_features_before_none_t before_part_none
Definition aom_external_partition.h:230
unsigned int horz_block_sse[2]
SSE of horz sub blocks.
Definition aom_external_partition.h:280
int frame_height
Frame height.
Definition aom_external_partition.h:245
int rdmult
Rate-distortion multiplier.
Definition aom_external_partition.h:257
aom_sb_features_t sb_features
Features collected for the super block.
Definition aom_external_partition.h:241
aom_partition_features_split_t after_part_split
Definition aom_external_partition.h:234
int mi_col
Mi_col position of the block.
Definition aom_external_partition.h:243
int has_left_block
Has left neighbor block.
Definition aom_external_partition.h:262
int qindex
Quantization index, range: [0, 255].
Definition aom_external_partition.h:256
int valid_partition_types
Definition aom_external_partition.h:254
Encoding stats for the given partition decision.
Definition aom_external_partition.h:331
int64_t dist
Distortion of the block.
Definition aom_external_partition.h:333
int64_t rdcost
Rate-distortion cost of the block.
Definition aom_external_partition.h:334
int rate
Rate cost of the block.
Definition aom_external_partition.h:332
Features of each super block.
Definition aom_external_partition.h:210
aom_sb_tpl_features_t tpl_features
Definition aom_external_partition.h:214
aom_sb_simple_motion_features_t motion_features
Definition aom_external_partition.h:212
Features collected from the simple motion process.
Definition aom_external_partition.h:199
int num_units
The number of units inside the current superblock.
Definition aom_external_partition.h:201
int block_var[64]
Variance of each unit.
Definition aom_external_partition.h:203
int unit_length
The block length of the simple motion process.
Definition aom_external_partition.h:200
int block_sse[64]
Sum of squared error of each unit.
Definition aom_external_partition.h:202
Features collected from the tpl process.
Definition aom_external_partition.h:183
int available
If tpl stats are available.
Definition aom_external_partition.h:184
int num_units
The number of units inside the current superblock.
Definition aom_external_partition.h:186
int64_t mc_dep_cost[64]
The motion compensated dependency cost.
Definition aom_external_partition.h:189
int64_t inter_cost[64]
The inter cost of each unit.
Definition aom_external_partition.h:188
int64_t intra_cost[64]
The intra cost of each unit.
Definition aom_external_partition.h:187
int tpl_unit_length
The block length of tpl process.
Definition aom_external_partition.h:185