ColourWarp

From Avisynth wiki
Revision as of 01:22, 13 July 2020 by Reel.Deal (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Abstract
Author wonkey_monkey
Version v0.1
Download ColourWarp.zip
Category Levels and Chroma
License GPLv2 ???
Discussion Doom9 Thread


Contents

Description

Smooth remapping of UV colour values using control points for colour correction. It only works on 8-bit YUV video at the moment, and it only remaps the UV channels. Colours are remapped by specifying control point pairs of UV values.

Requirements


Syntax and Parameters

ColourWarp (clip, integers, clips, integers, bool "debug", bool "invert")


clip   =
Input clip to be adjusted.


int   =
Integers (optional): a list of control points specifying colour remappings. Two pairs of UV values (range -128 to 128) specify a source and destination colour to be remapped.


clip   =
Clips (optional): source and destination and clips for colours to be taken from (see below).
If only one clip is specified here, it will be treated as destination, with the input clip treated as source.


int   =
Integers (optional): a list of control points specifying pairs of pixels from the source and destination clips. Pixels are specified as:
[frame number, x coordinate, y coordinate].
Example: ... 0,153,999, 10,1000,900 ... will specify a remapping from the colour of the pixel at [153,999] in frame 0 of the source clip to the colour of the pixel at [1000,900] in frame 10 of the destination clip.


bool  debug = false
Set to true to display a visualization of the remapping.


bool  invert = false
Invert the mapping (e.g., if control point pairs were accidentally specified in the wrong order).


Examples

ColourWarp(clip, 0,0, -64,-64)
# a single pair will shift the colours

ColourWarp(clip, 0,0, 0,0, 64,64, 32,32)
# two pairs will scale/rotate (this example will reduce saturation of all colours - it fixes grey to grey and then scales 64,64 down to 32,32)

ColourWarp(clip, 0,0, 0,0, 0,128, 0,0, -128,-128, -128,-128, 128,-128, 128,-128, -128,128, -128,128, 128,128, 128,128)
# this example fixes all the corners, and center, of the UV square, but remaps U=0,V=128 to U=0,V=0 (grey)


You can also specify up to two additional clips (if only one clip is specified, the input clip is assumed to the first "extra" clip). These two clips act as sources for you to pick specific pixels (any number parameters that come after the pixel source clips) to be remapped:

ColourWarp(clip, 0,0, 0,0, clip1, clip2, 0,100,150, 10,200,250)
# this example fixes grey to grey (the first four numbers),
# then maps the colour of pixel [100,150] from clip1, frame 0 to
# the colour of pixel [200,250] from clip2, frame 10)


Changelog

Version      Date            Changes
v1.1 2019/11/27 - initial release


Archived Downloads

Version Download Mirror
v0.1 ColourWarp.zip ColourWarp.zip


External Links




Back to External Filters

Personal tools