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 7th February 2009, 22:49   #1  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
I made a mt 2.5.8 avisynth.dll and mt.dll

src
dlls
Microsoft Visual C++ 2008 Redistributable
msvcp71 and msvcp71 plugins

dlls. Updated january 10, 2010. These were compiled using the windows 7 sdk so it may be more compatible with windows 7.
________ Notes ________

\\\\\ Once installed. Reboot twice.

\\\\\ How do I use these new avisynth and mt dll's you made?
install avisynth 2.5.8
substitute the avisynth dll in windows\system32 folder with the one I made
ADD the mt.dll in C:\Program Files\AviSynth 2.5\plugins folder
done.

\\\\\ It's crashing on me.
Install the "Microsoft Visual C++ 2008 Redistributable"

\\\\\ It's crashing on me and I'm using a windows 32 bit os.
In the system32 folder is there the msvcp71 and msvcr71.dll?

\\\\\ It's crashing on me and I'm using a windows 64 bit os.
In the syswow64 folder is there the msvcp71 and msvcr71.dll?
In the syswow64folder is there a avisynth.dll?

\\\\ I can't build it?
I built them in windows 7 build 7100 on july 2, 2009. I ran visual studio as administrator.

\\\\ Your Avisynth makes the video ugly and the audio choppy.
Reboot. Before I thought that one dll compile build was different from the other. But I was wrong.

I was recompiling the dll everytime to get one that worked, but then I decided to just try removing the dll giving the ugly picture and choppy sound from the avisynth or system 32 folder, and put it on my desktop.
Then I put the dll back in either the system32 folder or the avisynth folder and it gave no ugly picture or choppy sound.

So for some reason when I put the mt or avisynth dll in the folder they should go into (mt in the avisynth folder and avisynth into the system32 folder), sometimes the video player gives ugly bad results.
Simply removing it from the folder and then putting it back in there fixes this, or you may leave it in there and just reboot and it will be fixed.

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: 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.

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: September 11, 2009

I fixed a bug gavino found and I added the mt in the file info tab that was requested.

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: August 17, 2009
I shrunk the avisynth.dll using upx.exe. The code I used with upx.exe is in the src distrib folder, nsi file. I use upx.exe version 3.3.0.0

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: August 16, 2009
I deleted this line from the main.cpp and avisynth.h in the src core folder:
#define Interlockedincrement _Interlockedincrement

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: July 22, 2009

This is second build on July 22. No, now it's july 23 2009.
What did I do?
I found much to my surprise the project wasn't calling all the files in the src folders. So I added those then spent some time optimizing the project settings, making sure mt.dll was made right and then posted them here.
I was going to use upx.exe to shrink the dlls but it didn't work like before, so I didn't shrink the file size this time.

Works pretty good though.

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: July 22, 2009
This is the build made on July 22, 2009 and not July 17 2009.
Look below to see previous changes I made.

I used the july 17 src and put SEt's stdafx.h file in there, before it was the japan one.
And I put my project settings in the include folder: softwire, soundtouch, pfc.

One other thing I did was shrink the file size.
I think shrinking it made it more stable.

When you install the avisynth dll, reboot Twice. I dunno why but rebooting twice helps make sure it's fine after that. Maybe I'm wrong?

And I'm using tsp's mt.dll in the dlls link above.

\\\\ What is different about these dll's than the other SEt builds you munkeyed around with?: July 17, 2009
What I did was find the different files between the SEt July 12 build and the original Japan src.
Then I guessed the files that SEt modified and the ones I did. It wasn't hard as my adjustments were of a base skill and SEt's were expert.

I then cross checked the ones I changed with the Japan src and the Japan src files were the same as the official avisynth 2.5.8 src.
So I switched the ones I changed for the japan src ones, and kept the ones SEt changed.
Then I kept the include libs: softwire, soundtouch, pfc from the japan version, and the stdafx from the japan version as well. I put all these into the SEt july 12 src.

I will post a list of the files different from the SEt july 12 src from the original japan src below.

This list I changed to the japan src version:

core parser folder
expression.cpp

filters folder
color.cpp
convolution.cpp
edit.cpp
focus.cpp
greyscale.cpp
histogram.cpp
layer.cpp
layer.h
levels.cpp
planeswap.cpp
resample.cpp
resize.cpp
transform.cpp

