Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
2nd June 2020, 00:08 | #341 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
The first one is I think the only one required. |
|
2nd June 2020, 00:12 | #342 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yeh, I figured it out big G [thanks], this should work
Code:
# M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = M.GScriptClip("Skip=AverageLuma"+Chr(10) \ +"("+string(Blendover)+"<=0||"+string(Blendover)+">Skip)?M:" \ +"("+string(SkipOver) +"<=0||"+string(SkipOver) +">Skip)?B:BHard", \ args="EMskip,M,B,BHard",Local=true)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd June 2020 at 00:25. |
2nd June 2020, 09:28 | #343 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Shouldn't it be M = EMskip.GScriptClip(...) ??? But also, with GRunT, it is simpler to use 'args' instead of string concatenation to get local variables into the run-time script. So I would replace it all by Code:
M = EMskip.GScriptClip(" Skip=AverageLuma (Blendover<=0 || Blendover>Skip)? M : (SkipOver)<=0 || SkipOver>Skip)? B : BHard", \ args="Blendover,SkipOver,M,B,BHard",Local=true) |
|
2nd June 2020, 14:20 | #344 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yep, that does look an awful lot better G.
The M = M.... was tacked on at the end, and I could not actually test without finding a bunch of dependencies so I just did a botch up of pretend clips. [just to test not crash] As far as the Grunt Args=Args thing instead of string concatenation is concerned, I'm gonna pass blame for that onto MysteryX
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd June 2020 at 14:22. |
2nd June 2020, 14:37 | #345 | Link | ||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
This really is a tough one...
Quote:
The streamlined Gavino version also produces exactly the same garbage. But I could get the StainlessS version working with just 1 difference: Quote:
Does this look right? |
||
2nd June 2020, 15:15 | #346 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
bug in Gavino edition, remove extra closing parenthesis around 1st SkipOver.
Code:
M = EMskip.GScriptClip(" Skip=AverageLuma (Blendover<=0 || Blendover>Skip)? M : (SkipOver)<=0 || SkipOver>Skip)? B : BHard", \ args="Blendover,SkipOver,M,B,BHard",Local=true) Gavino fixed (we hope) Code:
# M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = EMskip.GScriptClip(" Skip=EmSkip.AverageLuma (Blendover<=0 || Blendover>Skip)? M : (SkipOver<=0 || SkipOver>Skip) ? B : BHard", \ args="EMskip,Blendover,SkipOver,M,B,BHard",Local=true) Code:
# M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = EMskip.GScriptClip(" Skip=Last.AverageLuma (Blendover<=0 || Blendover>Skip)? M : (SkipOver<=0 || SkipOver>Skip) ? B : BHard", \ args="EMskip,Blendover,SkipOver,M,B,BHard",Local=true)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd June 2020 at 15:19. |
2nd June 2020, 15:53 | #347 | Link | ||
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
Quote:
|
||
2nd June 2020, 16:09 | #348 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
EDIT: yes of course. Last is set by ScriptClip by the child clip. But what is not working exactly? Last edited by pinterf; 2nd June 2020 at 16:37. |
|
2nd June 2020, 19:58 | #349 | Link | ||||||
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
Quote:
Quote:
Quote:
BUT: Quote:
Any thoughts on this regression? Quote:
Last edited by manolito; 2nd June 2020 at 20:24. |
||||||
2nd June 2020, 21:02 | #350 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
I cant make any sense out of Manolito results, they be crazy.
Test just to see which clip AverageLuma is taken from Code:
M = BlankClip(Pixel_type="YV12",Color_YUV=$208080) # $20 EMSkip = BlankClip(Pixel_type="YV12",Color_YUV=$308080) # $30 B = BlankClip(Pixel_type="YV12",Color_YUV=$408080) # $40 BHard = BlankClip(Pixel_type="YV12",Color_YUV=$508080) # $50 BlendOver = 1.0 SkipOver = 2.0 Global G_Format="%d] EMSkip=%X Last=%X Last2=%X M=%X B=%X BHard=%X" # M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = M.GScriptClip(" Skip=EmSkip.AverageLuma LastSkip=Last.AverageLuma Last2Skip=AverageLuma MSkip=M.AverageLuma BSkip=B.AverageLuma BHardSkip=BHard.AverageLuma RT_DebugF(G_Format,current_frame,Skip.Int,LastSkip.Int,Last2Skip.Int,MSkip.Int,BSkip.Int,BHardSkip.Int) (Blendover<=0 || Blendover>Skip)? M : (SkipOver<=0 || SkipOver>Skip) ? B : BHard", \ args="EMskip,Blendover,SkipOver,M,B,BHard",Local=true) M Code:
M = M.GScriptClip RT_DebugF: 0] EMSkip=30 Last=20 Last2=20 M=20 B=40 BHard=50 M = EMSkip.GScriptClip RT_DebugF: 0] EMSkip=30 Last=30 Last2=30 M=20 B=40 BHard=50 EDIT: This is same as original Manolito script but String() stuff removed and args used instead, however is NOT same logic as in ConditionalFilter() calls Code:
## Apply BlendOver and SkipOver # M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = M.GScriptClip("Skip = EMskip.AverageLuma() (SkipOver>0 && Skip>=SkipOver) ? BHard : (BlendOver>0 && Skip>=BlendOver) ? B : M", \ args = "EMskip,Blendover,SkipOver,M,B,BHard", Local=true) Well, If we knew that, we'd all be cleverer than you [and whats the chances of that]
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd June 2020 at 21:44. |
2nd June 2020, 22:57 | #351 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Well, I do not pretend to understand all this AVS runtime stuff, but I do make tests and I can interprete the results.
And my test results do make a lot of sense to me. If you have "M = EMskip.GScriptClip" then you assign a mask (EMskip is not a valid video clip, it is just a mask). And whatever you do with this mask with all the GScriptClip calls, the end result will still be a mask instead of a video clip. Using "M = M.GScriptClip" instead will apply the GScript calls to the real masked video clip M instead to just a mask. And "M" is returned as the result of MX_FPS (unless you specify otherwise). Whatever, I tested it using a short 1 minute clip using all the different methods which came up so far, and the resulting clips were all bit identical. Speed was also the same. Of course I know that a 1 minute clip does not mean much, it could be that the thresholds for SkipOver and BlendOver were not reached, but basically it seems that all the different methods are valid. |
2nd June 2020, 23:20 | #352 | Link |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Ah, does it have different properties (dimensions or colorspace) from M and the other clips?
I was assuming all the clips were similar in these respects (and StainlessS's test assumed that too). Since the clip properties of the result of ScriptClip are taken from its input, that could be the difference. |
3rd June 2020, 00:32 | #353 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Was tryin' to find "ConvertFpsLimit" dependency, and found that I did compile of non SSE2 ie C + MMX/iSSE for Mani, dont recall doing that at all [memories, like the corners of my mind ...]
C + MMX/iSSE version here:- https://forum.doom9.org/showthread.p...21#post1876121 OK, I've got full script working now. Mani's/MysteryX original Scriptclip version but removed string() stuff using args, and also removed Scriptclip internal M (using Last instead) NOTE, this is still the version that is logically different to the commented out conditionalfilter stuff. Code:
## Apply BlendOver and SkipOver # M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = M.GScriptClip("Skip = EMskip.AverageLuma() (SkipOver>0 && Skip>=SkipOver) ? BHard : (BlendOver>0 && Skip>=BlendOver) ? B : Last", \ args = "EMskip,Blendover,SkipOver,B,BHard", Local=true) Code:
## Apply BlendOver and SkipOver # M2 = SkipOver > 0 ? ConditionalFilter(EMskip, B, BHard, "AverageLuma", "<", string(SkipOver)) : B # M = BlendOver > 0 ? ConditionalFilter(EMskip, M, M2, "AverageLuma", "<", string(BlendOver)) : M M = M.GScriptClip(" Skip=EmSkip.AverageLuma (Blendover<=0 || Blendover>Skip)? Last : (SkipOver<=0 || SkipOver>Skip) ? B : BHard", \ args="EMskip,Blendover,SkipOver,B,BHard",Local=true) Previoulsy 'M' now Last marked in blue. EDIT: @ Gavino, EmSkip is (for JohnMeyer Parade clip) 32x24 pixels, so is a lot smaller than others. Is derived from Mvtools SAD and Occlusion Masks and Code:
# Create skip mask EMskip = EM.BicubicResize(Round(C.Width/BlkSize/4.0)*4, Round(C.Height/BlkSizeV/4.0)*4) \ .mt_expand(mode= mt_circle(zero=true, radius=1)) \ .mt_binarize(SkipTrh)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 3rd June 2020 at 00:57. |
3rd June 2020, 01:23 | #354 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Quote:
But MysteryX used his own ConditionalFilterMT function because he determined that the internal ConditionalFilter function was not compatible with multithreading. And unfortunately this ConditionalFilterMT function does not work on my old PC because it requires SSE2. So here my question again: (to pinterf) Is it still true for current versions of AVS+ that ConditionalFilter is not compatible with multithreading? Because if this is no longer true then I can easily ditch all this GScriptClip stuff and use ConditionalFilter instead. Would make my life much easier... |
|
3rd June 2020, 01:28 | #355 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Mani, Point out for Pinterf, where it was that MX said that [might be some clues as to reason].
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
3rd June 2020, 01:48 | #356 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
I think I posted it before, but cannot find it right now...
https://github.com/mysteryx93/FrameRateConverter Quote:
|
|
3rd June 2020, 07:12 | #357 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,314
|
Quote:
|
|
3rd June 2020, 08:37 | #358 | Link | |
Avisynth language lover
Join Date: Dec 2007
Location: Spain
Posts: 3,431
|
Quote:
That explains why using EmSkip.GscriptClip() didn't work, as the result will also be 32x24. |
|
|
|