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

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

Issue 11555023: libvpx: Add VP9 decoder. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 8 years 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
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 #if ARCH_X86 || ARCH_X86_64 12 #if ARCH_X86 || ARCH_X86_64
13 extern "C" { 13 extern "C" {
14 #include "vpx_ports/x86.h" 14 #include "vpx_ports/x86.h"
15 #if CONFIG_VP8
16 extern void vp8_rtcd();
17 #endif
18 #if CONFIG_VP9
19 extern void vp9_rtcd();
20 #endif
15 } 21 }
16 #endif 22 #endif
17 #include "third_party/googletest/src/include/gtest/gtest.h" 23 #include "third_party/googletest/src/include/gtest/gtest.h"
18 24
19 static void append_gtest_filter(const char *str) { 25 static void append_gtest_filter(const char *str) {
20 std::string filter = ::testing::FLAGS_gtest_filter; 26 std::string filter = ::testing::FLAGS_gtest_filter;
21 filter += str; 27 filter += str;
22 ::testing::FLAGS_gtest_filter = filter; 28 ::testing::FLAGS_gtest_filter = filter;
23 } 29 }
24 30
25 int main(int argc, char **argv) { 31 int main(int argc, char **argv) {
26 ::testing::InitGoogleTest(&argc, argv); 32 ::testing::InitGoogleTest(&argc, argv);
27 33
28 #if ARCH_X86 || ARCH_X86_64 34 #if ARCH_X86 || ARCH_X86_64
29 const int simd_caps = x86_simd_caps(); 35 const int simd_caps = x86_simd_caps();
30 if(!(simd_caps & HAS_MMX)) 36 if (!(simd_caps & HAS_MMX))
31 append_gtest_filter(":-MMX/*"); 37 append_gtest_filter(":-MMX/*");
32 if(!(simd_caps & HAS_SSE)) 38 if (!(simd_caps & HAS_SSE))
33 append_gtest_filter(":-SSE/*"); 39 append_gtest_filter(":-SSE/*");
34 if(!(simd_caps & HAS_SSE2)) 40 if (!(simd_caps & HAS_SSE2))
35 append_gtest_filter(":-SSE2/*"); 41 append_gtest_filter(":-SSE2/*");
36 if(!(simd_caps & HAS_SSE3)) 42 if (!(simd_caps & HAS_SSE3))
37 append_gtest_filter(":-SSE3/*"); 43 append_gtest_filter(":-SSE3/*");
38 if(!(simd_caps & HAS_SSSE3)) 44 if (!(simd_caps & HAS_SSSE3))
39 append_gtest_filter(":-SSSE3/*"); 45 append_gtest_filter(":-SSSE3/*");
40 if(!(simd_caps & HAS_SSE4_1)) 46 if (!(simd_caps & HAS_SSE4_1))
41 append_gtest_filter(":-SSE4_1/*"); 47 append_gtest_filter(":-SSE4_1/*");
42 #endif 48 #endif
43 49
50 #if CONFIG_VP8
51 vp8_rtcd();
52 #endif
53 #if CONFIG_VP9
54 vp9_rtcd();
55 #endif
56
44 return RUN_ALL_TESTS(); 57 return RUN_ALL_TESTS();
45 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698