diff options
author | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-08-04 23:04:05 +0000 |
---|---|---|
committer | Jason Garrett-Glaser <darkshikari@gmail.com> | 2010-08-04 23:04:05 +0000 |
commit | 905ef0d064d8fb6a349b071c686c4a7fa5a99e07 (patch) | |
tree | 3ae8bf7599a298afaaa2b80cf196e8b4cf9d5033 /libavcodec/vp56.h | |
parent | aaa91aa00edddb097cce7fa769db6643de37df11 (diff) | |
download | ffmpeg-905ef0d064d8fb6a349b071c686c4a7fa5a99e07.tar.gz |
VP5/6/8: eliminate CABAC dependency
Create a custom table for VP5/6/8's renorm to avoid depending on H.264's.
Saves one instruction in the arithmetic decoder as well.
Originally committed as revision 24701 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vp56.h')
-rw-r--r-- | libavcodec/vp56.h | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h index 7ea7d77817..50a39f75bc 100644 --- a/libavcodec/vp56.h +++ b/libavcodec/vp56.h @@ -181,19 +181,12 @@ int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *data_size, * vp56 specific range coder implementation */ -static inline void vp56_init_range_decoder(VP56RangeCoder *c, - const uint8_t *buf, int buf_size) -{ - c->high = 255; - c->bits = -8; - c->buffer = buf; - c->end = buf + buf_size; - c->code_word = bytestream_get_be16(&c->buffer); -} +extern const uint8_t ff_vp56_norm_shift[256]; +void ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size); static av_always_inline unsigned int vp56_rac_renorm(VP56RangeCoder *c) { - int shift = ff_h264_norm_shift[c->high] - 1; + int shift = ff_vp56_norm_shift[c->high]; int bits = c->bits; unsigned int code_word = c->code_word; |