]> git.sesse.net Git - x264/commitdiff
Fix regression in r1449
authorFiona Glaser <fiona@x264.com>
Thu, 25 Feb 2010 10:07:48 +0000 (02:07 -0800)
committerFiona Glaser <fiona@x264.com>
Thu, 25 Feb 2010 10:07:48 +0000 (02:07 -0800)
Incorrectly placed thread MV check could result in rare thread MV internal errors, esp. with --non-deterministic.
These weren't fatal errors (x264 could recover and continue with slight compression loss).

common/macroblock.c

index fdfcb7b625071b96b7232471ca1872f97776dbfc..0a7881e0148460f788e99ad6897c38479db63eb6 100644 (file)
@@ -286,9 +286,6 @@ static int x264_mb_predict_mv_direct16x16_spatial( x264_t *h )
         return 1;
     }
 
-    if( !M64( mv ) || IS_INTRA( type_col ) || (ref[0]&&ref[1]) )
-        return 1;
-
     if( h->param.i_threads > 1
         && ( mv[0][1] > h->mb.mv_max_spel[1]
           || mv[1][1] > h->mb.mv_max_spel[1] ) )
@@ -301,6 +298,9 @@ static int x264_mb_predict_mv_direct16x16_spatial( x264_t *h )
         return 0;
     }
 
+    if( !M64( mv ) || IS_INTRA( type_col ) || (ref[0]&&ref[1]) )
+        return 1;
+
     /* Don't do any checks other than the ones we have to, based
      * on the size of the colocated partitions.
      * Depends on the enum order: D_8x8, D_16x8, D_8x16, D_16x16 */