HomeOfVapourSynthEvolution / havsfunc

Holy's ported AviSynth functions for VapourSynth
The Unlicense
112 stars 38 forks source link

sRestore giving different results than in Avisynth. #78

Closed Selur closed 3 months ago

Selur commented 2 years ago

Over at [url=https://forum.videohelp.com/threads/407209-Strange-fields-frames-in-analog-capture]videohelp there is a thread[/url] where Avisynth can be nicely used to remove some ghosting using

AssumeTFF()
QTGMC(Preset="Fast", ediThreads=2)
# removing ghosting
srestore(omode=6)
Preroll(Int(last.FrameRate()))

trying to reproduce this with Vapoursynth it using:

# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True) # new fps: 50
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting frame count and rate with sRestore
clip = havsfunc.srestore(source=clip,omode=6)

havsfuncs sRestore doesn't remove the ghosting the same way the Avisynth version does. see: https://forum.doom9.org/showthread.php?p=1976139

Is there a bug in the port or am I missing something?

Selur commented 1 year ago

Another example where Vapoursynth sRestore returns worth results than the Avisynth version: https://forum.doom9.org/showthread.php?p=1986173

Selur commented 1 year ago

seems like the issue is that std.Cache doesn't work with API 4, would be nice if srestore could be adjusted to use std.VideoCache (assuming that can replace the std.Cache call)