<?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=Autoscale_parameter</id>
		<title>Autoscale parameter - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Autoscale_parameter"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Autoscale_parameter&amp;action=history"/>
		<updated>2026-04-08T00:14:18Z</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=Autoscale_parameter&amp;diff=10149&amp;oldid=prev</id>
		<title>Raffriff42: add &quot;bit depth equivalent color value&quot; table</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Autoscale_parameter&amp;diff=10149&amp;oldid=prev"/>
				<updated>2018-01-15T15:50:32Z</updated>
		
		<summary type="html">&lt;p&gt;add &amp;quot;bit depth equivalent color value&amp;quot; table&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 15:50, 15 January 2018&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 4:&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;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &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;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;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;'''''Autoscale''''' is the term being used to describe [[Grammar#Functions.2C_Filters_and_Arguments|filter and function arguments]] that adjust themselves to the current bit depth &amp;amp;ndash; the [[Clip_properties#Color_Format|BitsPerComponent]] of the main source clip. A related concept is [[D_Notation|'d' notation]]: 16{{Template:D}}-235{{Template:D}} refers to normal [[Luminance_levels#What_are_luminance_levels.3F|TV-range levels]] at any bit depth.&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;'''''Autoscale''''' is the term being used to describe [[Grammar#Functions.2C_Filters_and_Arguments|filter and function arguments]] that adjust themselves to the current bit depth &amp;amp;ndash; the [[Clip_properties#Color_Format|BitsPerComponent]] of the main source clip. A related concept is [[D_Notation|'d' notation]]: 16{{Template:D}}-235{{Template:D}} refers to normal [[Luminance_levels#What_are_luminance_levels.3F|TV-range levels]] at any bit depth.&lt;/div&gt;&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;:{| class=&amp;quot;wikitable&amp;quot;&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;|colspan=&amp;quot;6&amp;quot; |bit depth equivalent color values&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;!style=&amp;quot;text-align:right&amp;quot;|8&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|0&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|16&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|128&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|235&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|255&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;!10&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|0&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|64&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|512&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|940&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|1020&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;!12&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|0&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|256&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|2048&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|3670&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|4080&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;!14&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|0&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|1024&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|8192&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|15040&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|16320&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;!16&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|0&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|4096&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|32768&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|60160&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|65280&lt;/ins&gt;&lt;/div&gt;&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;|-&lt;/ins&gt;&lt;/div&gt;&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;!32&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|0.0&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|&amp;lt;sup&amp;gt;16&amp;lt;/sup&amp;gt;/&amp;lt;sub&amp;gt;256&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|&amp;lt;sup&amp;gt;128&amp;lt;/sup&amp;gt;/&amp;lt;sub&amp;gt;256&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|&amp;lt;sup&amp;gt;235&amp;lt;/sup&amp;gt;/&amp;lt;sub&amp;gt;256&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&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;|style=&amp;quot;text-align:right&amp;quot;|&amp;lt;sup&amp;gt;255&amp;lt;/sup&amp;gt;/&amp;lt;sub&amp;gt;256&amp;lt;/sub&amp;gt;&lt;/ins&gt;&lt;/div&gt;&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;|}&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;/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;/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;/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;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Raffriff42</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=Autoscale_parameter&amp;diff=9877&amp;oldid=prev</id>
		<title>Raffriff42: describe autoscaling, show helper scripts</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Autoscale_parameter&amp;diff=9877&amp;oldid=prev"/>
				<updated>2017-05-29T05:24:47Z</updated>
		
		<summary type="html">&lt;p&gt;describe autoscaling, show helper scripts&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;div style=&amp;quot;max-width:82em; min-width:42em; text-align:right&amp;quot; &amp;gt;&lt;br /&gt;
{{AvsPlusFilter}}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;max-width:62em; min-width:42em;&amp;quot; &amp;gt;&lt;br /&gt;
'''''Autoscale''''' is the term being used to describe [[Grammar#Functions.2C_Filters_and_Arguments|filter and function arguments]] that adjust themselves to the current bit depth &amp;amp;ndash; the [[Clip_properties#Color_Format|BitsPerComponent]] of the main source clip. A related concept is [[D_Notation|'d' notation]]: 16{{Template:D}}-235{{Template:D}} refers to normal [[Luminance_levels#What_are_luminance_levels.3F|TV-range levels]] at any bit depth.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Examples ==== &lt;br /&gt;
To see a filter with ''non''-autoscaling arguments, consider '''[[Levels]]''':&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|42|2}} &amp;gt; &lt;br /&gt;
 Levels(clip C, &lt;br /&gt;
 \     int {{BoldColor|blue|100|input_low}}, float gamma, {{BoldColor|blue|100|int input_high}},&lt;br /&gt;
 \     int {{BoldColor|blue|100|output_low}}, int {{BoldColor|blue|100|output_high}} [, &lt;br /&gt;
 \     bool coring, bool dither])&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
All the arguments in blue expect user inputs in the normal 0-255 range &amp;amp;ndash; assuming 8-bit video. For 10-bit, the input range is 0-1023, and for 16-bit, it's 0-65535. Scripts that specify 8-bit '''Levels''' arguments need to be altered for use with other bit depths. For those used to &amp;quot;thinking in 8-bit,&amp;quot; writing scripts for multiple bit depths can be cumbersome. &lt;br /&gt;
&lt;br /&gt;
That's not to say [[Levels]] is wrong or buggy &amp;amp;ndash; what it does makes sense: it is the humans that need to adjust. There are utility functions to help with this, which will be discussed below.&lt;br /&gt;
&lt;br /&gt;
Another example is '''[[RGBAdjust]]''' with its ''bias'' arguments: {{FuncArg|rb}}=16 always lifts the Red channel by 16 units, whether on the 0-255 or the 0-65535 scale. It does what you ''say'', not necessarily what you mean.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To see a filter '''with''' autoscaling arguments, consider '''[[ColorYUV]]''':&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|42|2}} &amp;gt; &lt;br /&gt;
 ColorYUV(clip [,&lt;br /&gt;
 \    float gain_y, float {{BoldColor|blue|100|off_y}}, float gamma_y, float cont_y,&lt;br /&gt;
 \    float gain_u, float {{BoldColor|blue|100|off_u}}, float gamma_u, float cont_u,&lt;br /&gt;
 \    float gain_v, float {{BoldColor|blue|100|off_v}}, float gamma_v, float cont_v,&lt;br /&gt;
 \    string levels, string opt, bool showyuv, bool analyze,&lt;br /&gt;
 \    bool autowhite, bool autogain, bool conditional ] ))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
The {{FuncArg|off_''x''}} arguments (in blue) add or subtract a given amount from all pixels in the given color channel, and the amount is always on the 0-255 scale &amp;amp;ndash; that is, {{FuncArg|off_y}}=255 will always turn black to white, at any bit depth. &lt;br /&gt;
&lt;br /&gt;
In 8-bit video, setting {{FuncArg|off_y}}=16 will raise all luminance values by 16 units on the 0-255 scale &amp;amp;ndash; but in 10-bit video, {{FuncArg|off_y}}=16 will raise all luminance values by '''''64''''' units on the 0-1023 scale. &lt;br /&gt;
&lt;br /&gt;
The argument value has been adjusted by the filter to give the same ''visual effect.'' '''That's autoscaling.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== User-Defined Autoscaling functions ==== &lt;br /&gt;
For filters and function that don't autoscale, there are some helper functions you can call upon, which are included in raffriff42's [[User:Raffriff42/Utils-r41_Quick_Reference|''Utils-r41.avsi'']] script. These three are the ones most important for autoscaling:&lt;br /&gt;
:{{FuncDef|sc8f(clip T, float f, [bool ''cx''])}}&lt;br /&gt;
:: Scale an 8-bit value for target clip {{FuncArg|T}}&lt;br /&gt;
&lt;br /&gt;
:{{FuncDef|sc8x(clip T, float f)}}&lt;br /&gt;
:: Scale an 8-bit value for target clip {{FuncArg|T}}; clamp output&lt;br /&gt;
&lt;br /&gt;
:{{FuncDef|sc8s(clip T, float f, [int ''decimals''])}}&lt;br /&gt;
:: Scale an 8-bit value for target clip {{FuncArg|T}}; string result&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use them to make '''Levels''' autoscale, so that the old 8-bit arguments give the same visual result in any bit depth:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt;&lt;br /&gt;
 function LevelsPlus(clip C, &lt;br /&gt;
 \               int input_low, float gamma, int input_high,&lt;br /&gt;
 \               int output_low, int output_high,&lt;br /&gt;
 \               bool &amp;quot;coring&amp;quot;, bool &amp;quot;dither&amp;quot;)&lt;br /&gt;
 {&lt;br /&gt;
     return C.[[Levels]](&lt;br /&gt;
     \           C.{{BoldColor|blue|100|sc8x}}(input_low), &lt;br /&gt;
     \           gamma, &lt;br /&gt;
     \           C.{{BoldColor|blue|100|sc8x}}(input_high),&lt;br /&gt;
     \           C.{{BoldColor|blue|100|sc8x}}(output_low), &lt;br /&gt;
     \           C.{{BoldColor|blue|100|sc8x}}(output_high), &lt;br /&gt;
     \           coring, dither)&lt;br /&gt;
 }&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
[[User:Raffriff42/Utils-r41_Quick_Reference#LevelsPlus|LevelsPlus]] is included in the script previously mentioned. &lt;br /&gt;
&lt;br /&gt;
You don't have to write wrapper scripts like the one above; you can insert them only where needed:&lt;br /&gt;
&amp;lt;div {{BoxWidthIndent|56|2}} &amp;gt; &lt;br /&gt;
 [[RGBAdjust]](rb={{BoldColor|blue|100|sc8f}}(8), gb={{BoldColor|blue|100|sc8f}}(-8), bb={{BoldColor|blue|100|sc8f}}(12)) &lt;br /&gt;
 &lt;br /&gt;
 [[Limiter]](min_chroma={{BoldColor|blue|100|sc8x}}(128-64), max_chroma={{BoldColor|blue|100|sc8x}}(128+64))&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
These statements will have the same visual effect at all bit depths.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Avisynthplus]]&lt;/div&gt;</summary>
		<author><name>Raffriff42</name></author>	</entry>

	</feed>