From 3046f265b9a12928c2cdd2226f1a78ef5e2bf937 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 8 Jan 2002 00:21:41 +0000 Subject: fix slices when code=0x18, patch by Michael Niedermayer Originally committed as revision 246 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/msmpeg4.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libavcodec/msmpeg4.c') diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index 01e3d5438c..962bd1823a 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -675,6 +675,16 @@ int msmpeg4_decode_mb(MpegEncContext *s, 1024, s->mb_width); memsetw(&s->dc_val[2][(1) + (s->mb_y) * wrap], 1024, s->mb_width); + + /* reset AC pred (set previous line to 0) */ + wrap = s->mb_width * 2 + 2; + memsetw(s->ac_val[0][0] + (1 + (2 * s->mb_y) * wrap)*16, + 0, 2 * s->mb_width*16); + wrap = s->mb_width + 2; + memsetw(s->ac_val[1][0] + (1 + (s->mb_y) * wrap)*16, + 0, s->mb_width*16); + memsetw(s->ac_val[2][0] + (1 + (s->mb_y) * wrap)*16, + 0, s->mb_width*16); s->first_slice_line = 1; } else { -- cgit v1.2.3