Commit 9bee1e603c for ffmpeg
commit 9bee1e603cdb6e83d2e99c3cb9a452c2002139c5
Author: nyanmisaka <nst799610810@gmail.com>
Date: Tue Nov 10 16:44:23 2026 +0800
avutil/hwcontext_d3d11va: remove initial_pool_size restriction
This artificial limitation 64 was introduced alongside the `scale_d3d11`
filter in 9682121, yet it's not supported by Microsoft's documentation.
https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ns-d3d11-d3d11_texture2d_desc#members
```
ArraySize
Type: UINT
Number of textures in the texture array. The range is from 1 to D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION (2048).
```
Furthermore, it can cause QSV use cases to crash on older platforms that
do not support dynamic allocation, such as on Gen9 to Gen11 hardware.
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c
index be0523b05b..3d0d64209f 100644
--- a/libavutil/hwcontext_d3d11va.c
+++ b/libavutil/hwcontext_d3d11va.c
@@ -42,8 +42,6 @@
#include "thread.h"
#include "compat/w32dlfcn.h"
-#define MAX_ARRAY_SIZE 64 // Driver specification limits ArraySize to 64 for decoder-bound resources
-
typedef HRESULT(WINAPI *PFN_CREATE_DXGI_FACTORY)(REFIID riid, void **ppFactory);
static AVOnce functions_loaded = AV_ONCE_INIT;
@@ -297,8 +295,6 @@ static int d3d11va_frames_init(AVHWFramesContext *ctx)
if (s->format == DXGI_FORMAT_420_OPAQUE)
hwctx->BindFlags &= ~D3D11_BIND_SHADER_RESOURCE;
- ctx->initial_pool_size = FFMIN(ctx->initial_pool_size, MAX_ARRAY_SIZE);
-
texDesc = (D3D11_TEXTURE2D_DESC){
.Width = ctx->width,
.Height = ctx->height,