-
Notifications
You must be signed in to change notification settings - Fork 0
/
vs-plugins.zsh
executable file
·318 lines (284 loc) · 9.48 KB
/
vs-plugins.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
#!/usr/bin/env zsh
# flags
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=x86-64 -mtune=intel -O2 -pipe -fno-plt -fstack-protector-stron -ftree-vectorize"
CXXFLAGS="${CFLAGS}"
MAKEFLAGS="-j4"
# folders
BIN="${HOME}/bin/"
cd ${BIN}
root_dir="${PWD}/vapoursynth-plugins"
plugins_dir="${root_dir}/plugins"
packages_dir="${root_dir}/packages"
sysPlugins="${PWD}/vpy-plugins"
sysPackages="${PWD}/vpy-packages"
mkdir -p "${plugins_dir}"
mkdir -p "${packages_dir}"
cd "${root_dir}"
# make dep: meson ninja boost
function meson-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
meson build
ninja -C build
mv ./build/*.so "${plugins_dir}"
echo ''
}
function meson-cd2vpy-build() {
cd "${root_dir}"
git clone ${1} --depth 1 -b ${2}
name=${1#https://github.com/*/}
name=${name%}
if [[ -d ${name}/VapourSynth ]]; then
cd ${name}/VapourSynth
elif [[ -d ${name}/vapoursynth ]]; then
cd ${name}/vapoursynth
fi
meson build
ninja -C build
mv ./build/*.so "${plugins_dir}"
echo ''
}
function py-copy() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://*github.com/*/}
name=${name%}
mv ./${name}/*.py "${packages_dir}"
echo ''
}
function py-copy-name() {
cd "${root_dir}"
if [[ ! ${3} ]]; then
git clone ${1} --depth 1
else
git clone ${1} --depth 1 -b ${3}
fi
name=${1#https://*github.com/*/}
name=${name%}
mv ./${name}/${2} "${packages_dir}"
echo ''
}
# function py-copy-folder() {
# cd "${root_dir}"
# git clone ${1} --depth 1
# name=${1#https://*github.com/*/}
# name=${name%}
# mv ./${name}/${2} "${packages_dir}"
# echo ''
# }
# make dep: yasm essential nasm
function x265-build() {
cd ${BIN}
git clone https://bitbucket.org/multicoreware/x265_git --depth 1 -b ${1}
cd x265_git
# git apply ~/downloads/x265-x265-1-of-2-Histogram-based-scenecut-detection.patch
cd build/linux
cmake ../../source -D HIGH_BIT_DEPTH=ON
make
rm ${BIN}/vpy-x265/libx265.so.[0-9]*
cp ./x265 ./libx265.so.[0-9]* ${BIN}/vpy-x265/
rm -rf ${BIN}/x265_git
}
function x265-build-mod() {
cd ${BIN}
git clone https://github.com/msg7086/x265-Yuuki-Asuna --depth 1 -b ${1}
cd x265-Yuuki-Asuna
cd build/linux
cmake ../../source -D HIGH_BIT_DEPTH=ON
make
rm ${BIN}/vpy-x265/libx265.so.[0-9]*
cp ./x265 ./libx265.so.[0-9]* ${BIN}/vpy-x265/
rm -rf ${BIN}/x265_git
}
function autotools-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
./autogen.sh
./configure --extra-cxxflags="${CXXFLAGS}"
make
mv ./.libs/*.so "${plugins_dir}"
echo ''
}
function autotools-bilateral() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
./configure --extra-cxxflags="${CXXFLAGS}"
make
mv ./*.so "${plugins_dir}"
echo ''
}
function descale-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
meson build
ninja -C build
mv ./build/*.so "${plugins_dir}"
mv ./*.py "${packages_dir}"
echo ''
}
function znedi3-build() {
cd "${root_dir}"
git clone ${1} --depth 1 --recursive
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
make X86=1
mv vsznedi3.so "${plugins_dir}"
mv nnedi3_weights.bin "${plugins_dir}"
echo ''
}
function fmtconv-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd "${name}/build/unix"
./autogen.sh
./configure --extra-cxxflags="${CXXFLAGS}"
make
mv ./.libs/*.so "${plugins_dir}"
echo ''
}
function f3kdb-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
./waf configure
./waf build
mv ./build/*.so "${plugins_dir}"
echo ''
}
function neo-f3kdb-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
mkdir -p build && cd build
cmake ../
cmake --build .
mv ../build/*.so "${plugins_dir}"
echo ''
}
function cmake-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://github.com/*/}
name=${name%}
cd ${name}
mkdir -p build && cd build
cmake ../
cmake --build .
mv ../x64/*.so "${plugins_dir}"
echo ''
}
# make dep: rust
function cargo-build() {
cd "${root_dir}"
git clone ${1} --depth 1
name=${1#https://*/*/}
name=${name%}
cd ${name}
cargo build --release
mv ./target/release/*.so "${plugins_dir}"
echo ''
}
function py-dl() {
cd "${root_dir}"
wget ${1}
mv ./*.py "${packages_dir}"
echo ''
}
function vpy-build() {
cargo-build https://github.com/Irrational-Encoding-Wizardry/adaptivegrain
cargo-build https://github.com/End-of-Eternity/vs-average
meson-build https://github.com/vapoursynth/subtext
meson-build https://github.com/vapoursynth/vivtc
meson-build https://github.com/vapoursynth/vs-imwri
meson-build https://github.com/vapoursynth/vs-miscfilters-obsolete
meson-build https://github.com/vapoursynth/vs-removegrain
# meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Bwdif
# meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-DCTFilter
# meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Deblock
# meson-build https://github.com/Khanattila/KNLMeansCL
# meson-build https://github.com/Kiyamou/VapourSynth-JincResize
# meson-build https://github.com/Lypheo/vs-placebo
# meson-cd2vpy-build https://github.com/AmusementClub/ReduceFlicker
meson-build https://github.com/Beatrice-Raws/VapourSynth-TColorMask
meson-build https://github.com/DeadNews/EdgeFixer
meson-build https://github.com/dubhater/vapoursynth-awarpsharp2
meson-build https://github.com/dubhater/vapoursynth-mvtools
meson-build https://github.com/dubhater/vapoursynth-temporalsoften2
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-AddGrain
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-BM3D
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-CAS
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-CTMF
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-DFTTest
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-EEDI3
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-NNEDI3CL
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Retinex
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-TCanny
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-TTempSmooth
meson-build https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Yadifmod
meson-build https://github.com/Irrational-Encoding-Wizardry/Vapoursynth-RemapFrames
meson-cd2vpy-build https://github.com/AkarinVS/L-SMASH-Works 'ffmpeg-4.5'
# neo-f3kdb-build https://github.com/HomeOfAviSynthPlusEvolution/neo_f3kdb
autotools-bilateral https://github.com/HomeOfVapourSynthEvolution/VapourSynth-Bilateral
autotools-build https://github.com/dubhater/vapoursynth-histogram
autotools-build https://github.com/dubhater/vapoursynth-nnedi3
descale-build https://github.com/Irrational-Encoding-Wizardry/vapoursynth-descale
f3kdb-build https://github.com/SAPikachu/flash3kyuu_deband
fmtconv-build https://github.com/EleonoreMizo/fmtconv
znedi3-build https://github.com/sekrit-twc/znedi3
# py-copy https://gist.github.com/chikuzen/5005590 # easyvfr
# py-copy https://github.com/AmusementClub/mvsfunc/
# py-copy https://gitlab.com/Ututu/adptvgrnmod
py-copy https://gist.github.com/4re/342624c9e1a144a696c6 # nnedi3_rpow2
py-copy https://gist.github.com/4re/8676fd350d4b5b223ab9 # finesharp
py-copy https://github.com/DeadNews/vs-insane-aa
py-copy https://github.com/dubhater/vapoursynth-adjust
py-copy https://github.com/fdar0536/VapourSynth-Contra-Sharpen-mod
py-copy https://github.com/HomeOfVapourSynthEvolution/havsfunc
py-copy https://github.com/HomeOfVapourSynthEvolution/mvsfunc
py-copy https://github.com/HomeOfVapourSynthEvolution/nnedi3_resample
py-copy https://github.com/Irrational-Encoding-Wizardry/fvsfunc
py-copy https://github.com/WolframRhodium/muvsfunc
py-copy-name https://github.com/Irrational-Encoding-Wizardry/kagefunc 'kagefunc.py'
py-copy-name https://github.com/Irrational-Encoding-Wizardry/lvsfunc 'lvsfunc'
py-copy-name https://github.com/Irrational-Encoding-Wizardry/vsutil 'vsutil'
py-dl https://www.dropbox.com/s/2fw0mm0mswng234/HardAA.py
cp -R ${plugins_dir}/* ${sysPlugins}
cp -R ${packages_dir}/* ${sysPackages}
rm -rf ${root_dir}
}
function test-build() {
# znedi3-build https://github.com/sekrit-twc/znedi3
# znedi3-build https://github.com/JeremyMahieu/znedi3
}
function system-build() {
rm ~/.cache/yay/vapoursynth-git/vapoursynth-git-*.pkg.tar.zst
yes | yay -S --rebuildtree vapoursynth-git
rm ~/bin/vpy-plugins/vapoursynth-git-*.pkg.tar.zst
cp ~/.cache/yay/vapoursynth-git/*.pkg.tar.zst ~/bin/vpy-plugins/
}
# system-build
vpy-build
# test-build
# x265-build stable
# x265-build master
# x265-build-mod Yuuki