1 From: Andrew Randrianasulu <randrianasulu@gmail.com>
2 Date: Sun, 20 Jun 2021 10:35:26 +0300
3 Subject: [PATCH 32/67] Add multilib x265 (slower compilation, but you can
4 render 10 bit h265 out of the box)
7 cinelerra-5.1/thirdparty/Makefile | 5 +-
8 cinelerra-5.1/thirdparty/src/x265_3.5.patch1 | 4 ++
9 cinelerra-5.1/thirdparty/src/x265_3.5.patch2 | 7 +++
10 cinelerra-5.1/thirdparty/src/x265_3.5.patch3 | 57 ++++++++++++++++++++
11 4 files changed, 71 insertions(+), 2 deletions(-)
12 create mode 100644 cinelerra-5.1/thirdparty/src/x265_3.5.patch1
13 create mode 100644 cinelerra-5.1/thirdparty/src/x265_3.5.patch2
14 create mode 100644 cinelerra-5.1/thirdparty/src/x265_3.5.patch3
16 diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
17 --- a/cinelerra-5.1/thirdparty/Makefile
18 +++ b/cinelerra-5.1/thirdparty/Makefile
19 @@ -259,8 +259,9 @@ tiff.cfg_params+= --disable-libdeflate --enable-shared=no --disable-zstd $(call
20 $(call if_npkg,libwebp,--disable-webp)
21 twolame.cfg_params?=--enable-shared=no
22 x264.cfg_params?= --enable-static --enable-pic
23 -x265.cfg_vars?=$(call cmake_config,source)
24 -x265.cfg_params?= -DENABLE_SHARED=no
25 +x265.cfg_vars?=chmod +x ./configure; chmod +x ./multilib.sh;
26 +#x265.cfg_vars?=$(call cmake_config,source)
27 +#x265.cfg_params?= -DENABLE_SHARED=no
28 libvpx.cfg_params?= --enable-pic --disable-avx512 --enable-vp9-highbitdepth --disable-examples --disable-unit_tests
31 diff --git a/cinelerra-5.1/thirdparty/src/x265_3.5.patch1 b/cinelerra-5.1/thirdparty/src/x265_3.5.patch1
34 +++ b/cinelerra-5.1/thirdparty/src/x265_3.5.patch1
36 +--- /dev/null 2020-03-14 06:02:18.586124011 +0300
37 ++++ ./configure 2020-03-18 00:04:59.360807192 +0300
40 diff --git a/cinelerra-5.1/thirdparty/src/x265_3.5.patch2 b/cinelerra-5.1/thirdparty/src/x265_3.5.patch2
43 +++ b/cinelerra-5.1/thirdparty/src/x265_3.5.patch2
45 +--- /dev/null 2020-03-14 06:02:18.586124011 +0300
46 ++++ ./Makefile 2020-03-18 00:04:59.388807329 +0300
48 ++#$(shell cd build/linux ; ./multilib.sh)
51 ++ $(shell ./multilib.sh ; cp 8bit/libx265.a . ; cp 8bit/x265.pc . ; cp 8bit/x265_config.h .)
52 diff --git a/cinelerra-5.1/thirdparty/src/x265_3.5.patch3 b/cinelerra-5.1/thirdparty/src/x265_3.5.patch3
55 +++ b/cinelerra-5.1/thirdparty/src/x265_3.5.patch3
57 +--- /dev/null 2020-07-19 09:07:01.788494015 +0300
58 ++++ ./multilib.sh 2020-08-02 02:34:58.444933214 +0300
62 ++mkdir -p 8bit 10bit 12bit
66 ++if [ $(uname -m) == 'x86_64' ]; then
67 ++ # 64-bit stuff here
68 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
70 ++ # 32-bit stuff here
71 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF -DMAIN12=ON
76 ++if [ $(uname -m) == 'x86_64' ]; then
77 ++ # 64-bit stuff here
78 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=ON -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
80 ++ # 32-bit stuff here
81 ++cmake ../source -DHIGH_BIT_DEPTH=ON -DENABLE_ASSEMBLY=OFF -DEXPORT_C_API=OFF -DENABLE_SHARED=OFF -DENABLE_CLI=OFF
86 ++ln -sf ../10bit/libx265.a libx265_main10.a
87 ++ln -sf ../12bit/libx265.a libx265_main12.a
88 ++cmake ../source -DEXTRA_LIB="x265_main10.a;x265_main12.a" -DENABLE_SHARED=OFF -DEXTRA_LINK_FLAGS=-L. -DLINKED_10BIT=ON -DLINKED_12BIT=ON
91 ++# rename the 8bit library, then combine all three into libx265.a
92 ++mv libx265.a libx265_main.a
95 ++if [ "$uname" = "Linux" ]
98 ++# On Linux, we use GNU ar to combine the static libraries together
101 ++ADDLIB libx265_main.a
102 ++ADDLIB libx265_main10.a
103 ++ADDLIB libx265_main12.a
111 ++libtool -static -o libx265.a libx265_main.a libx265_main10.a libx265_main12.a 2>/dev/null