浏览代码

Fix QSV "static surface pool size exceeded" on Windows

d3d11va doesn't support dynamic pool size, use vpp filter ctx to relay to prevent encoder async and bframes from exhausting the decoder pool.
Nyanmisaka 5 天之前
父节点
当前提交
e8291fc856
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

+ 7 - 0
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -4442,6 +4442,13 @@ namespace MediaBrowser.Controller.MediaEncoding
                 var swapOutputWandH = doVppTranspose && swapWAndH;
                 var hwScaleFilter = GetHwScaleFilter("vpp", "qsv", outFormat, swapOutputWandH, swpInW, swpInH, reqW, reqH, reqMaxW, reqMaxH);
 
+                // d3d11va doesn't support dynamic pool size, use vpp filter ctx to relay
+                // to prevent encoder async and bframes from exhausting the decoder pool.
+                if (!string.IsNullOrEmpty(hwScaleFilter) && isD3d11vaDecoder)
+                {
+                    hwScaleFilter += ":passthrough=0";
+                }
+
                 if (!string.IsNullOrEmpty(hwScaleFilter) && doVppTranspose)
                 {
                     hwScaleFilter += $":transpose={transposeDir}";