Auto Gamma

From Avisynth wiki
Jump to: navigation, search
Abstract
Author crabshank
Version 2020-09-04
Download C_Auto_Gamma_x64.dll
Category Adjustment Filters
License Open source
Discussion Doom9 Forum

Contents

Description

Auto_Gamma calculates gamma values to manage the brightness and contrast of a whole video based on the range set by parameters "a" and "b", where lower "b" values output a brighter image.

There is also a parameter to apply a gamma transform first if you feel the image is under/overexposed and one to ensure that it can display the original pixel if it's brighter so no dark details are lost.

There is accurate xy colorimetry and transfer functions for 11 colour spaces as of now, and more could be easily added.

Requirements


Syntax and Parameters

Auto_Gamma (clip, float "a", float "b", int "tolerance", int "crush", bool "limitedRange", int "mode", int "linear", bool "sixtyFour")


clip   =
Input clip, must be RGB32 or RGB64.


float  a = 0.0
float  b = 4.3
Upper and lower bounds of gamma values to search between (lower => brighter)
Range: 0.00 to 20.00 by 0.01


int  tolerance = 4
Number of decimal places of accuracy to use in calculation.
Range: 1 to 7 by 1


int  crush = 0
  • 0 - Take gamma-adjusted colour if lighter than the input (default).
  • 1 - Take gamma-adjusted colour if darker than the input.
  • 2 - Take all gamma-adjusted colours.


bool  limitedRange = false
  • True : limited range
  • False : full range


int  mode = 0
  • 0 - sRGB (default)
  • 1 - Rec. 601 NTSC
  • 2 - Rec. 601 PAL
  • 3 - Rec. 709
  • 4 - Rec. 2020
  • 5 - DCI-P3
  • 6 - Display P3
  • 7 - Orginal NTSC (47 CFR § 73.682 - TV transmission standards)
  • 8 - Rec. 601 D93 (Use for Japanese media)
  • 9 - Rec. 709 D93 (Some Japanese media may use this)
  • 10 - DCI-P3 (D60/ACES)
  • 11 - Rec. 2100/2020 Hybrid Log-Gamma


int  linear = 0
  • 0 - Uses raw input RGB (default).
  • 1 - Uses sRGB -> linear RGB converted values.
  • 2 - Uses linear RGB -> sRGB converted values.
  • 3 - Uses Rec.(2020/601/709) RGB -> linear RGB converted values.
  • 4 - Uses linear RGB -> Rec.(2020/601/709) RGB converted values.
  • 5 - Uses gamma=2.2 -> linear RGB converted values.
  • 6 - Uses linear RGB -> gamma=2.2 converted values.
  • 7 - Uses gamma=2.6 -> linear RGB converted values.
  • 8 - Uses linear RGB -> gamma=2.6 converted values
  • 9 - Hybrid Log-Gamma -> linear RGB
  • 10 - linear RGB -> Hybrid Log-Gamma


bool  sixtyFour = false
It's not necessary to set this argument, because the plugin will automatically detect if RGB64 is used.
True (not recommended) - Force 64-bit processing in plugin.


Note: It's important to use D93 modes where appropriate.


Examples

TODO


External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools