changeset 1323:e9da5a651eab libavcodec

fixing concealment MVs prediction
author michaelni
date Sat, 21 Jun 2003 00:50:40 +0000
parents f78341ab5fba
children 7d328fd9d8a5
files mpeg12.c
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mpeg12.c	Fri Jun 20 15:21:25 2003 +0000
+++ b/mpeg12.c	Sat Jun 21 00:50:40 2003 +0000
@@ -959,12 +959,16 @@
             /* 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++) {