]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commit
ARM asm for AV_RN*()
authormru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 18 Apr 2009 00:00:28 +0000 (00:00 +0000)
committermru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Sat, 18 Apr 2009 00:00:28 +0000 (00:00 +0000)
commitb2ff39618d600db05f527c641e2379fe85237fee
tree96271d5e826555cc7bbc3b75f38caca966e52728
parent9e80964529f669a752c25832a6d7c64adb32c819
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%.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18601 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
libavutil/arm/intreadwrite.h [new file with mode: 0644]
libavutil/intreadwrite.h