Ylevels

From Avisynth wiki
Jump to: navigation, search
Abstract
Author Didée
Version 1.0
Download
Category Levels and Chroma filters
Requirements
License  ?
Discussion

Contents

Required Plugins

Description

YLevels is a set of filters to replace the internal AviSynth Levels filter using the mask manipulation facilities provided by MaskTools.

It lets you choose different gamma curves, e.g. to boost dark areas without washing out bright ones. Unlike Levels it does not clip values outside the given range; it also uses named/optional parameters, negating the need for wrappers.

Filters

All functions are called the same way as AviSynth's Levels command, except for the coring parameter. Coring is not available with the Ylevels() functions. They will always work on the full [0,255] value range.

  • Ylevels
A simple replacement for Avisynth's internal levels() command, with a few neat differences:
  • processes only luma. This makes it faster and allows better preservation of color saturation.
  • no clipping: Ylevels(40,1.0,220, 40, 220) will not clip the output to [40,220] as Levels() does. Values below 40 / above 220 will be scaled accordingly to the correct vales. This means, one can use any values for IN_LOW, IN_HIGH as "control points" without getting the input clipped at those values.
  • YlevelsG, YlevelsS
Apply the given levels conversion by 100% @ Luma==0, by 0% @ Luma=255, and accordingly in-between. YlevelsG() does a linear sweep (G = Gradient), while YlevelsS() does a sine sweep (S = Sine). Try those with gamma values 1.5 ~ 4.0.
Note: YlevelsG (not YlevelsS) does "inverse" scaling for gamma values < 1.0, but that's not that great. It's just for completeness.
  • YlevelsC
For this one, 2.0 < gamma < 16.0 is reasonable.

It should be clearly pointed out that the G,S and C versions are only for achieving "visual pleasance" - there can't be done any _exact_ transformations by them (only the basic Ylevels() will do that.)[1]

Links


Back to external filters

Personal tools