diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2006-12-01 01:44:22 +0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2006-12-01 01:44:22 +0300 |
commit | f7f8af46f7a0ae7754c5b20e55550a3554384162 (patch) | |
tree | 6f9d9393fe945ea1103d70f9bacd899381281ead /libavcodec/motion_est_template.c | |
parent | fc0b041637abfe654042341420af2455ea785b95 (diff) |
1 step diamond search around the median MV predictor
+0.01 PSNR
idea from x264
Originally committed as revision 7189 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r-- | libavcodec/motion_est_template.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index bdcd48f520..837d49a7fc 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -907,7 +907,11 @@ static always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx c->skip=1; return dmin; } - CHECK_MV(P_MEDIAN[0]>>shift, P_MEDIAN[1]>>shift) + CHECK_MV( P_MEDIAN[0] >>shift , P_MEDIAN[1] >>shift) + CHECK_CLIPED_MV((P_MEDIAN[0]>>shift) , (P_MEDIAN[1]>>shift)-1) + CHECK_CLIPED_MV((P_MEDIAN[0]>>shift) , (P_MEDIAN[1]>>shift)+1) + CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)-1, (P_MEDIAN[1]>>shift) ) + CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)+1, (P_MEDIAN[1]>>shift) ) if(dmin>h*h*2){ CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16, (last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16) |