diff options
author | Alexandra Hájková <alexandra@khirnov.net> | 2016-04-10 11:12:27 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-11-18 10:35:14 +0100 |
commit | b37b681f7734533dd6dc2ede8aa9d5c2607e0c23 (patch) | |
tree | e29bed852f3052a444ac54851158e4bd876d9323 /libavcodec | |
parent | 692ba4fe6445581cee4d414ee29538f1dce7fd8e (diff) | |
download | ffmpeg-b37b681f7734533dd6dc2ede8aa9d5c2607e0c23.tar.gz |
fraps: Convert to the new bitstream reader
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/fraps.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 55051ffe7e..2237991133 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -32,7 +32,7 @@ */ #include "avcodec.h" -#include "get_bits.h" +#include "bitstream.h" #include "huffman.h" #include "bytestream.h" #include "bswapdsp.h" @@ -94,7 +94,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w, const int step) { int i, j, ret; - GetBitContext gb; + BitstreamContext bc; VLC vlc; Node nodes[512]; @@ -111,10 +111,10 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w, s->bdsp.bswap_buf((uint32_t *) s->tmpbuf, (const uint32_t *) src, size >> 2); - init_get_bits(&gb, s->tmpbuf, size * 8); + bitstream_init(&bc, s->tmpbuf, size * 8); for (j = 0; j < h; j++) { for (i = 0; i < w*step; i += step) { - dst[i] = get_vlc2(&gb, vlc.table, VLC_BITS, 3); + dst[i] = bitstream_read_vlc(&bc, vlc.table, VLC_BITS, 3); /* lines are stored as deltas between previous lines * and we need to add 0x80 to the first lines of chroma planes */ @@ -122,7 +122,7 @@ static int fraps2_decode_plane(FrapsContext *s, uint8_t *dst, int stride, int w, dst[i] += dst[i - stride]; else if (Uoff) dst[i] += 0x80; - if (get_bits_left(&gb) < 0) { + if (bitstream_bits_left(&bc) < 0) { ff_free_vlc(&vlc); return AVERROR_INVALIDDATA; } |