-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathscriptbuilder.cpp
More file actions
106 lines (84 loc) · 3.98 KB
/
Copy pathscriptbuilder.cpp
File metadata and controls
106 lines (84 loc) · 3.98 KB
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
/****************************************************************************
* Copyright (C) 2022 DaGoose
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include "scriptbuilder.hpp"
QString ScriptBuilder::_scriptList;
#ifdef Q_OS_WINDOWS
void ScriptBuilder::setRIFECuda(int id, double model, int num, int den, double scale, QString sc, QString trt) {
_scriptList.append(VapourSynth::rifeCuda(id, model, num, den, scale, sc, trt));
}
#endif
void ScriptBuilder::setRIFENcnn(int model, int id, int thread, QString tta, QString uhd, QString sc) {
_scriptList.append(VapourSynth::rifeNcnn(model, id, thread, tta, uhd, sc));
}
void ScriptBuilder::setRIFENcnnNew(int model, int id, int thread, int num, int den, QString tta, QString uhd, QString sc) {
_scriptList.append(VapourSynth::rifeNcnnNew(model, id, thread, num, den, tta, uhd, sc));
}
#ifdef Q_OS_WINDOWS
void ScriptBuilder::setSVPFlowNoob(QString useGPU, int id, int shader, int mask, int mode, int num, int den) {
_scriptList.append(VapourSynth::svpFlowNoob(useGPU, id, shader, mask, mode, num, den));
}
void ScriptBuilder::setSVPFlow(QString super, QString analyse, QString smooth, int num, int den) {
_scriptList.append(VapourSynth::svpFlow(super, analyse, smooth, num, den));
}
#endif
void ScriptBuilder::setWaifu2x(int noise, int scale, int model, int id, int thread, int precision, bool dual, int gpu1, int gpu2) {
_scriptList.append(VapourSynth::waifu2x(noise, scale, model, id, thread, precision, dual, gpu1, gpu2));
}
#ifdef Q_OS_DARWIN
void ScriptBuilder::setSRMD(int scale, int noise, int id, int thread, QString tta) {
_scriptList.append(VapourSynth::srmd(scale, noise, id, thread, tta));
}
#endif
void ScriptBuilder::setRealSR(int id, int thread, QString tta, bool dual, int gpu1, int gpu2) {
_scriptList.append(VapourSynth::realSR(id, thread, tta, dual, gpu1, gpu2));
}
void ScriptBuilder::setRGB(QString matrix, QString transfer, QString primaries) {
_scriptList.append(VapourSynth::rgb(matrix, transfer, primaries));
}
void ScriptBuilder::setAntiA() {
_scriptList.append(VapourSynth::antiA());
}
void ScriptBuilder::setColorsInOut(QString format, QString matrixIn, QString transferIn, QString primariesIn, QString matrix, QString transfer, QString primaries) {
_scriptList.append(VapourSynth::colorsInOut(format, matrixIn, transferIn, primariesIn, matrix, transfer, primaries));
}
void ScriptBuilder::setColorsOut(QString format, QString matrix, QString transfer, QString primaries) {
_scriptList.append(VapourSynth::colorsOut(format, matrix, transfer, primaries));
}
void ScriptBuilder::setSCDetect(QString threshold) {
_scriptList.append(VapourSynth::scDetect(threshold));
}
void ScriptBuilder::setPlugin(QString path) {
_scriptList.append(VapourSynth::plugin(path));
}
void ScriptBuilder::setInput(QString path, QString id) {
_scriptList.append(VapourSynth::input(path, id));
}
void ScriptBuilder::setInclude() {
_scriptList.append(VapourSynth::include());
}
void ScriptBuilder::setConcludeClip() {
_scriptList.append(VapourSynth::concludeClip());
}
void ScriptBuilder::setNewLine() {
_scriptList.append(VapourSynth::newLine());
}
void ScriptBuilder::clearScript() {
_scriptList.clear();
}
QString ScriptBuilder::getScript() {
return(_scriptList);
}