[x265] [PATCH 2 of 3] primitives: remove cpuid parameter from x265_setup_primitives()

Steve Borho steve at borho.org
Tue Jun 30 19:30:49 CEST 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1435681666 18000
#      Tue Jun 30 11:27:46 2015 -0500
# Node ID 38168ee9556053194264c07a563cae0844f4ea2a
# Parent  d9731802f1b79014a4508610f6dddaa5864d6033
primitives: remove cpuid parameter from x265_setup_primitives()

diff -r d9731802f1b7 -r 38168ee95560 source/common/common.h
--- a/source/common/common.h	Tue Jun 30 10:58:56 2015 -0500
+++ b/source/common/common.h	Tue Jun 30 11:27:46 2015 -0500
@@ -424,7 +424,7 @@
 void     x265_free(void *ptr);
 char*    x265_slurp_file(const char *filename);
 
-void     x265_setup_primitives(x265_param* param, int cpu); /* primitives.cpp */
+void     x265_setup_primitives(x265_param* param); /* primitives.cpp */
 }
 
 #include "constants.h"
diff -r d9731802f1b7 -r 38168ee95560 source/common/primitives.cpp
--- a/source/common/primitives.cpp	Tue Jun 30 10:58:56 2015 -0500
+++ b/source/common/primitives.cpp	Tue Jun 30 11:27:46 2015 -0500
@@ -188,12 +188,9 @@
     p.chroma[X265_CSP_I422].cu[BLOCK_422_2x4].sse_pp = NULL;
 }
 
-/* cpuid >= 0 - force CPU type
- * cpuid < 0  - auto-detect if uninitialized */
-void x265_setup_primitives(x265_param *param, int cpuid)
+void x265_setup_primitives(x265_param *param)
 {
-    if (cpuid < 0)
-        cpuid = X265_NS::cpu_detect();
+    int cpuid = param->cpuid;
 
     // initialize global variables
     if (!primitives.pu[0].sad)
diff -r d9731802f1b7 -r 38168ee95560 source/encoder/api.cpp
--- a/source/encoder/api.cpp	Tue Jun 30 10:58:56 2015 -0500
+++ b/source/encoder/api.cpp	Tue Jun 30 11:27:46 2015 -0500
@@ -59,7 +59,7 @@
     x265_log(param, X265_LOG_INFO, "HEVC encoder version %s\n", PFX(version_str));
     x265_log(param, X265_LOG_INFO, "build info %s\n", PFX(build_info_str));
 
-    x265_setup_primitives(param, param->cpuid);
+    x265_setup_primitives(param);
 
     if (x265_check_params(param))
         goto fail;
diff -r d9731802f1b7 -r 38168ee95560 source/x265.cpp
--- a/source/x265.cpp	Tue Jun 30 10:58:56 2015 -0500
+++ b/source/x265.cpp	Tue Jun 30 11:27:46 2015 -0500
@@ -424,7 +424,7 @@
 
         case 'V':
             printVersion(param, api);
-            x265_setup_primitives(param, param->cpuid);
+            x265_setup_primitives(param);
             exit(0);
 
         default:


More information about the x265-devel mailing list