comparison rangecoder.h @ 5082:176ac8353f48 libavcodec

fix assertion failure
author michael
date Tue, 29 May 2007 16:51:55 +0000
parents c8c591fe26f8
children ce36118abbbb
comparison
equal deleted inserted replaced
5081:46c9abb46638 5082:176ac8353f48
64 c->low = (c->low & 0xFF)<<8; 64 c->low = (c->low & 0xFF)<<8;
65 c->range <<= 8; 65 c->range <<= 8;
66 } 66 }
67 } 67 }
68 68
69 static inline int get_rac_count(RangeCoder *c){
70 int x= c->bytestream - c->bytestream_start + c->outstanding_count;
71 if(c->outstanding_byte >= 0)
72 x++;
73 return 8*x - av_log2(c->range);
74 }
75
69 static inline void put_rac(RangeCoder *c, uint8_t * const state, int bit){ 76 static inline void put_rac(RangeCoder *c, uint8_t * const state, int bit){
70 int range1= (c->range * (*state)) >> 8; 77 int range1= (c->range * (*state)) >> 8;
71 78
72 assert(*state); 79 assert(*state);
73 assert(range1 < c->range); 80 assert(range1 < c->range);