Dering

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Dering documentation)
 
(doc update and link to working plugin)
Line 3: Line 3:
 
|1=[https://sourceforge.net/u/alexrayne/profile/ alexrayne]
 
|1=[https://sourceforge.net/u/alexrayne/profile/ alexrayne]
 
|2=Release 4
 
|2=Release 4
|3=[https://sourceforge.net/projects/avisynth-dering/ deringing-sample.zip]
+
|3=[https://files.videohelp.com/u/223002/dering_32_64.7z dering_32_64.7z]
 
|4=Deringing & Mosquito Noise
 
|4=Deringing & Mosquito Noise
 
|5=[https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html LGPLv2.1]
 
|5=[https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html LGPLv2.1]
|6=
+
|6=[https://forum.doom9.org/showthread.php?t=184570 Doom9 Forum]
 
}}
 
}}
  
 
== Description ==
 
== Description ==
This plugin removes halo\ringing occurred after sharp edges on VHS captured video
+
This plugin removes halo\ringing occurred after sharp edges on VHS captured video.
 
<br>
 
<br>
 
<br>
 
<br>
Line 17: Line 17:
 
<br>
 
<br>
 
== Requirements ==
 
== Requirements ==
* [x86] [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0]
+
* [x86] [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6.0] - <span style="color:red">'''Note:'''</span> does not work for 32-bit AviSynth+.
 +
* [x64] [[AviSynth+]]
 
* Supported color formats: [[YUY2]], [[YV12]]
 
* Supported color formats: [[YUY2]], [[YV12]]
 
<br>
 
<br>
Line 26: Line 27:
 
::{{Par2| |clip| }}
 
::{{Par2| |clip| }}
 
:::Input clip; must be YUY2 or YV12.
 
:::Input clip; must be YUY2 or YV12.
 +
:::Input clip must be named, for example: Dering(last) or Dering(src=input).
 
<br>
 
<br>
 
::{{Par2|A|float|0.3}}
 
::{{Par2|A|float|0.3}}
:::Ringing amplitude relative to edge size.
+
:::Ringing amplitude relative to edge size. Must be < 1.0
 
<br>
 
<br>
::{{Par2|W|float|0.35}}
+
::{{Par2|W|float|3.5}}
:::Ringing frequency - distance between ringing peaks.
+
:::Ringing frequency - distance between ringing peaks. Must be >= 1.5
 
<br>
 
<br>
::{{Par2|RelVisibleTh|float|0.005}}
+
::{{Par2|RelVisibleTh|float|0.01}}
 
:::Value of (ringing amplitude)/(steady signal value).
 
:::Value of (ringing amplitude)/(steady signal value).
 
:::If detected amplitude < VisibleTh, this ringing area skip from correction.
 
:::If detected amplitude < VisibleTh, this ringing area skip from correction.
 
:::Range 0.0 to 1.0
 
:::Range 0.0 to 1.0
 
<br>
 
<br>
::{{Par2|AbsVisibleTh|float|0.01}}
+
::{{Par2|AbsVisibleTh|float|0.005}}
 
:::Value of (ringing amplitude)/(full dynamic luma range = 255).
 
:::Value of (ringing amplitude)/(full dynamic luma range = 255).
 
:::If detected amplitude < VisibleTh, this ringing area skip from correction.
 
:::If detected amplitude < VisibleTh, this ringing area skip from correction.
Line 45: Line 47:
 
::{{Par2|PostFilterArea|int|1000}}
 
::{{Par2|PostFilterArea|int|1000}}
 
:::Limit of filtering area length on ringing.
 
:::Limit of filtering area length on ringing.
 +
:::Parameter is disabled.
 
<br>
 
<br>
::{{Par2|PostFilter|string|"median"}}
+
::{{Par2|PostFilter|string|"median2"}}
 
:::Type of smoothing post filter applied after deringing:
 
:::Type of smoothing post filter applied after deringing:
 
:::*"median" - median filter y=(2*x[n]-x[n-1]-x[n+1])/2
 
:::*"median" - median filter y=(2*x[n]-x[n-1]-x[n+1])/2
 
:::*"median2" - 2nd order median filter y=(2*x[n]-x[n-1]-x[n+1])/2
 
:::*"median2" - 2nd order median filter y=(2*x[n]-x[n-1]-x[n+1])/2
 
:::*"backiir" - back direction IIR2 filter (see D parameter)
 
:::*"backiir" - back direction IIR2 filter (see D parameter)
:::*"iir"    - forward direction IIR2 filter (see D parameter)
 
 
<br>
 
<br>
 
::{{Par2|Dump|float|0.3}}
 
::{{Par2|Dump|float|0.3}}
 
:::Dumping of PostFilter.
 
:::Dumping of PostFilter.
 +
:::Parameter is disabled.
 
<br>
 
<br>
 
::{{Par2|Edges|int|0}}
 
::{{Par2|Edges|int|0}}
 
:::Which polarity of edges to process: 0 - both, <0 - falling only, >0 rising only.
 
:::Which polarity of edges to process: 0 - both, <0 - falling only, >0 rising only.
 +
:::Parameter is disabled.
 
<br>
 
<br>
 
::{{Par2|PreFilter|string|"FIR2"}}
 
::{{Par2|PreFilter|string|"FIR2"}}
Line 63: Line 67:
 
:::*"FIR2" - ordinary fir2 filter
 
:::*"FIR2" - ordinary fir2 filter
 
:::*"deltaFIR" - compensator by pre-rendered ringing G-respondents
 
:::*"deltaFIR" - compensator by pre-rendered ringing G-respondents
:::*Any other use FIR2 on resampled x2 inputs  
+
:::*Any other name uses FIR2 on resampled x2 inputs
 
<br>
 
<br>
 
::{{Par2|SkipAlonePeaks|bool|true}}
 
::{{Par2|SkipAlonePeaks|bool|true}}
Line 70: Line 74:
 
::{{Par2|UseEmphasis|bool|false}}
 
::{{Par2|UseEmphasis|bool|false}}
 
:::If true, it tries to enhance the front edge when the deltaFIR filter is used.
 
:::If true, it tries to enhance the front edge when the deltaFIR filter is used.
 +
:::Parameter is disabled.
 
<br>
 
<br>
::{{Par2|OutPlane|string|"filter"}}
+
::{{Par2|OutPlane|string|"filtered"}}
 
:::Type of output:
 
:::Type of output:
:::*"filter'" - filtered image
+
:::*"filtered" - filtered image
 
:::*"AllPeaks" - detected peaks in input image
 
:::*"AllPeaks" - detected peaks in input image
 
:::*"Peaks"  - peaks in image selected for filtering
 
:::*"Peaks"  - peaks in image selected for filtering
 +
:::Parameter is disabled.
 
<br>
 
<br>
  
Line 81: Line 87:
 
Dering with default settings:
 
Dering with default settings:
 
  [[AviSource]]("Blah.avi")
 
  [[AviSource]]("Blah.avi")
  Dering(A=0.3, W=0.35, RelVisibleTh=0.005, AbsVisibleTh=0.01, PostFilterArea=1000, PostFilter="median", \
+
  Dering(last, A=0.3, W=3.5, RelVisibleTh=0.01, AbsVisibleTh=0.005, \
        Dump=0.3, Edges=0, PreFilter="FIR2", SkipAlonePeaks=true, UseEmphasis=false, OutPlane="filtered")
+
        PostFilter="median2", PreFilter="FIR2", SkipAlonePeaks=true)
 
<br>
 
<br>
  

Revision as of 17:27, 16 November 2022

Abstract
Author alexrayne
Version Release 4
Download dering_32_64.7z
Category Deringing & Mosquito Noise
License LGPLv2.1
Discussion Doom9 Forum

Contents

Description

This plugin removes halo\ringing occurred after sharp edges on VHS captured video.

Note: Dering is a C-plugin so it must be loaded using LoadCPlugin, except if you're using AviSynth+, it allows autoloading of C-plugins.

Requirements


Syntax and Parameters

Dering (clip src, float "A", float "W", float "RelVisibleTh", float "AbsVisibleTh", int "PostFilterArea", string "PostFilter", float "Dump", int "Edges", string "PreFilter", bool "SkipAlonePeaks", bool "UseEmphasis", string "OutPlane")


clip   =
Input clip; must be YUY2 or YV12.
Input clip must be named, for example: Dering(last) or Dering(src=input).


float  A = 0.3
Ringing amplitude relative to edge size. Must be < 1.0


float  W = 3.5
Ringing frequency - distance between ringing peaks. Must be >= 1.5


float  RelVisibleTh = 0.01
Value of (ringing amplitude)/(steady signal value).
If detected amplitude < VisibleTh, this ringing area skip from correction.
Range 0.0 to 1.0


float  AbsVisibleTh = 0.005
Value of (ringing amplitude)/(full dynamic luma range = 255).
If detected amplitude < VisibleTh, this ringing area skip from correction.
Range 0.0 to 1.0


int  PostFilterArea = 1000
Limit of filtering area length on ringing.
Parameter is disabled.


string  PostFilter = "median2"
Type of smoothing post filter applied after deringing:
  • "median" - median filter y=(2*x[n]-x[n-1]-x[n+1])/2
  • "median2" - 2nd order median filter y=(2*x[n]-x[n-1]-x[n+1])/2
  • "backiir" - back direction IIR2 filter (see D parameter)


float  Dump = 0.3
Dumping of PostFilter.
Parameter is disabled.


int  Edges = 0
Which polarity of edges to process: 0 - both, <0 - falling only, >0 rising only.
Parameter is disabled.


string  PreFilter = "FIR2"
Type of main deringer filter:
  • "FIR2" - ordinary fir2 filter
  • "deltaFIR" - compensator by pre-rendered ringing G-respondents
  • Any other name uses FIR2 on resampled x2 inputs


bool  SkipAlonePeaks = true
Alone peaks can be lost unfiltered if true, or filter as usual peak if false.


bool  UseEmphasis = false
If true, it tries to enhance the front edge when the deltaFIR filter is used.
Parameter is disabled.


string  OutPlane = "filtered"
Type of output:
  • "filtered" - filtered image
  • "AllPeaks" - detected peaks in input image
  • "Peaks" - peaks in image selected for filtering
Parameter is disabled.


Examples

Dering with default settings:

AviSource("Blah.avi")
Dering(last, A=0.3, W=3.5, RelVisibleTh=0.01, AbsVisibleTh=0.005, \
       PostFilter="median2", PreFilter="FIR2", SkipAlonePeaks=true)


External Links




Back to External Filters

Personal tools