[MPlayer-dev-eng] [PATCH] liba52/bitstream.h
Ruben Garcia
ruben at ugr.es
Tue Jul 1 21:41:07 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I remember somebody saying that he didn't use inline functions for this
because gcc used one more register with the function than with the macro.
But it was some time ago, so it might have been fixed already, or it
might not be a problem in this case.
> -# define swab32(x)\
> -((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) | \
> - (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3]))
> -
> +# define swab32(x) __generic_swab32(x)
> + static always_inline const uint32_t __generic_swab32(uint32_t x)
> + {
> + return ((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) |
> + (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3]));
> + }
> # endif
> #endif
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Netscape - http://enigmail.mozdev.org
iD8DBQE/AePZkzndl97WsggRAo2QAKCooDtyQdcOLQZyHMYuPvS4+65LxACgji35
zc8xOUT2yLYovs+TF6ssh08=
=f/eV
-----END PGP SIGNATURE-----
More information about the MPlayer-dev-eng
mailing list