st/va: enable 4:2:2 chroma format
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 12 Feb 2020 10:22:06 +0000 (11:22 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 27 Feb 2020 09:01:35 +0000 (10:01 +0100)
Everything is in place to support them.

Acked-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3738>

src/gallium/state_trackers/va/config.c

index 5becc49ce63783fc674a7263698c60898b2253b1..53d50fde63fafd780da0ed967e52d00020849b1a 100644 (file)
@@ -124,7 +124,7 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile profile, VAEntrypoint en
       if (entrypoint == VAEntrypointVLD) {
          switch (attrib_list[i].type) {
          case VAConfigAttribRTFormat:
-            value = VA_RT_FORMAT_YUV420;
+            value = VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV422;
            if (pscreen->is_video_format_supported(pscreen, PIPE_FORMAT_P016,
                                                    ProfileToPipe(profile),
                                                    PIPE_VIDEO_ENTRYPOINT_BITSTREAM))
@@ -256,7 +256,7 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
    }
 
    config->profile = p;
-   supported_rt_formats = VA_RT_FORMAT_YUV420;
+   supported_rt_formats = VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_YUV422;
    if (pscreen->is_video_format_supported(pscreen, PIPE_FORMAT_P016, p,
                                          config->entrypoint))
       supported_rt_formats |= VA_RT_FORMAT_YUV420_10BPP;