From 0849583210f0454600e1fec12809dfb164b425a4 Mon Sep 17 00:00:00 2001 From: He Junyan Date: Wed, 16 Jun 2021 16:43:40 +0800 Subject: [PATCH] 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: --- sys/va/gstvah265dec.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/va/gstvah265dec.c b/sys/va/gstvah265dec.c index 1e60e6b5db..32ddde16a7 100644 --- a/sys/va/gstvah265dec.c +++ b/sys/va/gstvah265dec.c @@ -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;