View Full Version : MVTools-pfmod
Pages :
1
2
3
[
4]
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
ajp_anton
27th December 2016, 00:07
I don't know if this is the right topic, but since you're releasing the DePan plugins in the same package, I'll ask here...
I'm using MDepan and DePanEstimate to stabilize a video, however it puts random scene changes during a vertical pan that makes for a really jerky clip. I've tried to set every threshold through the roof to really make sure to disable all possible scene changes (the clips I'm stabilizing don't have any scene changes), I've increased the maximum corrections and played with dampening, but nothing helps. They always happen on the same frames.
MDepan's info=true doesn't seem to indicate a scene change, so I guess it happens in DePanEstimate.
Is there any other setting I could try? I can post (send via PM) a short video tomorrow if that helps.
real.finder
27th December 2016, 07:32
depanestimate (or depan) parameters have been changed? coz scene change detection looks broken to me
I don't know if this is the right topic, but since you're releasing the DePan plugins in the same package, I'll ask here...
I'm using MDepan and DePanEstimate to stabilize a video, however it puts random scene changes during a vertical pan that makes for a really jerky clip. I've tried to set every threshold through the roof to really make sure to disable all possible scene changes (the clips I'm stabilizing don't have any scene changes), I've increased the maximum corrections and played with dampening, but nothing helps. They always happen on the same frames.
MDepan's info=true doesn't seem to indicate a scene change, so I guess it happens in DePanEstimate.
Is there any other setting I could try? I can post (send via PM) a short video tomorrow if that helps.
I think this is because the original depan, from original site (http://web.archive.org/web/20161210165507/http://avisynth.org.ru/depan/depan.html)
DePan Version 1.12, January 31, 2016 - stabilize second frame after scenechange, other small fixes.
DePan Version 1.13, February 18, 2016 - Experimental method=2 (unlimited stabilize) and method=-1 (tracking) of DepanStabilize.
DePanEstimate v1.10, February 22, 2016 - DePanEstimate: added wleft, wtop, removed improve. Fixed doc about default values range, stab (thanks HolyWu).
DePan Version 1.13.1, April 6, 2016 - Fixed old bug (chroma tint) for subpixel=2 without rotation and zoom (Depan, DepanStabilize).
and here is the .dll of them http://rgho.st/private/7QWLfLWz8/d8466a216c2dd8feeb7dd6cec4d01b9d
ajp_anton
27th December 2016, 14:44
Thank you, those old versions work. Too bad they don't have x64 binaries or support 16-bit video, but for now my project is saved.
real.finder
27th December 2016, 15:20
Thank you, those old versions work. Too bad they don't have x64 binaries or support 16-bit video, but for now my project is saved.
it's better to upload sample so pinterf will fix the bug
pinterf
27th December 2016, 16:54
Yes, upload a sample please, I have put in some safety because my sample went chaotic and stabilization caused finally access viola (too big resulting shift) maybe I have put too much in.
ajp_anton
28th December 2016, 00:04
Found another less personal clip that I can post here publicly.
http://ajpanton.se/avsbug/source.mkv (~4.2 MB)
Script:
ffms2("source.mkv")
vectors = msuper().manalyse(isb = false)
mdata = mdepan(vectors, zoom=true, rot=true)
depanstabilize(data=mdata, dxmax=100, dymax=100, rotmax=2.0, mirror=15)
Frame 62 is always detected as scene change in the new version, old version works fine.
There's another problem though, that might be related to Avisynth itself. I'll post that in the Avs+ thread, and I don't know if these issues are related.
pinterf
28th December 2016, 12:54
You are right. The safety check I have issued on the motion data, was too strict.
tormento
5th January 2017, 10:24
@pinterf
Before having optimized 4 and 5 frame, I used 6 when grain was really horrible. Is it feasible to have it too?
pinterf
5th January 2017, 12:05
No problem, I have included 4 and 5 only for curiousity when I had moved 1-3 into a common codebase, extenting it to 6 is not much work. But why, is MDegrainN that much different?
tormento
5th January 2017, 15:00
No problem, I have included 4 and 5 only for curiousity when I had moved 1-3 into a common codebase, extenting it to 6 is not much work. But why, is MDegrainN that much different?
Tried with SMDegrain script. Worst results than with 5.
Just for my information, how is MDegrainN different from native 4 or 5 one?
pinterf
16th January 2017, 16:51
New build.
MvTools2 2.7.11.22 + Depan + DepanEstimate (https://github.com/pinterf/mvtools/releases/tag/2.7.11.22)
MvTools2 2.7.11.22 (20170116)
New: MDegrain6
Mod: MDegrain1-6 SSE4 for 10-16 bit (was: C. 3-5% gain, wasn't bottleneck)
MvTools2 2.7.10.22 (20161228)
fix: YV12 debug info display wrong text placement on chroma planes
(also depans)
This pack has fix for DepanStabilize: removed too sctrict checking for large motion vectors received from depan (false scene change detection)
tormento
17th January 2017, 11:03
new: Mdegrain6
thank you!!!
FranceBB
17th January 2017, 19:15
Thank you!! (Especially for supporting XP! ;) )
pinterf
20th January 2017, 11:16
New build
MvTools2 2.7.12.22 with Depan and DepanEstimate (https://github.com/pinterf/mvtools/releases/tag/2.7.12.22)
MvTools2 2.7.12.22 (20170120)
New: Faster SATD (dct=5..10) 8 bit: updated x264 function selectors, SSE2/4/AVX/AVX2
+10% speed for a whole typical MDegrain3 process on my i7-3770
New: Much faster SATD (dct=5..10) 10-16 bit: SSE2/SSE4 instead of C
+50% speed for a whole typical MDegrain3 process (which is approx half speed of 8 bit)
yup
23rd January 2017, 10:42
pinterf!
:thanks:
I confirm speed up 10% QTGMC script with dct=5.
yup.
DJATOM
31st January 2017, 17:14
Hi, pinterf!
Guess I found a bug. Look at this comparisons
http://diff.pics/sozv19EkovWc/1
http://diff.pics/SjvcumOUdmgo/1
Example script below
LWLibavVideoSource(source="E:\12.mkv").ConvertFromDoubleWidth(bits=10).ConvertBits(16,true)
sup = msuper()
fa = manalyse(sup,isb=false,delta=1,overlap=4,truemotion=false)
fb = manalyse(sup,isb=true,delta=1,overlap=4,truemotion=false)
mdegrain1(sup,fb,fa,thsad=64,thsadc=96)
#ConvertBits(16,true) # ConvertToStacked requires 16 bit
ConvertToStacked()
Those glitches usually appears while some details moving and on the scenecuts.
Also my comrade complained about slightly different colours after Mdeg1 if lsb=true. But It happens not on every source...
I can ask for reproducing example with source if needed.
pinterf
31st January 2017, 17:26
Hi, pinterf!
Guess I found a bug. Look at this comparisons
http://diff.pics/sozv19EkovWc/1
http://diff.pics/SjvcumOUdmgo/1
Example script below
Those glitches usually appears while some details moving and on the scenecuts.
Also my comrade complained about slightly different colours after Mdeg1 if lsb=true. But It happens not on every source...
I can ask for reproducing example with source if needed.
For different colors: as I remember, for lsb=true there is no rounding after summing up the blocks.
(btw: ConvertBits(16) is enough, no need for ",true")
edit:
How did you generate those PNG's? Running the script and viewing the output with ConvertBits(10), ConvertBits(12), ConvertBits(14) and ConvertBits(16) at the beginning?
DJATOM
31st January 2017, 17:46
For different colors: as I remember, for lsb=true there is no rounding after summing up the blocks.
(btw: ConvertBits(16) is enough, no need for ",true")
edit:
How did you generate those PNG's? Running the script and viewing the output with ConvertBits(10), ConvertBits(12), ConvertBits(14) and ConvertBits(16) at the beginning?
Running in Avspmod and previewing the output while changing ConvertBits() params at the beginning.
pinterf
31st January 2017, 17:54
Ok, could you upload a plus minus 5 frames sample around the problematic frame? Thanks
DJATOM
31st January 2017, 18:09
Sent.
kgrabs
1st February 2017, 10:20
It seems like 16 bit output is nerfed for me with block size 4. It just looks like the lsb is a green copy of the msb.
Image: blksize=4 (https://my.mixtape.moe/zvqhlx.png)
Image: blksize=8 (https://my.mixtape.moe/tiujny.png)
It seems to start at version 2.7.7.22, and I'm not really sure what to make of it. It's the 32 bit version btw
pinterf
1st February 2017, 12:22
New build:
MvTools2 2.7.13.22 with depans (https://github.com/pinterf/mvtools/releases/tag/2.7.13.22)
2.7.13.22 (20170201)
Fix: MDegrain1-6,N 10-16 bit thSCD scaling
Fix: MVShow: tolerance scaling for 10-16 bits
Thanks for DJATOM for the report. I hope, this addresses your problems.
DJATOM
1st February 2017, 14:46
New build:
MvTools2 2.7.13.22 with depans (https://github.com/pinterf/mvtools/releases/tag/2.7.13.22)
2.7.13.22 (20170201)
Fix: MDegrain1-6,N 10-16 bit thSCD scaling
Fix: MVShow: tolerance scaling for 10-16 bits
Thanks for DJATOM for the report. I hope, this addresses your problems.
Yes, It seems you did well. At least no glitches on the video. I'll do "production" encode later and compare it with the source.
edcrfv94
4th February 2017, 17:38
I update 2.7.13.22 from 2.7.0.22d, then AvsPmod show up a Error Window.
super = last.MSuper( levels=1, pel=1, sharp=0)
forward_vectors = MAnalyse(super, blksize=4, levels=1, search=3, searchparam=5, isb=true)
last.MFlow(super,forward_vectors)
AvsPmod Error Window
Traceback (most recent call last):
File "avsp.pyo", line 10451, in OnSliderChanged
File "avsp.pyo", line 13917, in SetVideoStatusText
File "avsp.pyo", line 14066, in GetVideoInfoDict
File "avsp.pyo", line 17256, in FormatTime
TypeError: %d format: a number is required, not float
Also MCaWarpSharp3 "MFlow(super2,forward_vectors)" will make the AvsPmod crash,
###
###
### MCaWarpSharp3()
### :fix halo, chroma bleeding & blurry edges (Sharpener/line enhacer)
###
### (24-11-2011)
###
### By z. ndmn.(zee944) with Did嶪 guidance.
### Optimized by Dogway
### http://forum.doom9.org/showthread.php?t=159248
###
### line enhacer: define (sharpen) blurry edges, or remove ringing.
###
### dependencies: MVTools2, masktools, aWarpSharp[20090619]
###
###
### supsamp [default: 4]
### -------------------
### Interpolation strength. Recommended 4 for
### encoding, 2 for testing. 1 disables it [1...4]
###
###
### post [default: 4]
### -------------------
### Post processing of the sharpened areas for better blending/integration [1...4]
### 1 = no post
### 2 = a little blurring on the sharp new edges...
### 3 = ...or sharpening everywhere else to make the image consistent.
### 4 = or a mix of both
###
###
### PPstr [default: 1.0]
### -------------------
### Strength of the postprocessing
###
###
### fast [default: true]
### -------------------
### Independent to supsamp, this can give a small speed boost to the function.
###
###
### w,h [default: input size]
### -------------------
### Target resize. Internally a clip super sampling is performed. Due to the function being naturally
### slow, if you had plans to resize afterwards it would be a good idea to do it now in this step.
###
###
### Usage:
###
### MCaWarpSharp3(4,4)
###
###
########################################################################
function MCaWarpSharp3(clip source, int "supsamp",int "post", float "PPstr", bool "fast", int "w", int "h"){
w1=source.width()
h1=source.height()
supsamp = default(supsamp, 4) # supsamp=2 recommended for testing, supsamp=4 for encoding.
post = default(post, 4) # mix the warpsharped edges with original footage thru blur and sharpen post processing
str = default(PPstr,1.0) # post processing strength of whatever option you chose
fast = default(fast,true) # enables fast mode, which gives some boost.
w = default(w,w1) # I exposed the size parameters because internally a resize is performed, \
h = default(h,h1) # so if you had a plan on resizing, this is a good chance to do.
# if no supersampling (supsamp=1) -> (thresh=255,blur=3,type=1,depth=8,chroma=4)
# if 4x supersampling (supsamp=4) -> (thresh=192,blur=36,type=1,depth=96,chroma=4)
var=32*pow(supsamp,-2)
w1=w1*supsamp
h1=h1*supsamp
source
sourceSup=LanczosResize(w1,h1,taps=fast?3:4)
WarpedEdges=sourceSup.aWarpSharp2(
\ thresh = int(pow(supsamp,-0.207)*255),
\ blur = 3* int(pow(supsamp,1.7925)),
\ type = 1,depth=8*int(pow(supsamp,1.7925)),chroma=4)
# Getting back to the original shapes with motion compensation to have good and undeformed edges, although still cartoonish look
Interleave(sourceSup,WarpedEdges)
blurredclip=GaussResize(w1*2,h1*2,p=var).GaussResize(w1,h1,p=var)
super = MSuper (blurredclip, levels=1, pel=fast?1:2, sharp=fast?0:2)
super2 = MSuper ( levels=1, pel=fast?1:2, sharp=fast?0:2)
forward_vectors = MAnalyse(super, blksize=4, levels=1, search=3, searchparam=5, isb=true)
MFlow(super2,forward_vectors)
SelectEvery(2,0)
LanczosResize(w,h,taps=fast?3:4)
# Replacing 'bad' edges with 'good' edges on the original image
source = post==1 && (Defined(w) || Defined(h)) ? source.LanczosResize(w,h,taps=fast?3:4) : source
edgemask = source.mt_edge("min/max",U=-128,V=-128).blur(1.0)
Assert ((post >= 1 && post <= 4 ) ? true : false, chr(10) + "'post' have not a correct value! [1,2,3,4]" + chr(10))
post = (post==1) ? mt_merge(source,last,edgemask,luma=true)
\ : (post==2) ? mt_merge(Blur(min(str*0.5,1.58)),edgemask,luma=true)
\ : (post==3) ? mt_merge(LSFmod(defaults=fast?"fast":"slow",strength=int(str*20),edgemode=0,soothe=true,ss_x=1.0,ss_y=1.0),last,edgemask,luma=true)
\ : (post==4) ? mt_merge(LSFmod(defaults=fast?"fast":"slow",strength=int(str*20),edgemode=0,soothe=true,ss_x=1.0,ss_y=1.0),Blur(min(str*0.5,1.58)),edgemask,luma=true)
\ : blankclip(source, width=width, height=120).SubTitle("post = " + string(post),text_color=$FFFFFF,font="COURIER NEW",size=12,x=320,y=90)
return post}
pinterf
4th February 2017, 18:29
Is it only MFlow that is problematic for you?
Which Avisynth version are you using?
Does the problem occur when you directly encode e.g. for x264, or run the script with AvsMeter?
edcrfv94
4th February 2017, 19:42
Is it only MFlow that is problematic for you?
Which Avisynth version are you using?
Does the problem occur when you directly encode e.g. for x264, or run the script with AvsMeter?
AVSMeter248:
colorbars(width = 1920, height = 1080, pixel_type = "yv12").killaudio().assumefps(25, 1)
MCaWarpSharp3()
Avisynth 2.6.0 ST 32-bit
AviSynth 2.60, build:Mar 32 2015 [16:38:54] (2.6.0.6)
Exceotion 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\Program Files (x86)\AviSynth+\plugins\mvtools2.dll
Address: 0x60CF8248
avsplus-r1858-pfmod 32bit
AviSynth+ 0.1 (r1858, MT-pfmod, i386) (0.1.0.0)
Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\Program Files (x86)\AviSynth+\plugins+\mvtools2.dll
Address: 0x5E8B8248
avsplus-r1858-pfmod 64bit
AviSynth+ 0.1 (r1858, MT-pfmod, x86_64) (0.1.0.0)
Exception 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\Program Files (x86)\AviSynth+\plugins64+\mvtools2.dll
Address: 0x000007FEE4196547
If only MFlow.
AvsPmod64 avsplus-r1858-pfmod 64bit error.
AVSMeter248 no error.
colorbars(width = 1920, height = 1080, pixel_type = "yv12").killaudio().assumefps(25, 1)
super = last.MSuper( levels=1, pel=1, sharp=0)
forward_vectors = MAnalyse(super, blksize=4, levels=1, search=3, searchparam=5, isb=true)
last.MFlow(super,forward_vectors)
Groucho2004
4th February 2017, 19:48
Exceotion 0xC0000005 [STATUS_ACCESS_VIOLATION]
Module: C:\Program Files (x86)\AviSynth+\plugins64+\mvtools2.dll
Address: 0x000007FEE4196547
I'm just curious how you got that typo in there. Did you type the error message?
edcrfv94
4th February 2017, 19:58
I'm just curious how you got that typo in there. Did you type the error message?
Ye, because I can not find the log file.
"AVSMeter.exe" "test.avs" -log
Groucho2004
4th February 2017, 20:01
Ye, because I can not find the log file.Should be in the same directory as the script unless you specified a different directory in the INI file.
pinterf
4th February 2017, 20:16
Could not reproduce. First I thought that it is a VS2015 redistributable problem?
AvsMeter -avsinfo can tell it (or avsmeter64)
One note: plugins64+ is for avs+ only filters (basically that ship with avisynth+), plugins64 is for the generic 64 bit filters.
And as a second note, you could refresh your avisynth+ version, there were huge changes since 1858, now we are at v2420, check https://github.com/pinterf/AviSynthPlus/releases
real.finder
5th February 2017, 01:45
colorbars(width = 1920, height = 1080, pixel_type = "yv12").killaudio().assumefps(25, 1)
MCaWarpSharp3()
with 2015.02.20 avs mt by SEt I can reproduce
Traceback (most recent call last):
File "avsp.pyo", line 9061, in OnMenuVideoToggle
File "avsp.pyo", line 13855, in ShowVideoFrame
File "avisynth.pyo", line 462, in GetFrame
WindowsError: exception: access violation reading 0x12F85000
but this work fine
colorbars(width = 1920, height = 1080, pixel_type = "yv12").killaudio().assumefps(25, 1)
super = last.MSuper( levels=1, pel=1, sharp=0)
forward_vectors = MAnalyse(super, blksize=4, levels=1, search=3, searchparam=5, isb=true)
last.MFlow(super,forward_vectors)
pinterf
5th February 2017, 16:26
Thanks, reproduced. Now it's my turn.
Edit:
I've got it.
Occurs when vectors are resized with a big ratio, e.g. 4x size.
The bug is also present in the original 2.5.11.22.
If no problem was experienced, it was only pure luck.
Memory access happens beyond the allocated memory area of vectors.
Fix in progress.
Reel.Deel
5th February 2017, 18:10
I think I found another bug? Don't know if it's related to the problem above but with the following script I get:
Avisynth read error:
MVTools: vector clip is too small (corrupted?)
Tested with the latest 32/64-bit AVS+, MVTools, and VirtualDubFilterMod. Here's the sample clip: https://www.dropbox.com/s/a51vkbw4vklz3d1/Sample_SD.avi?dl=1
The script is a broken down YFRC (http://avisynth.nl/index.php/YFRC). IIRC this script use to work correctly with v2.6.0.5.
FFVideoSource("Sample_SD.avi") #720x480, 18FPS
clp_Super = MSuper(last.blur(1), chroma=true, pel=2)
fps_num = FrameRateNumerator(last)*2
fps_den = FrameRateDenominator(last)
bw1_vec116 = clp_Super.MAnalyse(blksize=16, blksizeV=16, isb=true , chroma=false, search=1, searchparam=1, truemotion=true, lambda=2000, global=true, dct=0, divide=2)
fw1_vec116 = clp_Super.MAnalyse(blksize=16, blksizeV=16, isb=false, chroma=false, search=1, searchparam=1, truemotion=true, lambda=2000, global=true, dct=0, divide=2)
FPSconverted16 = last.MFlowFps(last.MSuper(levels=1), bw1_vec116, fw1_vec116, num=fps_num, den=fps_den, blend=false, mask=0)
FPSconverted16
pinterf
5th February 2017, 18:44
I think I found another bug? Don't know if it's related to the problem above but with the following script I get:
IIRC this script use to work correctly with v2.6.0.5.
[/CODE]
Tried all variants, 2.6.0.5 reports this error too. But it seems that the 2.5 versions are silent.
edit:
silent, because an internal return value is not checked for anything
Present (2.6/2.7 line)
const int hs_i32 = header_size / sizeof(int);
pMv += hs_i32; // go to data - v1.8.1
data_size -= hs_i32;
const bool ok_flag = FakeGroupOfPlanes::Update(pMv, data_size); // fixed a bug with lost frames
if (! ok_flag)
{
env->ThrowError("MVTools: vector clip is too small (corrupted?)");
}
2.5.11.22:
pMv += _headerSize/sizeof(int); // go to data - v1.8.1
// FakeGroupOfPlanes::Update(reinterpret_cast<const int*>(fn->GetReadPtr()));// fixed a bug with lost frames
FakeGroupOfPlanes::Update(pMv);// fixed a bug with lost frames
pinterf
6th February 2017, 16:57
New build:
MvTools2 2.7.14.22 (20170206) with depans (https://github.com/pinterf/mvtools/releases/tag/2.7.14.22)
Fix: MAnalyze divide=2 showed "vector clip is too small", inherited from 2.6.0.5, sanity check was done but length to check was not filled for divideextra data
Fix: MFlow access violation in internal mv resizer when resizing factor was big (MCaWarpSharp3 4x supersampling case), bug introduced in upstream 2.5.11.22
Thanks for edcrfv94 and Reel.Deel for the reports.
edcrfv94
6th February 2017, 22:58
AvsPmod 64bit There is an error message, but can still be used no crash.
Traceback (most recent call last):
File "avsp.pyo", line 11690, in OnFocusVideoWindow
File "avsp.pyo", line 13917, in SetVideoStatusText
File "avsp.pyo", line 14066, in GetVideoInfoDict
File "avsp.pyo", line 17256, in FormatTime
TypeError: %d format: a number is required, not float
Thank
Reel.Deel
7th February 2017, 14:33
New build:
MvTools2 2.7.14.22 (20170206) with depans (https://github.com/pinterf/mvtools/releases/tag/2.7.14.22)
[LIST]
Thanks for the quick fix!
Selur
11th February 2017, 19:41
@pinterf: using 'MvTools2 2.7.14.22 (20170206)' on a Xeon E5640 I get:
Couldn't import -1 (1): le to load "C:\PROGRA~1\Hybrid\AVISYN~1\mvtools2.dll", error=0xc1 (using 32bit Avisynth MT 2.6)
Works fine on my i7-4770k system (both Win10 pro 64bit).
-> some assembler error?
script I used:
SetMemoryMax(768)
SetMTMode(2,16) # change MT mode
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\LoadDll.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\AddGrainC.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\dfttest.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\EEDI2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\eedi3.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\FFT3DFilter.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\mt_masktools-26.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\mvtools2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\nnedi.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\nnedi2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\SSE2Tools.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\TDeint.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\VerticalCleanerSSE2.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\nnedi3.dll")
LoadPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\RgTools.dll")
LoadCPlugin("C:\PROGRA~1\Hybrid\AVISYN~1\yadif.dll")
LoadDll("C:\PROGRA~1\Hybrid\AVISYN~1\fftw3.dll")
LoadDll("C:\PROGRA~1\Hybrid\AVISYN~1\LIBFFT~1.DLL")
Import("C:\Program Files\Hybrid\avisynthPlugins\QTGMC.avsi")
Import("C:\Program Files\Hybrid\avisynthPlugins\SMDegrain v.3.1.2d.avsi")
# input luminance scale tv
MPEG2Source(d2v="mpg_5cb0dee9abb9613ab109ab931493183c_28745.d2v")
# deinterlacing
AssumeBFF()
QTGMC(Preset="Fast", ediThreads=2)
SelectEven()
# filtering
return last
DJATOM
11th February 2017, 20:12
0xc1
I suppose your server has outdated vs2015 runtime or it does not installed at all. Please check that first.
Groucho2004
11th February 2017, 21:51
Couldn't import -1 (1): le to load "C:\PROGRA~1\Hybrid\AVISYN~1\mvtools2.dll", error=0xc1Probably what DJATOM suspects, you can also try to check with Dependency Walker and/or AVSMeter ("-avsinfo").
Selur
11th February 2017, 22:44
@Groucho2004: 'AVSMeter -avsinfo' only reports:
AVSMeter 2.4.9 (x86) - Copyright (c) 2012-2017, Groucho2004
VersionString: AviSynth 2.60, build:Feb 20 2015 [03:16:45]
VersionNumber: 2.60
File version: 2.6.0.5
Interface Version: 6
Multi-threading support: Yes
Linker/compiler version: 12.0
Avisynth.dll location: C:\Program Files\Hybrid\avisynthPlugins\avisynth.dll
Avisynth.dll time stamp: 2015-02-20, 00:18:42 (UTC)
but I'm probably missing vs2015 runtime
Selur
11th February 2017, 22:52
-> Thanks that worked. :) (adding dlls from latest 2015 runteim)
StainlessS
12th February 2017, 23:02
Current MvTool problem.
Function Test(clip c, float "bblur", float "csharp",Bool "ShowBlur") {
bblur=default(bblur, 0.6) csharp = default(csharp, 0.6) ShowBlur=Default(ShowBlur,False)
bs=16 hpad=bs vpad=bs
c2=c.blur(bblur)
softsup = c2.MSuper(hpad=hpad,vpad=vpad)
sharpsup= c.sharpen(csharp).MSuper(hpad=hpad,vpad=vpad,levels=1)
bv = MAnalyse(softsup,isb=true ,delta=1,blksize=BS,overlap=BS/2)
fv = MAnalyse(softsup,isb=false,delta=1,blksize=BS,overlap=BS/2)
BlurC=(ShowBlur)?c2.BlankClip(color=$FF0000):c2
BlurC.MDegrain1(sharpsup, bv,fv,thSAD=400)
return(last)
}
FN="F:\V\Cabaret.avi"
AviSource(FN)
return Test(ShowBlur=True)
Above intent to show areas in Bright Red where bv and fv do not coincide.
Exhibiting similar problems to those displayed earlier in thread for MFlowFPS/MBlockFPS, here:- https://forum.doom9.org/showthread.php?p=1785795#post1785795
And result here (Displaying red line down RHS and Bottom border):
https://s20.postimg.cc/5xle3li7x/Red_zpsakt6koqv.png (https://postimg.cc/image/fuwewnptl/)
EDIT: Hpad and VPad set to 0, make no difference.
pinterf
12th February 2017, 23:21
Is clip width and height divisible by 16?
StainlessS
12th February 2017, 23:28
Well, em, no!
Added this
FN="F:\V\Cabaret.avi"
AviSource(FN)
W=Width/16*16
H=Height/16*16
Crop(0,0,W,h)
return Test(ShowBlur=True)
Problem gone.
Guess I should have checked before squealing. (busy doing something when it bit me, so threw together quick test).
EDIT: Still, twould be nice if it did not do that.
StainlessS
14th February 2017, 11:45
Hi Pinterf,
It probably dont matter too much but you are using [EDIT: code from] old version Info.h, was refactored by IanB a few years back.
Old version was very slow (also suffered from a couple of bugs, one for RGB [which is not implemented in MVTools] and
one where characters above 127 were not printed correctly [out of array bounds, did not check if this is the case with your implementation]). [EDIT: + print out of frame crashing bug.]
Here link to IanB refactor:- http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/core/info.h?revision=1.7&view=markup
And thread that prompted refactor:- https://forum.doom9.org/showthread.php?t=156888&highlight=DDigit
EDIT: And here a companion to refactored Info.h, InfoF.h
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
// ------------------------------------------------------------------
// @ http://forum.doom9.org/showthread.php?t=156888
// ------------------------------------------------------------------
// InfoF.h, by StainlessS @ Doom9.org, 1st June 2011.
//
// A companion to Info.h, provides formatted printing via embedded control codes.
// For use with the April 17 2011 (and above) edition of Info.h by IanB.
// Obtainable here (look for 'Info.h'):-
//
// http://avisynth2.cvs.sourceforge.net/viewvc/avisynth2/avisynth/src/core/
//
// ------------------------------------------------------------------
// Formatting control codes:-
// '\n', Newline, positioning cursor 1 line down and at left edge of screen.
// '\r', Newline Special, moves 1 line down and positions cursor at on-entry X position.
// '\b', Backspace, obvious, not sure how useful this will be.
// '\f', Forward Space, again obvious, re-uses formfeed code for this. Again, maybe not so useful.
// '\t', Tab, @ character positions, every 4 characters.(relative screen LHS).
// ------------------------------------------------------------------
// SJ, 3 June 2011, minor mod, reduced pointer swaps by using se in outer loop.
// ------------------------------------------------------------------
void __stdcall DrawFStringPlanar(PVideoFrame &dst,int x,int y,const char *s,bool pix = true)
{ // Draw formatted string at pixel or character coords, pix == false = character coords
if(pix == false) {x *= 10; y *= 20;} // To Chars
int in_x = x; // REM x for '\r'
const unsigned char *se=(unsigned char*)s; // unsigned
while(*se) { // while, some to do
int n;
for(s=(char*)se; n = *se, n>=' ' && n <= 223; ++se); // Find end+1 of printable
int len = (char*)se - s; // Len of printable
if (len) { // Some to print
DrawStringPlanar(dst,x,y,s,len); // do the biz
x += len * 10; // update x coord
} else { // Ctrl code OR nonsense;
if(n == '\n') {
x = 0; y+=20; // Newline, down 1, LHS
} else if (n == '\r') {
x = in_x; y +=20; // Newline Special, Down 1, orig x coord
} else if(n == '\b') {
x -= 10; // Backward Space
} else if (n == '\f') {
x += 10; // Forward Space
} else if (n == '\t') {
x+= ((4*10)-(x%(4*10))); // H-Tab (step 4)
}
++se; // skip ctrl code (and unknowns, outer loop detects nul sentinel)
}
}
}
void __stdcall DrawFStrPlanar(PVideoFrame &dst,int x,int y,const char *s)
{ // Formatted Print @ character coords
DrawFStringPlanar(dst,x,y,s,false);
}
void __stdcall DrawFStringYUY2(PVideoFrame &dst,int x,int y,const char *s,bool pix = true)
{ // Draw formatted string at pixel or character coords, pix == false = character coords
if(pix == false) {x *= 10; y *= 20;} // To Chars
int in_x = x; // REM x for '\r'
const unsigned char *se=(unsigned char*)s; // unsigned
while(*se) { // while, some to do
int n;
for(s=(char*)se; n = *se, n>=' ' && n <= 223; ++se); // Find end+1 of printable
int len = (char*)se - s; // Len of printable
if (len) { // Some to print
DrawStringYUY2(dst,x,y,s,len); // do the biz
x += len * 10; // update x coord
} else { // Ctrl code OR nonsense;
if(n == '\n') {
x = 0; y+=20; // Newline, down 1, LHS
} else if (n == '\r') {
x = in_x; y +=20; // Newline Special, Down 1, orig x coord
} else if(n == '\b') {
x -= 10; // Backward Space
} else if (n == '\f') {
x += 10; // Forward Space
} else if (n == '\t') {
x+= ((4*10)-(x%(4*10))); // H-Tab (step 4)
}
++se; // skip ctrl code (and unknowns, outer loop detects nul sentinel)
}
}
}
void __stdcall DrawFStrYUY2(PVideoFrame &dst,int x,int y,const char *s)
{ // Formatted Print @ character coords
DrawFStringYUY2(dst,x,y,s,false);
}
void __stdcall DrawFStringRGB32(PVideoFrame &dst,int x,int y,const char *s,bool pix = true)
{ // Draw formatted string at pixel or character coords, pix == false = character coords
if(pix == false) {x *= 10; y *= 20;} // To Chars
int in_x = x; // REM x for '\r'
const unsigned char *se=(unsigned char*)s; // unsigned
while(*se) { // while, some to do
int n;
for(s=(char*)se; n = *se, n>=' ' && n <= 223; ++se); // Find end+1 of printable
int len = (char*)se - s; // Len of printable
if (len) { // Some to print
DrawStringRGB32(dst,x,y,s,len); // do the biz
x += len * 10; // update x coord
} else { // Ctrl code OR nonsense;
if(n == '\n') {
x = 0; y+=20; // Newline, down 1, LHS
} else if (n == '\r') {
x = in_x; y +=20; // Newline Special, Down 1, orig x coord
} else if(n == '\b') {
x -= 10; // Backward Space
} else if (n == '\f') {
x += 10; // Forward Space
} else if (n == '\t') {
x+= ((4*10)-(x%(4*10))); // H-Tab (step 4)
}
++se; // skip ctrl code (and unknowns, outer loop detects nul sentinel)
}
}
}
void __stdcall DrawFStrRGB32(PVideoFrame &dst,int x,int y,const char *s)
{ // Formatted Print @ character coords
DrawFStringRGB32(dst,x,y,s,false);
}
void __stdcall DrawFStringRGB24(PVideoFrame &dst,int x,int y,const char *s,bool pix = true)
{ // Draw formatted string at pixel or character coords, pix == false = character coords
if(pix == false) {x *= 10; y *= 20;} // To Chars
int in_x = x; // REM x for '\r'
const unsigned char *se=(unsigned char*)s; // unsigned
while(*se) { // while, some to do
int n;
for(s=(char*)se; n = *se, n>=' ' && n <= 223; ++se); // Find end+1 of printable
int len = (char*)se - s; // Len of printable
if (len) { // Some to print
DrawStringRGB24(dst,x,y,s,len); // do the biz
x += len * 10; // update x coord
} else { // Ctrl code OR nonsense;
if(n == '\n') {
x = 0; y+=20; // Newline, down 1, LHS
} else if (n == '\r') {
x = in_x; y +=20; // Newline Special, Down 1, orig x coord
} else if(n == '\b') {
x -= 10; // Backward Space
} else if (n == '\f') {
x += 10; // Forward Space
} else if (n == '\t') {
x+= ((4*10)-(x%(4*10))); // H-Tab (step 4)
}
++se; // skip ctrl code (and unknowns, outer loop detects nul sentinel)
}
}
}
void __stdcall DrawFStrRGB24(PVideoFrame &dst,int x,int y,const char *s)
{ // Formatted Print @ character coords
DrawFStringRGB24(dst,x,y,s,false);
}
EDIT: Above could probably do with a guard to prevent multiple #include's.
CPP Snippet client for formatted print, from this thread:- https://forum.doom9.org/showthread.php?t=163082
void __stdcall INTERNALNAME::DrawFStr(PVideoFrame &dst,int x,int y,const char *format, ...)
{
// This member function added in v0.2, adds BOTH string and screen/layout formatting,
// eg '%f' for string and '\n' for screen/layout.
// Firstly, string formatting, into the buffer implemented in the class instance, formatted_buf[FMT_BUFSZ].
va_list args;
va_start(args, format);
_vsnprintf(formatted_buf,FMT_BUFSZ-1, format, args);
va_end(args);
// The above allows you to use this member function in the same way as eg printf("test=%d",i) ie DrawFStr(dst,x,y,"test=%d",i)
// The DrawFStrXXX fn's are implemented in the InfoF.h file and provide screen/layout formatting, eg '\'n and '\t'.
// As string formatting has already been done above (eg floats etc turned to character strings), and the below
// DrawFStrXXX functions provide screen/layout formatting, so full formatting is achieved on the video frame.
//
// Formatting control codes (as provided by InfoF.h):-
// '\n', Newline, positioning cursor 1 line down and at left edge of screen.
// '\r', Newline Special, moves 1 line down and positions cursor at on-entry X position.
// '\b', Backspace, obvious, not sure how useful this will be.
// '\f', Forward Space, again obvious, re-uses formfeed code for this. Again, maybe not so useful.
// '\t', Tab, @ character positions, every 4 characters.(relative screen LHS).
//
if(vi.IsPlanar()) DrawFStrPlanar(dst,x,y,formatted_buf);
else if(vi.IsYUY2()) DrawFStrYUY2(dst,x,y,formatted_buf);
else if(vi.IsRGB32()) DrawFStrRGB32(dst,x,y,formatted_buf);
else if(vi.IsRGB24()) DrawFStrRGB24(dst,x,y,formatted_buf);
}
EDIT: Looks to me like your implementation of Info.h also has old bug where printing off bottom of frame will result in crash (if small frame).
Also looks like it suffers from the characters above 127 not printing properly bug (signed char to int, -ve font array index).
fix internally in draw character funcs (will correct any errors with -ve index by client caller)
// Client caller
int num = s[si]; // or *s;
num -= ' '; // Conv font ix, eg chr(137) [Copyright] could be -ve if s is pointer to signed char.
// draw func
num &= 0xFF; // Ensure +ve char (Fix EXT ASCII bug), assumes twos compliment arithmetic (possible problem if compiled on non PC m/c).
if(num >= 192)
num = 0; // SPACE index (invalid character index, was out of font array)
pinterf
15th February 2017, 07:43
Thanks, I'll check it. All I did with debug display was to make it work for high bit depth. And perhaps writing not only on Y. If I remember correctly.
StainlessS
17th February 2017, 01:46
Hi Pinterf,
Excuse a dumb question, but do you have any recommendation as to which MMask (or whatever) to use to measure 'Goodness' of produced
vectors ? I've started a script to test and log results by throwing all variations of args at MSuper/MAnalyse, and for delta 1 to 3 (maybe more).
Just wanted to see if I could find good general settings by measurement. figured I'de find some good measure at some point but not sure that
I can, so I'm currently stuck not knowing what direction to take.
I thought maybe occlusion mask might be a start but we wild mask frames on black frame sequence, so seems not.
Is there any way of combining masks to estimate goodness of vectors, via AverageLuma or whatever, any response would be appreciated.
feisty2
17th February 2017, 05:24
SAD mask (kind=1)
StainlessS
17th February 2017, 05:37
Thanks Feisty, you are a sweetie :)
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.