diff --git a/libyuv.gyp b/libyuv.gyp index 7c6c80466..fc7d08792 100644 --- a/libyuv.gyp +++ b/libyuv.gyp @@ -25,6 +25,7 @@ 'clang%': 0, # Link-Time Optimizations. 'use_lto%': 0, + 'mips_msa%': 0, # Default to msa off. 'build_neon': 0, 'build_msa': 0, 'conditions': [ diff --git a/libyuv_test.gyp b/libyuv_test.gyp index 2d70ee093..f4c4ea091 100644 --- a/libyuv_test.gyp +++ b/libyuv_test.gyp @@ -9,6 +9,7 @@ { 'variables': { 'libyuv_disable_jpeg%': 0, + 'mips_msa%': 0, # Default to msa off. }, 'targets': [ { diff --git a/source/cpu_id.cc b/source/cpu_id.cc index aaf58cf02..27e2467b0 100644 --- a/source/cpu_id.cc +++ b/source/cpu_id.cc @@ -164,14 +164,14 @@ int ArmCpuCaps(const char* cpuinfo_name) { LIBYUV_API SAFEBUFFERS int MipsCpuCaps(const char* cpuinfo_name, const char ase[]) { char cpuinfo_line[512]; - int len = strlen(ase); + int len = (int)strlen(ase); FILE* f = fopen(cpuinfo_name, "r"); if (!f) { // ase enabled if /proc/cpuinfo is unavailable. - if(strcmp(ase, " msa") == 0) { + if (strcmp(ase, " msa") == 0) { return kCpuHasMSA; } - if(strcmp(ase, " dspr2") == 0) { + if (strcmp(ase, " dspr2") == 0) { return kCpuHasDSPR2; } } @@ -180,10 +180,10 @@ int MipsCpuCaps(const char* cpuinfo_name, const char ase[]) { char* p = strstr(cpuinfo_line, ase); if (p && (p[len] == ' ' || p[len] == '\n')) { fclose(f); - if(strcmp(ase, " msa") == 0) { + if (strcmp(ase, " msa") == 0) { return kCpuHasMSA; } - if(strcmp(ase, " dspr2") == 0) { + if (strcmp(ase, " dspr2") == 0) { return kCpuHasDSPR2; } }