[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec bitstream.h, 1.148, 1.149 svq3.c, 1.26, 1.27 dv.c, 1.59, 1.60

Michael Niedermayer CVS michael
Mon Apr 18 14:08:18 CEST 2005


Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv5403

Modified Files:
	bitstream.h svq3.c dv.c 
Log Message:
various fixes related to the non alt_bitstream_reader


Index: bitstream.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/bitstream.h,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- bitstream.h	26 Mar 2005 23:50:14 -0000	1.148
+++ bitstream.h	18 Apr 2005 12:08:16 -0000	1.149
@@ -429,7 +429,7 @@
 #   define UPDATE_CACHE(name, gb)\
     if(name##_bit_count >= 0){\
         name##_cache+= (int)be2me_16(*(uint16_t*)name##_buffer_ptr) << name##_bit_count;\
-        ((uint16_t*)name##_buffer_ptr)++;\
+        name##_buffer_ptr += 2;\
         name##_bit_count-= 16;\
     }\
 

Index: svq3.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/svq3.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- svq3.c	23 Jan 2005 18:09:06 -0000	1.26
+++ svq3.c	18 Apr 2005 12:08:16 -0000	1.27
@@ -720,7 +720,7 @@
   } else {
     int length = (header >> 5) & 3;
 
-    h->next_slice_index = s->gb.index + 8*show_bits (&s->gb, 8*length) + 8*length;
+    h->next_slice_index = get_bits_count(&s->gb) + 8*show_bits (&s->gb, 8*length) + 8*length;
 
     if (h->next_slice_index > s->gb.size_in_bits){
       av_log(h->s.avctx, AV_LOG_ERROR, "slice after bitstream end\n");
@@ -728,10 +728,10 @@
     }
 
     s->gb.size_in_bits = h->next_slice_index - 8*(length - 1);
-    s->gb.index += 8;
+    skip_bits(&s->gb, 8);
 
     if (length > 0) {
-      memcpy ((uint8_t *) &s->gb.buffer[s->gb.index >> 3],
+      memcpy ((uint8_t *) &s->gb.buffer[get_bits_count(&s->gb) >> 3],
              &s->gb.buffer[s->gb.size_in_bits >> 3], (length - 1));
     }
   }
@@ -939,10 +939,10 @@
   for (s->mb_y=0; s->mb_y < s->mb_height; s->mb_y++) {
     for (s->mb_x=0; s->mb_x < s->mb_width; s->mb_x++) {
 
-      if ( (s->gb.index + 7) >= s->gb.size_in_bits &&
-	  ((s->gb.index & 7) == 0 || show_bits (&s->gb, (-s->gb.index & 7)) == 0)) {
+      if ( (get_bits_count(&s->gb) + 7) >= s->gb.size_in_bits &&
+	  ((get_bits_count(&s->gb) & 7) == 0 || show_bits (&s->gb, (-get_bits_count(&s->gb) & 7)) == 0)) {
 
-	s->gb.index = h->next_slice_index;
+	skip_bits(&s->gb, h->next_slice_index - get_bits_count(&s->gb));
 	s->gb.size_in_bits = 8*buf_size;
 
 	if (svq3_decode_slice_header (h))

Index: dv.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/dv.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- dv.c	23 Jan 2005 18:09:06 -0000	1.59
+++ dv.c	18 Apr 2005 12:08:16 -0000	1.60
@@ -263,6 +263,7 @@
 
 #ifndef ALT_BITSTREAM_READER
 #warning only works with ALT_BITSTREAM_READER
+static int re_index; //Hack to make it compile
 #endif
 
 static inline int get_bits_left(GetBitContext *s)





More information about the ffmpeg-cvslog mailing list