scharfis_brain
5th May 2004, 08:12
whenever I use the arguements bob & weave of smartdecimate within a user defined function, AVISynth will return an acess violation or an AVISynth Stack overflow.
If I call smartdecimate using the bob & weave arguments without building a user defined function around it, everything is nice.
I am currently playing with a function like this:
function killblends(clip i)
{ # define the vars
par=i.getparity()
ord= par ? 1 : 0
# fullframerate deinterlace
i.dgbob(order=ord)
# kill blended frames
deblended=last.deblend()
# add 25 frames of blackness to give smartdeciamte some time to get a pattern
added=loop(blankclip(deblended)).trim(0,50)+deblended
# pre-grab the stream for the final output
alreadybobbed=added.subtitle("bob")
alreadyweaved=added.subtitle("weave")
# reinterlace the stream for smartdecimate
# (it doesn't seem to handle progressive video properly)
separated=added.separatefields()
par ? separated.selectevery(4,1,2) : separated.selectevery(4,0,3)
weave()
par ? assumetff() : assumebff()
# apply smartdecimate
# this works
# last.smartdecimate(24,50) #,bob=alreadybobbed,weave=alreadyweaved)
# this not! but I really need the arguments bob & weave
last.smartdecimate(24,50,bob=alreadybobbed,weave=alreadyweaved)
# trim out the previously added blackness
trim(25,0)
}
If I cut out the pure sequence out of the function and directly paste them after loadding the Video, it runs like it should.
used AVISYnth 2.55 & 2.54
used smartdecimate 0.23
used input source: 768x576 @ 25fps YUY2
If I call smartdecimate using the bob & weave arguments without building a user defined function around it, everything is nice.
I am currently playing with a function like this:
function killblends(clip i)
{ # define the vars
par=i.getparity()
ord= par ? 1 : 0
# fullframerate deinterlace
i.dgbob(order=ord)
# kill blended frames
deblended=last.deblend()
# add 25 frames of blackness to give smartdeciamte some time to get a pattern
added=loop(blankclip(deblended)).trim(0,50)+deblended
# pre-grab the stream for the final output
alreadybobbed=added.subtitle("bob")
alreadyweaved=added.subtitle("weave")
# reinterlace the stream for smartdecimate
# (it doesn't seem to handle progressive video properly)
separated=added.separatefields()
par ? separated.selectevery(4,1,2) : separated.selectevery(4,0,3)
weave()
par ? assumetff() : assumebff()
# apply smartdecimate
# this works
# last.smartdecimate(24,50) #,bob=alreadybobbed,weave=alreadyweaved)
# this not! but I really need the arguments bob & weave
last.smartdecimate(24,50,bob=alreadybobbed,weave=alreadyweaved)
# trim out the previously added blackness
trim(25,0)
}
If I cut out the pure sequence out of the function and directly paste them after loadding the Video, it runs like it should.
used AVISYnth 2.55 & 2.54
used smartdecimate 0.23
used input source: 768x576 @ 25fps YUY2