WolframRhodium / muvsfunc

Muonium's VapourSynth functions
75 stars 19 forks source link

SSIM_downsample: If already Float, why reconvert? #38

Closed xurich-xulaco closed 2 years ago

xurich-xulaco commented 2 years ago

Attempts to fix a skipable mvf.Depth call on SSIM_downsample function

WolframRhodium commented 2 years ago

The function will enter the skip path in this case, and no VS function call will be made.

This can be verified through

import io
import logging

import vapoursynth as vs
import muvs
from muvs import core

import mvsfunc as mvf
muvs.pollute(mvf)

with io.StringIO() as f:
    with muvs.record(f):
        src = core.std.BlankClip(format=vs.GRAYS)
        flt = mvf.Depth(src, depth=32)
    logging.info(f.getvalue())

which prints

# output: 640 x 480, GrayS, 240 frames, 24/1 fps
clip0 = core.std.BlankClip(format=vs.PresetFormat.GRAYS)