Commit 48c34d0b authored by Loren Merritt's avatar Loren Merritt
Browse files

buffer overruns in slicetype_decision.

patch by Mathieu Monnier.


git-svn-id: svn://svn.videolan.org/x264/trunk@179 df754926-b1dd-0310-bc7b-ec298dee348c
parent a1c2c046
......@@ -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 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment