From: Jason Garrett-Glaser Date: Tue, 22 Jan 2013 20:31:55 +0000 (-0800) Subject: Fix two bugs in predictor checking X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=a216e5c92a1543e5d748928f7531cfd771739cbf;p=x264.git Fix two bugs in predictor checking pmv wasn't checked properly in some cases, as well as zero vector. Output-changing portion of the following patch. --- diff --git a/encoder/me.c b/encoder/me.c index 72895f13..af4a970d 100644 --- a/encoder/me.c +++ b/encoder/me.c @@ -219,8 +219,7 @@ void x264_me_search_ref( x264_t *h, x264_me_t *m, int16_t (*mvc)[2], int i_mvc, if( h->mb.i_subpel_refine >= 3 ) { pmv = pack16to32_mask(bmx,bmy); - if( i_mvc ) - COST_MV_HPEL( bmx, bmy ); + COST_MV_HPEL( bmx, bmy ); for( int i = 0; i < i_mvc; i++ ) { if( M32( mvc[i] ) && (pmv != M32( mvc[i] )) ) @@ -270,8 +269,7 @@ void x264_me_search_ref( x264_t *h, x264_me_t *m, int16_t (*mvc)[2], int i_mvc, } } - if( pmv ) - COST_MV( 0, 0 ); + COST_MV( 0, 0 ); switch( h->mb.i_me_method ) {