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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th December 2005, 00:47   #161  |  Link
shpitz
Registered User
 
Join Date: Sep 2004
Posts: 113
usually disabling HT gives a little boost in performance in some apps since it reduces the overhead like you said, since HT is not really 2 physical cpus...

so what you're saying is that if i just use the modified avisynth and set mtmode in the script it should be enough and therefore using mt() is redundant then?
shpitz is offline   Reply With Quote
Old 7th December 2005, 01:22   #162  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
yes but some filters works better with mt() like fft3dfilter while others that depends on information about the whole frame(like motion compensation or smart deinterlacers) work better with setmtmode. It's possible to use both in the same script.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 7th December 2005, 01:30   #163  |  Link
mg262
Clouded
 
mg262's Avatar
 
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
A thought for the long run: it would be nice if filters had some way to indicate to the environment what MT modes they were compatible with.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed.
mg262 is offline   Reply With Quote
Old 7th December 2005, 01:41   #164  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
mg262: the filters can call env->SetMTMode(int mode,int threads,bool temporary)
where mode is the requested mode, threads can be ignored(only used by SetMTMode), temporary indicate if the mode change only should be applied to this filter.
If multithreading is not enabled this command will do nothing.
It also possible to get the current mode by calling env->GetMTMode(bool return_nthreads)
set return_nthreads to return the number of threads created if false then the current mode is returned.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/

Last edited by tsp; 8th December 2005 at 21:55.
tsp is offline   Reply With Quote
Old 7th December 2005, 22:12   #165  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
I get a Script error: there is no function named "SetMTMode"

I put MT.dll in my avisynth plugin directory, and I put the avisynth.dll in my windows\system32 directory which overwrote the stock avisynth.dll

here is my script

LoadPlugin("C:\Program Files\dgindex\DGDecode.dll")

SetMTMode(2)

video = mpeg2source("fm2.d2v")
video = video.DeDot()
video = video.AssumeTFF()
interp = video.separatefields().selecteven().EEDI2(field = 1)
video = video.tdeint(edeint=interp)
video = video.MT("FFT3DFilter(sigma=3, plane=4, bt=4, sharpen=0.7)", avisynthTS=true)
video = video.crop(4, 0, -4, -4)
video = video.LanczosResize(512, 384)

return video
puffpio is offline   Reply With Quote
Old 7th December 2005, 22:22   #166  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
btw i tried rebooting in case the old avisynth was still in memory..I also searched my hard drive and that is the only location that avisynth.dll exists
puffpio is offline   Reply With Quote
Old 7th December 2005, 22:24   #167  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
woot got it to work..

tsp: the avisynth.dll in your MT_041.zip is NOT the multithreaded version... :P
puffpio is offline   Reply With Quote
Old 7th December 2005, 23:39   #168  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Quote:
Originally Posted by puffpio
woot got it to work..

tsp: the avisynth.dll in your MT_041.zip is NOT the multithreaded version... :P
it just the version before I implemented SetMTMode
also try this version
Code:
LoadPlugin("C:\Program Files\dgindex\DGDecode.dll")

SetMTMode(2)

video = mpeg2source("fm2.d2v")
video = video.DeDot()
video = video.AssumeTFF()
interp = video.separatefields().selecteven().EEDI2(field = 1)
video = video.tdeint(edeint=interp)
SetMTmode(6)
video = video.MT("FFT3DFilter(sigma=3, plane=4, bt=4, sharpen=0.7)", avisynthTS=true)
SetMTMode(2)
video = video.crop(4, 0, -4, -4)
video = video.LanczosResize(512, 384)

return video
because MT does it's own multithreading (it creates it's own thread) so it wouldn't take advantage of SetMTMode(2).
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 8th December 2005, 14:24   #169  |  Link
Badness
Registered User
 
Join Date: Mar 2003
Posts: 18
Dual XeoN 3.6
2 Gigs DDR2
Sata 250 hard drive
avisynth256MT3 Encoding XviD
HD Source 1920X1080

SetMTMode(2)
LoadPlugin("C:\Program Files (x86)\AutoGK\DGMPGDec\dgdecode.dll")
mpeg2source("D:\Work\test.d2v")
crop(4,4,-4,-8)
LanczosResize(1280,720)

MT Enabled FPS - 15.938
MT Disabled FPS - 19.262

So what am I doing wrong here? It runs at 100% CPU with the MT enabled but still slower than with the MT disabled. Disabled only uses 40% CPU. I really wish I could get full use out of this sucker.
__________________
Badness
Badness is offline   Reply With Quote
Old 8th December 2005, 14:42   #170  |  Link
shpitz
Registered User
 
Join Date: Sep 2004
Posts: 113
Quote:
Originally Posted by Badness
Dual XeoN 3.6
2 Gigs DDR2
Sata 250 hard drive
avisynth256MT3 Encoding XviD
HD Source 1920X1080

