>From 6515e2d1298ab1b7999fe4c494dbd77bbee5f82e Mon Sep 17 00:00:00 2001 From: Shashank Pathipati <[email protected]> Date: Tue, 12 May 2026 14:23:47 +0530 Subject: [PATCH] tme: fix check for threadpool
---
source/common/threadpool.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp
index 6bde73c1d..11c2fddf5 100644
--- a/source/common/threadpool.cpp
+++ b/source/common/threadpool.cpp
@@ -605,7 +605,10 @@ ThreadPool* ThreadPool::allocThreadPools(x265_param* p,
int& numPools, bool isTh
}
else if (i == 0)
numThreads -= p->lookaheadThreads;
-
+
+ if (!p->bThreadedME)
+ X265_CHECK(numThreads <= MAX_POOL_THREADS, "a single thread
pool cannot have more than MAX_POOL_THREADS threads\n");
+
if (!pools[i].create(numThreads, maxProviders,
nodeMaskPerPool[node]))
{
delete[] pools;
@@ -639,8 +642,6 @@ ThreadPool::ThreadPool()
bool ThreadPool::create(int numThreads, int maxProviders, uint64_t nodeMask)
{
- X265_CHECK(numThreads <= MAX_POOL_THREADS, "a single thread pool cannot
have more than MAX_POOL_THREADS threads\n");
-
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= _WIN32_WINNT_WIN7
memset(&m_groupAffinity, 0, sizeof(GROUP_AFFINITY));
for (int i = 0; i < getNumaNodeCount(); i++)
--
2.52.0.windows.1
0001-tme-fix-check-for-threadpool.patch
Description: 0001-tme-fix-check-for-threadpool.patch
_______________________________________________ x265-devel mailing list [email protected] https://mailman.videolan.org/listinfo/x265-devel
