ARM: change argument/return type of bswap_16() to unsigned 32-bit

This avoids unnecessary masking otherwise added by the compilers.

Originally committed as revision 21953 to svn://svn.ffmpeg.org/ffmpeg/trunk
release/0.6
Måns Rullgård 15 years ago
parent a87b2f6df4
commit ac73f1a816
  1. 4
      libavutil/arm/bswap.h

@ -27,7 +27,7 @@
#if HAVE_ARMV6 #if HAVE_ARMV6
#define bswap_16 bswap_16 #define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x) static av_always_inline av_const unsigned bswap_16(unsigned x)
{ {
__asm { rev16 x, x } __asm { rev16 x, x }
return x; return x;
@ -44,7 +44,7 @@ static av_always_inline av_const uint32_t bswap_32(uint32_t x)
#if HAVE_ARMV6 #if HAVE_ARMV6
#define bswap_16 bswap_16 #define bswap_16 bswap_16
static av_always_inline av_const uint16_t bswap_16(uint16_t x) static av_always_inline av_const unsigned bswap_16(unsigned x)
{ {
__asm__("rev16 %0, %0" : "+r"(x)); __asm__("rev16 %0, %0" : "+r"(x));
return x; return x;

Loading…
Cancel
Save