aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/iff.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-03-19 09:49:33 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-03-19 09:49:33 +0100
commit0d293880bab201f2e342496d8d573cfe0a645461 (patch)
treed76a0c75552460075d53270747f0225b2f33d4a8 /libavcodec/iff.c
parente8f2c0ca2e51409396146ffc069bc33b542ab014 (diff)
downloadffmpeg-0d293880bab201f2e342496d8d573cfe0a645461.tar.gz
Match documentation for transparency in BGR32 iff images.
Diffstat (limited to 'libavcodec/iff.c')
-rw-r--r--libavcodec/iff.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index 925d92815a..ae479492b6 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -506,10 +506,15 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
}
} else if (avctx->codec_tag == MKTAG('D','E','E','P')) {
int raw_width = avctx->width * (av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]) >> 3);
+ int x;
for(y = 0; y < avctx->height && buf < buf_end; y++ ) {
uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]];
memcpy(row, buf, FFMIN(raw_width, buf_end - buf));
buf += raw_width;
+ if (avctx->pix_fmt == PIX_FMT_BGR32) {
+ for(x = 0; x < avctx->width; x++)
+ row[4 * x + 3] = row[4 * x + 3] & 0xF0 | (row[4 * x + 3] >> 4);
+ }
}
} else if (avctx->codec_tag == MKTAG('I','L','B','M')) { // interleaved
if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) {