Mercurial > libavcodec.hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 2501:236562127b89 | 2502:f5fe61bd08ac |
|---|---|
| 289 s->buf_ptr += n; | 289 s->buf_ptr += n; |
| 290 #endif | 290 #endif |
| 291 } | 291 } |
| 292 | 292 |
| 293 /** | 293 /** |
| 294 * skips the given number of bits. | |
| 295 * must only be used if the actual values in the bitstream dont matter | |
| 296 */ | |
| 297 static inline void skip_put_bits(PutBitContext *s, int n){ | |
| 298 #ifdef ALT_BITSTREAM_WRITER | |
| 299 s->index += n; | |
| 300 #else | |
| 301 s->bit_left -= n; | |
| 302 s->buf_ptr-= s->bit_left>>5; | |
| 303 s->bit_left &= 31; | |
| 304 #endif | |
| 305 } | |
| 306 | |
| 307 /** | |
| 294 * Changes the end of the buffer. | 308 * Changes the end of the buffer. |
| 295 */ | 309 */ |
| 296 static inline void set_put_bits_buffer_size(PutBitContext *s, int size){ | 310 static inline void set_put_bits_buffer_size(PutBitContext *s, int size){ |
| 297 s->buf_end= s->buf + size; | 311 s->buf_end= s->buf + size; |
| 298 } | 312 } |
