Log in

View Full Version : SVPflow motion interpolation (Avisynth + Vapoursynth, Linux, Mac?)


Pages : 1 [2] 3 4 5 6 7

chainik_svp
20th April 2012, 15:36
Bernardd
What difference did you expect? I believe it works as described.

Bernardd
20th April 2012, 16:46
Hi Chainik

I want to write a script for SVSmooth with only the usefull params_string for my clip (restoring old Super 8 films). It seem for me that Refine params_string tunning is not necessary. Perhaps is wrong. For example i have changed refine: thsad value without observe frame picture change.

So in my script i have deleted all Refine params_strings with default values. This line " refine: [ { thsad: 200, search: { type: 4, distance: 4, satd: false }, penalty: { pnew: 50 } } ]" has been deleted. I expect no frame picture change, but i have a little change.

I hope you understand.

Thank

Bernard

chainik_svp
20th April 2012, 16:57
I hope you understand.

I'm trying :) So you think that "refine: []" should produce the same output as "refine: [ {thsad:200} ]", right?
This's wrong cause "[]" is just an empty array, nothing to do here. For the refinement there should be at least one element in the array, like this: "[ {} ]".

Bernardd
20th April 2012, 20:01
Ok, for this,
but i want to say that the not written line "refine: [{.............}]" (all line is deleted) do not produce the same output as "refine: [ {thsad:200} ]".

Yellow_
22nd April 2012, 07:41
hi, any advice on parameters to minimize shape shifting Preditor style artifacts in movement, simple normal people movement. As a rough start point I tried defaults :-) and then this, I'm starting with 24p source to 120fps and I'm not expecting miracles just minimise movement artifacts however long it takes to analyse and encode. No doubt I'm using the functions badly:

super_params="{pel:1}"
analyse_params="{ algo: 2, block:{w:8} }"

super = SVSuper(super_params)
vectors = SVAnalyse(super, analyse_params)

forward_mv = SVConvert(vectors, false)
backward_mv = SVConvert(vectors, true)

super_mv = MSuper(pel=1, hpad=0, vpad=0) #padding should be zero here!
MFlowFps(super_mv, backward_mv, forward_mv, num=120, den=1)

Many thanks

chainik_svp
22nd April 2012, 13:06
Yellow_

Why MFlowFps? It has no advantages over SVSmoothFps.
The main weapon to kill that arts around moving objects is cover/uncover masking (called "occlusion mask" in MVTools documentation) but this mask should be much more correct in SVPflow. So try to use SVSmoothFps with "algo:21", GPU acceleration and bicubic vectors/masks interpolation turned on ("cubic:1") and play with "mask.cover" value.

Yellow_
22nd April 2012, 21:58
Thanks for the reply, unfortunatley I'm using this on Linux via Wine so haven't been able to get GPU stuff working even if my NV card is supported. My problem. :-)

So I'm here:

super = SVSuper("{pel:1}")
vectors = SVAnalyse(super, "{ algo: 21, block:{w:8} }")

SVSmoothFps(super, vectors, "{ num:120, den:1, algo:21, cubic:0 }", url="www.svp-team.com")

Looking at mask stuff now. Cheers.

**EDIT**

Vast improvement over first attempt. :-)

Added a mask cover of 50 to start, what I'm seeing is a jagged edge trailing movement, ie: outline of where the moving object was previous frame.

chainik_svp
22nd April 2012, 22:24
haven't been able to get GPU stuff working
Have you seen that (http://imgur.com/a/MwglB)? ;)

BTW I've read that Wine now supports OpenCL calls but I'm too lazy to check it :D

---------
With smaller blocks - "{block:{w:8}, refine: [{thsad:-1}] }" - mask should be more accurate.

Yellow_
23rd April 2012, 10:12
Cheers, I'll look into getting GPU stuff going via Wine. I get overlap error due to CPU frame comp with thsad:-1 :-(

Mug Funky
24th April 2012, 09:08
just dropping by to say thanks to all involved in the SVP project.

my canon workflow owes a lot to it :)

