changeset 562:23e58889a108 libavcodec

exporting mbskip_table after it has been allocated
author michaelni
date Tue, 16 Jul 2002 11:45:14 +0000
parents 2d5ae7516af0
children 61442627f857
files h263dec.c mpegvideo.c
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/h263dec.c	Tue Jul 16 10:29:07 2002 +0000
+++ b/h263dec.c	Tue Jul 16 11:45:14 2002 +0000
@@ -88,7 +88,6 @@
         return -1;
     }
     s->codec_id= avctx->codec->id;
-    avctx->mbskip_table= s->mbskip_table;
 
     /* for h263, we allocate the images after having read the header */
     if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4)
--- a/mpegvideo.c	Tue Jul 16 10:29:07 2002 +0000
+++ b/mpegvideo.c	Tue Jul 16 11:45:14 2002 +0000
@@ -619,6 +619,7 @@
 
     s->mb_skiped = 0;
     s->decoding_error=0;
+    avctx->mbskip_table= s->mbskip_table;
 
     if(avctx->flags&CODEC_FLAG_DR1){
         int i;
@@ -628,6 +629,7 @@
         s->uvlinesize= avctx->dr_uvstride;
         s->ip_buffer_count= avctx->dr_ip_buffer_count;
     }
+    avctx->dr_ip_buffer_count= s->ip_buffer_count;
     
     if (s->pict_type == B_TYPE) {
         for(i=0;i<3;i++) {
@@ -1443,9 +1445,9 @@
             }
         }
 
-        dest_y = s->current_picture[0] + (mb_y * 16 * s->linesize) + mb_x * 16;
-        dest_cb = s->current_picture[1] + (mb_y * 8 * (s->uvlinesize)) + mb_x * 8;
-        dest_cr = s->current_picture[2] + (mb_y * 8 * (s->uvlinesize)) + mb_x * 8;
+        dest_y = s->current_picture [0] + (mb_y * 16* s->linesize  ) + mb_x * 16;
+        dest_cb = s->current_picture[1] + (mb_y * 8 * s->uvlinesize) + mb_x * 8;
+        dest_cr = s->current_picture[2] + (mb_y * 8 * s->uvlinesize) + mb_x * 8;
 
         if (s->interlaced_dct) {
             dct_linesize = s->linesize * 2;