ASharp

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(redirect for convenient searching)
 
(ASharp v1.0.0 update (port from VS))
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
#REDIRECT [[External_filters#Sharpeners]]
+
{{FilterCat6|External_filters|Plugins|Plugins_x64|Restoration_filters|Sharpeners|Deep_color_tools}}
{{FilterCat|External_filters|Adjustment_filters|Sharpeners}}
+
{{Filter3
 +
|1={{Author/Marc FD}}, {{Author/Asd-g}}
 +
|2=v1.0.0
 +
|3=[https://github.com/Asd-g/AviSynth-ASharp/releases ASharp-1.0.0.7z]
 +
|4=[[:Category:Sharpeners|Sharpeners]]
 +
|5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 +
|6=[https://forum.doom9.org/showthread.php?t=38436 Doom9 Thread]}}
 +
<br>
 +
== Description ==
 +
[[ASharp]] is an adaptive sharpening filter; basically a very common [http://en.wikipedia.org/wiki/Unsharp_masking unsharp mask] with 3 simple ideas:
 +
*Adaptive thresholding to avoid noise enhancement.
 +
*Block adaptive sharpening to avoid DCT block edges enhancement.
 +
*Block based adaptive thresholding to avoid DCT block edges enhancement.
 +
Like most AviSynth sharpeners, [[ASharp]] only processes the luma channel, the chroma channels are simply copied from the input clip (chroma sharpening seems to only introduce artifacts).
 +
<br>
 +
<br>
 +
== Requirements ==
 +
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]
 +
* [x64]: [[AviSynth+]]
 +
* [[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: [[Y8]], [[YV12]], [[YV16]], [[YV24]], [[YV411]]
 +
**AviSynth+: all [[planar]] Y and YUV(A) formats (8/10/12/14/16-bit) are supported.
 +
<br>
 +
 
 +
== [[Script variables|Syntax and Parameters]] ==
 +
:{{Template:FuncDef|ASharp (clip, float "T", float "D", float "B", bool "hqbf") }}
 +
<br>
 +
::{{Par2||clip| }}
 +
:::A clip to process. It must be in YUV 8..16-bit planar format.
 +
<br>
 +
::{{Par2|T|float|2.0}}
 +
:::Unsharp masking threshold.
 +
:::*0 will do nothing, 1 will enhance contrast 1x.
 +
:::*Range is from 0 to 32.
 +
<br>
 +
::{{Par2|D|float|4.0}}
 +
:::Adaptive sharpening strength to avoid sharpening noise.
 +
:::If greater than 0, the threshold is adapted for each pixel (bigger for edges) and t acts like a maximum.
 +
:::*Set to 0 to disable it.
 +
:::*Must be between 0 and 16.
 +
<br>
 +
::{{Par2|B|float|-1.0}}
 +
:::Block adaptive sharpening.
 +
:::It avoids sharpening the edges of DCT blocks by lowering the threshold around them.
 +
:::Use with blocky videos. If cropping the video before [[ASharp]] the top and left edges must be cropped by [[mod8|multiples of 8]].
 +
:::*Set to a negative value to disable it.
 +
:::*Must be less than 4.
 +
<br>
 +
::{{Par2|hqbf|bool|false}}
 +
:::High quality block filtering (aka block based adaptive thresholding). Set to <tt>true</tt> to enable.
 +
<br>
 +
 
 +
== Examples ==
 +
asharp with default settings (adaptive sharpening):
 +
[[AviSource]]("Blah.avi")
 +
asharp(T=2.0, D=4.0, B=-1.0, hqbf=false)
 +
 
 +
 
 +
Simple unsharp masking with a strength of 2x (adaptive sharpening disabled):
 +
asharp(T=2.0, D=0.0)
 +
<br>
 +
 
 +
== Changelog ==
 +
Version      Date(D/M/Y)      Changes<br>
 +
v1.0.0      2020/09/25      - Initial release; port of the VapourSynth plugin
 +
                              - AviSynth+: self-registers as [[MT_NICE_FILTER]].
 +
v0.95        2002/11/27      - fixed some bugs
 +
                              - added mmx compatibility
 +
                              - first GPL source release
 +
<br>
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="600px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="150px"| Download
 +
!!width="150px"| Mirror
 +
|-
 +
!v0.95
 +
|
 +
*[http://ziquash.chez-alice.fr/asharp%20v0.95.zip asharp v0.95.zip]
 +
*[http://ziquash.chez-alice.fr/asharp%20v0.95%20src.rar asharp v0.95 src.rar]
 +
*[http://www.avisynth.nl/users/warpenterprises/files/asharp_5F25_dll_20030118.zip asharp_5F25_dll_20030118.zip]
 +
|
 +
*[http://web.archive.org/web/20150518091105/http://ziquash.chez-alice.fr/asharp%20v0.95.zip asharp v0.95.zip]
 +
*[http://web.archive.org/web/20150518091105/http://ziquash.chez-alice.fr/asharp%20v0.95%20src.rar asharp v0.95 src.rar]
 +
*[http://web.archive.org/web/20150401082138/http://www.avisynth.nl/users/warpenterprises/files/asharp_5F25_dll_20030118.zip asharp_5F25_dll_20030118.zip]
 +
|}
 +
<br>
 +
== External Links ==
 +
*[https://forum.doom9.org/showthread.php?t=38436 Doom9 Forum] - asharp discussion.
 +
*[https://github.com/Asd-g/AviSynth-ASharp GitHub] - Source code repository.
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Sharpeners|External Filters]] &larr;'''

Latest revision as of 01:33, 26 September 2020

Abstract
Author Marc FD, Asd-g
Version v1.0.0
Download ASharp-1.0.0.7z
Category Sharpeners
License GPLv2
Discussion Doom9 Thread


Contents

[edit] Description

ASharp is an adaptive sharpening filter; basically a very common unsharp mask with 3 simple ideas:

  • Adaptive thresholding to avoid noise enhancement.
  • Block adaptive sharpening to avoid DCT block edges enhancement.
  • Block based adaptive thresholding to avoid DCT block edges enhancement.

Like most AviSynth sharpeners, ASharp only processes the luma channel, the chroma channels are simply copied from the input clip (chroma sharpening seems to only introduce artifacts).

[edit] Requirements


[edit] Syntax and Parameters

ASharp (clip, float "T", float "D", float "B", bool "hqbf")


clip   =
A clip to process. It must be in YUV 8..16-bit planar format.


float  T = 2.0
Unsharp masking threshold.
  • 0 will do nothing, 1 will enhance contrast 1x.
  • Range is from 0 to 32.


float  D = 4.0
Adaptive sharpening strength to avoid sharpening noise.
If greater than 0, the threshold is adapted for each pixel (bigger for edges) and t acts like a maximum.
  • Set to 0 to disable it.
  • Must be between 0 and 16.


float  B = -1.0
Block adaptive sharpening.
It avoids sharpening the edges of DCT blocks by lowering the threshold around them.
Use with blocky videos. If cropping the video before ASharp the top and left edges must be cropped by multiples of 8.
  • Set to a negative value to disable it.
  • Must be less than 4.


bool  hqbf = false
High quality block filtering (aka block based adaptive thresholding). Set to true to enable.


[edit] Examples

asharp with default settings (adaptive sharpening):

AviSource("Blah.avi")
asharp(T=2.0, D=4.0, B=-1.0, hqbf=false)


Simple unsharp masking with a strength of 2x (adaptive sharpening disabled):

asharp(T=2.0, D=0.0)


[edit] Changelog

Version      Date(D/M/Y)      Changes
v1.0.0 2020/09/25 - Initial release; port of the VapourSynth plugin - AviSynth+: self-registers as MT_NICE_FILTER. v0.95 2002/11/27 - fixed some bugs - added mmx compatibility - first GPL source release


[edit] Archived Downloads

Version Download Mirror
v0.95


[edit] External Links




Back to External Filters

Personal tools