what i'm doing:

- shoot at as high a framerate as i can manage (720p60), at as high a shutterspeed as i can get a good exposure on (i like to shoot wide open, so it's no problem to get 1/250 or so). also, high fps means less rolling-shutter effect than if i'd shot at my target frame rate. less jelly = better.

- depanstabilize. goes without saying if i'm not willing to give up coffee.

- SVPfps to my output framerate*samples. samples working in the same way as in a graphics package.

- temporalsoften to blend only frames that correspond to my desired shutter angle wrt the output frame rate

- selectevery(samples, 0)

i'm able to output 2400/1001 with motion blur as if it was shot that way at 180 degrees :)

the interpolation quality is such that when it fails, i don't see weird things. usually just a little ghosting.

me happy :)

Anacletus
28th April 2012, 21:12
Hi chainik_svp,

would you mind explaining how to translate this standard MDegrain2 call in order to take advantage of your plugins?


AviSource("something.avi")
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)


If i understand correctly i should use something like this for MDegrain1?


AviSource("something.avi")
super = SVSuper("{pel:2, gpu:1}")
vectors = SVAnalyse(super, "{gpu:1,block:{w:8,h:8,overlap:2}}")
forward_mv = SVConvert(vectors, false)
backward_mv = SVConvert(vectors, true)
super_mv = MSuper(pel=1, hpad=0, vpad=0)
MDegrain1(super_mv, backward_mv, forward_mv, thSAD=400)


I'm missing if there the possibility to use more motion vectors as for MDegrain2 or if this is unnecessary with SVP plugins..

Can you please point me to the right direction?

Thanks

chainik_svp
28th April 2012, 22:07
Can you please point me to the right direction?
I think -Vit- already gave a clue (http://forum.doom9.org/showthread.php?p=1568520#post1568520) how to emulate "delta=2".

Again, I'm not trying to completely replace MVTools, so MDegrain and other things are not in my interests now ;)
But it's not a big deal to add "delta" param so if someone thinks it'll be useful I could do that.

-Vit-
28th April 2012, 23:40
My delta=2 method works fine, but don't try to simplify the fVec2 line, I believe it would be an error:

fVec2 = Interleave(vecs2e.SVConvert( isb=false ), vecs2o.SVConvert( isb=false )) # Correct
fVec2 = Interleave(vecs2e, vecs2o).SVConvert( isb=false ) # Error

That's because SVAnalyse generates forward vectors offset by 1 from MVAnalyse so SVConvert shifts the forward vectors back by one. However, with a delta of 2 they need shifted back by 2, so the SVConvert goes inside the Interleave. May not matter for the bVec3 line, but I suggest just to leave it as is in my original post (http://forum.doom9.org/showpost.php?p=1568520&postcount=45).

---

For delta=3 do this:

params_string = "{gpu:0}" # plus any other SVAnalyse settings
vecs30 = super.SelectEvery(3,0).SVAnalyse( params_string )
vecs31 = super.SelectEvery(3,1).SVAnalyse( params_string )
vecs32 = super.SelectEvery(3,2).SVAnalyse( params_string )
fVec3 = Interleave( vecs30.SVConvert(isb=false), vecs31.SVConvert(isb=false), vecs32.SVConvert(isb=false) )
bVec3 = Interleave( vecs30.SVConvert(isb=true ), vecs31.SVConvert(isb=true ), vecs32.SVConvert(isb=true ) )


Never tested that but it's just the same process.

And here's a function to generate MVTools vectors using SVAnalyse and an arbitrary delta. It requires GScript. I've only tested it a little:

# Use SVAnalyse with a given delta and convert vectors to MVTools format
# Returns a single vector clip containing interleaved forward and backward vectors.
# Example:
# vec3 = super.SVAnalyseConvert( 3, "{gpu:0, pel:2}" ) # delta=3
# fVec3 = vec3.SelectEven()
# bVec3 = vec3.SelectOdd()
#
function SVAnalyseConvert( clip super, int "delta", string "params_string" )
{
delta = default(delta, 1)
params_string = default(params_string, "{gpu:0}")

GScript("""
if (delta == 1) {
vecs = super.SVAnalyse( params_string )
return Interleave( vecs.SVConvert(isb=false), vecs.SVConvert(isb=true) )
}
else {
cf = ""
cb = ""
sD = string(delta)
for (i=0, delta-1) {
sI = string(i)
Eval( "vecs"+sD+sI+"=super.SelectEvery("+sD+","+sI+").SVAnalyse( params_string )" )
cf = cf + "vecs"+sD+sI+".SVConvert(isb=false)"
cb = cb + "vecs"+sD+sI+".SVConvert(isb=true)"
if (i != delta-1) {
cf = cf + ","
cb = cb + ","
}
}
return Eval( "Interleave(Interleave("+cf+"),Interleave("+cb+"))" )
}
""")
}


___

And yes, I guess a delta parameter would be nice! :D

Anacletus
29th April 2012, 15:46
Again, I'm not trying to completely replace MVTools, so MDegrain and other things are not in my interests now ;)

Fair enough, thank you ;)

