]> granicus.if.org Git - libx264/commitdiff
Make MV prediction work across slice boundaries
authorFiona Glaser <fiona@x264.com>
Wed, 7 Apr 2010 14:45:00 +0000 (07:45 -0700)
committerFiona Glaser <fiona@x264.com>
Sat, 10 Apr 2010 21:15:09 +0000 (14:15 -0700)
Should improve motion search with lots of small slices, e.g. with slice-max-size.
Still restricted by sliced threads (won't cross the boundary between two threadslices).
The output-changing part of the previous patch.

common/macroblock.c

index 66fd4a9a7b1ce2b8015304714b803bbef44c6881..58f846a0f3370090c6a3b8f711730a8ed5a86484 100644 (file)
@@ -420,17 +420,17 @@ void x264_mb_predict_mv_ref16x16( x264_t *h, int i_list, int i_ref, int16_t mvc[
     }
 
     /* spatial predictors */
-    if( h->mb.i_neighbour & MB_LEFT )
+    if( h->mb.i_neighbour_frame & MB_LEFT )
     {
         SET_MVP( mvr[h->mb.i_mb_left_xy] );
     }
-    if( h->mb.i_neighbour & MB_TOP )
+    if( h->mb.i_neighbour_frame & MB_TOP )
     {
         SET_MVP( mvr[h->mb.i_mb_top_xy] );
 
-        if( h->mb.i_neighbour & MB_TOPLEFT )
+        if( h->mb.i_neighbour_frame & MB_TOPLEFT )
             SET_MVP( mvr[h->mb.i_mb_topleft_xy] );
-        if( h->mb.i_neighbour & MB_TOPRIGHT )
+        if( h->mb.i_neighbour_frame & MB_TOPRIGHT )
             SET_MVP( mvr[h->mb.i_mb_topright_xy] );
     }
 #undef SET_MVP