Mercurial > libavcodec.hg
diff rangecoder.h @ 5082:176ac8353f48 libavcodec
fix assertion failure
author | michael |
---|---|
date | Tue, 29 May 2007 16:51:55 +0000 |
parents | c8c591fe26f8 |
children | ce36118abbbb |
line wrap: on
line diff
--- a/rangecoder.h Tue May 29 16:43:25 2007 +0000 +++ b/rangecoder.h Tue May 29 16:51:55 2007 +0000 @@ -66,6 +66,13 @@ } } +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;