diff options
author | Mans Rullgard <mans@mansr.com> | 2011-12-12 00:50:08 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-12-12 12:14:14 +0000 |
commit | f64c2e710fa1a7b59753224e717f57c48462076f (patch) | |
tree | 760f8b52024f89e22778498c4f00ceac03f3f01e /libavutil/arm | |
parent | 5695ae46f8771f5c63cb0f62faca6a3d27f7d921 (diff) | |
download | ffmpeg-f64c2e710fa1a7b59753224e717f57c48462076f.tar.gz |
bswap: make generic implementation more compiler-friendly
With these changes, gcc 4.5 and later recognise it as a bswap
and use the proper instructions on ARM and x86. On x86, the
16-bit bswap is recognised from gcc 4.1.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/arm')
-rw-r--r-- | libavutil/arm/bswap.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavutil/arm/bswap.h b/libavutil/arm/bswap.h index 478ae981fb..f94cbcf23f 100644 --- a/libavutil/arm/bswap.h +++ b/libavutil/arm/bswap.h @@ -51,6 +51,7 @@ static av_always_inline av_const unsigned av_bswap16(unsigned x) } #endif +#if !AV_GCC_VERSION_AT_LEAST(4,5) #define av_bswap32 av_bswap32 static av_always_inline av_const uint32_t av_bswap32(uint32_t x) { @@ -66,6 +67,7 @@ static av_always_inline av_const uint32_t av_bswap32(uint32_t x) #endif /* HAVE_ARMV6 */ return x; } +#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */ #endif /* __ARMCC_VERSION */ |