summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbinjin <binjin@chromium.org>2015-11-04 03:57:20 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-04 11:58:17 +0000
commit7a019e39556b833549f2b849392f13613343937c (patch)
tree96ed37e0074dd021529ee15e6cf81ff550bf70bb
parentc4f4ca2c11836f75b0a837000ac4488e25c587ba (diff)
downloadchromium_src-7a019e39556b833549f2b849392f13613343937c.zip
chromium_src-7a019e39556b833549f2b849392f13613343937c.tar.gz
chromium_src-7a019e39556b833549f2b849392f13613343937c.tar.bz2
Revert of add ConvertYUVAToARGBRow_MMX to media_perftests (patchset #2 id:20001 of https://codereview.chromium.org/1414023003/ )
Reason for revert: Compile error on Win Bots: FAILED: ninja -t msvc -e environment.x64 -- E:\b\build\goma/gomacc.exe "E:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64/cl.exe" /nologo /showIncludes /FC @obj/media/base/perftests/yuv_convert_perftest.obj.rsp /c ../../media/base/yuv_convert_perftest.cc /Foobj/media/base/perftests/yuv_convert_perftest.obj /Fdobj/media/base/perftests_cc.pdb e:\b\build\slave\win_x64_gn\build\src\third_party\libyuv\include\libyuv\row.h(16) : fatalerror C1083: Cannot open include file: 'libyuv/basic_types.h': No such file or directory Original issue's description: > add ConvertYUVAToARGBRow_MMX to media_perftests > > Add YUVConvertPerfTest.ConvertYUVAToARGBRow_MMX and YUVConvertPerfTest.I422ToARGBRow_SSSE3 to media_perftests. > Fix math error when printing results by clearing the MMX state before doing float math. > > BUG=libyuv:473 > > Committed: https://crrev.com/c6ab707df6a54b2acffb7115574a794b7a748ea9 > Cr-Commit-Position: refs/heads/master@{#357716} TBR=xhwang@chromium.org,fbarchard@chromium.org,fbarchard@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=libyuv:473 Review URL: https://codereview.chromium.org/1403413005 Cr-Commit-Position: refs/heads/master@{#357802}
-rw-r--r--media/BUILD.gn1
-rw-r--r--media/base/yuv_convert_perftest.cc70
-rw-r--r--media/media.gyp3
3 files changed, 2 insertions, 72 deletions
diff --git a/media/BUILD.gn b/media/BUILD.gn
index 52af493..f15e590 100644
--- a/media/BUILD.gn
+++ b/media/BUILD.gn
@@ -791,7 +791,6 @@ test("media_perftests") {
"//testing/gtest",
"//testing/perf",
"//third_party/widevine/cdm:version_h",
- "//third_party/libyuv",
"//ui/gfx:test_support",
]
if (is_android) {
diff --git a/media/base/yuv_convert_perftest.cc b/media/base/yuv_convert_perftest.cc
index 81d69ee..d676e4e 100644
--- a/media/base/yuv_convert_perftest.cc
+++ b/media/base/yuv_convert_perftest.cc
@@ -12,7 +12,6 @@
#include "media/base/yuv_convert.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/perf/perf_test.h"
-#include "third_party/libyuv/include/libyuv/row.h"
namespace media {
#if !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY)
@@ -88,73 +87,6 @@ TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) {
kPerfTestIterations / total_time_seconds, "runs/s", true);
}
-#ifdef HAS_I422TOARGBROW_SSSE3
-TEST_F(YUVConvertPerfTest, I422ToARGBRow_SSSE3) {
- ASSERT_TRUE(base::CPU().has_ssse3());
-
- base::TimeTicks start = base::TimeTicks::Now();
- for (int i = 0; i < kPerfTestIterations; ++i) {
- for (int row = 0; row < kSourceHeight; ++row) {
- int chroma_row = row / 2;
- libyuv::I422ToARGBRow_SSSE3(
- yuv_bytes_.get() + row * kSourceWidth,
- yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2),
- yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2),
- rgb_bytes_converted_.get(), &libyuv::kYuvIConstants, kWidth);
- }
- }
- double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF();
- perf_test::PrintResult("yuv_convert_perftest", "", "I422ToARGBRow_SSSE3",
- kPerfTestIterations / total_time_seconds, "runs/s",
- true);
-}
-#endif
-
-TEST_F(YUVConvertPerfTest, ConvertYUVAToARGBRow_MMX) {
- ASSERT_TRUE(base::CPU().has_sse());
-
- base::TimeTicks start = base::TimeTicks::Now();
- for (int i = 0; i < kPerfTestIterations; ++i) {
- for (int row = 0; row < kSourceHeight; ++row) {
- int chroma_row = row / 2;
- ConvertYUVAToARGBRow_MMX(
- yuv_bytes_.get() + row * kSourceWidth,
- yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2),
- yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2),
- yuv_bytes_.get() + row * kSourceWidth, // hack: use luma for alpha
- rgb_bytes_converted_.get(), kWidth, GetLookupTable(YV12));
- }
- }
- media::EmptyRegisterState();
- double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF();
- perf_test::PrintResult("yuv_convert_perftest", "", "ConvertYUVAToARGBRow_MMX",
- kPerfTestIterations / total_time_seconds, "runs/s",
- true);
-}
-
-#ifdef HAS_I422ALPHATOARGBROW_SSSE3
-TEST_F(YUVConvertPerfTest, I422AlphaToARGBRow_SSSE3) {
- ASSERT_TRUE(base::CPU().has_ssse3());
-
- base::TimeTicks start = base::TimeTicks::Now();
- for (int i = 0; i < kPerfTestIterations; ++i) {
- for (int row = 0; row < kSourceHeight; ++row) {
- int chroma_row = row / 2;
- libyuv::I422AlphaToARGBRow_SSSE3(
- yuv_bytes_.get() + row * kSourceWidth,
- yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2),
- yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2),
- yuv_bytes_.get() + row * kSourceWidth, // hack: use luma for alpha
- rgb_bytes_converted_.get(), &libyuv::kYuvIConstants, kWidth);
- }
- }
- double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF();
- perf_test::PrintResult("yuv_convert_perftest", "", "I422AlphaToARGBRow_SSSE3",
- kPerfTestIterations / total_time_seconds, "runs/s",
- true);
-}
-#endif
-
// 64-bit release + component builds on Windows are too smart and optimizes
// away the function being tested.
#if defined(OS_WIN) && (defined(ARCH_CPU_X86) || !defined(COMPONENT_BUILD))
@@ -203,11 +135,11 @@ TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) {
GetLookupTable(YV12));
}
}
- media::EmptyRegisterState();
double total_time_seconds = (base::TimeTicks::Now() - start).InSecondsF();
perf_test::PrintResult(
"yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_SSE",
kPerfTestIterations / total_time_seconds, "runs/s", true);
+ media::EmptyRegisterState();
}
#endif // defined(OS_WIN) && (ARCH_CPU_X86 || COMPONENT_BUILD)
diff --git a/media/media.gyp b/media/media.gyp
index 8a2d35d..dc23002 100644
--- a/media/media.gyp
+++ b/media/media.gyp
@@ -1449,10 +1449,9 @@
'../testing/gmock.gyp:gmock',
'../testing/gtest.gyp:gtest',
'../testing/perf/perf_test.gyp:perf_test',
- '../third_party/libyuv/libyuv.gyp:libyuv',
'../ui/gfx/gfx.gyp:gfx',
- '../ui/gfx/gfx.gyp:gfx_geometry',
'../ui/gfx/gfx.gyp:gfx_test_support',
+ '../ui/gfx/gfx.gyp:gfx_geometry',
'media',
'media_test_support',
'shared_memory_support',