[FFmpeg-devel] [PATCH 1/5] Add av_ prefix to bswap macros

Michael Niedermayer michaelni
Sat Jul 10 22:33:18 CEST 2010


On Sat, Jul 10, 2010 at 01:22:31PM +0100, Mans Rullgard wrote:
[...]
> -// be2me ... big-endian to machine-endian
> -// le2me ... little-endian to machine-endian
> +// be2ne ... big-endian to native-endian
> +// le2ne ... little-endian to native-endian
>  
>  #if HAVE_BIGENDIAN
> -#define be2me_16(x) (x)
> -#define be2me_32(x) (x)
> -#define be2me_64(x) (x)
> -#define le2me_16(x) bswap_16(x)
> -#define le2me_32(x) bswap_32(x)
> -#define le2me_64(x) bswap_64(x)
> -#define AV_BE2MEC(s, x) (x)
> -#define AV_LE2MEC(s, x) AV_BSWAPC(s, x)
> +#define av_be2ne16(x) (x)
> +#define av_be2ne32(x) (x)
> +#define av_be2ne64(x) (x)
> +#define av_le2ne16(x) av_bswap16(x)
> +#define av_le2ne32(x) av_bswap32(x)
> +#define av_le2ne64(x) av_bswap64(x)
> +#define AV_BE2NEC(s, x) (x)
> +#define AV_LE2NEC(s, x) AV_BSWAPC(s, x)
>  #else
> -#define be2me_16(x) bswap_16(x)
> -#define be2me_32(x) bswap_32(x)
> -#define be2me_64(x) bswap_64(x)
> -#define le2me_16(x) (x)
> -#define le2me_32(x) (x)
> -#define le2me_64(x) (x)
> -#define AV_BE2MEC(s, x) AV_BSWAPC(s, x)
> -#define AV_LE2MEC(s, x) (x)
> +#define av_be2ne16(x) av_bswap16(x)
> +#define av_be2ne32(x) av_bswap32(x)
> +#define av_be2ne64(x) av_bswap64(x)
> +#define av_le2ne16(x) (x)
> +#define av_le2ne32(x) (x)
> +#define av_le2ne64(x) (x)
> +#define AV_BE2NEC(s, x) AV_BSWAPC(s, x)
> +#define AV_LE2NEC(s, x) (x)
>  #endif
>  
> -#define AV_BE2ME16C(x) AV_BE2MEC(16, x)
> -#define AV_BE2ME32C(x) AV_BE2MEC(32, x)
> -#define AV_BE2ME64C(x) AV_BE2MEC(64, x)
> -#define AV_LE2ME16C(x) AV_LE2MEC(16, x)
> -#define AV_LE2ME32C(x) AV_LE2MEC(32, x)
> -#define AV_LE2ME64C(x) AV_LE2MEC(64, x)
> +#define AV_BE2NE16C(x) AV_BE2NEC(16, x)
> +#define AV_BE2NE32C(x) AV_BE2NEC(32, x)
> +#define AV_BE2NE64C(x) AV_BE2NEC(64, x)
> +#define AV_LE2NE16C(x) AV_LE2NEC(16, x)
> +#define AV_LE2NE32C(x) AV_LE2NEC(32, x)
> +#define AV_LE2NE64C(x) AV_LE2NEC(64, x)

that is something else ...


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Awnsering whenever a program halts or runs forever is
On a turing machine, in general impossible (turings halting problem).
On any real computer, always possible as a real computer has a finite number
of states N, and will either halt in less than N cycles or never halt.
-------------- 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/20100710/7ff3e154/attachment.pgp>



More information about the ffmpeg-devel mailing list