Tweak Plugin for Avisynth
(Version 1.3)

by Donald A. Graft

Introduction

This plugin function for Avisynth provides the means to adjust the hue, saturation, brightness, and contrast of a video clip.

Tweak requires YUY2 input. Use ConvertToYUY2() if necessary.

This is the first of a number of planned utility plugins. As subsequent plugins become available, they will be packaged in a single DLL.


Tweak Syntax

Tweak uses named parameters. That means you do not have to worry about the ordering of parameters and can simply refer to them by name and put them in any order in the list of parameters. If you omit a parameter it takes its default value. For example, if you want to increase the saturation of a clip and reduce its brightness, you might simply say:

Tweak(sat=2.0,bright=-20)

Any combination and order of named parameters is allowed. Specifying Tweak() with no parameters is a null operation and is thus senseless.

Following is the syntax for Tweak (replace parameter_list with your comma-separated list of named parameters):

Tweak(parameter_list)

hue (-180.0 to +180.0, default 0.0) is used to adjust the color hue of the image. Positive values shift the image towards red. Negative values shift it towards green.

sat (0.0 to 10.0, default 1.0) is used to adjust the color saturation of the image. Values above 1.0 increase the saturation. Values below 1.0 reduce the saturation. Use sat=0 to convert to grayscale.

bright (-255.0 to 255.0, default 0.0) is used to change the brightness of the image. Positive values increase the brightness. Negative values decrease it.

cont (0.0 to 10.0, default 1.0) is used to change the contrast of the image. Values above 1.0 increase the contrast. Values below 1.0 decrease the contrast.


Copyright (C) 2002, Donald A. Graft, All Rights Reserved.
Feedback/inquiries to [email protected].

For updates and other filters/tools, visit my web site:
http://sauron.mordor.net/dgraft/