diff options
author | fbarchard@google.com <fbarchard@google.com> | 2014-11-20 21:14:27 +0000 |
---|---|---|
committer | fbarchard@google.com <fbarchard@google.com> | 2014-11-20 21:14:27 +0000 |
commit | 91f240c5db1116f3baaa79fa34e3180e943bf2ed (patch) | |
tree | cb01f952a84c5f3319e2ebd1176d682b4d785ebe /source/rotate.cc | |
parent | 813bf9f97d44f1891b114beb47b57e7dd3c53af0 (diff) | |
download | libyuv-91f240c5db1116f3baaa79fa34e3180e943bf2ed.tar.gz |
Move sub before branch for loops.
Remove CopyRow_x86
Add CopyRow_Any versions for AVX, SSE2 and Neon.
BUG=269
TESTED=local build
R=harryjin@google.com, tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/26209004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1175 16f28f9a-4ce2-e073-06de-1de4eb20be90
Diffstat (limited to 'source/rotate.cc')
-rw-r--r-- | source/rotate.cc | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/source/rotate.cc b/source/rotate.cc index f65f89dd..d4b581d1 100644 --- a/source/rotate.cc +++ b/source/rotate.cc @@ -918,24 +918,14 @@ void RotatePlane180(const uint8* src, int src_stride, MirrorRow = MirrorRow_MIPS_DSPR2; } #endif -#if defined(HAS_COPYROW_NEON) - if (TestCpuFlag(kCpuHasNEON) && IS_ALIGNED(width, 32)) { - CopyRow = CopyRow_NEON; - } -#endif -#if defined(HAS_COPYROW_X86) - if (TestCpuFlag(kCpuHasX86) && IS_ALIGNED(width, 4)) { - CopyRow = CopyRow_X86; - } -#endif #if defined(HAS_COPYROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2) && IS_ALIGNED(width, 32)) { - CopyRow = CopyRow_SSE2; + if (TestCpuFlag(kCpuHasSSE2)) { + CopyRow = IS_ALIGNED(width, 32) ? CopyRow_SSE2 : CopyRow_Any_SSE2; } #endif #if defined(HAS_COPYROW_AVX) - if (TestCpuFlag(kCpuHasAVX) && IS_ALIGNED(width, 64)) { - CopyRow = CopyRow_AVX; + if (TestCpuFlag(kCpuHasAVX)) { + CopyRow = IS_ALIGNED(width, 64) ? CopyRow_AVX : CopyRow_Any_AVX; } #endif #if defined(HAS_COPYROW_ERMS) @@ -943,6 +933,11 @@ void RotatePlane180(const uint8* src, int src_stride, CopyRow = CopyRow_ERMS; } #endif +#if defined(HAS_COPYROW_NEON) + if (TestCpuFlag(kCpuHasNEON)) { + CopyRow = IS_ALIGNED(width, 32) ? CopyRow_NEON : CopyRow_Any_NEON; + } +#endif #if defined(HAS_COPYROW_MIPS) if (TestCpuFlag(kCpuHasMIPS)) { CopyRow = CopyRow_MIPS; |