@-Vit-
Thank you too ;)

chainik_svp
2nd May 2012, 12:09
So in my script i have deleted all Refine params_strings with default values. This line " refine: [ { thsad: 200, search: { type: 4, distance: 4, satd: false }, penalty: { pnew: 50 } } ]" has been deleted. I expect no frame picture change, but i have a little change.

A-ha! :D Why "distance: 4"? Default value is pel value from SVSuper.

chainik_svp
2nd May 2012, 12:42
-Vit-
I guess a delta parameter would be nice!

Ver. 1.0.4 (http://www.svp-team.com/files/gpl/svpflow-1.0.4.zip) ;)
look at special.delta param in SVAnalyse
{block:{...}, main:{...}, refine:{...}, special:{delta:2}}

Bernardd
2nd May 2012, 14:53
Hi Chainik,

I apologize, my Refine line is not with whole default values. But always

output for this
SVAnalyse( super, """{ gpu: 0, vectors: 3, block: { w: 16, h: 16, overlap: 0 },
main: { levels: 0,
search: { type: 4, distance: -10, sort: true, satd: false,
coarse: { type: 4, distance: -10, satd: true, trymany: false, bad: { sad: 1000, range: -24 } } },
penalty: { lambda: 10.0, plevel: 1.5, lsad: 8000, pnew: 50, pglobal: 50, pzero: 100, pnbour: 50, prev: 0 } } ,
refine: [ { thsad: 200, search: { type: 4, distance: 2, satd: false }, penalty: { pnew: 50 } } ] }""")


is not same as output for this
SVAnalyse( super, """{ gpu: 0, vectors: 3, block: { w: 16, h: 16, overlap: 0 },
main: { levels: 0,
search: { type: 4, distance: -10, sort: true, satd: false,
coarse: { type: 4, distance: -10, satd: true, trymany: false, bad: { sad: 1000, range: -24 } } },
penalty: { lambda: 10.0, plevel: 1.5, lsad: 8000, pnew: 50, pglobal: 50, pzero: 100, pnbour: 50, prev: 0 } }
}""")


Bernard

chainik_svp
2nd May 2012, 14:57
Bernardd
You don't have any refinement defined in second case. I repeat: default refinement will be with "refine: [ {} ]" string.

Bernardd
2nd May 2012, 16:49
Thank Chainik,

I apologize, I have not understand fast. Now it is OK.

Second question, when i restore old Super 8 movies to return Framerate from 16.667 fps to 25, i have tried "plevel = 10" with algo 23 for minimize blend.

What it is the max plevel value usable ?

Bernard

chainik_svp
3rd May 2012, 09:15
Bernardd
What it is the max plevel value usable ?

I've got no idea :)
But this extremely high "plevel" value means almost zero lambda penalty on all levels except smallest one which leads to less coherent vectors field.

chainik_svp
3rd May 2012, 11:12
Version 1.0.5 (http://www.svp-team.com/files/gpl/svpflow-1.0.5.zip)
= added compatibility with GTX680 (and may be with all other Kepler GPUs) - thanks to flagger

Bernardd
3rd May 2012, 21:00
Thank Chainik,

I understand now why high plevel is able to minimize blend in some case. With less motion coherence, blend is no more necessary to build the best coherent frame.

Bernard

Boulder
8th May 2012, 17:42
-Vit-
I guess a delta parameter would be nice!

Ver. 1.0.4 (http://www.svp-team.com/files/gpl/svpflow-1.0.4.zip) ;)
look at special.delta param in SVAnalyse
{block:{...}, main:{...}, refine:{...}, special:{delta:2}}So can we now simply use three SVAnalyse calls with various delta and then SVConvert to get the MVTools-format vectors out? It seems that SVAnalyse produces a lot more stable vector field than MAnalyse so I'd very much like to incorporate it into my own functions as an alternative :)

And thanks for all your hard work, there is never too much development these days :)

chainik_svp
8th May 2012, 21:14
So can we now simply use three SVAnalyse calls with various delta and then SVConvert to get the MVTools-format vectors out?

That's the plan :) But someone obviously should try it and report :D

thanks for all your hard work, there is never too much development these days
thanks! (http://www.svp-team.com/wiki/Donation)

Mounir
11th May 2012, 03:30
I haven't tried svp yet but i'd be intereted as it us the gpu; basically i want to replace the mvtools part in my script how would i code that ?

my script:

SeparateFields()
a=last
mot=removegrain(11,0).removegrain(20,0).DepanEstimate(range=2)
take2=a.depaninterleave(mot,prev=2,next=2,subpixel=2)
clean1=take2.TMedian2().selectevery(5,2)

sup1 = clean1.minblur(1).removegrain(11,0).removegrain(11,0)
\ .mt_lutxy(clean1,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=2,V=2)
\ .msuper(pel=2,sharp=0)
sup2 = a.msuper(pel=2,levels=1,sharp=2)

bv22=sup1.manalyse(isb=true, truemotion=true,global=true,delta=2,blksize=8,overlap=4,search=5,searchparam=3,DCT=2)
bv21=sup1.manalyse(isb=true, truemotion=true,global=true,delta=1,blksize=8,overlap=4,search=5,searchparam=3,DCT=2)
fv21=sup1.manalyse(isb=false,truemotion=true,global=true,delta=1,blksize=8,overlap=4,search=5,searchparam=1,DCT=2)
fv22=sup1.manalyse(isb=false,truemotion=true,global=true,delta=2,blksize=8,overlap=4,search=5,searchparam=1,DCT=2)
interleave(a.mcompensate(sup2,fv22),a.mcompensate(sup2,fv21),a,a.mcompensate(sup2,bv21),a.mcompensate(sup2,bv22))

selectevery(5,2)
sup3 = last.msuper(pel=2,sharp=2)
bv33=sup3.manalyse(isb=true, truemotion=true,global=true,delta=3,blksize=8,overlap=4,search=5,searchparam=3,DCT=2)
bv32=sup3.manalyse(isb=true, truemotion=true,global=true,delta=2,blksize=8,overlap=4,search=5,searchparam=3,DCT=2)
bv31=sup3.manalyse(isb=true, truemotion=true,global=true,delta=1,blksize=8,overlap=4,search=5,searchparam=3,DCT=2)
fv31=sup3.manalyse(isb=false,truemotion=true,global=true,delta=1,blksize=8,overlap=4,search=5,searchparam=1,DCT=2)
fv32=sup3.manalyse(isb=false,truemotion=true,global=true,delta=2,blksize=8,overlap=4,search=5,searchparam=1,DCT=2)
fv33=sup3.manalyse(isb=false,truemotion=true,global=true,delta=3,blksize=8,overlap=4,search=5,searchparam=1,DCT=2)
last.mdegrain3(sup3,bv31,fv31,bv32,fv32,bv33,fv33,thSAD=499)
Interleave()
weave()

chainik_svp
11th May 2012, 13:50
Mounir
You script won't use any GPU with SVPflow.

Bloax
11th May 2012, 14:03
SVP Is still faster though. :rolleyes:

chainik_svp
11th May 2012, 16:58
Compared with what? :) With the original Fizick's 2.5.11.3 - yes, with the version from SVP 3.0.6 (http://www.svp-team.com/wiki/Plugins:_MVTools2) - not really (except SVPflow has "adaptive search radius" feature of cause).

Mounir
Do you really need "dct=2" and different search options for forward and backward MVs?
If not then central part of the script could be something like this:
sup1 = clean1.minblur(1).removegrain(11,0).removegrain(11,0)
\ .mt_lutxy(clean1,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=2,V=2)
\ .SVSuper("pel:2, scale:{up:0}")

search_params="block:{w:8,overlap:3}" #or whatever

v21=sup1.SVAnalyse("{"+search_params+"}")
v22=sup1.SVAnalyse("{"+search_params+",special:{delta:2}}")

bv22=v22.SVConvert(isb=true)
bv21=v21.SVConvert(isb=true)
fv21=v21.SVConvert(isb=false)
fv22=v22.SVConvert(isb=false)

sup2 = a.msuper(pel=2,levels=1,sharp=2)
interleave(a.mcompensate(sup2,fv22),a.mcompensate(sup2,fv21),a,a.mcompensate(sup2,bv21),a.mcompensate(sup2,bv22))

selectevery(5,2)
sup3 = last.msuper(pel=2,sharp=2,hpad=0,vpad=0)

# SVAnalyse accepts MSuper with zero padding!
v31=sup3.SVAnalyse("{"+search_params+"}")
v32=sup3.SVAnalyse("{"+search_params+",special:{delta:2}}")
v33=sup3.SVAnalyse("{"+search_params+",special:{delta:3}}")

bv33=v33.SVConvert(isb=true)
bv32=v32.SVConvert(isb=true)
bv31=v31.SVConvert(isb=true)
fv31=v31.SVConvert(isb=false)
fv32=v32.SVConvert(isb=false)
fv33=v33.SVConvert(isb=false)

last.mdegrain3(sup3,bv31,fv31,bv32,fv32,bv33,fv33,thSAD=499)

Mounir
11th May 2012, 18:33
@ chainik_svp
Your code return an error for \ .SVSuper("pel:2, scale:{up:0}")
error: i don't know what "clean1" means

chainik_svp
11th May 2012, 20:15
o_O I thought it's your script.
Or you've just taken it from somewhere and you've got no idea how it works?
In the last case I suggest to ask -Vit- for assistance with all this stuff like "delta" and mdegrain.

Tempter57
11th May 2012, 21:17
Mounir
SVSuper( "{ gpu:0, pel:2, scale:{up:0} }")

chainik_svp
12th May 2012, 09:32
Tempter57
if it was so easy
error: i don't know what "clean1" means
;)

Tempter57
12th May 2012, 10:31
Tempter57
if it was so easy

;)
Well, preset DVD MDegrain2_SVP mask4 DLS
#RemoveGrainSSE2.dll
#RepairSSE2.dll
#mvtools2SVP.dll
#svpflow1.dll
#svpflow2.dll
#fft3dgpu.dll
#WarpSharp.dll
#mt_masktools-26.dll
#average.dll
#AddGrainC.dll
#GradFun2DB.dll
#VagueDenoiser.dll
#flash3kyuu_deband.dll
#Gradfun2dbmod.avs
#Ylevels.avs
#LimitedSharpenFaster Mod.avs


