aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-06-21 00:50:40 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-06-21 00:50:40 +0000
commitdaab32960343de43172ebf965099dd4c6939fb86 (patch)
tree27f43b3fae666a7fe44562c345b6dafa30fd59ec /libavcodec
parentccafe7b122bc86d1ed8c499deef851fdd35ea043 (diff)
downloadffmpeg-daab32960343de43172ebf965099dd4c6939fb86.tar.gz
fixing concealment MVs prediction
Originally committed as revision 1982 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpeg12.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index c68f8d8a05..05023d4bc6 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -959,12 +959,16 @@ static int mpeg_decode_mb(MpegEncContext *s,
/* just parse them */
if (s->picture_structure != PICT_FRAME)
skip_bits1(&s->gb); /* field select */
- mpeg_decode_motion(s, s->mpeg_f_code[0][0], 0);
- mpeg_decode_motion(s, s->mpeg_f_code[0][1], 0);
+
+ s->mv[0][0][0]= s->last_mv[0][0][0]= s->last_mv[0][1][0] =
+ mpeg_decode_motion(s, s->mpeg_f_code[0][0], s->last_mv[0][0][0]);
+ s->mv[0][0][1]= s->last_mv[0][0][1]= s->last_mv[0][1][1] =
+ mpeg_decode_motion(s, s->mpeg_f_code[0][1], s->last_mv[0][0][1]);
+
skip_bits1(&s->gb); /* marker */
- }
+ }else
+ memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
s->mb_intra = 1;
- memset(s->last_mv, 0, sizeof(s->last_mv)); /* reset mv prediction */
if (s->mpeg2) {
for(i=0;i<6;i++) {