Mercurial > libavcodec.hg
comparison motion_est_template.c @ 4757:e511820c4a97 libavcodec
Add doxy comments, based on Loren's explanations posted here:
Date: Mar 30, 2007 9:00 PM
Subject: Re: [Ffmpeg-devel] Motion Estimation in snow.c for Waevelet encoded frames (DWT)
author | gpoirier |
---|---|
date | Sat, 31 Mar 2007 22:39:43 +0000 |
parents | 9af83350d4fd |
children | efeca638ad20 |
comparison
equal
deleted
inserted
replaced
4756:460afa3ac889 | 4757:e511820c4a97 |
---|---|
989 return l2s_dia_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags); | 989 return l2s_dia_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags); |
990 else | 990 else |
991 return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags); | 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 static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx_ptr, int *my_ptr, | 1000 static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx_ptr, int *my_ptr, |
995 int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], | 1001 int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], |
996 int ref_mv_scale, int flags, int size, int h) | 1002 int ref_mv_scale, int flags, int size, int h) |
997 { | 1003 { |
998 MotionEstContext * const c= &s->me; | 1004 MotionEstContext * const c= &s->me; |
999 int best[2]={0, 0}; | 1005 int best[2]={0, 0}; /*!< x and y coordinates of the best motion vector. |
1000 int d, dmin; | 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 int map_generation; | 1012 int map_generation; |
1002 int penalty_factor; | 1013 int penalty_factor; |
1003 const int ref_mv_stride= s->mb_stride; //pass as arg FIXME | 1014 const int ref_mv_stride= s->mb_stride; //pass as arg FIXME |
1004 const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME | 1015 const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME |
1005 me_cmp_func cmpf, chroma_cmpf; | 1016 me_cmp_func cmpf, chroma_cmpf; |