diff options
author | Alexandra Hájková <alexandra@khirnov.net> | 2016-04-09 16:20:13 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-09-30 19:14:33 +0200 |
commit | 6b19b7464d98fa29101886ee6f90d81f2b5d7b3e (patch) | |
tree | e9756a1028733acb2846b9bc0a0a19555d4058b1 | |
parent | 27c17e561e7a298888486ad992aae90247b66232 (diff) |
cdxl: Convert to the new bitstream reader
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavcodec/cdxl.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index 99e96eb502..4c0410dd21 100644 --- a/libavcodec/cdxl.c +++ b/libavcodec/cdxl.c @@ -21,8 +21,9 @@ #include "libavutil/intreadwrite.h" #include "libavutil/imgutils.h" + #include "avcodec.h" -#include "get_bits.h" +#include "bitstream.h" #include "internal.h" #define BIT_PLANAR 0x00 @@ -69,30 +70,30 @@ static void import_palette(CDXLVideoContext *c, uint32_t *new_palette) static void bitplanar2chunky(CDXLVideoContext *c, int linesize, uint8_t *out) { - GetBitContext gb; + BitstreamContext bc; int x, y, plane; - init_get_bits(&gb, c->video, c->video_size * 8); + bitstream_init(&bc, c->video, c->video_size * 8); for (plane = 0; plane < c->bpp; plane++) { for (y = 0; y < c->avctx->height; y++) { for (x = 0; x < c->avctx->width; x++) - out[linesize * y + x] |= get_bits1(&gb) << plane; - skip_bits(&gb, c->padded_bits); + out[linesize * y + x] |= bitstream_read_bit(&bc) << plane; + bitstream_skip(&bc, c->padded_bits); } } } static void bitline2chunky(CDXLVideoContext *c, int linesize, uint8_t *out) { - GetBitContext gb; + BitstreamContext bc; int x, y, plane; - init_get_bits(&gb, c->video, c->video_size * 8); + bitstream_init(&bc, c->video, c->video_size * 8); for (y = 0; y < c->avctx->height; y++) { for (plane = 0; plane < c->bpp; plane++) { for (x = 0; x < c->avctx->width; x++) - out[linesize * y + x] |= get_bits1(&gb) << plane; - skip_bits(&gb, c->padded_bits); + out[linesize * y + x] |= bitstream_read_bit(&bc) << plane; + bitstream_skip(&bc, c->padded_bits); } } } |