TempGaussMC

From Avisynth wiki
Jump to: navigation, search
Abstract
Author Didée
Version beta2
Download TempGaussMC_beta2.rar
Category Deinterlacers
License
Discussion Doom9 Thread

Contents

Description

Motion-compensated bob deinterlacer, based on temporal Gaussian blurring. Reduces noise/grain of the source and does NOT leave the original fields unchanged. Output is rich with details and very stable. It is SLOW.

Requirements

  • AviSynth 2.5.8 or greater
  • Supported color formats: YV12

Required Plugins

Optional:

  • NNEDI / EEDI2 / Yadif
    Depending on which EdiMode you want to use.
  • RgTools
    Recommended drop-in replacement for RemoveGrain, Repair, and VerticalCleaner!


Syntax and Parameters

TempGaussMC_beta2 (clip clp, int "tr0", int "tr1", int "tr2", int "rep0", int "rep1", int "rep2", string "EdiMode", int "qual", int "EEDI2maxd", int "lossless", float "sharpness", int "Smode", int "SLmode", int "SLrad", float "Sbb", float "SVthin", int "Sovs", int "blocksize", int "overlap", bool "truemotion", bool "globalmtn", int "search", int "searchparam", int "pelsearch", int "sharp", int "lambda", int "DCT", int "pnew", int "plevel", int "lsad", int "SCth1", int "SCth2", int "thSAD1", int "thSAD2", float "pel2hr", bool "border", int "draft", clip "edeint")

Note: some of the following parameters are not listed in the correct order as shown above.

Input clips

clip  clp =
interlaced input clip to be processed.
clip  edient =
Optional input clip to provide externally created interpolated clip. By default this parameter is undefined, meaning the interpolated clip will be created using the method chosen via EdiMode.

Defaults for temporal Gauss filtering

int  tr0 = 2
Temporal radius for temporal Gauss before motion compensation (1 or 2).
int  tr1 = 2
Temporal radius for temporal Gauss before motion compensation (1 or 2).
int  tr0 = 1
Temporal radius for final MDegrain (1, 2 or 3)

Defaults for EDI interpolation

string  EdiMode = "EEDI2"
Interpolator to use: "nnedi2", "NNEDI", "EEDI2", or "Yadif". Any other string: use plain bicubic bob (fast!).
int  qual = 1
nnedi2 only: quality vs speed option. 1-3.
int  EEDI2maxd = 8
EEDI2 interpolation only: spatial search distance value.

Defaults for temporal Gauss reparation

int  rep0 = 4
Repair TemporalSoften-defects for searchclip.
int  rep1 = 0
Repair MDegrain-defects for output (stage1).
int  rep2 = 4
Repair MDegrain-defects for output (stage2).
int  lossless = -1
"Lossless" mode will leave the original fields unchanged, i.e. the original input can be extracted from the result again
  • -1 : deactivated (the old lossy mode)
  • 0 : dumb-weave of orig-fields and TGMC-interpolated fields. Not good! It's only available as to try and see WHY it's not good. ;-)
  • 1 : dumb-weave with weak spatial anticomb. Not really recommended. May suffice for sources with sufficiently strong lowpass.
  • 2 : MC'ed temporal compensation (normal) followed by spatial anticomb. Better for sharp sources. Little less stable than "3".
  • 3 : MC'ed temporal compensation (stronger) followed by spatial anticomb. More stable than "2".

Defaults for contra-sharpening of the temporal-Gauss'ed clip

float  sharpness = 0.25+(tr1+tr2)/6.0
Strength of sharpening, 0.0 to 1.0, or more if you like.
int  Smode = 2
Which method to use for re-sharpening the MC'ed temporal gauss:
  • 0 = not at all
  • 1 = 3x3 kernel
  • 2 = vertical min/max plus 3x3 kernel
