Commit 9dbf9389 authored by Fabrice Bellard's avatar Fabrice Bellard

added get_bits_count()


Originally committed as revision 120 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 2456e28d
...@@ -170,7 +170,7 @@ void init_put_bits(PutBitContext *s, ...@@ -170,7 +170,7 @@ void init_put_bits(PutBitContext *s,
void *opaque, void *opaque,
void (*write_data)(void *, UINT8 *, int)); void (*write_data)(void *, UINT8 *, int));
void put_bits(PutBitContext *s, int n, unsigned int value); 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 align_put_bits(PutBitContext *s);
void flush_put_bits(PutBitContext *s); void flush_put_bits(PutBitContext *s);
...@@ -252,6 +252,10 @@ static inline void skip_bits1(GetBitContext *s){ ...@@ -252,6 +252,10 @@ static inline void skip_bits1(GetBitContext *s){
} }
} }
static inline int get_bits_count(GetBitContext *s)
{
return (s->buf_ptr - s->buf) * 8 - s->bit_cnt;
}
void align_get_bits(GetBitContext *s); void align_get_bits(GetBitContext *s);
int init_vlc(VLC *vlc, int nb_bits, int nb_codes, int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment