<?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=Auto_Gamma</id>
		<title>Auto Gamma - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Auto_Gamma"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Auto_Gamma&amp;action=history"/>
		<updated>2026-04-15T21:57:54Z</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=Auto_Gamma&amp;diff=12160&amp;oldid=prev</id>
		<title>Reel.Deal: Auto_Gamma (2020/09/04)</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Auto_Gamma&amp;diff=12160&amp;oldid=prev"/>
				<updated>2020-11-09T06:15:38Z</updated>
		
		<summary type="html">&lt;p&gt;Auto_Gamma (2020/09/04)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{FilterCat6|External_filters|Plugins|Plugins_x64|Adjustment_filters|Levels_and_Chroma_filters|Deep_color_tools}}&lt;br /&gt;
{{Filter3&lt;br /&gt;
|[https://github.com/crabshank crabshank]&lt;br /&gt;
|2020-09-04&lt;br /&gt;
|3=[https://github.com/crabshank/Avisynth-filters/blob/master/C_Auto_Gamma_x64.dll C_Auto_Gamma_x64.dll]&lt;br /&gt;
|4=Adjustment Filters&lt;br /&gt;
|5=Open source&lt;br /&gt;
|6=[https://forum.doom9.org/showthread.php?t=177046 Doom9 Forum]&lt;br /&gt;
}}&lt;br /&gt;
== Description ==&lt;br /&gt;
[[Auto_Gamma]] calculates gamma values to manage the brightness and contrast of a whole video based on the range set by parameters &amp;quot;a&amp;quot; and &amp;quot;b&amp;quot;, where lower &amp;quot;b&amp;quot; values output a brighter image.&lt;br /&gt;
&lt;br /&gt;
There is also a parameter to apply a gamma transform first if you feel the image is under/overexposed and one to ensure that it can display the original pixel if it's brighter so no dark details are lost.&lt;br /&gt;
&lt;br /&gt;
There is accurate xy colorimetry and transfer functions for 11 colour spaces as of now, and more could be easily added.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
* [[AviSynth+]] (x64 only)&lt;br /&gt;
* Supported color formats: [[RGB32]], [[RGB64]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== [[Script variables|Syntax and Parameters]] ==&lt;br /&gt;
&lt;br /&gt;
:{{Template:FuncDef|Auto_Gamma (clip, float &amp;quot;a&amp;quot;, float &amp;quot;b&amp;quot;, int &amp;quot;tolerance&amp;quot;, int &amp;quot;crush&amp;quot;, bool &amp;quot;limitedRange&amp;quot;, int &amp;quot;mode&amp;quot;, int &amp;quot;linear&amp;quot;, bool &amp;quot;sixtyFour&amp;quot;)}}&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2| |clip| }}&lt;br /&gt;
:::Input clip, must be RGB32 or RGB64.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|a|float|0.0}}&lt;br /&gt;
::{{Par2|b|float|4.3}}&lt;br /&gt;
:::Upper and lower bounds of gamma values to search between (lower =&amp;gt; brighter)&lt;br /&gt;
:::Range: 0.00 to 20.00 by 0.01&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|tolerance|int|4}}&lt;br /&gt;
:::Number of decimal places of accuracy to use in calculation.&lt;br /&gt;
:::Range: 1 to 7 by 1&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|crush|int|0}}&lt;br /&gt;
:::*0 - Take gamma-adjusted colour if lighter than the input (default).&lt;br /&gt;
:::*1 - Take gamma-adjusted colour if darker than the input.&lt;br /&gt;
:::*2 - Take all gamma-adjusted colours.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|limitedRange|bool|false}}&lt;br /&gt;
:::*True : limited range&lt;br /&gt;
:::*False : full range&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|mode|int|0}}&lt;br /&gt;
:::*0 - sRGB (default)&lt;br /&gt;
:::*1 - Rec. 601 NTSC&lt;br /&gt;
:::*2 - Rec. 601 PAL&lt;br /&gt;
:::*3 - Rec. 709&lt;br /&gt;
:::*4 - Rec. 2020&lt;br /&gt;
:::*5 - DCI-P3&lt;br /&gt;
:::*6 - Display P3&lt;br /&gt;
:::*7 - Orginal NTSC (47 CFR § 73.682 - TV transmission standards)&lt;br /&gt;
:::*8 - Rec. 601 D93 (Use for Japanese media)&lt;br /&gt;
:::*9 - Rec. 709 D93 (Some Japanese media may use this)&lt;br /&gt;
:::*10 - DCI-P3 (D60/ACES)&lt;br /&gt;
:::*11 - Rec. 2100/2020 Hybrid Log-Gamma&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|linear|int|0}}&lt;br /&gt;
:::*0 - Uses raw input RGB (default).&lt;br /&gt;
:::*1 - Uses sRGB -&amp;gt; linear RGB converted values.&lt;br /&gt;
:::*2 - Uses linear RGB -&amp;gt; sRGB converted values.&lt;br /&gt;
:::*3 - Uses Rec.(2020/601/709) RGB -&amp;gt; linear RGB converted values.&lt;br /&gt;
:::*4 - Uses linear RGB -&amp;gt; Rec.(2020/601/709) RGB converted values.&lt;br /&gt;
:::*5 - Uses gamma=2.2 -&amp;gt; linear RGB converted values.&lt;br /&gt;
:::*6 - Uses linear RGB -&amp;gt; gamma=2.2 converted values.&lt;br /&gt;
:::*7 - Uses gamma=2.6 -&amp;gt; linear RGB converted values.&lt;br /&gt;
:::*8 - Uses linear RGB -&amp;gt; gamma=2.6 converted values&lt;br /&gt;
:::*9 - Hybrid Log-Gamma -&amp;gt; linear RGB&lt;br /&gt;
:::*10 - linear RGB -&amp;gt; Hybrid Log-Gamma&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|sixtyFour|bool|false}}&lt;br /&gt;
:::It's not necessary to set this argument, because the plugin will automatically detect if RGB64 is used.&lt;br /&gt;
:::True (not recommended) - Force 64-bit processing in plugin.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::'''Note:''' It's important to use D93 modes where appropriate.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
== Examples ==&lt;br /&gt;
[[TODO]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
==External Links ==&lt;br /&gt;
*[https://github.com/crabshank/Avisynth-filters GitHub] - Source code repository. &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
-----------------------------------------------&lt;br /&gt;
'''Back to [[External_filters#Levels_and_Chroma|External Filters]] &amp;amp;larr;'''&lt;/div&gt;</summary>
		<author><name>Reel.Deal</name></author>	</entry>

	</feed>