summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-09-29 13:20:03 +0000
committerNils Wallménius <nils@rockbox.org>2010-09-29 13:20:03 +0000
commit5b2d7e23a09cede4a3a1ad8db86e60cd42494aa4 (patch)
tree377231caad4e1a3c4447b7838a73c9a6bec46c7e
parent918e895c12a25365b15f9df82c2aa33bfb74436a (diff)
downloadrockbox-5b2d7e23a09cede4a3a1ad8db86e60cd42494aa4.tar.gz
rockbox-5b2d7e23a09cede4a3a1ad8db86e60cd42494aa4.zip
ARMv6 supports unaligned memory accesses and they are enabled on our only ARMv6 target so we might as well use them. Speeds up decoding of a flac8 file by 3.5%.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28183 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/lib/ffmpeg_intreadwrite.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/codecs/lib/ffmpeg_intreadwrite.h b/apps/codecs/lib/ffmpeg_intreadwrite.h
index ca718106d1..24f03292e8 100644
--- a/apps/codecs/lib/ffmpeg_intreadwrite.h
+++ b/apps/codecs/lib/ffmpeg_intreadwrite.h
@@ -186,9 +186,9 @@ union unaligned_16 { uint16_t l; } __attribute__((packed)) av_alias;
186#endif 186#endif
187 187
188#ifndef AV_RB32 188#ifndef AV_RB32
189/* Coldfire cpu's support unaligned long reads */ 189/* Coldfire and ARMv6 and above support unaligned long reads */
190#ifdef CPU_COLDFIRE 190#if defined CPU_COLDFIRE || (defined CPU_ARM && ARM_ARCH >= 6)
191#define AV_RB32(x) (*(const uint32_t*)(x)) 191#define AV_RB32(x) (htobe32(*(const uint32_t*)(x)))
192#else 192#else
193# define AV_RB32(x) \ 193# define AV_RB32(x) \
194 ((((const uint8_t*)(x))[0] << 24) | \ 194 ((((const uint8_t*)(x))[0] << 24) | \