[FFmpeg-devel] [PATCH]Set palette for 1bit PCX

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Nov 11 18:31:48 CET 2011


On Fri, Nov 11, 2011 at 05:21:04PM +0000, Carl Eugen Hoyos wrote:
> Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
> 
> > > +        ((uint32_t *) p->data[1])[0] = 0xFF000000;
> > > +        ((uint32_t *) p->data[1])[1] = 0xFFFFFFFF;
> > 
> > Hm, might it be better to use AV_WNA32 to avoid e.g. possible
> > aliasing warnings/issues?
> > I know it seems overly pedantic, but still.
> 
> Is this what you had in mind?
> AV_WN32(p->data[1]  , 0xFF000000);
> AV_WN32(p->data[1]+4, 0xFFFFFFFF);

Well, I meant AV_WN32A, since there should be no alignment
issues (though speed does not matter and the code size difference
should be minimal, too).
But otherwise, yes.
I think it would be better to use that but I am not completely sure.


More information about the ffmpeg-devel mailing list