<?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=AddStaticGrainM_source</id>
		<title>AddStaticGrainM source - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=AddStaticGrainM_source"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=AddStaticGrainM_source&amp;action=history"/>
		<updated>2026-04-07T17:50:57Z</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=AddStaticGrainM_source&amp;diff=7419&amp;oldid=prev</id>
		<title>Raffriff42: Category:Script_Source-&gt;Scripts</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=AddStaticGrainM_source&amp;diff=7419&amp;oldid=prev"/>
				<updated>2015-12-13T23:01:48Z</updated>
		
		<summary type="html">&lt;p&gt;Category:Script_Source-&amp;gt;Scripts&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:01, 13 December 2015&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Script_source&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Scripts&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;source: http://pastebin.com/raw.php?i=wLSpAKHZ&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;source: http://pastebin.com/raw.php?i=wLSpAKHZ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Raffriff42</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=AddStaticGrainM_source&amp;diff=7128&amp;oldid=prev</id>
		<title>Raffriff42: added category</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=AddStaticGrainM_source&amp;diff=7128&amp;oldid=prev"/>
				<updated>2015-11-12T07:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;added category&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 07:38, 12 November 2015&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Script_source]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;source: http://pastebin.com/raw.php?i=wLSpAKHZ&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;source: http://pastebin.com/raw.php?i=wLSpAKHZ&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Raffriff42</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=AddStaticGrainM_source&amp;diff=7111&amp;oldid=prev</id>
		<title>Raffriff42: source, from pastebin.com</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=AddStaticGrainM_source&amp;diff=7111&amp;oldid=prev"/>
				<updated>2015-11-12T06:47:20Z</updated>
		
		<summary type="html">&lt;p&gt;source, from pastebin.com&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;source: http://pastebin.com/raw.php?i=wLSpAKHZ&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
function AddStaticGrainM(clip orig, int &amp;quot;cont&amp;quot;, int &amp;quot;bright&amp;quot;, int &amp;quot;grain&amp;quot;, int &amp;quot;mode&amp;quot;, float &amp;quot;mThresh&amp;quot;, bool &amp;quot;showmask&amp;quot;) {&lt;br /&gt;
#######################################&lt;br /&gt;
#&lt;br /&gt;
# Requires:&lt;br /&gt;
#   - AddGrain()&lt;br /&gt;
#   - RemoveGrain()&lt;br /&gt;
#   - MaskTools2&lt;br /&gt;
#   - gradfunkmirror()&lt;br /&gt;
#   - GradFun2dbMod()&lt;br /&gt;
#&lt;br /&gt;
#######################################&lt;br /&gt;
#&lt;br /&gt;
# cont - cont value of Tweak(). Lower value means weaker mask        &lt;br /&gt;
#   Default 4&lt;br /&gt;
#&lt;br /&gt;
# bright - bright value of Tweak(). Lower value means stronger mask. &lt;br /&gt;
#   Default -128&lt;br /&gt;
#&lt;br /&gt;
# mode - values from 0 to 2&lt;br /&gt;
#       0 - no preprocessing&lt;br /&gt;
#       1 - preprocessing using gradfunkmirror()&lt;br /&gt;
#       2 - preprocessing using gradfun2dbmod()&lt;br /&gt;
#   Default 1&lt;br /&gt;
#&lt;br /&gt;
# mThresh - preprocessing strength&lt;br /&gt;
#   Default 1.2 for mode 1 and 2&lt;br /&gt;
#&lt;br /&gt;
# Showmask - enables preview of the mask. Brighter areas will have more grain applied to them. Useful for choosing settings. &lt;br /&gt;
#   Default false&lt;br /&gt;
#&lt;br /&gt;
#######################################&lt;br /&gt;
&lt;br /&gt;
    cont = Default(cont, 4)&lt;br /&gt;
    bright = Default(bright, -128)&lt;br /&gt;
    grain = Default(grain, 1)&lt;br /&gt;
    mode = Default(mode, 1)&lt;br /&gt;
    mThresh = Default(mThresh, 1.2)&lt;br /&gt;
    showmask = Default(showmask, false)&lt;br /&gt;
    &lt;br /&gt;
    clp = orig.IsYV12() ? orig : orig.ConvertToYV12()&lt;br /&gt;
    &lt;br /&gt;
    clp = (mode==1) ? clp.gradfunkmirror(mThresh) : clp&lt;br /&gt;
    clp = (mode==2) ? clp.gradfun2dbmod(mThresh) : clp&lt;br /&gt;
    &lt;br /&gt;
    grain = clp.AddGrain(1,constant=true)&lt;br /&gt;
    grainmask = clp.Tweak(cont,bright).GreyScale().Invert()&lt;br /&gt;
    clp.RemoveGrain(1)&lt;br /&gt;
    final = mt_merge(last,grain,grainmask,true)&lt;br /&gt;
    &lt;br /&gt;
    result = showmask ? grainmask : final&lt;br /&gt;
    &lt;br /&gt;
    return result&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Raffriff42</name></author>	</entry>

	</feed>