diff --git a/Changelog b/Changelog index 19472d43b2..b781f3347a 100644 --- a/Changelog +++ b/Changelog @@ -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: 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] ]; diff --git a/libavformat/iff.c b/libavformat/iff.c index 7601d6d73b..a816af580b 100644 --- a/libavformat/iff.c +++ b/libavformat/iff.c @@ -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;