[x265] [PATCH] CLI: do not set AVX512 if it is not supported
Ma0
mateuszb at poczta.onet.pl
Thu Apr 19 23:00:41 CEST 2018
# HG changeset patch
# User Ma0 <mateuszb at poczta.onet.pl>
# Date 1524171479 -7200
# Thu Apr 19 22:57:59 2018 +0200
# Branch stable
# Node ID a40d936b962fbcbfa3a48b8e0bfa10fdf7b1df81
# Parent aa9102400f2456584d5e41adf456510abcebec6c
CLI: do not set AVX512 if it is not supported
diff -r aa9102400f24 -r a40d936b962f source/common/param.cpp
--- a/source/common/param.cpp Fri Apr 13 17:12:10 2018 +0530
+++ b/source/common/param.cpp Thu Apr 19 22:57:59 2018 +0200
@@ -615,20 +615,30 @@
if (0) ;
OPT("asm")
{
- if (strcmp(value, "avx512")==0)
+#if X265_ARCH_X86
+ if (!strcasecmp(value, "avx512"))
{
p->bEnableavx512 = 1;
benableavx512 = true;
+ p->cpuid = X265_NS::cpu_detect(benableavx512);
+ if (!(p->cpuid & X265_CPU_AVX512))
+ x265_log(p, X265_LOG_WARNING, "AVX512 is not supported\n");
}
else
{
p->bEnableavx512 = 0;
benableavx512 = false;
+ if (bValueWasNull)
+ p->cpuid = atobool(value);
+ else
+ p->cpuid = parseCpuName(value, bError);
}
+#else
if (bValueWasNull)
p->cpuid = atobool(value);
else
p->cpuid = parseCpuName(value, bError);
+#endif
}
OPT("fps")
{
More information about the x265-devel
mailing list