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

Side by Side Diff: source/cpu_id.cc

Issue 1677633002: rename MIPS_DSPR2 to DSPR2 for consistency (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: git cl try Created 4 years, 10 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/convert_from.cc ('k') | source/planar_functions.cc » ('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 2011 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2011 The LibYuv 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 if (TestEnv("LIBYUV_DISABLE_FMA3")) { 245 if (TestEnv("LIBYUV_DISABLE_FMA3")) {
246 cpu_info &= ~kCpuHasFMA3; 246 cpu_info &= ~kCpuHasFMA3;
247 } 247 }
248 if (TestEnv("LIBYUV_DISABLE_AVX3")) { 248 if (TestEnv("LIBYUV_DISABLE_AVX3")) {
249 cpu_info &= ~kCpuHasAVX3; 249 cpu_info &= ~kCpuHasAVX3;
250 } 250 }
251 #endif 251 #endif
252 #if defined(__mips__) && defined(__linux__) 252 #if defined(__mips__) && defined(__linux__)
253 #if defined(__mips_dspr2) 253 #if defined(__mips_dspr2)
254 cpu_info |= kCpuHasMIPS_DSPR2; 254 cpu_info |= kCpuHasDSPR2;
255 #endif 255 #endif
256 cpu_info |= kCpuHasMIPS; 256 cpu_info |= kCpuHasMIPS;
257 257 if (getenv("LIBYUV_DISABLE_DSPR2")) {
258 if (getenv("LIBYUV_DISABLE_MIPS")) { 258 cpu_info &= ~kCpuHasDSPR2;
259 cpu_info &= ~kCpuHasMIPS;
260 }
261 if (getenv("LIBYUV_DISABLE_MIPS_DSPR2")) {
262 cpu_info &= ~kCpuHasMIPS_DSPR2;
263 } 259 }
264 #endif 260 #endif
265 #if defined(__arm__) || defined(__aarch64__) 261 #if defined(__arm__) || defined(__aarch64__)
266 // gcc -mfpu=neon defines __ARM_NEON__ 262 // gcc -mfpu=neon defines __ARM_NEON__
267 // __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon. 263 // __ARM_NEON__ generates code that requires Neon. NaCL also requires Neon.
268 // For Linux, /proc/cpuinfo can be tested but without that assume Neon. 264 // For Linux, /proc/cpuinfo can be tested but without that assume Neon.
269 #if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__) 265 #if defined(__ARM_NEON__) || defined(__native_client__) || !defined(__linux__)
270 cpu_info = kCpuHasNEON; 266 cpu_info = kCpuHasNEON;
271 // For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon 267 // For aarch64(arm64), /proc/cpuinfo's feature is not complete, e.g. no neon
272 // flag in it. 268 // flag in it.
(...skipping 21 matching lines...) Expand all
294 // Note that use of this function is not thread safe. 290 // Note that use of this function is not thread safe.
295 LIBYUV_API 291 LIBYUV_API
296 void MaskCpuFlags(int enable_flags) { 292 void MaskCpuFlags(int enable_flags) {
297 cpu_info_ = InitCpuFlags() & enable_flags; 293 cpu_info_ = InitCpuFlags() & enable_flags;
298 } 294 }
299 295
300 #ifdef __cplusplus 296 #ifdef __cplusplus
301 } // extern "C" 297 } // extern "C"
302 } // namespace libyuv 298 } // namespace libyuv
303 #endif 299 #endif
OLDNEW
« no previous file with comments | « source/convert_from.cc ('k') | source/planar_functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698