setmemorymax(768)

# ColorYUV(gain_y=0,cont_y=0,cont_u=0,cont_v=0,gain_v=0,gain_u=-0,off_y=0,off_u=-0,off_v=-0)

source = last
preNR = source.fft3dgpu(wintype=1,degrid=1,bw=16,bh=16,ow=8,oh=8,bt=4,sigma=1.0,sigma2=1.2,sigma3=2.0,sigma4=1.0,plane=4).GradFun2DB(1.01)

setmtmode(2)
sup1 = preNR.SVSuper( "{ gpu:0, pel:2, scale:{up:2, down:2} }")

search_params = "gpu:0, vectors:3, block:{w:16,overlap:3}"
v21 = sup1.SVAnalyse("{"+search_params+"}")
v22 = sup1.SVAnalyse("{"+search_params+",special:{delta:2}}")

bv22 = v22.SVConvert(isb=true)
bv21 = v21.SVConvert(isb=true)
fv21 = v21.SVConvert(isb=false)
fv22 = v22.SVConvert(isb=false)

mask1 = source.mmask(bv22, ml=100, kind = 1, Ysc = 255, gamma=0.999)
mask2 = source.mmask(bv21, ml=100, kind = 1, Ysc = 255, gamma=0.999)
mask3 = source.mmask(fv21, ml=100, kind = 1, Ysc = 255, gamma=0.999)
mask4 = source.mmask(fv22, ml=100, kind = 1, Ysc = 255, gamma=0.999)
maskb = mt_lutxy(mask1,mask2,"x 255 < y 255 < x y + 2 / x ? y ?")
maskf = mt_lutxy(mask3,mask4,"x 255 < y 255 < x y + 2 / x ? y ?")
tmask = mt_lutxy(maskb,maskf,"x 255 < y 255 < x y + 2 / x ? y ? 32 - 255 * 223 /")# комбинированная маска оценки движения SAD

