From: Loren Merritt Date: Sun, 27 Mar 2005 06:58:35 +0000 (+0000) Subject: buffer overruns in slicetype_decision. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=48c34d0bffd57ba7c73f20bd6c892b4b06131140;p=libx264 buffer overruns in slicetype_decision. patch by Mathieu Monnier. git-svn-id: svn://svn.videolan.org/x264/trunk@179 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/encoder/slicetype_decision.c b/encoder/slicetype_decision.c index ce5487e9..fbef01b4 100644 --- a/encoder/slicetype_decision.c +++ b/encoder/slicetype_decision.c @@ -68,7 +68,7 @@ int x264_slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a, uint8_t pix1[9*9], pix2[8*8]; x264_me_t m[2]; - int mvc[3][2], i_mvc; + int mvc[4][2], i_mvc; int i_bcost = INT_MAX; int i_cost_bak; int l, i; @@ -174,8 +174,8 @@ int x264_slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a, for( i = I_PRED_CHROMA_DC; i <= I_PRED_CHROMA_P; i++ ) { int i_cost; - h->predict_8x8[i]( &pix1[9], 9 ); - i_cost = h->pixf.satd[PIXEL_8x8]( &pix1[9], 9, src, i_stride ) + intra_penalty; + h->predict_8x8[i]( &pix1[10], 9 ); + i_cost = h->pixf.satd[PIXEL_8x8]( &pix1[10], 9, src, i_stride ) + intra_penalty; i_bcost = X264_MIN( i_bcost, i_cost ); } if( i_bcost != i_cost_bak )