DeCrawl

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Syntax and Parameters)
m (small corrections)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Restoration_filters|Rainbow & Dot Crawl Removal}}
+
{{FilterCat4|External_filters|Plugins|Restoration_filters|Rainbow & Dot Crawl Removal}}
{{Filter
+
{{Filter3
 
| Dan Donovan  
 
| Dan Donovan  
 
| v0.51
 
| v0.51
| [http://www.avisynth.nl/users/warpenterprises/files/decrawl_20060924.zip DeCrawl]
+
| [http://www.avisynth.nl/users/warpenterprises/files/decrawl_20060924.zip decrawl_20060924.zip]
 
| Rainbow & Dot Crawl Removal
 
| Rainbow & Dot Crawl Removal
 
|
 
|
Line 9: Line 9:
 
| Closed source
 
| Closed source
 
|}}
 
|}}
<br>
+
 
 
== Description ==
 
== Description ==
:Removes dot crawl, particularly in animated material.
+
Removes dot crawl, particularly in animated material.
 +
<br>
 
<br>
 
<br>
 
== Requirements ==
 
== Requirements ==
:- AviSynth 2.5.8 or later
+
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater]
:- Supported color formats: [[YV12]]
+
* Supported color formats: [[YV12]]
 
<br>
 
<br>
== Syntax and Parameters ==
+
== [[Script variables|Syntax and Parameters]] ==
 
:{{Template:FuncDef|DeCrawl (''clip'', ''int'' "ythresht", ''int'' "ythreshs", ''int'' "cthresh", ''int'' "temporal", ''int'' "spatial", ''int'' "spatialpasses")}}
 
:{{Template:FuncDef|DeCrawl (''clip'', ''int'' "ythresht", ''int'' "ythreshs", ''int'' "cthresh", ''int'' "temporal", ''int'' "spatial", ''int'' "spatialpasses")}}
 +
<br>
 +
::{{Par2| |clip| }}
 +
:::Input clip.
 
<br>
 
<br>
 
::{{Par2|ythresht|int|7}}
 
::{{Par2|ythresht|int|7}}
:::Temporal luma threshold:
+
:::Temporal luma threshold: the 2 temporally surrounding pixels must have a luma value within this threshold.
::::Range: 0 to 255<br>
+
:::Range: 0 to 255
:::::The 2 temporally surrounding pixels must have a luma value within this threshold.
+
 
<br>
 
<br>
 
::{{Par2|ythreshs|int|8}}
 
::{{Par2|ythreshs|int|8}}
:::Spatial luma threshold:
+
:::Spatial luma threshold: the 2 vertically surrounding pixels must have a luma value within this threshold.
::::Range: 0 to 255<br>
+
:::Range: 0 to 255
:::::The 2 vertically surrounding pixels must have a luma value within this threshold.
+
 
<br>
 
<br>
 
::{{Par2|cthresh|int|2}}
 
::{{Par2|cthresh|int|2}}
:::Chroma threshold:
+
:::Chroma threshold: all 3 pixels must have a chroma value within this amount of each other.
::::Range: 0 to 255<br>
+
:::Range: 0 to 255
:::::All 3 pixels must have a chroma value within this amount of each other.
+
 
<br>
 
<br>
 
::{{Par2|temporal|int|50}}
 
::{{Par2|temporal|int|50}}
:::Temporal filtering:
+
:::Temporal filtering: strength for temporal filtering. Set to 0 to disable.
::::Range: 0 to 100
+
:::Range: 0 to 100
  
:::::Strength for temporal filtering. Set to 0 to disable.
+
:::*Temporal filtering will replace each pixel with 50% of the current pixel (Yc) + 25% of the temporally previous pixel (Yp) + 25% of the next pixel (Yn), if:
::::::Temporal filtering will replace each pixel with 50% of the current pixel (Yc) + 25% of the temporally previous pixel (Yp) + 25% of the next pixel (Yn), if:
+
:::**Yc-Yp <= ythresht
:::::::*Yc-Yp <= ythresht
+
:::**Yc-Yn <= ythresht
:::::::*Yc-Yn <= ythresht
+
:::**Yp-Yn <= ythresht/8
:::::::*Yp-Yn <= ythresht/8
+
:::**chroma conditions are similar if enabled
:::::::*chroma conditions are similar if enabled
+
  
 
<br>
 
<br>
 
::{{Par2|spatial|int|100}}
 
::{{Par2|spatial|int|100}}
:::Spatial filtering:
+
:::Spatial filtering: strength for spatial filtering. Set to 0 to disable.
::::Range: 0 to 100
+
:::Range: 0 to 100
  
:::::Strength for spatial filtering. Set to 0 to disable.
+
:::*Spatial filtering uses 1/2P(x,y) + 1/8P(x,y-1) + 1/8P(x,y+1) + 1/8P(x-w/376,y) + 1/8P(x+w/376,y), only taking into account the factors that are within the threshold. It does NOT cap those parameters to one threshold away.<br>If a factor is not within the thresfield, the original pixel is substituted. Overall, it's not very destructive to most video as long as the threshold isn't set too high. You might want to use this two or three times in a row, but don't filter temporally at all past the first time.  
::::::Spatial filtering uses 1/2P(x,y) + 1/8P(x,y-1) + 1/8P(x,y+1) + 1/8P(x-w/376,y) + 1/8P(x+w/376,y),  
+
:::*Note: if a pixel is filtered temporally, it will not be filtered spatially.  
::::::only taking into account the factors that are within the threshold. It does NOT cap those parameters to one threshold away.  
+
::::::If a factor is not within the thresfield, the original pixel is substituted. Overall,  
+
::::::it's not very destructive to most video as long as the threshold isn't set too high.  
+
::::::You might want to use this two or three times in a row, but don't filter temporally at all past the first time.  
+
::::::Note: if a pixel is filtered temporally, it will not be filtered spatially.  
+
 
<br>
 
<br>
 
::{{Par2|spatialpasses|int|1}}
 
::{{Par2|spatialpasses|int|1}}
::::Range: 0 to 16
+
:::Number of times to spatially filter, in case the effect is too weak for your source.
:::::Number of times to spatially filter, in case the effect is too weak for your source.
+
:::Range: 0 to 16
 
<br>
 
<br>
 
== Examples ==
 
== Examples ==
DeCrawl with default values.
+
DeCrawl with default values:
 
  [[AviSource]]("Blah.avi")
 
  [[AviSource]]("Blah.avi")
 
  DeCrawl(ythresht=7, ythreshs=8, cthresh=2, temporal=50, spatial=100, spatialpasses=1)
 
  DeCrawl(ythresht=7, ythreshs=8, cthresh=2, temporal=50, spatial=100, spatialpasses=1)
Line 86: Line 81:
 
     - 0.11 - Added defaults (2,10,2)
 
     - 0.11 - Added defaults (2,10,2)
 
     - 0.10 - Initial release
 
     - 0.10 - Initial release
<br>
 
 
<br>
 
<br>
 
<br>
 
<br>

Latest revision as of 14:22, 6 March 2016

Abstract
Author Dan Donovan
Version v0.51
Download decrawl_20060924.zip
Category Rainbow & Dot Crawl Removal
License
  • YV12
Discussion Closed source

Contents

[edit] Description

Removes dot crawl, particularly in animated material.

[edit] Requirements

  • AviSynth 2.5.8 or greater
  • Supported color formats: YV12


[edit] Syntax and Parameters

DeCrawl (clip, int "ythresht", int "ythreshs", int "cthresh", int "temporal", int "spatial", int "spatialpasses")


clip   =
Input clip.


int  ythresht = 7
Temporal luma threshold: the 2 temporally surrounding pixels must have a luma value within this threshold.
Range: 0 to 255


int  ythreshs = 8
Spatial luma threshold: the 2 vertically surrounding pixels must have a luma value within this threshold.
Range: 0 to 255


int  cthresh = 2
Chroma threshold: all 3 pixels must have a chroma value within this amount of each other.
Range: 0 to 255


int  temporal = 50
Temporal filtering: strength for temporal filtering. Set to 0 to disable.
Range: 0 to 100
  • Temporal filtering will replace each pixel with 50% of the current pixel (Yc) + 25% of the temporally previous pixel (Yp) + 25% of the next pixel (Yn), if:
    • Yc-Yp <= ythresht
    • Yc-Yn <= ythresht
    • Yp-Yn <= ythresht/8
    • chroma conditions are similar if enabled


int  spatial = 100
Spatial filtering: strength for spatial filtering. Set to 0 to disable.
Range: 0 to 100
  • Spatial filtering uses 1/2P(x,y) + 1/8P(x,y-1) + 1/8P(x,y+1) + 1/8P(x-w/376,y) + 1/8P(x+w/376,y), only taking into account the factors that are within the threshold. It does NOT cap those parameters to one threshold away.
    If a factor is not within the thresfield, the original pixel is substituted. Overall, it's not very destructive to most video as long as the threshold isn't set too high. You might want to use this two or three times in a row, but don't filter temporally at all past the first time.
  • Note: if a pixel is filtered temporally, it will not be filtered spatially.


int  spatialpasses = 1
Number of times to spatially filter, in case the effect is too weak for your source.
Range: 0 to 16


[edit] Examples

DeCrawl with default values:

AviSource("Blah.avi")
DeCrawl(ythresht=7, ythreshs=8, cthresh=2, temporal=50, spatial=100, spatialpasses=1)


[edit] Changelog

    - 0.51 - Minor speedup
    - 0.50 - Major speedup to chroma thresholding
    - 0.42 - Added spatialpasses
    - 0.41 - Bitblt chroma, thresholding tweaks, enable more compiler optimizations (note: 0.40+ are compiled w/ SSE)
    - 0.40 - Chroma for thresholding is now interpolated, chroma thresholding now affects spatial filtering, temporal thresholding slightly improved, defaults changed
    - 0.32 - slight optimizations, spatial filtering no longer takes precedence over temporal filtering
    - 0.31 - slight thresholding fix
    - 0.30 - Spatial filtering is now an adaptive convolution filter. See above...
    - 0.25 - Added basic 3-line spatial filtering. It doesn't work too well at the moment, though.
    - 0.20 - Major changes. This won't even seem like the same filter anymore. Don't set ythresh too high, though, ESPECIALLY if you use it on interlaced video.
             It may be used on interlaced video if you are careful.
    - 0.15 - Fixed a nasty bug (typo) with chroma checking...
    - 0.14 - I had ydiffthresh and ysamethresh reversed in the readme. Made filter more subtle, but still kicking ass on dot crawl.
    - 0.13 - Minor MMX optimization. Changed the averaging to average the current pixel and the 2 temporally surrounding pixels, instead of just the 2 surrounding.
    - 0.12 - HUGE bugfix making crashes quite often...
    - 0.11 - Added defaults (2,10,2)
    - 0.10 - Initial release




Back to External Filters


Personal tools