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. |
5th February 2014, 21:23 | #541 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
As for the thread count, I'm not sure to be honest. Probably because a mode 2 plugin has internal threading too. Both are way too high though, but I'm glad to see that Avs+ has the less threads.
__________________
AviSynth+ Last edited by ultim; 5th February 2014 at 21:30. |
|
5th February 2014, 22:31 | #543 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
setmtmode(5,8) #8 threads for MT QTGMC(preset="fast", EdiThreads=8).selecteven() #8 Edithreads * 8 MT threads = 64 threads distributor() #Distributor is already called in AVSMeter so calling it twice makes 64 * 2 = 128 threads Finally, add some threads for other filters and you have your 145 threads. |
|
5th February 2014, 22:42 | #544 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
@ultim
Before I start digging through the AVS+ code - How do I determine the MT mode in Avisynth+? In AVSMeter, I have been doing it like this so far (for SEt's MT DLL), pretty much the same as it's done in x264: Code:
AVSValue AVS_temp; int iMTMode = 0; try { AVS_temp = AVS_env->Invoke("GetMTMode", false); iMTMode = AVS_temp.IsInt() ? AVS_temp.AsInt() : 0; if ((iMTMode > 0) && (iMTMode < 5) && settings.bInvokeDistributor) AVS_main = AVS_env->Invoke("Distributor", AVS_main); } catch (IScriptEnvironment::NotFound) { } |
5th February 2014, 23:32 | #545 | Link |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
I've run into an issue with resampling audio.
As sometimes happens, if you use AssumeFPS's sync_audio parameter, the resultant sample rate gets wonky, requiring a follow-up use of SSRC to correct it. Even worse, depending on the source and output samplerates, you have to use SSRC twice - once before the AssumeFPS, and again afterward. The canonical example would be something like 44.1kHz synced to 30000/1000 fps, resampled to 48kHz synced to 30000/1001 fps. In 2.6a5 and r1576, this worked like it always does. But somewhere between r1576 and r1636 (r1689 also shows it), possibly in the MT or cache changes, the above operation can cause an error at the end of encoding and audio truncation when using FFAudioSource as the input source. Now, I'm not entirely sure if it's something that needs to be fixed on FFMS2's side or not, but the problem is as follows: Code:
Script Input -> Script Output FFmpeg log message 44.1kHz -> 44.1kHz no error 44.1kHz -> 48kHz [avisynth @ 03922860] FFAudioSource: Out of bounds audio samples requested (single use of SSRC, no fps change) 44.1kHz@30fps -> 48kHz@29.97fps same error, plus truncated* (SSRC->AssumeFPS w/sync_audio=true->SSRC) 48kHz -> 48kHz no error *IIRC, 44.1->48 without an fps change might have also had some truncation, but it wasn't nearly as bad as the resample+fps change test was. r1689 = error, truncated r1636 = error, truncated r1576 = works, no truncation 2.6a5 = works, no truncation Script: FFmpegSource2("[AKROSS Con 2013] Okami - Quiet.mp4",atrack=-1,fpsnum=30000,fpsden=1000) SSRC(48000,fast=false) AssumeFPS(29.97,sync_audio=true) SSRC(48000,fast=false) FFmpeg: ffmpeg -i test.avs -vn -acodec pcm_s16le test-48re.wav Saving a resampled (but not fps-resynced) PCM file and then importing that in with WAVSource before doing the AssumeFPS and SSRC adjustment results in no error and possibly no truncation (or the much more minor one I mentioned above). |
5th February 2014, 23:43 | #546 | Link |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
You cannot get the MT mode in Avs+. IMHO it wouldn't make too much sense because an MT-mode is always associated with a filter. So at best you could ask which MT mode is a particular filter configured to use. You can ask for the number of threads though, but that is part of IScriptEnv2, which is not officially stable yet.
Yes, I think it is (given that I undertsand Distributor() halfway correctly). But Prefetch() shouldn't be inserted automatically, it should always be added by the user when they want a multithreaded chain. All in all, I don't think Avs+MT should need special handling in tools like Avs-MT did with the Distributor().
__________________
AviSynth+ |
5th February 2014, 23:55 | #547 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
|
|
6th February 2014, 00:01 | #548 | Link |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Hi qyot27,
Could you please check these special builds for you if you experience the same problem with either of them? And if so, which one? EDIT: lol, sry i forgot to post the link: https://mega.co.nz/#F!sZkDjKRD!ZZz7oQvYP6FQ0F0rAeYOoQ
__________________
AviSynth+ Last edited by ultim; 6th February 2014 at 00:14. |
6th February 2014, 00:02 | #549 | Link |
Registered User
Join Date: Mar 2009
Posts: 3,646
|
Just wondering why this is crashing my media player am using ffdshow raw.
SetFilterMTMode("", 2) SetFilterMTMode("ffdshow_source", 3) ffdshow_source() Psharpen() Prefetch(4) I've tried stating Psharpen in a SetFilterMTMode as well but same deal. I just copied the Avisynth DLL into my SYSWOW64 folder. What am I missing? Also is SetMemoryMax still something that should be set? |
6th February 2014, 00:07 | #550 | Link |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Yes, you can tell that using IScriptEnvironment2::GetProperty(AEP_FILTERCHAIN_THREADS), but please don't use it before the whole IScriptEnvironment2 is finalized. This is not a licensing restriction, it has to do with the fact that if you start using it and the class changes after that, your application will break.
__________________
AviSynth+ |
6th February 2014, 00:11 | #551 | Link | |
AVS+ Dev
Join Date: Aug 2013
Posts: 359
|
Quote:
I cannot try it right now because I don't have the necessary stuff installed. Does it work if you use SetFilterMTMode("", 3) instead?
__________________
AviSynth+ |
|
6th February 2014, 00:29 | #553 | Link | |
Registered User
Join Date: Jan 2010
Posts: 270
|
Quote:
Also, are you using x64 ffdshow/mpc by any chance? |
|
6th February 2014, 00:53 | #554 | Link |
Registered User
Join Date: Mar 2009
Posts: 3,646
|
Yeah correct x86 version downloaded in SysWOW64, copied the x64 version to System32 as you said above (not required is it?) Am using MPC-HC/BE/ffdshow x86.
2.6 MT is working fine, just copied the 2.6MT version over the AVS+ version and BE/HC doesn't crash at all, I have no idea what's going on. |
6th February 2014, 01:01 | #555 | Link |
Registered User
Join Date: May 2008
Posts: 1,840
|
Latest version resizer's are a bit faster but still about 2% slower than avisynth 2.60, it used to be 4% slower on amd fx8320.
__________________
PC: FX-8320 GTS250 HTPC: G1610 GTX650 PotPlayer/MPC-BE LAVFilters MadVR-Bicubic75AR/Lanczos4AR/Lanczos4AR LumaSharpen -Strength0.9-Pattern3-Clamp0.1-OffsetBias2.0 |
6th February 2014, 01:28 | #556 | Link |
Registered User
Join Date: Aug 2010
Posts: 134
|
divide=1 or divide=2 doesn't work in MAnalyse with avisynth+
Code:
super = MSuper() backward_vectors = MAnalyse(super, isb = true) forward_vectors = MAnalyse(super, isb = false) MFlowBlur(super, backward_vectors, forward_vectors, blur=15) Code:
super = MSuper() backward_vectors = MAnalyse(super, divide=1, isb = true) forward_vectors = MAnalyse(super, divide=1, isb = false) MFlowBlur(super, backward_vectors, forward_vectors, blur=15) |
6th February 2014, 05:33 | #558 | Link | |
...?
Join Date: Nov 2005
Location: Florida
Posts: 1,419
|
Quote:
On a different computer (that has SSE2), though: AviSynth_check.dll = error, truncation AviSynth_nocheck.dll = error, truncation |
|
6th February 2014, 07:57 | #560 | Link |
Registered User
Join Date: May 2008
Posts: 1,840
|
blankclip(1630,1920,1080,"YV12",23.976)
resize(1280,720) measured with avsmeter 1.7.6 Code:
AVS+ 2.60 Lanczos3 116 132 Spline64 108 116 Bicubic 192 159 Bilinear 205 225
__________________
PC: FX-8320 GTS250 HTPC: G1610 GTX650 PotPlayer/MPC-BE LAVFilters MadVR-Bicubic75AR/Lanczos4AR/Lanczos4AR LumaSharpen -Strength0.9-Pattern3-Clamp0.1-OffsetBias2.0 |
Thread Tools | Search this Thread |
Display Modes | |
|
|