diff options
author | Frank Barchard <fbarchard@google.com> | 2015-11-03 16:57:40 -0800 |
---|---|---|
committer | Frank Barchard <fbarchard@google.com> | 2015-11-03 16:57:40 -0800 |
commit | 1f1d140bb6b15360219e2746f83f13f73e95169f (patch) | |
tree | 5abd13097ebe22a27a8404599565dee49e7497bf /source/cpu_id.cc | |
parent | ce4c2fad1d71f6e4bed20e3a7e518397a44a7e04 (diff) | |
download | libyuv-1f1d140bb6b15360219e2746f83f13f73e95169f.tar.gz |
remove mips dsp detect
DSP code is not actually used, only DSPR2. Remove the detect.
TBR=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1405043008 .
Diffstat (limited to 'source/cpu_id.cc')
-rw-r--r-- | source/cpu_id.cc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/source/cpu_id.cc b/source/cpu_id.cc index 42995fc8..2fdb82ab 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -151,27 +151,6 @@ int ArmCpuCaps(const char* cpuinfo_name) { return 0; } -#if defined(__mips__) && defined(__linux__) -static int MipsCpuCaps(const char* search_string) { - char cpuinfo_line[512]; - const char* file_name = "/proc/cpuinfo"; - FILE* f = fopen(file_name, "r"); - if (!f) { - // Assume DSP if /proc/cpuinfo is unavailable. - // This will occur for Chrome sandbox for Pepper or Render process. - return kCpuHasMIPS_DSP; - } - while (fgets(cpuinfo_line, sizeof(cpuinfo_line) - 1, f) != NULL) { - if (strstr(cpuinfo_line, search_string) != NULL) { - fclose(f); - return kCpuHasMIPS_DSP; - } - } - fclose(f); - return 0; -} -#endif - // CPU detect function for SIMD instruction sets. LIBYUV_API int cpu_info_ = 0; // cpu_info is not initialized yet. @@ -262,8 +241,6 @@ int InitCpuFlags(void) { } #endif #if defined(__mips__) && defined(__linux__) - // Linux mips parse text file for dsp detect. - cpu_info = MipsCpuCaps("dsp"); // set kCpuHasMIPS_DSP. #if defined(__mips_dspr2) cpu_info |= kCpuHasMIPS_DSPR2; #endif @@ -272,9 +249,6 @@ int InitCpuFlags(void) { if (getenv("LIBYUV_DISABLE_MIPS")) { cpu_info &= ~kCpuHasMIPS; } - if (getenv("LIBYUV_DISABLE_MIPS_DSP")) { - cpu_info &= ~kCpuHasMIPS_DSP; - } if (getenv("LIBYUV_DISABLE_MIPS_DSPR2")) { cpu_info &= ~kCpuHasMIPS_DSPR2; } |