ColorYUV2

From Avisynth wiki
Jump to: navigation, search
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

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).

Requirements


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


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.

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


Examples

TODO

Changelog

v1.05, 29 May 2012 - Latest release


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


External Links




Back to External Filters

Personal tools