diff 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
line wrap: on
line diff
--- a/vp56rac.c	Wed Aug 11 14:18:52 2010 +0000
+++ b/vp56rac.c	Thu Aug 12 01:11:32 2010 +0000
@@ -40,8 +40,8 @@
 void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size)
 {
     c->high = 255;
-    c->bits = -8;
+    c->bits = -16;
     c->buffer = buf;
     c->end = buf + buf_size;
-    c->code_word = bytestream_get_be16(&c->buffer);
+    c->code_word = bytestream_get_be24(&c->buffer);
 }