Mercurial > libavcodec.hg
changeset 85:b0bdab6b8bc6 libavcodec
added get_bits_count()
author | glantau |
---|---|
date | Sat, 15 Sep 2001 22:43:01 +0000 |
parents | 608c7f964bca |
children | 5e0eb8a361b7 |
files | common.h |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/common.h Sat Sep 15 22:42:25 2001 +0000 +++ b/common.h Sat Sep 15 22:43:01 2001 +0000 @@ -170,7 +170,7 @@ void *opaque, void (*write_data)(void *, UINT8 *, int)); void put_bits(PutBitContext *s, int n, unsigned int value); -INT64 get_bit_count(PutBitContext *s); +INT64 get_bit_count(PutBitContext *s); /* XXX: change function name */ void align_put_bits(PutBitContext *s); void flush_put_bits(PutBitContext *s); @@ -252,6 +252,10 @@ } } +static inline int get_bits_count(GetBitContext *s) +{ + return (s->buf_ptr - s->buf) * 8 - s->bit_cnt; +} void align_get_bits(GetBitContext *s); int init_vlc(VLC *vlc, int nb_bits, int nb_codes,