[FFmpeg-cvslog] exr: Convert to the new bitstream reader
Alexandra Hájková
git at videolan.org
Mon Apr 3 21:38:39 EEST 2017
ffmpeg | branch: master | Alexandra Hájková <alexandra at khirnov.net> | Sat Apr 9 21:00:43 2016 +0200| [8df1ac6b785a1a159cdffed1eec1ab2a8df66460] | committer: Anton Khirnov
exr: Convert to the new bitstream reader
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8df1ac6b785a1a159cdffed1eec1ab2a8df66460
---
libavcodec/exr.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index d10841d..28cee84 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -39,8 +39,8 @@
#include "libavutil/opt.h"
#include "avcodec.h"
+#include "bitstream.h"
#include "bytestream.h"
-#include "get_bits.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;
More information about the ffmpeg-cvslog
mailing list