ChromaShift

Sommario

author: Simon Walters
version:  2.7
download: http://www.geocities.com/siwalters_uk/fnews.html
category: Misc Plugins
requirements: YV12 & YUY2 & RGB32 Colorspace

Descrizione

Questo filtro sposta le informazioni di crominanza (C == U e V insieme) o U e V separatamente, di un numero pari di pixels, nell'una o nell'altra dimensione orizzontale. Può anche applicare uno shift verticale,verso l'alto o verso il basso, dell'informazione della crominanza. Ciò si applica a clips in YUY2 o YV12 .

Wilbert Dijkhof lo ha gentilmente modificato in modo tale che possa essere usato anche per shiftare i colori Red, Green o Blue independentemente se l'input del filtro è in RGB32 .

Questo filtro ha come scopo principale quello di correggere colori registrati male.

Download Version 2.7 for Avisynth 2.5 (inc source)

Download OldVersion 1.2 for Avisynth 2.0.x (just operates in YUY2 colourspace)

Esempio di sintassi Avisynth

# Shifta sia U che V a sinistra di 2 pixels e verso il basso di una riga
# Notare che U e/o V non possono essere shiftati di 1 pixel perché ogni coppia di valori UV è relativa a 2 pixels nel colourspace YUY2

LoadPlugin("ChromaShift.dll")
AVISource("Test.avi")
ConvertToYUY2 # if needed.
ChromaShift(C=-2,L=1)

# Shifta il Rosso di 2 pixels a sinistra ed il Verde destra di 1 pixel.

LoadPlugin("ChromaShift.dll")
AVISource("Test.avi")
ConvertToRGB32 # if needed.
ChromaShift(R=-2,G=1)

# Shifta sia U che V 2 pixels a sinistra e giù di 2 linee
# Notare che che U e/o V non possono essere shiftati di 1 pixel perché ogni coppia di valori UV è relativa a 4 pixels nel colourspace YV12
# L non può essere shiftato di un numero dispari di linee nel colorspace YV12

LoadPlugin("ChromaShift.dll")
AVISource("Test.avi")
ConvertToYV12 # if needed.
ChromaShift(C=-2,L=2)

La lista completa dei parametri è ChromaShift (clip, int "C", int "U", int "V", int "L", int "R", int "G", int "B")

Qualsiasi parametro non abbia un valore pari per C, U o V causerà un errore poichè l'informazione sella chrominance è memorizzata una sola volta ogni 2 pixels in un frame YUY2. L può assumere qualunqua valore nel colourspace YUY2 ma deve essere pari in YV12.

Qualsiasi valore per C, U, V o L darà un errore usando il colourspace RGB32 .

Qualsiasi valore per R, G or B darà un errore usando i colourspace YUY2 o YV12.

Version History

4th November - V2.7: YV12 handling added.

4th November - V2.6a: RGB handling added in by Wilbert Dijkhof.

2nd November - included missing source code.

30th January, 2003 – V2.5 – re-compiled to work with Avisynth 2.5.

14th Sep, 2002 - V1.2 - added abilty to shift left as well as right and removed the restriction on single use of the C, U or V parameters. Also, added the L (Line) parameter to shift vertically. Code speeded up by not using a buffered frame.

13th Sep, 2002 - V1.1 - added parameters and control over C,U and V.

10th Sep, 2002 - First release for Avisynth

Source Code

All source code here is provided under the GPL license. This means you are free to use and distribute the software and program code for no fee.  This also means you are free and encouraged to improve and expand upon the source code, but only as long as you make your modified version also under the GPL, and thus free software with access to the source code for anyone. The source code compiles under Visual C++ 6.0 with SP4. If there is a problem with the source code distribution, please do let me know.

Please email me or post to rec.video.desktop if you have any queries/comments/ideas/bug reports

Copyright Simon Walters siwalters(at)hotmail.com

$Date: 2004/10/17 16:30:51 $