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 Usage
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th January 2019, 03:02   #1  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Run 32-bit DLLs in 64-bit AviSnyth

I use this code:
Code:
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\MP_Pipeline-0.18\x64\MP_Pipeline.dll")
MP_Pipeline("""
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\Plugins\AVS\GRunT\GRunT.dll")
Import("J:\StaxRip-x64-2.0.0.0\Apps\Srestore.avsi")
QTGMC(Preset = "Medium", FPSDivisor=2)
Srestore(frate=23.976)
### prefetch: 16, 0
### ###
""")
But it says MP_Pipeline is unable to create slave process because GRunT.dll is 32-bit. I thought MP_Pipline allows 32-bit DLL in 64-bit AviSynth.
Vitality is offline   Reply With Quote
Old 12th January 2019, 03:28   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
You can run QTGMC , srestore natively in 64bit with grunt x64 . But I don't think srestore is safe to run MT

MP_Pipeline adds a lot of overhead , very slow .
poisondeathray is offline   Reply With Quote
Old 12th January 2019, 10:33   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Quote:
But I don't think srestore is safe to run MT
Yep, tis my understanding that it requires linear access to stay in-sync.
__________________
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   Reply With Quote
Old 12th January 2019, 14:55   #4  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by Vitality View Post
I use this code:
Code:
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\MP_Pipeline-0.18\x64\MP_Pipeline.dll")
MP_Pipeline("""
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\Plugins\AVS\GRunT\GRunT.dll")
Import("J:\StaxRip-x64-2.0.0.0\Apps\Srestore.avsi")
QTGMC(Preset = "Medium", FPSDivisor=2)
Srestore(frate=23.976)
### prefetch: 16, 0
### ###
""")
But it says MP_Pipeline is unable to create slave process because GRunT.dll is 32-bit. I thought MP_Pipline allows 32-bit DLL in 64-bit AviSynth.
Well, you have to use it correctly. Try this:
Code:
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\MP_Pipeline-0.18\x64\MP_Pipeline.dll")
MP_Pipeline("""
### platform: win32
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\Plugins\AVS\GRunT\GRunT.dll")
Import("J:\StaxRip-x64-2.0.0.0\Apps\Srestore.avsi")
QTGMC(Preset = "Medium", FPSDivisor=2)
Srestore(frate=23.976)
### prefetch: 16, 0
### ###
""")
Quote:
Originally Posted by poisondeathray View Post
MP_Pipeline adds a lot of overhead , very slow .
No idea what you're talking about. Correct use of it speeds things up by allowing you to run different CPU intensive things in different independent thread pools.
Stereodude is offline   Reply With Quote
Old 12th January 2019, 16:23   #5  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by Stereodude View Post
Well, you have to use it correctly. Try this:
Code:
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\MP_Pipeline-0.18\x64\MP_Pipeline.dll")
MP_Pipeline("""
### platform: win32
LoadPlugin("J:\StaxRip-x64-2.0.0.0\Apps\Plugins\AVS\GRunT\GRunT.dll")
Import("J:\StaxRip-x64-2.0.0.0\Apps\Srestore.avsi")
QTGMC(Preset = "Medium", FPSDivisor=2)
Srestore(frate=23.976)
### prefetch: 16, 0
### ###
""")
It says QTGMC is not a function, but when called outside MP it works.
https://pastebin.com/raw/yavC5T8a

Last edited by Vitality; 12th January 2019 at 16:36.
Vitality is offline   Reply With Quote
Old 12th January 2019, 16:34   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Does your QTGMC use 64 bit plugs ?, does it work in only 32 bit mode (load script calling QTGMC only into Vdub 32 bit).
__________________
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; 12th January 2019 at 16:36.
StainlessS is offline   Reply With Quote
Old 12th January 2019, 16:37   #7  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Stereodude View Post
No idea what you're talking about. Correct use of it speeds things up by allowing you to run different CPU intensive things in different independent thread pools.
It's faster to run natively at x64 entirely, than to use mp_pipeline to insert some x86 components . Lots of overhead with mp_pipeline . It's a last resort
poisondeathray is offline   Reply With Quote
Old 12th January 2019, 16:37   #8  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by StainlessS View Post
Does your QTGMC use 64 bit plugs ?, does it work in only 32 bit mode (load QTGMC only, script into Vdub 32 bit).
FWIW, I found it quite challenging to get QTGMC to run under 64-bit AVIsynth many years ago. I've pretty much only use it under 32-bit ever since as a result. I guess things are different now.
Stereodude is offline   Reply With Quote
Old 12th January 2019, 16:40   #9  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by StainlessS View Post
Does your QTGMC use 64 bit plugs ?, does it work in only 32 bit mode (load script calling QTGMC only into Vdub 32 bit).
I'll try 32-bit VB
Vitality is offline   Reply With Quote
Old 12th January 2019, 16:42   #10  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
QTGMC does work under avs+ x64 MT , you need the updated version with updated pinterf plugins for mvtools , masktools

