diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-02-06 17:01:07 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-02-06 17:01:07 +0000 |
commit | 1b781f82c9d21eeabc4c16c89d7b8b2ab39c5cbb (patch) | |
tree | 0a90cffa004fca5a52d44cce9ade43935c0fcc46 /libavcodec/bitstream.h | |
parent | 09b0499f1b28d3b2657fd2bda809b5204ac4ab55 (diff) | |
download | ffmpeg-streaming-1b781f82c9d21eeabc4c16c89d7b8b2ab39c5cbb.zip ffmpeg-streaming-1b781f82c9d21eeabc4c16c89d7b8b2ab39c5cbb.tar.gz |
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.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index 522a453..1e77e0e 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){ |