summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandra Hájková <alexandra@khirnov.net>2016-04-12 18:32:50 +0200
committerAnton Khirnov <anton@khirnov.net>2016-09-30 19:14:34 +0200
commit123688010d479831ac9bde4824cb4d053631940c (patch)
tree8dcd8d6ef486e2fcacd5927f36e2fe48c0617242
parented6390c6f4a2eef7e3a6328b8b297d72b4f6cad5 (diff)
pcx: Convert to the new bitstream reader
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavcodec/pcx.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index a2d49b454d..ece885e6e0 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -23,9 +23,10 @@
*/
#include "libavutil/imgutils.h"
+
#include "avcodec.h"
+#include "bitstream.h"
#include "bytestream.h"
-#include "get_bits.h"
#include "internal.h"
#define PCX_HEADER_SIZE 128
@@ -179,15 +180,15 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
goto end;
}
} else if (nplanes == 1) { /* all packed formats, max. 16 colors */
- GetBitContext s;
+ BitstreamContext s;
for (y = 0; y < h; y++) {
- init_get_bits(&s, scanline, bytes_per_scanline << 3);
+ bitstream_init(&s, scanline, bytes_per_scanline << 3);
pcx_rle_decode(&gb, scanline, bytes_per_scanline, compressed);
for (x = 0; x < w; x++)
- ptr[x] = get_bits(&s, bits_per_pixel);
+ ptr[x] = bitstream_read(&s, bits_per_pixel);
ptr += stride;
}
} else { /* planar, 4, 8 or 16 colors */