diff options
author | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-03-31 22:39:43 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-03-31 22:39:43 +0000 |
commit | bb21f1762aee4a7f3890b0daf524a44e7db1c565 (patch) | |
tree | 0b0571d9cf47581c7a16d1f63b83ec2f16e8879d /libavcodec/motion_est_template.c | |
parent | 91c5172d262ad65dae0a17727b46c3f6caa1b04a (diff) | |
download | ffmpeg-bb21f1762aee4a7f3890b0daf524a44e7db1c565.tar.gz |
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)
Originally committed as revision 8579 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r-- | libavcodec/motion_est_template.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 897c08e3df..e014250269 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -991,13 +991,24 @@ static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dm return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags); } +/*! + \param P[10][2] a list of candidate mvs to check before starting the + iterative search. If one of the candidates is close to the optimal mv, then + it takes fewer iterations. And it increases the chance that we find the + optimal mv. + */ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx_ptr, int *my_ptr, int P[10][2], int src_index, int ref_index, int16_t (*last_mv)[2], int ref_mv_scale, int flags, int size, int h) { MotionEstContext * const c= &s->me; - int best[2]={0, 0}; - int d, dmin; + int best[2]={0, 0}; /*!< x and y coordinates of the best motion vector. + i.e. the difference between the position of the + block current being encoded and the position of + the block chosen to predict it from. */ + int d; ///< the score (cmp + penalty) of any given mv + int dmin; /*!< the best value of d, i.e. the score + corresponding to the mv stored in best[]. */ int map_generation; int penalty_factor; const int ref_mv_stride= s->mb_stride; //pass as arg FIXME |