summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-13 18:39:43 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-13 18:39:43 +0000
commit80ee9fc0e305b815b4b67bbf8fa9ceccdc1d369e (patch)
tree6d9367e6ca3a1bc33d18fd035459ccc218b2f43f /libavcodec/motion_est_template.c
parent9c3d33d67f2260d5ddc888e8ea380c3913e38a72 (diff)
simplify MV availability check / dont use below last row MV which is always zero
Originally committed as revision 2773 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r--libavcodec/motion_est_template.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 65fb3ae606..49c2e57b5c 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -946,7 +946,7 @@ static int RENAME(epzs_motion_search)(MpegEncContext * s,
}else{
CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16)
- if(s->end_mb_y == s->mb_height || s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line
+ if(s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line
CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16)
}
@@ -1048,7 +1048,7 @@ static int RENAME(epzs_motion_search4)(MpegEncContext * s,
if(dmin>64*4){
CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16)
- if(s->end_mb_y == s->mb_height || s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line
+ if(s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line
CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16)
}
@@ -1127,7 +1127,7 @@ static int RENAME(epzs_motion_search2)(MpegEncContext * s,
if(dmin>64*4){
CHECK_CLIPED_MV((last_mv[ref_mv_xy+1][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy+1][1]*ref_mv_scale + (1<<15))>>16)
- if(s->end_mb_y == s->mb_height || s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line
+ if(s->mb_y+1<s->end_mb_y) //FIXME replace at least with last_slice_line
CHECK_CLIPED_MV((last_mv[ref_mv_xy+ref_mv_stride][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy+ref_mv_stride][1]*ref_mv_scale + (1<<15))>>16)
}