summaryrefslogtreecommitdiff
path: root/libavutil/intreadwrite.h
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2009-04-18 00:00:28 +0000
committerMåns Rullgård <mans@mansr.com>2009-04-18 00:00:28 +0000
commit3c55ce039d5b90afad35e19fc8ca6d147dd3f976 (patch)
tree8d03f6610d6588ab2b1137e384dd478dae0c34f1 /libavutil/intreadwrite.h
parenta6783b8961a0c68b0b76a35f03538778e67c3ec9 (diff)
ARM asm for AV_RN*()
ARMv6 and later support unaligned loads and stores for single word/halfword but not double/multiple. GCC is ignorant of this and will always use bytewise accesses for unaligned data. Casting to an int32_t pointer is dangerous since a load/store double or multiple instruction might be used (this happens with some code in FFmpeg). Implementing the AV_[RW]* macros with inline asm using only supported instructions gives fast and safe unaligned accesses. ARM RVCT does the right thing with generic code. This gives an overall speedup of up to 10%. Originally committed as revision 18601 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/intreadwrite.h')
-rw-r--r--libavutil/intreadwrite.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/intreadwrite.h b/libavutil/intreadwrite.h
index b1c5c2acbd..42fb890a0e 100644
--- a/libavutil/intreadwrite.h
+++ b/libavutil/intreadwrite.h
@@ -29,6 +29,9 @@
* defined, even if these are implemented as inline functions.
*/
+#if ARCH_ARM
+# include "arm/intreadwrite.h"
+#endif
/*
* Define AV_[RW]N helper macros to simplify definitions not provided