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

Michael Niedermayer michaelni at gmx.at
Fri Nov 11 18:39:35 CET 2011


On Fri, Nov 11, 2011 at 06:31:48PM +0100, Reimar Döffinger wrote:
> 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.

IIRC there is no aliassing issue between 8bit and others in C.
just between non 8bit types

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

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- 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/20111111/cfd7ddca/attachment.asc>


More information about the ffmpeg-devel mailing list