diff options
author | Alexandra Hájková <alexandra@khirnov.net> | 2016-04-15 10:50:38 +0200 |
---|---|---|
committer | Alexandra Hájková <alexandra@khirnov.net> | 2016-05-22 16:48:00 +0200 |
commit | 25c64b3c3de738e311c40e46871c02ed853a0ba2 (patch) | |
tree | df5aba6d15ee9b459a35ffff6d06190fc0e08a96 | |
parent | 0b96b164d352df8f0042f53136dc03a0bf59346b (diff) |
wnv1: cpnvert to the new bitstream reader
-rw-r--r-- | libavcodec/wnv1.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index d0304c97ad..80d66ae96c 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -25,7 +25,7 @@ */ #include "avcodec.h" -#include "get_bits.h" +#include "bitstream.h" #include "internal.h" #include "mathops.h" @@ -34,7 +34,7 @@ typedef struct WNV1Context { AVCodecContext *avctx; int shift; - GetBitContext gb; + BitstreamContext bc; } WNV1Context; static const uint16_t code_tab[16][2] = { @@ -49,10 +49,10 @@ static VLC code_vlc; /* returns modified base_value */ static inline int wnv1_get_code(WNV1Context *w, int base_value) { - int v = get_vlc2(&w->gb, code_vlc.table, CODE_VLC_BITS, 1); + int v = bitstream_read_vlc(&w->bc, code_vlc.table, CODE_VLC_BITS, 1); if (v == 15) - return ff_reverse[get_bits(&w->gb, 8 - w->shift)]; + return ff_reverse[bitstream_read(&w->bc, 8 - w->shift)]; else return base_value + ((v - 7) << w->shift); } @@ -90,7 +90,7 @@ static int decode_frame(AVCodecContext *avctx, for (i = 8; i < buf_size; i++) rbuf[i] = ff_reverse[buf[i]]; - init_get_bits(&l->gb, rbuf + 8, (buf_size - 8) * 8); + bitstream_init(&l->bc, rbuf + 8, (buf_size - 8) * 8); if (buf[2] >> 4 == 6) l->shift = 2; |