# HG changeset patch # User michael # Date 1010501357 0 # Node ID 75415651e3b9df3249d56210e24e32ecf128d7f7 # Parent 505f206d80d1d9719d206b04a984c190aaae58c2 bitstream_skip() instead of bitstream_get() if possible diff -r 505f206d80d1 -r 75415651e3b9 liba52/bitstream.h --- a/liba52/bitstream.h Tue Jan 08 14:10:22 2002 +0000 +++ b/liba52/bitstream.h Tue Jan 08 14:49:17 2002 +0000 @@ -86,6 +86,15 @@ #endif } +static inline void bitstream_skip(int num_bits) +{ +#ifdef ALT_BITSTREAM_READER + indx+= num_bits; +#else + bitstream_get(num_bits); +#endif +} + static inline int32_t bitstream_get_2(uint32_t num_bits) { diff -r 505f206d80d1 -r 75415651e3b9 liba52/parse.c --- a/liba52/parse.c Tue Jan 08 14:10:22 2002 +0000 +++ b/liba52/parse.c Tue Jan 08 14:49:17 2002 +0000 @@ -155,28 +155,28 @@ chaninfo = !acmod; do { - bitstream_get (5); /* dialnorm */ + bitstream_skip (5); /* dialnorm */ if (bitstream_get (1)) /* compre */ - bitstream_get (8); /* compr */ + bitstream_skip (8); /* compr */ if (bitstream_get (1)) /* langcode */ - bitstream_get (8); /* langcod */ + bitstream_skip (8); /* langcod */ if (bitstream_get (1)) /* audprodie */ - bitstream_get (7); /* mixlevel + roomtyp */ + bitstream_skip (7); /* mixlevel + roomtyp */ } while (chaninfo--); - bitstream_get (2); /* copyrightb + origbs */ + bitstream_skip (2); /* copyrightb + origbs */ if (bitstream_get (1)) /* timecod1e */ - bitstream_get (14); /* timecod1 */ + bitstream_skip (14); /* timecod1 */ if (bitstream_get (1)) /* timecod2e */ - bitstream_get (14); /* timecod2 */ + bitstream_skip (14); /* timecod2 */ if (bitstream_get (1)) { /* addbsie */ int addbsil; addbsil = bitstream_get (6); do { - bitstream_get (8); /* addbsi */ + bitstream_skip (8); /* addbsi */ } while (addbsil--); } @@ -732,7 +732,7 @@ if (bitstream_get (1)) { /* skiple */ i = bitstream_get (9); /* skipl */ while (i--) - bitstream_get (8); + bitstream_skip (8); } if (state->output & A52_LFE)