I know of two good ways;
- with VariableBlur by Tritical:
Code:
# http://avisynth.nl/index.php/Variableblur
# http://forum.doom9.org/showthread.php?t=88645
# (libfftwf3-3.dll needs to be in the search path)
LoadPlugin(pathBase + "variableblur07\variableblur.dll")
#@function Unsharp(float "varY", float "varC", float "strength"[0-1], int "border"=4,
##\ bool "integrate"=false, int "Y"=3, int "U"=2,int "V"=2,
##\ int "gfunc"=-1, int "gfuncc"=-1, int "pcr"=0, int "pcrc"=0, int "nthreads")
##
Unsharp(varY=Sqrt(8.0), varC=Sqrt(4.0), strength=0.7)
- and with NonlinUSM by Didée:
Code:
## posted at:
# http://forum.doom9.org/showthread.php?p=1555234#post1555234
#@function NonlinUSM(clip o, float "z", float "pow", float "str",
##\ float "rad", float "ldmp")
## @ z - default 6 (3 = subtle; 16 = massive)
## @ pow - default 1.6 (1.0 = oversharp; 4.0 = mild)
## @ str - default 0.7 (3 = strong; 18 = massive)
## @ rad - default 9 (0.6 = sharpen; 18 = soft)
## @ ldmp - default 0.001 (block overlap? 0.01 = a little smoother?)
##
NonlinUSM(z=6, pow=1.0, str=0.7, rad=8.0)
NonlinUSM is much more versatile; recommended.
EDIT - for example:
Code:
NonlinUSM(pow=4) ## enhance: for low bitrate sources
NonlinUSM(z=3, pow=4.0, str=1, rad=6) ## enhance less
NonlinUSM(z=6, str=1.5, rad=0.6).Sharpen(0.3) ## sharpen: for hi-q sources
NonlinUSM(z=3, str=2.5, rad=0.6) ## sharpen: less noise
NonlinUSM(z=6, pow=1.0, str=0.7, rad=6.0) ## unsharp
NonlinUSM(pow=1.0, rad=2, str=0.7) ## smoothen: for noisy sources
NonlinUSM(pow=1.0, rad=18, str=0.5) ## smear: soft glow
NonlinUSM(z=16, pow=4.0, str=18, rad=6) ## B+W psycho
NonlinUSM(z=16, pow=4.0, str=3, rad=6) ## sepia/artistic
NonlinUSM(z=6, pow=4.0, str=1, rad=36) ## local contrast
NonlinUSM(z=6, pow=1.0, str=1, rad=36) ## local contrast
NonlinUSM(z=16, pow=2.0, str=2, rad=36) ## solarized