summaryrefslogtreecommitdiff
path: root/libavutil/opencl.h
diff options
context:
space:
mode:
authorManeesh Gupta <maneesh.gupta@amd.com>2015-04-28 13:02:38 +0530
committerMichael Niedermayer <michaelni@gmx.at>2015-04-28 12:28:53 +0200
commit91305c60261c77ad4a071062a21136fc0b6c5ab2 (patch)
tree2b56c69049a0ec79a2450b73216a727598c300bc /libavutil/opencl.h
parentcf234552b83a9503ff96572de2658b921b8842eb (diff)
OpenCL: Fix ABI incompatibility issues
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>
Diffstat (limited to 'libavutil/opencl.h')
-rw-r--r--libavutil/opencl.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/libavutil/opencl.h b/libavutil/opencl.h
index 0b7b8d4764..e423e5588a 100644
--- a/libavutil/opencl.h
+++ b/libavutil/opencl.h
@@ -44,21 +44,15 @@
#define AV_OPENCL_KERNEL( ... )# __VA_ARGS__
-#define AV_OPENCL_MAX_KERNEL_NAME_SIZE 150
-
-#define AV_OPENCL_MAX_DEVICE_NAME_SIZE 100
-
-#define AV_OPENCL_MAX_PLATFORM_NAME_SIZE 100
-
typedef struct {
int device_type;
- char device_name[AV_OPENCL_MAX_DEVICE_NAME_SIZE];
+ char *device_name;
cl_device_id device_id;
} AVOpenCLDeviceNode;
typedef struct {
cl_platform_id platform_id;
- char platform_name[AV_OPENCL_MAX_PLATFORM_NAME_SIZE];
+ char *platform_name;
int device_num;
AVOpenCLDeviceNode **device_node;
} AVOpenCLPlatformNode;