diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-12-20 17:11:54 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-12-20 17:11:54 +0000 |
commit | e4d0e2edb977f08a9dffaf997496ae8686988784 (patch) | |
tree | c070260778f335d35268a7dd86d57d9096c842f3 /libavcodec | |
parent | 0683a5c558704c2425b95d8852230121530a4394 (diff) | |
download | ffmpeg-e4d0e2edb977f08a9dffaf997496ae8686988784.tar.gz |
fix special casing of the 0,0 MV for b frames (slight PSNR/bitrate gain)
Originally committed as revision 7334 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/motion_est_template.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index ff5ea63f69..1bfda10472 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -1023,7 +1023,9 @@ 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) + + //FIXME precalc first term below? + if((s->pict_type == B_TYPE || s->flags&CODEC_FLAG_MV0) && !(c->flags & FLAG_DIRECT)) dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor; /* first line */ |