va: Add 12 bits rt_format setting in H265.
authorHe Junyan <junyan.he@intel.com>
Wed, 16 Jun 2021 08:43:40 +0000 (16:43 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 16 Jun 2021 14:12:59 +0000 (14:12 +0000)
In order to support 12 bits format decoding, we need to add the
support for 12 bits rt_format in H265.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2332>

sys/va/gstvah265dec.c

index 1e60e6b..32ddde1 100644 (file)
@@ -865,6 +865,14 @@ _get_rtformat (GstVaH265Dec * self, guint8 bit_depth_luma,
     guint8 chroma_format_idc)
 {
   switch (bit_depth_luma) {
+    case 12:
+      if (chroma_format_idc == 3)
+        return VA_RT_FORMAT_YUV444_12;
+      if (chroma_format_idc == 2)
+        return VA_RT_FORMAT_YUV422_12;
+      else
+        return VA_RT_FORMAT_YUV420_12;
+      break;
     case 10:
       if (chroma_format_idc == 3)
         return VA_RT_FORMAT_YUV444_10;