[MPlayer-dev-eng] [PATCH] VF Overlay

Reimar Döffinger Reimar.Doeffinger at gmx.de
Fri Aug 14 09:51:52 CEST 2009


On Fri, Aug 14, 2009 at 09:46:07AM +0200, Reimar Döffinger wrote:
> On Fri, Aug 14, 2009 at 08:56:02AM +0200, Benjamin Zores wrote:
> > On Sat, Aug 8, 2009 at 6:08 PM, Reimar
> > Döffinger<Reimar.Doeffinger at gmx.de> wrote:
> > > On Sat, Aug 08, 2009 at 04:57:12PM +0200, Benjamin Zores wrote:
> > >> Jason Tackaberry wrote:
> > >> > When you get a chance, have a look at the AV_WN32 macro as Reimar
> > >> > suggested.
> > >> >
> > >> > I guess it would look like:
> > >> >
> > >> >    AV_WN32(p_bgr24, p_bgr32);
> > >> >    *p_alpha = p_bgr32[3];
> > >>
> > >> Actually it was:
> > >> AV_WN32(p_bgr24, AV_RN32(p_bgr32));
> > >
> > > Well, p_bgr32 is aligned though, so on some hardware this would be
> > > faster:
> > > AV_WN32(p_bgr24, *(uint32_t *)p_bgr32);
> > 
> > Indeed, this works pretty fine.
> > Unless further comments, I plan on applying this patch by tonight/this weekend.
> 
> Can someone tell me what exactly the format for p_bgr32 and p_bgr24 is?
> Because it depends on that if it will work on big-endian machines like
> that.
> Actually it definitely won't work on big-endian, because
> AV_WN32(p_bgr24, *(uint32_t *)p_bgr32);
> ends up discarding p_bgr32[0] whereas the later code assumes p_bgr32[3]
> is alpha, one of them is wrong.

Please forget that nonsense, that would only be true if we used AV_WN24
or something.



More information about the MPlayer-dev-eng mailing list