comparison vp56rac.c @ 12385:d0b25641338b libavcodec

VP5/6/8: ~7% faster arithmetic decoding Grab from the bitstream in 16-bit chunks instead of 8-bit chunks. TODO: grab in 32-bit chunks on 64-bit systems.
author darkshikari
date Thu, 12 Aug 2010 01:11:32 +0000
parents 7c54834209f6
children
comparison
equal deleted inserted replaced
12384:e1ef713061ce 12385:d0b25641338b
38 }; 38 };
39 39
40 void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size) 40 void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size)
41 { 41 {
42 c->high = 255; 42 c->high = 255;
43 c->bits = -8; 43 c->bits = -16;
44 c->buffer = buf; 44 c->buffer = buf;
45 c->end = buf + buf_size; 45 c->end = buf + buf_size;
46 c->code_word = bytestream_get_be16(&c->buffer); 46 c->code_word = bytestream_get_be24(&c->buffer);
47 } 47 }