[x265] [PATCH 2 of 3] api: remove public funcdef and export for deprecated x265_setup_primitives()

Steve Borho steve at borho.org
Wed Apr 1 22:39:13 CEST 2015


# HG changeset patch
# User Steve Borho <steve at borho.org>
# Date 1427917459 18000
#      Wed Apr 01 14:44:19 2015 -0500
# Node ID 6cdd761a469295dc1bca00b15cea97b7f3dc97f3
# Parent  4ea8b72aac211e6262bc9f3e23ae7f4d466881ca
api: remove public funcdef and export for deprecated x265_setup_primitives()

the function is still in the static lib, but no-one should be using it.

diff -r 4ea8b72aac21 -r 6cdd761a4692 source/common/common.h
--- a/source/common/common.h	Wed Apr 01 13:35:22 2015 -0500
+++ b/source/common/common.h	Wed Apr 01 14:44:19 2015 -0500
@@ -425,6 +425,8 @@
 void     x265_free(void *ptr);
 char*    x265_slurp_file(const char *filename);
 
+void     x265_setup_primitives(x265_param* param, int cpu); /* primitives.cpp */
+
 #include "constants.h"
 
 #endif // ifndef X265_COMMON_H
diff -r 4ea8b72aac21 -r 6cdd761a4692 source/common/primitives.cpp
--- a/source/common/primitives.cpp	Wed Apr 01 13:35:22 2015 -0500
+++ b/source/common/primitives.cpp	Wed Apr 01 14:44:19 2015 -0500
@@ -191,7 +191,6 @@
 
 /* cpuid >= 0 - force CPU type
  * cpuid < 0  - auto-detect if uninitialized */
-extern "C"
 void x265_setup_primitives(x265_param *param, int cpuid)
 {
     if (cpuid < 0)
diff -r 4ea8b72aac21 -r 6cdd761a4692 source/x265.def.in
--- a/source/x265.def.in	Wed Apr 01 13:35:22 2015 -0500
+++ b/source/x265.def.in	Wed Apr 01 14:44:19 2015 -0500
@@ -1,6 +1,5 @@
 EXPORTS
 x265_encoder_open_${X265_BUILD}
-x265_setup_primitives
 x265_param_default
 x265_param_default_preset
 x265_param_parse
diff -r 4ea8b72aac21 -r 6cdd761a4692 source/x265.h
--- a/source/x265.h	Wed Apr 01 13:35:22 2015 -0500
+++ b/source/x265.h	Wed Apr 01 14:44:19 2015 -0500
@@ -1086,12 +1086,6 @@
     } vui;
 } x265_param;
 
-/***
- * If not called, first encoder allocated will auto-detect the CPU and
- * initialize performance primitives, which are process global.
- * DEPRECATED: use x265_param.cpuid to specify CPU */
-void x265_setup_primitives(x265_param *param, int cpu);
-
 /* x265_param_alloc:
  *  Allocates an x265_param instance. The returned param structure is not
  *  special in any way, but using this method together with x265_param_free()


More information about the x265-devel mailing list