source2 = mt_merge(source,preNR,tmask,Y=3,U=3,V=3)
sup2 = source.msuper(pel=2, levels=1, sharp=2)
den = source2.MDegrain2(sup2,bv21,fv21,bv22,fv22,thSAD=300,thSCD1=400,thSCD2=102)
Diff1 = mt_makediff(source,den,U=3,V=3)

NR = den.VagueDenoiser(method=4, nsteps=8, wavelet=2, Wiener=true, auxclip=preNR, percent=95, chromaT=0.8, wratio=0.75, threshold=0.4)
Diff2 = mt_makediff(source,NR,U=3,V=3)

lutxy = mt_lutxy(Diff1,Diff2,"x 128 - abs y 128 - abs < x y ?")
smB = source.mt_makediff(lutxy,U=3,V=3)

# MASKING
mE = mt_edge(smB,"prewitt",0,255,0,0,V=1,U=1).mt_lut(expr="x 1.8 ^",U=1,V=1).removegrain(4,-1).mt_inflate(U=1,V=1)
mL = mt_logic(tmask.invert(),mE,"min",U=1,V=1).removegrain(20,-1)
mF = mt_logic(tmask,mE,"max",U=1,V=1).removegrain(20,-1)

# SHARPENING
b1c = source.MCompensate(sup2, bv21)
f1c = source.MCompensate(sup2, fv21)
Sclp = smB.LSFmod(defaults="slow", preblur="ON", strength=100)
# Sclp = ContraHD(smB,source,b1c,f1c,0)
Tmax = source.mt_logic(f1c,"max",U=1,V=1).mt_logic(b1c,"max",U=1,V=1)
Tmin = source.mt_logic(f1c,"min",U=1,V=1).mt_logic(b1c,"min",U=1,V=1)
shrp = Sclp.mt_clamp(Tmax, Tmin, 2, 2, U=1, V=1)
sL = mt_merge(smB,shrp,mL,U=2,V=2)

