summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2006-12-20 01:30:17 +0000
committerMichael Niedermayer <michaelni@gmx.at>2006-12-20 01:30:17 +0000
commitff8dc81b5b9e3c0ecb45baf7e9769b43ef0efadf (patch)
treea229219f107488b9a209b502c2e7e1a790a6272e /libavcodec/motion_est_template.c
parent5a5c770d5a1b839d5d093d0cf58d866a473e4904 (diff)
downloadffmpeg-ff8dc81b5b9e3c0ecb45baf7e9769b43ef0efadf.tar.gz
dont favor the zero MV if mv0 is used (psnr per bitrate gains ranging from 0 to 0.14, most are <=0.04 though)
Originally committed as revision 7333 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r--libavcodec/motion_est_template.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 28c637af88..ff5ea63f69 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -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) {