Temporal Degrain

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Requires Filters)
(quick reformatting)
Line 1: Line 1:
{{Filter|Didee, Sagekilla|1.23|[[Media:TemporalDegrain.avs|TemporalDegrain.avs]]|Denoisers|
+
{{FilterCat4|External_filters|Plugins|Denoisers|Spatio-temporal_denoisers}}
* YV12
+
{{Filter
 +
|Didee, Sagekilla
 +
|1.23
 +
|[[Media:TemporalDegrain.avs|TemporalDegrain.avs]]
 +
|Denoisers
 +
|* YV12
 
|}}
 
|}}
{{Template:FuncDef| TemporalDegrain ( clip input, clip "denoise", bool "GPU", int "sigma", int "bw", int "bh", int "pel", int "blksize", int "ov", int "degrain", int "limit" int "SAD1", int "SAD2", int "HQ" )}}
+
== Description ==
 +
Temporal Degrain is a very slow, multi-stage temporal denoiser originally created for killing the dancing grain present in 300. It works by generating (or having the user specify) a calm search clip with almost no noise to ruin motion vector search. Then, two stages of denoising are done using MDegrain which is limited by our denoised clip. Then, the end result has contra-sharpening applied to sharpen the image to no more than what was present before.
  
 +
Temporal Degrain works as a simple temporal degraining function that will remove MOST grain from video sources, including dancing grain, like the grain found on 300. Is currently capable of utilizing MVDegrain 1, 2, or 3. Also note, the parameters don't need to be tweaked much as the default settings provide very good denoising. Use of TD is only recommended where highest quality filtering (least grain/noise, and highest detail retained) is needed. Otherwise, [[Fast Degrain]] can filter just as well.
 +
<br>
 +
<br>
 +
== Requirements ==
 +
* 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
 +
* Supported color formats: [[YV12]]
  
 
+
====Required Plugins====
 
+
* RemoveGrain and Repair (part of the [[RemoveGrain v1.0b]] package)
 
+
== Abstract ==
+
Temporal Degrain is a very slow, multi-stage temporal denoiser originally created for killing the dancing grain present in 300. It works by generating (or having the user specify) a calm search clip with almost no noise to ruin motion vector search. Then, two stages of denoising are done using MDegrain which is limited by our denoised clip. Then, the end result has contra-sharpening applied to sharpen the image to no more than what was present before.
+
 
+
=== Required Filters ===
+
* [[RemoveGrain]] 1.x
+
* Repair (part of the [[RemoveGrain]] package)
+
 
* [[MaskTools2]]
 
