Selur's Little Message Board

Full Version: DFM DeRainbow & Motion Compensation cause crash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm not sure where the DFM DeRainblow script that Hybrid uses comes from. It's not the one on AviSynth.nl because it adds use_Flux5framesT and mc options.

use_Flux5framesT works and improves the result.

I'd like to try out Motion Compensation (mc), but the mc=true parameter causes Hybrid to crash with Script error: There is no function named 'MSuper'

MSuper is part of mvtools2.dll which Hybrid isn't loading, so I tried a custom filter which loads it:

Code:
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\MSharpen.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\FluxSmooth.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\neo-minideen.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\MedianBlur2.dll")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\SMDegrain.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\DFMDeRainbow.avsi")
ConvertToYV24(interlaced=false, matrix="Rec709")
DFMDeRainbow(maskthresh=5,interlaced=false,mc=true)

Now, it just crashes with no error message.

I included a log, not sure if this is something you can figure out and make work! Blush

[attachment=1038]
I'll look into it, probably easy to fix. Smile
I updated my post. I was reporting an error that was actually caused by me not including some dlls and scripts in the custom filter. (In other words, user error.)

So now the problem is that the error is "unknown error" in the debug file. Maybe not as easy now? Tongue
Script comes from: https://github.com/realfinder/AVS-Stuff

Using:
Code:
ClearAutoloadDirs()
LoadCPlugin("I:\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\MSharpen.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\FluxSmooth.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\neo-minideen.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
Import("I:\Hybrid\32bit\avisynthPlugins\DFMDeRainbow.avsi")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading source: F:\TestClips&Co\files\test.avi
#  input color sampling YV12@8, matrix:Rec.709, scantyp: progressive
#  input luminance scale tv
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_853323747_1_0.ffindex",fpsnum=25,colorspace="YV12")
# current resolution: 640x352
# filtering
# chroma denoising using DFM-DeRainbow
DFMDeRainbow(interlaced=false,mc=true)
# adjusting bit depth current 8 to target 10
# convert to 10bit for encoder
ConvertBits(10)
PreFetch(8)
return last
I get an access violation in mvtools2.
works when using mvtools from:
https://github.com/pinterf/mvtools/relea...0200602.7z
-> I'll adjust Hybrid to load mvtools2 and use that mvtools2 verison.
Will send you a link in ~ 1/2 hour or so.

Cu Selur
I missed the RgTools.dll.

If I add it, and also ffms2.dll, I don't get any message in Hybrid, not even "unknown error." The previewer crashes.


Custom filter:

Code:
LoadCPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\masktools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\MSharpen.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\RgTools.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\mvtools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\FluxSmooth.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\neo-minideen.dll")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\DFMDeRainbow.avsi")
ConvertToYV24(interlaced=false, matrix="Rec709")
DFMDeRainbow(maskthresh=5,interlaced=false,mc=true)


Full script:

Code:
ClearAutoloadDirs()
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ImageSeq.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\SplineResize.dll")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading source: E:/USER/fin/VincentTheo/wip/Part1_GaiaHQ/%06d.png
#  input color sampling RGB32@8, matrix:Rec.709, scantyp: progressive
#  input luminance scale tv
ImageReader(file="E:\USER\fin\VINCEN~1\wip\PART1_~1\%06d.png", start=0, end=76414, fps=23.976, use_DeviL=true, pixel_type="RGB24")
# current resolution: 1440x1152
# cropping
Crop(22,4,-20,-4)# 1398x1144
# scaling to 1440x1080
Spline144Resize(1440,1080)

# CUSTOM SCRIPT PART - position: DeRainbow - START
function CustomDeRainbow(clip clp) {
  last=clp
  LoadCPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\ffms2.dll")
  LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\masktools2.dll")
  LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\MSharpen.dll")
  LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\RgTools.dll")
  LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\mvtools2.dll")
  LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\FluxSmooth.dll")
  LoadPlugin("C:\PROGRA~1\Hybrid\32bit\AVISYN~1\neo-minideen.dll")
  Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\Zs_RF_Shared.avsi")
  Import("C:\Program Files\Hybrid\32bit\avisynthPlugins\DFMDeRainbow.avsi")
  ConvertToYV24(interlaced=false, matrix="Rec709")
  DFMDeRainbow(maskthresh=5,interlaced=false,mc=true)
}
# CUSTOM SCRIPT PART - position: DeRainbow - END

CustomDeRainbow() # loading custom script content
# adjust color to YV12
ConvertToYV12(matrix="Rec709")
PreFetch(4)
return last


Preview crash:

Code:
Faulting application name: avsViewer.exe, version: 0.0.0.0, time stamp: 0x5f568b76
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x22f2f148
Faulting process id: 0x1b44
Faulting application start time: 0x01d6909f7aa3b600
Faulting application path: C:\Program Files\Hybrid\32bit\avsViewer.exe
Faulting module path: unknown
Report Id: b9017810-fc92-11ea-a978-0050560b8935


Log:

[attachment=1039]



OK, I didn't expect you to be posting at the same time as me, sorry for the cross-talk.  Wink
send you a link to a dev version which comes with the newer mvtools2.dll and load it when mc=true.

Cu Selur
Works!

But, there is a new problem. Blush

With the 9.16 dev build, Hybrid would set "interlaced=true" for DFM DeRainbow, if the source was interlaced, or if you positioned DFM DeRainbow before the deinterlacer.

With the 9.22 dev build, Hybrid now instead of setting "interlaced=true", does this:

Code:
# chroma denoising using DFM-DeRainbow
# deinterlace since the filter does not support interlaced content
AssumeTFF().TDeint(mode=1)
DFMDeRainbow(maskthresh=5,interlaced=false,mc=true,use_Flux5framesT=true)
AssumeTFF().Separatefields().Selectevery(4,0,3).Weave()


Also, again, the Hybrid window has shrunk. I find I'm having to use the horizontal scroll bar a lot. Not sure if this is the best size. Undecided

Edit - Looking at the Wiki, it seems this is actually correct... interlaced=true should not be used.

Quote:False means the input clip is progressive; with true it's interlaced. Interlaced content is processed by using SeparateFields in the beginning and Weave at the end.
Note: this parameter was added as an after-thought, it's not technically correct so use with caution and only as a last resort.
Whether Hybrid:
a. separates into fields, filter the fields and then weaves afterwards
or
b. deinterlaces, filters and reinterlaces
depends on the settings used under Filtering->Avisynth->Misc->Interlaced Handling.

I switched Hybrid to assumes DFMDeRainbow only supports progressive input, which is why it always used interlaced=false atm.
(iirc there was some issue with DFMDeRainbow causing artifacts in some tests why I decided to do this)

---
Quote:I find I'm having to use the horizontal scroll bar a lot.
Not so much here,...
Windows shrinking and enlarging in the dev builds happens since I'm rearranging stuff and doing some testing. Smile



Cu Selur