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

Side by Side Diff: talk/media/base/cpuid.cc

Issue 1362503003: Use suffixed {uint,int}{8,16,32,64}_t types. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase + revert basictypes.h (to be landed separately just in case of a revert due to unexpected us… Created 5 years, 2 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 | « talk/media/base/audioframe.h ('k') | talk/media/base/executablehelpers.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 * libjingle 2 * libjingle
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 37
38 void CpuInfo::MaskCpuFlagsForTest(int enable_flags) { 38 void CpuInfo::MaskCpuFlagsForTest(int enable_flags) {
39 libyuv::MaskCpuFlags(enable_flags); 39 libyuv::MaskCpuFlags(enable_flags);
40 } 40 }
41 41
42 // Detect an Intel Core I5 or better such as 4th generation Macbook Air. 42 // Detect an Intel Core I5 or better such as 4th generation Macbook Air.
43 bool IsCoreIOrBetter() { 43 bool IsCoreIOrBetter() {
44 #if defined(__i386__) || defined(__x86_64__) || \ 44 #if defined(__i386__) || defined(__x86_64__) || \
45 defined(_M_IX86) || defined(_M_X64) 45 defined(_M_IX86) || defined(_M_X64)
46 uint32 cpu_info[4]; 46 uint32_t cpu_info[4];
47 libyuv::CpuId(0, 0, &cpu_info[0]); // Function 0: Vendor ID 47 libyuv::CpuId(0, 0, &cpu_info[0]); // Function 0: Vendor ID
48 if (cpu_info[1] == 0x756e6547 && cpu_info[3] == 0x49656e69 && 48 if (cpu_info[1] == 0x756e6547 && cpu_info[3] == 0x49656e69 &&
49 cpu_info[2] == 0x6c65746e) { // GenuineIntel 49 cpu_info[2] == 0x6c65746e) { // GenuineIntel
50 // Detect CPU Family and Model 50 // Detect CPU Family and Model
51 // 3:0 - Stepping 51 // 3:0 - Stepping
52 // 7:4 - Model 52 // 7:4 - Model
53 // 11:8 - Family 53 // 11:8 - Family
54 // 13:12 - Processor Type 54 // 13:12 - Processor Type
55 // 19:16 - Extended Model 55 // 19:16 - Extended Model
56 // 27:20 - Extended Family 56 // 27:20 - Extended Family
(...skipping 14 matching lines...) Expand all
71 (family == 6 && (model == kAtom || model <= kCore2))) { 71 (family == 6 && (model == kAtom || model <= kCore2))) {
72 return false; 72 return false;
73 } 73 }
74 return true; 74 return true;
75 } 75 }
76 #endif 76 #endif
77 return false; 77 return false;
78 } 78 }
79 79
80 } // namespace cricket 80 } // namespace cricket
OLDNEW
« no previous file with comments | « talk/media/base/audioframe.h ('k') | talk/media/base/executablehelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698