Revision bb21f176 libavcodec/motion_est_template.c
libavcodec/motion_est_template.c  

991  991 
return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags); 
992  992 
} 
993  993  
994 
/*! 

995 
\param P[10][2] a list of candidate mvs to check before starting the 

996 
iterative search. If one of the candidates is close to the optimal mv, then 

997 
it takes fewer iterations. And it increases the chance that we find the 

998 
optimal mv. 

999 
*/ 

994  1000 
static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx_ptr, int *my_ptr, 
995  1001 
int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], 
996  1002 
int ref_mv_scale, int flags, int size, int h) 
997  1003 
{ 
998  1004 
MotionEstContext * const c= &s>me; 
999 
int best[2]={0, 0}; 

1000 
int d, dmin; 

1005 
int best[2]={0, 0}; /*!< x and y coordinates of the best motion vector. 

1006 
i.e. the difference between the position of the 

1007 
block current being encoded and the position of 

1008 
the block chosen to predict it from. */ 

1009 
int d; ///< the score (cmp + penalty) of any given mv 

1010 
int dmin; /*!< the best value of d, i.e. the score 

1011 
corresponding to the mv stored in best[]. */ 

1001  1012 
int map_generation; 
1002  1013 
int penalty_factor; 
1003  1014 
const int ref_mv_stride= s>mb_stride; //pass as arg FIXME 
Also available in: Unified diff