ColorYUV2

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(redirect for convenient searching)
 
(add x64 version)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
#REDIRECT [[External_filters#Levels_and_Chroma]]
+
{{FilterCat5|External_filters|Plugins|Plugins_x64|Adjustment_filters|Levels_and_Chroma_filters}}
{{FilterCat|External_filters|Adjustment_filters|Levels_and_Chroma_filters}}
+
{{Filter3
 +
|1={{Author/StainlessS}}
 +
|2=v1.05
 +
|3=[x86] <br> [https://web.archive.org/web/20200701154657if_/https://files.videohelp.com/u/223002/ColorYUV2_25_dll_20120529.zip ColorYUV2_25_dll_20120529.zip]
 +
--------
 +
[x64] <br> [https://web.archive.org/web/20230213164623if_/https://files.videohelp.com/u/223002/ColorYUV2_105_64.7z ColorYUV2_105_64.7z]
 +
|4=Adjustment Filters
 +
|5=[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 +
|6=[https://forum.doom9.org/showthread.php?t=156774 Doom9 Thread]
 +
}}
 +
== Description ==
 +
This plugin ([[ColorYUV2]]) is a slight modification of the great ColorYUV.
 +
 
 +
[[ColorYUV2]]() is not meant as a replacement for [[ColorYUV]](), merely a stop gap for rpow/spow until implemented directly in AviSynth (hopefully).
 +
<br>
 +
<br>
 +
== Requirements ==
 +
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]
 +
* [x64]: [[AviSynth+]]
 +
* Supported color formats: [[YUY2]], [[YV12]]
 +
<br>
 +
* [https://www.microsoft.com/en-us/download/details.aspx?id=26368 Microsoft Visual C++ 2008 Redistributable Package (x86)]
 +
:<span style="color:red">***</span> <tt>vcredist_x86.exe</tt> is required for <tt>ColorYUV2-x86</tt>
 +
<br>
 +
 
 +
== [[Script variables|Syntax and Parameters]] ==
 +
<pre>
 +
MOST Args (and most code) identical as Avisynth ColorYUV()
 +
 
 +
 
 +
ColorYUV2(clip, float gain_y, float off_y, float gamma_y, float cont_y,
 +
float gain_u, float off_u, float gamma_u, float cont_u,
 +
float gain_v, float off_v, float gamma_v, float cont_v,
 +
string levels, string opt, string matrix,
 +
bool showyuv, bool analyze, bool autowhite, bool autogain,
 +
 
 +
float rpow_y,float spow_y,int pord_y,
 +
float rpow_u,float spow_u,int pord_u,
 +
float rpow_v,float spow_v,int pord_v
 +
 
 +
)
 +
 
 +
-------------------------------------------------------------------
 +
 
 +
 
 +
New ARGS:-
 +
 
 +
RPOW_Y r Shaped power curve for Y channel (same function as Gamma_y)
 +
SPOW_Y s Shaped power curve for Y channel
 +
PORD_Y Power Curve Order for Y, 0=rpow_y first then spow_y. 1=spow_y 1st.
 +
 
 +
RPOW_U r Shaped power curve for U channel
 +
SPOW_U s Shaped power curve for U channel
 +
PORD_U Power Curve Order for U, 0=rpow_u first then spow_u. 1=spow_u 1st.
 +
 
 +
RPOW_V r Shaped power curve for V channel
 +
SPOW_V s Shaped power curve for V channel
 +
PORD_V Power Curve Order for V, 0=rpow_v first then spow_v. 1=spow_v 1st.
 +
 
 +
 
 +
ColorYUV() does not actually implement chroma Gamma correction, and so the example
 +
in Avisynth docs has never worked (Still does not as of v2.6). It is taken as a
 +
parameter (gamma_u & gamma_v) and stored somewhere, but pretty much forgotten after that.
 +
The reason that chroma gamma does not work is: Gamma is an RGB concept and so does
 +
not belong in ColorYUV at all, however, the developers decided to implement it
 +
for Luma which works the same as if all channels of R,G,B have gamma equally applied.
 +
You may want to 'twist' the chroma in your source and probably dont care what the
 +
function is called, however, having a chroma 'twisting' function called Gamma, is not
 +
acceptable to everyone. So, the function in ColorYUV2() that applies the same sort of
 +
'twist' as Gamma, is called 'RPOW'. ie rpow_y, and rpow_u and rpow_v for U and V channels
 +
respectively. It was a real hard to decide if I should dump the Gamma_y arg and use
 +
instead rpow_y, I decided to keep the Gamma_y arg as is but ignore the Gamma_u
 +
and Gamma_v args as does ColorYUV. You can use either Gamma_y or rpow_y to
 +
achieve the same thing, however if both are specified, rpow_y takes precidence. From
 +
this, you can assume that 'gamma_y' is depricated and may be dropped as an argument
 +
in the future.
 +
 
 +
 
 +
Spow functionality has been added to all three channels eg spow_y, spow_u and spow_v.
 +
 
 +
 
 +
  A large +ve spow produces an input/output graph shape a bit like an S
 +
(the top half looks just like large +ve gamma/rpow), sort of like this:-
 +
  _
 +
  /
 +
_/
 +
 
 +
 
 +
and a large -ve spow like this:-
 +
 
 +
__/
 +
/
 +
 
 +
The pord_y, pord_u and pord_v args set the order in which the rpow and spow functions
 +
are applied, the default = 0 where rpow is used first followed by spow, and 1 for spow
 +
first. Perhaps further functionality could be added to these args and so int was
 +
chosen rather than bool.
 +
 
 +
------------------------------------------------------------------------
 +
 
 +
To see the effect of using rpow/spow and most other arguments of ColorYUV2(), see
 +
the ColorYUV2_GRAF.EXE program (with VB Source) accompanying this plugin.
 +
 
 +
------------------------------------------------------------------------
 +
</pre>
 +
<br>
 +
== Examples ==
 +
[[TODO]]
 +
<br>
 +
<br>
 +
== Changelog ==
 +
<pre>
 +
v1.05, 29 May 2012 - Latest release
 +
</pre>
 +
<br>
 +
 
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="600px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="150px"| Download
 +
!!width="150px"| Mirror
 +
|-
 +
!v1.05
 +
|[x86]: [http://www.mediafire.com/file/875czvfnigu72ds/ColorYUV2_25_dll_20120529.zip/file ColorYUV2_25_dll_20120529.zip]<br>[x64]: [https://www.mediafire.com/file/ilhkh48pw3217ht/ColorYUV2_105_64.7z/file ColorYUV2_105_64.7z]
 +
|[x86]: [https://web.archive.org/web/20200701154657if_/https://files.videohelp.com/u/223002/ColorYUV2_25_dll_20120529.zip ColorYUV2_25_dll_20120529.zip]<br>[x64]: [https://web.archive.org/web/20230213164623if_/https://files.videohelp.com/u/223002/ColorYUV2_105_64.7z ColorYUV2_105_64.7z]
 +
|}
 +
* x64 version compiled by [https://forum.doom9.org/showthread.php?t=173259 Groucho2004]
 +
<br>
 +
==External Links ==
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Levels_and_Chroma|External Filters]] &larr;'''

Latest revision as of 19:06, 13 February 2023

Abstract
Author StainlessS
Version v1.05
Download [x86]
ColorYUV2_25_dll_20120529.zip

[x64]
ColorYUV2_105_64.7z

Category Adjustment Filters
License GPLv2
Discussion Doom9 Thread

Contents

[edit] Description

This plugin (ColorYUV2) is a slight modification of the great ColorYUV.

ColorYUV2() is not meant as a replacement for ColorYUV(), merely a stop gap for rpow/spow until implemented directly in AviSynth (hopefully).

[edit] Requirements


*** vcredist_x86.exe is required for ColorYUV2-x86


[edit] Syntax and Parameters

MOST Args (and most code) identical as Avisynth ColorYUV()


ColorYUV2(clip, float gain_y, float off_y, float gamma_y, float cont_y,
		float gain_u, float off_u, float gamma_u, float cont_u,
		float gain_v, float off_v, float gamma_v, float cont_v,
		string levels, string opt, string matrix,
		bool showyuv, bool analyze, bool autowhite, bool autogain,

		float rpow_y,float spow_y,int pord_y, 
		float rpow_u,float spow_u,int pord_u, 
		float rpow_v,float spow_v,int pord_v

)

-------------------------------------------------------------------


New ARGS:-

	RPOW_Y	r Shaped power curve for Y channel (same function as Gamma_y)
	SPOW_Y	s Shaped power curve for Y channel
	PORD_Y	Power Curve Order for Y, 0=rpow_y first then spow_y. 1=spow_y 1st.

	RPOW_U	r Shaped power curve for U channel
	SPOW_U	s Shaped power curve for U channel
	PORD_U	Power Curve Order for U, 0=rpow_u first then spow_u. 1=spow_u 1st.

	RPOW_V	r Shaped power curve for V channel
	SPOW_V	s Shaped power curve for V channel
	PORD_V	Power Curve Order for V, 0=rpow_v first then spow_v. 1=spow_v 1st.


ColorYUV() does not actually implement chroma Gamma correction, and so the example
in Avisynth docs has never worked (Still does not as of v2.6). It is taken as a
parameter (gamma_u & gamma_v) and stored somewhere, but pretty much forgotten after that.
The reason that chroma gamma does not work is: Gamma is an RGB concept and so does
not belong in ColorYUV at all, however, the developers decided to implement it
for Luma which works the same as if all channels of R,G,B have gamma equally applied.
You may want to 'twist' the chroma in your source and probably dont care what the
function is called, however, having a chroma 'twisting' function called Gamma, is not
acceptable to everyone. So, the function in ColorYUV2() that applies the same sort of
'twist' as Gamma, is called 'RPOW'. ie rpow_y, and rpow_u and rpow_v for U and V channels
respectively. It was a real hard to decide if I should dump the Gamma_y arg and use
instead rpow_y, I decided to keep the Gamma_y arg as is but ignore the Gamma_u
and Gamma_v args as does ColorYUV. You can use either Gamma_y or rpow_y to
achieve the same thing, however if both are specified, rpow_y takes precidence. From
this, you can assume that 'gamma_y' is depricated and may be dropped as an argument
in the future.


Spow functionality has been added to all three channels eg spow_y, spow_u and spow_v.


  A large +ve spow produces an input/output graph shape a bit like an S
(the top half looks just like large +ve gamma/rpow), sort of like this:-
   _
  /
_/


and a large -ve spow like this:-

 __/
/

The pord_y, pord_u and pord_v args set the order in which the rpow and spow functions
are applied, the default = 0 where rpow is used first followed by spow, and 1 for spow
first. Perhaps further functionality could be added to these args and so int was
chosen rather than bool.

------------------------------------------------------------------------

To see the effect of using rpow/spow and most other arguments of ColorYUV2(), see
the ColorYUV2_GRAF.EXE program (with VB Source) accompanying this plugin.

------------------------------------------------------------------------


[edit] Examples

TODO

[edit] Changelog

v1.05, 29 May 2012 - Latest release


[edit] Archived Downloads

Version Download Mirror
v1.05 [x86]: ColorYUV2_25_dll_20120529.zip
[x64]: ColorYUV2_105_64.7z
[x86]: ColorYUV2_25_dll_20120529.zip
[x64]: ColorYUV2_105_64.7z


[edit] External Links




Back to External Filters

Personal tools