[FFmpeg-cvslog] interplayvideo: Convert to the new bitstream reader

Alexandra Hájková git at videolan.org
Fri May 5 14:30:18 EEST 2017


ffmpeg | branch: master | Alexandra Hájková <alexandra at khirnov.net> | Tue Apr 12 17:18:09 2016 +0200| [bd6496fa07e32fd09ceb79404f9af43df959bcb2] | committer: Diego Biurrun

interplayvideo: Convert to the new bitstream reader

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd6496fa07e32fd09ceb79404f9af43df959bcb2
---

 libavcodec/interplayvideo.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index e0d1e91992..fab9f2724c 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -40,8 +40,8 @@
 
 #define BITSTREAM_READER_LE
 #include "avcodec.h"
+#include "bitstream.h"
 #include "bytestream.h"
-#include "get_bits.h"
 #include "hpeldsp.h"
 #include "internal.h"
 
@@ -881,7 +881,7 @@ static void ipvideo_decode_opcodes(IpvideoContext *s, AVFrame *frame)
     int x, y;
     unsigned char opcode;
     int ret;
-    GetBitContext gb;
+    BitstreamContext bc;
 
     bytestream2_skip(&s->stream_ptr, 14); /* data starts 14 bytes in */
     if (!s->is_16bpp) {
@@ -898,10 +898,10 @@ static void ipvideo_decode_opcodes(IpvideoContext *s, AVFrame *frame)
     s->upper_motion_limit_offset = (s->avctx->height - 8) * frame->linesize[0]
                                   + (s->avctx->width - 8) * (1 + s->is_16bpp);
 
-    init_get_bits(&gb, s->decoding_map, s->decoding_map_size * 8);
+    bitstream_init(&bc, s->decoding_map, s->decoding_map_size * 8);
     for (y = 0; y < s->avctx->height; y += 8) {
         for (x = 0; x < s->avctx->width; x += 8) {
-            opcode = get_bits(&gb, 4);
+            opcode = bitstream_read(&bc, 4);
 
             ff_dlog(s->avctx,
                     "  block @ (%3d, %3d): encoding 0x%X, data ptr offset %d\n",



More information about the ffmpeg-cvslog mailing list