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

Side by Side Diff: source/libvpx/vp8/common/generic/systemdependent.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « source/libvpx/vp8/common/findnearmv.h ('k') | source/libvpx/vp8/common/invtrans.h » ('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) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 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 10
(...skipping 27 matching lines...) Expand all
38 int core_count = 16; 38 int core_count = 16;
39 39
40 #if HAVE_UNISTD_H && !defined(__OS2__) 40 #if HAVE_UNISTD_H && !defined(__OS2__)
41 #if defined(_SC_NPROCESSORS_ONLN) 41 #if defined(_SC_NPROCESSORS_ONLN)
42 core_count = sysconf(_SC_NPROCESSORS_ONLN); 42 core_count = sysconf(_SC_NPROCESSORS_ONLN);
43 #elif defined(_SC_NPROC_ONLN) 43 #elif defined(_SC_NPROC_ONLN)
44 core_count = sysconf(_SC_NPROC_ONLN); 44 core_count = sysconf(_SC_NPROC_ONLN);
45 #endif 45 #endif
46 #elif defined(_WIN32) 46 #elif defined(_WIN32)
47 { 47 {
48 #if _WIN32_WINNT >= 0x0501
49 SYSTEM_INFO sysinfo;
50 GetNativeSystemInfo(&sysinfo);
51 #else
48 PGNSI pGNSI; 52 PGNSI pGNSI;
49 SYSTEM_INFO sysinfo; 53 SYSTEM_INFO sysinfo;
50 54
51 /* Call GetNativeSystemInfo if supported or 55 /* Call GetNativeSystemInfo if supported or
52 * GetSystemInfo otherwise. */ 56 * GetSystemInfo otherwise. */
53 57
54 pGNSI = (PGNSI) GetProcAddress( 58 pGNSI = (PGNSI) GetProcAddress(
55 GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo"); 59 GetModuleHandle(TEXT("kernel32.dll")), "GetNativeSystemInfo");
56 if (pGNSI != NULL) 60 if (pGNSI != NULL)
57 pGNSI(&sysinfo); 61 pGNSI(&sysinfo);
58 else 62 else
59 GetSystemInfo(&sysinfo); 63 GetSystemInfo(&sysinfo);
64 #endif
60 65
61 core_count = sysinfo.dwNumberOfProcessors; 66 core_count = sysinfo.dwNumberOfProcessors;
62 } 67 }
63 #elif defined(__OS2__) 68 #elif defined(__OS2__)
64 { 69 {
65 ULONG proc_id; 70 ULONG proc_id;
66 ULONG status; 71 ULONG status;
67 72
68 core_count = 0; 73 core_count = 0;
69 for (proc_id = 1; ; proc_id++) 74 for (proc_id = 1; ; proc_id++)
(...skipping 20 matching lines...) Expand all
90 #if CONFIG_MULTITHREAD 95 #if CONFIG_MULTITHREAD
91 ctx->processor_core_count = get_cpu_count(); 96 ctx->processor_core_count = get_cpu_count();
92 #endif /* CONFIG_MULTITHREAD */ 97 #endif /* CONFIG_MULTITHREAD */
93 98
94 #if ARCH_ARM 99 #if ARCH_ARM
95 ctx->cpu_caps = arm_cpu_caps(); 100 ctx->cpu_caps = arm_cpu_caps();
96 #elif ARCH_X86 || ARCH_X86_64 101 #elif ARCH_X86 || ARCH_X86_64
97 ctx->cpu_caps = x86_simd_caps(); 102 ctx->cpu_caps = x86_simd_caps();
98 #endif 103 #endif
99 } 104 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/common/findnearmv.h ('k') | source/libvpx/vp8/common/invtrans.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698