[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>
This commit is contained in:
parent
7f6a019096
commit
cf14c82227
@ -123,6 +123,7 @@ easier to use. The changes are:
|
||||
- OS X Video Decoder Acceleration (VDA) support
|
||||
- compact and csv output in ffprobe
|
||||
- pan audio filter
|
||||
- IFF Amiga Continuous Bitmap (ACBM) decoder
|
||||
|
||||
|
||||
version 0.8:
|
||||
|
@ -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] ];
|
||||
|
@ -43,6 +43,7 @@
|
||||
#define ID_BMHD MKTAG('B','M','H','D')
|
||||
#define ID_CAMG MKTAG('C','A','M','G')
|
||||
#define ID_CMAP MKTAG('C','M','A','P')
|
||||
#define ID_ACBM MKTAG('A','C','B','M')
|
||||
|
||||
#define ID_FORM MKTAG('F','O','R','M')
|
||||
#define ID_ANNO MKTAG('A','N','N','O')
|
||||
@ -53,6 +54,7 @@
|
||||
#define ID_FVER MKTAG('F','V','E','R')
|
||||
#define ID_NAME MKTAG('N','A','M','E')
|
||||
#define ID_TEXT MKTAG('T','E','X','T')
|
||||
#define ID_ABIT MKTAG('A','B','I','T')
|
||||
#define ID_BODY MKTAG('B','O','D','Y')
|
||||
#define ID_ANNO MKTAG('A','N','N','O')
|
||||
|
||||
@ -118,7 +120,7 @@ static int iff_probe(AVProbeData *p)
|
||||
const uint8_t *d = p->buf;
|
||||
|
||||
if ( AV_RL32(d) == ID_FORM &&
|
||||
(AV_RL32(d+8) == ID_8SVX || AV_RL32(d+8) == ID_PBM || AV_RL32(d+8) == ID_ILBM) )
|
||||
(AV_RL32(d+8) == ID_8SVX || AV_RL32(d+8) == ID_PBM || AV_RL32(d+8) == ID_ILBM || AV_RL32(d+8) == ID_ACBM) )
|
||||
return AVPROBE_SCORE_MAX;
|
||||
return 0;
|
||||
}
|
||||
@ -166,6 +168,7 @@ static int iff_read_header(AVFormatContext *s,
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_ABIT:
|
||||
case ID_BODY:
|
||||
iff->body_pos = avio_tell(pb);
|
||||
iff->body_size = data_size;
|
||||
|
Loading…
Reference in New Issue
Block a user