summaryrefslogtreecommitdiff
path: root/media/libaom/src/av1/encoder/context_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'media/libaom/src/av1/encoder/context_tree.h')
-rw-r--r--media/libaom/src/av1/encoder/context_tree.h59
1 files changed, 21 insertions, 38 deletions
diff --git a/media/libaom/src/av1/encoder/context_tree.h b/media/libaom/src/av1/encoder/context_tree.h
index 4efc34985..a39979413 100644
--- a/media/libaom/src/av1/encoder/context_tree.h
+++ b/media/libaom/src/av1/encoder/context_tree.h
@@ -12,6 +12,8 @@
#ifndef AOM_AV1_ENCODER_CONTEXT_TREE_H_
#define AOM_AV1_ENCODER_CONTEXT_TREE_H_
+#include "config/aom_config.h"
+
#include "av1/common/blockd.h"
#include "av1/encoder/block.h"
@@ -23,21 +25,10 @@ struct AV1_COMP;
struct AV1Common;
struct ThreadData;
-typedef enum {
- // Search all the partition types in this plane.
- SEARCH_FULL_PLANE = 0,
- // Only search none_partition coding block.
- NONE_PARTITION_PLANE = 1,
- // Search all the partition types in this plane except split.
- SEARCH_SAME_PLANE = 2,
- // Skip search partition on this plane. Go split directly.
- SPLIT_PLANE = 3,
-} CB_TREE_SEARCH;
-
// Structure to hold snapshot of coding context during the mode picking process
typedef struct {
MB_MODE_INFO mic;
- MB_MODE_INFO_EXT mbmi_ext;
+ MB_MODE_INFO_EXT_FRAME mbmi_ext_best;
uint8_t *color_index_map[2];
uint8_t *blk_skip;
@@ -46,46 +37,31 @@ typedef struct {
tran_low_t *dqcoeff[MAX_MB_PLANE];
uint16_t *eobs[MAX_MB_PLANE];
uint8_t *txb_entropy_ctx[MAX_MB_PLANE];
+ uint8_t *tx_type_map;
int num_4x4_blk;
- int skip;
// For current partition, only if all Y, U, and V transform blocks'
// coefficients are quantized to 0, skippable is set to 1.
int skippable;
- int best_mode_index;
+#if CONFIG_INTERNAL_STATS
+ THR_MODES best_mode_index;
+#endif // CONFIG_INTERNAL_STATS
int hybrid_pred_diff;
int comp_pred_diff;
int single_pred_diff;
- // Skip certain ref frames during RD search of rectangular partitions.
- int skip_ref_frame_mask;
-
- // TODO(jingning) Use RD_COST struct here instead. This involves a boarder
- // scope of refactoring.
- int rate;
- int64_t dist;
- int64_t rdcost;
+
+ RD_STATS rd_stats;
+
int rd_mode_is_ready; // Flag to indicate whether rd pick mode decision has
// been made.
// motion vector cache for adaptive motion search control in partition
// search loop
MV pred_mv[REF_FRAMES];
- InterpFilter pred_interp_filter;
PARTITION_TYPE partition;
} PICK_MODE_CONTEXT;
-typedef struct {
- int valid;
- int split;
- int skip;
- int64_t rdcost;
- int sub_block_split[4];
- int sub_block_skip[4];
- int64_t sub_block_rdcost[4];
-} PC_TREE_STATS;
-
typedef struct PC_TREE {
- int index;
PARTITION_TYPE partitioning;
BLOCK_SIZE block_size;
PICK_MODE_CONTEXT none;
@@ -97,13 +73,20 @@ typedef struct PC_TREE {
PICK_MODE_CONTEXT verticalb[3];
PICK_MODE_CONTEXT horizontal4[4];
PICK_MODE_CONTEXT vertical4[4];
- CB_TREE_SEARCH cb_search_range;
struct PC_TREE *split[4];
- PC_TREE_STATS pc_tree_stats;
+ int index;
+
+ // Simple motion search_features
+ FULLPEL_MV start_mvs[REF_FRAMES];
+ unsigned int sms_none_feat[2];
+ unsigned int sms_rect_feat[8];
+ int sms_none_valid;
+ int sms_rect_valid;
} PC_TREE;
-void av1_setup_pc_tree(struct AV1Common *cm, struct ThreadData *td);
-void av1_free_pc_tree(struct ThreadData *td, const int num_planes);
+void av1_setup_pc_tree(struct AV1_COMP *const cpi, struct ThreadData *td);
+void av1_free_pc_tree(const struct AV1_COMP *const cpi, struct ThreadData *td,
+ const int num_planes, BLOCK_SIZE sb_size);
void av1_copy_tree_context(PICK_MODE_CONTEXT *dst_ctx,
PICK_MODE_CONTEXT *src_ctx);