aboutsummaryrefslogtreecommitdiff
path: root/source/rotate.cc
diff options
context:
space:
mode:
authorfbarchard@google.com <fbarchard@google.com>2014-11-18 01:03:47 +0000
committerfbarchard@google.com <fbarchard@google.com>2014-11-18 01:03:47 +0000
commit59ed44868564f53b14bba795b165b49b7cff8e69 (patch)
tree6e61fd7c70cc09c0f4c722d929d73efc2f7ee8e1 /source/rotate.cc
parent55db4ec23b8009729dc41a413d716cc38ca1cb14 (diff)
downloadlibyuv-59ed44868564f53b14bba795b165b49b7cff8e69.tar.gz
MirrorAny functions so assembly can always be used.
BUG=none TESTED=untested R=harryjin@google.com Review URL: https://webrtc-codereview.appspot.com/29069004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@1170 16f28f9a-4ce2-e073-06de-1de4eb20be90
Diffstat (limited to 'source/rotate.cc')
-rw-r--r--source/rotate.cc28
1 files changed, 20 insertions, 8 deletions
diff --git a/source/rotate.cc b/source/rotate.cc
index 82186092..f65f89dd 100644
--- a/source/rotate.cc
+++ b/source/rotate.cc
@@ -879,23 +879,35 @@ void RotatePlane180(const uint8* src, int src_stride,
void (*MirrorRow)(const uint8* src, uint8* dst, int width) = MirrorRow_C;
void (*CopyRow)(const uint8* src, uint8* dst, int width) = CopyRow_C;
#if defined(HAS_MIRRORROW_NEON)
- if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(width, 16)) {
- MirrorRow = MirrorRow_NEON;
+ if (TestCpuFlag(kCpuHasNEON)) {
+ MirrorRow = MirrorRow_Any_NEON;
+ if (IS_ALIGNED(width, 16)) {
+ MirrorRow = MirrorRow_NEON;
+ }
}
#endif
#if defined(HAS_MIRRORROW_SSE2)
- if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(width, 16)) {
- MirrorRow = MirrorRow_SSE2;
+ if (TestCpuFlag(kCpuHasSSE2)) {
+ MirrorRow = MirrorRow_Any_SSE2;
+ if (IS_ALIGNED(width, 16)) {
+ MirrorRow = MirrorRow_SSE2;
+ }
}
#endif
#if defined(HAS_MIRRORROW_SSSE3)
- if (TestCpuFlag(kCpuHasSSSE3) && IS_ALIGNED(width, 16)) {
- MirrorRow = MirrorRow_SSSE3;
+ if (TestCpuFlag(kCpuHasSSSE3)) {
+ MirrorRow = MirrorRow_Any_SSSE3;
+ if (IS_ALIGNED(width, 16)) {
+ MirrorRow = MirrorRow_SSSE3;
+ }
}
#endif
#if defined(HAS_MIRRORROW_AVX2)
- if (TestCpuFlag(kCpuHasAVX2) && IS_ALIGNED(width, 32)) {
- MirrorRow = MirrorRow_AVX2;
+ if (TestCpuFlag(kCpuHasAVX2)) {
+ MirrorRow = MirrorRow_Any_AVX2;
+ if (IS_ALIGNED(width, 32)) {
+ MirrorRow = MirrorRow_AVX2;
+ }
}
#endif
// TODO(fbarchard): Mirror on mips handle unaligned memory.