changeset 12338:756a85b9b2db draft stable

remove 'bool bEnableavx512' from x265.h bEnableavx512 is/should be copy of 16th bit in cpuid so it is redundant
author Ma0 <mateuszb@poczta.onet.pl>
date Tue, 01 May 2018 20:50:22 +0200
parents 091f07265371
children 69aafa6d70ad
files source/CMakeLists.txt source/common/param.cpp source/x265.h
diffstat 3 files changed, 3 insertions(+-), 15 deletions(-) [+]
line wrap: on
line diff
--- a/source/CMakeLists.txt	Tue Apr 24 10:37:02 2018 +0530
+++ b/source/CMakeLists.txt	Tue May 01 20:50:22 2018 +0200
@@ -29,7 +29,7 @@ option(NATIVE_BUILD "Target the build CP
 option(STATIC_LINK_CRT "Statically link C runtime for release builds" OFF)
 mark_as_advanced(FPROFILE_USE FPROFILE_GENERATE NATIVE_BUILD)
 # X265_BUILD must be incremented each time the public API is changed
-set(X265_BUILD 159)
+set(X265_BUILD 160)
 configure_file("${PROJECT_SOURCE_DIR}/x265.def.in"
                "${PROJECT_BINARY_DIR}/x265.def")
 configure_file("${PROJECT_SOURCE_DIR}/x265_config.h.in"
--- a/source/common/param.cpp	Tue Apr 24 10:37:02 2018 +0530
+++ b/source/common/param.cpp	Tue May 01 20:50:22 2018 +0200
@@ -618,20 +618,16 @@ int x265_param_parse(x265_param* p, cons
 #if X265_ARCH_X86
         if (!strcasecmp(value, "avx512"))
         {
-            p->bEnableavx512 = true;
-
-            p->cpuid = X265_NS::cpu_detect(p->bEnableavx512);
+            p->cpuid = X265_NS::cpu_detect(true);
             if (!(p->cpuid & X265_CPU_AVX512))
                 x265_log(p, X265_LOG_WARNING, "AVX512 is not supported\n");
         }
         else
         {
-            p->bEnableavx512 = false;
-
             if (bValueWasNull)
                 p->cpuid = atobool(value);
             else
-                p->cpuid = parseCpuName(value, bError, p->bEnableavx512);
+                p->cpuid = parseCpuName(value, bError, false);
         }
 #else
         if (bValueWasNull)
--- a/source/x265.h	Tue Apr 24 10:37:02 2018 +0530
+++ b/source/x265.h	Tue May 01 20:50:22 2018 +0200
@@ -629,14 +629,6 @@ typedef struct x265_param
      * somehow flawed on your target hardware. The asm function tables are
      * process global, the first encoder configures them for all encoders */
     int       cpuid;
-     /*==Assembly features ==*/
-     /*  x265_param_parse() will detect if the avx512 is enabled (in cli )and set 
-     *  bEnableavx512 to 1 to use avx512 SIMD. By default this flag will not be set , 
-     *  hence the encoding will happen without avx512 assembly primitives even if the cpu has 
-     *  avx512 capabilities. 
-     *  Ensure to use --asm avx512 if you need to encode with avx512 assembly primitives*/
-
-    bool  bEnableavx512;
     /*== Parallelism Features ==*/
 
     /* Number of concurrently encoded frames between 1 and X265_MAX_FRAME_THREADS