* [[MaskTools2]]
* MVTools2
+
* [[MVTools]]
* FFT3DFilter or FFT3DGPU
+
* [http://avisynth.org.ru/fft3dfilter/fft3dfilter.html FFT3DFilter] or [http://www.avisynth.nl/users/tsp/fft3dgpu0.8.2.7z FFT3DGPU]
* HQdn3D
+
* [http://akuvian.org/src/avisynth/hqdn3d/ HQdn3D]
 +
<br>
 +
== [[Script variables|Syntax and Parameters]] ==
 +
:{{Template:FuncDef| TemporalDegrain (clip input, clip "denoise", bool "GPU", int "sigma", int "bw", int "bh", int "pel", int "blksize", int "ov", int "degrain", int "limit" int "SAD1", int "SAD2", int "HQ" )}}
 +
<br>
 +
::{{Par2|input|clip| }}
 +
:::Input clip.
  
== Description ==
+
::{{Par2|denoise|clip|null}}
Works as a simple temporal degraining function that'll remove MOST grain from video sources, including dancing grain, like the grain found on 300. Is currently capable of utilizing MVDegrain 1, 2, or 3. Also note, the parameters don't need to be tweaked much as the default settings provide very good denoising. Use of TD is only recommended where highest quality filtering (least grain/noise, and highest detail retained) is needed. Otherwise, [[Fast Degrain]] can filter just as well.
+
:::Denoised clip for detecting motion vectors. Defining this automatically disables FFT3DFilter.
  
{{Par|denoise|clip|null}}
+
::{{Par2|GPU|bool|false}}
Denoised clip for detecting motion vectors. Defining this automatically disables FFT3DFilter.
+
:::True enables GPU based prefiltering.
  
{{Par|GPU|bool|false}}
+
::{{Par2|sigma|int|16}}
Enables GPU based prefiltering
+
:::FFT3D filtering strength; default works fine in most cases.
  
{{Par|sigma|int|16}}
+
::{{Par2|bw|int|16}}
FFT3D filtering strength. Default works fine in most cases.
+
:::FFT3D block width.
  
{{Par|bw|int|16}}
+
::{{Par2|bh|int|16}}
FFT3D block width.
+
:::FFT3D block height.
  
{{Par|bh|int|16}}
+
::{{Par2|blksize|int|8}}
FFT3D block height.
+
:::MAnalyse block size.
  
{{Par|blksize|int|8}}
+
::{{Par2|pel|int|2}}
MAnalyse block size.
+
:::MAnalyse subpixel accuracy.
  
{{Par|pel|int|2}}
+
::{{Par2|ov|int|blksize/2}}
MAnalyse subpixel accuracy.
+
:::MAnalyse block overlap.
  
{{Par|ov|int|blksize/2}}
+
::{{Par2|degrain|int|2}}
MAnalyse block overlap.
+
:::MDegrain with 1, 2, or 3 vectors.
  
{{Par|degrain|int|2}}
+
::{{Par2|SAD1|int|400}}
MDegrain with 1, 2, or 3 vectors.
+
:::MDegrain stage 1 thSAD.
  
{{Par|SAD1|int|400}}
+
::{{Par2|SAD2|int|300}}
MDegrain stage 1 thSAD.
+
:::MVDegrain stage 2 thSAD.
 
+
{{Par|SAD2|int|300}}
+
MVDegrain stage 2 thSAD.
+
 
+
{{Par|HQ|int|1}}
+
Adjusts filtering level. 0 Disables any prefiltering (not recommended), 1 adds extra prefiltering, and 2 adds a post processing step to denoising.
+
  
 +
::{{Par2|HQ|int|1}}
 +
:::Adjusts filtering level.
 +
:::*0 : disables any prefiltering (not recommended)
 +
:::*1 : adds extra prefiltering
 +
:::*2 : adds a post processing step to denoising
 +
<br>
 
== Examples ==
 
== Examples ==
 
<pre>
 
<pre>
Line 71: Line 83:
 
TemporalDegrain(degrain=1, ov=2, hq=1)
 
TemporalDegrain(degrain=1, ov=2, hq=1)
 
</pre>
 
</pre>
 
+
<br>
== Links ==
+
==External Links ==
 
Download [[Media: TemporalDegrain.avs|TemporalDegrain.avs]] Current stable version. (Recommended). <br>
 
Download [[Media: TemporalDegrain.avs|TemporalDegrain.avs]] Current stable version. (Recommended). <br>
 
Download [[Media: TemporalDegrain_beta.avs|TemporalDegrain_beta.avs]] New beta version featuring a gentle MDegrain limiter. <br>
 
Download [[Media: TemporalDegrain_beta.avs|TemporalDegrain_beta.avs]] New beta version featuring a gentle MDegrain limiter. <br>
Line 78: Line 90:
 
Download [[Media: TemporalDegrain_MT.avsi|TemporalDegrain_MT.avsi]] Alias for [[MT]]()'ing TemporalDegrain but using *single-threaded* prefilter clip. Useful when [[MT|SetMTMode]]() cannot be used.[http://forum.doom9.org/showthread.php?t=147540 Thread on doom9 forum] <br>
 
Download [[Media: TemporalDegrain_MT.avsi|TemporalDegrain_MT.avsi]] Alias for [[MT]]()'ing TemporalDegrain but using *single-threaded* prefilter clip. Useful when [[MT|SetMTMode]]() cannot be used.[http://forum.doom9.org/showthread.php?t=147540 Thread on doom9 forum] <br>
 
Download [[Media: TemporalDegrain_ChromaMod.avsi|TemporalDegrain_ChromaMod.avsi]] Allows all chroma processing to be disabled for big speed bonus with greyscale sources. [http://forum.doom9.org/showthread.php?t=147548 Thread on doom9 forum]
 
Download [[Media: TemporalDegrain_ChromaMod.avsi|TemporalDegrain_ChromaMod.avsi]] Allows all chroma processing to be disabled for big speed bonus with greyscale sources. [http://forum.doom9.org/showthread.php?t=147548 Thread on doom9 forum]
 
[[Category:External filters]]
 

Revision as of 18:13, 18 October 2014

Abstract
Author Didee, Sagekilla
Version 1.23
Download TemporalDegrain.avs
Category Denoisers
Requirements * YV12
License
Discussion

Contents

Description

Temporal Degrain is a very slow, multi-stage temporal denoiser originally created for killing the dancing grain present in 300. It works by generating (or having the user specify) a calm search clip with almost no noise to ruin motion vector search. Then, two stages of denoising are done using MDegrain which is limited by our denoised clip. Then, the end result has contra-sharpening applied to sharpen the image to no more than what was present before.

Temporal Degrain works as a simple temporal degraining function that will remove MOST grain from video sources, including dancing grain, like the grain found on 300. Is currently capable of utilizing MVDegrain 1, 2, or 3. Also note, the parameters don't need to be tweaked much as the default settings provide very good denoising. Use of TD is only recommended where highest quality filtering (least grain/noise, and highest detail retained) is needed. Otherwise, Fast Degrain can filter just as well.

Requirements

  • AviSynth 2.5.8 or later
  • Progressive input only
  • Supported color formats: YV12

Required Plugins


Syntax and Parameters

TemporalDegrain (clip input, clip "denoise", bool "GPU", int "sigma", int "bw", int "bh", int "pel", int "blksize", int "ov", int "degrain", int "limit" int "SAD1", int "SAD2", int "HQ" )


clip  input =
Input clip.
clip  denoise = null
Denoised clip for detecting motion vectors. Defining this automatically disables FFT3DFilter.
bool  GPU = false
True enables GPU based prefiltering.
int  sigma = 16
FFT3D filtering strength; default works fine in most cases.
int  bw = 16
FFT3D block width.
int  bh = 16
FFT3D block height.
int  blksize = 8
MAnalyse block size.
int  pel = 2
MAnalyse subpixel accuracy.
int  ov = blksize/2
MAnalyse block overlap.
int  degrain = 2
MDegrain with 1, 2, or 3 vectors.
int  SAD1 = 400
MDegrain stage 1 thSAD.
int  SAD2 = 300
MVDegrain stage 2 thSAD.
int  HQ = 1
Adjusts filtering level.
  • 0 : disables any prefiltering (not recommended)
  • 1 : adds extra prefiltering
  • 2 : adds a post processing step to denoising


Examples

# Useful for denoising HD material at decent speeds
Avisource("blah.avi")
TemporalDegrain(degrain=3, ov=4, blksize=16)
# Faster processing than defaults with a manageable decrease in quality.
SetMTMode(2,2)
Avisource("blah.avi"
TemporalDegrain(degrain=1, ov=2, hq=1)


External Links

Download TemporalDegrain.avs Current stable version. (Recommended).
Download TemporalDegrain_beta.avs New beta version featuring a gentle MDegrain limiter.
Download FastDegrain.avs Quick alias for MDegrain(1|2|3) with optional sharpening
Download TemporalDegrain_MT.avsi Alias for MT()'ing TemporalDegrain but using *single-threaded* prefilter clip. Useful when SetMTMode() cannot be used.Thread on doom9 forum
Download TemporalDegrain_ChromaMod.avsi Allows all chroma processing to be disabled for big speed bonus with greyscale sources. Thread on doom9 forum

Personal tools