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.

Yadifmod de-interlacer doesn't work
#6
Quote:Have no issues to process this video using just 2 lines with AvsPmod and VirtualDub2, regardless input filter (FFmpegSource2(), LSMASHVideoSource(), LWLibavVideoSource()) :
Sadly, that does not help at all, since thaos two lines are no where near the script Hybrid uses.

Using:
# Imports
import os
import sys
import vapoursynth as vs
core = vs.get_core()
# Import scripts folder
scriptPath = 'I:/Hybrid/64bit/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/DeinterlaceFilter/Yadifmod/Yadifmod.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import havsfunc
# source: 'C:\Users\Selur\Desktop\hotel._10bit.mov'
# current color space: YUV422P10, bit depth: 10, resolution: 720x486, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: bottom field first
# Loading C:\Users\Selur\Desktop\hotel._10bit.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/hotel._10bit.mov", format="YUV422P10", cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 29.97
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# deinterlacing using YadifMod
clip = core.yadifmod.Yadifmod(clip=clip, edeint=core.znedi3.nnedi3(clip=clip,field=2), order=0, mode=1) # new fps: 59.94
# adjusting frame count and rate with sRestore
clip = havsfunc.srestore(source=clip, frate=23.976, omode=6, speed=9, thresh=16, mode=2)
# adjusting output color from: YUV422P10 to YUV420P8 for x264Model (i420@10)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# set output frame rate to 23.976fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
Vapoursynth Preview works fine here.
Vapoursynth Filter Preview works fine here too.

Using:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\LSMASHSource.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\yadifmod2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\nnedi3.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\TIVTC.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\Average.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\GRunT.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\MedianBlur2.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
Import("I:\Hybrid\32bit\avisynthPlugins\Srestore.avsi")
# loading source: C:\Users\Selur\Desktop\hotel._10bit.mov
#  color sampling YUY2@10, matrix: bt601, scantyp: bottom field first, luminance scale: limited
LWLibavVideoSource("C:\Users\Selur\Desktop\HOTEL_~1.MOV",cache=false,format="YUV422P16", prefer_hw=0)
# current resolution: 720x486
# deinterlacing
Yadifmod2(order=-1,mode=1,edeint=nnedi3(field=-2))
# removing ghosting
srestore(frate=23.976,omode=6)
# filtering
# Dithering from 16 to 8bit for encoder
ConvertBits(8)
# adjust color to YV12 (color matrix: Rec601)
ConvertToYV12()
# setting output fps to 23.976fps
AssumeFPS(24000,1001)
#  output: color sampling YV16@8, matrix: bt601, scantyp: progressive, luminance scale: limited
return last
Avisynth Preview works fine.
Avisynth Filter Preview works fine too.

Comparing the Avisynth scripts used for the filter preview:
From your debug output:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\LSMASHSource.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\yadifmod2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\nnedi3.dll")
# loading source: D:\Hybrid_test\Gill\hotel_10bit.mov
#  color sampling YUY2@10, matrix: bt601, scantyp: bottom field first, luminance scale: limited
Source = LWLibavVideoSource("D:\HYBRID~1\Gill\HOTEL_~1.MOV",cache=false,format="YUV422P16", prefer_hw=0)
# current resolution: 720x486
# deinterlacing
SourceFiltered = Source
Source = Source.Yadifmod2(order=-1,mode=1,edeint=Source.nnedi3(field=-2))
SourceFiltered = SourceFiltered.Yadifmod2(order=-1,mode=1,edeint=SourceFiltered.nnedi3(field=-2))
# filtering
# stacking horizontal for filter preview
# adjust color to RGB32 (for preview)
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec601")
# adjust color to RGB32 (for preview)
Source = Source.ConvertToRGB32(matrix="Rec601")
StackHorizontal(Source, SourceFiltered)
PreFetch(2)
# setting output fps to 59.940fps
AssumeFPS(60000,1001)
#  output: color sampling RGB32@16, matrix: bt601, scantyp: progressive, luminance scale: limited
return last
on my system:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("I:\INNOIN~1\32bit\AVISYN~1\LSMASHSource.dll")
LoadPlugin("I:\INNOIN~1\32bit\AVISYN~1\yadifmod2.dll")
LoadPlugin("I:\INNOIN~1\32bit\AVISYN~1\nnedi3.dll")
# loading source: C:\Users\Selur\Desktop\hotel._10bit.mov
#  color sampling YUY2@10, matrix: bt601, scantyp: bottom field first, luminance scale: limited
Source = LWLibavVideoSource("C:\Users\Selur\Desktop\HOTEL_~1.MOV",cache=false,format="YUV422P16", prefer_hw=0)
# current resolution: 720x486
# deinterlacing
SourceFiltered = Source
Source = Source.Yadifmod2(order=-1,mode=1,edeint=Source.nnedi3(field=-2))
SourceFiltered = SourceFiltered.Yadifmod2(order=-1,mode=1,edeint=SourceFiltered.nnedi3(field=-2))
# filtering
# stacking horizontal for filter preview
# adjust color to RGB32 (for preview)
SourceFiltered = SourceFiltered.ConvertToRGB32(matrix="Rec601")
# adjust color to RGB32 (for preview)
Source = Source.ConvertToRGB32(matrix="Rec601")
StackHorizontal(Source, SourceFiltered)
PreFetch(8)
# setting output fps to 59.940fps
AssumeFPS(60000,1001)
#  output: color sampling RGB32@16, matrix: bt601, scantyp: progressive, luminance scale: limited
return last
I see no real difference, so this seems to be somehow related to your setup.

Cu Selur

Ps.: You can try replacing the used dlls with older/different versions:
nnedi3: https://github.com/jpsdr/NNEDI3/releases
yadifmod2: https://github.com/Asd-g/yadifmod2/releases
may be some assembly optimizations are triggered which get triggered with your cpu, but not mine.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
Yadifmod de-interlacer doesn't work - by serg - 01.02.2021, 19:27
RE: Yadifmod de-interlacer doesn't work - by Selur - 02.02.2021, 05:49

Forum Jump:


Users browsing this thread: 2 Guest(s)