[FFmpeg-devel] hwcontext_d3d11va: support bgr0 pixel format

Submitted by Thomas Volkert on Aug. 8, 2019, 12:30 a.m.

Details

Message ID 20190808003010.5713-1-silvo@gmx.net
State New
Headers show

Commit Message

Thomas Volkert Aug. 8, 2019, 12:30 a.m.
From: Thomas Volkert <thomas.volkert@net-zeal.com>

---
 libavutil/hwcontext_d3d11va.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--
2.22.0

Patch hide | download patch | download mbox

diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 6670c47579..0204407330 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -82,11 +82,12 @@  static const struct {
     DXGI_FORMAT d3d_format;
     enum AVPixelFormat pix_fmt;
 } supported_formats[] = {
-    { DXGI_FORMAT_NV12,         AV_PIX_FMT_NV12 },
-    { DXGI_FORMAT_P010,         AV_PIX_FMT_P010 },
+    { DXGI_FORMAT_NV12,           AV_PIX_FMT_NV12 },
+    { DXGI_FORMAT_P010,           AV_PIX_FMT_P010 },
+    { DXGI_FORMAT_B8G8R8A8_UNORM, AV_PIX_FMT_BGR0 },
     // Special opaque formats. The pix_fmt is merely a place holder, as the
     // opaque format cannot be accessed directly.
-    { DXGI_FORMAT_420_OPAQUE,   AV_PIX_FMT_YUV420P },
+    { DXGI_FORMAT_420_OPAQUE,     AV_PIX_FMT_YUV420P },
 };

 static void d3d11va_default_lock(void *ctx)