motion_est.c File Reference


Detailed Description

Motion estimation.

Definition in file motion_est.c.

Go to the source code of this file.

Classes

struct  Minima

Functions

static int sad_hpel_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr, int dmin, int src_index, int ref_index, int size, int h)
static int update_map_generation (MotionEstContext *c)
static int minima_cmp (const void *a, const void *b)
static void init_ref (MotionEstContext *c, uint8_t *src[3], uint8_t *ref[3], uint8_t *ref2[3], int x, int y, int ref_index)
static int get_flags (MotionEstContext *c, int direct, int chroma)
static av_always_inline int cmp (MpegEncContext *s, const int x, const int y, const int subx, const int suby, const int size, const int h, int ref_index, int src_index, me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags)
 compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensated prediction of that block
static int zero_cmp (void *s, uint8_t *a, uint8_t *b, int stride, int h)
static void zero_hpel (uint8_t *a, const uint8_t *b, int stride, int h)
void ff_init_me (MpegEncContext *s)
static int pix_dev (uint8_t *pix, int line_size, int mean)
static void no_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr)
static int full_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr, int range, int xmin, int ymin, int xmax, int ymax, uint8_t *ref_picture)
static int log_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr, int range, int xmin, int ymin, int xmax, int ymax, uint8_t *ref_picture)
static int phods_motion_search (MpegEncContext *s, int *mx_ptr, int *my_ptr, int range, int xmin, int ymin, int xmax, int ymax, uint8_t *ref_picture)
static void set_p_mv_tables (MpegEncContext *s, int mx, int my, int mv4)
static void get_limits (MpegEncContext *s, int x, int y)
 get fullpel ME search limits.
static void init_mv4_ref (MotionEstContext *c)
static int h263_mv4_search (MpegEncContext *s, int mx, int my, int shift)
static void init_interlaced_ref (MpegEncContext *s, int ref_index)
static int interlaced_search (MpegEncContext *s, int ref_index, int16_t(*mv_tables[2][2])[2], uint8_t *field_select_tables[2], int mx, int my, int user_field_select)
static void clip_input_mv (MpegEncContext *s, int16_t *mv, int interlaced)
static int check_input_motion (MpegEncContext *s, int mb_x, int mb_y, int p_type)
void ff_estimate_p_frame_motion (MpegEncContext *s, int mb_x, int mb_y)
int ff_pre_estimate_p_frame_motion (MpegEncContext *s, int mb_x, int mb_y)
static int ff_estimate_motion_b (MpegEncContext *s, int mb_x, int mb_y, int16_t(*mv_table)[2], int ref_index, int f_code)
static int check_bidir_mv (MpegEncContext *s, int motion_fx, int motion_fy, int motion_bx, int motion_by, int pred_fx, int pred_fy, int pred_bx, int pred_by, int size, int h)
static int bidir_refine (MpegEncContext *s, int mb_x, int mb_y)
static int direct_search (MpegEncContext *s, int mb_x, int mb_y)
void ff_estimate_b_frame_motion (MpegEncContext *s, int mb_x, int mb_y)
int ff_get_best_fcode (MpegEncContext *s, int16_t(*mv_table)[2], int type)
void ff_fix_long_p_mvs (MpegEncContext *s)
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)


Function Documentation

static int sad_hpel_motion_search ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr,
int  dmin,
int  src_index,
int  ref_index,
int  size,
int  h 
) [inline, static]

Definition at line 565 of file motion_est.c.

Referenced by ff_init_me().

static int update_map_generation ( MotionEstContext c  )  [inline, static]

static int minima_cmp ( const void *  a,
const void *  b 
) [static]

Definition at line 70 of file motion_est.c.

Referenced by sab_diamond_search().

static void init_ref ( MotionEstContext c,
uint8_t *  src[3],
uint8_t *  ref[3],
uint8_t *  ref2[3],
int  x,
int  y,
int  ref_index 
) [inline, static]

static int get_flags ( MotionEstContext c,
int  direct,
int  chroma 
) [static]

Definition at line 99 of file motion_est.c.

Referenced by ff_init_me().

static av_always_inline int cmp ( MpegEncContext s,
const int  x,
const int  y,
const int  subx,
const int  suby,
const int  size,
const int  h,
int  ref_index,
int  src_index,
me_cmp_func  cmp_func,
me_cmp_func  chroma_cmp_func,
const int  flags 
) [static]

compares a block (either a full macroblock or a partition thereof) against a proposed motion-compensated prediction of that block

Definition at line 108 of file motion_est.c.

Referenced by av_tree_find(), av_tree_insert(), check_input_motion(), CommDetector2::computeBreaks(), epzs_motion_search_internal(), ff_get_mb_score(), hpel_motion_search(), ProfileItem::IsMatch(), lt_smart(), main(), qpel_motion_search(), and small_diamond_search().

static int zero_cmp ( void *  s,
uint8_t *  a,
uint8_t *  b,
int  stride,
int  h 
) [static]

Definition at line 227 of file motion_est.c.

static void zero_hpel ( uint8_t *  a,
const uint8_t *  b,
int  stride,
int  h 
) [static]

Definition at line 231 of file motion_est.c.

Referenced by ff_init_me().

void ff_init_me ( MpegEncContext s  ) 

Definition at line 234 of file motion_est.c.

