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

Side by Side Diff: source/libvpx/test/test_libvpx.cc

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/test.mk ('k') | source/libvpx/vp8/common/loopfilter.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 #include <string> 10 #include <string>
11 #include "vpx_config.h" 11 #include "vpx_config.h"
12 extern "C" {
12 #if ARCH_X86 || ARCH_X86_64 13 #if ARCH_X86 || ARCH_X86_64
13 extern "C" {
14 #include "vpx_ports/x86.h" 14 #include "vpx_ports/x86.h"
15 #endif
15 #if CONFIG_VP8 16 #if CONFIG_VP8
16 extern void vp8_rtcd(); 17 extern void vp8_rtcd();
17 #endif 18 #endif
18 #if CONFIG_VP9 19 #if CONFIG_VP9
19 extern void vp9_rtcd(); 20 extern void vp9_rtcd();
20 #endif 21 #endif
21 } 22 }
22 #endif
23 #include "third_party/googletest/src/include/gtest/gtest.h" 23 #include "third_party/googletest/src/include/gtest/gtest.h"
24 24
25 static void append_gtest_filter(const char *str) { 25 static void append_gtest_filter(const char *str) {
26 std::string filter = ::testing::FLAGS_gtest_filter; 26 std::string filter = ::testing::FLAGS_gtest_filter;
27 filter += str; 27 filter += str;
28 ::testing::FLAGS_gtest_filter = filter; 28 ::testing::FLAGS_gtest_filter = filter;
29 } 29 }
30 30
31 int main(int argc, char **argv) { 31 int main(int argc, char **argv) {
32 ::testing::InitGoogleTest(&argc, argv); 32 ::testing::InitGoogleTest(&argc, argv);
33 33
34 #if ARCH_X86 || ARCH_X86_64 34 #if ARCH_X86 || ARCH_X86_64
35 const int simd_caps = x86_simd_caps(); 35 const int simd_caps = x86_simd_caps();
36 if (!(simd_caps & HAS_MMX)) 36 if (!(simd_caps & HAS_MMX))
37 append_gtest_filter(":-MMX/*"); 37 append_gtest_filter(":-MMX/*");
38 if (!(simd_caps & HAS_SSE)) 38 if (!(simd_caps & HAS_SSE))
39 append_gtest_filter(":-SSE/*"); 39 append_gtest_filter(":-SSE/*");
40 if (!(simd_caps & HAS_SSE2)) 40 if (!(simd_caps & HAS_SSE2))
41 append_gtest_filter(":-SSE2/*"); 41 append_gtest_filter(":-SSE2/*");
42 if (!(simd_caps & HAS_SSE3)) 42 if (!(simd_caps & HAS_SSE3))
43 append_gtest_filter(":-SSE3/*"); 43 append_gtest_filter(":-SSE3/*");
44 if (!(simd_caps & HAS_SSSE3)) 44 if (!(simd_caps & HAS_SSSE3))
45 append_gtest_filter(":-SSSE3/*"); 45 append_gtest_filter(":-SSSE3/*");
46 if (!(simd_caps & HAS_SSE4_1)) 46 if (!(simd_caps & HAS_SSE4_1))
47 append_gtest_filter(":-SSE4_1/*"); 47 append_gtest_filter(":-SSE4_1/*");
48 #endif 48 #endif
49 49
50 #if !CONFIG_SHARED
51 /* Shared library builds don't support whitebox tests that exercise internal s ymbols. */
50 #if CONFIG_VP8 52 #if CONFIG_VP8
51 vp8_rtcd(); 53 vp8_rtcd();
52 #endif 54 #endif
53 #if CONFIG_VP9 55 #if CONFIG_VP9
54 vp9_rtcd(); 56 vp9_rtcd();
55 #endif 57 #endif
58 #endif
56 59
57 return RUN_ALL_TESTS(); 60 return RUN_ALL_TESTS();
58 } 61 }
OLDNEW
« no previous file with comments | « source/libvpx/test/test.mk ('k') | source/libvpx/vp8/common/loopfilter.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698