View Full Version : problem loading PixieDust
bazz
12th June 2011, 23:15
ive tried different methods to use PixieDust but i can not get it to work
ive used AVsP and loaded DustV5.dll and DustV5.avs in my script then
ConvertToYUY2()
PixieDust()
ConvertToYV12()
ive read about and tried loading LoadPluginEx2.dll from a different folder at the top of my script
i get the same error no matter what i try
DustV5,dll is not a Avisynth 2.5 plugin
ive looked around threads on google , theres no proper WiKi info on it
please would someone give me an example script how they call and use PixieDust
im dying to try this filter:)
thanks in advance for any help
Wilbert
13th June 2011, 13:50
http://avisynth.org/mediawiki/Dust
http://avisynth.org/mediawiki/LoadOldPlugins
bazz
14th June 2011, 21:45
thanks Wilbert, thats all i needed
i got LoadpluginEx from the Warpsharp package
i got a sample running now using Pixiedust
its not as slow as expected, its running at around 15fps
is there any chance i can use MT with Pixiedust?
Didée
14th June 2011, 21:57
No way. PixieDust is not threadsafe.
bazz
14th June 2011, 23:37
thanks Didee
now im using LSFmod with Pixiedust ive dropped from 15fps to 11fps
would it be safe to MT LSFmod below Pixiedust ?
is there a chance it could make it unstable ?
Didée
15th June 2011, 07:30
Don't know, never tried that. You try and tell.
Any particular reason to insist on PixieDust instead of MVTools/MDegrain? Pixie is not fast, has blocking problems, can't be multithreaded, is resolution limited (HD not possible, only with tricky hackery), can only do YUY2 colorspace .... all of which is no issue with MVTools.
bazz
15th June 2011, 16:07
thanks again Didee.
i still cannot get my head around MVTools
i really wanted to tryout a simple MDegrain script for light denoising on DVDR or grainy 720p material
is this the latest mdegrain? - v0.2 - 24 Jan 2010 By Caroliano
i dont suppose someone would give me a break and give me an example script , point out a few parameters i may append if needed.
Didée
15th June 2011, 16:58
MVTools' documentation has examples to show the usage of most of its tools. E.g. this here:
To denoise by MDegrain2 with overlapped blocks (blksize=8) and subpixel precision:
AVISource("c:\test.avi") # or MPEG2Source, DirectShowSource, some previous filter, etc
super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400)
Turning this into a meta function:
function MCDegrain(clip c, int "frames")
{
frames = default(frames, 2)
bs = (c.width>960) ? 16 : 8
super = c.MSuper(pel=2, sharp=1)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2)
(frames<=0) ? c :\
(frames==1) ? c.MDegrain1(super, backward_vec1,forward_vec1,thSAD=400) :\
(frames==2) ? c.MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) :\
c.MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400)
return(last) }
Save this as an "*.avsi" file, and import(..) it in your main script.
Then you can simply call it like "video.MCDegrain(1)" or "MCDegrain(2)" or "MCDegrain(3)". Number-of-frames is the only parameter, the rest is automatic (blocksize) or fixed. More parameters can be added as needed.
This should be simple enough to use?
Taurus
15th June 2011, 18:54
Thanks Didée,
I was just on my way to guide bazz to the MVTools readme :p.
But now I feel comfortably numb, as you not only guided him to the readme, but also gave us a little exercise how to do it right and fast with the frame switcher.
Much appreciated.
bazz
16th June 2011, 15:11
Excellent Didee, your a legend!!
these examples with the info is much appreciated
thanks very much mate
StainlessS
17th June 2011, 03:31
Turning this into a meta function:
function MCDegrain(clip c, int "frames")
{
frames = default(frames, 2)
bs = (c.width>960) ? 16 : 8
super = c.MSuper(pel=2, sharp=1)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2)
(frames<=0) ? c :\
(frames==1) ? c.MDegrain1(super, backward_vec1,forward_vec1,thSAD=400) :\
(frames==2) ? c.MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) :\
c.MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400)
return(last) }
If one wanted to combine the above with this (another gem from another thread)
sup_srch = source.msuper()
sup_rend = source.sharpen(0.6).msuper(levels=1)
bv1 = sup_srch.manalyse(isb=true, delta=1)
fv1 = sup_srch.manalyse(isb=false,delta=1)
bv2 = sup_srch.manalyse(isb=true, delta=2)
fv2 = sup_srch.manalyse(isb=false,delta=2)
source.blur(0.6).mdegrain2(sup_rend,bv1,fv1,bv2,fv2)
Would one arrive about here:
function McDegrainSharp(clip c, int "frames")
{ # Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594
# Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580
# "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad"
# In areas where MAnalyse cannot find good matches, the blur() will be dominant.
# In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels
# when the pixel averaging is performed.
frames = default(frames, 2)
bs = (c.width>960) ? 16 : 8
super = c.MSuper(pel=2, sharp=1)
super_rend = c.sharpen(0.6).MSuper(pel=2, sharp=1,levels=1)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2)
(frames<=0) ? c :\
(frames==1) ? c.Blur(0.6).MDegrain1(super_rend, backward_vec1,forward_vec1,thSAD=400) :\
(frames==2) ? c.Blur(0.6).MDegrain2(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) :\
c.Blur(0.6).MDegrain3(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400)
return(last)
}
And, my question, should LEVELS (in red) be all levels or 1 level,
for MdegrainX (in docs it says multi level superclip), and is the
"levels=1" (in blue) in 2nd snippet, incorrect.
Thankyou for your time. :)
Didée
17th June 2011, 03:57
From eyeballing all seems good. Why not expose, say, "bblur" and "csharp" as parameters, to control strenghts for the blur() and sharpen() commands? Also, perhaps an option to do the blur not as late as in the final MDegrain, but already before the motion search? :)
Edit - Like so, perhaps.
function McDegrainSharp(clip c, int "frames", float "bblur", float "csharp", bool "bsrch")
{ # Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594
# Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580
# "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad"
# In areas where MAnalyse cannot find good matches, the blur() will be dominant.
# In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels
# when the pixel averaging is performed.
frames = default(frames, 2)
bblur = default(bblur, 0.6)
csharp = default(csharp, 0.6)
bsrch = default(bsrch, true)
bs = (c.width>960) ? 16 : 8
c2 = c.blur(bblur)
super = bsrch ? c2.MSuper(pel=2, sharp=1) : c.MSuper(pel=2, sharp=1)
super_rend = c.sharpen(csharp).MSuper(pel=2, sharp=1,levels=1)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2)
(frames<=0) ? c :\
(frames==1) ? c2.MDegrain1(super_rend, backward_vec1,forward_vec1,thSAD=400) :\
(frames==2) ? c2.MDegrain2(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400) :\
c2.MDegrain3(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400)
return(last)
}
StainlessS
17th June 2011, 04:57
Thankyou very much ... it all seems very complicated. :)
I just found the answer to whether on not it was "levels=1":
levels : it is the number of hierarchical levels in super clip frames.
MAnalyse is need in all levels, but for other client functions single finest level is enough
(courser levels are not used). Default : 0 (auto, all possible levels are produced).
It was a line in the docs that gave it as a "Multi-level Super clip"
that threw me, I guess it means it is a Multi-level Super clip, but
has only one level.
I was on my way to the 'bblur' and 'csharp' args, but wanted to establish if I had the right idea first.
I may have eventually gotten to the 'bsrch' arg (in time).
Ta very much. :thanks:
StainlessS
3rd September 2015, 20:22
Fiesty, you out there ?
How does this look to your keen Elvish eyes, mod implemented OK ? (mod of a couple of posts prior to this one).
McDegrain.avsi
Function MCDegrain(clip c, int "frames",Int "Limit",Int "LimitC") {
# By Didee, http://forum.doom9.org/showthread.php?p=1508289#post1508289
# Mod by StainlessS, bs (Blocksize) mod for HD. Added Limit, LimitC. 17 Feb 2020.
frames = Default(frames, 2)
Limit = Default(Limit,255)
LimitC = Default(LimitC,Limit)
bs = (c.width>1920) ? 32 : (c.width>1280) ? 24 : (c.width>960 ) ? 16 : 8
super = c.MSuper(pel=2, sharp=1)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2)
(frames<=0) ? c :\
(frames==1) ? c.MDegrain1(super, backward_vec1,forward_vec1,thSAD=400,Limit=Limit,LimitC=LimitC) :\
(frames==2) ? c.MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,Limit=Limit,LimitC=LimitC) :\
c.MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,Limit=Limit,LimitC=LimitC)
return(last)
}
Function MCDegrainSharp(clip c, int "frames", float "bblur", float "csharp", bool "bsrch",bool "Precise",Int "Limit",Int "LimitC") {
# From:- http://forum.doom9.org/showthread.php?p=1737045#post1737045
# Based on MCDegrain By Didee, http://forum.doom9.org/showthread.php?t=161594
# Also based on DiDee observations in this thread: http://forum.doom9.org/showthread.php?t=161580
# "Denoise with MDegrainX, do slight sharpening where motionmatch is good, do slight blurring where motionmatch is bad"
# In areas where MAnalyse cannot find good matches, the blur() will be dominant.
# In areas where good matches are found, the sharpen()'ed pixels will overweight the blur()'ed pixels
# when the pixel averaging is performed.
#
# Mod by StainlessS to add Precise, 3 Sept 2015.
# Mod by StainlessS, Default bblur mod for HD. bs (blocksize) mod for HD. Added Limit, LimitC. 17 Feb 2020.
frames = Default(frames, 2)
bblur = Default(bblur, (c.width>1920) ? 0.75 : (c.width>1280) ? 0.7 : (c.width>960 ) ? 0.65 : 0.6)
csharp = Default(csharp, 0.6)
bsrch = Default(bsrch, true)
Precise= Default(Precise,False) # Use MRecalculate
Limit = Default(Limit,255)
LimitC = Default(LimitC,Limit)
bs = (c.width>1920) ? 32 : (c.width>1280) ? 24 : (c.width>960 ) ? 16 : 8
c2 = c.blur(bblur)
super = bsrch ? c2.MSuper(pel=2, sharp=1) : c.MSuper(pel=2, sharp=1)
super_rend = c.sharpen(csharp).MSuper(pel=2, sharp=1,levels=1) # Only 1 Level required for sharpened Super (not MAnalyse-ing)
backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=bs, overlap=bs/2)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=bs, overlap=bs/2)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=bs, overlap=bs/2)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=bs, overlap=bs/2)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=bs, overlap=bs/2)
forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=bs, overlap=bs/2)
# If Precise, then recalculate on Prefiltered (blurred) Super (NOT the sharpened render super)
backward_vec3 = (Precise) ? MRecalculate(super, backward_vec3, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec3
backward_vec2 = (Precise) ? MRecalculate(super, backward_vec2, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec2
backward_vec1 = (Precise) ? MRecalculate(super, backward_vec1, blksize=bs/2, overlap=bs/4,thSAD=100) : backward_vec1
forward_vec1 = (Precise) ? MRecalculate(super, forward_vec1 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec1
forward_vec2 = (Precise) ? MRecalculate(super, forward_vec2 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec2
forward_vec3 = (Precise) ? MRecalculate(super, forward_vec3 , blksize=bs/2, overlap=bs/4,thSAD=100) : forward_vec3
#
(frames<=0) ? c :\
(frames==1) ? c2.MDegrain1(super_rend, backward_vec1,forward_vec1,thSAD=400,Limit=Limit,LimitC=LimitC) :\
(frames==2) ? c2.MDegrain2(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,Limit=Limit,LimitC=LimitC) \
: c2.MDegrain3(super_rend, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,Limit=Limit,LimitC=LimitC)
return(last)
}
EDIT: Mods to McDegrain, and McDegrainSharp.
Limit/LimitC limits amount of change due to both degraining and sharpening(where McDegrainSharp), No/reduced limiting where bad block matches, where blurred (where McDegrainSharp).
Default for Limit is 255 (ie off, use range to 255 even for Hi bit depth), default for LimitC is Limit.
EDIT: Perhaps McDegrainSharp() default bblur should also be raised a little for HD stuff. EDIT: Done.
feisty2
4th September 2015, 06:26
I got a life (not on web) to live... so, I'm here after 10 hrs
okay, I guess, but u could do more than this if u really wanna go "precise"
the point is, you can use Recalculate multiple times
def getvectors (src, pelclip, tr=6, pel=4, dct=5, thsad=400):
core = vs.get_core ()
supersoft = core.mvsf.Super (src, pel=pel, chroma=False, hpad=32, vpad=32, pelclip=pelclip, sharp=2, rfilter=4, levels=0)
supersharp = core.mvsf.Super (src, pel=pel, chroma=False, hpad=32, vpad=32, pelclip=pelclip, sharp=2, rfilter=2, levels=0)
def search (isb, delta):
vectors = core.mvsf.Analyze (supersoft, isb=isb, overlap=16, blksize=32, search=3, chroma=False, truemotion=True, delta=delta, trymany=True, searchparam=16, pelsearch=16, dct=dct, levels=0, divide=2, badrange=-24)
vectors = core.mvsf.Recalculate (supersoft, vectors, overlap=8, blksize=16, thsad=thsad//2, chroma=False, truemotion=True, search=3, searchparam=16, dct=dct, smooth=1, divide=2)
vectors = core.mvsf.Recalculate (supersharp, vectors, overlap=4, blksize=8, thsad=thsad//2, chroma=False, truemotion=True, search=3, searchparam=16, dct=dct, smooth=1, divide=2)
vectors = core.mvsf.Recalculate (supersharp, vectors, overlap=2, blksize=4, thsad=thsad//2, chroma=False, truemotion=True, search=3, searchparam=16, dct=dct, smooth=1, divide=0)
return vectors
bv = [search (True, i) for i in range (tr, 0, -1)]
fv = [search (False, i) for i in range (1, tr+1)]
vmulti = bv + fv
vmulti = core.std.Interleave (vmulti)
return vmulti
that code (python code used in vaporsynth, didn't bother to convert to avisynth) above, is some real precise motion estimation (32x32 ---> 4x4)
but also, very, very, very slow
StainlessS
4th September 2015, 14:45
I got a life (not on web) to live... so, I'm here after 10 hrs
And so very kind of you to give a little of it to me, ta very much kind sir.
Just wanted the to verify that I had not made any major boo-boos, as you are 'next best thing to Didee' (well almost).
dyust ceep polishin upun yur inglish, cuz i nose yuz iz oor lazt bezt ope.
Would love to meet your English teacher one day, I'm guessin he has a wicked sense of humour :)
feisty2
4th September 2015, 15:04
dyust ceep polishin upun yur inglish, cuz i nose yuz iz oor lazt bezt ope.
well, you got me! I have absolutely no fucking clue what that means
don't blame my English teacher, she's a really nice lady, it's just, I'm that kind of person that always gets a D at English tests and A+ at math tests
and, I'm not using any "insane English" really, it's just SMS style, so you can type a few less letters and everybody still knows what you are saying
EDIT:
I guess it should be
"Just keep polishing upon your English, because I.." seriously, I failed to figure out what do you mean by the rest of it.
StainlessS
4th September 2015, 15:28
and everybody still knows what you are saying
Really !
You would give the guys at Bletchley Park a run for their money when you do that.
I got D- in both english amd maths, on a good day :)
feisty2
4th September 2015, 15:35
okay, please enlighten me, what is "nose yuz iz oor lazt bezt ope."
before my curiosity kills me
StainlessS
4th September 2015, 15:47
Imagine you are at Bletchley Park, sit down with pen and paper, and solve the conundrum, I'm sure that it is not beyond you.
(Colossus that you are)
Like you, that line is an Enigma.
Everybody else has to do likewise with 'ur' posts.
EDIT: Here be Colossus:- https://en.wikipedia.org/wiki/Colossus_computer
feisty2
4th September 2015, 16:33
I'm through with it, not guessing that "riddle" no more
and, my 70+ years old granny who lives in Denmark knows what I'm saying when I text her
so, I don't think "ur" is such a big deal, basically, anyone speaks or learned English knows "ur" = "your" or "you are",
not like turning "just" into "dyust"
StainlessS
15th March 2016, 01:23
Bugfix in post #14, Bug fix in red (backward_vec1, was backward_vec2)
StainlessS
17th February 2020, 18:07
Mods to McDegrain, and McDegrainSharp in post #14.
due to discussion here:- https://forum.doom9.org/showthread.php?p=1892002
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.