#ifndef AOM_AV1_COMMON_AV1_COMMON_INT_H_
#define AOM_AV1_COMMON_AV1_COMMON_INT_H_
#include <stdbool.h>
#include "config/aom_config.h"
#include "config/av1_rtcd.h"
#include "aom/internal/aom_codec_internal.h"
#include "aom_dsp/flow_estimation/corner_detect.h"
#include "aom_util/aom_pthread.h"
#include "av1/common/alloccommon.h"
#include "av1/common/av1_loopfilter.h"
#include "av1/common/entropy.h"
#include "av1/common/entropymode.h"
#include "av1/common/entropymv.h"
#include "av1/common/enums.h"
#include "av1/common/frame_buffers.h"
#include "av1/common/mv.h"
#include "av1/common/quant_common.h"
#include "av1/common/restoration.h"
#include "av1/common/tile_common.h"
#include "av1/common/timing.h"
#include "aom_dsp/grain_params.h"
#include "aom_dsp/grain_table.h"
#include "aom_dsp/odintrin.h"
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__clang__) && defined(__has_warning)
#if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
#define AOM_FALLTHROUGH_INTENDED …
#endif
#elif defined(__GNUC__) && __GNUC__ >= 7
#define AOM_FALLTHROUGH_INTENDED …
#endif
#ifndef AOM_FALLTHROUGH_INTENDED
#define AOM_FALLTHROUGH_INTENDED …
#endif
#define CDEF_MAX_STRENGTHS …
#define FRAME_ID_LENGTH …
#define DELTA_FRAME_ID_LENGTH …
#define FRAME_CONTEXTS …
#define FRAME_CONTEXT_DEFAULTS …
#define PRIMARY_REF_BITS …
#define PRIMARY_REF_NONE …
#define NUM_PING_PONG_BUFFERS …
#define MAX_NUM_TEMPORAL_LAYERS …
#define MAX_NUM_SPATIAL_LAYERS …
#define MAX_NUM_OPERATING_POINTS …
#define TXCOEFF_TIMER …
#define TXCOEFF_COST_TIMER …
enum { … } UENUM1BYTE(…) …;
enum { … } UENUM1BYTE(…) …;
#define MFMV_STACK_SIZE …
TPL_MV_REF;
MV_REF;
RefCntBuffer;
BufferPool;
CdefInfo;
DeltaQInfo;
OrderHintInfo;
SequenceHeader;
SkipModeInfo;
CurrentFrame;
FeatureFlags;
CommonTileParams;
CommonModeInfoParams;
struct CommonModeInfoParams { … };
CommonQuantParams;
struct CommonQuantParams { … };
CommonContexts;
struct CommonContexts { … };
AV1_COMMON;
static void lock_buffer_pool(BufferPool *const pool) { … }
static void unlock_buffer_pool(BufferPool *const pool) { … }
static inline YV12_BUFFER_CONFIG *get_ref_frame(AV1_COMMON *cm, int index) { … }
static inline int get_free_fb(AV1_COMMON *cm) { … }
static inline RefCntBuffer *assign_cur_frame_new_fb(AV1_COMMON *const cm) { … }
static inline void assign_frame_buffer_p(RefCntBuffer **lhs_ptr,
RefCntBuffer *rhs_ptr) { … }
static inline int frame_is_intra_only(const AV1_COMMON *const cm) { … }
static inline int frame_is_sframe(const AV1_COMMON *cm) { … }
static inline int get_ref_frame_map_idx(const AV1_COMMON *const cm,
const MV_REFERENCE_FRAME ref_frame) { … }
static inline RefCntBuffer *get_ref_frame_buf(
const AV1_COMMON *const cm, const MV_REFERENCE_FRAME ref_frame) { … }
static inline const struct scale_factors *get_ref_scale_factors_const(
const AV1_COMMON *const cm, const MV_REFERENCE_FRAME ref_frame) { … }
static inline struct scale_factors *get_ref_scale_factors(
AV1_COMMON *const cm, const MV_REFERENCE_FRAME ref_frame) { … }
static inline RefCntBuffer *get_primary_ref_frame_buf(
const AV1_COMMON *const cm) { … }
static inline int frame_might_allow_ref_frame_mvs(const AV1_COMMON *cm) { … }
static inline int frame_might_allow_warped_motion(const AV1_COMMON *cm) { … }
static inline void ensure_mv_buffer(RefCntBuffer *buf, AV1_COMMON *cm) { … }
void cfl_init(CFL_CTX *cfl, const SequenceHeader *seq_params);
static inline int av1_num_planes(const AV1_COMMON *cm) { … }
static inline void av1_init_above_context(CommonContexts *above_contexts,
int num_planes, int tile_row,
MACROBLOCKD *xd) { … }
static inline void av1_init_macroblockd(AV1_COMMON *cm, MACROBLOCKD *xd) { … }
static inline void set_entropy_context(MACROBLOCKD *xd, int mi_row, int mi_col,
const int num_planes) { … }
static inline int calc_mi_size(int len) { … }
static inline void set_plane_n4(MACROBLOCKD *const xd, int bw, int bh,
const int num_planes) { … }
static inline void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
int mi_row, int bh, int mi_col, int bw,
int mi_rows, int mi_cols) { … }
static inline aom_cdf_prob *get_y_mode_cdf(FRAME_CONTEXT *tile_ctx,
const MB_MODE_INFO *above_mi,
const MB_MODE_INFO *left_mi) { … }
static inline void update_partition_context(MACROBLOCKD *xd, int mi_row,
int mi_col, BLOCK_SIZE subsize,
BLOCK_SIZE bsize) { … }
static inline int is_chroma_reference(int mi_row, int mi_col, BLOCK_SIZE bsize,
int subsampling_x, int subsampling_y) { … }
static inline aom_cdf_prob cdf_element_prob(const aom_cdf_prob *cdf,
size_t element) { … }
static inline void partition_gather_horz_alike(aom_cdf_prob *out,
const aom_cdf_prob *const in,
BLOCK_SIZE bsize) { … }
static inline void partition_gather_vert_alike(aom_cdf_prob *out,
const aom_cdf_prob *const in,
BLOCK_SIZE bsize) { … }
static inline void update_ext_partition_context(MACROBLOCKD *xd, int mi_row,
int mi_col, BLOCK_SIZE subsize,
BLOCK_SIZE bsize,
PARTITION_TYPE partition) { … }
static inline int partition_plane_context(const MACROBLOCKD *xd, int mi_row,
int mi_col, BLOCK_SIZE bsize) { … }
static inline int partition_cdf_length(BLOCK_SIZE bsize) { … }
static inline int max_block_wide(const MACROBLOCKD *xd, BLOCK_SIZE bsize,
int plane) { … }
static inline int max_block_high(const MACROBLOCKD *xd, BLOCK_SIZE bsize,
int plane) { … }
static inline void av1_zero_above_context(AV1_COMMON *const cm,
const MACROBLOCKD *xd,
int mi_col_start, int mi_col_end,
const int tile_row) { … }
static inline void av1_zero_left_context(MACROBLOCKD *const xd) { … }
static inline void set_txfm_ctx(TXFM_CONTEXT *txfm_ctx, uint8_t txs, int len) { … }
static inline void set_txfm_ctxs(TX_SIZE tx_size, int n4_w, int n4_h, int skip,
const MACROBLOCKD *xd) { … }
static inline int get_mi_grid_idx(const CommonModeInfoParams *const mi_params,
int mi_row, int mi_col) { … }
static inline int get_alloc_mi_idx(const CommonModeInfoParams *const mi_params,
int mi_row, int mi_col) { … }
static inline void set_mi_offsets(const CommonModeInfoParams *const mi_params,
MACROBLOCKD *const xd, int mi_row,
int mi_col) { … }
static inline void txfm_partition_update(TXFM_CONTEXT *above_ctx,
TXFM_CONTEXT *left_ctx,
TX_SIZE tx_size, TX_SIZE txb_size) { … }
static inline TX_SIZE get_sqr_tx_size(int tx_dim) { … }
static inline TX_SIZE get_tx_size(int width, int height) { … }
static inline int txfm_partition_context(const TXFM_CONTEXT *const above_ctx,
const TXFM_CONTEXT *const left_ctx,
BLOCK_SIZE bsize, TX_SIZE tx_size) { … }
static inline PARTITION_TYPE get_partition(const AV1_COMMON *const cm,
int mi_row, int mi_col,
BLOCK_SIZE bsize) { … }
static inline void set_sb_size(SequenceHeader *const seq_params,
BLOCK_SIZE sb_size) { … }
static inline int is_coded_lossless(const AV1_COMMON *cm,
const MACROBLOCKD *xd) { … }
static inline int is_valid_seq_level_idx(AV1_LEVEL seq_level_idx) { … }
#ifdef __cplusplus
}
#endif
#endif