Da ich öfters mal DeSpot verwendet aber etwas frustriert mit der Geschwindigkeit bin, das Skript aber an sich recht übersichtlich ist, habe ich mir gedacht, dass man eventuell das was mvtools macht vielleicht auch mit SVPflow machen könnte und poteniell mehr Geschwindigkeit zu erreichen.
Hab also mal folgendes zusammen geschrieben:
Code
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# based on: https://github.com/theChaosCoder/lostfunc/blob/v1/lostfunc.py
def DeSpot(o: vs.VideoNode, gpu=False) -> vs.VideoNode:
if (gpu): # using svpflow
osup = o.svp1.Super("{gpu:1}")
vec = core.svp1.Analyse(osup["clip"],osup["data"],o,"{block: {w: 8, h: 4, overlap: 3}}")
bv1 = core.svp1.Convert(osup, vectors=vec, isb=True)
fv1 = core.svp1.Convert(osup, vectors=vec, isb=False)
bc1 = o.mv.Compensate(osup, bv1)
fc1 = o.mv.Compensate(osup, fv1)
clip = core.std.Interleave([fc1, o, bc1])
clip = clip.rgvs.Clense()
return clip.std.SelectEvery(cycle=3, offsets=1)
else: # original code
osup = o.mv.Super(pel=2, sharp=2)
bv1 = osup.mv.Analyse(isb=True, delta=1, blksize=8, overlap=4, search=4)
fv1 = osup.mv.Analyse(isb=False,delta=1, blksize=8, overlap=4, search=4)
bc1 = o.mv.Compensate(osup, bv1)
fc1 = o.mv.Compensate(osup, fv1)
clip = core.std.Interleave([fc1, o, bc1])
clip = clip.rgvs.Clense()
return clip.std.SelectEvery(cycle=3, offsets=1)
Alles anzeigen
Problem ist das Ganze funktioniert nicht, sondern bricht ab mit:
Anhand der Dokumentation und daran, dass Avisynths "SVAnalyse(..)" in Vapoursynth "svp.Analyse(...)" ist hatte ich erwartet, dass "SVConvert(...)" entsprechend "svp.Convert(..)" wäre. Dies ist leider nicht der Fall.
Frage ist jetzt: Wie muss man es richtig machen?
Cu Selur