mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
d3d12: Add BGRA64 and BGR10A2 format support
Map BGRA64 and BGR10A2 to Y416 and Y410, respectively, since it's possible RGB space decoder output Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7092>
This commit is contained in:
parent
66cc3ff84e
commit
94bb9fec58
3 changed files with 13 additions and 4 deletions
|
@ -42,8 +42,9 @@
|
|||
|
||||
/* DXGI (semi) native formats */
|
||||
#define GST_D3D12_TIER_0_FORMATS \
|
||||
"RGBA64_LE, Y416_LE, Y412_LE, RGB10A2_LE, Y410, Y216_LE, Y212_LE, Y210, " \
|
||||
"VUYA, RGBA, BGRA, RBGA, P016_LE, P012_LE, P010_10LE, RGBx, BGRx, YUY2, NV12"
|
||||
"RGBA64_LE, BGRA64_LE, Y416_LE, Y412_LE, RGB10A2_LE, Y410, BGR10A2_LE, Y216_LE, Y212_LE, " \
|
||||
"Y210, VUYA, RGBA, BGRA, RBGA, P016_LE, P012_LE, P010_10LE, RGBx, BGRx, " \
|
||||
"YUY2, NV12"
|
||||
|
||||
/* both SRV and RTV are supported */
|
||||
#define GST_D3D12_TIER_1_FORMATS \
|
||||
|
|
|
@ -161,6 +161,14 @@ gst_d3d12_pack_new (GstD3D12Device * device,
|
|||
case GST_VIDEO_FORMAT_Y216_LE:
|
||||
conv_format = GST_VIDEO_FORMAT_AYUV64;
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_BGR10A2_LE:
|
||||
gst_video_info_set_format (&priv->in_info, GST_VIDEO_FORMAT_RGB10A2_LE,
|
||||
converter_output_info->width, converter_output_info->height);
|
||||
break;
|
||||
case GST_VIDEO_FORMAT_BGRA64_LE:
|
||||
gst_video_info_set_format (&priv->in_info, GST_VIDEO_FORMAT_RGBA64_LE,
|
||||
converter_output_info->width, converter_output_info->height);
|
||||
break;
|
||||
default:
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -354,8 +354,8 @@ static const GstD3D12Format g_format_map[] = {
|
|||
FormatBuilder::RgbPacked (GST_VIDEO_FORMAT_RGBA64_LE,
|
||||
DXGI_FORMAT_R16G16B16A16_UNORM),
|
||||
FormatBuilder::NotSupported(GST_VIDEO_FORMAT_RGBA64_BE),
|
||||
FormatBuilder::RgbPacked (GST_VIDEO_FORMAT_BGRA64_LE,
|
||||
DXGI_FORMAT_R16G16B16A16_UNORM),
|
||||
FormatBuilder::YuvPacked (GST_VIDEO_FORMAT_BGRA64_LE,
|
||||
DXGI_FORMAT_Y416, DXGI_FORMAT_R16G16B16A16_UNORM),
|
||||
FormatBuilder::NotSupported(GST_VIDEO_FORMAT_BGRA64_BE),
|
||||
FormatBuilder::RgbPacked (GST_VIDEO_FORMAT_ABGR64_LE,
|
||||
DXGI_FORMAT_R16G16B16A16_UNORM),
|
||||
|
|
Loading…
Reference in a new issue