From 29811eb227cf740f3a48fe3188dd98046f8368c2 Mon Sep 17 00:00:00 2001 From: "Dmitrichenko, Max" Date: Tue, 7 Jul 2020 21:23:22 +0200 Subject: removing thread priority change for better performance --- contrib/x265/A04-threads-priority.patch | 18 ++++++++++++++++++ contrib/x265_10bit/A04-threads-priority.patch | 18 ++++++++++++++++++ contrib/x265_12bit/A04-threads-priority.patch | 18 ++++++++++++++++++ contrib/x265_8bit/A04-threads-priority.patch | 18 ++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 contrib/x265/A04-threads-priority.patch create mode 100644 contrib/x265_10bit/A04-threads-priority.patch create mode 100644 contrib/x265_12bit/A04-threads-priority.patch create mode 100644 contrib/x265_8bit/A04-threads-priority.patch (limited to 'contrib') diff --git a/contrib/x265/A04-threads-priority.patch b/contrib/x265/A04-threads-priority.patch new file mode 100644 index 000000000..1dedf86bb --- /dev/null +++ b/contrib/x265/A04-threads-priority.patch @@ -0,0 +1,18 @@ +diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp +index 2db7a146b..4ed534d6b 100644 +--- a/source/common/threadpool.cpp ++++ b/source/common/threadpool.cpp +@@ -115,12 +115,6 @@ void WorkerThread::threadMain() + { + THREAD_NAME("Worker", m_id); + +-#if _WIN32 +- SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); +-#else +- __attribute__((unused)) int val = nice(10); +-#endif +- + m_pool.setCurrentThreadAffinity(); + + sleepbitmap_t idBit = (sleepbitmap_t)1 << m_id; + diff --git a/contrib/x265_10bit/A04-threads-priority.patch b/contrib/x265_10bit/A04-threads-priority.patch new file mode 100644 index 000000000..1dedf86bb --- /dev/null +++ b/contrib/x265_10bit/A04-threads-priority.patch @@ -0,0 +1,18 @@ +diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp +index 2db7a146b..4ed534d6b 100644 +--- a/source/common/threadpool.cpp ++++ b/source/common/threadpool.cpp +@@ -115,12 +115,6 @@ void WorkerThread::threadMain() + { + THREAD_NAME("Worker", m_id); + +-#if _WIN32 +- SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); +-#else +- __attribute__((unused)) int val = nice(10); +-#endif +- + m_pool.setCurrentThreadAffinity(); + + sleepbitmap_t idBit = (sleepbitmap_t)1 << m_id; + diff --git a/contrib/x265_12bit/A04-threads-priority.patch b/contrib/x265_12bit/A04-threads-priority.patch new file mode 100644 index 000000000..1dedf86bb --- /dev/null +++ b/contrib/x265_12bit/A04-threads-priority.patch @@ -0,0 +1,18 @@ +diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp +index 2db7a146b..4ed534d6b 100644 +--- a/source/common/threadpool.cpp ++++ b/source/common/threadpool.cpp +@@ -115,12 +115,6 @@ void WorkerThread::threadMain() + { + THREAD_NAME("Worker", m_id); + +-#if _WIN32 +- SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); +-#else +- __attribute__((unused)) int val = nice(10); +-#endif +- + m_pool.setCurrentThreadAffinity(); + + sleepbitmap_t idBit = (sleepbitmap_t)1 << m_id; + diff --git a/contrib/x265_8bit/A04-threads-priority.patch b/contrib/x265_8bit/A04-threads-priority.patch new file mode 100644 index 000000000..1dedf86bb --- /dev/null +++ b/contrib/x265_8bit/A04-threads-priority.patch @@ -0,0 +1,18 @@ +diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp +index 2db7a146b..4ed534d6b 100644 +--- a/source/common/threadpool.cpp ++++ b/source/common/threadpool.cpp +@@ -115,12 +115,6 @@ void WorkerThread::threadMain() + { + THREAD_NAME("Worker", m_id); + +-#if _WIN32 +- SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL); +-#else +- __attribute__((unused)) int val = nice(10); +-#endif +- + m_pool.setCurrentThreadAffinity(); + + sleepbitmap_t idBit = (sleepbitmap_t)1 << m_id; + -- cgit v1.2.3