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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th September 2009, 04:02   #201  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
I updated the avisynth.dll and the src. Links are in the first post.
I also updated the instructions to build the dll at the bottom of the first post.

What changed? I fixed the bug Gavino reported using the code he provided to fix the bug, and I made the name change atak snapjera requested.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 12th September 2009, 08:55   #202  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Jeremy Duncan View Post
I fixed the bug Gavino reported using the code he provided to fix the bug
(I take it this refers to the audio cache bug.)

Thinking about the MT implications of this led me to have a look at the source code of CacheMT::GetAudio.
I see that it is the same as Avisynth 2.57 and does not include the changes made (to Cache) in Avisynth 2.58. Ironically, this also means that it does not suffer from the bug (when SetMTMode is used), but really CacheMT::GetAudio should be the same as Cache::GetAudio.

Last edited by Gavino; 12th September 2009 at 09:15.
Gavino is offline   Reply With Quote
Old 12th September 2009, 17:31   #203  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Interesting. I wonder if it would be faster if it has the 2.5.8 code in the cachemt?

I updated the dll and src links in the first post.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 12th September 2009, 23:08   #204  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Jeremy Duncan View Post
I wonder if it would be faster if it has the 2.5.8 code in the cachemt?
Most scripts would show no difference, since the audio cache only comes into play if the same section of audio is accessed more than once (eg when mixing channels).

The main reason for making them the same is for consistency and ease of future maintenance. In the longer term (Avisynth 2.6?), it might be better to derive Cache and CacheMT from a common parent class and put the audio code in that parent.
Gavino is offline   Reply With Quote
Old 29th September 2009, 02:01   #205  |  Link
thewebchat
Advanced Blogging
 
Join Date: May 2009
Posts: 480
This is probably a dumb question, but how does AviSynth MT behave when no instances of MT or SetMTMode have been called? Is it functionally equivalent to normal AviSynth?
thewebchat is offline   Reply With Quote
Old 29th September 2009, 19:20   #206  |  Link
cweb
Registered User
 
cweb's Avatar
 
Join Date: Oct 2002
Location: The Pandorica
Posts: 527
I'm getting odd behaviour when I use SetMTMode before directshowsource

SetMtMode(2,2)
video=directshowsource("00003.ts").KillAudio()


My source is converted from my camera's hdvideo (50p).

If I put the SetMtMode after the directshowsource all is fine.
Otherwise I get some strange jerkiness or repeats of previous parts of the video throughout..
I will try to prepare a sample for you as soon as I can.

Mediainfo reports the following on my source ts file (not sure why it's saying NTSC, I think it should say PAL!).

Maximum Overall bit rate : 35.5 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.0
Format settings, CABAC : No
Format settings, ReFrames : 1 frame
Duration : 6mn 25s
Bit rate : 13.6 Mbps
Width : 1 280 pixels
Height : 720 pixels
Display aspect ratio : 16/9
Frame rate : 50.000 fps
Standard : NTSC
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.296
Stream size : 626 MiB (92%)
__________________
PC specs for bug reports: Intel Core i7-4790K @4Ghz Win10(Linux VM) PCI express NVIDIA RTX 2060 SUPER graphics card
http://twitter.com/cwebdesign
cweb is offline   Reply With Quote
Old 29th September 2009, 20:11   #207  |  Link
saint-francis
too much lurking
 
saint-francis's Avatar
 
Join Date: Sep 2006
Location: Valhalla
Posts: 668
Quote:
Originally Posted by cweb View Post
I'm getting odd behaviour when I use SetMTMode before directshowsource

SetMtMode(2,2)
video=directshowsource("00003.ts").KillAudio()


My source is converted from my camera's hdvideo (50p).

If I put the SetMtMode after the directshowsource all is fine.
Otherwise I get some strange jerkiness or repeats of previous parts of the video throughout..
I will try to prepare a sample for you as soon as I can.
)
SetMTMode (2) doesn't work with DirectShowSource. That is the classic example of SetMTMode (2) and DSS. You're lucky it completed encoding. The reason you don't have the issues when you put it after DSS is because it isn't getting called. If you use SetMTMode you have to begint he script with it. You can change between modes during the script but you need to begin with it.
What you need to do is begin the script with SetMTMode (3) and after DSS is called use mode 2. I have found that mode 3 causes havoc with some other filters I usually use.
saint-francis is offline   Reply With Quote
Old 30th September 2009, 00:13   #208  |  Link
BigDid
Actually in reserve
 
