[Ffmpeg-devel] [RFC] bytestream show and change
Michael Niedermayer
michaelni
Sat Jan 6 11:59:33 CET 2007
Hi
On Sat, Jan 06, 2007 at 02:21:14AM +0100, Alex Beregszaszi wrote:
> Hi,
>
> > > This way?
> >
> > yes
> >
> > though maybe
> >
> > #if 1 //benchmark on your architecture and update this #if
> > #define AV_RB32(x) ((((uint8_t*)(x))[0] << 24) | \
> > (((uint8_t*)(x))[1] << 16) | \
> > (((uint8_t*)(x))[2] << 8) | \
> > ((uint8_t*)(x))[3])
> > #else
> > #define AV_RB32(x) le2me_16(LD32(x))
> > #endif
> >
> > would be better
> >
> > also i think that a few more () are needed in the macros
>
> Those macros were there since a while, see the diff, which has the
> changes only. Are you fine with the writing logic?
no, thats what i was complaining about
#define AV_WL32(p, i, d) { \
((uint8_t*)(p))[i] = d; \
((uint8_t*)(p))[i+1] = d>>8; \
((uint8_t*)(p))[i+2] = d>>16; \
((uint8_t*)(p))[i+3] = d>>24; }
try
AV_WL32(A, B>>C, E != F)
> Maybe the read part
> can be changed to your version in a different commit (optimize reading)
yes, the optimization can be done later
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No snowflake in an avalanche ever feels responsible. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070106/e53d922a/attachment.pgp>
More information about the ffmpeg-devel
mailing list