FixBlendIVTC: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
 
AmjadSONY (talk | contribs)
No edit summary
 
(5 intermediate revisions by 3 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.
FixBlendIVTC is a function to restore blend-deinterlaced telecined footage with
<br>
doubleblends and 50:50 blendweights.
'''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]]


=== Requires Filters ===
=== Required Plugins ===
*[[Average]] [http://forum.doom9.org/showthread.php?p=924497#post924497]
Latest versions of the following filters are recommended unless stated otherwise.<br>
*[[Removegrain|RemoveGrain]] 1.x
*[[Average]]
*<strike>RemoveGrain - part of the [[RemoveGrain v1.0b]] package.</strike>
*[[RgTools]] - recommended drop-in replacement for RemoveGrain!
*[[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}}
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:
== [[Script variables|Syntax and Parameters]] ==
post="pp4.blur(1)"
:{{Template:FuncDef|FixBlendIVTC (clip input, "post", float "bthresh", "mthresh", bool "sbd", clip "dclip")  }}
If you want to use a filter with inputstrings use three quotation marks like in the second example.
<br>
::{{Par|input|clip| }}
:::Input clip.
<br>
::{{ParR|post|int|2|0-6}}
:::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).


Post=0 is the fastest, post=5 is the best for bad quality and the slowest postprocessing mode.
:::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:
 
:::<code>post="pp4.blur(1)"</code>
{{Par|dclip|clip|none}}
:::If you want to use a filter with input-strings use three quotation marks like in the second example.
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.
<br>
 
::{{ParR|bthresh|float|0.1|0.0-2.0}}
'''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.
:::The blend-threshold can be used to make the blend-detection less aggressive if there are some wrong detections.
 
<br>
{{Par|sbd|bool|false}}
::{{ParR|mthresh|float|0.1|0.0-1.0}}
SingleBlendDetection, it's a bool parameter you should set true for 12fps sources (anime/cartoons).
:::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.
 
<br>
{{ParR|bthresh|float|0.1|0.0-2.0}}
::{{Par|sbd|bool|false}}
The blendthreshold can be used to make the blenddetection less aggressive if there are some wrong detections.
:::Single-Blend-Detection, it's a bool parameter you should set true for 12fps sources (anime/cartoons).
 
<br>
{{ParR|mthresh|float|0.1|0.0-1.0}}
::{{Par|dclip|clip|input}}
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.
:::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.
<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

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.

Requirements

  • AviSynth 2.5.8 or later
  • Supported color formats: YV12

Required Plugins

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


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.


Examples

AviSource("blended.avi")
FixBlendIVTC(post=3)
Decimate(cycle=5,quality=0)
LimitedSharpenFaster()
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.





Back to External Filters