Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
#1 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
GradFun2DBmod [v1.3 - Update 2009/02/11]
Code:
######################################################################################## ### ### ### GradFun2DB MOD : function GradFun2DBmod() ### ### ### ### v1.3 by "LaTo INV." ### ### ### ### 11 February 2009 ### ### ### ######################################################################################## ### ### ### /!\ Needed filters : Masktools (v2.0a35), Removegrain (v1.0PR), ### -------------------- GradFun2db (v1.0), AddGrainC(v1.4). ### ### ### USAGE: GradFun2DBmod( thr, thrC, mode, ### str, strC, temp, adapt, custom, ### mask, radius, range, ### show, screenW, screenH ) ### ### ### +--------+ ### | DITHER | ### +--------+ ### ### thr [default: 1.2] ### ------------------ ### GradFun2DB "thr" parameter ### ### thrC [default: thr] ### ------------------- ### GradFun2DB "thrC" parameter ### ### mode [default: 2] ### ----------------- ### Padding mode ### 0 = Off ### 1 = AddBorders ### 2 = PointResize ### 3 = Flip/Stack ### ### ### +-------+ ### | GRAIN | ### +-------+ ### ### str [default: 0.8] ### ------------------ ### AddGrainC "var" parameter ### ### strC [default: 0.0] ### ------------------- ### AddGrainC "uvar" parameter ### ### temp [default: 50] ### ------------------ ### Temporal stabilization ### 0 = nervous grain ### .. ### 100 = calm grain ### ### adapt [default: 64] ### ------------------- ### Threshold for luma adaptative grain ### -1 = off ### 0 = source ### .. ### 255 = invert ### ### custom [default: "empty"] ### ------------------------- ### Use your own grain generator instead of AddGrain ### (temp & adapt parameters are on, set 0 & -1 respectively to turn off) ### ### ### +------+ ### | MASK | ### +------+ ### ### mask [default: true] ### -------------------- ### Use adaptative deband mask ### (dither/grain is only applied to areas with banding's susceptibility) ### ### radius [default: 2] ### ------------------- ### Radius for the mask (1 is the fastest, 2-3 are slower) ### ### range [default: 2] ### ------------------ ### Range used in the mask (1-3 are good value) ### ### ### +-------+ ### | DEBUG | ### +-------+ ### ### show [default: false] ### --------------------- ### Show debug clip & informations ### ### screenW [default: 1280] ### ----------------------- ### Screen horizontal resolution (for show clip) ### ### screenH [default: 1024] ### ----------------------- ### Screen vertical resolution (for show clip) ### ### ### +-----------+ ### | CHANGELOG | ### +-----------+ ### ### v1.3 : replaced chroma parameter by thrC & strC ### ### v1.2 : changed int->float for str parameter ### added custom parameter ### ### v1.1 : added show parameter ### added small speed improvements ### added warning for bad settings ### fixed small bug with chroma=false ### ### v1.0 : first public release ### ######################################################################################## Update 2009.02.11 : GradFun2DBmod v1.3 v1.3: replaced chroma parameter by thrC & strC v1.2: changed int->float for str parameter added custom parameter v1.1: added show parameter added small speed improvements added warning for bad settings fixed small bug with chroma=false v1.0: first public release
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! Last edited by LaTo; 11th February 2009 at 16:30. |
|
|
|
|
|
#2 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
A mix of Udeband / GradFunk with new features...
![]() I will add screenshots later...
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! |
|
|
|
|
|
#4 | Link |
|
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,305
|
I long for the days when we will no longer need dithering and have high enough color bit depth to remove banding all together.
Oh, and LaTo, what's this? You posting a script with no "show" parameter! Nah, it aint necessary but I got used to it. It's simple enough to implement my own source view.
__________________
FAQs:Bond's AVC/H.264 FAQ,Bond's MPEG-4 ASP FAQ Sites:Adubvideo,MeGUIWiki,MeGUI Ipod Conversion Guide |
|
|
|
|
|
#5 | Link | ||
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
Quote:
![]() Quote:
![]() Maybe later, I haven't time these days...
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! |
||
|
|
|
|
|
#6 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
Update v1.1 - 2009/01/24
v1.1:
added show parameter added small speed improvements added warning for bad settings fixed small bug with chroma=false Omission is repaired
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! Last edited by LaTo; 24th January 2009 at 21:10. |
|
|
|
|
|
#7 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
Please re-download the v1.1 because I made a mistake in the show function
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! |
|
|
|
|
|
#8 | Link | |
|
Fighting spam with a fish
Join Date: Sep 2005
Posts: 2,305
|
Quote:
__________________
FAQs:Bond's AVC/H.264 FAQ,Bond's MPEG-4 ASP FAQ Sites:Adubvideo,MeGUIWiki,MeGUI Ipod Conversion Guide |
|
|
|
|
|
|
#11 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
Why not... I will add a switch between Addgrain & GrainFactory3 later.
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! |
|
|
|
|
|
#12 | Link |
|
Sleepy overworked fellow
Join Date: Feb 2008
Location: Maple syrup's homeland
Posts: 774
|
You could do it as string "mygraingen" and use eval in the script. This way, you wouldn't need to add all the possible parameters in gradfun2dbmod. (+ more flexibility if the user wants to use a combination of filters, etc etc) mygraingen="grainfactory3(blabla).something else()"
__________________
AnimeIVTC() -http://www.worldcommunitygrid.org/- Let all geeks use their incredibly powerful comps for the greater good (no, no, it won't slow your filtering/encoding :p) |
|
|
|
|
|
#13 | Link | |
|
Registered User
Join Date: Nov 2006
Posts: 80
|
Quote:
Regards McCauley |
|
|
|
|
|
|
#14 | Link |
|
x264aholic
Join Date: Jul 2007
Location: New York
Posts: 1,739
|
One way you can do this is to make a helper function.
Code:
function EvalFunction(clip src, string "filter")
{
src
processed = Eval(filter)
return processed
}
Code:
# Without the helper function you have to do this:
Avisource("..")
src = last
proc = src.SomeFiltering()
src
dither = Eval("Blur(1)")
# With the helper function you can do this:
Avisource("...")
src = last
proc = src.SomeFiltering()
dither = src.EvalFunction("Blur(1)")
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame. |
|
|
|
|
|
#15 | Link |
|
Doom9 Lover
Join Date: Oct 2007
Location: New Zealand
Posts: 115
|
Wow took me a minute to see the difference without cheating by looking at the bottom, looks fantastic man.
So this filter mainly removes grainy sort of damage? What program did you use to produce that shot for comparing, could save myself a lot of time if you're willing to care and share
__________________
Creativity is the birth of a new era, will you be creative also? |
|
|
|
|
|
#17 | Link |
|
Doom9 Lover
Join Date: Oct 2007
Location: New Zealand
Posts: 115
|
In my defense its still tuesday morning here -_-
The banding is caused by grain though is it not? i'll shut up now...
__________________
Creativity is the birth of a new era, will you be creative also? |
|
|
|
|
|
#19 | Link |
|
Registered User
Join Date: May 2008
Posts: 6
|
I think str parameter should be float (it is float in addgrain).
Otherwise it's really a good script, I tried it on some anime clips and it works very well, a lot better than a simple GradFun2DB. The only problem is that anime shouldn't really have any grain so the default parameters need a little bit of tweaking (supersampling may help too).
|
|
|
|
|
|
#20 | Link |
|
LaTo INV.
Join Date: Jun 2007
Location: France
Posts: 289
|
Update 2009/01/28 - v1.2
v1.2:
changed int->float for str parameter added custom parameter
__________________
SmoothLevels v1.02 MCTemporalDenoise v1.3.09 LSFmod v1.9 GradFun2DBmod v1.3 No technical support in PM! Last edited by LaTo; 28th January 2009 at 18:19. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|