Join Date: Oct 2004
Posts: 1,605
Quote:
Originally Posted by thewebchat View Post
... but how does AviSynth MT behave when no instances of MT or SetMTMode have been called? Is it functionally equivalent to normal AviSynth?
Hi,

I had already verified that (with a 2.58 avisynth-mt.dll) there was nearly no difference scripting no MT or scripting with setmtmode(2).
Here is a more complete test that confirm there is no or very little speed difference between the different scripting exception being the MT() mode.
I use last SET avisynth MT 2.58 dll:
http://forum.doom9.org/showthread.ph...10#post1301410
A slow dual-core with avisynth 2.58 mono or MT dll
Script is mpeg2source+ crop+lanczosresize+
#( the Setmtmode or MT scripting is inserted here when needed)
fft3dfilter(plane=4, sigma=1, bt=4).lsfmod()

1/ 2.58 Mono-dll => 7,25 fps
2/ 2.58 MT-dll, no MT scripting => 7,19fps
3/ 2.58 MT-dll, setmtmode(2) => 7,15fps
4/ 2.58 MT-dll, MT("...") => 10,19 fps

Conclusion being: for a marginal gain, if you own a single core, stick to avisynth 2.58 mono dll. If you own a multiple core, use the 2.58 MT dll and try to get the MT() mode to work

Nota: anybody with a quad-core wanting to redo these simple tests is welcome cause mileage may vary.

Did

Edit: the conclusion applied to the question in the above post gives the following answer: don't worry with the setmtmode(2) it should not be quicker than normal scripting IF you have the avisynth 2.58 MT dll.
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first
Want to exchange on AutoGK? try doom10.org
In reserve (inactive) for an undefined period of time.

Last edited by BigDid; 3rd October 2009 at 22:03.
BigDid is offline   Reply With Quote
Old 1st October 2009, 02:11   #209  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
MT() Breaks some filters, like TGMC for example. Tried and tested on my side. For TGMC SetMTMode(2,4) on my Phenom II X4 955 along with a Distributor() at the end of the script gives me a very nice boost.
aegisofrime is offline   Reply With Quote
Old 1st October 2009, 08:25   #210  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by aegisofrime View Post
... along with a Distributor() at the end of the script gives me a very nice boost.
Doesn't Distributor() get added automatically? (see here)
What effect does adding another one have?
Gavino is offline   Reply With Quote
Old 1st October 2009, 18:26   #211  |  Link
Bluedeep
Registered User
 
Join Date: Apr 2007
Posts: 6
Thank's for this version

Do you accept donations?
Bluedeep is offline   Reply With Quote
Old 1st October 2009, 19:11   #212  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by Bluedeep View Post
Thank's for this version
Your welcome.

Quote:
Originally Posted by Bluedeep View Post
Do you accept donations?
No.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 3rd October 2009, 22:14   #213  |  Link
BigDid
Actually in reserve
 
Join Date: Oct 2004
Posts: 1,605
Quote:
Originally Posted by aegisofrime View Post
... For TGMC SetMTMode(2,4) on my Phenom II X4 955 along with a Distributor() at the end of the script gives me a very nice boost.
Hi,

Glad for you but that doesn't give any numbers for comparison!?

Did
__________________
Having a problem with AutoGK? Read & use the FAQ & MORE FAQ first
Want to exchange on AutoGK? try doom10.org
In reserve (inactive) for an undefined period of time.
BigDid is offline   Reply With Quote
Old 4th October 2009, 04:45   #214  |  Link
thewebchat
Advanced Blogging
 
Join Date: May 2009
Posts: 480
To do parallel temporal processing, would it be reasonable to do something like this?
Code:
StackVertical(SelectEven,SelectOdd)
MT("filter",2,0)
Interleave(Crop(last.width,0,0,0-last.height/2),Crop(last.width,last.height/2,0,0))
Or maybe something like this?
Code:
AssumeFieldBased
Weave
MTi("filter")
SeparateFields
AssumeFrameBased

