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/files/file_util.h" | 7 #include "base/files/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" |
11 #include "media/base/simd/convert_rgb_to_yuv.h" | 11 #include "media/base/simd/convert_rgb_to_yuv.h" |
12 #include "media/base/simd/convert_yuv_to_rgb.h" | 12 #include "media/base/simd/convert_yuv_to_rgb.h" |
13 #include "media/base/simd/filter_yuv.h" | 13 #include "media/base/simd/filter_yuv.h" |
14 #include "media/base/simd/yuv_to_rgb_table.h" | 14 #include "media/base/simd/yuv_to_rgb_table.h" |
15 #include "media/base/yuv_convert.h" | 15 #include "media/base/yuv_convert.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/geometry/rect.h" |
18 | 18 |
19 // Size of raw image. | 19 // Size of raw image. |
20 static const int kSourceWidth = 640; | 20 static const int kSourceWidth = 640; |
21 static const int kSourceHeight = 360; | 21 static const int kSourceHeight = 360; |
22 static const int kSourceYSize = kSourceWidth * kSourceHeight; | 22 static const int kSourceYSize = kSourceWidth * kSourceHeight; |
23 static const int kSourceUOffset = kSourceYSize; | 23 static const int kSourceUOffset = kSourceYSize; |
24 static const int kSourceVOffset = kSourceYSize * 5 / 4; | 24 static const int kSourceVOffset = kSourceYSize * 5 / 4; |
25 static const int kScaledWidth = 1024; | 25 static const int kScaledWidth = 1024; |
26 static const int kScaledHeight = 768; | 26 static const int kScaledHeight = 768; |
27 static const int kDownScaledWidth = 512; | 27 static const int kDownScaledWidth = 512; |
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), | 882 EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(), |
883 rgb_bytes_converted.get(), | 883 rgb_bytes_converted.get(), |
884 kWidth * kBpp)); | 884 kWidth * kBpp)); |
885 } | 885 } |
886 | 886 |
887 #endif // defined(ARCH_CPU_X86_64) | 887 #endif // defined(ARCH_CPU_X86_64) |
888 | 888 |
889 #endif // defined(ARCH_CPU_X86_FAMILY) | 889 #endif // defined(ARCH_CPU_X86_FAMILY) |
890 | 890 |
891 } // namespace media | 891 } // namespace media |
OLD | NEW |