GradFun2DBmod

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
 
m (Examples: typo)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Filter|{{Author/LaTo}}|v1.5 - Update 2009/12/30|[http://latoninf.free.fr/d9/GF/GradFun2DBmod.v1.5.avsi GradFun2DBmod]|Debanding|
+
{{FilterCat4|External_filters|Scripts|Restoration_filters|Debanding}}
[[YV12]]
+
{{Filter3
|}}
+
|{{Author/LaTo}}
 
+
|v1.5 - Update 2009/12/30
{{Template:FuncDef| GradFun2DBmod( clip input,
+
|[http://latoninf.free.fr/d9/GF/GradFun2DBmod.v1.5.avsi GradFun2DBmod.v1.5.avsi]
float "thr", float "thrC", int "mode",
+
|Debanding
float "str", float "strC", int "temp", int "adapt", string "custom",
+
|
bool "mask", int "radius", int "range",
+
|6=[http://forum.doom9.org/showthread.php?t=144537 Doom9 Thread]}}
bool "show", int "screenW", int "screenH" ) }}
+
 
+
 
+
== Abstract ==
+
An advanced debanding script based on GradFun2DB.  
+
 
+
 
+
 
== Description ==
 
== Description ==
Some of these informations may be outdated and/or incomplete, check the [http://forum.doom9.org/showthread.php?t=144537 Doom9 Thread] for up-to-date version !!!
+
An advanced [http://en.wikipedia.org/wiki/Colour_banding debanding] script based on GradFun2DB.  
 +
<br>
 +
<br>
 +
== Requirements ==
 +
* AviSynth 2.5.8 or later
 +
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only
 +
* Supported color formats: [[YV12]]
 +
=== Required Plugins ===
 +
Latest versions of the following filters are recommended unless stated otherwise.<br>
 +
* [[AddGrainC]]
 +
* [[GradFun2db]]
 +
* [[MaskTools2]]
 +
*<strike>RemoveGrain - part of the [[RemoveGrain v1.0b]] package.</strike>
 +
*[[RgTools]] - recommended drop-in replacement for RemoveGrain!
 +
<br>
 +
== [[Script variables|Syntax and Parameters]] ==
 +
{{Template:FuncDef|GradFun2DBmod (clip input, float "thr", float "thrC", int "mode", float "str", float "strC", int "temp", int "adapt", string "custom", bool "mask", int "radius", int "range", bool "show", int "screenW", int "screenH")}}
 +
<br>
 +
<br>
 +
:{{Par2|input|clip| }}
 +
::Input clip.
  
 +
===Dither===
 +
:{{Par2|thr|float|1.2}}
 +
::GradFun2db <tt>"thr"</tt> parameter; threshold representing the strength of the filter on the luma channel.
  
== Required Filters ==
+
:{{Par2|thrC|float|1.2}}
* Masktools (v2.0a36)
+
::Same as {{Template:FuncDef3|thr}} but for the chroma channels. If this parameter is not specified it defaults to the value of {{Template:FuncDef3|thr}}.  
* Removegrain (v1.0PR)
+
* GradFun2db (v1.0)
+
* AddGrainC(v1.4)
+
  
 
+
:{{Par2|mode|int|2}}
== Parameters ==
+
::Mode for the addition of 16 pixels around the image. Turning this parameter off will leave the outer 16 pixels on all borders unprocessed, this is a limitation of GradFun2db.
 
+
<ul><DD><pre style="width: 75%;">
===DITHER===
+
  0 = Off                            [same as GradFun2db]
 
+
thr [default: 1.2]
+
------------------
+
GradFun2DB "thr" parameter
+
 
+
thrC [default: thr]
+
-------------------
+
GradFun2DB "thrC" parameter
+
 
+
mode [default: 2]
+
-----------------
+
Mode for the addition of 16 pixels around the image
+
  0 = Off                            [same as GradFun2DB]
+
 
  1 = AddBorders  (speed:+ quality:-) [same as GradFunk]
 
  1 = AddBorders  (speed:+ quality:-) [same as GradFunk]
  2 = PointResize (speed:+ quality:+)
+
  2 = PointResize (speed:+ quality:+) [recommended]
 
  3 = Flip/Stack  (speed:- quality:+) [same as GradFunkMirror]
 
  3 = Flip/Stack  (speed:- quality:+) [same as GradFunkMirror]
 +
</pre></ul>
  
 +
===Grain===
 +
:{{Par2|str|float|0.8}}
 +
::AddGrainC <tt>"var"</tt> parameter; the standard deviation (strength) of the luma noise, 0.0 is disabled.
  
===GRAIN===
+
:{{Par2|strC|float|0.0}}
 
+
::AddGrainC <tt>"uvar"</tt> parameter; the standard deviation (strength) of the chroma noise, 0.0 is disabled (default).
str [default: 0.8]
+
------------------
+
AddGrainC "var" parameter
+
 
+
strC [default: 0.0]
+
-------------------
+
AddGrainC "uvar" parameter
+
 
+
temp [default: 50]
+
------------------
+
Strength for temporal stabilization
+
-1  = off
+
0   = nervous grain
+
..
+
100 = calm grain
+
 
+
adapt [default: 64]
+
-------------------
+
Threshold for luma-adaptative grain
+
-1  = off
+
0   = source
+
..
+
255 = invert
+
 
+
custom [default: "empty"]
+
-------------------------
+
Use your own grain generator instead of AddGrain
+
(temp & adapt parameters are on, set -1 to turn off)
+
 
+
 
+
===MASK===
+
 
+
mask [default: true]
+
--------------------
+
Use adaptative deband mask
+
(dither/grain is only applied to areas with banding's susceptibility)
+
 
+
radius [default: 2]
+
-------------------
+
Radius for the mask (1 is the fastest, 2-3 are slower)
+
 
+
range [default: 2]
+
------------------
+
Range used in the mask (1-3 are good value)
+
  
 +
:{{Par2|temp|int|50}}
 +
::Strength for temporal stabilization.
 +
::*-1  = off
 +
::*0  = nervous grain
 +
::*50  = half and half
 +
::*100 = calm grain
 +
::Range: -1 to 100
  
===DEBUG===
+
:{{Par2|adapt|int|64}}
 +
::Threshold for luma-adaptative grain.
 +
::*-1  = off
 +
::*0  = source
 +
::*255 = invert
 +
::Range: -1 to 255
  
show [default: false]
+
:{{Par2|custom|string|"empty"}}
---------------------
+
::Use your own grain generator instead of AddGrainC (temp & adapt parameters are on, set -1 to turn off).
Show debug clip & informations
+
  
screenW [default: 1280]
+
===Mask===
-----------------------
+
:{{Par2|mask|bool|true}}
Screen horizontal resolution (for show clip)
+
::Use adaptative deband mask(dither/grain is only applied to areas with banding's susceptibility).
  
screenH [default: 1024]
+
:{{Par2|radius|int|2}}
-----------------------
+
::Radius for the mask (1 is the fastest, 2-3 are slower)
Screen vertical resolution (for show clip)
+
  
 +
:{{Par2|range|int|2}}
 +
::Range used in the mask (1-3 are good value)
  
 +
===Debug===
 +
:{{Par2|show|bool|false}}
 +
::Show debug clip & information [http://latoninf.free.fr/d9/GF/show.png].
  
== Links ==
+
:{{Par2|screenW|int|1280}}
[http://forum.doom9.org/showthread.php?t=144537 Doom9 Thread]
+
:{{Par2|screenH|int|1024}}
 +
::Screen resolution (for show clip).
 +
<br>
 +
==Examples==
 +
GradFun2DBmod with default settings:
 +
[[AviSource]]("blah.avi")
 +
GradFun2DBmod (thr=1.2, thrC=1.2, mode=2, str=0.8, strC=0.0, temp=50, adapt=64, custom="empty", \
 +
                mask=true, radius=2, range=2, show=false, screenW=1280, screenH=1024)
 +
<br>
  
[[Category:External filters]]
+
==External Links ==
 +
*[http://forum.doom9.org/showthread.php?t=144537 Doom9 Forum] - GradFun2DBmod discussion.
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Debanding|External Filters]] &larr;'''

Latest revision as of 01:56, 17 February 2015

Abstract
Author LaTo
Version v1.5 - Update 2009/12/30
Download GradFun2DBmod.v1.5.avsi
Category Debanding
License
Discussion Doom9 Thread

Contents

[edit] Description

An advanced debanding script based on GradFun2DB.

[edit] Requirements

  • AviSynth 2.5.8 or later
  • Progressive input only
  • Supported color formats: YV12

[edit] Required Plugins

Latest versions of the following filters are recommended unless stated otherwise.


[edit] Syntax and Parameters

GradFun2DBmod (clip input, float "thr", float "thrC", int "mode", float "str", float "strC", int "temp", int "adapt", string "custom", bool "mask", int "radius", int "range", bool "show", int "screenW", int "screenH")

clip  input =
Input clip.

[edit] Dither

float  thr = 1.2
GradFun2db "thr" parameter; threshold representing the strength of the filter on the luma channel.
float  thrC = 1.2
Same as thr but for the chroma channels. If this parameter is not specified it defaults to the value of thr.
int  mode = 2
Mode for the addition of 16 pixels around the image. Turning this parameter off will leave the outer 16 pixels on all borders unprocessed, this is a limitation of GradFun2db.
     
     0 = Off                             [same as GradFun2db]
     1 = AddBorders  (speed:+ quality:-) [same as GradFunk]
     2 = PointResize (speed:+ quality:+) [recommended]
     3 = Flip/Stack  (speed:- quality:+) [same as GradFunkMirror]
    

[edit] Grain

float  str = 0.8
AddGrainC "var" parameter; the standard deviation (strength) of the luma noise, 0.0 is disabled.
float  strC = 0.0
AddGrainC "uvar" parameter; the standard deviation (strength) of the chroma noise, 0.0 is disabled (default).
int  temp = 50
Strength for temporal stabilization.
  • -1 = off
  • 0 = nervous grain
  • 50 = half and half
  • 100 = calm grain
Range: -1 to 100
int  adapt = 64
Threshold for luma-adaptative grain.
  • -1 = off
  • 0 = source
  • 255 = invert
Range: -1 to 255
string  custom = "empty"
Use your own grain generator instead of AddGrainC (temp & adapt parameters are on, set -1 to turn off).

[edit] Mask

bool  mask = true
Use adaptative deband mask(dither/grain is only applied to areas with banding's susceptibility).
int  radius = 2
Radius for the mask (1 is the fastest, 2-3 are slower)
int  range = 2
Range used in the mask (1-3 are good value)

[edit] Debug

bool  show = false
Show debug clip & information [1].
int  screenW = 1280
int  screenH = 1024
Screen resolution (for show clip).


[edit] Examples

GradFun2DBmod with default settings:

AviSource("blah.avi")
GradFun2DBmod (thr=1.2, thrC=1.2, mode=2, str=0.8, strC=0.0, temp=50, adapt=64, custom="empty", \
               mask=true, radius=2, range=2, show=false, screenW=1280, screenH=1024)


[edit] External Links




Back to External Filters

Personal tools