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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 5th February 2019, 13:47   #4461  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Yep:- http://www.mediafire.com/file/r37y2m...o/SVP.zip/file
(32 bit only)

EDIT: Maybe I imagine it, but did SVP start requiring their own version of AVS+ at some point (I never really paid much attention).
__________________
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; 5th February 2019 at 13:51.
StainlessS is offline  
Old 5th February 2019, 13:53   #4462  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Sadly those files also give me:
---------------------------
SVSmoothFps: unable to init GPU-based renderer [code 0x10000]
---------------------------
I used:
Code:
LoadCPlugin("I:\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow1.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow2.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\InterFrame2.avsi")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
# loading source: F:\TestClips&Co\files\test.avi
#  input color sampling YV12
#  input luminance scale tv
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_41_1_0.ffindex",fpsnum=25)
# current resolution: 640x352
InterFrame(GPU=true,NewNum=60,NewDen=1,Cores=32)
# filtering
PreFetch(16)
return last
When using AvisynthMT with:
Code:
SetMemoryMax(768)
SetMTMode(5,16) # changing MT mode
LoadCPlugin("I:\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow1.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow2.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\InterFrame2.avsi")
# loading source: F:\TestClips&Co\files\test.avi
#  input color sampling YV12
#  input luminance scale tv
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_41_1_0.ffindex",fpsnum=25)
# current resolution: 640x352
SetMTMode(2) # changing MT mode
InterFrame(GPU=true,NewNum=60,NewDen=1,Cores=32)
distributor()
return last
everything works. (Side note: when using 'GPU=False' it works in both)
__________________
Hybrid here in the forum, homepage

Last edited by Selur; 5th February 2019 at 13:57.
Selur is offline  
Old 5th February 2019, 13:57   #4463  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
SubJunk has later version script (v2.8.2):- https://forum.doom9.org/showthread.php?t=160226

EDIT: And I've never used it much, and never with GPU=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 ???
StainlessS is offline  
Old 5th February 2019, 14:02   #4464  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Tried that one with the binaries it comes with.
Same result, GPU=True works fine with AvisynthMT, doesn't with Avisynth+.
Quote:
never with GPU=True.
That explains why it works for you.
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 5th February 2019, 14:03   #4465  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by StainlessS View Post
Is there some clip/colorspace property that denotes X and Y granularity for cropping, eg YV12 may crop on even boundaries both x and y,
and for YV411 multiple of 4 for x and 1 for y ?
Code:
vi.GetPlaneHeightSubsampling(PLANAR_U);
vi.GetPlaneWidthSubsampling(PLANAR_V);
Is that it?
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline  
Old 5th February 2019, 14:03   #4466  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by StainlessS View Post
Is there some clip/colorspace property that denotes X and Y granularity for cropping, eg YV12 may crop on even boundaries both x and y,
and for YV411 multiple of 4 for x and 1 for y ?

Or does one have to inquire eg "Is420" and deduce that has same modulo requirements as YV12.

EDIT: Or extract Y plane and U plane and calculate it manually (last resort).
No. I supposed that GetPlaneWidthSubSampling was available but is wasn't.
pinterf is offline  
Old 5th February 2019, 14:06   #4467  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Thanks Wonkey, I know how to do that in C, was wantin' script solution.
EDIT: I usually work it out manually in C, as GetPlaneWidthSubSampling() not available in v2.58 (I think).

I have this in RT_stats

Code:
RT_ColorSpaceXMod(clip)
 Return int, the natural cropping XMod for clip colorspace, eg YV411=4, YV12=2, YUY2=2, RGB=1
 v2.5 plugin dll limited to v2.58 colorspaces.

***
***
***

RT_ColorSpaceYMod(clip,bool "Laced"=true)
 Return int, the natural cropping YMod for clip colorspace, eg YV411=1, YV12=2, YUY2=1, RGB=1
 Laced, bool. Default true. If Laced==true, returns doubled YMod.
 v2.5 plugin dll limited to v2.58 colorspaces.
EDIT: Thanx Pinterf, I guess its coming
__________________
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; 5th February 2019 at 14:16.
StainlessS is offline  
Old 5th February 2019, 14:16   #4468  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by Selur View Post
Sadly those files also give me:
---------------------------
SVSmoothFps: unable to init GPU-based renderer [code 0x10000]
---------------------------
Setting the same SetMemoryMax(768) for the avs+ script helps?
pinterf is offline  
Old 5th February 2019, 14:30   #4469  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
I usually use InterFrame (seldomly) via a much larger script, and with GPU=False and cores=1, [some machines I use with same script are single core without GPU]
however, just tried
Code:
AviSource("D:\B.avi")
Interframe(GPU=True,NewNum=60000,NewDen=1001,cores=32)
works ok.
I only have quad core(Core 2 Q9550) , and crap GPU (Nvidia GT 520, my Dell Optiplex 780 limited to 6.5 inch cards, and total PSU only 300Watt, GT 520 5.5 inch, full load 29Watts).
No idea if it is actually using the GPU, or not.

