FixBlendIVTC

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Restoration_filters|Deblenders}}
+
{{FilterCat4|External_filters|Scripts|Restoration_filters|Deblenders}}
{{Filter|MOmonster|0.9|[[Media:FixBlendIVTC.avs|FixBlendIVTC.avs]]|Deblenders|
+
{{Filter3
* YV12
+
|Foxyshadis, MOmonster
|}}
+
|0.9
{{Template:FuncDef|FixBlendIVTC(clip input, ''post'', float ''bthresh'', float ''mthresh'', bool ''sbd'', clip ''clip2'') }}
+
|
 +
*[[Media:FixBlendIVTC.avs|FixBlendIVTC.avs]]
 +
*[https://pastebin.com/8KSTcJ0C FixBlendIVTC 2017]
 +
|Deblenders|
 +
|6=[http://forum.doom9.org/showthread.php?t=101477 Doom9 Thread]}}
  
== Abstract ==
+
== Description ==
 +
FixBlendIVTC is a function to restore blend-deinterlaced telecined footage with double blends and 50:50 blend weights.
 +
<br>
 +
'''Note:''' Decimate (from [[Decomb]]) is the only function guaranteed not to mess up this filter, unless you follow the filter with RequestLinear from [[TIVTC]].
 +
<br>
 +
<br>
 +
== Requirements ==
 +
*AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/files/AviSynth_Alpha_Releases/ later]
 +
*Supported color formats: [[YV12]]
  
FixBlendIVTC is a function to restore blend-deinterlaced telecined footage with
+
=== Required Plugins ===
doubleblends and 50:50 blendweights.
+
Latest versions of the following filters are recommended unless stated otherwise.<br>
 
+
*[[Average]]
=== Requires Filters ===
+
*<strike>RemoveGrain - part of the [[RemoveGrain v1.0b]] package.</strike>
*[[Average]] [http://forum.doom9.org/showthread.php?p=924497#post924497]
+
*[[RgTools]] - recommended drop-in replacement for RemoveGrain!
*[[Removegrain|RemoveGrain]] 1.x
+
 
*[[MaskTools2]]
 
*[[MaskTools2]]
  
== Description ==
 
Decimate (from [[Decomb]]) is the only function guaranteed not to mess up this filter, unless you follow the filter with RequestLinear from [[TIVTC]].
 
  
{{ParR|post|int|2|0-6}}
+
== [[Script variables|Syntax and Parameters]] ==
Postprocessing strength:
+
:{{Template:FuncDef|FixBlendIVTC (clip input, "post", float "bthresh", "mthresh", bool "sbd", clip "dclip")  }}
* 0 - No postprocessing
+
<br>
* 1 - 0 + chromablur
+
::{{Par|input|clip| }}
* 2 - Diffmasked pp (sharp and good for hq sources) - default
+
:::Input clip.
* 3 - 2 + chromablur
+
<br>
* 4 - Blurmasked restoring (more soften than 2, but sometimes less artefacts)
+
::{{ParR|post|int|2|0-6}}
* 5 - Combines post 2 and 4 but without chroma.
+
:::Postprocessing strength: Post=0 is the fastest, post=5 is the best for bad quality and the slowest postprocessing mode.
* 6 - 5 + extra chroma (slowest).
+
:::* 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:
+
:::If these postprocessing modes aren't strong or individual enough for you you can also use your own favorite filter on the restored frames. Therefore set a string with the filter(s) of your choice. Use pp0 till pp6 for the postprocessing mode and add your filter like this:  
post="pp4.blur(1)"
+
:::<code>post="pp4.blur(1)"</code>
If you want to use a filter with inputstrings use three quotation marks like in the second example.
+
:::If you want to use a filter with input-strings use three quotation marks like in the second example.
 
+
<br>
Post=0 is the fastest, post=5 is the best for bad quality and the slowest postprocessing mode.
+
::{{ParR|bthresh|float|0.1|0.0-2.0}}
 
+
:::The blend-threshold can be used to make the blend-detection less aggressive if there are some wrong detections.
{{Par|dclip|clip|none}}
+
<br>
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.
+
::{{ParR|mthresh|float|0.1|0.0-1.0}}
 
+
:::The motion threshold for the function. If the frame-difference is smaller than mthresh the function don't trust the blend-detection and does nothing. This helps decimating and can avoid side-effects. Sbd enables already some kind of mthresholding, but the 12 fps detection works with really low thresholds.
'''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.
+
<br>
 
+
::{{Par|sbd|bool|false}}
{{Par|sbd|bool|false}}
+
:::Single-Blend-Detection, it's a bool parameter you should set true for 12fps sources (anime/cartoons).
SingleBlendDetection, it's a bool parameter you should set true for 12fps sources (anime/cartoons).
+
<br>
 
+
::{{Par|dclip|clip|input}}
{{ParR|bthresh|float|0.1|0.0-2.0}}
+
:::This clip is used for the blend-detection and won´t be returned, so that you can preprocess for blend-detection without affecting the output. A light blurring or temporal stabilizing can be really useful sometimes, especially in a source with many artifacts, but normally this feature shouldn't be used.
The blendthreshold can be used to make the blenddetection less aggressive if there are some wrong detections.
+
 
+
{{ParR|mthresh|float|0.1|0.0-1.0}}
+
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.
+
  
 +
:::'''Note''': The blend-detection-differencing 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.
 +
<br>
 
== Examples ==
 
== Examples ==
 
<pre>
 
<pre>
Line 53: Line 66:
 
FixBlendIVTC(post=3)
 
FixBlendIVTC(post=3)
 
Decimate(cycle=5,quality=0)
 
Decimate(cycle=5,quality=0)
LimitedSharpen()
+
LimitedSharpenFaster()
 
</pre>
 
</pre>
 
<pre>
 
<pre>
FixBlendIVTC(post="""pp2.deen("a2d")""")
+
FixBlendIVTC(post="""pp2.Deen("a2d")""")
tdecimate(rate=23.976,mode=7)
+
TDecimate(rate=23.976,mode=7)
 
</pre>
 
</pre>
 +
 +
 
== Changelog ==
 
== Changelog ==
 +
 
'''''Foxyshadis'''''
 
'''''Foxyshadis'''''
  
Line 78: Line 94:
 
Modified for less artifacts, more post-processing choices, bthresh.<br/>
 
Modified for less artifacts, more post-processing choices, bthresh.<br/>
  
== Links ==
+
 
Download [[Media:FixBlendIVTC.avs|FixBlendIVTC.avs]]<br/>
+
==External Links ==
Follow the discussion in its [http://forum.doom9.org/showthread.php?t=101477 Doom9 thread].
+
*[http://forum.doom9.org/showthread.php?t=101477 Doom9 Forum] - FixBlendIVTC discussion.
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Fieldblending_and_Frameblending_removal|External Filters]] &larr;'''

Latest revision as of 05:13, 11 November 2017

Abstract
Author Foxyshadis, MOmonster
Version 0.9
Download
Category Deblenders
License
Discussion Doom9 Thread

Contents

[edit] Description

FixBlendIVTC is a function to restore blend-deinterlaced telecined footage with double blends and 50:50 blend weights.
Note: Decimate (from Decomb) is the only function guaranteed not to mess up this filter, unless you follow the filter with RequestLinear from TIVTC.

[edit] Requirements

  • AviSynth 2.5.8 or later
  • Supported color formats: YV12

[edit] Required Plugins

Latest versions of the following filters are recommended unless stated otherwise.


[edit] Syntax and Parameters

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


input clip =
Input clip.


post int (0-6, default 2)
Postprocessing strength: Post=0 is the fastest, post=5 is the best for bad quality and the slowest postprocessing mode.
  • 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 favorite filter on the restored frames. Therefore set a string with the filter(s) of your choice. 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 input-strings use three quotation marks like in the second example.


bthresh float (0.0-2.0, default 0.1)
The blend-threshold can be used to make the blend-detection 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 frame-difference is smaller than mthresh the function don't trust the blend-detection and does nothing. This helps decimating and can avoid side-effects. Sbd enables already some kind of mthresholding, but the 12 fps detection works with really low thresholds.


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


dclip clip = input
This clip is used for the blend-detection and won´t be returned, so that you can preprocess for blend-detection without affecting the output. A light blurring 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 blend-detection-differencing 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.


[edit] Examples

AviSource("blended.avi")
FixBlendIVTC(post=3)
Decimate(cycle=5,quality=0)
LimitedSharpenFaster()
FixBlendIVTC(post="""pp2.Deen("a2d")""")
TDecimate(rate=23.976,mode=7)


[edit] 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.


[edit] External Links




Back to External Filters

Personal tools