[FFmpeg-cvslog] vc1: properly zero coded_block[] edges on new slice entry.

Ronald S. Bultje git at videolan.org
Fri Aug 26 01:53:30 CEST 2011


ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Wed Aug 24 14:36:16 2011 -0700| [d4b9974465baf893e90527a366e7a7411ded1ef8] | committer: Ronald S. Bultje

vc1: properly zero coded_block[] edges on new slice entry.

Previously, we would leave the left edge uninitialized, which led to
CBP prediction errors on slice edges, e.g. in SA10098.vc1.

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

 libavcodec/vc1dec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 8bf900c..4954d4f 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -3019,7 +3019,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
         s->mb_x = 0;
         ff_init_block_index(s);
         memset(&s->coded_block[s->block_index[0]-s->b8_stride], 0,
-               s->b8_stride * sizeof(*s->coded_block));
+               (1 + s->b8_stride) * sizeof(*s->coded_block));
     }
     for(; s->mb_y < s->end_mb_y; s->mb_y++) {
         s->mb_x = 0;



More information about the ffmpeg-cvslog mailing list