# DEBANDING
# GFc = sL.f3kdb(sample_mode=2,dynamic_grain=false,keep_tv_range=false,dither_algo=3,y=64,cb=64,cr=64,grainY=48,grainC=48)
GFc = sL.GradFun2DBmod(thr=1.21,thrC=1.5,mode=2,str=0.6,strC=0.0,temp=50,adapt=64)
Frs = mt_merge(GFc,sL,mF,luma=true,U=3,V=3)
Frs#.mergechroma(den)
YlevelsS(0,1.0,255,0,255,false)

# -- visualisations --
# stackvertical(source,last)
# interleave(source,last)


if SVSuper( " gpu:0, pel:2, scale:{up:2, down:2 } " ) => error " SVSuper: invalid "params" syntax"

bmb
13th May 2012, 09:24
hey their, im currently using this script

super = MSuper(pel=2,chroma=false)
backward_vec1 = super.MAnalyse(isb = true, blksize=16, delta = 1, overlap=8,chroma=false,search=5,searchparam=4,temporal=true)
forward_vec1 = super.MAnalyse(isb = false, blksize=16, delta = 1, overlap=8,chroma=false,search=5,searchparam=4,temporal=true)
MDegrain1(super, backward_vec1,forward_vec1,thSAD=20,plane=0)

