diff options
author | Alexandra Hájková <alexandra@khirnov.net> | 2016-04-09 21:00:43 +0200 |
---|---|---|
committer | Alexandra Hájková <alexandra@khirnov.net> | 2016-05-22 16:47:57 +0200 |
commit | ab7b4992634073f46d4a3eaaf515c411061afb4e (patch) | |
tree | 8101e476a1847ebd9e3be13aad6ef9d049b99616 | |
parent | f1c898929c1b1ec7da5f2aa70b299a8485fc0c40 (diff) |
exr: convert to the new bitstream reader
-rw-r--r-- | libavcodec/exr.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/exr.c b/libavcodec/exr.c index d10841d8d6..a8f44b6d56 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -40,7 +40,7 @@ #include "avcodec.h" #include "bytestream.h" -#include "get_bits.h" +#include "bitstream.h" #include "internal.h" #include "mathops.h" #include "thread.h" @@ -379,16 +379,16 @@ static void huf_canonical_code_table(uint64_t *hcode) static int huf_unpack_enc_table(GetByteContext *gb, int32_t im, int32_t iM, uint64_t *hcode) { - GetBitContext gbit; - int ret = init_get_bits8(&gbit, gb->buffer, bytestream2_get_bytes_left(gb)); + BitstreamContext bc; + int ret = bitstream_init8(&bc, gb->buffer, bytestream2_get_bytes_left(gb)); if (ret < 0) return ret; for (; im <= iM; im++) { - uint64_t l = hcode[im] = get_bits(&gbit, 6); + uint64_t l = hcode[im] = bitstream_read(&bc, 6); if (l == LONG_ZEROCODE_RUN) { - int zerun = get_bits(&gbit, 8) + SHORTEST_LONG_RUN; + int zerun = bitstream_read(&bc, 8) + SHORTEST_LONG_RUN; if (im + zerun > iM + 1) return AVERROR_INVALIDDATA; @@ -410,7 +410,7 @@ static int huf_unpack_enc_table(GetByteContext *gb, } } - bytestream2_skip(gb, (get_bits_count(&gbit) + 7) / 8); + bytestream2_skip(gb, (bitstream_tell(&bc) + 7) / 8); huf_canonical_code_table(hcode); return 0; |