But - srestore is problematic to run in MT mode under any conditions . Many people get mixed up frames. Those that claim they don't probably didn't look closely
poisondeathray is offline   Reply With Quote
Old 12th January 2019, 16:44   #11  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Vitality is offline   Reply With Quote
Old 12th January 2019, 16:45   #12  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by poisondeathray View Post
It's faster to run natively at x64 entirely, than to use mp_pipeline to insert some x86 components . Lots of overhead with mp_pipeline
What overhead are you talking about? Not to mention we don't have x64 versions of every plugin.

Code:
LoadPlugin("C:\HDTV Tools\MP_Pipeline\x86\MP_Pipeline.dll")
MP_Pipeline("""
### platform: win64
LoadPlugin("C:\HDTV Tools\DGDecNV\DGDecodeNV.dll")
DGSource("TIM_p_1.2_BD.dgi")
trim(0,4999)
### prefetch: 20, 10
### ###
""")
Results:
Frames processed: 5000 (0 - 4999)
FPS (min | max | average): 137.9 | 570.2 | 482.6
Memory usage (phys | virt): 26 | 13 MiB
Thread count: 20
CPU usage (average): 1%

Time (elapsed): 00:00:10.360
Code:
LoadPlugin("C:\HDTV Tools\MP_Pipeline\x64\MP_Pipeline.dll")
MP_Pipeline("""
### platform: win64
LoadPlugin("C:\HDTV Tools\DGDecNV\DGDecodeNV.dll")
DGSource("TIM_p_1.2_BD.dgi")
trim(0,4999)
### prefetch: 20, 10
### ###
""")
Results:
Frames processed: 5000 (0 - 4999)
FPS (min | max | average): 189.0 | 589.9 | 484.8
Memory usage (phys | virt): 20 | 8 MiB
Thread count: 20
CPU usage (average): 1%

Time (elapsed): 00:00:10.314
Code:
LoadPlugin("C:\HDTV Tools\DGDecNV\DGDecodeNV.dll")
DGSource("TIM_p_1.2_BD.dgi")
trim(0,4999)
Results:
Frames processed: 5000 (0 - 4999)
FPS (min | max | average): 154.1 | 635.2 | 481.1
Memory usage (phys | virt): 210 | 556 MiB
Thread count: 27
CPU usage (average): 5%

Time (elapsed): 00:00:10.393
Stereodude is offline   Reply With Quote
Old 12th January 2019, 16:50   #13  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Stereodude View Post
What overhead are you talking about? Not to mention we don't have x64 versions of every plugin.
The overhead of inserting additional filters, not source filters.

That's entirely my point - we don't have x64 versions of everything, so you use it as a last resort. You don't use this for fun because it adds overhead and is slower

Repeat the test with some typical scripts that have both x64 and x86 filters .

QTGMC and Srestore are available in x64 natively. So there is no reason to run in x86 for some parts
poisondeathray is offline   Reply With Quote
Old 12th January 2019, 16:57   #14  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by poisondeathray View Post
That's entirely my point - we don't have x64 versions of everything, so you use it as a last resort. You don't use this for fun because it adds overhead and is slower
You keep asserting it adds overhead. Please define "overhead".

And what do you mean by slower? I've just easily demonstrated it's not slower to use MP_Pipeline than not using it for the same script. There's no throughput loss in MP_Pipeline or in it piping from x86 to x64 filter chains. Are you trying to say that x86 versions of plugins are slower than their x64 counterparts?

Last edited by Stereodude; 12th January 2019 at 16:59.
Stereodude is offline   Reply With Quote
Old 12th January 2019, 16:59   #15  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Stereodude View Post
You keep asserting it adds overhead. Please define "overhead".

And what do you mean by slower? I've just easily demonstrated it's not slower to use MP_Pipeline than not using it for the same script. Are you trying to say that x86 versions of plugins are slower than their x64 counterparts?
Yes x86 versions are typically slower - that's the main reason


@Vitality - which versions of QTGMC, Srestore do you have ?
poisondeathray is offline   Reply With Quote
Old 12th January 2019, 17:06   #16  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by poisondeathray View Post
Yes x86 versions are typically slower - that's the main reason
Which has nothing to do with MP_Pipeline. So you're blaming the wrong thing and making factually incorrect and misleading statements about MP_Pipeline. The use of it doesn't slow down a script. Taking an existing 64-bit script and wrapping MP_Pipeline around it doesn't slow the script down.