i use it to denoise and remove grain generated from sharpening, it works great (the best iv used so far) it keeps the detail of the picture sharp and still theirs no noise or blocks generated.. my sources are bluray content.. i sometimes get slight noise and blocks (depending on the compression) i was wondering if you could translate it or offer a script better with this SVP and il test it out and report back.. thanks ...

Boulder
14th May 2012, 11:08
One small question: is there any harm in using a super clip created by MSuper instead of SVSuper when the vectors are converted to MVTools2 format after SVAnalyse?

chainik_svp
14th May 2012, 12:59
Boulder
There's no difference.

bmb
super = MSuper(pel=2,hpad=0,vpad=0)
vec = super.SVAnalyse("{block:{overlap:3}}")
backward_vec1 = vec.SVConvert(isb=true)
forward_vec1 = vec.SVConvert(isb=false)
MDegrain1(super, backward_vec1,forward_vec1,thSAD=20,plane=0)
didn't test it

Boulder
5th June 2012, 04:10
I tried to test your modded Avisynth build, but avs2pipemod keeps on crashing during launch so I cannot pipe the output to 64-bit x264. Opening the script in VDub has no issues.

chainik_svp
5th June 2012, 09:15
Boulder
tried version from here (http://forum.doom9.org/showthread.php?p=1565165#post1565165), works for me (without x264): "avs2pipemod.exe -rawvideo test.avs > out"

Boulder
5th June 2012, 09:35
Hm, it's possible that I have an outdated piping client (although I have had no problems using Avisynth 2.5.8 or 2.6 earlier). I'll get the latest one and retry.

Boulotaur2024
5th June 2012, 09:47
just dropping by to say thanks to all involved in the SVP project.

my canon workflow owes a lot to it :)

what i'm doing:

- shoot at as high a framerate as i can manage (720p60), at as high a shutterspeed as i can get a good exposure on (i like to shoot wide open, so it's no problem to get 1/250 or so). also, high fps means less rolling-shutter effect than if i'd shot at my target frame rate. less jelly = better.

- depanstabilize. goes without saying if i'm not willing to give up coffee.

- SVPfps to my output framerate*samples. samples working in the same way as in a graphics package.

- temporalsoften to blend only frames that correspond to my desired shutter angle wrt the output frame rate

- selectevery(samples, 0)

i'm able to output 2400/1001 with motion blur as if it was shot that way at 180 degrees :)

the interpolation quality is such that when it fails, i don't see weird things. usually just a little ghosting.

me happy :)
Hi Mug Funky, could you please post your script ?

I currently use QTGMC for my motion blur needs but MVTools does produce weird artefacts *, I'd be curious to see how SVPflow performs in comparison

* these aren't exactly artefacts in my case but more the typical MvTools "morphing effect" between scene changes

kolak
5th June 2012, 13:11
+1 for the script :)

Boulder
5th June 2012, 18:15
Hm, it's possible that I have an outdated piping client (although I have had no problems using Avisynth 2.5.8 or 2.6 earlier). I'll get the latest one and retry.Yep, the latest version seems to work. Now some testing and if results are what I'd like them to be, I think I'm going to ask SEt if he could take a look at the modifications to put them in his 2.6 build :)

