DGTonemap
From Avisynth wiki
Abstract | |
---|---|
Author | Donald Graft |
Version | v1.2 |
Download | DGTonemap.rar |
Category | Adjustment Filters |
License | Closed source |
Discussion |
Contents |
Description
DGTonemap provides filters for Reinhard and Hable tonemapping operators. This
is a starting point to make available a full HDR->SDR process for AviSynth+.
Requirements
Syntax and Parameters
Reinhard Usage
- DGReinhard (clip, float "contrast", float "bright")
- clip =
- Input clip; the filter receives and delivers the RGBPS color space. See z_ConvertFormat() in the sample script below.
- clip =
- float contrast = 5.0
- Contrast
- float contrast = 5.0
- float contrast = 0.3
- Higher numbers for
bright
reduce brightness, you can even go tobright=1000
and beyond, but it stops having an effect up there.
- Higher numbers for
- float contrast = 0.3
Hable Usage
- DGHable (clip, float "exposure", float "a", float "b", float "c", float "d", float "e", float "f", float "w")
- clip =
- Input clip; the filter receives and delivers the RGBPS color space. See z_ConvertFormat() in the sample script below.
- clip =
- float exposure = 2.0
- Gain to apply.
- float exposure = 2.0
- float a = 0.15
- a: Shoulder strength
- float b = 0.50
- b: Linear strength
- float c = 0.10
- c: Linear angle
- float d = 0.20
- d: Toe strength
- float e = 0.02
- e: Toe numerator
- float f = 0.30
- f: Toe denominator
- float w = 11.2
- w: Linear white point
- float a = 0.15
hable(x) = ((x*(a*x+c*b)+d*e) / (x*(a*x+b)+d*f)) - e/f
output_pixel = hable(exposure * input_pixel) / hable(w)
Examples
Following is a sample script for the full HDR->SDR process. The source UHD video is tonemapped, converted to rec709 colorspace, and downsampled to 8 bits. To leave it in 16 bits, set pixel_type=YUV420P16
in the second z_ConvertFormat() call.
SetFilterMTMode("z_ConvertFormat", MT_MULTI_INSTANCE) # May not be needed. DGSource("THE GREAT WALL.dgi",fulldepth=true) ConvertBits(10) # Use 12 for 12-bit z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none") # Choose one of these: DGReinhard() #DGHable() z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered") prefetch(4)
Changelog
Version Date Changes v1.2 2018/04/18 - Latest release v1.0 - Initial release
Archived Downloads
Version | Download | Mirror |
---|---|---|
v1.2 | DGTonemap.rar | DGTonemap.rar |
External Links
Back to External Filters ←