diff h263.c @ 1896:ef87d53ca87a libavcodec

h.263 ssm + aic fix by (Maarten Daniels <maarten dot daniels at student dot luc dot ac dot be>)
author michael
date Thu, 18 Mar 2004 22:45:37 +0000
parents 779bdf5063ce
children 5c21b165abf6
line wrap: on
line diff
--- a/h263.c	Thu Mar 18 04:19:34 2004 +0000
+++ b/h263.c	Thu Mar 18 22:45:37 2004 +0000
@@ -1456,8 +1456,10 @@
     c = dc_val[(x) + (y - 1) * wrap];
     
     /* No prediction outside GOB boundary */
-    if (s->first_slice_line && ((n < 2) || (n > 3)))
-        c = 1024;
+    if(s->first_slice_line && n!=3){
+        if(n!=2) c= 1024;
+        if(n!=1 && s->mb_x == s->resync_mb_x) a= 1024;
+    }
     pred_dc = 1024;
     /* just DC prediction */
     if (a != 1024 && c != 1024)
@@ -5117,11 +5119,15 @@
         s->qscale = get_bits(&s->gb, 5);
     }
 
+    s->mb_width = (s->width  + 15) / 16;
+    s->mb_height = (s->height  + 15) / 16;
+    s->mb_num = s->mb_width * s->mb_height;
+
     /* PEI */
     while (get_bits1(&s->gb) != 0) {
         skip_bits(&s->gb, 8);
     }
-    
+
     if(s->h263_slice_structured){
         if (get_bits1(&s->gb) != 1) {
             av_log(s->avctx, AV_LOG_ERROR, "SEPB1 marker missing\n");