OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/base_paths.h" | 5 #include "base/base_paths.h" |
6 #include "base/cpu.h" | 6 #include "base/cpu.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "media/base/djb2.h" | 10 #include "media/base/djb2.h" |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 if (next_sub_rect & 1) | 479 if (next_sub_rect & 1) |
480 sub_rect.set_x(sub_rect.x() + sub_rect.width() / 2); | 480 sub_rect.set_x(sub_rect.x() + sub_rect.width() / 2); |
481 if (next_sub_rect & 2) | 481 if (next_sub_rect & 2) |
482 sub_rect.set_y(sub_rect.y() + sub_rect.height() / 2); | 482 sub_rect.set_y(sub_rect.y() + sub_rect.height() / 2); |
483 sub_rect.set_width(sub_rect.width() / 2); | 483 sub_rect.set_width(sub_rect.width() / 2); |
484 sub_rect.set_height(sub_rect.height() / 2); | 484 sub_rect.set_height(sub_rect.height() / 2); |
485 next_sub_rect++; | 485 next_sub_rect++; |
486 } | 486 } |
487 } | 487 } |
488 | 488 |
489 #if !defined(ARCH_CPU_ARM_FAMILY) | 489 #if !defined(ARCH_CPU_ARM_FAMILY) && !defined(ARCH_CPU_MIPS_FAMILY) |
490 TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) { | 490 TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) { |
491 base::CPU cpu; | 491 base::CPU cpu; |
492 if (!cpu.has_sse2()) { | 492 if (!cpu.has_sse2()) { |
493 LOG(WARNING) << "System doesn't support SSE2, test not executed."; | 493 LOG(WARNING) << "System doesn't support SSE2, test not executed."; |
494 return; | 494 return; |
495 } | 495 } |
496 | 496 |
497 // Allocate all surfaces. | 497 // Allocate all surfaces. |
498 scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]); | 498 scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]); |
499 scoped_ptr<uint8[]> rgb_bytes(new uint8[kRGBSize]); | 499 scoped_ptr<uint8[]> rgb_bytes(new uint8[kRGBSize]); |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
932 kSourceDx); | 932 kSourceDx); |
933 media::EmptyRegisterState(); | 933 media::EmptyRegisterState(); |
934 EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), | 934 EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), |
935 rgb_bytes_converted.get(), | 935 rgb_bytes_converted.get(), |
936 kWidth * kBpp)); | 936 kWidth * kBpp)); |
937 } | 937 } |
938 | 938 |
939 #endif // defined(ARCH_CPU_X86_64) | 939 #endif // defined(ARCH_CPU_X86_64) |
940 | 940 |
941 #endif // defined(ARCH_CPU_X86_FAMILY) | 941 #endif // defined(ARCH_CPU_X86_FAMILY) |
OLD | NEW |