1 /**************************************************************************
3 * Copyright 2010 Thomas Balling Sørensen & Orasanu Lucian.
4 * Copyright 2014 Advanced Micro Devices, Inc.
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:
15 * The above copyright notice and this permission notice (including the
16 * next paragraph) shall be included in all copies or substantial portions
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.
27 **************************************************************************/
35 #include <va/va_backend.h>
36 #include <va/va_backend_vpp.h>
37 #include <va/va_drmcommon.h>
39 #include "pipe/p_video_enums.h"
40 #include "pipe/p_video_codec.h"
41 #include "pipe/p_video_state.h"
43 #include "vl/vl_compositor.h"
44 #include "vl/vl_csc.h"
46 #include "util/u_dynarray.h"
47 #include "os/os_thread.h"
49 #define VL_VA_DRIVER(ctx) ((vlVaDriver *)ctx->pDriverData)
50 #define VL_VA_PSCREEN(ctx) (VL_VA_DRIVER(ctx)->vscreen->pscreen)
52 #define VL_VA_MAX_IMAGE_FORMATS 11
53 #define VL_VA_ENC_GOP_COEFF 16
55 #define UINT_TO_PTR(x) ((void*)(uintptr_t)(x))
56 #define PTR_TO_UINT(x) ((unsigned)((intptr_t)(x)))
59 #define DQT (4 + 4 * 65)
60 #define DHT (4 + 2 * 29 + 2 * 179)
62 #define SOF (10 + 255 * 3)
63 #define SOS (8 + 4 * 2)
64 #define MAX_MJPEG_SLICE_HEADER_SIZE (SOI + DQT + DHT + DRI + SOF + SOS)
66 static inline unsigned handle_hash(void *key
)
68 return PTR_TO_UINT(key
);
71 static inline int handle_compare(void *key1
, void *key2
)
73 return PTR_TO_UINT(key1
) != PTR_TO_UINT(key2
);
76 static inline enum pipe_video_chroma_format
77 ChromaToPipe(int format
)
80 case VA_RT_FORMAT_YUV420
:
81 case VA_RT_FORMAT_YUV420_10BPP
:
82 return PIPE_VIDEO_CHROMA_FORMAT_420
;
83 case VA_RT_FORMAT_YUV422
:
84 return PIPE_VIDEO_CHROMA_FORMAT_422
;
85 case VA_RT_FORMAT_YUV444
:
86 return PIPE_VIDEO_CHROMA_FORMAT_444
;
88 return PIPE_VIDEO_CHROMA_FORMAT_NONE
;
92 static inline enum pipe_format
93 VaFourccToPipeFormat(unsigned format
)
96 case VA_FOURCC('N','V','1','2'):
97 return PIPE_FORMAT_NV12
;
98 case VA_FOURCC('P','0','1','0'):
99 case VA_FOURCC('P','0','1','6'):
100 return PIPE_FORMAT_P016
;
101 case VA_FOURCC('I','4','2','0'):
102 return PIPE_FORMAT_IYUV
;
103 case VA_FOURCC('Y','V','1','2'):
104 return PIPE_FORMAT_YV12
;
105 case VA_FOURCC('Y','U','Y','V'):
106 return PIPE_FORMAT_YUYV
;
107 case VA_FOURCC('U','Y','V','Y'):
108 return PIPE_FORMAT_UYVY
;
109 case VA_FOURCC('B','G','R','A'):
110 return PIPE_FORMAT_B8G8R8A8_UNORM
;
111 case VA_FOURCC('R','G','B','A'):
112 return PIPE_FORMAT_R8G8B8A8_UNORM
;
113 case VA_FOURCC('B','G','R','X'):
114 return PIPE_FORMAT_B8G8R8X8_UNORM
;
115 case VA_FOURCC('R','G','B','X'):
116 return PIPE_FORMAT_R8G8B8X8_UNORM
;
119 return PIPE_FORMAT_NONE
;
123 static inline unsigned
124 PipeFormatToVaFourcc(enum pipe_format p_format
)
127 case PIPE_FORMAT_NV12
:
128 return VA_FOURCC('N','V','1','2');
129 case PIPE_FORMAT_P016
:
130 return VA_FOURCC('P','0','1','6');
131 case PIPE_FORMAT_IYUV
:
132 return VA_FOURCC('I','4','2','0');
133 case PIPE_FORMAT_YV12
:
134 return VA_FOURCC('Y','V','1','2');
135 case PIPE_FORMAT_UYVY
:
136 return VA_FOURCC('U','Y','V','Y');
137 case PIPE_FORMAT_YUYV
:
138 return VA_FOURCC('Y','U','Y','V');
139 case PIPE_FORMAT_B8G8R8A8_UNORM
:
140 return VA_FOURCC('B','G','R','A');
141 case PIPE_FORMAT_R8G8B8A8_UNORM
:
142 return VA_FOURCC('R','G','B','A');
143 case PIPE_FORMAT_B8G8R8X8_UNORM
:
144 return VA_FOURCC('B','G','R','X');
145 case PIPE_FORMAT_R8G8B8X8_UNORM
:
146 return VA_FOURCC('R','G','B','X');
153 static inline VAProfile
154 PipeToProfile(enum pipe_video_profile profile
)
157 case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE
:
158 return VAProfileMPEG2Simple
;
159 case PIPE_VIDEO_PROFILE_MPEG2_MAIN
:
160 return VAProfileMPEG2Main
;
161 case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE
:
162 return VAProfileMPEG4Simple
;
163 case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE
:
164 return VAProfileMPEG4AdvancedSimple
;
165 case PIPE_VIDEO_PROFILE_VC1_SIMPLE
:
166 return VAProfileVC1Simple
;
167 case PIPE_VIDEO_PROFILE_VC1_MAIN
:
168 return VAProfileVC1Main
;
169 case PIPE_VIDEO_PROFILE_VC1_ADVANCED
:
170 return VAProfileVC1Advanced
;
171 case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE
:
172 return VAProfileH264ConstrainedBaseline
;
173 case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN
:
174 return VAProfileH264Main
;
175 case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH
:
176 return VAProfileH264High
;
177 case PIPE_VIDEO_PROFILE_HEVC_MAIN
:
178 return VAProfileHEVCMain
;
179 case PIPE_VIDEO_PROFILE_HEVC_MAIN_10
:
180 return VAProfileHEVCMain10
;
181 case PIPE_VIDEO_PROFILE_JPEG_BASELINE
:
182 return VAProfileJPEGBaseline
;
183 case PIPE_VIDEO_PROFILE_VP9_PROFILE0
:
184 return VAProfileVP9Profile0
;
185 case PIPE_VIDEO_PROFILE_VP9_PROFILE2
:
186 return VAProfileVP9Profile2
;
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
;
203 static inline enum pipe_video_profile
204 ProfileToPipe(VAProfile 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
;
238 return PIPE_VIDEO_PROFILE_UNKNOWN
;
240 return PIPE_VIDEO_PROFILE_UNKNOWN
;
245 struct vl_screen
*vscreen
;
246 struct pipe_context
*pipe
;
247 struct handle_table
*htab
;
248 struct vl_compositor compositor
;
249 struct vl_compositor_state cstate
;
252 char vendor_string
[256];
258 struct u_rect src_rect
;
259 struct u_rect dst_rect
;
261 struct pipe_sampler_view
*sampler
;
267 unsigned int num_elements
;
270 struct pipe_resource
*resource
;
271 struct pipe_transfer
*transfer
;
273 unsigned int export_refcount
;
274 VABufferInfo export_state
;
275 unsigned int coded_size
;
279 struct pipe_video_codec templat
, *decoder
;
280 struct pipe_video_buffer
*target
;
282 struct pipe_picture_desc base
;
283 struct pipe_mpeg12_picture_desc mpeg12
;
284 struct pipe_mpeg4_picture_desc mpeg4
;
285 struct pipe_vc1_picture_desc vc1
;
286 struct pipe_h264_picture_desc h264
;
287 struct pipe_h265_picture_desc h265
;
288 struct pipe_mjpeg_picture_desc mjpeg
;
289 struct pipe_vp9_picture_desc vp9
;
290 struct pipe_h264_enc_picture_desc h264enc
;
291 struct pipe_h265_enc_picture_desc h265enc
;
295 unsigned long long int frame_num
;
296 unsigned int start_code_size
;
297 unsigned int vti_bits
;
298 unsigned int quant_scale
;
299 VAPictureParameterBufferMPEG4 pps
;
300 uint8_t start_code
[32];
304 unsigned sampling_factor
;
305 uint8_t slice_header
[MAX_MJPEG_SLICE_HEADER_SIZE
];
306 unsigned int slice_header_size
;
309 struct vl_deint_filter
*deint
;
310 vlVaBuffer
*coded_buf
;
312 bool first_single_submitted
;
314 bool needs_begin_frame
;
319 enum pipe_video_profile profile
;
320 enum pipe_video_entrypoint entrypoint
;
321 enum pipe_h264_enc_rate_control_method rc
;
322 unsigned int rt_format
;
326 struct pipe_video_buffer templat
, *buffer
;
327 struct util_dynarray subpics
; /* vlVaSubpicture */
329 vlVaBuffer
*coded_buf
;
331 unsigned int frame_num_cnt
;
336 VAStatus
VA_DRIVER_INIT_FUNC(VADriverContextP ctx
);
339 VAStatus
vlVaTerminate(VADriverContextP ctx
);
340 VAStatus
vlVaQueryConfigProfiles(VADriverContextP ctx
, VAProfile
*profile_list
,int *num_profiles
);
341 VAStatus
vlVaQueryConfigEntrypoints(VADriverContextP ctx
, VAProfile profile
,
342 VAEntrypoint
*entrypoint_list
, int *num_entrypoints
);
343 VAStatus
vlVaGetConfigAttributes(VADriverContextP ctx
, VAProfile profile
, VAEntrypoint entrypoint
,
344 VAConfigAttrib
*attrib_list
, int num_attribs
);
345 VAStatus
vlVaCreateConfig(VADriverContextP ctx
, VAProfile profile
, VAEntrypoint entrypoint
,
346 VAConfigAttrib
*attrib_list
, int num_attribs
, VAConfigID
*config_id
);
347 VAStatus
vlVaDestroyConfig(VADriverContextP ctx
, VAConfigID config_id
);
348 VAStatus
vlVaQueryConfigAttributes(VADriverContextP ctx
, VAConfigID config_id
, VAProfile
*profile
,
349 VAEntrypoint
*entrypoint
, VAConfigAttrib
*attrib_list
, int *num_attribs
);
350 VAStatus
vlVaCreateSurfaces(VADriverContextP ctx
, int width
, int height
, int format
,
351 int num_surfaces
, VASurfaceID
*surfaces
);
352 VAStatus
vlVaDestroySurfaces(VADriverContextP ctx
, VASurfaceID
*surface_list
, int num_surfaces
);
353 VAStatus
vlVaCreateContext(VADriverContextP ctx
, VAConfigID config_id
, int picture_width
, int picture_height
,
354 int flag
, VASurfaceID
*render_targets
, int num_render_targets
, VAContextID
*context
);
355 VAStatus
vlVaDestroyContext(VADriverContextP ctx
, VAContextID context
);
356 VAStatus
vlVaCreateBuffer(VADriverContextP ctx
, VAContextID context
, VABufferType type
, unsigned int size
,
357 unsigned int num_elements
, void *data
, VABufferID
*buf_id
);
358 VAStatus
vlVaBufferSetNumElements(VADriverContextP ctx
, VABufferID buf_id
, unsigned int num_elements
);
359 VAStatus
vlVaMapBuffer(VADriverContextP ctx
, VABufferID buf_id
, void **pbuf
);
360 VAStatus
vlVaUnmapBuffer(VADriverContextP ctx
, VABufferID buf_id
);
361 VAStatus
vlVaDestroyBuffer(VADriverContextP ctx
, VABufferID buffer_id
);
362 VAStatus
vlVaBeginPicture(VADriverContextP ctx
, VAContextID context
, VASurfaceID render_target
);
363 VAStatus
vlVaRenderPicture(VADriverContextP ctx
, VAContextID context
, VABufferID
*buffers
, int num_buffers
);
364 VAStatus
vlVaEndPicture(VADriverContextP ctx
, VAContextID context
);
365 VAStatus
vlVaSyncSurface(VADriverContextP ctx
, VASurfaceID render_target
);
366 VAStatus
vlVaQuerySurfaceStatus(VADriverContextP ctx
, VASurfaceID render_target
, VASurfaceStatus
*status
);
367 VAStatus
vlVaQuerySurfaceError(VADriverContextP ctx
, VASurfaceID render_target
,
368 VAStatus error_status
, void **error_info
);
369 VAStatus
vlVaPutSurface(VADriverContextP ctx
, VASurfaceID surface
, void* draw
, short srcx
, short srcy
,
370 unsigned short srcw
, unsigned short srch
, short destx
, short desty
, unsigned short destw
,
371 unsigned short desth
, VARectangle
*cliprects
, unsigned int number_cliprects
,
373 VAStatus
vlVaQueryImageFormats(VADriverContextP ctx
, VAImageFormat
*format_list
, int *num_formats
);
374 VAStatus
vlVaQuerySubpictureFormats(VADriverContextP ctx
, VAImageFormat
*format_list
,
375 unsigned int *flags
, unsigned int *num_formats
);
376 VAStatus
vlVaCreateImage(VADriverContextP ctx
, VAImageFormat
*format
, int width
, int height
, VAImage
*image
);
377 VAStatus
vlVaDeriveImage(VADriverContextP ctx
, VASurfaceID surface
, VAImage
*image
);
378 VAStatus
vlVaDestroyImage(VADriverContextP ctx
, VAImageID image
);
379 VAStatus
vlVaSetImagePalette(VADriverContextP ctx
, VAImageID image
, unsigned char *palette
);
380 VAStatus
vlVaGetImage(VADriverContextP ctx
, VASurfaceID surface
, int x
, int y
,
381 unsigned int width
, unsigned int height
, VAImageID image
);
382 VAStatus
vlVaPutImage(VADriverContextP ctx
, VASurfaceID surface
, VAImageID image
, int src_x
, int src_y
,
383 unsigned int src_width
, unsigned int src_height
, int dest_x
, int dest_y
,
384 unsigned int dest_width
, unsigned int dest_height
);
385 VAStatus
vlVaQuerySubpictureFormats(VADriverContextP ctx
, VAImageFormat
*format_list
,
386 unsigned int *flags
, unsigned int *num_formats
);
387 VAStatus
vlVaCreateSubpicture(VADriverContextP ctx
, VAImageID image
, VASubpictureID
*subpicture
);
388 VAStatus
vlVaDestroySubpicture(VADriverContextP ctx
, VASubpictureID subpicture
);
389 VAStatus
vlVaSubpictureImage(VADriverContextP ctx
, VASubpictureID subpicture
, VAImageID image
);
390 VAStatus
vlVaSetSubpictureChromakey(VADriverContextP ctx
, VASubpictureID subpicture
,
391 unsigned int chromakey_min
, unsigned int chromakey_max
,
392 unsigned int chromakey_mask
);
393 VAStatus
vlVaSetSubpictureGlobalAlpha(VADriverContextP ctx
, VASubpictureID subpicture
, float global_alpha
);
394 VAStatus
vlVaAssociateSubpicture(VADriverContextP ctx
, VASubpictureID subpicture
, VASurfaceID
*target_surfaces
,
395 int num_surfaces
, short src_x
, short src_y
,
396 unsigned short src_width
, unsigned short src_height
,
397 short dest_x
, short dest_y
, unsigned short dest_width
, unsigned short dest_height
,
399 VAStatus
vlVaDeassociateSubpicture(VADriverContextP ctx
, VASubpictureID subpicture
,
400 VASurfaceID
*target_surfaces
, int num_surfaces
);
401 VAStatus
vlVaQueryDisplayAttributes(VADriverContextP ctx
, VADisplayAttribute
*attr_list
, int *num_attributes
);
402 VAStatus
vlVaGetDisplayAttributes(VADriverContextP ctx
, VADisplayAttribute
*attr_list
, int num_attributes
);
403 VAStatus
vlVaSetDisplayAttributes(VADriverContextP ctx
, VADisplayAttribute
*attr_list
, int num_attributes
);
404 VAStatus
vlVaBufferInfo(VADriverContextP ctx
, VABufferID buf_id
, VABufferType
*type
,
405 unsigned int *size
, unsigned int *num_elements
);
406 VAStatus
vlVaLockSurface(VADriverContextP ctx
, VASurfaceID surface
, unsigned int *fourcc
,
407 unsigned int *luma_stride
, unsigned int *chroma_u_stride
, unsigned int *chroma_v_stride
,
408 unsigned int *luma_offset
, unsigned int *chroma_u_offset
, unsigned int *chroma_v_offset
,
409 unsigned int *buffer_name
, void **buffer
);
410 VAStatus
vlVaUnlockSurface(VADriverContextP ctx
, VASurfaceID surface
);
411 VAStatus
vlVaCreateSurfaces2(VADriverContextP ctx
, unsigned int format
, unsigned int width
, unsigned int height
,
412 VASurfaceID
*surfaces
, unsigned int num_surfaces
, VASurfaceAttrib
*attrib_list
,
413 unsigned int num_attribs
);
414 VAStatus
vlVaQuerySurfaceAttributes(VADriverContextP ctx
, VAConfigID config
, VASurfaceAttrib
*attrib_list
,
415 unsigned int *num_attribs
);
417 VAStatus
vlVaAcquireBufferHandle(VADriverContextP ctx
, VABufferID buf_id
, VABufferInfo
*out_buf_info
);
418 VAStatus
vlVaReleaseBufferHandle(VADriverContextP ctx
, VABufferID buf_id
);
419 VAStatus
vlVaExportSurfaceHandle(VADriverContextP ctx
, VASurfaceID surface_id
, uint32_t mem_type
, uint32_t flags
, void *descriptor
);
421 VAStatus
vlVaQueryVideoProcFilters(VADriverContextP ctx
, VAContextID context
, VAProcFilterType
*filters
,
422 unsigned int *num_filters
);
423 VAStatus
vlVaQueryVideoProcFilterCaps(VADriverContextP ctx
, VAContextID context
, VAProcFilterType type
,
424 void *filter_caps
, unsigned int *num_filter_caps
);
425 VAStatus
vlVaQueryVideoProcPipelineCaps(VADriverContextP ctx
, VAContextID context
, VABufferID
*filters
,
426 unsigned int num_filters
, VAProcPipelineCaps
*pipeline_cap
);
428 // internal functions
429 VAStatus
vlVaHandleVAProcPipelineParameterBufferType(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
430 VAStatus
vlVaHandleSurfaceAllocate(vlVaDriver
*drv
, vlVaSurface
*surface
, struct pipe_video_buffer
*templat
);
431 void vlVaGetReferenceFrame(vlVaDriver
*drv
, VASurfaceID surface_id
, struct pipe_video_buffer
**ref_frame
);
432 void vlVaHandlePictureParameterBufferMPEG12(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
433 void vlVaHandleIQMatrixBufferMPEG12(vlVaContext
*context
, vlVaBuffer
*buf
);
434 void vlVaHandleSliceParameterBufferMPEG12(vlVaContext
*context
, vlVaBuffer
*buf
);
435 void vlVaHandlePictureParameterBufferH264(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
436 void vlVaHandleIQMatrixBufferH264(vlVaContext
*context
, vlVaBuffer
*buf
);
437 void vlVaHandleSliceParameterBufferH264(vlVaContext
*context
, vlVaBuffer
*buf
);
438 void vlVaHandlePictureParameterBufferVC1(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
439 void vlVaHandleSliceParameterBufferVC1(vlVaContext
*context
, vlVaBuffer
*buf
);
440 void vlVaHandlePictureParameterBufferMPEG4(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
441 void vlVaHandleIQMatrixBufferMPEG4(vlVaContext
*context
, vlVaBuffer
*buf
);
442 void vlVaHandleSliceParameterBufferMPEG4(vlVaContext
*context
, vlVaBuffer
*buf
);
443 void vlVaDecoderFixMPEG4Startcode(vlVaContext
*context
);
444 void vlVaGetJpegSliceHeader(vlVaContext
*context
);
445 void vlVaHandlePictureParameterBufferHEVC(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
446 void vlVaHandleIQMatrixBufferHEVC(vlVaContext
*context
, vlVaBuffer
*buf
);
447 void vlVaHandleSliceParameterBufferHEVC(vlVaContext
*context
, vlVaBuffer
*buf
);
448 void vlVaHandlePictureParameterBufferMJPEG(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
449 void vlVaHandleIQMatrixBufferMJPEG(vlVaContext
*context
, vlVaBuffer
*buf
);
450 void vlVaHandleHuffmanTableBufferType(vlVaContext
*context
, vlVaBuffer
*buf
);
451 void vlVaHandleSliceParameterBufferMJPEG(vlVaContext
*context
, vlVaBuffer
*buf
);
452 void vlVaHandlePictureParameterBufferVP9(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
453 void vlVaHandleSliceParameterBufferVP9(vlVaContext
*context
, vlVaBuffer
*buf
);
454 void vlVaDecoderVP9BitstreamHeader(vlVaContext
*context
, vlVaBuffer
*buf
);
455 void getEncParamPresetH264(vlVaContext
*context
);
456 void getEncParamPresetH265(vlVaContext
*context
);
457 VAStatus
vlVaHandleVAEncPictureParameterBufferTypeH264(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
458 VAStatus
vlVaHandleVAEncSliceParameterBufferTypeH264(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
459 VAStatus
vlVaHandleVAEncSequenceParameterBufferTypeH264(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
460 VAStatus
vlVaHandleVAEncMiscParameterTypeRateControlH264(vlVaContext
*context
, VAEncMiscParameterBuffer
*buf
);
461 VAStatus
vlVaHandleVAEncMiscParameterTypeFrameRateH264(vlVaContext
*context
, VAEncMiscParameterBuffer
*buf
);
462 VAStatus
vlVaHandleVAEncPictureParameterBufferTypeHEVC(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
463 VAStatus
vlVaHandleVAEncSliceParameterBufferTypeHEVC(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
464 VAStatus
vlVaHandleVAEncSequenceParameterBufferTypeHEVC(vlVaDriver
*drv
, vlVaContext
*context
, vlVaBuffer
*buf
);
465 VAStatus
vlVaHandleVAEncMiscParameterTypeRateControlHEVC(vlVaContext
*context
, VAEncMiscParameterBuffer
*buf
);
466 VAStatus
vlVaHandleVAEncMiscParameterTypeFrameRateHEVC(vlVaContext
*context
, VAEncMiscParameterBuffer
*buf
);
468 #endif //VA_PRIVATE_H