]> git.videolan.org Git - x264.git/commitdiff
Fix rare crash issue in b-adapt
authorJason Garrett-Glaser <darkshikari@gmail.com>
Sun, 21 Sep 2008 02:36:07 +0000 (19:36 -0700)
committerJason Garrett-Glaser <darkshikari@gmail.com>
Sun, 21 Sep 2008 02:38:07 +0000 (19:38 -0700)
Regression *probably* in r979

encoder/slicetype.c

index c08d75ddcbfaddccedc979d6277ceae5e8f0e5f1..06befc6ad838c63a6b2ca98bbbf900d967f1ee31 100644 (file)
@@ -73,13 +73,10 @@ static int x264_slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a,
     h->mb.mv_max_fpel[0] = 8*( h->sps->i_mb_width - h->mb.i_mb_x - 1 ) + 4;
     h->mb.mv_min_spel[0] = 4*( h->mb.mv_min_fpel[0] - 8 );
     h->mb.mv_max_spel[0] = 4*( h->mb.mv_max_fpel[0] + 8 );
-    if( h->mb.i_mb_x <= 1 )
-    {
-        h->mb.mv_min_fpel[1] = -8*h->mb.i_mb_y - 4;
-        h->mb.mv_max_fpel[1] = 8*( h->sps->i_mb_height - h->mb.i_mb_y - 1 ) + 4;
-        h->mb.mv_min_spel[1] = 4*( h->mb.mv_min_fpel[1] - 8 );
-        h->mb.mv_max_spel[1] = 4*( h->mb.mv_max_fpel[1] + 8 );
-    }
+    h->mb.mv_min_fpel[1] = -8*h->mb.i_mb_y - 4;
+    h->mb.mv_max_fpel[1] = 8*( h->sps->i_mb_height - h->mb.i_mb_y - 1 ) + 4;
+    h->mb.mv_min_spel[1] = 4*( h->mb.mv_min_fpel[1] - 8 );
+    h->mb.mv_max_spel[1] = 4*( h->mb.mv_max_fpel[1] + 8 );
 
 #define LOAD_HPELS_LUMA(dst, src) \
     { \