]> git.sesse.net Git - x264/commitdiff
Fix two bugs in predictor checking
authorFiona Glaser <fiona@x264.com>
Tue, 22 Jan 2013 20:31:55 +0000 (12:31 -0800)
committerFiona Glaser <fiona@x264.com>
Mon, 25 Feb 2013 20:14:35 +0000 (12:14 -0800)
pmv wasn't checked properly in some cases, as well as zero vector.
Output-changing portion of the following patch.

encoder/me.c

index ad8d7e60928d1352c1f1cbd99fec77775323c21c..49f143c3ba5fdd233bafffc8379813adaa8e4590 100644 (file)
@@ -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 )
     {