Revision bb21f176

View differences:

libavcodec/motion_est.c
103 103
           + (chroma ? FLAG_CHROMA : 0);
104 104
}
105 105

  
106
/*! \brief compares two blocks, which may be full macroblocks or may be
107
    partitions thereof.
108
 */
106 109
static av_always_inline int cmp(MpegEncContext *s, const int x, const int y, const int subx, const int suby,
107 110
                      const int size, const int h, int ref_index, int src_index,
108 111
                      me_cmp_func cmp_func, me_cmp_func chroma_cmp_func, const int flags){
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
libavcodec/mpegvideo.h
162 162
    uint32_t *score_map;               ///< map to store the scores
163 163
    int map_generation;
164 164
    int pre_penalty_factor;
165
    int penalty_factor;
165
    int penalty_factor;                /*!< an estimate of the bits required to
166
                                        code a given mv value, e.g. (1,0) takes
167
                                        more bits than (0,0). We have to
168
                                        estimate whether any reduction in
169
                                        residual is worth the extra bits. */
166 170
    int sub_penalty_factor;
167 171
    int mb_penalty_factor;
168 172
    int flags;

Also available in: Unified diff