# HG changeset patch # User skal # Date 1281504259 0 # Node ID a0c84084fa2fe7e579a237f5e3df5a55121612c7 # Parent 2ba9068e748d20816c1907a9dddd1445d3d66a08 fix over-allocation. confused b4_stride with mb_width. diff -r 2ba9068e748d -r a0c84084fa2f vp8.c --- a/vp8.c Mon Aug 09 13:54:59 2010 +0000 +++ b/vp8.c Wed Aug 11 05:24:19 2010 +0000 @@ -242,7 +242,7 @@ s->macroblocks_base = av_mallocz((s->mb_stride+s->mb_height*2+2)*sizeof(*s->macroblocks)); s->filter_strength = av_mallocz(s->mb_stride*sizeof(*s->filter_strength)); - s->intra4x4_pred_mode_top = av_mallocz(s->b4_stride*4); + s->intra4x4_pred_mode_top = av_mallocz(s->mb_width*4); s->top_nnz = av_mallocz(s->mb_width*sizeof(*s->top_nnz)); s->top_border = av_mallocz((s->mb_width+1)*sizeof(*s->top_border)); s->segmentation_map = av_mallocz(s->mb_stride*s->mb_height); @@ -1543,7 +1543,7 @@ memset(s->top_border, 127, (s->mb_width+1)*sizeof(*s->top_border)); memset(s->ref_count, 0, sizeof(s->ref_count)); if (s->keyframe) - memset(s->intra4x4_pred_mode_top, DC_PRED, s->b4_stride*4); + memset(s->intra4x4_pred_mode_top, DC_PRED, s->mb_width*4); for (mb_y = 0; mb_y < s->mb_height; mb_y++) { VP56RangeCoder *c = &s->coeff_partition[mb_y & (s->num_coeff_partitions-1)];