summaryrefslogtreecommitdiff
path: root/libavformat/iff.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2012-11-22 20:42:37 +1100
committerPeter Ross <pross@xvid.org>2012-11-26 23:29:02 +1100
commit76f60788e7964453e11ca9d632b3e4c843cc514c (patch)
tree31ffac88e01f3d21b8ca75bb88149ac9946d7245 /libavformat/iff.c
parentf737e7602649b6e193bd92a923510a153c82e8ae (diff)
iff demuxer: don't bother checking bitmap compression type; iff decoder does this now
Signed-off-by: Peter Ross <pross@xvid.org> Reviewed-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/iff.c')
-rw-r--r--libavformat/iff.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index b748f49006..fbd0a0d9a6 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -85,17 +85,12 @@ typedef enum {
COMP_EXP
} svx8_compression_type;
-typedef enum {
- BITMAP_RAW,
- BITMAP_BYTERUN1
-} bitmap_compression_type;
-
typedef struct {
uint64_t body_pos;
uint32_t body_size;
uint32_t sent_bytes;
svx8_compression_type svx8_compression;
- bitmap_compression_type bitmap_compression; ///< delta compression method used
+ unsigned bitmap_compression; ///< delta compression method used
unsigned bpp; ///< bits per plane to decode (differs from bits_per_coded_sample if HAM)
unsigned ham; ///< 0 if non-HAM or number of hold bits (6 for bpp > 6, 4 otherwise)
unsigned flags; ///< 1 for EHB, 0 is no extra half darkening
@@ -272,11 +267,6 @@ static int iff_read_header(AVFormatContext *s)
st->codec->width = avio_rb16(pb);
st->codec->height = avio_rb16(pb);
iff->bitmap_compression = avio_rb16(pb);
- if (iff->bitmap_compression > 1) {
- av_log(s, AV_LOG_ERROR,
- "compression %i not supported\n", iff->bitmap_compression);
- return AVERROR_PATCHWELCOME;
- }
st->sample_aspect_ratio.num = avio_r8(pb);
st->sample_aspect_ratio.den = avio_r8(pb);
st->codec->bits_per_coded_sample = 24;
@@ -356,19 +346,7 @@ static int iff_read_header(AVFormatContext *s)
bytestream_put_byte(&buf, iff->flags);
bytestream_put_be16(&buf, iff->transparency);
bytestream_put_byte(&buf, iff->masking);
-
- switch (iff->bitmap_compression) {
- case BITMAP_RAW:
- st->codec->codec_id = AV_CODEC_ID_IFF_ILBM;
- break;
- case BITMAP_BYTERUN1:
- st->codec->codec_id = AV_CODEC_ID_IFF_BYTERUN1;
- break;
- default:
- av_log(s, AV_LOG_ERROR,
- "Unknown bitmap compression method '%d'\n", iff->bitmap_compression);
- return AVERROR_INVALIDDATA;
- }
+ st->codec->codec_id = AV_CODEC_ID_IFF_ILBM;
break;
default:
return -1;