#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"
#include "av1/encoder/speed_features.h"
#ifdef __cplusplus
extern "C" {
#endif
struct AV1_PRIMARY;
struct AV1_COMP;
struct AV1Common;
struct ThreadData;
PC_TREE_SHARED_BUFFERS;
PICK_MODE_CONTEXT;
PC_TREE;
SIMPLE_MOTION_DATA_TREE;
void av1_setup_shared_coeff_buffer(const SequenceHeader *const seq_params,
PC_TREE_SHARED_BUFFERS *shared_bufs,
struct aom_internal_error_info *error);
void av1_free_shared_coeff_buffer(PC_TREE_SHARED_BUFFERS *shared_bufs);
PC_TREE *av1_alloc_pc_tree_node(BLOCK_SIZE bsize);
void av1_free_pc_tree_recursive(PC_TREE *tree, int num_planes, int keep_best,
int keep_none,
PARTITION_SEARCH_TYPE partition_search_type);
PICK_MODE_CONTEXT *av1_alloc_pmc(const struct AV1_COMP *const cpi,
BLOCK_SIZE bsize,
PC_TREE_SHARED_BUFFERS *shared_bufs);
void av1_reset_pmc(PICK_MODE_CONTEXT *ctx);
void av1_free_pmc(PICK_MODE_CONTEXT *ctx, int num_planes);
void av1_copy_tree_context(PICK_MODE_CONTEXT *dst_ctx,
PICK_MODE_CONTEXT *src_ctx);
static const BLOCK_SIZE square[MAX_SB_SIZE_LOG2 - 1] = …;
static inline int av1_get_pc_tree_nodes(const int is_sb_size_128,
int stat_generation_stage) { … }
int av1_setup_sms_tree(struct AV1_COMP *const cpi, struct ThreadData *td);
void av1_free_sms_tree(struct ThreadData *td);
#ifdef __cplusplus
}
#endif
#endif