UnFilter

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(make parameter description a bit more compact and add a couple of things)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{FilterCat|Plugins|External_filters|Adjustment_filters|Sharpeners}}
+
{{FilterCat4|Plugins|External_filters|Adjustment_filters|Sharpeners}}
{{Template:FuncDef|UnFilter(clip source,  int ''HSharp'', int ''VSharp'') }}
+
 
{{Filter3
 
{{Filter3
 
|{{Author/Tom Barry}}
 
|{{Author/Tom Barry}}
 
|0.0.1.5
 
|0.0.1.5
|[http://web.archive.org/web/20130207143129/http://neuron2.net/trbarry/UnFilter.zip UnFilter.zip]
+
|[{{N2Archived}}/trbarry/UnFilter.zip UnFilter.zip]
 
|Adjustment filters
 
|Adjustment filters
 
|[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 
|[http://www.gnu.org/licenses/gpl-2.0.txt GPLv2]
 
|6=[http://forum.doom9.org/showthread.php?t=28197 Doom9 Thread]}}
 
|6=[http://forum.doom9.org/showthread.php?t=28197 Doom9 Thread]}}
== Abstract ==
+
 
 +
== Description ==
 
UnFilter is a simple and reasonably fast Avisynth Soften/Sharpen filter.
 
UnFilter is a simple and reasonably fast Avisynth Soften/Sharpen filter.
  
It implements 5-tap user adjustable horizontal and vertical filters designed to  
+
It implements 5-tap user adjustable horizontal and vertical filters designed to (slightly) reverse previous efforts at softening or edge enhancement that are common (but ugly) in DVD mastering. Since DVDs were intended originally for interlaced displays this has caused content providers to vertically filter them even a bit more to hide interlacing artifacts.  They sometimes overdo the edge enhancement.
(slightly) reverse previous efforts at softening or edge enhancement that are
+
common (but ugly) in DVD mastering. Since DVDs were intended originally
+
for interlaced displays this has caused content providers to vertically filter
+
them even a bit more to hide interlacing artifacts.  They sometimes overdo
+
the edge enhancement.
+
  
When softening it will attempt to approximate the inverse of a simple 3-tap edge
+
When softening it will attempt to approximate the inverse of a simple 3-tap edge enhancement filter. When sharpening it will attempt to approximate the inverse of a simple 3-tap softening filter.  For the math and logic involved see the comments in the UnFilterALL.inc member included in zip file.
enhancement filter. When sharpening it will attempt to approximate the inverse
+
of a simple 3-tap softening filter.  For the math and logic involved see
+
the comments in the UnFilterALL.inc member included in zip file.
+
  
The effects are fairly mild but be aware that excessive sharpening makes things  
+
The effects are fairly mild but be aware that excessive sharpening makes things harder to compress and may bring about the dreaded "edge enhancement artifacts" the people complain about in DVDs from some studios. And while excessive softness may hide noise it loses detail and generally just looks ugly. So it is probably best to just try to reverse whatever has already been done to your source.
harder to compress and may bring about the dreaded "edge enhancement artifacts"
+
the people complain about in DVDs from some studios. And while excessive  
+
softness may hide noise it loses detail and generally just looks ugly. So it is
+
probably best to just try to reverse whatever has already been done to your source.
+
  
UnFilter should run on all MMX machines or higher. It has also has some added code  
+
UnFilter should run on all [[MMX]] machines or higher. It has also has some added code for 3DNOW instructions for when it is running on a K6-II or higher and some SSEMMX for P3 & Athlon.
for 3DNOW instructions for when it is running on a K6-II or higher and some SSEMMX  
+
<br>
for P3 & Athlon.
+
<br>
 
+
== Requirements ==
==Known issues and limitations==
+
*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
Assumes YUV (YUY2) or YV12 Frame Based input. Use an AVIsynth function to convert first if  needed.      
+
* Supported color formats: [[YUY2]], [[YV12]]
 
+
*[[MMX]] capable CPU
Currently still requires the pixel width to be a multiple of 2.  
+
<br>
 
+
== [[Script variables|Syntax and Parameters]] ==
YV12 support for Avisynth 2.5 alpha release only.
+
:{{Template:FuncDef|UnFilter (clip, int, int)}}
 
+
<br>
==Parameters==
+
::{{Par| |clip| }}
 
+
:::Input clip.
{{ParR|HSharp|int|0|-100-100}}
+
<br>
Horizontal sharpness.  Valid values are from -100 (max softness) through zero (neutral) through +100 (max sharpness).
+
::{{Par| |int| }}
 
+
::{{Par| |int| }}
{{ParR|VSharp|int|0|-100-100}}
+
:::<tt>'''HSharp, VSharp'''</tt>: horizontal and vertical sharpness. Valid values are from -100 (max softness) through zero (neutral) through +100 (max sharpness).
Vertical sharpness. Valid values are from -100 (max softness) through zero (neutral) through +100 (max sharpness).
+
  
 +
:::'''Note:''' all parameters are unnamed and do not have a default so they must be specified.
 +
<br>
 
== Examples==  
 
== Examples==  
 
+
Extreme sharpening:
Extreme sharpening
+
  [[AviSource]]("blah.avi")
LoadPlugin("F:\UnFilter\UnFilter.dll")
+
  UnFilter(100, 100) # (HSharp, VSharp)
  Avisource("D:\wherever\myfile.avi")
+
<br>
  UnFilter(100,100)
+
== Changelog==
 
+
2003/01/18  V 0.0.1.5  - Use AvisynthPluginInit2
 +
2002/11/25  V 0.0.1.4  - YV12 support - Don't mess with chroma
 +
2002/11/13  V 0.0.1.3  - YV12 support
 +
2002/06/29  V 0.0.1.2  - Fix more brain dead mistakes relating to low parm vals
 +
2002/06/29  V 0.0.1.1  - Added version info
 +
                          - Fixed bug on UnFilter(30,30)
 +
                          - Fixed bug that might crash MMX machines
 +
2002/06/28  V 0.0.1.0  - Initial test release V 0.1 (had no version info)
 +
<br>
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="600px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="150px"| Download
 +
!!width="150px"| Mirror
 +
|-
 +
!v0.0.1.5
 +
|[http://web.archive.org/web/20111205012101/http://neuron2.net/trbarry/UnFilter.zip UnFilter.zip]
 +
|[http://web.archive.org/web/20050211040116/http://home.comcast.net/~trbarry/UnFilter.zip UnFilter.zip]
 +
|}
 +
<br>
 
==External Links==
 
==External Links==
*[http://web.archive.org/web/20051127014249/http://home.comcast.net/~trbarry/ Tom Barry's homepage (archived link)]
+
*[http://web.archive.org/web/20051127014249/http://home.comcast.net/~trbarry/ Tom Barry's homepage] | [{{N2Archived}}/trbarry/trbarry.html Neuron2's mirror]
*[{{N2Moved}}/trbarry/trbarry.html Neuron2's mirror (archived link)]
+
 
*[http://forum.doom9.org/showthread.php?t=28197 Doom9 discussion]
 
*[http://forum.doom9.org/showthread.php?t=28197 Doom9 discussion]
 +
*[http://avisynth.org.ru/docs/english/externalfilters/unfilter.htm avisynth.org.ru] - UnFilter documentation, [http://avisynth.org.ru/docs/russian/externalfilters/unfilter.htm Russian].
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Sharpeners|External Filters]] &larr;'''

Latest revision as of 13:36, 30 March 2015

Abstract
Author Tom Barry
Version 0.0.1.5
Download UnFilter.zip
Category Adjustment filters
License GPLv2
Discussion Doom9 Thread

Contents

[edit] Description

UnFilter is a simple and reasonably fast Avisynth Soften/Sharpen filter.

It implements 5-tap user adjustable horizontal and vertical filters designed to (slightly) reverse previous efforts at softening or edge enhancement that are common (but ugly) in DVD mastering. Since DVDs were intended originally for interlaced displays this has caused content providers to vertically filter them even a bit more to hide interlacing artifacts. They sometimes overdo the edge enhancement.

When softening it will attempt to approximate the inverse of a simple 3-tap edge enhancement filter. When sharpening it will attempt to approximate the inverse of a simple 3-tap softening filter. For the math and logic involved see the comments in the UnFilterALL.inc member included in zip file.

The effects are fairly mild but be aware that excessive sharpening makes things harder to compress and may bring about the dreaded "edge enhancement artifacts" the people complain about in DVDs from some studios. And while excessive softness may hide noise it loses detail and generally just looks ugly. So it is probably best to just try to reverse whatever has already been done to your source.

UnFilter should run on all MMX machines or higher. It has also has some added code for 3DNOW instructions for when it is running on a K6-II or higher and some SSEMMX for P3 & Athlon.

[edit] Requirements


[edit] Syntax and Parameters

UnFilter (clip, int, int)


clip =
Input clip.


int =
int =
HSharp, VSharp: horizontal and vertical sharpness. Valid values are from -100 (max softness) through zero (neutral) through +100 (max sharpness).
Note: all parameters are unnamed and do not have a default so they must be specified.


[edit] Examples

Extreme sharpening:

AviSource("blah.avi")
UnFilter(100, 100) # (HSharp, VSharp)


[edit] Changelog

2003/01/18   V 0.0.1.5   - Use AvisynthPluginInit2
2002/11/25   V 0.0.1.4   - YV12 support - Don't mess with chroma
2002/11/13   V 0.0.1.3   - YV12 support
2002/06/29   V 0.0.1.2   - Fix more brain dead mistakes relating to low parm vals
2002/06/29   V 0.0.1.1   - Added version info
                         - Fixed bug on UnFilter(30,30)
                         - Fixed bug that might crash MMX machines
2002/06/28   V 0.0.1.0   - Initial test release V 0.1 (had no version info)


[edit] Archived Downloads

Version Download Mirror
v0.0.1.5 UnFilter.zip UnFilter.zip


[edit] External Links




Back to External Filters

Personal tools