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.

"Custom" filters dont work properly
#3
(29.01.2021, 06:20)Selur Wrote: Looking at the cdeblend debug output the used script for the preview is:
ClearAutoloadDirs()
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
LoadPlugin("C:\PROGRA~1\Hybrid\64bit\Avisynth\AVISYN~1\LoadDll.dll")
LoadDLL("C:\Program Files\Hybrid\64bit\Avisynth\avisynthPlugins\libfftw3f-3.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\64bit\Avisynth\AVISYN~1\LSMASHSource.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\64bit\Avisynth\AVISYN~1\TIVTC.dll")
# loading source: D:\Hybrid_test\Gill\face_10bit.mov
#  color sampling YUY2@10, matrix: bt601, scantyp: telecine, luminance scale: limited
Source = LWLibavVideoSource("D:\HYBRID~1\Gill\FACE_1~1.MOV",cache=false,format="YUV422P16", prefer_hw=0)
# current resolution: 720x486
# deinterlacing
SourceFiltered = Source
Source = Source.TFM(mChroma=true)
Source = Source.TDecimate(cycleR=1,cycle=5,noblend=true,nt=0,blockx=32,blocky=32,chroma=true,denoise=false,ssd=false,display=false)
Source = Source.AssumeFrameBased()
SourceFiltered = SourceFiltered.TFM(mChroma=true)
SourceFiltered = SourceFiltered.TDecimate(cycleR=1,cycle=5,noblend=true,nt=0,blockx=32,blocky=32,chroma=true,denoise=false,ssd=false,display=false)
SourceFiltered = SourceFiltered.AssumeFrameBased()

# CUSTOM SCRIPT PART - position: Restore - START
function CustomRestore(clip clp) {
  last=clp
  LoadPlugin("C:\AVSplugins\64bit\mvtools2.dll")
  LoadPlugin("C:\AVSplugins\64bit\masktools2.dll")
  Import("C:\AVSplugins\cdeblend.avs")
  cdeblend()
  return last
}
# CUSTOM SCRIPT PART - position: Restore - END

SourceFiltered = SourceFiltered.CustomRestore() # loading custom script content

#  color sampling YV16@16, matrix: bt601, scantyp: progressive, luminance scale: limited
# 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 23.976fps
AssumeFPS(24000,1001)
#  output: color sampling RGB32@16, matrix: bt601, scantyp: progressive, luminance scale: limited
return last
and looking at the documentation of C-deblend ('Now superseded by Srestore.') I see that it requires YV12, so you need to:
a. convert to YV12, haven't tested whether you might even have to convert to 8bit for c-blend to work
b. let Hybrid know you did so
Instead of:
  LoadPlugin("C:\AVSplugins\64bit\mvtools2.dll")
  LoadPlugin("C:\AVSplugins\64bit\masktools2.dll")
  Import("C:\AVSplugins\cdeblend.avs")
  cdeblend()

LoadPlugin("C:\AVSplugins\64bit\mvtools2.dll")
LoadPlugin("C:\AVSplugins\64bit\masktools2.dll")
Import("C:\AVSplugins\cdeblend.avs")
ConvertToYV12()
cdeblend()
# colorformat YV12
(added 'ConvertToYV12()' and '# colorformat YV12' to the custom section)
Same with DeStripe, it also requires YV12 so save adjustments to the custom code have to be made.

The scripts you used in AvsPmod worked probably since the source probably then was already YV12. Wink

-> Custom section does seem to work properly, problem seemed to be is that the user made a mistake. Doesn't seem like I need to change any of the code in Hybrid.

Cu Selur
ConvertToYV12() as per your siggestion
Doesn't make any difference for cdeblend() - still no effect. And what about DeStripe()?
Reply


Messages In This Thread
"Custom" filters dont work properly - by serg - 29.01.2021, 03:50
RE: "Custom" filters dont work properly - by serg - 29.01.2021, 07:14

Forum Jump:


Users browsing this thread: 1 Guest(s)