summaryrefslogtreecommitdiff
path: root/libavcodec/motion_est_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-01-18 01:37:42 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-01-18 01:37:42 +0000
commit1d0eab1dcc26344309f624a95d91f97d72f4b847 (patch)
tree37ae014bba1a776294910fba748ad563b662923b /libavcodec/motion_est_template.c
parente51d4defe06c0acbfb56b5256cefae3b39a7d5c1 (diff)
bugs
Originally committed as revision 1469 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/motion_est_template.c')
-rw-r--r--libavcodec/motion_est_template.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index d1ca6e7fbd..6711785f61 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -160,7 +160,7 @@ static int RENAME(hpel_motion_search)(MpegEncContext * s,
if(s->avctx->me_cmp != s->avctx->me_sub_cmp){
CMP_HPEL(dmin, 0, 0, mx, my, size);
- if(mx || my)
+ if(mx || my || size>0)
dmin += (mv_penalty[2*mx - pred_x] + mv_penalty[2*my - pred_y])*penalty_factor;
}
@@ -290,7 +290,7 @@ static int RENAME(qpel_motion_search)(MpegEncContext * s,
if(s->avctx->me_cmp != s->avctx->me_sub_cmp){
CMP_QPEL(dmin, 0, 0, mx, my, size);
- if(mx || my)
+ if(mx || my || size>0)
dmin += (mv_penalty[4*mx - pred_x] + mv_penalty[4*my - pred_y])*penalty_factor;
}