Mercurial > libavcodec.hg
comparison cabac.h @ 3967:01e1a12aa380 libavcodec
remove bytestream_end checks, seems to work fine without them and the bitstream reader doesnt check for the end either
author | michael |
---|---|
date | Mon, 09 Oct 2006 12:25:24 +0000 |
parents | 162bea01a5d4 |
children | fc6e0942353b |
comparison
equal
deleted
inserted
replaced
3966:c3ed6f46c5d7 | 3967:01e1a12aa380 |
---|---|
254 put_cabac_bypass(c, sign); | 254 put_cabac_bypass(c, sign); |
255 } | 255 } |
256 } | 256 } |
257 | 257 |
258 static void refill(CABACContext *c){ | 258 static void refill(CABACContext *c){ |
259 if(c->bytestream <= c->bytestream_end) | |
260 #if CABAC_BITS == 16 | 259 #if CABAC_BITS == 16 |
261 c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); | 260 c->low+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); |
262 #else | 261 #else |
263 c->low+= c->bytestream[0]<<1; | 262 c->low+= c->bytestream[0]<<1; |
264 #endif | 263 #endif |
272 x= c->low ^ (c->low-1); | 271 x= c->low ^ (c->low-1); |
273 i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS+1)]; | 272 i= 7 - ff_h264_norm_shift[x>>(CABAC_BITS+1)]; |
274 | 273 |
275 x= -CABAC_MASK; | 274 x= -CABAC_MASK; |
276 | 275 |
277 if(c->bytestream <= c->bytestream_end) | |
278 #if CABAC_BITS == 16 | 276 #if CABAC_BITS == 16 |
279 x+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); | 277 x+= (c->bytestream[0]<<9) + (c->bytestream[1]<<1); |
280 #else | 278 #else |
281 x+= c->bytestream[0]<<1; | 279 x+= c->bytestream[0]<<1; |
282 #endif | 280 #endif |