mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
gallium va: Handle new VA attributes with new pipe video caps
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16286>
This commit is contained in:
parent
e1f2db7527
commit
04495300f9
1 changed files with 36 additions and 2 deletions
|
|
@ -170,9 +170,43 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
|
|||
if (u_reduce_video_profile(ProfileToPipe(profile)) == PIPE_VIDEO_FORMAT_HEVC)
|
||||
value |= VA_ENC_PACKED_HEADER_SEQUENCE;
|
||||
break;
|
||||
case VAConfigAttribEncMaxSlices:
|
||||
{
|
||||
/**
|
||||
* \brief Maximum number of slices per frame. Read-only.
|
||||
*
|
||||
* This attribute determines the maximum number of slices the
|
||||
* driver can support to encode a single frame.
|
||||
*/
|
||||
int maxSlicesPerEncodedPic = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_ENC_MAX_SLICES_PER_FRAME);
|
||||
if (maxSlicesPerEncodedPic <= 0)
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
else
|
||||
value = maxSlicesPerEncodedPic;
|
||||
} break;
|
||||
case VAConfigAttribEncMaxRefFrames:
|
||||
value = 1;
|
||||
break;
|
||||
{
|
||||
int maxL0L1ReferencesPerFrame = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_ENC_MAX_REFERENCES_PER_FRAME);
|
||||
if (maxL0L1ReferencesPerFrame <= 0)
|
||||
value = 1;
|
||||
else
|
||||
value = maxL0L1ReferencesPerFrame;
|
||||
} break;
|
||||
case VAConfigAttribEncSliceStructure:
|
||||
{
|
||||
/* The VA enum values match the pipe_video_cap_slice_structure definitions*/
|
||||
int supportedSliceStructuresFlagSet = pscreen->get_video_param(pscreen, ProfileToPipe(profile),
|
||||
PIPE_VIDEO_ENTRYPOINT_ENCODE,
|
||||
PIPE_VIDEO_CAP_ENC_SLICES_STRUCTURE);
|
||||
if (supportedSliceStructuresFlagSet <= 0)
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
else
|
||||
value = supportedSliceStructuresFlagSet;
|
||||
} break;
|
||||
default:
|
||||
value = VA_ATTRIB_NOT_SUPPORTED;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue