diff options
author | Piotr Bandurski <ami_stuff@o2.pl> | 2012-05-16 11:51:26 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-16 22:15:59 +0200 |
commit | 4d3787763218de4c3e838b31f0fb2153b8d6af20 (patch) | |
tree | 3fc275327556edb1c0ef3f5e211718125cedbd51 | |
parent | e556121ec15698cb57e59ae76d00a467b7716916 (diff) | |
download | ffmpeg-4d3787763218de4c3e838b31f0fb2153b8d6af20.tar.gz |
aasc: support "Autodesk 24 bit RLE compressor" (FourCC: aas4)
fixes ticket #1310
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/aasc.c | 11 | ||||
-rw-r--r-- | libavformat/riff.c | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index a136360572..1e4264296d 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -68,6 +68,12 @@ static int aasc_decode_frame(AVCodecContext *avctx, compr = AV_RL32(buf); buf += 4; buf_size -= 4; + switch (avctx->codec_tag) { + case MKTAG('A', 'A', 'S', '4'): + bytestream2_init(&s->gb, buf - 4, buf_size + 4); + ff_msrle_decode(avctx, (AVPicture*)&s->frame, 8, &s->gb); + break; + case MKTAG('A', 'A', 'S', 'C'): switch(compr){ case 0: stride = (avctx->width * 3 + 3) & ~3; @@ -89,6 +95,11 @@ static int aasc_decode_frame(AVCodecContext *avctx, av_log(avctx, AV_LOG_ERROR, "Unknown compression type %d\n", compr); return -1; } + break; + default: + av_log(avctx, AV_LOG_ERROR, "Unknown FourCC: %X\n", avctx->codec_tag); + return -1; + } *data_size = sizeof(AVFrame); *(AVFrame*)data = s->frame; diff --git a/libavformat/riff.c b/libavformat/riff.c index ad99ebe1c9..fb3e8ac9dd 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -260,6 +260,7 @@ const AVCodecTag ff_codec_bmp_tags[] = { { CODEC_ID_VC1IMAGE, MKTAG('W', 'V', 'P', '2') }, { CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') }, { CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') }, + { CODEC_ID_AASC, MKTAG('A', 'A', 'S', '4') }, { CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') }, { CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') }, { CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') }, |