Mercurial > libavcodec.hg
changeset 10712:277bf9801257 libavcodec
Recognize 16-bit Interplay Video variant
author | kostya |
---|---|
date | Sun, 27 Dec 2009 08:21:40 +0000 |
parents | d2c20d24abbd |
children | b703476cd4df |
files | interplayvideo.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/interplayvideo.c Sun Dec 27 08:15:19 2009 +0000 +++ b/interplayvideo.c Sun Dec 27 08:21:40 2009 +0000 @@ -67,6 +67,7 @@ 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 @@ 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 */