C deblend

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
(Parameters)
 
(reformat)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Restoration_filters|Deblenders}}
+
{{FilterCat4|External_filters|Scripts|Restoration_filters|Deblenders}}
{{Filter|MOmonster|1.1b|[[Media:Cdeblend.avs|Cdeblend.avs]]|Deblenders|
+
{{Filter3
* YV12
+
|MOmonster
|}}
+
|1.1b
{{Template:FuncDef|Cdeblend(clip input, int ''omode'', float ''bthresh'', ''mthresh'', ''xr'', ''yr'', bool ''fnr'', clip ''dclip'') }}
+
|[[Media:Cdeblend.avs|Cdeblend.avs]]
 
+
|Deblenders|
 +
|6=[http://forum.doom9.org/showthread.php?t=95924 Doom9 Thread]}}
 
== Abstract ==
 
== Abstract ==
Cdeblend is a simple blend replacing function like unblend or removeblend.
+
Cdeblend is a simple blend replacing function like Unblend or RemoveBlend.
 
Now superseded by [[Srestore]].
 
Now superseded by [[Srestore]].
  
=== Requires Filters ===
 
*[[Removegrain|RemoveGrain]] 1.x, for fnr=true.
 
*[[MaskTools2]]
 
  
== Parameters ==
+
== Requirements ==
{{ParR|omode|int|0|0-4}}
+
*AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/files/AviSynth_Alpha_Releases/ later]
Stands for the output mode. There are five different omodes:
+
*Supported color formats: [[YV12]]
*omode 0 -> The previous frame will be duplicated to avoid a blend. (Default.)
+
*omode 1 -> The next frame is used instead of a blend.
+
*omode 2 -> Like omode 0 but with some double-blend detection (only without missing fields)
+
*omode 3 -> A special mode for 12fps sources.
+
*omode 4 -> Does nothing with the source. It just subtitles the blend factor.
+
  
{{ParR|bthresh|float|0.1|0-2.0}}
+
=== Required Plugins ===
For omode 0 and 1 bthresh will be just compared with the calculated blend factor. If the blend factor is higher a blend is detected. Omode 3 uses this threshold to detect clears. If blendfactor<-bthresh the frame will be output also if there is another frame with a smaller blendfactor. This can give a better motion.
+
Latest versions of the following filters are recommended unless stated otherwise.<br>
 +
*[[MaskTools2]]
 +
*RemoveGrain - part of the [[RemoveGrain v1.0b]] package, only required when <tt>fnr=true</tt>.
 +
<br>
 +
== [[Script variables|Syntax and Parameters]] ==
 +
:{{Template:FuncDef|Cdeblend (clip input, int "omode", float "bthresh", "mthresh", float "xr", float "yr", bool "fnr", clip "dclip")}}
 +
<br>
 +
::{{Par|input|clip| }}
 +
:::Input clip.
  
{{ParR|mthresh|float|0.6|0.3-1.6}}
+
::{{ParR|omode|int|0|0-4}}
Used for (m)otion (thresh)olding. It regulates the blend detection of frames with small pixel value differences. A better quality of the source allows lower values and a more accurate detection.
+
:::Stands for the output mode. There are five different omodes:
 +
:::*omode 0 -> The previous frame will be duplicated to avoid a blend. (Default.)
 +
:::*omode 1 -> The next frame is used instead of a blend.
 +
:::*omode 2 -> Like omode 0 but with some double-blend detection (only without missing fields)
 +
:::*omode 3 -> A special mode for 12fps sources.
 +
:::*omode 4 -> Does nothing with the source. It just subtitles the blend factor.
  
{{ParR|xr,yr|float|1,5,2.0|1.0-4.0}}
+
::{{ParR|bthresh|float|0.1|0-2.0}}
The scaled detection radius (xr & yr) blurs the internal detection clip and can speed up the function a little bit.
+
:::For omode 0 and 1 bthresh will be just compared with the calculated blend factor. If the blend factor is higher a blend is detected. Omode 3 uses this threshold to detect clears. If blendfactor<-bthresh the frame will be output also if there is another frame with a smaller blendfactor. This can give a better motion.
  
{{Par|fnr|bool|false}}
+
::{{ParR|mthresh|float|0.6|0.3-1.6}}
With fnr=true you enable a (f)ast (n)oise (r)eduction. It's sometimes useful for noisy sources and typical area motion (anime). Don't use a too big radius if you enable this feature and don't use it on very clean sources (speed decreasing is not the only negative effect).
+
:::Used for (m)otion (thresh)olding. It regulates the blend detection of frames with small pixel value differences. A better quality of the source allows lower values and a more accurate detection.
  
{{Par|dclip|clip|input}}
+
::{{ParR|xr,yr|float|1,5,2.0|1.0-4.0}}
The '''d'''etection'''clip''' can be set to improve the blend detection (cleaning the clip before).
+
:::The scaled detection radius (xr & yr) blurs the internal detection clip and can speed up the function a little bit.
This clip is only used for the blend detection and not for output.
+
  
 +
::{{Par|fnr|bool|false}}
 +
:::With fnr=true you enable a (f)ast (n)oise (r)eduction. It's sometimes useful for noisy sources and typical area motion (anime). Don't use a too big radius if you enable this feature and don't use it on very clean sources (speed decreasing is not the only negative effect).
 +
 +
::{{Par|dclip|clip|input}}
 +
:::The '''d'''etection'''clip''' can be set to improve the blend detection (cleaning the clip before).
 +
:::This clip is only used for the blend detection and not for output.
 +
<br>
 
==Examples==
 
==Examples==
 
<pre>
 
<pre>
Avisource("blah.avi")
+
AviSource("blah.avi")
 
Cdeblend()
 
Cdeblend()
 
</pre>
 
</pre>
  
 
<pre>
 
<pre>
Avisource("blah.avi")
+
AviSource("blah.avi")
tdeint(mode=1)
+
TDeint(mode=1)
c = last.crop(8,16,-8,-8)
+
c = last.Crop(8,16,-8,-8, true)
 
Cdeblend(omode=1,dclip=c)
 
Cdeblend(omode=1,dclip=c)
 
</pre>
 
</pre>
  
==Links==
+
 
Download [[Media:Cdeblend.avs|Cdeblend.avs]]<br/>
+
==External Links==
Follow the discussion here [http://forum.doom9.org/showthread.php?t=95924 Doom9 forum]
+
*[http://forum.doom9.org/showthread.php?t=95924 Doom9 forum] - Cdeblend discussion.
 +
<br>
 +
<br>
 +
-----------------------------------------------
 +
'''Back to [[External_filters#Fieldblending_and_Frameblending_removal|External Filters]] &larr;'''

Latest revision as of 16:09, 22 February 2015

Abstract
Author MOmonster
Version 1.1b
Download Cdeblend.avs
Category Deblenders
License
Discussion Doom9 Thread

Contents

[edit] Abstract

Cdeblend is a simple blend replacing function like Unblend or RemoveBlend. Now superseded by Srestore.


[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

Cdeblend (clip input, int "omode", float "bthresh", "mthresh", float "xr", float "yr", bool "fnr", clip "dclip")


input clip =
Input clip.
omode int (0-4, default 0)
Stands for the output mode. There are five different omodes:
  • omode 0 -> The previous frame will be duplicated to avoid a blend. (Default.)
  • omode 1 -> The next frame is used instead of a blend.
  • omode 2 -> Like omode 0 but with some double-blend detection (only without missing fields)
  • omode 3 -> A special mode for 12fps sources.
  • omode 4 -> Does nothing with the source. It just subtitles the blend factor.
bthresh float (0-2.0, default 0.1)
For omode 0 and 1 bthresh will be just compared with the calculated blend factor. If the blend factor is higher a blend is detected. Omode 3 uses this threshold to detect clears. If blendfactor<-bthresh the frame will be output also if there is another frame with a smaller blendfactor. This can give a better motion.
mthresh float (0.3-1.6, default 0.6)
Used for (m)otion (thresh)olding. It regulates the blend detection of frames with small pixel value differences. A better quality of the source allows lower values and a more accurate detection.
xr,yr float (1.0-4.0, default 1,5,2.0)
The scaled detection radius (xr & yr) blurs the internal detection clip and can speed up the function a little bit.
fnr bool = false
With fnr=true you enable a (f)ast (n)oise (r)eduction. It's sometimes useful for noisy sources and typical area motion (anime). Don't use a too big radius if you enable this feature and don't use it on very clean sources (speed decreasing is not the only negative effect).
dclip clip = input
The detectionclip can be set to improve the blend detection (cleaning the clip before).
This clip is only used for the blend detection and not for output.


[edit] Examples

AviSource("blah.avi")
Cdeblend()
AviSource("blah.avi")
TDeint(mode=1)
c = last.Crop(8,16,-8,-8, true)
Cdeblend(omode=1,dclip=c)


[edit] External Links




Back to External Filters

Personal tools