EDIT: OK, we do seem to be using the GPU


EDIT: For me, CPU is about 40% faster than GPU.
EDIT: In above graphic, shows GPU load at 8.0%, also memory controller load=11.0%, both seem a bit underused for some reason.
EDIT: And CPU usage about same whether or not GPU=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; 5th February 2019 at 15:35.
StainlessS is offline  
Old 5th February 2019, 16:13   #4470  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Since we're talking about GetPlaneWidthSubsampling, it looks like there's an error on the Wiki (http://avisynth.nl/index.php/Filter_...ghtSubsampling). YV16 should be 1/1 and YV411 should be 2/0. I think there are errors in both the table and the text.

I'd create an account and fix it myself but HTTPS doesn't work (which it really should in this day and age).
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline  
Old 5th February 2019, 16:30   #4471  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Quote:
Originally Posted by wonkey_monkey View Post
Since we're talking about GetPlaneWidthSubsampling, it looks like there's an error on the Wiki (http://avisynth.nl/index.php/Filter_...ghtSubsampling). YV16 should be 1/1 and YV411 should be 2/0. I think there are errors in both the table and the text.

I'd create an account and fix it myself but HTTPS doesn't work (which it really should in this day and age).
YV16 is 1/0
pinterf is offline  
Old 5th February 2019, 16:31   #4472  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
YV16 should be 1/1
YV16 should be 1/0 [text is back to front, but table is correct, methinks]
Quote:
YV411 should be 2/0
agreed, table is wrong

EDIT:
Quote:
Text is back to front
YV16: GetPlaneWidthSubsampling(PLANAR_U) = 0 // since there is no horizontal subsampling on a chroma plane
YV16: GetPlaneHeightSubsampling(PLANAR_U) = 1 // since vertically there are two times less samples on a chroma plane compared to a plane which is not subsampled
__________________
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; 5th February 2019 at 16:42.
StainlessS is offline  
Old 5th February 2019, 17:15   #4473  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Quote:
Setting the same SetMemoryMax(768) for the avs+ script helps?
Sadly no.
Quote:
works ok.
simplifying the script to
Code:
LoadCPlugin("I:\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow1.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow2.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\InterFrame2.avsi")
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_41_1_0.ffindex",fpsnum=25)
InterFrame(GPU=True,NewNum=60,NewDen=1,Cores=32)
doesn't help. Only thing that works is switching from Avisynth+ to old AvisynthMT. First thought it to be a driver issue, but threw that assumption out once I realized that it works with 32bit Avisynth MT.
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 5th February 2019, 17:58   #4474  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,496
Quote:
Originally Posted by pinterf View Post
YV16 is 1/0
Well I blame my error on the whole stupid 4:2:2 system!
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline  
Old 5th February 2019, 18:11   #4475  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Selur View Post
Sadly no.

simplifying the script to
Code:
LoadCPlugin("I:\Hybrid\32bit\AVISYN~1\ffms2.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow1.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\svpflow2.dll")
Import("I:\Hybrid\32bit\avisynthPlugins\InterFrame2.avsi")
FFVideoSource("F:\TESTCL~1\files\test.avi",cachefile="E:\Temp\avi_078c37f69bb356e7b5fa040c71584c40_41_1_0.ffindex",fpsnum=25)
InterFrame(GPU=True,NewNum=60,NewDen=1,Cores=32)
doesn't help. Only thing that works is switching from Avisynth+ to old AvisynthMT. First thought it to be a driver issue, but threw that assumption out once I realized that it works with 32bit Avisynth MT.
I can't reproduce this problem. Can you upload the exact files you're using (ffms2.dll, svpflow*.dll, InterFrame2.avsi)?
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 5th February 2019, 18:26   #4476  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
here you go: https://drive.google.com/open?id=1w3...f5V4r8EA9goez8
using a GeForce GTX 1070 Ti with 418.81 drivers and a Amd Ryzen 7 1800X.
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 5th February 2019, 18:53   #4477  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,314
Meanwhile a question regarding "Layer". I have the YUV stuff made ready but I experienced one little problem.

Layer mode: darken and ligthen is giving different results for RGB32 and YUY2 when Threshold>0

Even classic Avisynth 2.6.0.5 is giving different results for me.

Wiki:
http://avisynth.nl/index.php/Layer

E.g.: lighten:
"Copy overlay_clip over base_clip in areas where overlay_clip is lighter by threshold. Performs the same operation as add, but only when overlay_clip is BRIGHTER than base_clip."

And the relevant code from Avisynth+

Rgb32:

Code:
      if constexpr(mode == LIGHTEN) {
        alpha = luma_ovr > thresh + luma_src ? alpha : 0;
      } else {
        alpha = luma_ovr < thresh + luma_src ? alpha : 0
      }
YUV:

Code:
      if constexpr (mode == LIGHTEN) {
        alpha_mask = (thresh + ovr) > src ? level : 0;
      }
      else {
        alpha_mask = (thresh + src) > ovr ? level : 0;
      }
The variable names are different a bit but one can see the difference. Sure, they are equivalent when thresh is 0.

Which computation covers the text definition?

Script to reproduce:
Code:
x=some source
x = x.Spline16Resize(512,256)
ovr=ColorbarsHD().Spline16Resize(x.width,x.height)
clipRgb = x.ConvertToRGB32(matrix = "PC.709").ResetMask()
ovrRgb = ovr.ConvertToRGB32(matrix = "PC.709").ResetMask()
clipYuy2 = x.ConvertToYUY2() 
ovrYuy2 = ovr.ConvertToYUY2() 

threshold=255 # 0 is O.K.
# which one works fine?
testRgb = Layer(clipRgb, ovrRgb, "lighten", level=128, Threshold=threshold)
testYuy2= Layer(clipYuy2, ovrYuy2, "lighten", level=128, Threshold=Threshold)

StackVertical(testRgb.ConvertToYV24(matrix = "PC.709"), testYUY2.ConvertToYV24())
pinterf is offline  
Old 5th February 2019, 18:58   #4478  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by Selur View Post
here you go: https://drive.google.com/open?id=1w3...f5V4r8EA9goez8
using a GeForce GTX 1070 Ti with 418.81 drivers and a Amd Ryzen 7 1800X.
Using your files I can reproduce the problem on Win7 (in a VM -> VMWare generic graphics driver). Also, it crashes with every (2.6) Avisynth version, not just AVS+.

It works fine on XP/XP64 (GTX750, 350.12 driver).
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline  
Old 5th February 2019, 19:17   #4479  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
Okay, for me it doesn't crash with Avisynth MT 2.6 (https://drive.google.com/open?id=1C0...Y7On5-_cLCaMj4), strange it crashes for all Avisynth 2.6 for you.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline  
Old 6th February 2019, 00:15   #4480  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
Which computation covers the text definition?
Quote:
"Copy overlay_clip over base_clip in areas where overlay_clip is lighter by threshold.
I would say this one.

Code:
// Rgb32:

      if constexpr(mode == LIGHTEN) {
        alpha = luma_ovr > thresh + luma_src ? alpha : 0;
      } else {
        alpha = luma_ovr < thresh + luma_src ? alpha : 0   // EDIT: Although I think this also wrong, see later.
      }
EDIT:

isn't this for YUV lighten
Code:
        alpha_mask = (thresh + ovr) > src ? level : 0;
equiv to this [if so then methinks obviously wrong]
Code:
        alpha_mask = ovr > (src - thresh) ? level : 0;
EDIT: And is this correct for darken
Quote:
Copy overlay_clip over base_clip in areas where overlay_clip is darker by threshold.
Code:
// Rgb32:

      if constexpr(mode == LIGHTEN) {
        alpha = luma_ovr > thresh + luma_src ? alpha : 0;
      } else {
        alpha = luma_ovr < thresh + luma_src ? alpha : 0

      }
Should it be
Code:
alpha = luma_ovr <  (luma_src - thresh) ? alpha : 0
EDIT: Or in full as here: (3 out of the 4 original lines look messed up to me)
Code:
//RGB:
      if constexpr(mode == LIGHTEN) {
        alpha = luma_ovr > (luma_src + thresh) ? alpha : 0;    // As original
      } else { // EDIT: DARKEN
        alpha = luma_ovr < (luma_src - thresh) ? alpha : 0
      }


//YUV:
      if constexpr (mode == LIGHTEN) {
        alpha_mask = ovr > (src + thresh) ? level : 0;
      }
      else { // EDIT: DARKEN
        alpha_mask = ovr < (src - thresh) ? level : 0;
      }
EDIT: I remember in some thread, that RaffRiff42 got some weird results from Layer, and could not figure out why, maybe this was it.
__________________
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; 6th February 2019 at 02:47.
StainlessS is offline  
Closed Thread


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 21:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.