VideoHelp Forum




+ Reply to Thread
Results 1 to 3 of 3
  1. There is an old sRestore implementation in Vapoursynth havsfunc, problem is that version doesn't work since std.Cache is gone and never did work properly.
    There is a newer sRestore implementation in muvsfunc that works properly, but is horribly slow since it force linear processing of all previous frames.

    There was a similar problem with the old Cdeblend which was fixed by mysrloik and in the issue thread he mentioned that applying a similar fix should be possible for sRestore, it would only require 'only requires python skillz' to implement this.

    I initially thought it would be enough to replace:
    Code:
       ###### evaluation call & output calculation ######
        bclpYStats = bclp.std.PlaneStats()
        dclpYStats = dclp.std.PlaneStats()
        dclipYStats = core.std.PlaneStats(dclip, dclip.std.Trim(first=2))
        last = source.std.FrameEval(eval=srestore_inside, prop_src=[bclpYStats, dclpYStats, dclipYStats])
    
        ###### final decimation ######
        return ChangeFPS(last.std.Cache(make_linear=True), source.fps_num * numr, source.fps_den * denm)
    by
    Code:
        ###### evaluation call & output calculation ######
        bclpYStats = bclp.std.PlaneStats()
        dclpYStats = dclp.std.PlaneStats()
        dclipYStats = core.std.PlaneStats(dclip, dclip.std.Trim(first=2))
        
        prop_src = []
        for i in range(preroll, 0, -1):
          prop_src.extend([bclpYStats[0] *i +  bclpYStats, dclpYStats[0]*i+dclpYStats, dclipYStats[0]*i+dclipYStats])
        prop_src.extend([bclpYStats, dclpYStats, dclipYStats])
              
        last = source.std.FrameEval(functools.partial(srestore_inside), prop_src=prop_src)
    
        ###### final decimation ######
        return ChangeFPS(last,  source.fps_num * numr, source.fps_den * denm)
    but that was not the case.

    => Does anyone here have the necessary skills to do this?

    Cu Selur
    Last edited by Selur; 22nd Feb 2025 at 00:14. Reason: link fixed
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  2. What is actually std.Cache() doing? It creates a sequence of frames before, how many frames?
    srestore needs how many past frames? I never work with DVD's (or what falls in that category, srestore, ivtc decimate etc.)

    I don't know if you remember FillDuplicateFrames, there was created a class smooth clip and was simply served out from Eval if n-th frame was in it. If smooth clip did not exist for n-th frame it was created. Something in that fashion cold be done. What is so specific for srestore that it does not work but some other filters on temporal bases do not have problems with?
    Last edited by _Al_; 21st Feb 2025 at 15:09.
    Quote Quote  
  3. What is actually std.Cache() doing? It creates a sequence of frames before, how many frames?
    see: https://amusementclub.github.io/doc3/functions/cache.html?highlight=std%20cache#std.Cache
    It should be a replacement for Avisynths RequestLinear.

    srestore needs how many past frames?
    Not sure, I would suspect that anymore than gop size would be totally useless, and in general 2*'target fps' would be my guess for a good result.

    What is so specific for srestore that it does not work but some other filters on temporal bases do not have problems with?
    Not sure.

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!