int  SLmode = 2
How to limit the sharpening:
  • 0 = not at all
  • 1 = spatial, before 2nd MV stage...........(fast)
  • 2 = MC-temporal, before 2nd MV stage..(slow)
  • 3 = spatial, after 2nd MV stage..............(fast)
  • 4 = MC-temporal, after 2nd MV stage.....(slow)
int  SLrad = 1
How much prev+next temporal neighbors to consider for sharpness limiting (SLmode = 2|4), resp. spatial radius for spatial sharpness limiting mode (SLmode = 1|3)
float  Sbb = 1.0
Back-blending of Gauss-blurred sharpen's difference (slightly increases visual fidelity)
  • 0 = no back-blending
  • 1 = before sharp-limiting
  • 2 = after sharp-limiting
  • 3 = before AND after sharp-limiting
float  SVthin = 1.0
Vertical thinning of broadened horizontal edges: 0.0=OFF 0.5=weak 3.0=strrrong
int  Sovs = 0
Allowed "overshoot" for sharpness limiting (a little cheating, that is).

Defaults for important MV-parameters

int  blocksize = 16
Blocksize for motion search.
int  overlap = blocksize/2
Overlap size for ME blocks.
bool  truemotion = false
Whether to use MAnalyse's "truemotion" defaults.
bool  globalmtn = true
"global" parameter of MAnalyse.

Defaults for "less important" MV-parameters

int  search = 4
Search method.
int  searchparam = 2
Search depth.
int  pelsearch = 2
Accuracy of pel level search: 1 = fast, 2 = accurate.
int  sharp = 2
Sharpness of subpel interpolation.
int  DCT = 0
DCT mode. Various modes may help or may harm ... default is 0 = OFF.
int  lambda = truemotion ? 1000*blocksize*blocksize/64 : 100*blocksize*blocksize/64
Vector coherence, if truemotion is set to true it defaults to 1000*blocksize*blocksize/64, if false 100*blocksize*blocksize/64.
int  pnew = truemotion ? 50 : 25
Penalty for new vectors over predicted vectors, if truemotion is set to true it defaults to 50, if false 25.
int  plevel = truemotion ? 1 : 0
Lamda level scaling mode, if truemotion is set to true it defaults to 1, if false 0.
int  lsad = truemotion ? 1200*blocksize*blocksize/64 : 400*blocksize*blocksize/64
Local lambda resetting threshold, if truemotion is set to true it defaults to 1200*blocksize*blocksize/64, if false 400*blocksize*blocksize/64.

Scenechange thresholds and MDegrain thSAD value

******** DO NOT TOUCH WITHOUT SPECIFIC REASON ********

int  SCth1 = 180
SAD threshold for "bad blocks".
int  SCth2 = 98
Percentage of bad blocks to trigger a scenechange.
int  thSAD1 = 5*128
SAD threshold for 1st MDegrain (Gaussian stage).
int  thSAD2 = 2*128
SAD threshold for 2nd MDegrain (linear stage).

Other stuff

bool  border = true
true = pad borders internally to catch "half scanlines" at top + bottom (broadcast material).
int  draft = 0
'1' outputs a quick draft, and '2' is even more draft'ier :p
float  pel2hr = 0.0
0.0 is OFF. 0.1 ~ 0.3 can be useful to reduce halo-amplifying of pel=2 subsampling.


History

Official

Modifications

  • 31 Oct 2009 - TempGaussMC_beta1u - Modded to use MVTools2 and added "nnedi2" as an interpolater option.
  • 03 Nov 2009 - TempGaussMC_beta1u2 - fixed chroma shifting, added a parameter to change rfilter method's. Previously & permanently set to mvtools2's default [2]
  • 16 May 2010 - TempGaussMC_beta2u - includes "nnedi3" as an interpolator option, added nnedi3's "nns" parameter
  • 08 June 2010 - TempGaussMC_beta2z - includes changes from beta1mod, beta1u2, and beta2u (not recommended)

Continued development

  • QTGMC - (Q-TempGaussMC) builds on the work done by TempGaussMC_beta2 and is considered by many to be its successor.


External Links




Back to External Filters

Personal tools