Mercurial > mplayer.hg
changeset 4053:75415651e3b9
bitstream_skip() instead of bitstream_get() if possible
author | michael |
---|---|
date | Tue, 08 Jan 2002 14:49:17 +0000 |
parents | 505f206d80d1 |
children | 225ebd13bfb9 |
files | liba52/bitstream.h liba52/parse.c |
diffstat | 2 files changed, 18 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- 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) {
--- 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)