07.12.2023, 20:32
Using those settings I get:
Which is what I expected.
Source gets cropped to 1860x1020, resize does nothing since it's limited by "Limit Resize to crop resolution" and can only downscale, letterbox adds the borders back.
Cu Selur
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("F:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/EEDI3m_opencl.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DeinterlaceFilter/Bwdif/Bwdif.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
# Import scripts
import havsfunc
# source: 'G:\TestClips&Co\files\MPEG-4 H.264\00029_avc_1080p-ac3-2.mts'
# current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: top field first
# Loading G:\TestClips&Co\files\MPEG-4 H.264\00029_avc_1080p-ac3-2.mts using DGSource
clip = core.dgdecodenv.DGSource("J:/tmp/mts_c2e3ea38779670e12a8380059b94dc0a_853323747.dgi",fieldop=0)# 29.97 fps, scanorder: top field first
# Setting detected color matrix (709).
clip = core.std.SetFrameProps(clip, _Matrix=1)
# Setting color transfer info (709), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
# Setting color primaries info (), when it is not set
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 29.97
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2) # tff
original = clip
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Faster", TFF=True, opencl=True) # new fps: 59.94
# Making sure content is preceived as frame based
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# Deinterlacing using QTGMC
original = havsfunc.QTGMC(Input=original, Preset="Faster", TFF=True, opencl=True) # new fps: 59.94
# Making sure content is preceived as frame based
original = core.std.SetFrameProp(clip=original, prop="_FieldBased", intval=0) # progressive
clip = core.std.CropRel(clip=clip, left=30, right=30, top=30, bottom=30)# cropping to 1860x1020
original = core.std.CropRel(clip=original, left=30, right=30, top=30, bottom=30)# cropping to 1860x1020
# letterboxing 1860x1020 to 1920x1080
clip = core.std.AddBorders(clip=clip, left=30, right=30, top=30, bottom=30)
# letterboxing 1860x1020 to 1920x1080
original = core.std.AddBorders(clip=original, left=30, right=30, top=30, bottom=30)
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model
original = core.resize.Bicubic(clip=original, format=vs.YUV420P10, range_s="limited")
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
original = core.text.Text(clip=original,text="Original",scale=2,alignment=7)
clip = core.text.Text(clip=clip,text="Filtered",scale=2,alignment=7)
stacked = core.std.StackHorizontal([original,clip])
# set output frame rate to 59.94fps (progressive)
stacked = core.std.AssumeFPS(clip=stacked, fpsnum=60000, fpsden=1001)
# Output
stacked.set_output()
Which is what I expected.
Source gets cropped to 1860x1020, resize does nothing since it's limited by "Limit Resize to crop resolution" and can only downscale, letterbox adds the borders back.
Cu Selur