Referenced by encode_frame(), encode_picture(), and svq1_encode_plane().

static int pix_dev ( uint8_t *  pix,
int  line_size,
int  mean 
) [static]

Definition at line 303 of file motion_est.c.

static void no_motion_search ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr 
) [inline, static]

Definition at line 326 of file motion_est.c.

Referenced by ff_estimate_motion_b(), and ff_estimate_p_frame_motion().

static int full_motion_search ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr,
int  range,
int  xmin,
int  ymin,
int  xmax,
int  ymax,
uint8_t *  ref_picture 
) [static]

Definition at line 334 of file motion_est.c.

Referenced by ff_estimate_motion_b(), and ff_estimate_p_frame_motion().

static int log_motion_search ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr,
int  range,
int  xmin,
int  ymin,
int  xmax,
int  ymax,
uint8_t *  ref_picture 
) [static]

Definition at line 388 of file motion_est.c.

Referenced by ff_estimate_motion_b(), and ff_estimate_p_frame_motion().

static int phods_motion_search ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr,
int  range,
int  xmin,
int  ymin,
int  xmax,
int  ymax,
uint8_t *  ref_picture 
) [static]

Definition at line 464 of file motion_est.c.

Referenced by ff_estimate_motion_b(), and ff_estimate_p_frame_motion().

static void set_p_mv_tables ( MpegEncContext s,
int  mx,
int  my,
int  mv4 
) [inline, static]

Definition at line 673 of file motion_est.c.

Referenced by ff_estimate_p_frame_motion().

static void get_limits ( MpegEncContext s,
int  x,
int  y 
) [inline, static]

static void init_mv4_ref ( MotionEstContext c  )  [inline, static]

Definition at line 733 of file motion_est.c.

Referenced by check_input_motion(), and h263_mv4_search().

static int h263_mv4_search ( MpegEncContext s,
int  mx,
int  my,
int  shift 
) [inline, static]

Definition at line 744 of file motion_est.c.

Referenced by ff_estimate_p_frame_motion().

static void init_interlaced_ref ( MpegEncContext s,
int  ref_index 
) [inline, static]

Definition at line 880 of file motion_est.c.

Referenced by check_input_motion(), and interlaced_search().

static int interlaced_search ( MpegEncContext s,
int  ref_index,
int16_t(*[2][2])  mv_tables[2],
uint8_t *  field_select_tables[2],
int  mx,
int  my,
int  user_field_select 
) [static]

Definition at line 893 of file motion_est.c.

Referenced by ff_estimate_b_frame_motion(), and ff_estimate_p_frame_motion().

static void clip_input_mv ( MpegEncContext s,
int16_t mv,
int  interlaced 
) [static]

Definition at line 1015 of file motion_est.c.

Referenced by check_input_motion().

static int check_input_motion ( MpegEncContext s,
int  mb_x,
int  mb_y,
int  p_type 
) [inline, static]

Definition at line 1025 of file motion_est.c.

Referenced by ff_estimate_b_frame_motion(), and ff_estimate_p_frame_motion().

void ff_estimate_p_frame_motion ( MpegEncContext s,
int  mb_x,
int  mb_y 
)

Definition at line 1161 of file motion_est.c.

Referenced by estimate_motion_thread(), and svq1_encode_plane().

int ff_pre_estimate_p_frame_motion ( MpegEncContext s,
int  mb_x,
int  mb_y 
)

Definition at line 1428 of file motion_est.c.

Referenced by pre_estimate_motion_thread().

static int ff_estimate_motion_b ( MpegEncContext s,
int  mb_x,
int  mb_y,
int16_t(*)  mv_table[2],
int  ref_index,
int  f_code 
) [static]

Definition at line 1481 of file motion_est.c.

Referenced by ff_estimate_b_frame_motion().

static int check_bidir_mv ( MpegEncContext s,
int  motion_fx,
int  motion_fy,
int  motion_bx,
int  motion_by,
int  pred_fx,
int  pred_fy,
int  pred_bx,
int  pred_by,
int  size,
int  h 
) [inline, static]

Definition at line 1574 of file motion_est.c.

Referenced by bidir_refine().

static int bidir_refine ( MpegEncContext s,
int  mb_x,
int  mb_y 
) [inline, static]

Definition at line 1639 of file motion_est.c.

Referenced by ff_estimate_b_frame_motion().

static int direct_search ( MpegEncContext s,
int  mb_x,
int  mb_y 
) [inline, static]

Definition at line 1736 of file motion_est.c.

Referenced by ff_estimate_b_frame_motion().

void ff_estimate_b_frame_motion ( MpegEncContext s,
int  mb_x,
int  mb_y 
)

Definition at line 1838 of file motion_est.c.

Referenced by estimate_motion_thread().

int ff_get_best_fcode ( MpegEncContext s,
int16_t(*)  mv_table[2],
int  type 
)

Definition at line 1997 of file motion_est.c.

Referenced by encode_picture().

void ff_fix_long_p_mvs ( MpegEncContext s  ) 

Definition at line 2056 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().

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 
)

Parameters:
truncate 1 for truncation, 0 for using intra

Definition at line 2107 of file motion_est.c.

Referenced by encode_picture(), and svq1_encode_plane().


Generated on Sat Dec 18 05:15:53 2010 for MythTV by  doxygen 1.5.5