summaryrefslogtreecommitdiff
path: root/libavcodec/bitstream.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-02-06 17:01:07 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-02-06 17:01:07 +0000
commit1b781f82c9d21eeabc4c16c89d7b8b2ab39c5cbb (patch)
tree0a90cffa004fca5a52d44cce9ade43935c0fcc46 /libavcodec/bitstream.h
parent09b0499f1b28d3b2657fd2bda809b5204ac4ab55 (diff)
support skiping some bitstream encoding
Originally committed as revision 3939 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bitstream.h')
-rw-r--r--libavcodec/bitstream.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index 522a4530d0..1e77e0eb36 100644
--- a/libavcodec/bitstream.h
+++ b/libavcodec/bitstream.h
@@ -291,6 +291,20 @@ static inline void skip_put_bytes(PutBitContext *s, int n){
}
/**
+ * skips the given number of bits.
+ * must only be used if the actual values in the bitstream dont matter
+ */
+static inline void skip_put_bits(PutBitContext *s, int n){
+#ifdef ALT_BITSTREAM_WRITER
+ s->index += n;
+#else
+ s->bit_left -= n;
+ s->buf_ptr-= s->bit_left>>5;
+ s->bit_left &= 31;
+#endif
+}
+
+/**
* Changes the end of the buffer.
*/
static inline void set_put_bits_buffer_size(PutBitContext *s, int size){