filters overlay, conditional folders

sources folder
source.cpp

sources, avi folder
AVIReadHandler.cpp

____________________________________________

This version I kept as they were altered by SEt:

Audio folder
audio.cpp ++
avs-soundtouch.cpp ++
supereq.cpp ++

core folder

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

filters folder
merge.cpp ++


\\\\ I did a comparison of my july 9th, july 11th, 5th version, and SE'ts version from his new thread.




Link to see pictures of the stats. In case the picture host is too slow or goes kaput.

\\\\ I wanna build my own. How do I do it?

Follow the instructions in this link: link


A.) You will need to use the sw in the link at the top of the link as the instructions for other versions are different.

B.) The youtube video showing avisynth compilation is for the official 2.5.8 version, not my mt version.
To compile my version you setup visul studio as shown in the video then unzip my src and change to release in configuration manager (in visual studio). Then you build the soundtouch, softwire, pfc then you build avisynth.dll

C.) when you build the softwire, soundtouch, pfc, avisynth.
Highlight the one your going to build then from the "build tab, project only, build only" on the top menu.
You build only the one thing at a time, or else you will get a bunch of errors and that's not cool.

D.)

1.) Once the dll is made then go to the avisynth src folder, release and get the avisynth dll and put it on your desktop.

2.) Then go and get the upx.exe from google, windows console version, and put the upx.exe on your desktop.

3.) Then open cmd prompt in admin and go to the desktop using the cd command as shown in the link to how to build the dll. Example: cd C:\Users\aye\Desktop

4.) Then with cmd prompt still open and both the upx.exe and avisynth dll on the desktop, in cmd prompt type: upx avisynth.dll
and then press enter and it will reduce the size of your dll!

5.) Then you put it in place of the other one in the system32 folder and reboot twice and then test your new dll.

Last edited by Jeremy Duncan; 10th January 2010 at 13:52.
Jeremy Duncan is offline   Reply With Quote
Old 9th February 2009, 22:35   #2  |  Link
@Tron@
Registered User
 
Join Date: Nov 2008
Posts: 24
Fully agree with the previous speaker!
Very useful to MT version avisynth 2.5.8 But I think no one will be taken for this as it is a long and laborious process!

Few will be able to change and adjust to avisint in MT and therefore unnecessary to wait and hope (at least for this year is already accurately) just so many unnecessary and all here (in the process remake MT)
@Tron@ is offline   Reply With Quote
Old 10th February 2009, 07:17   #3  |  Link
lych_necross
ZZZzzzz...
 
lych_necross's Avatar
 
Join Date: Jan 2007
Location: USA
Posts: 303

This has already been discussed. The MT mod will be integrated into Avisynth in version 2.6.0. I wouldn't expect MT to be updated for 2.5.8 as it is currently based on 2.5.7.5.
lych_necross is offline   Reply With Quote
Old 16th February 2009, 06:40   #4  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Older stable versions of my avisynth builds and src's:

July 12th

src
dlls

July 23, 2009
src
dlls

August 17, 2009
src
dlls

September 11, 2009
src
dlls

Last edited by Jeremy Duncan; 6th October 2009 at 12:54. Reason: These are the old versions of the mt dll and src
Jeremy Duncan is offline   Reply With Quote
Old 16th February 2009, 15:46   #5  |  Link
gator1102
Registered User
 
Join Date: Sep 2006
Posts: 4
http://seraphy.fam.cx/~seraphy/
http://seraphy.fam.cx/~seraphy/cgi-b...&space=15&no=0
http://seraphy.fam.cx/~seraphy/cgi-b...visynth258.rar

Last edited by gator1102; 16th February 2009 at 15:53.
gator1102 is offline   Reply With Quote
Old 16th February 2009, 17:56   #6  |  Link
@Tron@
Registered User
 
Join Date: Nov 2008
Posts: 24

Is it true !? Wow !!! BIG THX !!!

