digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Slowness of Smoother in MA Script? (http://www.digitalfaq.com/archives/avisynth/8020-avisynth-slowness-smoother.html)

cweb 02-03-2004 02:27 PM

Avisynth: Slowness of Smoother in MA Script?
 
I'm running the MA script on a test clip which happens to be a PAL mpeg2 (dvb-s). I'm deinterlacing using fielddeinterlace or tomsmocomp (no difference in terms of this problem).

The time taken in a CQMatic run is excessively long compared to the static script - yes I am using motion estimation as suggested on the forum. The time left grows rather than is reduced... very strange. It's 3 hours now for a small segment which usually takes 7 mins to encode.



in my version of the MA script (the same as the optimal one with the addition of the fielddeinterlace call and a conversion to RGB24 at the end)
plus I use the function(video,) form which is supposed to be slightly faster.

If I leave out the filter the speed is normal. But I want to filter. I might try fluxsmooth or Conv3d or MipSmooth - all of these might be worse actually in terms of speed!

cweb 02-03-2004 02:54 PM

BTW I'm using the latest Avisynth - now even the latest 2.5.5 alpha but the result is the same. The slowness seems to be derived from the Linear Motion Adaptive Filtering itself (without it the script is fast again). The cqmatic sample takes hours to encode rather than 7 minutes with my Athlon...

Dialhot 02-03-2004 04:38 PM

Hours ?
Check if the "ReadAVS" is setted in VFAPI tab of tmpgenc (see in environnemental settings).

Hours seems like you are using Directshow handler.

Add post your script please, I want to check it.

cweb 03-04-2004 03:29 PM

The problem probably was due to the recording not having too much 'action' scenes...

Well this was the MA-based script I had used at the time.. sorry for posting it late but I missed your reply! I did have lots of comments but I removed them for clarity. I do use some other things like undot() and dctfilter().
Yes, I usually don't use ReadAVS() - I did find ReadAvs() to be slower than directshow actually with static encodes (I haven't tried the MA or this script with ReadAVS() however, so perhaps I should try that...).



## Functions ###

function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}



video=mpeg2source("source.d2v")
video=FieldDeinterlace(video)
video=undot(video)

# left,top,-right,-bottom (or width,height)
video=Crop(video,0,4,-4,-0)

#KVCDx3 resize:
video=BicubicResize(video,512,512).undot()

video=STMedianFilter(video,3,3,1,1)
video=MergeChroma(video,blur(video,1.5))
video=MergeLuma(video,blur(video,0.1))

#with the motion adaptative script use Motion Estimation instead of High Quality

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual )
# This will apply variable temporalsoften
# and variable blur.
# Both filters are active at all times, and work inversely proportional to the
# activity, measured from current frame to next frame.

video=ScriptClip(video,"nf=YDifferenceToNext()"+ch r(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)")



video=DCTFilter(video,1,1,1,1,1,1,.5,0)


video=Undot(video).AddBorders(16,32,16,32) # KVCDx3
video=Limiter(video)
video=YV12toRGB24(video,interlaced=false)
video=FlipVertical(video) #YV12->BGR24 convertion natively flips image
video

Dialhot 03-04-2004 03:46 PM

Quote:

Originally Posted by cweb
I usually don't use ReadAVS() - I did find ReadAvs() to be slower than directshow actually with static encodes

NEVER EVER DO THAT !

By using directshow you can't control what is done on the picture as you are introducing potential post processing operations done by a lot of directshow filters like ffdshow.

Let avisynth control the process or you are screwing all the efforts we do in producing optimal scripts.

Quote:

video=mpeg2source("source.d2v")
Why do you start all your lines with "video" ? Not hurting, but I'm just curious.

Quote:

video=BicubicResize(video,512,512).undot()
[...]
video=Undot(video).AddBorders(16,32,16,32)
You completly screw up your aspect ratio by doing a square resizing like this ! And you do undot 2 times !

Quote:

video=YV12toRGB24(video,interlaced=false)
NO NEED TO DO THAT !!!


All times are GMT -5. The time now is 05:00 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2026 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2026 Jelsoft Enterprises Ltd.