summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorDmitrichenko, Max <[email protected]>2020-07-07 21:23:22 +0200
committerScott <[email protected]>2020-10-24 16:53:29 +0100
commit29811eb227cf740f3a48fe3188dd98046f8368c2 (patch)
tree47d0e086c5af1b0253737a376377a8e8f0e75896 /contrib
parent030ecc52477a7636aeab96a5496b640884b85f1b (diff)
removing thread priority change for better performance
Diffstat (limited to 'contrib')
-rw-r--r--contrib/x265/A04-threads-priority.patch18
-rw-r--r--contrib/x265_10bit/A04-threads-priority.patch18
-rw-r--r--contrib/x265_12bit/A04-threads-priority.patch18
-rw-r--r--contrib/x265_8bit/A04-threads-priority.patch18
4 files changed, 72 insertions, 0 deletions
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;
+