Now testing it !
@Tron@ is offline   Reply With Quote
Old 16th February 2009, 18:39   #7  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
online translation 1 (excite)
Code:
DustMT Avisynth2.5.8 - contribution person/seraphy@ curator - (2009/01/12 (Mon) 13:21:43
 
DustV5 MT conversion of remodelling (with the society you call DustMT selfishly, it seems) is, 
but It became unable to use the environment of the house by moving to Avisynth 2.5.8.5. 
So, still as for tsp, as Avisynth.dll of MT correspondence (2.5.8) release not done. 
http://forum.doom9.org/showthread.php?p=660247#poststop 
Because is, taking diff of 2.5.7 and 2.5.7MT, it tried applying to 2.5.8 selfishly. 
As for me as for the source of Avisynth you have not read seriously because and, 
you do not read either the MT conversion tsp securely, whether or not it does properly, it does not guarantee. 
Only the one which it can cope entirely on self responsibility please utilize. 
Rash is different from courage. 
It will wait wise one for the correspondence tsp. 
By the way, because it compiles this with VC2008, (the birthplace VC6 kana? ) Execution time becomes necessary.
online translation 2 (babel fish):
Code:
- Contributor/ Seraphy@ manager -(2009/01/12(Mon) 13:21:43) 
	
Without permission it is making remodeling (It seems to be called DustMT on the street) DustV5 MT
It is not possible to use it by having shifted the environment of the house to Avisynth 2.5.8.5. 
And Avisynth.dll(2.5.8) for MT has not been released to Mr. tsp yet. 
http://forum.doom9.org/showthread.php?p=660247#poststop

Diff of, 2.5.7, and 2.5.7MT was taken and it applied it to 2.5.8 without permission. 
I seriously read the source of Avisynth, do not exist, and : because I do not firmly read Mr. tsp's making to MT. 
It is not secured can tidy. 
Please use can only all actions by the self-responsibility. 
Courage and rashness are different. Wise one waits for Mr. tsp's correspondence. 

By the way, because here is compiled with VC2008 (Is the head of the house VC6?), run time is needed.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 16th February 2009, 20:06   #8  |  Link
@Tron@
Registered User
 
Join Date: Nov 2008
Posts: 24
Quote:
Originally Posted by Fizick View Post
online translation 1 (excite)
So ... its not full version ((((((9 Very bad ...

@Tron@ is offline   Reply With Quote
Old 16th February 2009, 23:31   #9  |  Link
Razorholt
Cyberspace Citizen
 
Razorholt's Avatar
 
Join Date: Nov 2005
Posts: 457
@Tron: did you try it yet?
Razorholt is offline   Reply With Quote
Old 17th February 2009, 00:08   #10  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
i'm going to try this out because the machine translation told me it's better to be rash than courageous
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 17th February 2009, 15:11   #11  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
Quote:
Originally Posted by Razorholt View Post
@Tron: did you try it yet?
I tried it, and it really works.

No problems playing ffdshow avisynth in realtime with this new mt.

I tried seesaw, lsf, spresso, and mvtools v2 frame doubler.

I have a new upload of it if you don't want to unzip a rar.
link

I will wait and hope somebody looks at the code to make sure it's safe before I use it and link to it in the guide i made.
I have since ghosted my pc to a earlier state since I tested this grand mt this kind fellow made.

Many thanks mr or ms gator1102
Jeremy Duncan is offline   Reply With Quote
Old 17th February 2009, 19:11   #12  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
It seems, there is no source code explicitlly posted
Fizick is offline   Reply With Quote
Old 18th February 2009, 11:28   #13  |  Link
lych_necross
ZZZzzzz...
 
lych_necross's Avatar
 
Join Date: Jan 2007
Location: USA
Posts: 303
Woops... source is now posted... nevermind

Last edited by lych_necross; 19th February 2009 at 12:22. Reason: i was mistaken
lych_necross is offline   Reply With Quote
Old 18th February 2009, 16:04   #14  |  Link
MfA
Registered User
 
Join Date: Mar 2002
Posts: 1,075
Have you tried simply asking him for the source code?
MfA is offline   Reply With Quote
Old 18th February 2009, 21:39   #15  |  Link
RedDwarf1
RedDwarf Fan
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 198
Would be nice if it works.

Last edited by RedDwarf1; 2nd March 2009 at 22:09.
RedDwarf1 is offline   Reply With Quote
Old 18th February 2009, 23:29   #16  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
It works I already have fairly good CPU utilisation, but with this it make it almost perfect, and it shows in the higher fps of encoding speed. I take it this doesn't affect the output too much?
burfadel is offline   Reply With Quote
Old 19th February 2009, 00:48   #17  |  Link
cyberbeing
Broadband Junkie
 
Join Date: Oct 2005
Posts: 1,859
The source code is now available here: http://seraphy.fam.cx/~seraphy/cgi-b...synth258MT.zip
Quote:
Originally Posted by seraphy
Source is here.
I don't think to post on the Doom9's Forum. (I'm not a member.)

These were modified based on the tsp's Patch,
but can't guarantee to work correctly because I don't understand the content of the change well.
Please use this at your own risk. ;-)
cyberbeing is offline   Reply With Quote
Old 19th February 2009, 17:40   #18  |  Link
Jeremy Duncan
Didée Fan
 
Jeremy Duncan's Avatar
 
Join Date: Feb 2006
Location: Canada
Posts: 1,079
I can't see any avisynth file that shows major changes from the 2.5.8
And some files are in a format I can't open.

If you would be so kind as to find a avisynth with the changes this fellow made to it, and post it in c++.

Jeremy Duncan is offline   Reply With Quote
Old 20th February 2009, 07:29   #19  |  Link
lych_necross
ZZZzzzz...
 
lych_necross's Avatar
 
Join Date: Jan 2007
Location: USA
Posts: 303
You need Visual Studio to open the project files. Other than that, all of the files can be read with either wordpad or notepad.
lych_necross is offline   Reply With Quote
Old 20th February 2009, 09:07   #20  |  Link
burfadel
Registered User
 
Join Date: Aug 2006
Posts: 2,229
The reason why this peaked my curiosity is I just got a Q9400 as an upgrade to my E6600 CPU a couple of days ago.

It works for me, although I don't use complex lengthy avisynth scripts. Just RemovegrainHD, spline64resize, gradfun2db, crop etc

On a sidenote I do believe in using gradfun2db before encoding, it not only takes out banding but other colour distortions too (with a threshold of around 1.6 is what I use). For re-encoding XVID/DIVX around 3. Not only do I believe the output looks better, but at least the encoder isn't trying to encode the banding and colour distortion (or abberations?)! Slight Debanding can also be used during playback

The settings I use for the MT is just the basic:

SetMTmode(2,4)

With 4 threads of course because of it being a quad core.

This is the very first line of the avisynth script (well filter list, as using Staxrip), and thats all thats different.

I believe using the combined functions such as
Filter().Filter2(...

Is a bad idea with the MT avisynth as the combined function will be passed as a complete fuction, and not separate functions and threads (so you negate the benefit)?

I do realise SetMTmode(1,4) would be faster but that has compatibility issues with most filters, and the benefit would be almost none I believe over using SetMTmode(2,4).

If you have a an avisynth filter list that isn't too taxing, and slow x264 settings its probably not that beneficial for older CPU's or even more modern dual cores (including the E8xxx). The Avisnth ratio is 1 thread to 2 (in terms of encoding potential). Since x264 for example can make use of 4 threads, the ratio between avisynth and x264 is 1:4, meaning unless you have an extremely fast avisynth filter list x264 is waiting for data from Avisynth.

This is an over-simplification, but consider that even if a dual core was ten times faster than those today, it just means the avisynth filters can run ten times as fast and still pass the frames on to x264 which, although is also running 10 times as fast can still only process at a ratio of 1:2!

If you use fast enough encoder settings on dual core that the encoder has to wait for the avisynth input, it would be beneficial to increase the encoder settings to make use of the CPU time and the loss of encoding speed won't be too excessive.

The only time on a dual core where I see the multithreading patch to be effective is when you have a very complex and slow script, or using a fast encoder.

I use very high settings for my encoding, so this probably becomes more visible if you use still quite reasonable settings. I think the key point when trialling this patch is to encode a couple minutes of a clip, with the typical input type and encoder settings that you usually use, and check the fps you achieve for the encoder. Then try the MT, and do the same. The cpu utilisation may not be a good indication of improved performance. If the encoder is the limiting factor, increasing the speed of avisynth won't give you any benefit and could potentially slightly slow down the system due to thread utilisation (from what I've heard), if Avisynth is the limiting factor then this patch will give you potentially a nice boost

Last edited by burfadel; 20th February 2009 at 09:25.
burfadel 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 17:14.


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