summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:21:40 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:21:40 +0000
commit8badb23e2264caab249dc2758f0bd0a43f423a96 (patch)
tree75f467e43f5c362654d2913145f7d74e91c3f463 /libavcodec/interplayvideo.c
parent9156a5ad72e989e0fa2735741edf894fffad33b9 (diff)
downloadffmpeg-8badb23e2264caab249dc2758f0bd0a43f423a96.tar.gz
Recognize 16-bit Interplay Video variant
Originally committed as revision 20927 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index b3a43bdd34..9f6b833bb1 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -67,6 +67,7 @@ typedef struct IpvideoContext {
const unsigned char *buf;
int size;
+ int is_16bpp;
const unsigned char *stream_ptr;
const unsigned char *stream_end;
unsigned char *pixel_ptr;
@@ -620,7 +621,12 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
return -1;
}
- avctx->pix_fmt = PIX_FMT_PAL8;
+ s->is_16bpp = avctx->bits_per_coded_sample == 16;
+ avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
+ if (s->is_16bpp) {
+ av_log(avctx, AV_LOG_ERROR, "16-bit Interplay video is not supported yet.\n");
+ return -1;
+ }
dsputil_init(&s->dsp, avctx);
/* decoding map contains 4 bits of information per 8x8 block */