AVOpenCLDeviceNode and AVOpenCLPlatformNode used fixed static buffer for holding the device and platform name.
This patch modifies these structures to use pointers instead. The memory required to hold the names is
now dynamically allocated, the size for which is determined by querying appropriate OpenCL runtime APIs.
Signed-off-by: Maneesh Gupta <maneesh.gupta@amd.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
When OpenCL kernels are compiled, is_compiled flag is being set for each
kernel. But, in opencl uninit, this flag is not being cleared.
This causes an error when an OpenCL kernel is tried on different OpenCL
devices on same platform.
Here is the patch with a fix
Reviewed-by; Wei Gao <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
CL_DEVICE_TYPE_DEFAULT makes duplicated device entries for each
platform using av_opencl_get_device_list()
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Reviewed-by: highgod0401 <highgod0401@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fixes compilation when the macros are empty and the label above ends up
containing no statement. Also makes usage of these macro consistent
(some already have a semi colon, some others don't).
Fixes Ticket #2603
Split long lines, reindent code, add missing spaces between operators,
remove possibly confusing comment from av_opencl_buffer_read_image()
doxy, and use designated initializers for openclutils_class.