From 905ef0d064d8fb6a349b071c686c4a7fa5a99e07 Mon Sep 17 00:00:00 2001 From: Jason Garrett-Glaser Date: Wed, 4 Aug 2010 23:04:05 +0000 Subject: 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 --- libavcodec/vp56.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'libavcodec/vp56.h') 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; -- cgit v1.2.3