Match documentation for transparency in BGR32 iff images.
This commit is contained in:
parent
e8f2c0ca2e
commit
0d293880ba
@ -506,10 +506,15 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
|
|||||||
}
|
}
|
||||||
} else if (avctx->codec_tag == MKTAG('D','E','E','P')) {
|
} 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 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++ ) {
|
for(y = 0; y < avctx->height && buf < buf_end; y++ ) {
|
||||||
uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]];
|
uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]];
|
||||||
memcpy(row, buf, FFMIN(raw_width, buf_end - buf));
|
memcpy(row, buf, FFMIN(raw_width, buf_end - buf));
|
||||||
buf += raw_width;
|
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
|
} else if (avctx->codec_tag == MKTAG('I','L','B','M')) { // interleaved
|
||||||
if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) {
|
if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) {
|
||||||
|
Loading…
Reference in New Issue
Block a user