#ifndef AOM_AV1_ENCODER_MCOMP_H_
#define AOM_AV1_ENCODER_MCOMP_H_
#include "av1/common/mv.h"
#include "av1/encoder/block.h"
#include "av1/encoder/rd.h"
#include "aom_dsp/variance.h"
#ifdef __cplusplus
extern "C" {
#endif
struct AV1_COMP;
struct SPEED_FEATURES;
enum { … } UENUM1BYTE(…) …;
MV_COST_PARAMS;
int av1_mv_bit_cost(const MV *mv, const MV *ref_mv, const int *mvjcost,
int *const mvcost[2], int weight);
int av1_get_mvpred_sse(const MV_COST_PARAMS *mv_cost_params,
const FULLPEL_MV best_mv,
const aom_variance_fn_ptr_t *vfp,
const struct buf_2d *src, const struct buf_2d *pre);
MSBuffers;
static inline void av1_set_ms_compound_refs(MSBuffers *ms_buffers,
const uint8_t *second_pred,
const uint8_t *mask,
int mask_stride, int invert_mask) { … }
FULLPEL_MOTION_SEARCH_PARAMS;
FULLPEL_MV_STATS;
void av1_init_obmc_buffer(OBMCBuffer *obmc_buffer);
void av1_make_default_fullpel_ms_params(
FULLPEL_MOTION_SEARCH_PARAMS *ms_params, const struct AV1_COMP *cpi,
MACROBLOCK *x, BLOCK_SIZE bsize, const MV *ref_mv, FULLPEL_MV start_mv,
const search_site_config search_sites[NUM_DISTINCT_SEARCH_METHODS],
SEARCH_METHODS search_method, int fine_search_interval);
void av1_set_ms_to_intra_mode(FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
const IntraBCMVCosts *dv_costs);
void av1_init_motion_fpf(search_site_config *cfg, int stride);
av1_init_search_site_config;
extern const av1_init_search_site_config
av1_init_motion_compensation[NUM_DISTINCT_SEARCH_METHODS];
static const SEARCH_METHODS search_method_lookup[NUM_SEARCH_METHODS] = …;
static inline void av1_refresh_search_site_config(
search_site_config *ss_cfg_buf, SEARCH_METHODS search_method,
const int ref_stride) { … }
static inline void av1_set_mv_search_method(
FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
const search_site_config search_sites[NUM_DISTINCT_SEARCH_METHODS],
SEARCH_METHODS search_method) { … }
static inline void av1_set_mv_row_limits(
const CommonModeInfoParams *const mi_params, FullMvLimits *mv_limits,
int mi_row, int mi_height, int border) { … }
static inline void av1_set_mv_col_limits(
const CommonModeInfoParams *const mi_params, FullMvLimits *mv_limits,
int mi_col, int mi_width, int border) { … }
static inline void av1_set_mv_limits(
const CommonModeInfoParams *const mi_params, FullMvLimits *mv_limits,
int mi_row, int mi_col, int mi_height, int mi_width, int border) { … }
void av1_set_mv_search_range(FullMvLimits *mv_limits, const MV *mv);
int av1_init_search_range(int size);
int av1_vector_match(const int16_t *ref, const int16_t *src, int bwl,
int search_size, int full_search, int *sad);
unsigned int av1_int_pro_motion_estimation(
const struct AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, int mi_row,
int mi_col, const MV *ref_mv, unsigned int *y_sad_zero,
int me_search_size_col, int me_search_size_row);
int av1_refining_search_8p_c(const FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
const FULLPEL_MV start_mv, FULLPEL_MV *best_mv);
int av1_full_pixel_search(const FULLPEL_MV start_mv,
const FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
const int step_param, int *cost_list,
FULLPEL_MV *best_mv, FULLPEL_MV_STATS *best_mv_stats,
FULLPEL_MV *second_best_mv);
int av1_intrabc_hash_search(const struct AV1_COMP *cpi, const MACROBLOCKD *xd,
const FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
IntraBCHashInfo *intrabc_hash_info,
FULLPEL_MV *best_mv);
int av1_obmc_full_pixel_search(const FULLPEL_MV start_mv,
const FULLPEL_MOTION_SEARCH_PARAMS *ms_params,
const int step_param, FULLPEL_MV *best_mv);
static inline int av1_is_fullmv_in_range(const FullMvLimits *mv_limits,
FULLPEL_MV mv) { … }
enum { … } UENUM1BYTE(…) …;
SUBPEL_SEARCH_VAR_PARAMS;
SUBPEL_MOTION_SEARCH_PARAMS;
void av1_make_default_subpel_ms_params(SUBPEL_MOTION_SEARCH_PARAMS *ms_params,
const struct AV1_COMP *cpi,
const MACROBLOCK *x, BLOCK_SIZE bsize,
const MV *ref_mv, const int *cost_list);
fractional_mv_step_fp;
extern fractional_mv_step_fp av1_find_best_sub_pixel_tree;
extern fractional_mv_step_fp av1_find_best_sub_pixel_tree_pruned;
extern fractional_mv_step_fp av1_find_best_sub_pixel_tree_pruned_more;
extern fractional_mv_step_fp av1_return_max_sub_pixel_mv;
extern fractional_mv_step_fp av1_return_min_sub_pixel_mv;
extern fractional_mv_step_fp av1_find_best_obmc_sub_pixel_tree_up;
unsigned int av1_refine_warped_mv(MACROBLOCKD *xd, const AV1_COMMON *const cm,
const SUBPEL_MOTION_SEARCH_PARAMS *ms_params,
BLOCK_SIZE bsize, const int *pts0,
const int *pts_inref0, int total_samples,
WARP_SEARCH_METHOD search_method,
int num_iterations);
static inline void av1_set_fractional_mv(int_mv *fractional_best_mv) { … }
static inline void av1_set_subpel_mv_search_range(SubpelMvLimits *subpel_limits,
const FullMvLimits *mv_limits,
const MV *ref_mv) { … }
static inline int av1_is_subpelmv_in_range(const SubpelMvLimits *mv_limits,
MV mv) { … }
static inline int get_offset_from_fullmv(const FULLPEL_MV *mv, int stride) { … }
static inline const uint8_t *get_buf_from_fullmv(const struct buf_2d *buf,
const FULLPEL_MV *mv) { … }
#ifdef __cplusplus
}
#endif
#endif