<?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=Manual_WP</id>
		<title>Manual WP - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Manual_WP"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Manual_WP&amp;action=history"/>
		<updated>2026-04-16T00:03:34Z</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=Manual_WP&amp;diff=12161&amp;oldid=prev</id>
		<title>Reel.Deal: Manual_WP (2020/09/04)</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Manual_WP&amp;diff=12161&amp;oldid=prev"/>
				<updated>2020-11-09T06:50:18Z</updated>
		
		<summary type="html">&lt;p&gt;Manual_WP (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_Manual_WP_x64.dll C_Manual_WP_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=177045 Doom9 Forum]&lt;br /&gt;
}}&lt;br /&gt;
== Description ==&lt;br /&gt;
[[Manual_WP]] allows you to fix the white balance of media by changing the white point of it using the appropriate Bradford transform and transfer functions for 11 colour spaces (see &amp;lt;code&amp;gt;&amp;quot;mode&amp;quot;&amp;lt;/code&amp;gt; parameter).&lt;br /&gt;
&lt;br /&gt;
It allows you to enter the xy value directly or, much more easily, enter the RGB values (0-255/0-65535) that you wish to turn grey. It also allows you to enter a target white point for the final output (&amp;lt;code&amp;gt;&amp;quot;dst_x&amp;quot;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;quot;dst_y&amp;quot;&amp;lt;/code&amp;gt; parameters). &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|Manual_WP (clip, float &amp;quot;x&amp;quot;, float &amp;quot;y&amp;quot;, int &amp;quot;R&amp;quot;, int &amp;quot;G&amp;quot;, int &amp;quot;B&amp;quot;, int &amp;quot;mode&amp;quot;, int &amp;quot;debug&amp;quot;, float &amp;quot;debug_val&amp;quot;, bool &amp;quot;sixtyFour&amp;quot;, float &amp;quot;dst_x&amp;quot;, float &amp;quot;dst_y&amp;quot;, bool &amp;quot;auto_WP&amp;quot;, string &amp;quot;file&amp;quot;, string &amp;quot;log_id&amp;quot;, bool &amp;quot;overwrite&amp;quot;, bool &amp;quot;linear&amp;quot;, string &amp;quot;edits&amp;quot;, int &amp;quot;ed_off&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|x|float|0.312727}}&lt;br /&gt;
::{{Par2|y|float|0.329023}}&lt;br /&gt;
:::Range: 0.0 to 1.0 by 0.0001&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|R|int|-1}}&lt;br /&gt;
::{{Par2|G|int|-1}}&lt;br /&gt;
::{{Par2|B|int|-1}}&lt;br /&gt;
:::Set R, G and B as valid integers (0-255/0-65535) and it will use the xy value required to turn this specified RGB colour grey, even if x and y are specified as well (so it takes precedence).&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|debug|int|0}}&lt;br /&gt;
:::*0 - Off (default)&lt;br /&gt;
:::*1 - pow(Saturation, debug_val)&lt;br /&gt;
:::*2 - Outputs all pixels &amp;gt;= debug_val (0-1), and blacks out all pixels &amp;lt; debug_val in saturation.&lt;br /&gt;
:::*3 - Outputs, in black, all pixels that have had at least a (debug_val)% reduction in saturation.&lt;br /&gt;
:::*4 - Outputs:&lt;br /&gt;
:::**Saturation decreased: Hues from 157.5° (min) to 240° (max) (Cyan -&amp;gt; Blue)&lt;br /&gt;
:::**Saturation increased: Hues from 307.5° (min) to 7.5° (max) (Magenta -&amp;gt; Orange)&lt;br /&gt;
:::**Value (HSV): 1-debug_val&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|debug_val|float|1.0}}&lt;br /&gt;
:::Range: 0.0 to 1.0 by 0.001&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;
::{{Par2|dst_x|float|0.312727}}&lt;br /&gt;
::{{Par2|dst_y|float|0.329023}}&lt;br /&gt;
:::Set a target output white point for the output (other than D65).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|auto_WP|bool|false}}&lt;br /&gt;
:::If set to true, it attempts to find the ideal pixel in the frame for the white point.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|file|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::Enter the path to the file which you would like to write the debug data for auto_WP mode (e.g. &amp;quot;C:\vid_WP.txt&amp;quot;).&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|log_id|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
:::On each line of the debug file will be written: &amp;quot;log_id: R, G, B - Frame number&amp;quot;. N.B. the RGB values are the input to the plugin.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|overwrite|bool|true}}&lt;br /&gt;
:::By default (true), the debug file will be overwritten if a file with the same name already exists every time the plugin is loaded; setting this to false will append to the file if it already exists.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|linear|bool|false}}&lt;br /&gt;
:::Takes linear RGB as input and outputs linear RGB.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|edits|string|&amp;quot;&amp;quot;}}&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin-left: 6em; max-width: 67em&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
&lt;br /&gt;
s=&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{247,250,254,0,3473,0.312727,0.329023}&lt;br /&gt;
&lt;br /&gt;
{-1,-1,-1,3474,18628,0.3234151,0.3058452}&lt;br /&gt;
&lt;br /&gt;
{250,240,255,18629,18831,0.312727,0.329023}&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{R,G,B,start,end,x,y}&lt;br /&gt;
&lt;br /&gt;
= trim(start, end).Manual_WP(R=R, G=G, B=B, x=x, y=y, ..., edits=s)&lt;br /&gt;
&lt;br /&gt;
N.B. All characters except: &amp;quot;{&amp;quot;,&amp;quot;, &amp;quot;-&amp;quot;, &amp;quot;0-9&amp;quot;, &amp;quot;.&amp;quot;, &amp;quot;,&amp;quot; and &amp;quot;}&amp;quot;; are removed from the input string.&lt;br /&gt;
&lt;br /&gt;
N.N.B. The maximum number of edits in one string is defined as &amp;quot;MAX_PATH&amp;quot; in Windows (260 usually).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
::{{Par2|ed_off|int|0}}&lt;br /&gt;
:::e.g. ed_off=-1: use the RGB values from the previous (current-1) {R,G,B,start,end}, from the edits' string.&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>