Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhighgod0401 <highgod0401@gmail.com>2013-04-11 08:57:52 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-04-11 14:46:34 +0400
commit9d442b9cc0347bf9fc9c753cda62df7f43842416 (patch)
tree2b176a8879d7c6dbc7b0a63197f768f671cb343e /libavutil/opencl.h
parent4c9b031559c6bd8a02ba12441476260323e84e0a (diff)
opencl: add spec opencl device APIs 20130411
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/opencl.h')
-rw-r--r--libavutil/opencl.h44
1 files changed, 38 insertions, 6 deletions
diff --git a/libavutil/opencl.h b/libavutil/opencl.h
index bcb25ed8be..acafe36ad6 100644
--- a/libavutil/opencl.h
+++ b/libavutil/opencl.h
@@ -97,6 +97,43 @@ int av_opencl_get_device_list(AVOpenCLDeviceList **device_list);
void av_opencl_free_device_list(AVOpenCLDeviceList **device_list);
/**
+ * Set option in the global OpenCL context.
+ *
+ * This options affect the operation performed by the next
+ * av_opencl_init() operation.
+ *
+ * The currently accepted options are:
+ * - build_options: set options to compile registered kernels code
+ * - platform: set index of platform in device list
+ * - device: set index of device in device list
+ *
+ * See reference "OpenCL Specification Version: 1.2 chapter 5.6.4".
+ *
+ * @param key option key
+ * @param val option value
+ * @return >=0 on success, a negative error code in case of failure
+ * @see av_opencl_get_option()
+ */
+int av_opencl_set_option(const char *key, const char *val);
+
+/**
+ * Get option value from the global OpenCL context.
+ *
+ * @param key option key
+ * @param out_val pointer to location where option value will be
+ * written, must be freed with av_freep()
+ * @return >=0 on success, a negative error code in case of failure
+ * @see av_opencl_set_option()
+ */
+int av_opencl_get_option(const char *key, uint8_t **out_val);
+
+/**
+ * Free option values of the global OpenCL context.
+ *
+ */
+void av_opencl_free_option(void);
+
+/**
* Allocate OpenCL external environment.
*
* It must be freed with av_opencl_free_external_env().
@@ -128,16 +165,11 @@ int av_opencl_register_kernel_code(const char *kernel_code);
* Initialize the run time OpenCL environment and compile the kernel
* code registered with av_opencl_register_kernel_code().
*
- * Currently, the only accepted option is "build_options", used to set
- * options to compile registered kernels code. See reference "OpenCL
- * Specification Version: 1.2 chapter 5.6.4".
- *
- * @param options dictionary of key/value options
* @param ext_opencl_env external OpenCL environment, created by an
* application program, ignored if set to NULL
* @return >=0 on success, a negative error code in case of failure
*/
- int av_opencl_init(AVDictionary *options, AVOpenCLExternalEnv *ext_opencl_env);
+ int av_opencl_init(AVOpenCLExternalEnv *ext_opencl_env);
/**
* Create kernel object in the specified kernel environment.