In contrast, it can speed up some scripts (at the expense of using more total system memory). Like using QTGMC followed by MCTD. Separating the two of them with MP_Pipeline into their own sections is faster than running them together in a single conventional AVS script.
Stereodude is offline   Reply With Quote
Old 12th January 2019, 17:08   #17  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by poisondeathray View Post
Yes x86 versions are typically slower - that's the main reason


@Vitality - which versions of QTGMC, Srestore do you have ?
QTGMC 3.358
srestore v2.792
Vitality is offline   Reply With Quote
Old 12th January 2019, 17:32   #18  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,377
Quote:
Originally Posted by Vitality View Post
QTGMC 3.358
srestore v2.792
QTGMC_3.361s
https://forum.doom9.org/showthread.php?p=1836519=510

Srestore2.792




Quote:
Originally Posted by Stereodude View Post
Which has nothing to do with MP_Pipeline. So you're blaming the wrong thing and making factually incorrect and misleading statements about MP_Pipeline. The use of it doesn't slow down a script. Taking an existing 64-bit script and wrapping MP_Pipeline around it doesn't slow the script down.
Yes it does .

Compare running 1) native x64, 2) native x86, both with some filters , you would expect (1) be faster, right ?

Ok. For fun, replace the intermediate filter with an x86 version using mp_pipeline (3) . You would expect it to be faster than (2), but slower than (1) . In reality, it's the slowest, slower than native x86 . The more filters, the larger the delta

script0.avs
Code:
colorbarshd(1920,1080)
trim(0,4999)
spline36resize(720,480)
spline36resize(1920,1080)

script1.avs
Code:
MP_Pipeline("""

### platform: win64
colorbarshd(1920,1080)
trim(0,4999)
### ###

### platform: win32
spline36resize(720,480)
### ###

### platform: win64
spline36resize(1920,1080)
### ###


""")
Try this
(1) avsmeter64 script0.avs
(2) avsmeter script0.avs
(3) avsmeter64 script1.avs => you can try different prefetch values , it will still be slower native x86





Quote:
In contrast, it can speed up some scripts (at the expense of using more total system memory). Like using QTGMC followed by MCTD. Separating the two of them with MP_Pipeline into their own sections is faster than running them together in a single conventional AVS script.
This is true in some cases.

In other cases, running x64 natively is faster

(Also, the threading model is much better in vapoursynth . When you have multiple filters , it tends to bog down avisynth+ mt )

Last edited by poisondeathray; 12th January 2019 at 17:47.
poisondeathray is offline   Reply With Quote
Old 12th January 2019, 17:33   #19  |  Link
Vitality
Registered User
 
Join Date: Oct 2018
Posts: 54
Quote:
Originally Posted by Stereodude View Post
Which has nothing to do with MP_Pipeline. So you're blaming the wrong thing and making factually incorrect and misleading statements about MP_Pipeline. The use of it doesn't slow down a script. Taking an existing 64-bit script and wrapping MP_Pipeline around it doesn't slow the script down.

In contrast, it can speed up some scripts (at the expense of using more total system memory). Like using QTGMC followed by MCTD. Separating the two of them with MP_Pipeline into their own sections is faster than running them together in a single conventional AVS script.
What's the point of using MP_Pipeline to run 1 x86 plugin, when you can't run the other x64 plugins? I'm trying to run QTGMC but that's x64 but SRestore is x86.
Vitality is offline   Reply With Quote
Old 12th January 2019, 17:42   #20  |  Link
Stereodude
Registered User
 
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
Quote:
Originally Posted by poisondeathray View Post
QTGMC_3.361s
[url]Yes it does .

Compare running 1) native x64, 2) native x86, both with some filters , you would expect (1) be faster, right ?

Ok. For fun, replace the intermediate filter with an x86 version using mp_pipeline (3) . You would expect it to be faster than (2), but slower than (1) . In reality, it's the slowest, slower than native x86 . Actually, the more filters, the slower in relation.

script0.avs
Code:
colorbarshd(1920,1080)
trim(0,4999)
spline36resize(720,480)
spline36resize(1920,1080)

script1.avs
Code:
MP_Pipeline("""

### platform: win64
colorbarshd(1920,1080)
trim(0,4999)
### ###

### platform: win32
spline36resize(720,480)
### ###

### platform: win64
spline36resize(1920,1080)
### ###


""")
Try this
avsmeter64 script0.avs
avsmeter script0.avs
avsmeter64 script1.avs
You're the one making stuff up, you provide the results.
Stereodude is offline   Reply With Quote
Reply


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 19:28.


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