mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-19 00:10:27 +01:00
frontends/va: Don't allow multi-plane derive without driver support
Mapping multi-plane surfaces won't work correctly without driver supporting PIPE_VIDEO_CAP_SUPPORTS_CONTIGUOUS_PLANES_MAP. Remove the check for ffmpeg process and instead check for multi-plane format and driver support only. Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24381>
This commit is contained in:
parent
9e9d90c6c3
commit
ca8647e29b
1 changed files with 5 additions and 11 deletions
|
|
@ -248,10 +248,6 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image)
|
|||
"hevcencode"
|
||||
};
|
||||
|
||||
const char *derive_progressive_disallowlist[] = {
|
||||
"ffmpeg"
|
||||
};
|
||||
|
||||
if (!ctx)
|
||||
return VA_STATUS_ERROR_INVALID_CONTEXT;
|
||||
|
||||
|
|
@ -280,13 +276,11 @@ vlVaDeriveImage(VADriverContextP ctx, VASurfaceID surface, VAImage *image)
|
|||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
|
||||
PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE))
|
||||
return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
} else {
|
||||
if(!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
|
||||
PIPE_VIDEO_CAP_SUPPORTS_CONTIGUOUS_PLANES_MAP))
|
||||
for (i = 0; i < ARRAY_SIZE(derive_progressive_disallowlist); i++)
|
||||
if ((strcmp(derive_progressive_disallowlist[i], proc) == 0))
|
||||
return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
} else if (util_format_get_num_planes(surf->buffer->buffer_format) >= 2 &&
|
||||
!screen->get_video_param(screen, PIPE_VIDEO_PROFILE_UNKNOWN,
|
||||
PIPE_VIDEO_ENTRYPOINT_BITSTREAM,
|
||||
PIPE_VIDEO_CAP_SUPPORTS_CONTIGUOUS_PLANES_MAP)) {
|
||||
return VA_STATUS_ERROR_OPERATION_FAILED;
|
||||
}
|
||||
|
||||
surfaces = surf->buffer->get_surfaces(surf->buffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue