diff options
author | Måns Rullgård <mans@mansr.com> | 2008-07-15 19:05:49 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-07-15 19:05:49 +0000 |
commit | ea66f252a8fa92dcb0efb54c805071e91e149e13 (patch) | |
tree | b86f41f951be3500c5b558abd24eb4608dd4e56e /libavutil/bswap.h | |
parent | 29c8b6263aa72728f5cd63077bdb1a9696f9456c (diff) | |
download | ffmpeg-ea66f252a8fa92dcb0efb54c805071e91e149e13.tar.gz |
ARM: ARMv6 optimised bswap_16/32
Originally committed as revision 14239 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/bswap.h')
-rw-r--r-- | libavutil/bswap.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/bswap.h b/libavutil/bswap.h index b35fb51613..e1aa3f433e 100644 --- a/libavutil/bswap.h +++ b/libavutil/bswap.h @@ -40,6 +40,8 @@ static av_always_inline av_const uint16_t bswap_16(uint16_t x) asm("rorw $8, %0" : "+r"(x)); #elif defined(ARCH_SH4) asm("swap.b %0,%0" : "=r"(x) : "0"(x)); +#elif defined(HAVE_ARMV6) + asm("rev16 %0, %0" : "+r"(x)); #else x= (x>>8) | (x<<8); #endif @@ -62,6 +64,8 @@ static av_always_inline av_const uint32_t bswap_32(uint32_t x) "swap.w %0,%0\n" "swap.b %0,%0\n" : "=r"(x) : "0"(x)); +#elif defined(HAVE_ARMV6) + asm("rev %0, %0" : "+r"(x)); #elif defined(ARCH_ARM) uint32_t t; asm ("eor %1, %0, %0, ror #16 \n\t" |