ASharp
From Avisynth wiki
(Difference between revisions)
(asharp) |
(ASharp v1.0.0 update (port from VS)) |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | {{ | + | {{FilterCat6|External_filters|Plugins|Plugins_x64|Restoration_filters|Sharpeners|Deep_color_tools}} |
{{Filter3 | {{Filter3 | ||
− | | {{Author/Marc FD}} | + | |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] |
− | | [[:Category:Sharpeners|Sharpeners]] | + | |4=[[:Category:Sharpeners|Sharpeners]] |
− | | [ | + | |5=[https://www.gnu.org/licenses/gpl-2.0.txt GPLv2] |
− | |6=[ | + | |6=[https://forum.doom9.org/showthread.php?t=38436 Doom9 Thread]}} |
<br> | <br> | ||
== Description == | == 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. | *Adaptive thresholding to avoid noise enhancement. | ||
*Block adaptive sharpening to avoid DCT block edges enhancement. | *Block adaptive sharpening to avoid DCT block edges enhancement. | ||
*Block based adaptive thresholding to avoid DCT block edges enhancement. | *Block based adaptive thresholding to avoid DCT block edges enhancement. | ||
− | Like most AviSynth sharpeners, [[ | + | 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> | ||
<br> | <br> | ||
== Requirements == | == Requirements == | ||
− | * AviSynth | + | * [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 | * [[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]] | + | * 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> | <br> | ||
== [[Script variables|Syntax and Parameters]] == | == [[Script variables|Syntax and Parameters]] == | ||
− | :{{Template:FuncDef| | + | :{{Template:FuncDef|ASharp (clip, float "T", float "D", float "B", bool "hqbf") }} |
<br> | <br> | ||
::{{Par2||clip| }} | ::{{Par2||clip| }} | ||
− | ::: | + | :::A clip to process. It must be in YUV 8..16-bit planar format. |
<br> | <br> | ||
− | ::{{Par2|T|float|2}} | + | ::{{Par2|T|float|2.0}} |
− | :::Unsharp masking threshold. | + | :::Unsharp masking threshold. |
+ | :::*0 will do nothing, 1 will enhance contrast 1x. | ||
+ | :::*Range is from 0 to 32. | ||
<br> | <br> | ||
− | ::{{Par2|D|float|4}} | + | ::{{Par2|D|float|4.0}} |
− | :::Adaptive sharpening strength | + | :::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> | <br> | ||
− | ::{{Par2|B|float|-1}} | + | ::{{Par2|B|float|-1.0}} |
− | :::Block adaptive sharpening | + | :::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> | <br> | ||
::{{Par2|hqbf|bool|false}} | ::{{Par2|hqbf|bool|false}} | ||
Line 49: | Line 55: | ||
asharp with default settings (adaptive sharpening): | asharp with default settings (adaptive sharpening): | ||
[[AviSource]]("Blah.avi") | [[AviSource]]("Blah.avi") | ||
− | asharp(T=2, D=4, | + | asharp(T=2.0, D=4.0, B=-1.0, hqbf=false) |
Simple unsharp masking with a strength of 2x (adaptive sharpening disabled): | Simple unsharp masking with a strength of 2x (adaptive sharpening disabled): | ||
− | asharp(T=2, D=0) | + | asharp(T=2.0, D=0.0) |
<br> | <br> | ||
+ | |||
== Changelog == | == Changelog == | ||
Version Date(D/M/Y) Changes<br> | Version Date(D/M/Y) Changes<br> | ||
− | v0.95 | + | 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 | - added mmx compatibility | ||
- first GPL source release | - first GPL source release | ||
Line 80: | Line 89: | ||
<br> | <br> | ||
== External Links == | == 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> | ||
<br> | <br> | ||
----------------------------------------------- | ----------------------------------------------- | ||
'''Back to [[External_filters#Sharpeners|External Filters]] ←''' | '''Back to [[External_filters#Sharpeners|External Filters]] ←''' |
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
- [x86]: AviSynth+ or AviSynth 2.6
- [x64]: AviSynth+
- 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.
[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.
- clip =
- float T = 2.0
- Unsharp masking threshold.
- 0 will do nothing, 1 will enhance contrast 1x.
- Range is from 0 to 32.
- Unsharp masking threshold.
- float T = 2.0
- 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 D = 4.0
- 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.
- float B = -1.0
- bool hqbf = false
- High quality block filtering (aka block based adaptive thresholding). Set to true to enable.
- bool hqbf = false
[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
- Doom9 Forum - asharp discussion.
- GitHub - Source code repository.
Back to External Filters ←