From fab9d57a8c1327b97c01b83f5e9d58315622250c Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Sat, 20 Sep 2008 19:36:07 -0700 Subject: [PATCH] Fix rare crash issue in b-adapt Regression *probably* in r979 --- encoder/slicetype.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) 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) \ { \ -- 2.40.0