MaskTools2/mt makediff
From Avisynth wiki
(Difference between revisions)
m (test) |
|||
Line 1: | Line 1: | ||
{{FilterCat4|External_filters|Plugin_functions|Other_filters|Support_filters}} | {{FilterCat4|External_filters|Plugin_functions|Other_filters|Support_filters}} | ||
+ | == Description == | ||
mt_makediff subtracts two clips; equivalent to mt_lutxy("x y - 128 +"), but faster. | mt_makediff subtracts two clips; equivalent to mt_lutxy("x y - 128 +"), but faster. | ||
<br> | <br> |
Latest revision as of 13:03, 27 October 2014
[edit] Description
mt_makediff subtracts two clips; equivalent to mt_lutxy("x y - 128 +"), but faster.
[edit] Syntax and Parameters
- mt_makediff (clip, clip, int "Y", int "U", int"V", string "chroma", int "offX", int "offY", int "w" int "h")
- clip =
- Input clip one.
- clip =
- clip =
- Input clip two.
- clip =
- int Y = 3
- int U = 1
- int V = 1
- These three values describe the actual processing mode that is to be used on each plane / channel. Here is how the modes are coded :
- x = -255...0 : all the pixels of the plane will be set to -x.
- x = 1 : the plane will not be processed. That means the content of the plane after the filter is pure garbage.
- x = 2 : the plane of the first input clip will be copied.
- x = 3 : the plane will be processed with the processing the filter is designed to do.
- x = 4 : the plane of the second input clip will be copied.
- These three values describe the actual processing mode that is to be used on each plane / channel. Here is how the modes are coded :
- int Y = 3
- string chroma = ""
- When defined, the value contained in this string will overwrite the U and V processing modes.
- This is a nice addition proposed by mg262 that makes the filter more user friendly. Allowed values for chroma are:
- "process" : set u = v = 3.
- "copy" or "copy first" : set u = v = 2.
- "copy second" : set u = v = 4.
- "xxx", where xxx is a number : set u = v = -xxx.
- string chroma = ""
- int offX = 0
- int offY = 0
- offX and offY are the top left coordinates of the box where the actual processing shall occur. Everything outside that box will be garbage.
- int offX = 0
- int w = -1
- int h = -1
- w and h are the width and height of the processed box. -1 means that the box extends to the lower right corner of the video. That also means that default settings are meant to process the whole picture.
- int w = -1
[edit] Examples
mt_makediff with default settings:
clip1 = original clip2 = processed
mt_makediff(clip1, clip2, Y=3, U=1, V=1, chroma="", w=-1, h=-1)
Back to MaskTools2 ←