chainik_svp
5th June 2012, 20:42
The main idea is to limit each cache size (in frames), opposite to Avisynth approach when all caches uses one common "frames" pool somehow limited with SetMemoryMax value. This can easily lead to cache misses in general case BUT as far as I know that SVP's script is linear frame-by-frame only - it works.

So may be it's not a good idea to include such behavior in official Avisynth, but may be as an additional argument to SetMTMode()...

Boulder
6th June 2012, 16:43
I have some results. In a regular case with "DGSource-Downsize to 720p-MVTools based denoise", your and SEt's Avisynth build are pretty much the same what comes to speed. Your build uses something like 200-250M less memory (svp_cache_fwd=4 vs SetMemoryMax(512)).

In an "MPEG2Source-TFM-TDecimate-MVTools based denoise", SEt's build is slightly faster. The amount is small, 1-2%, and the difference would be even smaller if x264 was set to a slower preset (I used ultrafast to remove the encoding bottleneck). The difference in memory usage is the same as in the first example

However, a script with SRestore doesn't seem to work with your build as it crashes upon script loading in VDub and avs2pipemod. I'm not that surprised since it's a mean piece of work and if I'm not entirely mistaken, multithreading is a bit of a no-no although I don't remember anybody really confirming that. But doesn't the same apply to TDecimate as well?

chainik_svp
6th June 2012, 18:04
Your build uses something like 200-250M less memory (svp_cache_fwd=4 vs SetMemoryMax(512)).
720p is too easy and 250M is nothing :) I'm talking about situations when official Avisynth can't work at all. For example "canonical" MVTools-based interpolation script can easily run out of memory with 1080p and pel=2 in MSuper regardless of SetMemoryMax value.

Boulder
6th June 2012, 18:05
Hehe, that's true. I was afraid of trying to QTGMC 1080i as the tests would have a taken a veeery long time ;)

chainik_svp
6th June 2012, 18:46
4k (http://www.svp-team.com/forum/viewtopic.php?id=767) ? :D

Boulder
6th June 2012, 19:00
Yeah ----- when the day comes that I can buy a reasonably priced TV that supports the format :D

Mug Funky
7th June 2012, 06:39
for the two people interested:


function frcblur( clip c, int "num", int "den", float "angle", int "samples" )
{

num = default(num,24000)
den = default(den,1001)
samples = default(samples,7) # anything more than 11 is way overkill. internally this number is doubled by default.
angle = default(angle,0) # 0 disables motion blur. 180 is standard cine camera.
multiplier = angle==0? 1 : round( samples/(angle/360.) )
parmstring = "{rate:{num:" + string( multiplier * num ) + ",den:" + string(den) + ",abs:true},algo:21,cubic:1}}"

c

spr = svsuper("{pel:2,gpu:1}")
vec = svanalyse(spr,"""{block:{w:32,h:32},refine:[{thsad:200}]} """)
sorathread()

svsmoothfps(spr,vec,parmstring, url="www.svp-team.com")

sorathread()
angle==0? last : temporalsoften(multiplier/2 -1,255,255,255)
angle==0? last : selectevery(multiplier,0)

}


this requires sorathread, the very easy to use threading plugin. i'm running 2.6 so i don't have much MT stuff available.

here's a script example, with stabilization thrown in:
QTinput("x:\things\MVI_1402.MOV",audio=2)

assumetff()

assumetff()
converttoyv12()

sorathread()
mdata = DePanEstimate(last)
DePanStabilize(last, data=mdata,cutoff=0.333,initzoom=1.1,addzoom=true,zoommax=1.5,rotmax=10.,tzoom=3.0,pixaspect=1.0,prev=3,next=3)
sorathread()

frcblur(num=25,den=1,angle=180)



requires the latest (still old) depan+depanestimate

i'm using QTinput because of the luma levels issue with ffms2.

Reel.Deel
7th June 2012, 14:01
Thanks Mug Funky! The result looks very nice. :)

For Avisynth MT I had to add the mt=x argument to svsmoothfps.

Sorry for being a little off topic but what are the issues with FFMS2 and luma?