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. |
9th August 2018, 18:46 | #4201 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,555
|
This is based on my observation when developing VS but it'd surprise me greatly if AVS isn't guilty as well.
At some point the frame requests end up out of order and then the source filter has to seek. This is very slow in most of them. I ended up adding logic and a flag to indicate which filters really benefit from linear access and extra logic to make requests in order more of the time. It resulted in significant speedups. I don't understand how Avs+ multithreading works but it's most likely close to the truth...
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
11th August 2018, 12:07 | #4202 | Link |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Short question for the AVS+ gurus:
I am aware that the "Prefetch(x)" command should be called last in the AVS script (except for a "Return()" call). All commands after "Prefetch" will not be multithreaded. Right now I am in the process to migrate to AVS+, and of course I want everything to be automatic. In my older 32-bit StaxRip installation I added a "Prefetch" command as the last call in the script for all my templates. But as soon as I edit out commercials in the preview, StaxRip automatically adds a "Trim()" statement as the last command (after the "Prefetch" call). My question: Does it matter at all? Can "Trim()" even be prefetched? I did a few tests with "Trim()" before and after "Prefetch()", but the speed was identical, and the output also had no artifacts for both cases. Cheers manolito |
11th August 2018, 12:57 | #4203 | Link |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,815
|
In ripbot264 I do trimming after prefetch
Code:
#MT #VideoSource #Deinterlace #Decimate #Crop #Resize #Tonemap #Levels #Colours #Denoise #Custom #Prefetch #Subtitles #AudioSource #Triming #ColorSpace #Return
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
11th August 2018, 14:04 | #4204 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
|
Trim() is applied once to the whole clip, therefore it cannot be parallelized frame by frame. Practically, it will probably just set a "first output frame" and a "last output frame" attribute; done.
|
11th August 2018, 19:39 | #4205 | Link |
Registered User
Join Date: Dec 2011
Posts: 23
|
Hello, I'm back again. I just want to say thanks again especially to Groucho2004 for his AviSynth installer and AVS meter. I'm the one who has Threadripper processor. Last February I believe I fixed my problem (low fps etc). Got 70fps (happy with that to be honest). But I've decided to reformat last 2 days and my FPS is back to 50fps. I did some googling and came to this forum again and fixed my problem.
I'm using old AviSynth+ version though. The latest versions have low fps too Btw why the CPU Usage is always 0. The thread ripper is default and no overclock. This is the first time that the AviSynth script gives real FPS from the avsmeter (100+ fps in software too) unlike from my previous posts wherein avsmeter report 100 fps (70 fps in the same software). Thanks again |
11th August 2018, 19:46 | #4206 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
1. Post the script that gives you 0% CPU usage.
2. Update AVSMeter to the latest version, run "AVSMeter avsinfo -log" and post the log file. What is the CPU usage in Task manager when you run the test?
__________________
Groucho's Avisynth Stuff |
11th August 2018, 20:03 | #4207 | Link | ||
Registered User
Join Date: Dec 2011
Posts: 23
|
Quote:
Quote:
Here's the cpu usage Log: https://pastebin.com/pLZiYyCd |
||
11th August 2018, 20:10 | #4208 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
MP_Pipeline runs the script in a different process, that's why you get 0% in AVSMeter. Open the "Processes" tab in Task Manager and check the CPU usage for each process.
__________________
Groucho's Avisynth Stuff |
11th August 2018, 20:49 | #4210 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,782
|
Vegas is very busy, why do you run it at the same time you try to benchmark AviSynth?
What kind of AVI do you read, is it completely uncompressed, so reading from the disk consumes most of the time? |
11th August 2018, 21:19 | #4211 | Link | |
Registered User
Join Date: Dec 2011
Posts: 23
|
Quote:
I think I need to move on with the software to maximize threadripper. I'm just too attached with Vegas because I'm used to it. But the 100fps from 70fps is okay for me. I've tried other NLE but it's pain to setup with frameserver and the quality to size ratio is not good compare to x264. |
|
12th August 2018, 12:19 | #4212 | Link | |
RipBot264 author
Join Date: May 2006
Location: Poland
Posts: 7,815
|
Quote:
__________________
Windows 7 Image Updater - SkyLake\KabyLake\CoffeLake\Ryzen Threadripper |
|
13th August 2018, 19:13 | #4213 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,277
|
Is there some known problem with 'AviSynth+ 0.1 (r2728, MT, i386) (0.1.0.0)' and DeGrainMedian ?
I started with: Code:
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\DGDecode.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\TDeint.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\TMM.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\MosquitoNR.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\RgTools.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\masktools2.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\degrainmedian.dll") Import("I:\Hybrid\32bit\avisynthPlugins\Dehalo_alpha_mt.avsi") SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) # loading source: VTS_01_1.VOB # input color sampling YV12 # input luminance scale tv MPEG2Source(d2v="E:\Temp\vob_3b6af15ddd3b19a201adf2536e9a8f23_41.d2v") # current resolution: 720x576 # deinterlacing TDeint(slow=2) # cropping to 720x550 Crop(0,12,0,-14) # current resolution: 720x550 # filtering # deringing using MosquitoNR MosquitoNR() # dehaloing DeHalo_alpha_mt() # grain handling DeGrainMedian(mode=2,norow=true) # CUSTOM SCRIPT PART - position: Resize - START function CustomResize(clip clp) { last=clp DeGrainMedian(limitY=3,limitUV=5,mode=2,norow=true) } # CUSTOM SCRIPT PART - position: Resize - END CustomResize() # loading custom script content # scaling Spline36Resize(720,384) # current resolution: 720x384 PreFetch(8) return last Code:
Exception 0xC0000005 [STATUS_ACCESS_VIOLATION] Module: C:\Windows\SysWOW64\KERNELBASE.dll Address: 0x76C7DDC2 Code:
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\DGDecode.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\TDeint.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\TMM.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\MosquitoNR.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\RgTools.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\masktools2.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\degrainmedian.dll") Import("I:\Hybrid\32bit\avisynthPlugins\Dehalo_alpha_mt.avsi") SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) # loading source: VTS_01_1.VOB # input color sampling YV12 # input luminance scale tv MPEG2Source(d2v="E:\Temp\vob_3b6af15ddd3b19a201adf2536e9a8f23_41.d2v") # current resolution: 720x576 # deinterlacing TDeint(slow=2) # cropping to 720x550 Crop(0,12,0,-14) # current resolution: 720x550 # filtering # deringing using MosquitoNR MosquitoNR() # dehaloing DeHalo_alpha_mt() # grain handling DeGrainMedian(mode=2,norow=true) # CUSTOM SCRIPT PART - position: Resize - START function CustomResize(clip clp) { last=clp DeGrainMedian(limitY=3,limitUV=5,mode=2,norow=true) } # CUSTOM SCRIPT PART - position: Resize - END #CustomResize() # loading custom script content # scaling Spline36Resize(720,384) # current resolution: 720x384 PreFetch(8) return last Code:
LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\DGDecode.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\TDeint.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\TMM.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\MosquitoNR.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\RgTools.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\masktools2.dll") LoadPlugin("I:\Hybrid\32bit\avisynthPlugins\degrainmedian.dll") Import("I:\Hybrid\32bit\avisynthPlugins\Dehalo_alpha_mt.avsi") SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE) # loading source: VTS_01_1.VOB # input color sampling YV12 # input luminance scale tv MPEG2Source(d2v="E:\Temp\vob_3b6af15ddd3b19a201adf2536e9a8f23_41.d2v") # current resolution: 720x576 # deinterlacing TDeint(slow=2) # cropping to 720x550 Crop(0,12,0,-14) # current resolution: 720x550 # filtering # deringing using MosquitoNR MosquitoNR() # dehaloing DeHalo_alpha_mt() # grain handling #DeGrainMedian(mode=2,norow=true) # CUSTOM SCRIPT PART - position: Resize - START function CustomResize(clip clp) { last=clp DeGrainMedian(limitY=3,limitUV=5,mode=2,norow=true) } # CUSTOM SCRIPT PART - position: Resize - END #CustomResize() # loading custom script content # scaling Spline36Resize(720,384) # current resolution: 720x384 PreFetch(8) return last Memory usage is around 220MB all the time. So I'm wondering: a. is there a newer verison of degrainMedian ? (using v0.8.2 from 2006 atm.) b. is this a known problem? c. is there a fix for this? Cu Selur Ps.: The script itself works fine with normal Avisynth MT 32bit. (minus the Prefetch and SetFilterMTMode call and adding distributor(), SetMTMode(),..) Last edited by Selur; 13th August 2018 at 19:30. |
13th August 2018, 23:27 | #4214 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
b. I can reproduce the problem. It may be that many of the inline ASM MMX functions in DeGrainMedian are missing the EMMS instruction. See here for some info. c. I made a new build with the EMMS instructions included, let me know if it works for you (it does for me).
__________________
Groucho's Avisynth Stuff Last edited by Groucho2004; 14th August 2018 at 10:12. |
|
13th August 2018, 23:38 | #4215 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Is this thread a good place to mention errors on the Wiki? I spotted this:
Quote:
|
|
13th August 2018, 23:43 | #4216 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Probably the worst place.
If it's not too much hassle, why don't you create an account on avisynth.nl and fix it yourself? That's what I do (and many others) when I spot a mistake.
__________________
Groucho's Avisynth Stuff |
15th August 2018, 16:15 | #4219 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
Another (probably stupid) question from an AVS+ noob:
If MT is enabled by the "Prefetch(x)" command at the end of the script then all of the plugins before the Prefetch command will run in MT mode. Which of the 4 different MT modes gets used is specified by an explicit SetFilterMTMode() command or by a "SetMTMode.avsi" in the autoload folder. If none of the MT modes is specified then the default MT mode 2 (MT_MULTI_INSTANCE) will be used. Everybody agrees on this? Now I found this about ColorMatrix as a comment in the current "SetMTMode.avsi": Quote:
Cheers manolito |
|
|
|