From: Loren Merritt Date: Tue, 22 Nov 2005 02:43:11 +0000 (+0000) Subject: subpel search: always check mvp. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=528cbd1f16cd20b3ee8bbfd5b5edf6634a7f4634;p=libx264 subpel search: always check mvp. git-svn-id: svn://svn.videolan.org/x264/trunk@370 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/encoder/me.c b/encoder/me.c index 325da19a..765457dd 100644 --- a/encoder/me.c +++ b/encoder/me.c @@ -366,8 +366,8 @@ static void refine_subpel( x264_t *h, x264_me_t *m, int hpel_iters, int qpel_ite * the result of the fullpel search */ if( hpel_iters ) { - int mx = abs(bmx - m->mvp[0]) < 4 ? m->mvp[0] : bmx; - int my = abs(bmy - m->mvp[1]) < 4 ? m->mvp[1] : bmy; + int mx = x264_clip3( m->mvp[0], h->mb.mv_min[0], h->mb.mv_max[0] ); + int my = x264_clip3( m->mvp[1], h->mb.mv_min[1], h->mb.mv_max[1] ); if( mx != bmx || my != bmy ) COST_MV_SAD( mx, my ); }