aboutsummaryrefslogtreecommitdiff
path: root/include/libyuv/scale_row.h
diff options
context:
space:
mode:
authorFrank Barchard <fbarchard@google.com>2021-04-30 09:54:44 -0700
committerFrank Barchard <fbarchard@chromium.org>2021-04-30 18:14:57 +0000
commit49ebc996aa8c4bdf89c1b5ea461eb677234c61cc (patch)
tree8f02917133a54788294fa78e064fd254f3ea9c97 /include/libyuv/scale_row.h
parent99cddd80513167b307d5d9b18c5a347fa8592c33 (diff)
downloadlibyuv-49ebc996aa8c4bdf89c1b5ea461eb677234c61cc.tar.gz
Make 2 step transitive tests measure 2 step time.
Add tests of all macros used by libyuv public headers When a 1 step conversion is added, a 2 step test can compare the old 2 step method to the 1 step. A 1 step unittest is also added which compares C to SIMD. Making the 2 step conversions measure performance of the 2 steps allows the old 2 step performance to be compared to 1 step. All macros used in public headers are added to an ifdef test. Showing them in a unittest allows some diagnostics when a test is failing. Bug: libyuv:901 Change-Id: I7ffa6ed0cb3b506fa1b7fd4b7b1b729658c3c266 Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2857916 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Reviewed-by: Mirko Bonadei <mbonadei@chromium.org> Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Diffstat (limited to 'include/libyuv/scale_row.h')
-rw-r--r--include/libyuv/scale_row.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/include/libyuv/scale_row.h b/include/libyuv/scale_row.h
index 833af1c4..461ac36f 100644
--- a/include/libyuv/scale_row.h
+++ b/include/libyuv/scale_row.h
@@ -19,7 +19,7 @@ namespace libyuv {
extern "C" {
#endif
-#if defined(__pnacl__) || defined(__CLR_VER) || \
+#if defined(__pnacl__) || defined(__CLR_VER) || \
(defined(__native_client__) && defined(__x86_64__)) || \
(defined(__i386__) && !defined(__SSE__) && !defined(__clang__))
#define LIBYUV_DISABLE_X86
@@ -74,8 +74,7 @@ extern "C" {
// The following are available for gcc/clang x86 platforms:
// TODO(fbarchard): Port to Visual C
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || defined(__i386__))
+#if !defined(LIBYUV_DISABLE_X86) && (defined(__x86_64__) || defined(__i386__))
#define HAS_SCALEUVROWDOWN2BOX_SSSE3
#define HAS_SCALEROWUP2LINEAR_SSE2
#define HAS_SCALEROWUP2LINEAR_SSSE3
@@ -94,8 +93,8 @@ extern "C" {
// The following are available for gcc/clang x86 platforms, but
// require clang 3.4 or gcc 4.7.
// TODO(fbarchard): Port to Visual C
-#if !defined(LIBYUV_DISABLE_X86) && \
- (defined(__x86_64__) || defined(__i386__)) && \
+#if !defined(LIBYUV_DISABLE_X86) && \
+ (defined(__x86_64__) || defined(__i386__)) && \
(defined(CLANG_HAS_AVX2) || defined(GCC_HAS_AVX2))
#define HAS_SCALEUVROWDOWN2BOX_AVX2
#define HAS_SCALEROWUP2LINEAR_AVX2