diff common.h @ 1799:95612d423fde libavcodec

multithreaded/SMP motion estimation multithreaded/SMP encoding for MPEG1/MPEG2/MPEG4/H263 all pthread specific code is in pthread.c to try it, run configure --enable-pthreads and ffmpeg ... -threads <num> the internal thread API is a simple AVCodecContext.execute() callback which executes a given function pointer with different arguments and returns after finishing all, that way no mutexes or other thread-mess is needed outside pthread.c
author michael
date Fri, 13 Feb 2004 17:54:10 +0000
parents 920e6381e1fe
children a660ef952580
line wrap: on
line diff
--- a/common.h	Thu Feb 12 16:21:21 2004 +0000
+++ b/common.h	Fri Feb 13 17:54:10 2004 +0000
@@ -475,6 +475,28 @@
 #endif
 }
 
+/**
+ *
+ * PutBitContext must be flushed & aligned to a byte boundary before calling this.
+ */
+static inline void skip_put_bytes(PutBitContext *s, int n){
+        assert((put_bits_count(s)&7)==0);
+#ifdef ALT_BITSTREAM_WRITER
+        FIXME may need some cleaning of the buffer
+	s->index += n<<3;
+#else
+        assert(s->bit_left==32);
+	s->buf_ptr += n;
+#endif    
+}
+
+/**
+ * Changes the end of the buffer.
+ */
+static inline void set_put_bits_buffer_size(PutBitContext *s, int size){
+    s->buf_end= s->buf + size;
+}
+
 /* Bitstream reader API docs:
 name
     abritary name which is used as prefix for the internal variables