Last edited by thewebchat; 4th October 2009 at 04:48.
thewebchat is offline   Reply With Quote
Old 6th October 2009, 12:59   #215  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
thewebchat,

I couldn't tell you since I don't use that code.

Everybody,

I have updated the src and avisynth.dll and linked to them in the first post.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 6th October 2009, 16:00   #216  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 478
Quote:
Originally Posted by BigDid View Post
Hi,

Glad for you but that doesn't give any numbers for comparison!?

Did
My bad, wasn't keeping track of this thread.

As TGMC does take a while for the FPS numbers to more or less "settle down", I waited until 1 minute of processing to do a measurement.

Without Distributor()

Code:
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RepairSSE3.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\nnedi.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mt_masktools-25.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools2.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\MT.dll")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\TGMCAlpha_3.avsi")

SetMTMode(2,4)
DGDecode_mpeg2source("F:\Raws\Test.d2v",info=3,idct=5)
TempGaussMC_Alpha3(2, 1, 1, EdiMode="NNEDI2")
FPS: 5.89

With Distributor at the end,

Code:
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\RepairSSE3.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\nnedi.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mt_masktools-25.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\mvtools2.dll")
loadplugin("C:\Program Files (x86)\AviSynth 2.5\plugins\MT.dll")
import("C:\Program Files (x86)\AviSynth 2.5\plugins\TGMCAlpha_3.avsi")

SetMTMode(2,4)
DGDecode_mpeg2source("F:\Raws\Test.d2v",info=3,idct=5)
TempGaussMC_Alpha3(2, 1, 1, EdiMode="NNEDI2")

Distributor()
FPS: 14.1

Edit: I would like to clarify that the above results are with the pre-rendering job on MeGUI. Interestingly, if encoded with x264 @ CRF21 (that is, pre-rendering mode turned off), the speed difference shrinks to around 7 FPS for non-distributor and 7.5 FPS for Distributor O.o

I believe this is due to x264 actually being a bottleneck... Before anyone asks, the reason why I use pre-rendering is that I have noticed some filters require it. FFT3DGPU gives me crap when I do a TGMC 1 pass encode...

Last edited by aegisofrime; 6th October 2009 at 16:13.
aegisofrime is offline   Reply With Quote
Old 6th October 2009, 19:22   #217  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Jeremy Duncan View Post
October 6, 2009
I updated some files in the src, core folder. I got the new ones from SEt's 2.6 src. I read the bug fix he made in that 2.6 thread of his today and so decided to make a new dll with the fix and thought it would be cool to include other mt files from his src so I did.
I forget which ones though.
Do you realise how lame that sounds?
Don't you understand the importance of software configuration management to a project like this?
Gavino is offline   Reply With Quote
Old 6th October 2009, 19:26   #218  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
Quote:
Originally Posted by Gavino View Post
Don't you understand the importance of software configuration management to a project like this?
If you followed this thread from the beginning you would know the answer to that question.
Guest is offline   Reply With Quote
Old 7th October 2009, 01:38   #219  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by Gavino View Post
Do you realise how lame that sounds?
Don't you understand the importance of software configuration management to a project like this?
I know which files but I didn't want to be specific and say certain ones.

Here is the list I made in this link:
core folder

avisynth_c.cpp
cache.cpp
cachemt.cpp
main.cpp
mt.cpp
mt.h
softwire_helpers.cpp

I know it's not softwirehelpers. I think I tried main but that didn't work. One of the mt, I think mt.cpp didn't work. And I think avisynth_c didn't work either.
That leaves cache, cachemt and one of the mt files I ported from the 2.6 src to my 2.5.8 build.

The cachemt didn't work so I had to splice the new code into my old code and so it's a mix.
__________________
When I get tired during work with dvd stuff i think of River Tamm (Summer Glau's character). And the beauty that is Serenity.
Jeremy Duncan is offline   Reply With Quote
Old 20th October 2009, 00:08   #220  |  Link
Arshad07
Jeremy Duncan Fan
 
Arshad07's Avatar
 
Join Date: Aug 2008
Location: London, UK
Posts: 238
I'm getting an error while using MT although i've got c++ installed;

Error :
Quote:
this application has requested the Runtime to terminate it in an unusual way

Please contact the applications support team for more information
Arshad07 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 13:45.


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