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. |
|
|
Thread Tools | Search this Thread | Display Modes |
21st February 2012, 06:03 | #21 | Link | ||
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
Quote:
The CPU of my computer is T2390 (2 cores), some problems may happened more rarely in CPU with 2 cores than CPU with 4 or more cores I'm happy that you like it Quote:
For example, AVISource(...) SoraThread(...) Crop(...) Lanczosresize(...) Then, the [decoding] and [cropping and resizing] will work in different threads. AVISource(...) Crop(...) SoraThread(...) Lanczosresize(...) Then, the [decoding and cropping] and [resizing] will work in different threads. Last edited by leiming2006; 21st February 2012 at 06:05. |
||
27th February 2012, 19:55 | #24 | Link |
Registered User
Join Date: Sep 2008
Posts: 365
|
@zerowalker, you have to modify QTGMC.avsi by adding sorathread calls various places inside the function definition.
I finally got around to testing sorathread today, adding a SoraThread() after a call to nnedi3 the fps was increased by 30%, adding more of SoraThread() other places did not increase speed any further. @leiming2006, how do one decide what the appropriate buffer value is for a script? |
28th February 2012, 07:53 | #25 | Link |
Registered User
Join Date: May 2008
Posts: 1,840
|
I gained about 25% by adding 3 sorathread(1) between source, tfm, tdecimate and crop/resize, thanks leiming2006. Threadrequest was about a 15% gain, MT and SetMTMode slowed down the script considerably.
1 frame buffer was much faster than the default of 3 in my case. |
28th February 2012, 16:17 | #26 | Link | |
Registered User
Join Date: Mar 2006
Location: Shanghai, China
Posts: 203
|
In my friends' tests, concurrently reading frames from the same filter instance will cause crash.
for a meaningless (but should have not crashed) example, (this script is offered by "304". I have made it more simple) Code:
ffvideosource(...) assumeframebased() separatefields() selectevery(8, 0, 1, 0, 3, 2, 5, 4, 5, 6, 7) weave() w=width h=height TFM(mode=5, pp=0, slow=2).TDecimate(1) sorathread() src=last c=last.spline64resize(w,h,2,2,-2,-1) clip1=c.sorathread() msk=c.sorathread() clip2=src.sorathread() mt_merge(clip1, clip2, msk, luma=false, u=3, v=3).sorathread() I'll try locking the environment object during processing next time, to see if the crash could be avoided. Quote:
In fact the default value 5 is what I "guess". Just thought that "maybe... 5 is enough" As my designing, higher value will cause more buffer-maintaining overhead, more locking conflict (thread waiting for each other) and a value which is not enough will also cause threads waiting for data happened more frequently. Last edited by leiming2006; 28th February 2012 at 16:26. |
|
18th March 2012, 19:31 | #28 | Link |
Registered User
Join Date: Aug 2011
Posts: 25
|
Code:
ffms2_FFVideoSource("bluray remux source.mkv") SetMTMode(2,0) Spline36Resize(1280,534,0,140,0,-140) LSFmod(ss_x=1.0,ss_y=1.0,Smode=3,Smethod=3,Lmode=3,strength=60,overshoot=2,undershoot=1) Can you give me a "Sora" script for this? My x264 setting: Code:
--level 4.1 --deblock -3:-3 --bframes 8 --b-adapt 2 --ref 12 --aq-mode 2 --aq-strength 0.8 --cqmfile "C:\Users\Administrator\Desktop\eqm_avc_hr.cfg" --merange 32 --me umh --direct auto --subme 11 --partitions all --trellis 2 --psy-rd 1.15:0.45 --no-dct-decimate --no-fast-pskip Pass 2: ~5 fps |
18th March 2012, 22:31 | #29 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Just add sorathread() before LSFmod()
Code:
Spline36Resize(1280,534,0,140,0,-140) sorathread() LSFmod(ss_x=1.0,ss_y=1.0,Smode=3,Smethod=3,Lmode=3,strength=60,overshoot=2,undershoot=1)
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
19th March 2012, 02:29 | #30 | Link | |
Registered User
Join Date: Jun 2006
Posts: 452
|
Quote:
Take in mind that the script and x264 run at the same time. Speeding up your script makes only sense if the script runs slower than x264, what is probably not true in this case. Measure the speed from your script. (AVSmeter ,...) and speed up the slowest part in the chain. Further speeding up is only possible if your CPU is not already fully loaded. Looking at the x264 parameters, you gone need a heavy multi-CPU system if you want the whole chain to run faster by speeding up the script using Sora's multi-threading An alternative is to separate (decoding + filters) and encoding by using a "temporary file". (decoding + filters) -> lossless encoding --> temp file temp file --> lossless decoding --> x264 encoding. BTW : have you tried to run your script ? You have a good chance it will stuck on line 1... Last edited by Pat357; 19th March 2012 at 02:34. |
|
27th September 2012, 11:46 | #35 | Link |
契約者
Join Date: Jun 2008
Posts: 1,576
|
vapoursynth have its own threading built into the core isn't it? does it really needs hacks like this?
by the way I tried SoraThread() recently. documentation is very nice but I can't seem to get much cpu load with 8 threads. There is some noticeable speedups but ideally I want to see some solution that can easily fill all cpu resources without wasting cycles for some redundant work. This is too much to ask I guess? Last edited by Keiyakusha; 27th September 2012 at 11:50. |
27th September 2012, 14:18 | #37 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
I tried to use SoraThread on a MDegrain3 script, by using one sorathread for each motionvector.
Code:
mpeg2source("PAL-DVD-720x576.d2v") src = last sup = src.msuper() bv3 = sup.manalyse(isb=true, delta=3).sorathread() bv2 = sup.manalyse(isb=true, delta=2).sorathread() bv1 = sup.manalyse(isb=true, delta=1).sorathread() fv1 = sup.manalyse(isb=false,delta=1).sorathread() fv2 = sup.manalyse(isb=false,delta=2).sorathread() fv3 = sup.manalyse(isb=false,delta=3).sorathread() src.mdegrain3(sup,bv1,fv1,bv2,fv2,bv3,fv3) return(last)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
27th September 2012, 16:39 | #38 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
I did a few tests with fft3dfilter, lsfmod, and tnlmeans, comparing the mt mode and sorathread, as well as combining them.
Source resolution 720x480, test run using AVSmeter, and over 5000 frames for each test, i didn't bother running that many frames for tnlmeans though. Code:
no mt SetMtMode Sorathread Sorathreadx2 SetMtMode+Sorathread fft3dfilter 28.2 37 32.56 33.28 55 lsfmod 39.83 85.8 52 49.5 108 (no respond) tnlmeans 1.21 4.44 1.21 1.21 4.47 |
28th September 2012, 00:22 | #39 | Link | |
Registered User
Join Date: Nov 2011
Location: spain
Posts: 45
|
Quote:
but it looks like that there isn't such a plugin right now |
|
28th September 2012, 00:43 | #40 | Link |
Professional Code Monkey
Join Date: Jun 2003
Location: Kinnarps Chair
Posts: 2,548
|
Vapoursynth is quite effective at multithreading avisynth filters too so you should never use anything like this. All you'll get is a crash at best.
__________________
VapourSynth - proving that scripting languages and video processing isn't dead yet |
Tags |
multi thread |
Thread Tools | Search this Thread |
Display Modes | |
|
|