x265-3.2.patchset revision 06b7857c
1From 88b7b60132aa62864b55f06865bb7c0b6ae09c1e Mon Sep 17 00:00:00 2001
2From: Timothy Gu <timothygu99@gmail.com>
3Date: Sun, 28 Dec 2014 07:11:55 +0000
4Subject: Check if threading library needs to be linked separately
5
6
7diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
8index c019c2e..7386c73 100644
9--- a/source/CMakeLists.txt
10+++ b/source/CMakeLists.txt
11@@ -79,7 +79,8 @@ else()
12 endif()
13 
14 if(UNIX)
15-    list(APPEND PLATFORM_LIBS pthread)
16+	find_package(Threads)
17+    list(APPEND PLATFORM_LIBS ${CMAKE_THREAD_LIBS_INIT})
18     find_library(LIBRT rt)
19     if(LIBRT)
20         list(APPEND PLATFORM_LIBS rt)
21-- 
222.23.0
23
24
25From 7e65fd92030b80aa75c769de100f7f0734f9ebf5 Mon Sep 17 00:00:00 2001
26From: Timothy Gu <timothygu99@gmail.com>
27Date: Sun, 28 Dec 2014 07:13:56 +0000
28Subject: Add an option to adjust headers installation path
29
30
31diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
32index 7386c73..c67236d 100644
33--- a/source/CMakeLists.txt
34+++ b/source/CMakeLists.txt
35@@ -355,6 +355,7 @@ endif()
36 # Build options
37 set(LIB_INSTALL_DIR lib CACHE STRING "Install location of libraries")
38 set(BIN_INSTALL_DIR bin CACHE STRING "Install location of executables")
39+set(INCLUDE_INSTALL_DIR include CACHE STRING "Install location of headers")
40 set(EXTRA_LIB "" CACHE STRING "Extra libraries to link against")
41 set(EXTRA_LINK_FLAGS "" CACHE STRING "Extra link flags")
42 if(EXTRA_LINK_FLAGS)
43-- 
442.23.0
45
46
47From bea6a228a5542d3446962c8a3f77553cc65ee1ce Mon Sep 17 00:00:00 2001
48From: Timothy Gu <timothygu99@gmail.com>
49Date: Sun, 28 Dec 2014 07:14:34 +0000
50Subject: Add Haiku version of adjusting thread priority
51
52
53diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt
54index c67236d..a8a32da 100644
55--- a/source/CMakeLists.txt
56+++ b/source/CMakeLists.txt
57@@ -579,7 +579,8 @@ if(SVTHEVC_FOUND)
58     install(FILES "${SVT_HEVC_LIBRARY}" DESTINATION ${BIN_INSTALL_DIR})
59 endif()
60 
61-install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h" DESTINATION include)
62+install(FILES x265.h "${PROJECT_BINARY_DIR}/x265_config.h"
63+    DESTINATION "${INCLUDE_INSTALL_DIR}")
64 if((WIN32 AND ENABLE_CLI) OR (WIN32 AND ENABLE_SHARED))
65     if(MSVC_IDE)
66         install(FILES "${PROJECT_BINARY_DIR}/Debug/x265.pdb" DESTINATION ${BIN_INSTALL_DIR} CONFIGURATIONS Debug)
67-- 
682.23.0
69
70
71From b27bd0f8bc15b7fef2a2968d2bf956b75623bfb4 Mon Sep 17 00:00:00 2001
72From: Jerome Duval <jerome.duval@gmail.com>
73Date: Fri, 25 Oct 2019 21:18:33 +0200
74Subject: avoid using nice.
75
76
77diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp
78index f359d80..174d004 100644
79--- a/source/common/threadpool.cpp
80+++ b/source/common/threadpool.cpp
81@@ -118,7 +118,9 @@ void WorkerThread::threadMain()
82 #if _WIN32
83     SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
84 #else
85+#ifndef __HAIKU__
86     __attribute__((unused)) int val = nice(10);
87+#endif
88 #endif
89 
90     m_pool.setCurrentThreadAffinity();
91-- 
922.23.0
93
94