Mercurial > libavcodec.hg
diff bitstream.h @ 2502:f5fe61bd08ac libavcodec
support skiping some bitstream encoding
author | michael |
---|---|
date | Sun, 06 Feb 2005 17:01:07 +0000 |
parents | 0b3697268285 |
children | 91e094c9dcdc |
line wrap: on
line diff
--- a/bitstream.h Sun Feb 06 10:36:07 2005 +0000 +++ b/bitstream.h Sun Feb 06 17:01:07 2005 +0000 @@ -291,6 +291,20 @@ } /** + * 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){