mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 16:00:08 +01:00
frontends/va: Return P010/P016 as possible surface formats when encoding
When gstreamer's vaapih265enc queries for possible surface formats, it only queries using VA_RT_FORMAT_YUV420, so add P010 and P016 as possible surface formats to enable 10-bit/16-bit encoding. Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7268>
This commit is contained in:
parent
b50f40fa5a
commit
0eccd15852
1 changed files with 3 additions and 1 deletions
|
|
@ -484,7 +484,9 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config_id,
|
|||
attribs[i].value.value.i = VA_FOURCC_NV12;
|
||||
i++;
|
||||
}
|
||||
if (config->rt_format & VA_RT_FORMAT_YUV420_10BPP) {
|
||||
if (config->rt_format & VA_RT_FORMAT_YUV420_10 ||
|
||||
(config->rt_format & VA_RT_FORMAT_YUV420 &&
|
||||
config->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE)) {
|
||||
attribs[i].type = VASurfaceAttribPixelFormat;
|
||||
attribs[i].value.type = VAGenericValueTypeInteger;
|
||||
attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue