diff options
author | Bernhard Rosenkränzer <bero@arklinux.org> | 2005-05-26 14:32:46 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-05-26 14:32:46 +0000 |
commit | 6ad1fa5a49320c101a62d24aa0e7df14c10d7612 (patch) | |
tree | 0bb61f2a5ea730c7c70e9c96f17c47eb6163dd08 /libavcodec/bswap.h | |
parent | c66a443401bbf38a3c79070d499fcb5601c95cea (diff) |
Better ARM support for mplayer/ffmpeg, ported from atty fork
while playing with some new hardware, I found it's running a forked mplayer
-- and it looks like they're following the GPL.
The maintainer's page is here: http://atty.jp/?Zaurus/mplayer
Unfortunately it's mostly in Japanese, so it's hard to figure out any
details.
Their code looks quite interesting (at least to those of us w/ ARM CPUs).
The patches I've attached are the patches from atty.jp with a couple of
modifications by myself:
- ported to current CVS
- reverted their change of removing SNOW support from ffmpeg
- cleaned up their bswap mess
- removed DOS-style linebreaks from various files
patch by (Bernhard Rosenkraenzer: bero, arklinux org)
Originally committed as revision 4311 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/bswap.h')
-rw-r--r-- | libavcodec/bswap.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/bswap.h b/libavcodec/bswap.h index 2e55337f9a..50fd571787 100644 --- a/libavcodec/bswap.h +++ b/libavcodec/bswap.h @@ -94,10 +94,23 @@ static always_inline uint16_t bswap_16(uint16_t x){ return (x>>8) | (x<<8); } +#ifdef ARCH_ARM +static always_inline uint32_t bswap_32(uint32_t x){ + uint32_t t; + __asm__ ( + "eor %1, %0, %0, ror #16 \n\t" + "bic %1, %1, #0xFF0000 \n\t" + "mov %0, %0, ror #8 \n\t" + "eor %0, %0, %1, lsr #8 \n\t" + : "+r"(x), "+r"(t)); + return x; +} +#else static always_inline uint32_t bswap_32(uint32_t x){ x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF); return (x>>16) | (x<<16); } +#endif static inline uint64_t bswap_64(uint64_t x) { |