Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: media/base/yuv_convert_unittest.cc

Issue 459603003: Cleanup: Remove unneeded SSE2 checks and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, fix win build Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/yuv_convert_perftest.cc ('k') | media/media.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/yuv_convert_unittest.cc
diff --git a/media/base/yuv_convert_unittest.cc b/media/base/yuv_convert_unittest.cc
index 85d3693ec8605378bd8d4d5d19f45d53ded1649f..bde7322017875f76737505753b17edc5471f09fb 100644
--- a/media/base/yuv_convert_unittest.cc
+++ b/media/base/yuv_convert_unittest.cc
@@ -657,37 +657,6 @@ TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) {
EXPECT_EQ(0, error);
}
-TEST(YUVConvertTest, ConvertYUVToRGB32Row_MMX) {
- base::CPU cpu;
- if (!cpu.has_mmx()) {
- LOG(WARNING) << "System not supported. Test skipped.";
- return;
- }
-
- scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]);
- scoped_ptr<uint8[]> rgb_bytes_reference(new uint8[kRGBSize]);
- scoped_ptr<uint8[]> rgb_bytes_converted(new uint8[kRGBSize]);
- ReadYV12Data(&yuv_bytes);
-
- const int kWidth = 167;
- ConvertYUVToRGB32Row_C(yuv_bytes.get(),
- yuv_bytes.get() + kSourceUOffset,
- yuv_bytes.get() + kSourceVOffset,
- rgb_bytes_reference.get(),
- kWidth,
- GetLookupTable(YV12));
- ConvertYUVToRGB32Row_MMX(yuv_bytes.get(),
- yuv_bytes.get() + kSourceUOffset,
- yuv_bytes.get() + kSourceVOffset,
- rgb_bytes_converted.get(),
- kWidth,
- GetLookupTable(YV12));
- media::EmptyRegisterState();
- EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(),
- rgb_bytes_converted.get(),
- kWidth * kBpp));
-}
-
TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) {
base::CPU cpu;
if (!cpu.has_sse()) {
@@ -719,40 +688,6 @@ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) {
kWidth * kBpp));
}
-TEST(YUVConvertTest, ScaleYUVToRGB32Row_MMX) {
- base::CPU cpu;
- if (!cpu.has_mmx()) {
- LOG(WARNING) << "System not supported. Test skipped.";
- return;
- }
-
- scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]);
- scoped_ptr<uint8[]> rgb_bytes_reference(new uint8[kRGBSize]);
- scoped_ptr<uint8[]> rgb_bytes_converted(new uint8[kRGBSize]);
- ReadYV12Data(&yuv_bytes);
-
- const int kWidth = 167;
- const int kSourceDx = 80000; // This value means a scale down.
- ScaleYUVToRGB32Row_C(yuv_bytes.get(),
- yuv_bytes.get() + kSourceUOffset,
- yuv_bytes.get() + kSourceVOffset,
- rgb_bytes_reference.get(),
- kWidth,
- kSourceDx,
- GetLookupTable(YV12));
- ScaleYUVToRGB32Row_MMX(yuv_bytes.get(),
- yuv_bytes.get() + kSourceUOffset,
- yuv_bytes.get() + kSourceVOffset,
- rgb_bytes_converted.get(),
- kWidth,
- kSourceDx,
- GetLookupTable(YV12));
- media::EmptyRegisterState();
- EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(),
- rgb_bytes_converted.get(),
- kWidth * kBpp));
-}
-
TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) {
base::CPU cpu;
if (!cpu.has_sse()) {
@@ -787,40 +722,6 @@ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) {
kWidth * kBpp));
}
-TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_MMX) {
- base::CPU cpu;
- if (!cpu.has_mmx()) {
- LOG(WARNING) << "System not supported. Test skipped.";
- return;
- }
-
- scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]);
- scoped_ptr<uint8[]> rgb_bytes_reference(new uint8[kRGBSize]);
- scoped_ptr<uint8[]> rgb_bytes_converted(new uint8[kRGBSize]);
- ReadYV12Data(&yuv_bytes);
-
- const int kWidth = 167;
- const int kSourceDx = 80000; // This value means a scale down.
- LinearScaleYUVToRGB32Row_C(yuv_bytes.get(),
- yuv_bytes.get() + kSourceUOffset,
- yuv_bytes.get() + kSourceVOffset,
- rgb_bytes_reference.get(),
- kWidth,
- kSourceDx,
- GetLookupTable(YV12));
- LinearScaleYUVToRGB32Row_MMX(yuv_bytes.get(),
- yuv_bytes.get() + kSourceUOffset,
- yuv_bytes.get() + kSourceVOffset,
- rgb_bytes_converted.get(),
- kWidth,
- kSourceDx,
- GetLookupTable(YV12));
- media::EmptyRegisterState();
- EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(),
- rgb_bytes_converted.get(),
- kWidth * kBpp));
-}
-
TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) {
base::CPU cpu;
if (!cpu.has_sse()) {
« no previous file with comments | « media/base/yuv_convert_perftest.cc ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698