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. |
11th May 2016, 06:00 | #1541 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I have this script. When I open in MPC-HC x86, it loads fine and plays slowly.
When I seek, however, 50-80% of the times it completely freezes the player. Code:
P="Encoder\" LoadPlugin(P+"LSMASHSource.dll") LoadPlugin(P+"KNLMeansCL.dll") LoadPlugin(P+"Shaders\Shader.dll") Import(P+"Shaders\Shader.avsi") LoadPlugin(P+"svpflow1.dll") LoadPlugin(P+"svpflow2.dll") Import(P+"InterFrame2.avsi") Import(P+"ResizeX.avsi") SetFilterMTMode("DEFAULT_MT_MODE",2) SetFilterMTMode("LWLibavVideoSource",3) SetFilterMTMode("LWLibavAudioSource",3) SetFilterMTMode("KNLMeansCL",3) file="Input.mpg" LWLibavVideoSource(file, cache=false, threads=1) AudioDub(LWLibavAudioSource(file, cache=false)) Crop(0, 0, -8, -0) ConvertToYV24() KNLMeansCL(D=1, A=2, h=2.1, cmode=true, device_type="GPU", device_id=0) SuperResXBR(2, 0.6, 0, XbrStr=2, XbrSharp=1.2, MatrixIn="601") ConvertToYV12() InterFrame(Cores=8, Tuning="Smooth", NewNum=60, NewDen=1, GPU=true) SuperResXBR(2, 0.6, 0, XbrStr=2, XbrSharp=1.2, fWidth=1012, fHeight=778) ResizeX(1004, 768, 0, 5, -8, -5) Prefetch(8) |
11th May 2016, 07:35 | #1543 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
No.
If I replace with AviSource, then it freezes all the time. If I remove InterFrame, then it loads and seeks fine; which is weird because SVP itself is working perfectly. I made sure to copy the latest SVP DLLs from SVP's plugin folder into my Encoder folder, but that's not helping. |
11th May 2016, 08:27 | #1544 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
Quote:
Seems that when other (non-avsplus-core) processes occupy significant amount of memory after the script starts, and the total nears to 3GB, could not balance and free-up enough memory. 2.) My source is 384x288.With this original size there are no memory problems. Your script still doesn't run for me even with prefetch(1) (from avsmeter. The usual "reading frames") If I set only one of these to mode 3 Code:
SetFilterMTMode("ConvertFromShader", 2) SetFilterMTMode("ConvertToShader", 2) SetFilterMTMode("ExecuteShader", 2) SetFilterMTMode("Shader", 2) SetFilterMTMode("SVSmoothFps", 3) |
|
11th May 2016, 08:47 | #1545 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
Thanks for the testing. I myself have decided not to bother with AviSynth 64-bit any more. Last time I did (which, granted, was a while back; but your data doesn't look promising), it was crashing all over the place. We got VapourSynth now.
__________________
Gorgeous, delicious, deculture! |
|
11th May 2016, 09:59 | #1546 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
This Shader thingy is monstrous and uses insane amounts of memory. The SVP stuff is quite buggy and also uses the GPU and should therefore run in mode 3, I suppose. Not sure if "SetFilterMTMode("SVSmoothFps", 3)" is sufficient, though. |
|
11th May 2016, 10:39 | #1547 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
No change if I set GPU=false in Interframe parameter.
I think that we face an unlucky timing, where the problem of a missing critical section or causes the problem. I will definitely look into it because I like solving puzzles. |
11th May 2016, 10:53 | #1548 | Link | |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
Quote:
(Because the script did not run on the current x64 build) When we make the script runnable (setting MT mode 3, as I wrote previously), x64 version has lower memory need than the x86 version. But it is true that the x86 version is 10-20% faster in this specific situation (based on comparison with my r1850 builds for x64 and x86, but it should be the same with r1849). Reason? One or more plugin do not have optimized x64 assembly path and use C code instead? Maybe. For QTGMC I have a 4-8% speed gain using avs+ x64 version. |
|
11th May 2016, 11:06 | #1549 | Link | |||
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
Quote:
Quote:
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 11th May 2016 at 11:10. |
|||
11th May 2016, 12:53 | #1550 | Link | |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Chainik said this about SVP
Quote:
|
|
11th May 2016, 14:26 | #1551 | Link |
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,664
|
Hmm, if I set your shader filters to mode 3 and SVP to mode 1 it doesn't freeze, tested with 32 and 64-bit. Both perform about the same. I see that pinterf has to set SVSmoothFps to mode 3 to get it to work, something is really odd here.
One thing I did notice while testing is that performance is about the same with MT and with it disabled. Just out of curiosity, what's the performance of your script when you run it with MT disabled? I don't think MysteryX's result are a proper depiction of AviSynth+ MT. With QTGMC I get better performance with AVS+ than with VS. |
11th May 2016, 14:33 | #1552 | Link | ||
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
Quote:
Without MT I get 2.2fps That's because I have 8 cores. Without MT, only 1/8th of my computing power is used. Plus with AviSynthShader, the CPU has to wait for the GPU to finish processing so the CPU is idle a lot of the time; alternating between the CPU and the GPU working but not both simultaneously. Quote:
However, my results aren't very representative of the effectiveness of CPU frame processing because the bottleneck is GPU memory transfers. It does, however, test the memory usage, effectiveness and stability of memory transfers. I agree that a script where the CPU is the bottleneck would be a better representation of the computing effectiveness of AviSynth+. |
||
11th May 2016, 14:42 | #1553 | Link |
Soul Architect
Join Date: Apr 2014
Posts: 2,559
|
I had posted benchmark results of x64 which were not good, however x86 works well. It would be more fair to show the good results with x86.
Curiously enough, after updating SVPFlow to the latest version, it started crashing in AVS+. After reverting back to the version that comes with InterFrame, it works again (??) AND, after reverting back to that version of SVPFlow, I'm no longer getting freezes when seeking. That's odd because SVP itself is working perfectly fine with AVS+. AviSynth 2.6 Code:
Frames processed: 304 (0 - 303) FPS (min | max | average): 1.391 | 1000000 | 9.087 Memory usage (phys | virt): 823 | 1200 MiB Thread count: 139 CPU usage (average): 11% Code:
Frames processed: 303 (0 - 302) FPS (min | max | average): 1.032 | 1000000 | 9.121 Memory usage (phys | virt): 544 | 992 MiB Thread count: 155 CPU usage (average): 13% Again, running it in x64 is a whole other story.
__________________
FrameRateConverter | AvisynthShader | AvsFilterNet | Natural Grounding Player with Yin Media Encoder, 432hz Player, Powerliminals Player and Audio Video Muxer Last edited by MysteryX; 11th May 2016 at 14:49. |
11th May 2016, 15:42 | #1554 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
Ok, MysteryX, check PM.
It works in x64, with your plugins in mode 2 and spvflow in mode 1 (spv version 4.0.0.128) (but only one test is not a test) Last edited by pinterf; 11th May 2016 at 16:30. Reason: spv version added |
13th May 2016, 09:57 | #1555 | Link |
typo lover
Join Date: May 2009
Posts: 595
|
When a temporal filter calls child->GetFrame() more than one times, the speed of the filter will be changed by the order of that calls on MT mode.
I noticed this when I rewrote ReduceFlicker for avs2.6/avs+. my repository binary(32bit) Code:
LoadPlugin("ReduceFlicker26.dll") SetFilterMTMode("ReduceFlicker", MT_NICE_FILTER) ColorBars(1920, 1080, "YV12").Spline36Resize(1280, 720) ReduceFlicker(strength=3, aggressive=true, grey=false, opt=1, raccess=true) prefetch(4) (490fps -> 175fps on my i7-4790 desktop) Probably, it'll be also same as this that prefetch doesn't work for TemporalSoften().
__________________
my repositories Last edited by Chikuzen; 14th May 2016 at 04:21. |
13th May 2016, 20:39 | #1556 | Link |
Registered User
Join Date: Jan 2014
Posts: 2,309
|
First I wanted to say that hmmm, interesting phenomenon. If someone would develop a filter chain visualizer I would be grateful.
Then a memory came to mind, from times when I was bothering with the cache problem thingy. I've seen an adaptive pattern matching in the prefetch code. As I recall that the algorithm tries to guess the request pattern, e.g. frames are requested by one (1-2-3-4...), two (2-4-6-8... what is it used for, I don't know, SelectEven?), or backward(100-99-98-97...), etc. If there is enough data for a rule, it "locks" on this pattern and continues the prefetch using this prediction. (And I noticed that Frame 0 is not prefetched, prefetching starts with frame 1 .... Tried to fix it for the sake of perfectness but did not have the knowledge and patience for this) |
16th May 2016, 08:19 | #1558 | Link |
User of free A/V tools
Join Date: Jul 2006
Location: SK
Posts: 826
|
Could any moderator be so kind and include link to pinterf's Git repo with latest Avisynth+ builds on the first page of this thread, please? It took me quite some time to dig those information from his posts scattered across dozens of the last pages...
|
Thread Tools | Search this Thread |
Display Modes | |
|
|