FixBlendIVTC

From Avisynth wiki
Revision as of 17:01, 9 May 2013 by Admin (Talk | contribs)

Jump to: navigation, search
Abstract
Author MOmonster
Version 0.9
Download FixBlendIVTC.avs
Category Deblenders
Requirements
  • YV12
License
Discussion

FixBlendIVTC(clip input, post, float bthresh, float mthresh, bool sbd, clip clip2)

Contents

Abstract

FixBlendIVTC is a function to restore blend-deinterlaced telecined footage with doubleblends and 50:50 blendweights.

Requires Filters

Description

Decimate (from Decomb) is the only function guaranteed not to mess up this filter, unless you follow the filter with RequestLinear from TIVTC.

post int (0-6, default 2)
Postprocessing strength:

  • 0 - No postprocessing
  • 1 - 0 + chromablur
  • 2 - Diffmasked pp (sharp and good for hq sources) - default
  • 3 - 2 + chromablur
  • 4 - Blurmasked restoring (more soften than 2, but sometimes less artefacts)
  • 5 - Combines post 2 and 4 but without chroma.
  • 6 - 5 + extra chroma (slowest).

If these postprocessing modes aren't strong or individual enough for you you can also use your own favourite filter on the restored frames. Therefore set a string with your setted filters. Use pp0 till pp6 for the postprocessing mode and add your filter like this:

post="pp4.blur(1)"

If you want to use a filter with inputstrings use three quotation marks like in the second example.

Post=0 is the fastest, post=5 is the best for bad quality and the slowest postprocessing mode.

dclip clip = none
This clip is used for the blenddetection and won´t be returned, so that you can preprocess for blenddetection without affecting the output. A light bluring or temporal stabilizing can be really useful sometimes, especially in a source with many artifacts, but normally this feature shouldn´t be used.

Note: The blenddetectiondifferencing is also used for post 4 and 5. So a too strong preprocessing could maybe have a bad effect on the postprocessing, but I wasn´t able too produce such cases till now. Indeed sometimes this seems to be just better for the postprocessing.

sbd bool = false
SingleBlendDetection, it's a bool parameter you should set true for 12fps sources (anime/cartoons).

bthresh float (0.0-2.0, default 0.1)
The blendthreshold can be used to make the blenddetection less aggressive if there are some wrong detections.

mthresh float (0.0-1.0, default 0.1)
The motion threshold for the function. If the framedifference is smaller than mthresh the function don't trust the blenddetection and does nothing. This helps decimating and can avoid side-effects. Sbd enables allready some kind of mthresholding, but the 12 fps detection works with really low thresholds.

Examples

AviSource("blended.avi")
FixBlendIVTC(post=3)
Decimate(cycle=5,quality=0)
LimitedSharpen()
FixBlendIVTC(post="""pp2.deen("a2d")""")
tdecimate(rate=23.976,mode=7)

Changelog

Foxyshadis

v.1 - v.3:
Required manual offsets. v.1 had broken reversal.
v.4:
Conditional, effective but very slow.

MOmonster

v.5:
Much faster, better detection & single-blend detection.
v.6:
Changed parameters again, better motion mask/influence.
v.8:
Sped up significantly, also more accurate single-blend.
v.9:
Modified for less artifacts, more post-processing choices, bthresh.

Links

Download FixBlendIVTC.avs
Follow the discussion in its Doom9 thread.

Personal tools