This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

The following commit(s) were added to refs/heads/master by this push:
     new 714152dd9a avutil/hwcontext_d3d11va: added resource and heap flags to 
DeviceContext
714152dd9a is described below

commit 714152dd9a0ea260a25346ca276f06096ab4b7ad
Author:     Dmitrii Ovchinnikov <[email protected]>
AuthorDate: Tue Oct 7 16:12:42 2025 +0200
Commit:     Dmitrii Ovchinnikov <[email protected]>
CommitDate: Mon Jan 26 10:39:10 2026 +0000

    avutil/hwcontext_d3d11va: added resource and heap flags to DeviceContext
---
 doc/APIchanges                |  3 +++
 libavutil/hwcontext_d3d11va.c | 15 +++++++++++++++
 libavutil/hwcontext_d3d11va.h | 14 ++++++++++++++
 libavutil/version.h           |  2 +-
 4 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/doc/APIchanges b/doc/APIchanges
index e68376fc3a..ee3167bb14 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -2,6 +2,9 @@ The last version increases of all libraries were on 2025-03-28
 
 API changes, most recent first:
 
+2026-01-xx - xxxxxxxxxx - lavu 60.24.100 - hwcontext_d3d11va.h
+  Add BindFlags and MiscFlags to AVD3D11VADeviceContext
+
 2026-01-04 - xxxxxxxxxx - lavu 60.23.100 - cpu.h
   Add AV_CPU_FLAG_ARM_CRC.
 
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index 83414ad0d4..418fe9dfda 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -290,6 +290,9 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx)
         return AVERROR(EINVAL);
     }
 
+    hwctx->BindFlags |= device_hwctx->BindFlags;
+    hwctx->MiscFlags |= device_hwctx->MiscFlags;
+
     ctx->initial_pool_size = FFMIN(ctx->initial_pool_size, MAX_ARRAY_SIZE);
 
     texDesc = (D3D11_TEXTURE2D_DESC){
@@ -710,6 +713,18 @@ static int d3d11va_device_create(AVHWDeviceContext *ctx, 
const char *device,
     }
 #endif
 
+    if (av_dict_get(opts, "SHADER", NULL, 0))
+        device_hwctx->BindFlags |= D3D11_BIND_SHADER_RESOURCE;
+
+    if (av_dict_get(opts, "UAV", NULL, 0))
+        device_hwctx->BindFlags |= D3D11_BIND_UNORDERED_ACCESS;
+
+    if (av_dict_get(opts, "RTV", NULL, 0))
+        device_hwctx->BindFlags |= D3D11_BIND_RENDER_TARGET;
+
+    if (av_dict_get(opts, "SHARED", NULL, 0))
+        device_hwctx->MiscFlags |= D3D11_RESOURCE_MISC_SHARED;
+
     return 0;
 }
 
diff --git a/libavutil/hwcontext_d3d11va.h b/libavutil/hwcontext_d3d11va.h
index 77d2d72f1b..b87b1e8fa2 100644
--- a/libavutil/hwcontext_d3d11va.h
+++ b/libavutil/hwcontext_d3d11va.h
@@ -94,6 +94,20 @@ typedef struct AVD3D11VADeviceContext {
     void (*lock)(void *lock_ctx);
     void (*unlock)(void *lock_ctx);
     void *lock_ctx;
+    /**
+     * D3D11_TEXTURE2D_DESC.BindFlags to be applied to D3D11 resources 
allocated
+     * for frames using this device context.
+     *
+     * It applies globally to all AVD3D11VAFramesContext allocated from this 
device context.
+     */
+    UINT BindFlags;
+    /**
+     * D3D11_TEXTURE2D_DESC.MiscFlags to be applied to D3D11 resources 
allocated
+     * for frames using this device context.
+     *
+     * It applies globally to all AVD3D11VAFramesContext allocated from this 
device context.
+     */
+    UINT MiscFlags;
 } AVD3D11VADeviceContext;
 
 /**
diff --git a/libavutil/version.h b/libavutil/version.h
index 9ed38790c7..9d308ed059 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -79,7 +79,7 @@
  */
 
 #define LIBAVUTIL_VERSION_MAJOR  60
-#define LIBAVUTIL_VERSION_MINOR  23
+#define LIBAVUTIL_VERSION_MINOR  24
 #define LIBAVUTIL_VERSION_MICRO 100
 
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to