dont favor the zero MV if mv0 is used (psnr per bitrate gains ranging from 0 to 0...
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 20 Dec 2006 01:30:17 +0000 (01:30 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 20 Dec 2006 01:30:17 +0000 (01:30 +0000)
Originally committed as revision 7333 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/motion_est_template.c

index 28c637a..ff5ea63 100644 (file)
@@ -1023,6 +1023,8 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
     dmin= cmp(s, 0, 0, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
     map[0]= map_generation;
     score_map[0]= dmin;
+    if(s->flags&CODEC_FLAG_MV0)
+        dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor;
 
     /* first line */
     if (s->first_slice_line) {