HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
cl_va_api_media_sharing_intel.h
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright (c) 2008-2020 The Khronos Group Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  ******************************************************************************/
16 
17 #ifndef __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
18 #define __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H
19 
20 #include <CL/cl.h>
21 #include <CL/cl_platform.h>
22 #include <va/va.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
28 /***************************************************************
29 * cl_intel_sharing_format_query_va_api
30 ***************************************************************/
31 #define cl_intel_sharing_format_query_va_api 1
32 
33 /* when cl_intel_va_api_media_sharing is supported */
34 
37  cl_context context,
39  cl_mem_object_type image_type,
40  cl_uint plane,
41  cl_uint num_entries,
42  VAImageFormat* va_api_formats,
43  cl_uint* num_surface_formats) ;
44 
45 typedef cl_int (CL_API_CALL *
47  cl_context context,
49  cl_mem_object_type image_type,
50  cl_uint plane,
51  cl_uint num_entries,
52  VAImageFormat* va_api_formats,
53  cl_uint* num_surface_formats) ;
54 
55 /******************************************
56 * cl_intel_va_api_media_sharing extension *
57 *******************************************/
58 
59 #define cl_intel_va_api_media_sharing 1
60 
61 /* error codes */
62 #define CL_INVALID_VA_API_MEDIA_ADAPTER_INTEL -1098
63 #define CL_INVALID_VA_API_MEDIA_SURFACE_INTEL -1099
64 #define CL_VA_API_MEDIA_SURFACE_ALREADY_ACQUIRED_INTEL -1100
65 #define CL_VA_API_MEDIA_SURFACE_NOT_ACQUIRED_INTEL -1101
66 
67 /* cl_va_api_device_source_intel */
68 #define CL_VA_API_DISPLAY_INTEL 0x4094
69 
70 /* cl_va_api_device_set_intel */
71 #define CL_PREFERRED_DEVICES_FOR_VA_API_INTEL 0x4095
72 #define CL_ALL_DEVICES_FOR_VA_API_INTEL 0x4096
73 
74 /* cl_context_info */
75 #define CL_CONTEXT_VA_API_DISPLAY_INTEL 0x4097
76 
77 /* cl_mem_info */
78 #define CL_MEM_VA_API_MEDIA_SURFACE_INTEL 0x4098
79 
80 /* cl_image_info */
81 #define CL_IMAGE_VA_API_PLANE_INTEL 0x4099
82 
83 /* cl_command_type */
84 #define CL_COMMAND_ACQUIRE_VA_API_MEDIA_SURFACES_INTEL 0x409A
85 #define CL_COMMAND_RELEASE_VA_API_MEDIA_SURFACES_INTEL 0x409B
86 
89 
92  cl_platform_id platform,
93  cl_va_api_device_source_intel media_adapter_type,
94  void* media_adapter,
95  cl_va_api_device_set_intel media_adapter_set,
96  cl_uint num_entries,
97  cl_device_id* devices,
98  cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
99 
101  cl_platform_id platform,
102  cl_va_api_device_source_intel media_adapter_type,
103  void* media_adapter,
104  cl_va_api_device_set_intel media_adapter_set,
105  cl_uint num_entries,
106  cl_device_id* devices,
107  cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_2;
108 
111  cl_context context,
112  cl_mem_flags flags,
113  VASurfaceID* surface,
114  cl_uint plane,
115  cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
116 
118  cl_context context,
120  VASurfaceID* surface,
121  cl_uint plane,
122  cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
123 
126  cl_command_queue command_queue,
127  cl_uint num_objects,
128  const cl_mem* mem_objects,
129  cl_uint num_events_in_wait_list,
130  const cl_event* event_wait_list,
132 
134  cl_command_queue command_queue,
135  cl_uint num_objects,
136  const cl_mem* mem_objects,
137  cl_uint num_events_in_wait_list,
138  const cl_event* event_wait_list,
139  cl_event* event) CL_API_SUFFIX__VERSION_1_2;
140 
143  cl_command_queue command_queue,
144  cl_uint num_objects,
145  const cl_mem* mem_objects,
146  cl_uint num_events_in_wait_list,
147  const cl_event* event_wait_list,
149 
151  cl_command_queue command_queue,
152  cl_uint num_objects,
153  const cl_mem* mem_objects,
154  cl_uint num_events_in_wait_list,
155  const cl_event* event_wait_list,
156  cl_event* event) CL_API_SUFFIX__VERSION_1_2;
157 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif /* __OPENCL_CL_VA_API_MEDIA_SHARING_INTEL_H */
163 
struct _cl_device_id * cl_device_id
Definition: cl.h:30
uint32_t cl_uint
Definition: cl_platform.h:261
cl_int(CL_API_CALL * clGetSupportedVA_APIMediaSurfaceFormatsINTEL_fn)(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint plane, cl_uint num_entries, VAImageFormat *va_api_formats, cl_uint *num_surface_formats)
cl_mem(CL_API_CALL * clCreateFromVA_APIMediaSurfaceINTEL_fn)(cl_context context, cl_mem_flags flags, VASurfaceID *surface, cl_uint plane, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2
GLbitfield flags
Definition: glcorearb.h:1596
struct _cl_context * cl_context
Definition: cl.h:31
cl_uint cl_mem_object_type
Definition: cl.h:70
cl_uint cl_va_api_device_source_intel
cl_int(CL_API_CALL * clEnqueueReleaseVA_APIMediaSurfacesINTEL_fn)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_2
int32_t cl_int
Definition: cl_platform.h:260
CL_API_ENTRY cl_int CL_API_CALL clEnqueueAcquireVA_APIMediaSurfacesINTEL(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_2
cl_int(CL_API_CALL * clGetDeviceIDsFromVA_APIMediaAdapterINTEL_fn)(cl_platform_id platform, cl_va_api_device_source_intel media_adapter_type, void *media_adapter, cl_va_api_device_set_intel media_adapter_set, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2
#define CL_API_SUFFIX__VERSION_1_2
Definition: cl_platform.h:69
struct _cl_platform_id * cl_platform_id
Definition: cl.h:29
struct _cl_event * event
Definition: glcorearb.h:2961
#define CL_API_ENTRY
Definition: cl_platform.h:38
struct _cl_mem * cl_mem
Definition: cl.h:33
CL_API_ENTRY cl_mem CL_API_CALL clCreateFromVA_APIMediaSurfaceINTEL(cl_context context, cl_mem_flags flags, VASurfaceID *surface, cl_uint plane, cl_int *errcode_ret) CL_API_SUFFIX__VERSION_1_2
struct _cl_event * cl_event
Definition: cl.h:36
struct _cl_command_queue * cl_command_queue
Definition: cl.h:32
CL_API_ENTRY cl_int CL_API_CALL clGetSupportedVA_APIMediaSurfaceFormatsINTEL(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint plane, cl_uint num_entries, VAImageFormat *va_api_formats, cl_uint *num_surface_formats)
CL_API_ENTRY cl_int CL_API_CALL clGetDeviceIDsFromVA_APIMediaAdapterINTEL(cl_platform_id platform, cl_va_api_device_source_intel media_adapter_type, void *media_adapter, cl_va_api_device_set_intel media_adapter_set, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices) CL_API_SUFFIX__VERSION_1_2
#define CL_API_CALL
Definition: cl_platform.h:41
cl_int(CL_API_CALL * clEnqueueAcquireVA_APIMediaSurfacesINTEL_fn)(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_2
CL_API_ENTRY cl_int CL_API_CALL clEnqueueReleaseVA_APIMediaSurfacesINTEL(cl_command_queue command_queue, cl_uint num_objects, const cl_mem *mem_objects, cl_uint num_events_in_wait_list, const cl_event *event_wait_list, cl_event *event) CL_API_SUFFIX__VERSION_1_2
cl_bitfield cl_mem_flags
Definition: cl.h:66
cl_uint cl_va_api_device_set_intel