Avisynth Tweak
Tweak adjusts hue, saturation, brightness and contrast, optionally only for a chosen range of hues and saturations. It is a core filter of AviSynth+.
Filtering → Avisynth → Color → Grading

What it does
- Hue rotates the colors; positive values shift towards red, negative towards green.
- Saturation scales the chroma; 0 gives a gray picture.
- Bright adds a constant to luma, Contrast multiplies luma.
- With Hue start/end and Saturation start/end the hue and saturation change only hits colors inside these ranges, e.g. only skin tones or only the sky. Interpolation softens the edges of the range.
Settings
| Control | Parameter | Range | Hybrid default | Meaning |
|---|---|---|---|---|
| Hue | hue | -180–180 | 0 | Hue rotation in degrees. |
| Saturation | sat | 0–10 | 1.0 | > 1 more saturated, < 1 less, 0 gray. |
| Bright | bright | -255–255 | 0 | Added to luma. |
| Contrast | cont | 0–10 | 1.0 | Luma multiplier. |
| Coring | coring | on/off | on | Clips luma to 16–235 and chroma to 16–240. |
| Hue start / end | startHue / endHue | 0–360 | 0 / 360 | Hue range (degrees) the hue/saturation change applies to; if end is below start, the range wraps through 0 (e.g. 350 to 10). |
| Saturation start / end | minSat / maxSat | 0–150 | 0 / 150 | Saturation range (percent) the change applies to; values above 100 cover colors outside the valid RGB range. |
| Interpolation | interp | 0–32 | 16 | Soft edge of the ranges, in chroma units; 0 = hard cut. |
| Dither | dither | on/off | off | Ordered dithering. |
| Strength | dither_strength | 0–10 | 1.0 | Dither amount (only with Dither on); 1.0 = ±0.5 on the 8-bit scale. |
| real calc | realcalc | on/off | off | Calculates every pixel instead of using lookup tables. |
Example
Saturation 1.2 and brightness +5 on a 10-bit YUV 4:2:0 source:
Tweak(sat=1.20,bright=5.00)
How Hybrid calls it
- Only values that differ from the defaults are written; with all defaults the call is plain
Tweak(). - The values are passed unchanged; AviSynth+ scales them to the bit depth itself.
- Tweak needs YUV input. A gray clip is only accepted while hue, saturation and the hue/saturation ranges are at their defaults, because Tweak aborts on gray input otherwise.
- Tweak also offers the common options and can be added to the filter queue several times.
Background
- Tweak supports 16-bit and 32-bit float; all parameters scale with the bit depth.
- With float input the dither is centered on zero; to match the 8-bit result, the documentation suggests scaling dither_strength with the bit depth (4 at 10 bit, 16 at 12 bit, 256 at 16 bit).
- The lookup table and realcalc give identical results.
- The parameter sse (YUY2 only) is not offered.
See also: Vapoursynth Tweak, Avisynth SmoothTweak, Avisynth ColorYUV
Sources
- AviSynth+ documentation: Tweak
- Hybrid's tooltips