diff options
author | fbarchard@google.com <fbarchard@google.com> | 2014-10-24 23:29:31 +0000 |
---|---|---|
committer | fbarchard@google.com <fbarchard@google.com> | 2014-10-24 23:29:31 +0000 |
commit | 9ed836b1544d2d48a8f938e4a4b2c7cc0ac49929 (patch) | |
tree | b24edff52cd5832caae7430619df1996d076b37d /source/scale_common.cc | |
parent | 88ac01aed06b2be8d587e85c38010b1734e32489 (diff) | |
download | libyuv-9ed836b1544d2d48a8f938e4a4b2c7cc0ac49929.tar.gz |
The 'Any' versions of functions can handle any width now, so remove the check from the calling code. This has 2 advantages - less code, and less overhead in calling function when any function is NOT used. Downside is more code for case where any is used.
BUG=373
TESTED=libyuv_unittest still passes
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/24129004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1143 16f28f9a-4ce2-e073-06de-1de4eb20be90
Diffstat (limited to 'source/scale_common.cc')
-rw-r--r-- | source/scale_common.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/scale_common.cc b/source/scale_common.cc index 459c61af..a72df5e1 100644 --- a/source/scale_common.cc +++ b/source/scale_common.cc @@ -885,7 +885,7 @@ void ScalePlaneVertical(int src_height, assert(dst_height > 0); src_argb += (x >> 16) * bpp; #if defined(HAS_INTERPOLATEROW_SSE2) - if (TestCpuFlag(kCpuHasSSE2) && dst_width_bytes >= 16) { + if (TestCpuFlag(kCpuHasSSE2)) { InterpolateRow = InterpolateRow_Any_SSE2; if (IS_ALIGNED(dst_width_bytes, 16)) { InterpolateRow = InterpolateRow_SSE2; @@ -893,7 +893,7 @@ void ScalePlaneVertical(int src_height, } #endif #if defined(HAS_INTERPOLATEROW_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && dst_width_bytes >= 16) { + if (TestCpuFlag(kCpuHasSSSE3)) { InterpolateRow = InterpolateRow_Any_SSSE3; if (IS_ALIGNED(dst_width_bytes, 16)) { InterpolateRow = InterpolateRow_SSSE3; @@ -901,7 +901,7 @@ void ScalePlaneVertical(int src_height, } #endif #if defined(HAS_INTERPOLATEROW_AVX2) - if (TestCpuFlag(kCpuHasAVX2) && dst_width_bytes >= 32) { + if (TestCpuFlag(kCpuHasAVX2)) { InterpolateRow = InterpolateRow_Any_AVX2; if (IS_ALIGNED(dst_width_bytes, 32)) { InterpolateRow = InterpolateRow_AVX2; @@ -909,7 +909,7 @@ void ScalePlaneVertical(int src_height, } #endif #if defined(HAS_INTERPOLATEROW_NEON) - if (TestCpuFlag(kCpuHasNEON) && dst_width_bytes >= 16) { + if (TestCpuFlag(kCpuHasNEON)) { InterpolateRow = InterpolateRow_Any_NEON; if (IS_ALIGNED(dst_width_bytes, 16)) { InterpolateRow = InterpolateRow_NEON; @@ -917,7 +917,7 @@ void ScalePlaneVertical(int src_height, } #endif #if defined(HAS_INTERPOLATEROWS_MIPS_DSPR2) - if (TestCpuFlag(kCpuHasMIPS_DSPR2) && dst_width_bytes >= 4 && + if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(src_argb, 4) && IS_ALIGNED(src_stride, 4) && IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride, 4)) { InterpolateRow = InterpolateRow_Any_MIPS_DSPR2; @@ -959,7 +959,7 @@ void ScalePlaneVertical_16(int src_height, assert(dst_height > 0); src_argb += (x >> 16) * wpp; #if defined(HAS_INTERPOLATEROW_16_SSE2) - if (TestCpuFlag(kCpuHasSSE2) && dst_width_bytes >= 16) { + if (TestCpuFlag(kCpuHasSSE2)) { InterpolateRow = InterpolateRow_Any_16_SSE2; if (IS_ALIGNED(dst_width_bytes, 16)) { InterpolateRow = InterpolateRow_16_SSE2; @@ -967,7 +967,7 @@ void ScalePlaneVertical_16(int src_height, } #endif #if defined(HAS_INTERPOLATEROW_16_SSSE3) - if (TestCpuFlag(kCpuHasSSSE3) && dst_width_bytes >= 16) { + if (TestCpuFlag(kCpuHasSSSE3)) { InterpolateRow = InterpolateRow_Any_16_SSSE3; if (IS_ALIGNED(dst_width_bytes, 16)) { InterpolateRow = InterpolateRow_16_SSSE3; @@ -975,7 +975,7 @@ void ScalePlaneVertical_16(int src_height, } #endif #if defined(HAS_INTERPOLATEROW_16_AVX2) - if (TestCpuFlag(kCpuHasAVX2) && dst_width_bytes >= 32) { + if (TestCpuFlag(kCpuHasAVX2)) { InterpolateRow = InterpolateRow_Any_16_AVX2; if (IS_ALIGNED(dst_width_bytes, 32)) { InterpolateRow = InterpolateRow_16_AVX2; @@ -983,7 +983,7 @@ void ScalePlaneVertical_16(int src_height, } #endif #if defined(HAS_INTERPOLATEROW_16_NEON) - if (TestCpuFlag(kCpuHasNEON) && dst_width_bytes >= 16) { + if (TestCpuFlag(kCpuHasNEON)) { InterpolateRow = InterpolateRow_Any_16_NEON; if (IS_ALIGNED(dst_width_bytes, 16)) { InterpolateRow = InterpolateRow_16_NEON; @@ -991,7 +991,7 @@ void ScalePlaneVertical_16(int src_height, } #endif #if defined(HAS_INTERPOLATEROWS_16_MIPS_DSPR2) - if (TestCpuFlag(kCpuHasMIPS_DSPR2) && dst_width_bytes >= 4 && + if (TestCpuFlag(kCpuHasMIPS_DSPR2) && IS_ALIGNED(src_argb, 4) && IS_ALIGNED(src_stride, 4) && IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride, 4)) { InterpolateRow = InterpolateRow_Any_16_MIPS_DSPR2; |