HQDering mod

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (links)
m (minor reformatting, category)
Line 1: Line 1:
{{FilterCat|External_filters|Restoration_filters|Deringing & Mosquito Noise}}
+
{{FilterCat4|External_filters|Scripts|Restoration_filters|Deringing & Mosquito Noise}}
[[Category:Scripts]]
+
 
{{Filter3
 
{{Filter3
 
| mawen1250
 
| mawen1250
Line 10: Line 9:
 
}}
 
}}
 
== Description ==
 
== Description ==
:Applies deringing by using a smart smoother near edges (where ringing occurs) only.
+
Applies deringing by using a smart smoother near edges (where ringing occurs) only.<br>
 
<br>
 
<br>
 
== Requirements ==
 
== Requirements ==
:- [http://forum.doom9.org/showthread.php?t=168764 AviSynth 2.6.0 Alpha5] or later
+
* [http://forum.doom9.org/showthread.php?t=168764 AviSynth 2.6.0 Alpha5] or later
:- [[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: [[Y8]], [[YV12]], [[YV16]], [[YV24]]
+
* Supported color formats: [[Y8]], [[YV12]], [[YV16]], [[YV24]]
 
<br>
 
<br>
 
==== Required Plugins ====
 
==== Required Plugins ====
:*[http://forum.doom9.org/showpost.php?p=1386559&postcount=3 dfttest v1.9.4]
+
*[http://forum.doom9.org/showpost.php?p=1386559&postcount=3 dfttest v1.9.4]
:*[http://forum.doom9.org/showpost.php?p=1386559&postcount=3 Dither v1.26.1]
+
*[http://forum.doom9.org/showpost.php?p=1386559&postcount=3 Dither v1.26.3]
:*[[MaskTools2]] 2.0a48+
+
*[[MaskTools2]] 2.0a48+
:*[[MedianBlur2]]
+
*[[MedianBlur2]]
:*[[RgTools]]
+
*[[RgTools]]
:*[http://forum.doom9.org/showthread.php?t=154971 SmoothAdjust] v3.00
+
*[http://forum.doom9.org/showthread.php?t=154971 SmoothAdjust] v3.00
 
<br>
 
<br>
  
Line 183: Line 182:
 
== External Links ==
 
== External Links ==
 
*[http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=914 NMM-HD Forum] - HQDering mod discussion [Chinese].
 
*[http://www.nmm-hd.org/newbbs/viewtopic.php?f=7&t=914 NMM-HD Forum] - HQDering mod discussion [Chinese].
<br>
 
 
<br>
 
<br>
 
<br>
 
<br>
 
-----------------------------------------------
 
-----------------------------------------------
 
'''Back to [[External_filters#Deringing_.26_Mosquito_Noise|External Filters]] &larr;'''
 
'''Back to [[External_filters#Deringing_.26_Mosquito_Noise|External Filters]] &larr;'''

Revision as of 15:25, 20 September 2014

Abstract
Author mawen1250
Version v1.8
Download HQDeringmod_v1.8.avsi
Category Deringing & Mosquito Noise
License
Discussion NMM-HD Thread - [Chinese]

Contents

Description

Applies deringing by using a smart smoother near edges (where ringing occurs) only.

Requirements


Required Plugins


Syntax and Parameters

HQDeringmod (clip input, clip "smoothed", clip "ringmask",
int "mrad", int "msmooth", bool "incedge", int "mthr", int "minp",
int "nrmode", int "nrmodec", float "sigma", float "sigma2", int "sbsize", int "sosize",
int "sharp", int "drrep", float "thr", float "elast", float "darkthr",
int "Y", int "U", int "V", bool "lsb_in", bool "lsb", bool "lsb_out", bool "tv_range", int "dither", bool "show")


Input Clips

clip  input =
Input clip to be processed.
clip  smoothed =
Optional preprocessed smoothed clip.
clip  ringmask =
Optional preprocessed ring mask.

Input/Output

int  Y = 3
int  U = 2
int  V = 2
Choose what planes to process; works just like MaskTools2.
  • 2 : copy from input clip
  • 3 : process
bool  lsb_in = false
input clip is 16-bit stacked or not.
bool  lsb = false
smoothed clip is 16-bit stacked or not, processing precision is 16-bit or not.
bool  lsb_out = lsb
Output clip is 16-bit stacked or not. The default is dictated by lsb.
bool  tv_range = true
Input clip is TV-range (16-235) or PC-range (0-255).
int  dither = 6
Dither mode for 16-bit to 8-bit conversion.
bool  show = false
Whether to output mask clip instead of filtered clip.

Ring Mask

int  mthr = 60
Threshold of prewitt edge mask, lower value means more aggressive processing but for strong ringing,
lower value will treat some ringing as edge, which protects this ringing from being processed.
int  minp = 1
Inpanding of prewitt edge mask, higher value means more aggressive processing.
int  mrad = 1
Expanding of edge mask, higher value means more aggressive processing.
int  msmooth = 1
Inflate of edge mask, smooth boundaries of mask.
bool  incedge = false
Whether to include edge in ring mask, by default ring mask only include area near edges.

Deringing Kernel

int  nrmode =
Deringing kernel:
  • 0: dfttest
  • 1: MinBlur(radius=1)
  • 2: MinBlur(radius=2)
  • 3: MinBlur(radius=3)
By default, 2 is set for HD(Width>=1280 or Height>=720) and 1 is set for non-HD.
int  nrmodec = nrmode
Deringing kernel for chroma. The default for nrmodec is the value of nrmode.
float  sigma = 128.0
dfttest: sigma for medium frequencies.
float  sigma2 = sigma/16.0
dfttest: sigma for low&high frequencies. The default value is sigma/16.0, so by default sigma2=8.
int  sbsize =
dfttest: length of the sides of the spatial window.
By default, 8 is set for HD(Width>=1280 or Height>=720) and 6 is set for non-HD.
int  sosize =
dfttest: spatial overlap amount.
By default, 6 is set for HD(Width>=1280 or Height>=720) and 4 is set for non-HD.

Post-Processing

int  sharp = 1
Whether to use contra-sharpening to resharpen the deringed clip; 1-3 represents radius, 0 means no sharpening.
int  drrep =
Use repair for details retention, recommended values are 24/23 for lsb=False and 13/12/1 for lsb=True.
The default is set by this logic:
If nrmode is greater than 0 and lsb=True then set to 13.
If nrmode is greater than 0 and lsb=False then set to 24.
If nrmode is not greater than 0 and lsb=false then set to 0.
float  thr = 12.0
The same meaning with "thr" in Dither_limit_dif16, valid value range is [0, 128.0] lsb=True and [0, 255.0] for lsb=False.
Set to 0 to disable the limiting process.
float  elast = 2.0
The same meaning with "elast" in Dither_limit_dif16, valid value range is [1, inf ).
PDiff: pixel value diff between processed clip and input clip.
ODiff: pixel value diff between output clip and input clip.
PDiff, thr and elast is used to calculate ODiff:
ODiff = PDiff when [PDiff <= thr]
ODiff gradually smooths from thr to 0 when [thr <= PDiff <= thr * elast]
For elast>2.0, ODiff reaches maximum when [PDiff == thr * elast / 2]
ODiff = 0 when [PDiff >= thr * elast]
Larger "thr" will result in more pixels being taken from processed clip.
Larger "thr" will result in less pixels being taken from input clip.
Larger "elast" will result in more pixels being blended from processed&input clip, for smoother merging.
float  darkthr =
Threshold for darker area near edges, by default darkthr equals to thr/4.
Set it lower if you think de-ringing destroys too much lines, etc.
When "darkthr" is not equal to "thr", "thr" limits darkening while "darkthr" limits brightening.
    Example:

    "thr=0,   darkthr=0  " - no limiting
    "thr=255, darkthr=255" - no limiting
    "thr=8,   darkthr=2  " - limit darkening with   8             , brightening is limited to 2
    "thr=8,   darkthr=0  " - limit darkening with   8             , brightening is limited to 0(stays unchanged)
    "thr=255, darkthr=0  " - limit darkening with 255(no limiting), brightening is limited to 0(stays unchanged)



Examples

HQDeringmod with default values:

AviSource("Blah.avi")
HQDeringmod()


External Links




Back to External Filters

Personal tools