Quantcast Avisynth: Stmedianfilter Slowdown? - digitalFAQ.com Forums [Archives]
  #1  
01-13-2006, 01:25 PM
scrappy scrappy is offline
Free Member
 
Join Date: Jan 2005
Location: Yorkshire, England
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Hi

This is more than likely another daft question but...

If I use the MA script as it stands with STMedianFilter the encoding speed is crippled. HCE for instance can run through at 40+ fps with that line commented out, if I leave it in it drops to ~3 fps which is a hugh drop. It also effects CCE which ends up with encoding times that make TMPGEnc look positively incredible, speed wise.

I used to do encoding on an Athlon 2600+ and I do not recall this happening but I recently ditched that PC and replaced it with a Opteron box, memory isn't an issue (2gb) in case thats relevant, though just to make sure it wasn't an AMD thing I also tried this out on a spare 3ghz P4 Prescott PC and the same thing happens on that.

Any ideas?

For reference the version of the filter I have is 0.1.0.3
__________________
Mark
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
01-13-2006, 04:27 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
You probably have the memory alignement problem already reported.
Update your avisynth version (lastest is 2.5.6a) and if this does not work, add the parameter ",true" at the end of the crop line (do you have a crop line in your script ?)
Reply With Quote
  #3  
01-13-2006, 05:25 PM
scrappy scrappy is offline
Free Member
 
Join Date: Jan 2005
Location: Yorkshire, England
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
The version of Avisynth is 2.5.6a, the dll reports its version as 2.5.6 but I just re-downloaded and re-installed it to make sure, no change.

The script I'm using is the one below. It's essentially the MA script with the GripFit stuff removed and replaced with values obtained from PARanoia for a resizer and the borders. I've left the STMedianFilter line in place but commented out, as it stands this runs pretty quickly, if I uncomment the line.. slow becomes an understatement.

Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\dgdecode.dll")

MPEG2Source("E:\Encodes\SG1S9EP11.d2v")

undot() 
asharp(1, 4) 
BicubicResize(352,448,1./3.,1./3.,14,72,678,432)
#STMedianFilter(3, 3, 1, 1 ) 
MergeChroma(blur(1.5)) 
MergeLuma(blur(0.1))

ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ \
   "unfilter( -(fmin(round(nf)*2, 100)), \
   -(fmin(round(nf)*2, 100)) ).TemporalSoften( fmin( round(2/nf), 6), \
   round(1/nf) , round(3/nf) , 1, 1)  ") 

Addborders(0,64,0,64)
ConvertToYV12()

function fmin( int f1, int f2) { 
  return ( f1<f2 ) ? f1 : f2 
}
EDIT: Just been reading up on this memory alignment bug you mentioned and I now understand what you meant by having a crop line in the script. Having just added that right after the mpeg2source line it appears to have fixed it

Thanks for the nudge in the right direction, much obliged to you
__________________
Mark
Reply With Quote
  #4  
01-13-2006, 07:21 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
You're welcome
Reply With Quote
  #5  
01-25-2006, 10:48 PM
supermule supermule is offline
Free Member
 
Join Date: Sep 2005
Location: Donkeyland
Posts: 210
Thanks: 0
Thanked 0 Times in 0 Posts
Btw, what does STMedian filter does in layman terms ???
Reply With Quote
  #6  
01-26-2006, 04:51 AM
gamma gamma is offline
Free Member
 
Join Date: Nov 2003
Location: Rotterdam (The Netherlands)
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by supermule
Btw, what does STMedian filter does in layman terms ???
STMedianFilter is a (slightly motion compensated) spatial/temporal median filter.
Reply With Quote
  #7  
01-30-2006, 02:49 PM
scrappy scrappy is offline
Free Member
 
Join Date: Jan 2005
Location: Yorkshire, England
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Probably shouldn't just followup this but anyway...

Anybody know of a decent alternative to STMedianFilter ?
__________________
Mark
Reply With Quote
  #8  
01-31-2006, 01:08 AM
supermule supermule is offline
Free Member
 
Join Date: Sep 2005
Location: Donkeyland
Posts: 210
Thanks: 0
Thanked 0 Times in 0 Posts
degrainmedian() by fizik, although I found it to be slightly slower than the STmedian.
Reply With Quote
  #9  
01-31-2006, 04:27 AM
gamma gamma is offline
Free Member
 
Join Date: Nov 2003
Location: Rotterdam (The Netherlands)
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by scrappy
Probably shouldn't just followup this but anyway...

Anybody know of a decent alternative to STMedianFilter ?
I suggest looking into LRemovedust(), in your case this will replace both undot() and stmedian. You'll have to use it before the asharp line (assuming you use the MA script as you posted earlier)
Reply With Quote
  #10  
01-31-2006, 01:41 PM
scrappy scrappy is offline
Free Member
 
Join Date: Jan 2005
Location: Yorkshire, England
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Thankyou, I'll have a go with both
__________________
Mark
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: STMedianFilter in the Latest Scripts For VHS and captures? dongxu Avisynth Scripting 3 02-26-2004 09:51 AM
Avisynth: STMedianFilter v 0.1.1 (YV12 bug fix) jorel Avisynth Scripting 0 06-22-2003 07:00 AM
Avisynth: StMedianFilter + TemporalSoften Dialhot Avisynth Scripting 2 06-19-2003 09:38 AM
Avisynth: Death of STMedianFilter Kane Avisynth Scripting 85 05-28-2003 05:37 PM
SLowdown on playback? won hung tu lo Players, DVRs, Media Centers 7 02-20-2003 03:10 PM

Thread Tools



 
All times are GMT -5. The time now is 04:41 PM  —  vBulletin © Jelsoft Enterprises Ltd