frontends/va: Add CreateContext flag to enable protected context

Reviewed-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33136>
This commit is contained in:
David Rosca
2025-01-21 10:34:28 +01:00
committed by Marge Bot
parent f83faf83e7
commit 33c47da3fe
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -344,6 +344,9 @@ vlVaCreateContext(VADriverContextP ctx, VAConfigID config_id, int picture_width,
context->templat.height = picture_height;
context->templat.expect_chunked_decode = true;
if (config->entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM)
context->desc.base.protected_playback = flag & VL_VA_CREATE_CONTEXT_PROTECTED;
switch (u_reduce_video_profile(context->templat.profile)) {
case PIPE_VIDEO_FORMAT_MPEG12:
case PIPE_VIDEO_FORMAT_VC1:
+3
View File
@@ -100,6 +100,9 @@
VA_ENC_PACKED_HEADER_MISC | \
VA_ENC_PACKED_HEADER_RAW_DATA)
/* vaCreateContext flags */
#define VL_VA_CREATE_CONTEXT_PROTECTED (1 << 16)
static inline enum pipe_video_chroma_format
ChromaToPipe(int format)
{