[x264-devel] commit: Fix rare crash issue in b-adapt (Jason Garrett-Glaser )

git version control git at videolan.org
Sun Sep 21 04:34:43 CEST 2008


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sat Sep 20 19:36:07 2008 -0700| [e256ea1fd2198fb2475e03913b9b3b6bddd3b5da] | committer: Jason Garrett-Glaser 

Fix rare crash issue in b-adapt
Regression *probably* in r979

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=e256ea1fd2198fb2475e03913b9b3b6bddd3b5da
---

 encoder/slicetype.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index c08d75d..06befc6 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) \
     { \



More information about the x264-devel mailing list