From: Jason Garrett-Glaser Date: Sun, 21 Sep 2008 02:36:07 +0000 (-0700) Subject: Fix rare crash issue in b-adapt X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=e256ea1fd2198fb2475e03913b9b3b6bddd3b5da;p=x264.git Fix rare crash issue in b-adapt Regression *probably* in r979 --- diff --git a/encoder/slicetype.c b/encoder/slicetype.c index c08d75dd..06befc6a 100644 --- a/encoder/slicetype.c +++ b/encoder/slicetype.c @@ -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) \ { \