<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://avisynth.nl/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=MaskTools%2FYV12LUT</id>
		<title>MaskTools/YV12LUT - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=MaskTools%2FYV12LUT"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=MaskTools/YV12LUT&amp;action=history"/>
		<updated>2026-04-07T18:50:23Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php?title=MaskTools/YV12LUT&amp;diff=185&amp;oldid=prev</id>
		<title>Admin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=MaskTools/YV12LUT&amp;diff=185&amp;oldid=prev"/>
				<updated>2013-05-09T15:02:00Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:02, 9 May 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=MaskTools/YV12LUT&amp;diff=184&amp;oldid=prev</id>
		<title>Gzarkadas at 22:51, 28 February 2008</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=MaskTools/YV12LUT&amp;diff=184&amp;oldid=prev"/>
				<updated>2008-02-28T22:51:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FilterCat|External_filters|Other_filters|Support_filters}}&lt;br /&gt;
&lt;br /&gt;
{{Func4Def | YV12LUT (clip[, string &amp;quot;yexpr&amp;quot;[, string &amp;quot;uexpr&amp;quot;[, string &amp;quot;vexpr&amp;quot;]]])&lt;br /&gt;
| YUY2LUT (clip[, string &amp;quot;yexpr&amp;quot;[, string &amp;quot;uexpr&amp;quot;[, string &amp;quot;vexpr&amp;quot;]]])&lt;br /&gt;
| RGBLUT (clip[, string &amp;quot;Rexpr&amp;quot;[, string &amp;quot;Gexpr&amp;quot;[, string &amp;quot;Bexpr&amp;quot;[, string &amp;quot;AMPFile&amp;quot;]]]])&lt;br /&gt;
| YV12LUTxy (clipx, clipy[, string &amp;quot;yexpr&amp;quot;[, string &amp;quot;uexpr&amp;quot;[, string &amp;quot;vexpr&amp;quot;]]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Plugin''': [[MaskTools]]&lt;br /&gt;
&lt;br /&gt;
These filters apply a function to each pixel of the picture. In order to allow a fast computation, every possible value of the function are precomputed and stored in a Look-Up Table (hence the name). That makes the filters fairly fast. &lt;br /&gt;
&lt;br /&gt;
{{FuncDef|RGBLUT}} works exactly the same way as {{FuncDef|YV12LUT}}, except that it has an additional argument &amp;lt;tt&amp;gt;AMPFile&amp;lt;/tt&amp;gt;. It allows you to load a photoshop color profile. &lt;br /&gt;
&lt;br /&gt;
In order to be able to apply almost every possible function, this one is given by a string which represents an expression in reverse polish notation. The principle of this notation is to write first the operands / parameters of an operator / function, and then the operator / function itself. Hence, &amp;quot;3 + 7&amp;quot; becomes &amp;quot;3 7 +&amp;quot;, and &amp;quot;sin(3)&amp;quot; becomes &amp;quot;3 sin&amp;quot;. Going further in the explanations, &amp;quot;3 * 7 + 5&amp;quot; becomes &amp;quot;3 7 * 5 +&amp;quot;, and &amp;quot;(3 + 7) * 5&amp;quot; : &amp;quot;3 7 + 5 *&amp;quot;. Now, you understand the main asset of this notation: no need of parenthesis.&lt;br /&gt;
&lt;br /&gt;
Computations are lead on real numbers. Positive numbers also represent a true statement, whereas negative numbers represent a false statement. In the string, the symbol &amp;quot;x&amp;quot; is tha value of the pixel before the use of the function. For {{FuncDef|YV12LUTxy}} you also have the symbol &amp;quot;y&amp;quot;, which represents the value of the collocated pixel in the second clip. The symbols must be separated by a single space.&lt;br /&gt;
&lt;br /&gt;
Some '''operators''' and '''functions''' are implemented :&lt;br /&gt;
&lt;br /&gt;
* +, -, /, *, ^, % are the operators plus, minus, divide, multiply, power and modulo.&lt;br /&gt;
* &amp;amp;, |, °, !&amp;amp; are the logical operators and, or, xor, and not. If the result is true, they return 1.0, else -1.0.&lt;br /&gt;
* &amp;lt;, &amp;lt;=, &amp;gt;, &amp;gt;=, =, != are the relationnal operators less than, less or equal to, more than, more or equal to, equal to, not equal to. If the result is true, they return 1.0, else -1.0.&lt;br /&gt;
* cos, sin, tan, acos, asin, atan, exp, log, abs are the functions cosine, sine, tangent, arccosine, arcsine, arctangent, exponential, napierian logarithm, absolute value.&lt;br /&gt;
* ? allows to do a condition test. It's a ternary operator, the first operand being the condition, the second the value if the condition is true, the third if false.&lt;br /&gt;
&lt;br /&gt;
Some '''examples''':&lt;br /&gt;
&lt;br /&gt;
* Binarization of the picture with a threshold at 128:&lt;br /&gt;
 &amp;quot;x 128 &amp;lt; 0 255 ?&amp;quot;&lt;br /&gt;
: It is translated as:&lt;br /&gt;
 &amp;quot;(x &amp;lt; 128) ? 0 : 255&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Levels(il, gamma, ih, ol, oh) (have a look at the filter [[Levels]]):&lt;br /&gt;
 &amp;quot;x il - ih il - / 1 gamma / ^ oh ol - *&amp;quot;&lt;br /&gt;
: It is translated as:&lt;br /&gt;
 &amp;quot;(((x - il) / (ih - il)) ^ (1 / gamma)) * (oh - ol)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Defaults are: &amp;lt;tt&amp;gt;Yexpr&amp;lt;/tt&amp;gt; = &amp;lt;tt&amp;gt;Uexpr&amp;lt;/tt&amp;gt; = &amp;lt;tt&amp;gt;Vexpr&amp;lt;/tt&amp;gt; = &amp;quot;x&amp;quot; (hence, the filter does nothing ). &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Back to [[MaskTools]].&lt;/div&gt;</summary>
		<author><name>Gzarkadas</name></author>	</entry>

	</feed>