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
|
#!/bin/sh
# This scripts generates the FILTERS manpage section for transcode(1)
# It takes no arguments.
#
# If you want a new filter to be automatically documented, add it here to the
# list.
#
# After running the script, replace the FILTERS section in transcode.1 with the
# content of output.1
#
# (c) 2003 Tilmann Bitterberg
# Mon Sep 8 11:14:10 CEST 2003
#config
helpfile="filter-help.txt"
outfile="output.1"
# all filters to process
filter_list="
filter_29to23.so
filter_32detect.so
filter_32drop.so
filter_aclip.so
filter_astat.so
filter_clone.so
filter_compare.so
filter_control.so
filter_cpaudio.so
filter_cshift.so
filter_cut.so
filter_decimate.so
filter_denoise3d.so
filter_detectclipping.so
filter_detectsilence.so
filter_dilyuvmmx.so
filter_divxkey.so
filter_dnr.so
filter_doublefps.so
filter_extsub.so
filter_fieldanalysis.so
filter_fields.so
filter_fps.so
filter_hqdn3d.so
filter_invert.so
filter_ivtc.so
filter_levels.so
filter_logo.so
filter_logoaway.so
filter_lowpass.so
filter_mask.so
filter_modfps.so
filter_msharpen.so
filter_nored.so
filter_normalize.so
filter_null.so
filter_pp.so
filter_preview.so
filter_pv.so
filter_resample.so
filter_skip.so
filter_slowmo.so
filter_smartbob.so
filter_smartdeinter.so
filter_smartyuv.so
filter_smooth.so
filter_subtitler.so
filter_tc_audio.so
filter_tc_video.so
filter_test.so
filter_testframe.so
filter_text.so
filter_tomsmocomp.so
filter_unsharp.so
filter_videocore.so
filter_whitebalance.so
filter_xsharpen.so
filter_yuvdenoise.so
filter_yuvmedian.so
"
text=""
get_help_to_filter() {
name=$1
text=`sed -n "/^---------------------->\[ ${name}.help/,/^<----------------------|$/{
/^---------------------->\[ ${name}.help/d
/^<----------------------|$/d
p;
}" $helpfile`
}
>$outfile
for i in $filter_list;
do
name=`echo $i | sed -e 's/[^_]*_//' -e 's/\.so//'`
echo -n "Processing $name .."
# rm -f $name.1 $name.txt
tcmodinfo -i $name 2>&1| sed -n '/^START/,/^END/p' |
sed '
/START/{
N
/\nEND/d
s/START\n//
bread
}
beer
:read
{
h
# name comment version author flags
s|"filter_\([^.]*\)\.so", "\([^"]*\)", "\([^"]*\)", "\([^"]*\)", "\([^"]*\)",.*$|.TP 4\
\\fB\1\\fP - \\fB\2\\fP\
\\fB\1\\fP was written by \4. The version documented here is \3. |
x
# extract flags
s/"filter_[^.]*\.so", "[^"]*", "[^"]*", "[^"]*", "\([^"]*\)",.*$/\1/
s/V.*A/This is a video and audio filter. /
s/A.*V/This is a video and audio filter. /
s/V/This is a video filter. /
s/A/This is a audio filter. /
s/4.*R.*Y/It can handle rgb,yuv and yuv422 mode. /
s/R.*4.*Y/It can handle rgb,yuv and yuv422 mode. /
s/R.*Y.*4/It can handle rgb,yuv and yuv422 mode. /
s/R.*Y/It can handle rgb and yuv mode. /
s/Y.*R/It can handle rgb and yuv mode. /
s/Y.*4/It can handle yuv and yuv422 mode. /
s/4.*Y/It can handle yuv and yuv422 mode. /
s/R/It can handle rgb mode only. /
s/Y/It can handle yuv mode only. /
s/M.*E.*O/It supports multiple instances and can run as a pre and\/or as a post filter. /
s/E.*O.*M/It supports multiple instances and can run as a pre and\/or as a post filter. /
s/O.*M.*E/It supports multiple instances and can run as a pre and\/or as a post filter. /
s/M/It supports multiple instances. /
s/E.*O/It can be used as a pre or as a post filter. /
s/O.*E/It can be used as a pre or as a post filter. /
s/E/It is a pre only filter. /
s/O/It is a post only filter. /
# fixup
s/rgb/RGB/g
s/yuv/YUV/g
s/pre/pre-processing/g
s/post/post-processing/g
x;
G
s/\(.*\)\n\([^\n]*\)/\1\2/
s/ *$/\
.IP\
.RS/
p
d
}
:eer
#now the fields
# "normal field"
s|"\([^"]*\)", "\([^"]*\)", "\([^"]*\)", "\([^"]*\)", .*|\\(bu \
.I \1 \
= \\fI\3\\fP [default \\fI\4\\fP] \
.RS 3\
\2\
.RE|
# string
s|"\([^"]*\)", "\([^"]*\)", "\(%s\)", "\([^"]*\)"|\\(bu \
.I \1 \
= \\fI\3\\fP\
.RS 3\
\2\
.RE|
# bool
s|"\([^"]*\)", "\([^"]*\)", "\([^"]*\)", "\([^"]*\)"|\\(bu \
.I \1 \
(bool) \
.RS 3\
\2\
.RE|
/^END/d
'>> $outfile
get_help_to_filter $name
if [ ! -z "$text" ]; then
echo ".IP" >> $outfile
echo "$text" >> $outfile 2>/dev/null
fi
echo -e ".RE" >> $outfile
echo " done"
done
# empty lines removal
sed '
/\.IP/{
N;
N;
/\.IP\n\.RS\n\.RE/d
}' $outfile > $outfile.new
mv $outfile.new $outfile
|