SetMTMode(2)
LoadPlugin("C:\Program Files (x86)\AutoGK\DGMPGDec\dgdecode.dll")
mpeg2source("D:\Work\test.d2v")
crop(4,4,-4,-8)
LanczosResize(1280,720)

MT Enabled FPS - 15.938
MT Disabled FPS - 19.262

So what am I doing wrong here? It runs at 100% CPU with the MT enabled but still slower than with the MT disabled. Disabled only uses 40% CPU. I really wish I could get full use out of this sucker.
exactly what i'm reporting above.

which os are you running? xp x64 or 2k3 x64?

also, why you are not deinterlacing? 1080i is interlaced...
shpitz is offline   Reply With Quote
Old 8th December 2005, 21:58   #171  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
shpitz, Badness: If you encode to Huffyuv or MJPEG is the framerate still slower with MT enabled?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 8th December 2005, 23:52   #172  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
I tried using SetMTMode(6) before the FFT3DFilter but it crashed the encode after 200-300 frames.

I'm on a P4 w/ HT so I just decided to go back to disabling HT and running everything w/o MT to be safe.
puffpio is offline   Reply With Quote
Old 9th December 2005, 00:55   #173  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
puffpio: thanks for trying. I will try and see if I can reproduce it. Oh and no need to disable HT as long as you don't use SetMTMode()/MT()
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th December 2005, 03:25   #174  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
if i dont disable HT, then I will not be able to achieve 100% CPU utilization correct? Or is that just not represented correctly in the task manager?
puffpio is offline   Reply With Quote
Old 9th December 2005, 07:06   #175  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Perhaps this issue is related to this issue and not MT.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.
Revgen is offline   Reply With Quote
Old 9th December 2005, 07:16   #176  |  Link
Badness
Registered User
 
Join Date: Mar 2003
Posts: 18
Quote:
Originally Posted by shpitz
exactly what i'm reporting above.

which os are you running? xp x64 or 2k3 x64?

also, why you are not deinterlacing? 1080i is interlaced...

OS is XP X64
Shotime Directv HD even though it is 1080 is 99% Straight Film.
Same with HBO.

Why, I dont know, but always has been. And my test clip was off shotime.
__________________
Badness
Badness is offline   Reply With Quote
Old 9th December 2005, 15:20   #177  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
Quote:
Originally Posted by puffpio
if i dont disable HT, then I will not be able to achieve 100% CPU utilization correct? Or is that just not represented correctly in the task manager?
remember that the utilization represent two cores when using HT so that 50% utilization with HT = 100% utilization without HT (that is of course not entirely true because the second core is virtual) so allways look at the speed first and ulitization second (like these dual xeon users that gets higher cpu utilization but slower speed).
Else try to just use MT with fft3dfilter and don't use SetMTMode. That should work.
Quote:
Originally Posted by revgen
Perhaps this issue is related to this issue and not MT.
might be some of the explanation. But this seems to happend with the more "simple" avisynth scripts. Revgen could you try and see if you get the same result as Badness with his script on your X2?
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp is offline   Reply With Quote
Old 9th December 2005, 17:23   #178  |  Link
Revgen
Registered User
 
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,545
Quote:
Originally Posted by tsp
might be some of the explanation. But this seems to happend with the more "simple" avisynth scripts. Revgen could you try and see if you get the same result as Badness with his script on your X2?
You know what, I just looked at Badass' post and realized that he was encoding his video to Xvid. Seems like this Xvid issue doesn't discriminate against Intel procs either. The fact that he's trying to encode at 1280x720 probably amplifies the problem. I'll try a test with the 1080 material I have and see if it is the same problem for me.

I was too tired last night to notice.

@shpitz and puffpio

Are you guys trying to encode to Xvid? The Xvid issues are documented earlier in the thread for you to digest. If not than I'll try your scripts and see if I have any success.

@all

Anybody having issues with MT should try encoding to X264 instead of Xvid and see if your performance decreases continue.
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake?

Curly: Burned at the stake!

Moe: Why?

Curly: A hot steak is always better than a cold chop.

Last edited by Revgen; 9th December 2005 at 17:28.
Revgen is offline   Reply With Quote
Old 9th December 2005, 18:53   #179  |  Link
puffpio
Registered User
 
Join Date: Nov 2001
Posts: 176
revgen: I was encding to x264 w/ sharktooth's insane profile and setting the # of threads to 2
puffpio is offline   Reply With Quote
Old 9th December 2005, 23:25   #180  |  Link
tsp
Registered User
 
tsp's Avatar
 
Join Date: Aug 2004
Location: Denmark
Posts: 807
puffpio: You don't get 100% cpu utilization with that setting? Anyway I tested the script on my dual celeron. tdeint and Dedot didn't work because my celerons don't have integer sse. Altso it looks like fft3dfilter 1.8.5 and MT together is causing some problems (it works without mt and with SetMTmode(2)). I will try an older version and see if that helps.

Revgen: I totally forgot about the XviD issues. Koroshiya didn't have this problem when encoding to XviD from DivX.
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/
tsp 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 12:52.


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