Go to the documentation of this file.
21 #ifndef AVCODEC_MOTION_EST_H
22 #define AVCODEC_MOTION_EST_H
32 #if ARCH_IA64 // Limit static arrays to avoid gcc failing "short data segment overflowed"
37 #define MAX_DMV (2*MAX_MV)
38 #define ME_MAP_SIZE 64
77 const uint8_t *
src[4][4];
78 const uint8_t *
ref[4][4];
93 int *mx_ptr,
int *my_ptr,
int dmin,
94 int src_index,
int ref_index,
101 static const uint8_t h263_chroma_roundtab[16] = {
103 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
105 return h263_chroma_roundtab[x & 0xf] + (x >> 3);
117 int P[10][2],
int src_index,
int ref_index,
118 const int16_t (*
last_mv)[2],
int ref_mv_scale,
122 int ref_index,
int size,
int h,
int add_rate);
125 const int16_t (*mv_table)[2],
int type);
130 int type,
int truncate);
static int ff_h263_round_chroma(int x)
Motion estimation context.
const uint8_t * current_mv_penalty
void ff_fix_long_p_mvs(struct MpegEncContext *s, int type)
int ff_init_me(struct MpegEncContext *s)
int co_located_mv[4][2]
mv from last P-frame for direct mode ME
void ff_estimate_p_frame_motion(struct MpegEncContext *s, int mb_x, int mb_y)
qpel_mc_func(* qpel_avg)[16]
int ff_get_best_fcode(struct MpegEncContext *s, const int16_t(*mv_table)[2], int type)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
op_pixels_func(* hpel_avg)[4]
op_pixels_func(* hpel_put)[4]
int ff_epzs_motion_search(struct MpegEncContext *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)
int f_code
forward MV resolution
int skip
set if ME is skipped for the current MB
void ff_estimate_b_frame_motion(struct MpegEncContext *s, int mb_x, int mb_y)
void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
void(* qpel_mc_func)(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
qpel_mc_func(* qpel_put)[16]
const uint8_t(* mv_penalty)[MAX_DMV *2+1]
bit amount needed to encode a MV
int ff_get_mb_score(struct MpegEncContext *s, int mx, int my, int src_index, int ref_index, int size, int h, int add_rate)
const uint8_t * ref[4][4]
int(* sub_motion_search)(struct MpegEncContext *s, int *mx_ptr, int *my_ptr, int dmin, int src_index, int ref_index, int size, int h)
int last_mv[2][2][2]
last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4
int direct_basis_mv[4][2]
uint32_t * score_map
map to store the scores
int ff_pre_estimate_p_frame_motion(struct MpegEncContext *s, int mb_x, int mb_y)
int penalty_factor
an estimate of the bits required to code a given mv value, e.g.
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.
main external API structure.
int64_t mc_mb_var_sum_temp
int pre_pass
= 1 for the pre pass
uint32_t * map
map to avoid duplicate evaluations
void ff_fix_long_mvs(struct MpegEncContext *s, uint8_t *field_select_table, int field_select, int16_t(*mv_table)[2], int f_code, int type, int truncate)