MfRainbow

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
Ok, cause I couldn't find a working 2.5 version of AntiBlink, I decided to make my own ^^'.
+
{{FilterCat|External_filters|Restoration_filters|Rainbow & Dot Crawl Removal}}
 +
{{Filter
 +
| {{Author/mf}}
 +
| v0.31
 +
| [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfRainbow-v0.31.avs mfRainbow]
 +
| Rainbow & Dot Crawl Removal
 +
|
 +
* YV12
 +
|
 +
|}}
 +
<br>
 +
== Description ==
 +
:Derainbows in areas of high Y, U and V frequencies, which fluctuate heavily.
 +
<br>
 +
===== Requirements: =====
 +
:- AviSynth 2.5.8 or later
 +
:- Supported color formats: [[YV12]]
 +
:- [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only
  
# mfRainbow by mf
+
===== Required Filters: =====
# Derainbows according to the same principle as AntiFlicker.
+
:*[[MaskTools]] v1.5.8
# Definitely slower, but possibly (untested) higher quality.
+
:* WarpSharp v2008
#
+
<br>
# I don't claim copyright but I ask you to treat my script
+
== Syntax and Parameters ==
# fairly.
+
:{{Template:FuncDef|mfRainbow(clip input, int "strength", int "scd")}}
#
+
<br>
# Happy slow encoding ^^.
+
::{{Par|strength|int|255}}
#
+
:::Range: 0 - 255
+
::::Processing strength.
function mfRainbow(clip input, string "mode", float "clipstren", int "strength", bool "post")
+
<br>
{
+
::{{Par|scd|int|10}}
    mode      = Default(mode, "slowest") # processing speed, slow-slower-slowest
+
:::Scene change detection for [[Soften|TemporalSoften]]. Good values are between 5 and 30.
    strength = Default(strength, 255)  # processing strength, 0-255
+
<br>
    clipstren = Default(clipstren, 5.0)  # value clipping strength, 0.0-10.0
+
== Examples ==
    post      = Default(post, true)      # spatial postprocessing on/off
+
  [[AviSource]]("Blah.avi")
+
  mfRainbow()
    inputrgb = input.ConvertToRGB32()
+
<br>
   
+
== Changelog ==
    edgemask = input.EdgeMask(0, "sobel").Inflate().GreyScale().
+
  [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfRainbow-v0.31.avs v0.31:]
      \ Levels(0, clipstren, 255, 0, 255).ConvertToRGB32()
+
       - Tweakable scenechange detection for tough sources.<br>
+
  [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfRainbow-v0.3.avs v0.3:]
    derainbow = (mode == "slow") ? input.Deen("a3d",4,0,40,50) :  
+
       - Temporal fluctuation mask building!<br>
      \  (mode == "slower") ? input.Deen("a3d",4,0,20,50).Deen("a3d",4,0,20,50) :  
+
  [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfRainbow-v0.2.avs v.02:]
       \  (mode == "slowest") ? input.Deen("a3d",4,0,15,50).Deen("a3d",4,0,15,50).
+
       - Added U and V mask-building, overhauled Deen settings, changed to YV12.<br>
       \  Deen("a3d",4,0,15,50).Deen("a3d",4,0,15,50) : Assert(false, "available modes:  
+
  [http://web.archive.org/web/20090212071718/http://mf.creations.nl/avs/functions/mfRainbow-0.1.avs v0.1:]
       \  slow, slower, slowest")
+
      - Initial release
+
<br>
    maskedrainbow = Mask(derainbow.ConvertToRGB32(), edgemask)
+
    edgerainbow = Layer(inputrgb, maskedrainbow, "add", strength)
+
+
    semifinal = input.MergeChroma(edgerainbow.ConvertToYV12())
+
    blah = semifinal.MSmooth() # cause of a weird argument error
+
    final = semifinal.MergeChroma(blah)
+
+
    return post ? final : semifinal
+
  }
+
  
Parameters:
+
== Links ==
 
+
*[http://forum.doom9.org/showthread.php?p=321319#post321319 Doom9 Forum] - mfRainbow v0.1 discussion.
type - name - description - range - default
+
*[http://forum.doom9.org/showthread.php?t=67578 Doom9 Forum] - mfRainbow v0.2 - v0.31 discussion.
 
+
<br>
string mode - processing speed (and quality) - slow/slower/slowest - slowest
+
<br>
 
+
<br>
int strength - processing strength - 0-255 - 255
+
-----------------------------------------------
 
+
'''Back to [[External_filters#Rainbow_.26_Dot_Crawl_Removal|External Filters]] &larr;'''
float clipstren - value clipping strength - 0.0-10.0 - 5.0
+
-----------------------------------------------
 
+
bool post - spatial postprocessing - true/false - true
+
 
+
"Slow" mode might cause chroma ghosting on edges. Slowest is the safest, but might not be as effective as slow.
+
 
+
Explanation of clipstren: this works like value boosts in mfToon, it's the gamma correction of the mask ^^'. Lower values give more variation, but less strength.
+
 
+
You need [[Deen]], [[MaskTools]] and [[MSmooth]].
+
 
+
Like before (and probably ever again), I don't check colorspaces cause I'm too lazy, and my function always outputs YV12. Who needs another colorspace anyway. I'm still kinda sad about the fact that [[Layer]] and [[Mask]] don't work in YUV (cause of the lack of an AYUV colorspace), so alas I have to do 2 colorspace conversions, namely to RGB and back. (Note Wilbert: note that there is a Layer/Mask equivalent working in YUV nowadays, so the script could be adjusted without those colorspace conversions.) The luma luckily doesn't have to be touched (and I do [[MergeChroma]] to ensure that), so that minimizes conversion errors.
+
 
+
Please test if this is any better or worse than existing derainbowers. A discussion can be found [http://forum.doom9.org/showthread.php?s=&postid=321859#post321859 here].
+
 
+
[[Category:Shared functions]]
+

Revision as of 04:12, 26 November 2013

Abstract
Author mf
Version v0.31
Download mfRainbow
Category Rainbow & Dot Crawl Removal
Requirements
  • YV12
License
Discussion


Contents

Description

Derainbows in areas of high Y, U and V frequencies, which fluctuate heavily.


Requirements:
- AviSynth 2.5.8 or later
- Supported color formats: YV12
- Progressive input only
Required Filters:


Syntax and Parameters

mfRainbow(clip input, int "strength", int "scd")


strength int = 255
Range: 0 - 255
Processing strength.


scd int = 10
Scene change detection for TemporalSoften. Good values are between 5 and 30.


Examples

AviSource("Blah.avi")
mfRainbow()


Changelog

  v0.31:
     - Tweakable scenechange detection for tough sources.
v0.3: - Temporal fluctuation mask building!
v.02: - Added U and V mask-building, overhauled Deen settings, changed to YV12.
v0.1: - Initial release


Links





Back to External Filters


Personal tools