diff options
author | ami_stuff <ami_stuff@o2.pl> | 2011-11-21 20:31:47 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-21 23:06:53 +0100 |
commit | cf14c822275301209c307fb35351d5c9833b7a3b (patch) | |
tree | 644fe2d4a1211d489f5e70ab3c042ccd25c281ea /libavcodec | |
parent | 7f6a0190963f99c9b90dc58f17f8d450d2a4f98e (diff) | |
download | ffmpeg-cf14c822275301209c307fb35351d5c9833b7a3b.tar.gz |
[PATCH] IFF Amiga Continuous Bitmap (ACBM)decoder
Some sample IFF ACBM files can be found here:
http://aminet.net/package/dev/basic/ABdemos
Thanks to Peter Ross for his help with this patch.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/iff.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index 39fa7323f0..c4c614ed4e 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -440,7 +440,18 @@ static int decode_frame_ilbm(AVCodecContext *avctx, } s->init = 1; - if (avctx->codec_tag == MKTAG('I','L','B','M')) { // interleaved + if (avctx->codec_tag == MKTAG('A','C','B','M')) { + if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) { + memset(s->frame.data[0], 0, avctx->height * s->frame.linesize[0]); + for (plane = 0; plane < s->bpp; plane++) { + for(y = 0; y < avctx->height && buf < buf_end; y++ ) { + uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ]; + decodeplane8(row, buf, FFMIN(s->planesize, buf_end - buf), plane); + buf += s->planesize; + } + } + } + } else if (avctx->codec_tag == MKTAG('I','L','B','M')) { // interleaved if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) { for(y = 0; y < avctx->height; y++ ) { uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ]; |