<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 20, 2018 at 2:30 AM, Ma0 <span dir="ltr"><<a href="mailto:mateuszb@poczta.onet.pl" target="_blank">mateuszb@poczta.onet.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"># HG changeset patch<br>
# User Ma0 <<a href="mailto:mateuszb@poczta.onet.pl">mateuszb@poczta.onet.pl</a>><br>
# Date 1524171479 -7200<br>
#      Thu Apr 19 22:57:59 2018 +0200<br>
# Branch stable<br>
# Node ID a40d936b962fbcbfa3a48b8e0bfa10<wbr>fdf7b1df81<br>
# Parent  aa9102400f2456584d5e41adf45651<wbr>0abcebec6c<br>
CLI: do not set AVX512 if it is not supported<br>
<br>
diff -r aa9102400f24 -r a40d936b962f source/common/param.cpp<br>
--- a/source/common/param.cpp   Fri Apr 13 17:12:10 2018 +0530<br>
+++ b/source/common/param.cpp   Thu Apr 19 22:57:59 2018 +0200<br>
@@ -615,20 +615,30 @@<br>
     if (0) ;<br>
     OPT("asm")<br>
     {<br>
-        if (strcmp(value, "avx512")==0)<br>
+#if X265_ARCH_X86<br>
+        if (!strcasecmp(value, "avx512"))<br>
         {<br>
             p->bEnableavx512 = 1;<br>
             benableavx512 = true;<br>
+            p->cpuid = X265_NS::cpu_detect(<wbr>benableavx512);<br>
+            if (!(p->cpuid & X265_CPU_AVX512))<br>
+                x265_log(p, X265_LOG_WARNING, "AVX512 is not supported\n");<br>
         }<br>
         else<br>
         {<br>
             p->bEnableavx512 = 0;<br>
             benableavx512 = false;<br>
+            if (bValueWasNull)<br>
+                p->cpuid = atobool(value);<br>
+            else<br>
+                p->cpuid = parseCpuName(value, bError);<br>
         }<br>
+#else<br>
         if (bValueWasNull)<br>
             p->cpuid = atobool(value);<br>
         else<br>
             p->cpuid = parseCpuName(value, bError);<br>
+#endif<br>
     }<br>
     OPT("fps")<br>
     {<br>
______________________________<wbr>_________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/<wbr>listinfo/x265-devel</a><br>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks. Pushed.</div></div>