FunkyDeBlock: Difference between revisions
From Avisynth wiki
Jump to navigationJump to search
m minor update |
m category |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{FilterCat4|External_filters|Scripts|Restoration_filters|Deblockers}} | {{FilterCat4|External_filters|Scripts|Restoration_filters|Deblockers}} | ||
{{Filter3 | |||
|Mug Funky | |||
|10/03/2004 | |||
|3=[[FunkyDeBlock#Script|funkydeblock script]] | |||
|4=Deblocker | |||
|5= | |||
|6=[http://forum.doom9.org/showthread.php?t=72431 Doom9 Thread]}} | |||
==Description== | |||
Deblocking function based on blindPP and high/lowpass separating. This is of most use on HEAVILY compressed source material. | |||
<br> | |||
<br> | |||
== Requirements == | |||
* AviSynth 2.5.8 or [http://sourceforge.net/projects/avisynth2/ greater] | |||
* [[FAQ_different_types_content#How_do_I_recognize_progressive.2C_interlaced.2C_telecined.2C_hybrid_and_blended_content.3F|Progressive]] input only | |||
* Supported color formats: [[YUY2]], [[YV12]] | |||
=== Required Plugins === | |||
Latest version of the following plugins are recommended unless stated otherwise.<br> | |||
*[[DGDecode]] - part of the <tt>DGMPGDec</tt> package | |||
<br> | |||
== [[Script variables|Syntax and Parameters]] == | |||
:{{FuncDef|funkydeblock (clip c, int "quant", int "th", int "radius", bool "deblock", bool "depump")}} | |||
<br> | |||
::{{Par2| |clip| }} | |||
:::Input clip. | |||
<br> | |||
::{{Par2|quant|int|4}} | |||
:::The quant parameter usually fed into blindPP. The default is 4 which is actually very conservative due to the fact it's only used on the highpassed clip, so even quant=31 gives a good picture. | |||
<br> | |||
::{{Par2|th|int|3}} | |||
:::[[TemporalSoften]] threshold. Only active when depumping is on. Default 3. This parameter controls how sensitive to pumping the filter is. keep it low, unless you're seeing large jumps at I frames. Increase only as much as you have to, or dim moving objects will start vanishing. | |||
<br> | |||
::{{Par2|radius|int|4}} | |||
::: The number of frames before and after currentframe used in [[TemporalSoften]]. Default 4. This is intended to smear GOP changes, so pumping doesn't show as much. | |||
<br> | |||
::{{Par2|deblock|bool|true}} | |||
:::Turn deblocking on/off (only depumping is used). Default true. | |||
<br> | |||
::{{Par2|depump|bool|true}} | |||
:::Turn depumping on/off (only deblocking is used). Default true. | |||
<br> | |||
<pre>function gauss (clip c,int "radius") { | ==Examples== | ||
funkydeblock with default settings: | |||
MPEG2Source("Blocky.dv2") | |||
funkydeblock (quant=4, th=3, radius=4, deblock=true, depump=true) | |||
<br> | |||
==Script== | |||
<pre>function gauss (clip c, int "radius") { | |||
radius=default(radius,1) | radius=default(radius,1) | ||
| Line 13: | Line 59: | ||
} | } | ||
function funkydeblock (clip c,int "quant",int "th",int "radius", bool "deblock",bool "depump"){ | function funkydeblock (clip c, int "quant", int "th", int "radius", bool "deblock", bool "depump"){ | ||
quant=default(quant,4) | quant=default(quant,4) | ||
| Line 32: | Line 78: | ||
}</pre> | }</pre> | ||
<br> | |||
==External Links== | |||
*[http://forum.doom9.org/showthread.php?t=72431 Doom9 Forum] - funkydeblock discussion. | |||
<br> | |||
<br> | |||
----------------------------------------------- | |||
'''Back to [[External_filters#Deblocking|External Filters]] ←''' | |||
----------------------------------------------- | |||
Latest revision as of 13:44, 2 January 2016
| Abstract | |
|---|---|
| Author | Mug Funky |
| Version | 10/03/2004 |
| Download | funkydeblock script |
| Category | Deblocker |
| License | |
| Discussion | Doom9 Thread |
Description
Deblocking function based on blindPP and high/lowpass separating. This is of most use on HEAVILY compressed source material.
Requirements
- AviSynth 2.5.8 or greater
- Progressive input only
- Supported color formats: YUY2, YV12
Required Plugins
Latest version of the following plugins are recommended unless stated otherwise.
- DGDecode - part of the DGMPGDec package
- funkydeblock (clip c, int "quant", int "th", int "radius", bool "deblock", bool "depump")
- clip =
- Input clip.
- clip =
- int quant = 4
- The quant parameter usually fed into blindPP. The default is 4 which is actually very conservative due to the fact it's only used on the highpassed clip, so even quant=31 gives a good picture.
- int quant = 4
- int th = 3
- TemporalSoften threshold. Only active when depumping is on. Default 3. This parameter controls how sensitive to pumping the filter is. keep it low, unless you're seeing large jumps at I frames. Increase only as much as you have to, or dim moving objects will start vanishing.
- int th = 3
- int radius = 4
- The number of frames before and after currentframe used in TemporalSoften. Default 4. This is intended to smear GOP changes, so pumping doesn't show as much.
- int radius = 4
- bool deblock = true
- Turn deblocking on/off (only depumping is used). Default true.
- bool deblock = true
- bool depump = true
- Turn depumping on/off (only deblocking is used). Default true.
- bool depump = true
Examples
funkydeblock with default settings:
MPEG2Source("Blocky.dv2")
funkydeblock (quant=4, th=3, radius=4, deblock=true, depump=true)
Script
function gauss (clip c, int "radius") {
radius=default(radius,1)
radius=radius*4
c.bilinearresize(4*(c.width/radius),4*(c.height/radius)).bicubicresize(c.width,c.height,1,0)
}
function funkydeblock (clip c, int "quant", int "th", int "radius", bool "deblock", bool "depump"){
quant=default(quant,4)
th=default(th,3)
radius=default(radius,4)
deblock=default(deblock,true)
depump=default(depump,true)
blurd = c.gauss(4)
highpass=subtract(blurd,c)
deblocked=(deblock==true) ? highpass.blindpp(quant=floor(quant),cpu=4) : highpass
nopump=subtract(blurd,deblocked)
pump=subtract(blurd.temporalsoften(radius,th,th,2*th,2),deblocked)
(depump==true) ? pump : nopump
}
External Links
- Doom9 Forum - funkydeblock discussion.
Back to External Filters ←