Module: Mesa Branch: master Commit: 0eccd15852b9f1933166447cee8a8409d90bfe79 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=0eccd15852b9f1933166447cee8a8409d90bfe79
Author: Thong Thai <[email protected]> Date: Wed Oct 21 21:54:57 2020 -0400 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 <[email protected]> Reviewed-by: Leo Liu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7268> --- src/gallium/frontends/va/surface.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/frontends/va/surface.c b/src/gallium/frontends/va/surface.c index 368b1cbcfc7..c396b158cd7 100644 --- a/src/gallium/frontends/va/surface.c +++ b/src/gallium/frontends/va/surface.c @@ -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; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
