From c465d771dd099b0ffbb0792b3e74148e01259f19 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 10 Feb 2021 21:54:42 -0300 Subject: Enable multithreaded VP9 decoding (#2009) * Enable multithreaded VP9 decoding * Limit the number of threads used for video decoding --- Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Ryujinx.Graphics.Nvdec.Vp9/Types') diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs b/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs index 4ca05954..faadd349 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs @@ -127,9 +127,9 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types MBs = MbRows * MbCols; } - public void AllocTileWorkerData(MemoryAllocator allocator, int tileCols, int tileRows) + public void AllocTileWorkerData(MemoryAllocator allocator, int tileCols, int tileRows, int maxThreads) { - TileWorkerData = allocator.Allocate(tileCols * tileRows); + TileWorkerData = allocator.Allocate(tileCols * tileRows + (maxThreads > 1 ? maxThreads : 0)); } public void FreeTileWorkerData(MemoryAllocator allocator) -- cgit v1.2.3