[FFmpeg-devel] [PATCH/RFC] intreadwrite.h rewrite

Michael Niedermayer michaelni
Fri Apr 17 22:54:00 CEST 2009


On Fri, Apr 17, 2009 at 09:04:08PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sun, Apr 12, 2009 at 07:57:24PM +0100, M?ns Rullg?rd wrote:
> >> M?ns Rullg?rd <mans at mansr.com> writes:
> >> 
> >> > Michael Niedermayer <michaelni at gmx.at> writes:
> >> >
> >> >> On Mon, Apr 06, 2009 at 07:07:25PM +0100, M?ns Rullg?rd wrote:
> >> >>> Michael Niedermayer <michaelni at gmx.at> writes:
> >> >>> 
> >> >>> > On Sun, Apr 05, 2009 at 11:42:24PM +0100, M?ns Rullg?rd wrote:
> >> >>> >> I would like to propose a rework of intreadwrite.h.  This new version
> >> >>> >> supports per-arch implementations of the various macros allowing us to
> >> >>> >> take advantage of special instructions or other properties the
> >> >>> >> compiler does not know about.
> >> >>> >
> >> >>> > [...]
> >> >>> >
> >> >>> >> /*
> >> >>> >>  * GCC fails miserably on the packed struct version which is used by
> >> >>> >>  * default, so we override it here.
> >> >>> >>  */
> >> >>> >> 
> >> >>> >> #define AV_RB64 AV_RB64
> >> >>> >> static inline uint64_t AV_RB64(const void *p)
> >> >>> >> {
> >> >>> >>     return *(const uint64_t *)p;
> >> >>> >> }
> >> >>> >> 
> >> >>> >> #define AV_WB64 AV_WB64
> >> >>> >> static inline void AV_WB64(void *p, uint64_t v)
> >> >>> >> {
> >> >>> >>     *(uint64_t *)p = v;
> >> >>> >> }
> >> >>> >> 
> >> >>> >
> >> >>> > why are these inline functions instead of macros?
> >> >>> 
> >> >>> No reason.  I can certainly change it.
> >> >>
> >> >> please do, if its simpler
> >> >
> >> > Will do.
> >> 
> >> Any other comments?
> >
> > no
> 
> So can I apply this?

i guess yes

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Freedom in capitalist society always remains about the same as it was in
ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090417/d3ad64fc/attachment.pgp>



More information about the ffmpeg-devel mailing list