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 51 int direct_basis_mv[4][2];
60 unsigned map_generation;
61 int pre_penalty_factor;
67 int sub_penalty_factor;
68 int mb_penalty_factor;
85 int64_t mc_mb_var_sum_temp;
86 int64_t mb_var_sum_temp;
87 int scene_change_score;
89 op_pixels_func(*hpel_put)[4];
90 op_pixels_func(*hpel_avg)[4];
91 qpel_mc_func(*qpel_put)[16];
92 qpel_mc_func(*qpel_avg)[16];
94 uint8_t *current_mv_penalty;
96 int *mx_ptr,
int *my_ptr,
int dmin,
97 int src_index,
int ref_index,
101 static inline int ff_h263_round_chroma(
int x)
104 static const uint8_t h263_chroma_roundtab[16] = {
106 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,
108 return h263_chroma_roundtab[x & 0xf] + (x >> 3);
114 void ff_estimate_b_frame_motion(
struct MpegEncContext *s,
int mb_x,
int mb_y);
119 int ff_epzs_motion_search(
struct MpegEncContext *s,
int *mx_ptr,
int *my_ptr,
120 int P[10][2],
int src_index,
int ref_index,
121 int16_t (*
last_mv)[2],
int ref_mv_scale,
int size,
124 int ff_get_mb_score(
struct MpegEncContext *s,
int mx,
int my,
int src_index,
125 int ref_index,
int size,
int h,
int add_rate);
128 int16_t (*mv_table)[2],
int type);
132 int field_select, int16_t (*mv_table)[2],
int f_code,
133 int type,
int truncate);
uint8_t * scratchpad
data area for the ME algo, so that the ME does not need to malloc/free.
Definition: motion_est.h:52
int skip
set if ME is skipped for the current MB
Definition: motion_est.h:49
void ff_estimate_p_frame_motion(MpegEncContext *s, int mb_x, int mb_y)
Definition: motion_est.c:885
int last_mv[2][2][2]
last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4
Definition: mpegvideo.h:278
int pre_pass
= 1 for the pre pass
Definition: motion_est.h:72
uint32_t * score_map
map to store the scores
Definition: motion_est.h:59
uint8_t(* mv_penalty)[MAX_DMV *2+1]
bit amount needed to encode a MV
Definition: motion_est.h:93
Motion estimation context.
Definition: motion_est.h:47
int penalty_factor
an estimate of the bits required to code a given mv value, e.g.
Definition: motion_est.h:62
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:1518
int f_code
forward MV resolution
Definition: mpegvideo.h:238
MpegEncContext.
Definition: mpegvideo.h:81
int co_located_mv[4][2]
mv from last P-frame for direct mode ME
Definition: motion_est.h:50
uint32_t * map
map to avoid duplicate evaluations
Definition: motion_est.h:58
void ff_fix_long_mvs(MpegEncContext *s, uint8_t *field_select_table, int field_select, int16_t(*mv_table)[2], int f_code, int type, int truncate)
Definition: motion_est.c:1700