bswap: add macros to byteswap constants
authorMåns Rullgård <mans@mansr.com>
Thu, 29 Apr 2010 14:41:20 +0000 (14:41 +0000)
committerMåns Rullgård <mans@mansr.com>
Thu, 29 Apr 2010 14:41:20 +0000 (14:41 +0000)
commit547b7bcbb77d7f5b2cbcbce8d734ea43617194ab
treedefd31a209f6fc16151819b44ec611787db9112e
parentfaa2989e0f016fa44d41bc1047dee4f421ab088a
bswap: add macros to byteswap constants

The normal byteswap functions might use inline asm which is suboptimal
with constants (and cannot be used in static initialisers), so special
macros for constants only is needed.

We should not rely on the gcc __builtin_constant_p() test since it is
not always available.

Originally committed as revision 22990 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavutil/bswap.h