OpenCL wrapper. More...
Go to the source code of this file.
OpenCL wrapper.
This interface is considered still experimental and its API and ABI may change without prior notice.
Definition in file opencl.h.
Get OpenCL device list.
It must be freed with av_opencl_free_device_list().
Definition at line 300 of file opencl.c.
Referenced by opt_opencl_bench().
Free OpenCL device list.
Definition at line 318 of file opencl.c.
Referenced by opt_opencl_bench().
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:
See reference "OpenCL Specification Version: 1.2 chapter 5.6.4".
Definition at line 324 of file opencl.c.
Referenced by opt_opencl().
Get option value from the global OpenCL context.
Allocate OpenCL external environment.
It must be freed with av_opencl_free_external_env().
Definition at line 354 of file opencl.c.
Referenced by av_opencl_benchmark().
Free OpenCL external environment.
Definition at line 364 of file opencl.c.
Referenced by av_opencl_benchmark().
Get OpenCL error string.
Definition at line 169 of file opencl.c.
Referenced by av_opencl_buffer_create(), av_opencl_buffer_read(), av_opencl_buffer_read_image(), av_opencl_buffer_release(), av_opencl_buffer_write(), av_opencl_buffer_write_image(), av_opencl_compile(), av_opencl_uninit(), ff_opencl_apply_unsharp(), ff_opencl_set_parameter(), ff_opencl_transform(), get_device_list(), and init_opencl_env().
Register kernel code.
The registered kernel code is stored in a global context, and compiled in the runtime environment when av_opencl_init() is called.
Initialize the run time OpenCL environment.
Definition at line 554 of file opencl.c.
Referenced by ff_opencl_deshake_init(), and ff_opencl_unsharp_init().
compile specific OpenCL kernel source
Definition at line 394 of file opencl.c.
Referenced by ff_opencl_deshake_init(), and ff_opencl_unsharp_init().
get OpenCL command queue
Definition at line 443 of file opencl.c.
Referenced by ff_opencl_deshake_init(), and ff_opencl_unsharp_init().
Create OpenCL buffer.
The buffer is used to save the data used or created by an OpenCL kernel. The created buffer must be released with av_opencl_buffer_release().
See clCreateBuffer() function reference for more information about the parameters.
Definition at line 611 of file opencl.c.
Referenced by ff_opencl_deshake_process_inout_buf(), ff_opencl_unsharp_init(), and ff_opencl_unsharp_process_inout_buf().
Write OpenCL buffer with data from src_buf.
Definition at line 635 of file opencl.c.
Referenced by compute_mask_matrix().
Read data from OpenCL buffer to memory buffer.
Write image data from memory to OpenCL buffer.
The source must be an array of pointers to image plane buffers.
Definition at line 681 of file opencl.c.
Referenced by ff_opencl_deshake_process_inout_buf(), and ff_opencl_unsharp_process_inout_buf().
Read image data from OpenCL buffer.
Definition at line 722 of file opencl.c.
Referenced by ff_opencl_apply_unsharp(), and ff_opencl_transform().
Release OpenCL buffer.
Definition at line 622 of file opencl.c.
Referenced by ff_opencl_deshake_uninit(), and ff_opencl_unsharp_uninit().
Release OpenCL environment.
The OpenCL environment is effectively released only if all the created kernels had been released with av_opencl_release_kernel().
Definition at line 579 of file opencl.c.
Referenced by ff_opencl_deshake_uninit(), and ff_opencl_unsharp_uninit().
Benchmark an OpenCL device with a user defined callback function.
This function sets up an external OpenCL environment including context and command queue on the device then tears it down in the end. The callback function should perform the rest of the work.
Definition at line 765 of file opencl.c.
Referenced by opt_opencl_bench().