-
Notifications
You must be signed in to change notification settings - Fork 0
/
ShowCombedTIVTC - READ ME.txt
218 lines (127 loc) · 7.25 KB
/
ShowCombedTIVTC - READ ME.txt
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
ShowCombedTIVTC v1.2 - HELP FILE (03/23/2006)
GENERAL INFO:
* Currently ShowCombedTIVTC only supports YV12 and YUY2 colorspaces!
ShowCombedTIVTC provides an easy means to tweak the combed frame detection parameters
of TFM (cthresh, MI, chroma, blockx, blocky, metric) and to see how they effect which pixels
are detected as combed and what blocks have values above MI. IsCombedTIVTC is a utility
function that can be used within AviSynth's conditionalfilter, and uses TFM's inbuilt combed
frame detection, to test whether or not a frame is combed and returns true if it is and
false if it isn't.
syntax=>
ShowCombedTIVTC(int cthresh, bool chroma, int MI, int blockx, int blocky,
int metric, bool debug, int display, bool fill, int opt)
IsCombedTIVTC(int cthresh, int MI, bool chroma, int blockx, int blocky,
int metric, int opt)
example usage of IsCombedTIVTC =>
conditionalfilter(last,source1,source2,"IsCombedTIVTC","=","true")
PARAMETERS:
The cthresh/MI/chroma/blockx/blocky/metric parameters are exactly the same as the
corresponding parameters in TFM so I have just copied their descriptions.
cthresh -
This is the area combing threshold used for combed frame detection. It is like
dthresh or dthreshold in telecide() and fielddeinterlace(). This essentially
controls how "strong" or "visible" combing must be to be detected. Larger values
mean combing must be more visible and smaller values mean combing can be less
visible or strong and still be detected. Valid settings are from -1 (every pixel
will be detected as combed) to 255 (no pixel will be detected as combed). This
is basically a pixel difference value. A good range is between 8 to 12.
Default: 9 (int)
MI -
The # of combed pixels inside any of the blocky by blockx size blocks on the frame
for the frame to be detected as combed. While cthresh controls how "visible" the
combing must be, this setting controls "how much" combing there must be in any localized
area (a window defined by the blockx and blocky settings) on the frame. Min setting = 0,
max setting = blocky x blockx (at which point no frames will ever be detected as combed).
Default: 80 (int)
chroma -
Sets whether or not chroma is considered in the combed frame decision. Only
disable this if your source has chroma problems (rainbowing, etc...) that are
causing problems for the combed frame detection with chroma enabled. Actually,
setting this to false is usually a good idea unless there is chroma only combing
in the source.
true = chroma is included
false = chroma is not included
Default: false (bool)
blockx -
Sets the x-axis size of the window used during combed frame detection. This has
to do with the size of the area in which MI number of pixels are required to be
detected as combed for a frame to be declared combed. See the MI parameter
description for more info. Possible values are any number that is a power of
2 starting at 4 and going to 2048 (i.e. 4, 8, 16, 32, ... 2048).
Default: 16 (int)
blocky -
Sets the y-axis size of the window used during combed frame detection. This has
to do with the size of the area in which MI number of pixels are required to be
detected as combed for a frame to be declared combed. See the MI parameter
description for more info. Possible values are any number that is a power of
2 starting at 4 and going to 2048 (i.e. 4, 8, 16, 32, ... 2048).
Default: 16 (int)
metric -
Sets which spatial combing metric is used to detect combed pixels. Possible
options:
Assume 5 neighboring pixels (a,b,c,d,e) positioned vertically.
a
b
c
d
e
0: d1 = c - b;
d2 = c - d;
if ((d1 > cthresh && d2 > cthresh) || (d1 < -cthresh && d2 < -cthresh))
{
if (abs(a+4*c+e-3*(b+d)) > cthresh*6) it's combed;
}
1: val = (b - c) * (d - c);
if (val > cthresh*cthresh) it's combed;
Metric 0 is what is/showcombedtivtc used previous to v1.2. Metric 1 is the
combing metric used in Donald Graft's FieldDeinterlace()/IsCombed() funtions
in decomb.dll.
Default: 0 (int)
opt -
Controls which optimizations are used. Possible settings:
0 - use c routines
1 - use mmx routines
2 - use isse routines
3 - use sse2 routines
4 - auto detect
Default: 4 (int)
The following parameters are only used by ShowCombedTIVTC and not by IsCombedTIVTC!
debug -
For each frame the mic value, along with the number of detected combed pixels and
number of blocks with mic counts above MI will be output via OutDebugString().
You can use the free program "Debugview" to view this output. When a frame has a
mic value > MI the debug output will output a combed frame detected message.
Default: false (bool)
display -
Controls what is written and/or drawn on the output frame. Possible settings:
0 - pixels detected as combed are marked in white
1 - the block with the highest count value will be either outlined or
filled in white depending on the value of the "fill" parameter
2 - all blocks with counts above MI will be either outlined or filled
in white depending on the value of the "fill" parameter
3 - 0 + 1
4 - 0 + 2
5 - nothing, no output
Options 0-4 also output all of the information that is output via the debug
option (# pixels detected as combed, # blocks with counts > MI, MIC value of
frame).
Default: 3 (int)
fill -
Only used by display = 1, 2, 3, 4. If fill is set to true then blocks are filled
in white with a black single pixel mark in the center. If fill is set to false
then blocks are outlined in white/black (depending on background color).
Default: false (bool)
CHANGE LIST:
(12/07/2006)
- fixed IsCombedTIVTC causing tfm to throw an error on construction resulting
in invalid output
v1.2 - (03/23/2006)
+ added new spatial combing metric (metric=1) and metric parameter
- replace frame copy with makewritable
- fixed cthresh < 0 not working correctly
v1.1 - (01/24/2006)
+ ported mmx/isse/sse2 optimizations from tfm
+ added opt parameter
TO DO LIST:
- nothing
contact: forum.doom9.org nick = tritical or email: kes25c@mizzou.edu