[FFmpeg-devel] [PATCH]Fix alpha for iff deep

Michael Niedermayer michaelni at gmx.at
Thu Mar 15 21:30:19 CET 2012


On Thu, Mar 15, 2012 at 01:14:41PM +0000, Carl Eugen Hoyos wrote:
> 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)?

i am fine with either, if noone else has a comment

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120315/1c7fbd89/attachment.asc>


More information about the ffmpeg-devel mailing list