[x265] [PATCH] CLI: do not set AVX512 if it is not supported

Ashok Kumar Mishra ashok at multicorewareinc.com
Mon Apr 23 11:54:18 CEST 2018


On Fri, Apr 20, 2018 at 2:30 AM, Ma0 <mateuszb at poczta.onet.pl> wrote:

> # 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")
>      {
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>


Thanks. Pushed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20180423/5f9a1166/attachment.html>


More information about the x265-devel mailing list