static guint
_get_rtformat (GstVaH265Dec * self, guint8 bit_depth_luma,
- guint8 chroma_format_idc)
+ guint8 bit_depth_chroma, guint8 chroma_format_idc)
{
- switch (bit_depth_luma) {
+ guint8 bit_num = MAX (bit_depth_luma, bit_depth_chroma);
+
+ switch (bit_num) {
+ case 11:
case 12:
if (chroma_format_idc == 3)
return VA_RT_FORMAT_YUV444_12;
else
return VA_RT_FORMAT_YUV420_12;
break;
+ case 9:
case 10:
if (chroma_format_idc == 3)
return VA_RT_FORMAT_YUV444_10;
break;
default:
GST_ERROR_OBJECT (self, "Unsupported chroma format: %d "
- "(with depth luma: %d)", chroma_format_idc, bit_depth_luma);
+ "(with depth luma: %d, with depth chroma: %d)",
+ chroma_format_idc, bit_depth_luma, bit_depth_chroma);
return 0;
}
}
return FALSE;
rt_format = _get_rtformat (self, sps->bit_depth_luma_minus8 + 8,
- sps->chroma_format_idc);
+ sps->bit_depth_chroma_minus8 + 8, sps->chroma_format_idc);
if (rt_format == 0)
return FALSE;