Swap

From Avisynth

(Redirected from VToY8)
Jump to: navigation, search

SwapUV(clip clip)
UToY(clip clip)
VToY(clip clip)
YToUV(clip clipU, clip clipV [, clip clipY])
UToY8(clip clip)
VToY8(clip clip)

The first four of the above filters are available starting from v2.5. The last two from v2.60.

SwapUV swaps chroma channels (U and V) of a clip. Sometimes the colors are distorted (faces blue instead of red, etc) when loading a DivX or MJPEG clip in AviSynth v2.5, due to a bug in the decoders. You can use this filter to correct it.

UToY copies chroma U plane to Y plane, the resulting image is now half as big. All color (chroma) information is removed, so the image is now greyscale.

VToY copies chroma V plane to Y plane, the resulting image is now half as big. All color (chroma) information is removed, so the image is now greyscale.

YToUV puts the luma channels of the two clips as U and V channels. Image is now twice as big, and luma is 50% grey. Starting from v2.51 there is an optional argument clipY which puts the luma channel of this clip as the Y channel.

Starting from v2.53 they also work in YUY2.

UToY8 (added in v2.60) is a shorthand for UToY.ConvertToY8, and VToY8 (added in v2.60) is a shorthand for VToY.ConvertToY8, but faster.

Example:

# Blurs the U chroma channel:
video = Colorbars(512, 512).ConvertToYV12
u_chroma = UToY(video).Blur(1.5)
YToUV(u_chroma, video.VToY)
MergeLuma(video)
Personal tools