diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-05-29 16:51:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-05-29 16:51:55 +0000 |
commit | 1e6b5700872f6c2729d621ef8e10c1a2873eefd4 (patch) | |
tree | 39476cfead842a0cbe00f264a0fe1812cfb87da4 /libavcodec/rangecoder.h | |
parent | 3dba31aa0d5f0fdca5c002cea9c0757a90ec21f0 (diff) | |
download | ffmpeg-1e6b5700872f6c2729d621ef8e10c1a2873eefd4.tar.gz |
fix assertion failure
Originally committed as revision 9152 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rangecoder.h')
-rw-r--r-- | libavcodec/rangecoder.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/rangecoder.h b/libavcodec/rangecoder.h index 68bd3b60e4..3aac8c6238 100644 --- a/libavcodec/rangecoder.h +++ b/libavcodec/rangecoder.h @@ -66,6 +66,13 @@ static inline void renorm_encoder(RangeCoder *c){ } } +static inline int get_rac_count(RangeCoder *c){ + int x= c->bytestream - c->bytestream_start + c->outstanding_count; + if(c->outstanding_byte >= 0) + x++; + return 8*x - av_log2(c->range); +} + static inline void put_rac(RangeCoder *c, uint8_t * const state, int bit){ int range1= (c->range * (*state)) >> 8; |