From 7eac2495b2d32d6328bf68abbc4bb67006a0737a Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Thu, 25 Feb 2010 02:07:48 -0800 Subject: [PATCH] Fix regression in r1449 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/macroblock.c b/common/macroblock.c index b4d0bfb9..0d4f1557 100644 --- a/common/macroblock.c +++ b/common/macroblock.c @@ -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 */ -- 2.47.3