[FFmpeg-devel] [PATCH] hwcontext_d3d11va: support bgr0 pixel format

Thomas Volkert silvo at gmx.net
Thu Aug 8 03:30:10 EEST 2019


From: Thomas Volkert <thomas.volkert at net-zeal.com>

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

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)
--
2.22.0



More information about the ffmpeg-devel mailing list