This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] Shrink Clip without aliasing
#6
Quote:more sample points used, the more accurate the resampling.
so 144 should be more accurate

Quote:Bug? Was für ein Bug?
fmtconv resizer werden nicht benutzt Smile

for easy comparision:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libimwri.dll")
# source: 'C:/Users/Selur/Desktop/orville.png'
# current color space: RGB24, bit depth: 8, resolution: 1920x1080, fps: 25, color matrix: 709, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Selur\Desktop\orville.png using vsImageReader
clip = core.imwri.Read(["C:/Users/Selur/Desktop/orville.png"])
clip = core.std.Loop(clip=clip, times=100)
# Input color space is assumed to be RGB24
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0)
# Resizing using 10 - bicubic spline
resized=[];
resizers = ["point", "linear", "cubic", "lanczos", "blackman", "blackmanminlobe", "spline", "spline36", "spline64"]
for i in range(len(resizers)):
  ckernel = resizers[i];
  tmp = core.fmtc.resample(clip=clip, kernel=str(ckernel), w=1280, h=720, interlaced=False, interlacedd=False) # resolution 1280x720
  tmp = core.text.Text(tmp,text=str(ckernel))
  resized.append(tmp)

tmp = core.fmtc.resample(clip=clip, kernel="spline", taps=6, w=1280, h=720, interlaced=False, interlacedd=False) # resolution 1280x720
tmp = core.text.Text(tmp,text="spline144")
resized.append(tmp)

clip = core.std.Interleave(clips=resized)

# Output
clip.set_output()
(adjust paths, open script in vsViewer)
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
Shrink Clip without aliasing - by karthauzi - 05.12.2022, 11:41
RE: Shrink Clip without aliasing - by Selur - 05.12.2022, 11:52
RE: Shrink Clip without aliasing - by Selur - 05.12.2022, 12:33
RE: Shrink Clip without aliasing - by Selur - 05.12.2022, 12:46
RE: Shrink Clip without aliasing - by Selur - 05.12.2022, 13:28

Forum Jump:


Users browsing this thread: 1 Guest(s)