summaryrefslogtreecommitdiff
path: root/libavutil/opencl.h
diff options
context:
space:
mode:
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.