va: Add 12 bits rt_format setting in H265.

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>
This commit is contained in:
He Junyan 2021-06-16 16:43:40 +08:00 committed by GStreamer Marge Bot
parent 1b4c9eaebb
commit 0849583210

View file

@ -865,6 +865,14 @@ _get_rtformat (GstVaH265Dec * self, guint8 bit_depth_luma,
guint8 chroma_format_idc) guint8 chroma_format_idc)
{ {
switch (bit_depth_luma) { 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: case 10:
if (chroma_format_idc == 3) if (chroma_format_idc == 3)
return VA_RT_FORMAT_YUV444_10; return VA_RT_FORMAT_YUV444_10;