21#ifndef AVCODEC_MOTION_EST_H
22#define AVCODEC_MOTION_EST_H
39#define MAX_DMV (2*MAX_MV)
79 const uint8_t *
src[4][4];
80 const uint8_t *
ref[4][4];
103 int *mx_ptr,
int *my_ptr,
int dmin,
104 int src_index,
int ref_index,
126 int P[10][2],
int src_index,
int ref_index,
127 const int16_t (*last_mv)[2],
int ref_mv_scale,
131 int ref_index,
int size,
int h,
int add_rate);
134 const int16_t (*mv_table)[2],
int type);
138 int field_select, int16_t (*mv_table)[2],
int f_code,
139 int type,
int truncate);
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t my
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t mx
Libavcodec external API header.
void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
Average and put pixel Widths can be 16, 8, 4 or 2.
int(* me_cmp_func)(MPVEncContext *c, const uint8_t *blk1, const uint8_t *blk2, ptrdiff_t stride, int h)
int ff_epzs_motion_search(MPVEncContext *s, int *mx_ptr, int *my_ptr, int P[10][2], int src_index, int ref_index, const int16_t(*last_mv)[2], int ref_mv_scale, int size, int h)
void ff_estimate_p_frame_motion(MPVEncContext *s, int mb_x, int mb_y)
void ff_fix_long_mvs(MPVEncContext *s, uint8_t *field_select_table, int field_select, int16_t(*mv_table)[2], int f_code, int type, int truncate)
int ff_me_init(MotionEstContext *c, struct AVCodecContext *avctx, const struct MECmpContext *mecc, int mpvenc)
Performs one-time initialization of the MotionEstContext.
void ff_me_init_pic(MPVEncContext *s)
void ff_fix_long_p_mvs(MPVEncContext *s, int type)
int ff_pre_estimate_p_frame_motion(MPVEncContext *s, int mb_x, int mb_y)
int ff_get_mb_score(MPVEncContext *s, int mx, int my, int src_index, int ref_index, int size, int h, int add_rate)
void ff_estimate_b_frame_motion(MPVEncContext *s, int mb_x, int mb_y)
int ff_get_best_fcode(MPVMainEncContext *m, const int16_t(*mv_table)[2], int type)
void(* qpel_mc_func)(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
main external API structure.
Motion estimation context.
const uint8_t * src[4][4]
uint8_t * scratchpad
data area for the ME algo, so that the ME does not need to malloc/free.
const uint8_t(* mv_penalty)[MAX_DMV *2+1]
bit amount needed to encode a MV
const uint8_t * current_mv_penalty
uint32_t score_map[ME_MAP_SIZE]
map to store the scores
int skip
set if ME is skipped for the current MB
qpel_mc_func(* qpel_put)[16]
int pre_pass
= 1 for the pre pass
int unrestricted_mv
mv can point outside of the coded picture
int motion_est
ME algorithm.
int penalty_factor
an estimate of the bits required to code a given mv value, e.g.
int direct_basis_mv[4][2]
int64_t mc_mb_var_sum_temp
me_cmp_func me_pre_cmp[6]
op_pixels_func(* hpel_avg)[4]
int(* sub_motion_search)(MPVEncContext *s, int *mx_ptr, int *my_ptr, int dmin, int src_index, int ref_index, int size, int h)
me_cmp_func pix_abs[2][4]
me_cmp_func me_sub_cmp[6]
op_pixels_func(* hpel_put)[4]
int co_located_mv[4][2]
mv from last P-frame for direct mode ME
const uint8_t * ref[4][4]
uint32_t map[ME_MAP_SIZE]
map to avoid duplicate evaluations
qpel_mc_func(* qpel_avg)[16]