[FFmpeg-devel] [PATCH]Fix alpha for iff deep
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Mar 15 14:14:41 CET 2012
Michael Niedermayer <michaelni <at> gmx.at> writes:
> > 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;
> > + for(x = 0; x < avctx->width; x++)
> > + row[4 * x + 3] = row[4 * x + 3] & 0xF0 | (row[4 * x + 3] >> 4);
> > }
>
> This code looks strange, the raw_width line seems to assume that
> BPP can be more than 1 value
> while the new loops seems to assume its 32bpp
DEEP implies BGR32.
Should I add an av_assert0(pix_fmt == BGR32) or should the whole block only be
executed if (pix_fmt == BGR23)?
...
} else if (avctx->codec_tag == MKTAG('D','E','E','P') &&
avctx->pix_fmt == PIX_FMT_BGR32) {
...
Carl Eugen
>
> [...]
>
More information about the ffmpeg-devel
mailing list