1 /**************************************************************************
2 *
3 * Copyright 2010 Thomas Balling Sørensen & Orasanu Lucian.
4 * Copyright 2014 Advanced Micro Devices, Inc.
5 * All Rights Reserved.
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining a
8 * copy of this software and associated documentation files (the
9 * "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sub license, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice (including the
16 * next paragraph) shall be included in all copies or substantial portions
17 * of the Software.
18 *
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22 * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR
23 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 *
27 **************************************************************************/
28
29 #ifndef VA_PRIVATE_H
30 #define VA_PRIVATE_H
31
32 #include <assert.h>
33
34 #include <va/va.h>
35 #include <va/va_backend.h>
36 #include <va/va_backend_vpp.h>
37 #include <va/va_drmcommon.h>
38
39 #include "pipe/p_video_enums.h"
40 #include "pipe/p_video_codec.h"
41 #include "pipe/p_video_state.h"
42
43 #include "vl/vl_compositor.h"
44 #include "vl/vl_csc.h"
45
46 #include "util/u_dynarray.h"
47 #include "os/os_thread.h"
48
49 #ifndef VA_RT_FORMAT_YUV420_10
50 #define VA_RT_FORMAT_YUV420_10 VA_RT_FORMAT_YUV420_10BPP
51 #endif
52
53 #define VL_VA_DRIVER(ctx) ((vlVaDriver *)ctx->pDriverData)
54 #define VL_VA_PSCREEN(ctx) (VL_VA_DRIVER(ctx)->vscreen->pscreen)
55
56 #define VL_VA_MAX_IMAGE_FORMATS 12
57 #define VL_VA_ENC_GOP_COEFF 16
58
59 #define UINT_TO_PTR(x) ((void*)(uintptr_t)(x))
60 #define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x)))
61
62 #define SOI 2
63 #define DQT (4 + 4 * 65)
64 #define DHT (4 + 2 * 29 + 2 * 179)
65 #define DRI 6
66 #define SOF (10 + 255 * 3)
67 #define SOS (8 + 4 * 2)
68 #define MAX_MJPEG_SLICE_HEADER_SIZE (SOI + DQT + DHT + DRI + SOF + SOS)
69
70 static inline enum pipe_video_chroma_format
ChromaToPipe(int format)71 ChromaToPipe(int format)
72 {
73 switch (format) {
74 case VA_RT_FORMAT_YUV420:
75 case VA_RT_FORMAT_YUV420_10BPP:
76 return PIPE_VIDEO_CHROMA_FORMAT_420;
77 case VA_RT_FORMAT_YUV422:
78 return PIPE_VIDEO_CHROMA_FORMAT_422;
79 case VA_RT_FORMAT_YUV444:
80 return PIPE_VIDEO_CHROMA_FORMAT_444;
81 default:
82 return PIPE_VIDEO_CHROMA_FORMAT_NONE;
83 }
84 }
85
86 static inline enum pipe_format
VaFourccToPipeFormat(unsigned format)87 VaFourccToPipeFormat(unsigned format)
88 {
89 switch(format) {
90 case VA_FOURCC('N','V','1','2'):
91 return PIPE_FORMAT_NV12;
92 case VA_FOURCC('P','0','1','0'):
93 return PIPE_FORMAT_P010;
94 case VA_FOURCC('P','0','1','6'):
95 return PIPE_FORMAT_P016;
96 case VA_FOURCC('I','4','2','0'):
97 return PIPE_FORMAT_IYUV;
98 case VA_FOURCC('Y','V','1','2'):
99 return PIPE_FORMAT_YV12;
100 case VA_FOURCC('Y','U','Y','V'):
101 case VA_FOURCC('Y','U','Y','2'):
102 return PIPE_FORMAT_YUYV;
103 case VA_FOURCC('U','Y','V','Y'):
104 return PIPE_FORMAT_UYVY;
105 case VA_FOURCC('B','G','R','A'):
106 return PIPE_FORMAT_B8G8R8A8_UNORM;
107 case VA_FOURCC('R','G','B','A'):
108 return PIPE_FORMAT_R8G8B8A8_UNORM;
109 case VA_FOURCC('B','G','R','X'):
110 return PIPE_FORMAT_B8G8R8X8_UNORM;
111 case VA_FOURCC('R','G','B','X'):
112 return PIPE_FORMAT_R8G8B8X8_UNORM;
113 default:
114 assert(0);
115 return PIPE_FORMAT_NONE;
116 }
117 }
118
119 static inline unsigned
PipeFormatToVaFourcc(enum pipe_format p_format)120 PipeFormatToVaFourcc(enum pipe_format p_format)
121 {
122 switch (p_format) {
123 case PIPE_FORMAT_NV12:
124 return VA_FOURCC('N','V','1','2');
125 case PIPE_FORMAT_P010:
126 return VA_FOURCC('P','0','1','0');
127 case PIPE_FORMAT_P016:
128 return VA_FOURCC('P','0','1','6');
129 case PIPE_FORMAT_IYUV:
130 return VA_FOURCC('I','4','2','0');
131 case PIPE_FORMAT_YV12:
132 return VA_FOURCC('Y','V','1','2');
133 case PIPE_FORMAT_UYVY:
134 return VA_FOURCC('U','Y','V','Y');
135 case PIPE_FORMAT_YUYV:
136 return VA_FOURCC('Y','U','Y','V');
137 case PIPE_FORMAT_B8G8R8A8_UNORM:
138 return VA_FOURCC('B','G','R','A');
139 case PIPE_FORMAT_R8G8B8A8_UNORM:
140 return VA_FOURCC('R','G','B','A');
141 case PIPE_FORMAT_B8G8R8X8_UNORM:
142 return VA_FOURCC('B','G','R','X');
143 case PIPE_FORMAT_R8G8B8X8_UNORM:
144 return VA_FOURCC('R','G','B','X');
145 default:
146 assert(0);
147 return -1;
148 }
149 }
150
151 static inline VAProfile
PipeToProfile(enum pipe_video_profile profile)152 PipeToProfile(enum pipe_video_profile profile)
153 {
154 switch (profile) {
155 case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE:
156 return VAProfileMPEG2Simple;
157 case PIPE_VIDEO_PROFILE_MPEG2_MAIN:
158 return VAProfileMPEG2Main;
159 case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE:
160 return VAProfileMPEG4Simple;
161 case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE:
162 return VAProfileMPEG4AdvancedSimple;
163 case PIPE_VIDEO_PROFILE_VC1_SIMPLE:
164 return VAProfileVC1Simple;
165 case PIPE_VIDEO_PROFILE_VC1_MAIN:
166 return VAProfileVC1Main;
167 case PIPE_VIDEO_PROFILE_VC1_ADVANCED:
168 return VAProfileVC1Advanced;
169 case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
170 return VAProfileH264ConstrainedBaseline;
171 case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
172 return VAProfileH264Main;
173 case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
174 return VAProfileH264High;
175 case PIPE_VIDEO_PROFILE_HEVC_MAIN:
176 return VAProfileHEVCMain;
177 case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
178 return VAProfileHEVCMain10;
179 case PIPE_VIDEO_PROFILE_JPEG_BASELINE:
180 return VAProfileJPEGBaseline;
181 case PIPE_VIDEO_PROFILE_VP9_PROFILE0:
182 return VAProfileVP9Profile0;
183 case PIPE_VIDEO_PROFILE_VP9_PROFILE2:
184 return VAProfileVP9Profile2;
185 case PIPE_VIDEO_PROFILE_AV1_MAIN:
186 return VAProfileAV1Profile0;
187 case PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED:
188 case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10:
189 case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422:
190 case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444:
191 case PIPE_VIDEO_PROFILE_MPEG4_AVC_CONSTRAINED_BASELINE:
192 case PIPE_VIDEO_PROFILE_HEVC_MAIN_12:
193 case PIPE_VIDEO_PROFILE_HEVC_MAIN_STILL:
194 case PIPE_VIDEO_PROFILE_HEVC_MAIN_444:
195 case PIPE_VIDEO_PROFILE_UNKNOWN:
196 return VAProfileNone;
197 default:
198 assert(0);
199 return -1;
200 }
201 }
202
203 static inline enum pipe_video_profile
ProfileToPipe(VAProfile profile)204 ProfileToPipe(VAProfile profile)
205 {
206 switch (profile) {
207 case VAProfileMPEG2Simple:
208 return PIPE_VIDEO_PROFILE_MPEG2_SIMPLE;
209 case VAProfileMPEG2Main:
210 return PIPE_VIDEO_PROFILE_MPEG2_MAIN;
211 case VAProfileMPEG4Simple:
212 return PIPE_VIDEO_PROFILE_MPEG4_SIMPLE;
213 case VAProfileMPEG4AdvancedSimple:
214 return PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE;
215 case VAProfileVC1Simple:
216 return PIPE_VIDEO_PROFILE_VC1_SIMPLE;
217 case VAProfileVC1Main:
218 return PIPE_VIDEO_PROFILE_VC1_MAIN;
219 case VAProfileVC1Advanced:
220 return PIPE_VIDEO_PROFILE_VC1_ADVANCED;
221 case VAProfileH264ConstrainedBaseline:
222 return PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE;
223 case VAProfileH264Main:
224 return PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN;
225 case VAProfileH264High:
226 return PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH;
227 case VAProfileHEVCMain:
228 return PIPE_VIDEO_PROFILE_HEVC_MAIN;
229 case VAProfileHEVCMain10:
230 return PIPE_VIDEO_PROFILE_HEVC_MAIN_10;
231 case VAProfileJPEGBaseline:
232 return PIPE_VIDEO_PROFILE_JPEG_BASELINE;
233 case VAProfileVP9Profile0:
234 return PIPE_VIDEO_PROFILE_VP9_PROFILE0;
235 case VAProfileVP9Profile2:
236 return PIPE_VIDEO_PROFILE_VP9_PROFILE2;
237 case VAProfileAV1Profile0:
238 return PIPE_VIDEO_PROFILE_AV1_MAIN;
239 case VAProfileNone:
240 return PIPE_VIDEO_PROFILE_UNKNOWN;
241 default:
242 return PIPE_VIDEO_PROFILE_UNKNOWN;
243 }
244 }
245
246 typedef struct {
247 struct vl_screen *vscreen;
248 struct pipe_context *pipe;
249 struct handle_table *htab;
250 struct vl_compositor compositor;
251 struct vl_compositor_state cstate;
252 vl_csc_matrix csc;
253 mtx_t mutex;
254 char vendor_string[256];
255 } vlVaDriver;
256
257 typedef struct {
258 VAImage *image;
259
260 struct u_rect src_rect;
261 struct u_rect dst_rect;
262
263 struct pipe_sampler_view *sampler;
264 } vlVaSubpicture;
265
266 typedef struct {
267 VABufferType type;
268 unsigned int size;
269 unsigned int num_elements;
270 void *data;
271 struct {
272 struct pipe_resource *resource;
273 struct pipe_transfer *transfer;
274 } derived_surface;
275 unsigned int export_refcount;
276 VABufferInfo export_state;
277 unsigned int coded_size;
278 struct pipe_video_buffer *derived_image_buffer;
279 } vlVaBuffer;
280
281 typedef struct {
282 struct pipe_video_codec templat, *decoder;
283 struct pipe_video_buffer *target;
284 union {
285 struct pipe_picture_desc base;
286 struct pipe_mpeg12_picture_desc mpeg12;
287 struct pipe_mpeg4_picture_desc mpeg4;
288 struct pipe_vc1_picture_desc vc1;
289 struct pipe_h264_picture_desc h264;
290 struct pipe_h265_picture_desc h265;
291 struct pipe_mjpeg_picture_desc mjpeg;
292 struct pipe_vp9_picture_desc vp9;
293 struct pipe_av1_picture_desc av1;
294 struct pipe_h264_enc_picture_desc h264enc;
295 struct pipe_h265_enc_picture_desc h265enc;
296 struct pipe_vpp_desc vidproc;
297 } desc;
298
299 struct {
300 unsigned long long int frame_num;
301 unsigned int start_code_size;
302 unsigned int vti_bits;
303 unsigned int quant_scale;
304 VAPictureParameterBufferMPEG4 pps;
305 uint8_t start_code[32];
306 } mpeg4;
307
308 struct {
309 unsigned sampling_factor;
310 uint8_t slice_header[MAX_MJPEG_SLICE_HEADER_SIZE];
311 unsigned int slice_header_size;
312 } mjpeg;
313
314 struct h264_private h264;
315 struct vl_deint_filter *deint;
316 vlVaBuffer *coded_buf;
317 int target_id;
318 bool first_single_submitted;
319 int gop_coeff;
320 bool needs_begin_frame;
321 bool vpp_needs_flush_on_endpic;
322 void *blit_cs;
323 int packed_header_type;
324 } vlVaContext;
325
326 typedef struct {
327 enum pipe_video_profile profile;
328 enum pipe_video_entrypoint entrypoint;
329 enum pipe_h2645_enc_rate_control_method rc;
330 unsigned int rt_format;
331 } vlVaConfig;
332
333 typedef struct {
334 struct pipe_video_buffer templat, *buffer;
335 struct util_dynarray subpics; /* vlVaSubpicture */
336 VAContextID ctx;
337 vlVaBuffer *coded_buf;
338 void *feedback;
339 unsigned int frame_num_cnt;
340 bool force_flushed;
341 struct pipe_video_buffer *obsolete_buf;
342 enum pipe_format encoder_format;
343 } vlVaSurface;
344
345 // Public functions:
346 VAStatus VA_DRIVER_INIT_FUNC(VADriverContextP ctx);
347
348 // vtable functions:
349 VAStatus vlVaTerminate(VADriverContextP ctx);
350 VAStatus vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list,int *num_profiles);
351 VAStatus vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
352 VAEntrypoint *entrypoint_list, int *num_entrypoints);
353 VAStatus vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoint,
354 VAConfigAttrib *attrib_list, int num_attribs);
355 VAStatus vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoint,
356 VAConfigAttrib *attrib_list, int num_attribs, VAConfigID *config_id);
357 VAStatus vlVaDestroyConfig(VADriverContextP ctx, VAConfigID config_id);
358 VAStatus vlVaQueryConfigAttributes(VADriverContextP ctx, VAConfigID config_id, VAProfile *profile,
359 VAEntrypoint *entrypoint, VAConfigAttrib *attrib_list, int *num_attribs);
360 VAStatus vlVaCreateSurfaces(VADriverContextP ctx, int width, int height, int format,
361 int num_surfaces, VASurfaceID *surfaces);
362 VAStatus vlVaDestroySurfaces(VADriverContextP ctx, VASurfaceID *surface_list, int num_surfaces);
363 VAStatus vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width, int picture_height,
364 int flag, VASurfaceID *render_targets, int num_render_targets, VAContextID *context);
365 VAStatus vlVaDestroyContext(VADriverContextP ctx, VAContextID context);
366 VAStatus vlVaCreateBuffer(VADriverContextP ctx, VAContextID context, VABufferType type, unsigned int size,
367 unsigned int num_elements, void *data, VABufferID *buf_id);
368 VAStatus vlVaBufferSetNumElements(VADriverContextP ctx, VABufferID buf_id, unsigned int num_elements);
369 VAStatus vlVaMapBuffer(VADriverContextP ctx, VABufferID buf_id, void **pbuf);
370 VAStatus vlVaUnmapBuffer(VADriverContextP ctx, VABufferID buf_id);
371 VAStatus vlVaDestroyBuffer(VADriverContextP ctx, VABufferID buffer_id);
372 VAStatus vlVaBeginPicture(VADriverContextP ctx, VAContextID context, VASurfaceID render_target);
373 VAStatus vlVaRenderPicture(VADriverContextP ctx, VAContextID context, VABufferID *buffers, int num_buffers);
374 VAStatus vlVaEndPicture(VADriverContextP ctx, VAContextID context);
375 VAStatus vlVaSyncSurface(VADriverContextP ctx, VASurfaceID render_target);
376 VAStatus vlVaQuerySurfaceStatus(VADriverContextP ctx, VASurfaceID render_target, VASurfaceStatus *status);
377 VAStatus vlVaQuerySurfaceError(VADriverContextP ctx, VASurfaceID render_target,
378 VAStatus error_status, void **error_info);
379 VAStatus vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface, void* draw, short srcx, short srcy,
380 unsigned short srcw, unsigned short srch, short destx, short desty, unsigned short destw,
381 unsigned short desth, VARectangle *cliprects, unsigned int number_cliprects,
382 unsigned int flags);
383 VAStatus vlVaQueryImageFormats(VADriverContextP ctx, VAImageFormat *format_list, int *num_formats);
384 VAStatus vlVaQuerySubpictureFormats(VADriverContextP ctx, VAImageFormat *format_list,
385 unsigned int *flags, unsigned int *num_formats);
386 VAStatus vlVaCreateImage(VADriverContextP ctx, VAImageFormat *format, int width, int height, VAImage *image);
387 VAStatus vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image);
388 VAStatus vlVaDestroyImage(VADriverContextP ctx, VAImageID image);
389 VAStatus vlVaSetImagePalette(VADriverContextP ctx, VAImageID image, unsigned char *palette);
390 VAStatus vlVaGetImage(VADriverContextP ctx, VASurfaceID surface, int x, int y,
391 unsigned int width, unsigned int height, VAImageID image);
392 VAStatus vlVaPutImage(VADriverContextP ctx, VASurfaceID surface, VAImageID image, int src_x, int src_y,
393 unsigned int src_width, unsigned int src_height, int dest_x, int dest_y,
394 unsigned int dest_width, unsigned int dest_height);
395 VAStatus vlVaQuerySubpictureFormats(VADriverContextP ctx, VAImageFormat *format_list,
396 unsigned int *flags, unsigned int *num_formats);
397 VAStatus vlVaCreateSubpicture(VADriverContextP ctx, VAImageID image, VASubpictureID *subpicture);
398 VAStatus vlVaDestroySubpicture(VADriverContextP ctx, VASubpictureID subpicture);
399 VAStatus vlVaSubpictureImage(VADriverContextP ctx, VASubpictureID subpicture, VAImageID image);
400 VAStatus vlVaSetSubpictureChromakey(VADriverContextP ctx, VASubpictureID subpicture,
401 unsigned int chromakey_min, unsigned int chromakey_max,
402 unsigned int chromakey_mask);
403 VAStatus vlVaSetSubpictureGlobalAlpha(VADriverContextP ctx, VASubpictureID subpicture, float global_alpha);
404 VAStatus vlVaAssociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture, VASurfaceID *target_surfaces,
405 int num_surfaces, short src_x, short src_y,
406 unsigned short src_width, unsigned short src_height,
407 short dest_x, short dest_y, unsigned short dest_width, unsigned short dest_height,
408 unsigned int flags);
409 VAStatus vlVaDeassociateSubpicture(VADriverContextP ctx, VASubpictureID subpicture,
410 VASurfaceID *target_surfaces, int num_surfaces);
411 VAStatus vlVaQueryDisplayAttributes(VADriverContextP ctx, VADisplayAttribute *attr_list, int *num_attributes);
412 VAStatus vlVaGetDisplayAttributes(VADriverContextP ctx, VADisplayAttribute *attr_list, int num_attributes);
413 VAStatus vlVaSetDisplayAttributes(VADriverContextP ctx, VADisplayAttribute *attr_list, int num_attributes);
414 VAStatus vlVaBufferInfo(VADriverContextP ctx, VABufferID buf_id, VABufferType *type,
415 unsigned int *size, unsigned int *num_elements);
416 VAStatus vlVaLockSurface(VADriverContextP ctx, VASurfaceID surface, unsigned int *fourcc,
417 unsigned int *luma_stride, unsigned int *chroma_u_stride, unsigned int *chroma_v_stride,
418 unsigned int *luma_offset, unsigned int *chroma_u_offset, unsigned int *chroma_v_offset,
419 unsigned int *buffer_name, void **buffer);
420 VAStatus vlVaUnlockSurface(VADriverContextP ctx, VASurfaceID surface);
421 VAStatus vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format, unsigned int width, unsigned int height,
422 VASurfaceID *surfaces, unsigned int num_surfaces, VASurfaceAttrib *attrib_list,
423 unsigned int num_attribs);
424 VAStatus vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config, VASurfaceAttrib *attrib_list,
425 unsigned int *num_attribs);
426
427 VAStatus vlVaAcquireBufferHandle(VADriverContextP ctx, VABufferID buf_id, VABufferInfo *out_buf_info);
428 VAStatus vlVaReleaseBufferHandle(VADriverContextP ctx, VABufferID buf_id);
429 VAStatus vlVaExportSurfaceHandle(VADriverContextP ctx, VASurfaceID surface_id, uint32_t mem_type, uint32_t flags, void *descriptor);
430
431 VAStatus vlVaQueryVideoProcFilters(VADriverContextP ctx, VAContextID context, VAProcFilterType *filters,
432 unsigned int *num_filters);
433 VAStatus vlVaQueryVideoProcFilterCaps(VADriverContextP ctx, VAContextID context, VAProcFilterType type,
434 void *filter_caps, unsigned int *num_filter_caps);
435 VAStatus vlVaQueryVideoProcPipelineCaps(VADriverContextP ctx, VAContextID context, VABufferID *filters,
436 unsigned int num_filters, VAProcPipelineCaps *pipeline_cap);
437
438 // internal functions
439 VAStatus vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
440 VAStatus vlVaHandleSurfaceAllocate(vlVaDriver *drv, vlVaSurface *surface, struct pipe_video_buffer *templat,
441 const uint64_t *modifiers, unsigned int modifiers_count);
442 void vlVaGetReferenceFrame(vlVaDriver *drv, VASurfaceID surface_id, struct pipe_video_buffer **ref_frame);
443 void vlVaHandlePictureParameterBufferMPEG12(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
444 void vlVaHandleIQMatrixBufferMPEG12(vlVaContext *context, vlVaBuffer *buf);
445 void vlVaHandleSliceParameterBufferMPEG12(vlVaContext *context, vlVaBuffer *buf);
446 void vlVaHandlePictureParameterBufferH264(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
447 void vlVaHandleIQMatrixBufferH264(vlVaContext *context, vlVaBuffer *buf);
448 void vlVaHandleSliceParameterBufferH264(vlVaContext *context, vlVaBuffer *buf);
449 void vlVaHandlePictureParameterBufferVC1(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
450 void vlVaHandleSliceParameterBufferVC1(vlVaContext *context, vlVaBuffer *buf);
451 void vlVaHandlePictureParameterBufferMPEG4(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
452 void vlVaHandleIQMatrixBufferMPEG4(vlVaContext *context, vlVaBuffer *buf);
453 void vlVaHandleSliceParameterBufferMPEG4(vlVaContext *context, vlVaBuffer *buf);
454 void vlVaDecoderFixMPEG4Startcode(vlVaContext *context);
455 void vlVaGetJpegSliceHeader(vlVaContext *context);
456 void vlVaHandlePictureParameterBufferHEVC(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
457 void vlVaHandleIQMatrixBufferHEVC(vlVaContext *context, vlVaBuffer *buf);
458 void vlVaHandleSliceParameterBufferHEVC(vlVaContext *context, vlVaBuffer *buf);
459 void vlVaHandlePictureParameterBufferMJPEG(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
460 void vlVaHandleIQMatrixBufferMJPEG(vlVaContext *context, vlVaBuffer *buf);
461 void vlVaHandleHuffmanTableBufferType(vlVaContext *context, vlVaBuffer *buf);
462 void vlVaHandleSliceParameterBufferMJPEG(vlVaContext *context, vlVaBuffer *buf);
463 void vlVaHandlePictureParameterBufferVP9(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
464 void vlVaHandleSliceParameterBufferVP9(vlVaContext *context, vlVaBuffer *buf);
465 void vlVaDecoderVP9BitstreamHeader(vlVaContext *context, vlVaBuffer *buf);
466 void vlVaHandlePictureParameterBufferAV1(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
467 void vlVaHandleSliceParameterBufferAV1(vlVaContext *context, vlVaBuffer *buf, unsigned int num);
468 void getEncParamPresetH264(vlVaContext *context);
469 void getEncParamPresetH265(vlVaContext *context);
470 VAStatus vlVaHandleVAEncPictureParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
471 VAStatus vlVaHandleVAEncSliceParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
472 VAStatus vlVaHandleVAEncSequenceParameterBufferTypeH264(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
473 VAStatus vlVaHandleVAEncMiscParameterTypeRateControlH264(vlVaContext *context, VAEncMiscParameterBuffer *buf);
474 VAStatus vlVaHandleVAEncMiscParameterTypeFrameRateH264(vlVaContext *context, VAEncMiscParameterBuffer *buf);
475 VAStatus vlVaHandleVAEncMiscParameterTypeTemporalLayerH264(vlVaContext *context, VAEncMiscParameterBuffer *buf);
476 VAStatus vlVaHandleVAEncPictureParameterBufferTypeHEVC(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
477 VAStatus vlVaHandleVAEncSliceParameterBufferTypeHEVC(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
478 VAStatus vlVaHandleVAEncSequenceParameterBufferTypeHEVC(vlVaDriver *drv, vlVaContext *context, vlVaBuffer *buf);
479 VAStatus vlVaHandleVAEncMiscParameterTypeRateControlHEVC(vlVaContext *context, VAEncMiscParameterBuffer *buf);
480 VAStatus vlVaHandleVAEncMiscParameterTypeFrameRateHEVC(vlVaContext *context, VAEncMiscParameterBuffer *buf);
481 VAStatus vlVaHandleVAEncPackedHeaderDataBufferTypeHEVC(vlVaContext *context, vlVaBuffer *buf);
482 #endif //VA_PRIVATE_H
483