Commit 6b92fcce authored by kostya's avatar kostya

16-bit Interplay video does not need palette control

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20936 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 557c5207
...@@ -1017,13 +1017,13 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx) ...@@ -1017,13 +1017,13 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx)
s->avctx = avctx; s->avctx = avctx;
if (s->avctx->palctrl == NULL) { 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 && s->avctx->palctrl == NULL) {
av_log(avctx, AV_LOG_ERROR, " Interplay video: palette expected.\n"); av_log(avctx, AV_LOG_ERROR, " Interplay video: palette expected.\n");
return -1; return -1;
} }
s->is_16bpp = avctx->bits_per_coded_sample == 16;
avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8;
dsputil_init(&s->dsp, avctx); dsputil_init(&s->dsp, avctx);
/* decoding map contains 4 bits of information per 8x8 block */ /* decoding map contains 4 bits of information per 8x8 block */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment