@Kwag
I just did a small mod. on the new MA (as metioned in my first 2nd post in here)....
So it performs a permanent Unfiltering like already done in Kwag's new vers. but TempSoften will only perform on static scenes. Just for testing ...
Until now I didn't compared the final size output and Speed on full encoding tests. But a little Sampler based encoding test gave me these results:
- Old MA Script: 12409 Kbyte - 00:03:24
- New MA Script: 12042 Kbyte - 00:03:41
- The modified new MA Script below: 12136 kbyte - 00:03:29
(more filesize but sharper image cause of deleted Merge.. Lines.
Code:
## Main section and static filters ###
nf=0
#
Mpeg2Source("xxxxxxxxxxxxx.d2v")
#
Limiter()
asharp(1, 4)
GripCrop(xxx,yyy)
GripSize(resizer="BicubicResize")
STMedianFilter(3, 3, 1, 1 )
#
#
## Linear Motion Adaptive Filtering ##
#
## Permanent active Unfiltering
## Threshold based Temporasoftening only on static scenes
#
Ts = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
#
ScriptClip("nf = YDifferenceToNext()" +chr(13)+
\"unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)))"+
\"nf <= Ts ? TemporalSoften(round(2/nf), round(1/nf) , round(3/nf) , 15, 2): Undot()")
#
## Adding Borders & Letterboxing
#
GripBorders()
LetterBox(0,0,16,16)
Limiter()
#
#
## Functions ###
#
function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}
Maybe in this case it would be better to rise the "Ts" Values a bit so TempSoften also will handle scenes which are a bit "more than static"??!
Kwag, I recognised this evening the following: ...Why did you perform in the past and in your script now the fmin function on Tempsoften ... as in my opinion 2/nf never will result in more than 2!
TemporalSoften( fmin( round(2/nf), 6) .....
so the Threshold-"int f2" in the function set to a threshold value by 6 will never be reached?! Maybe on the other hand I'm really confused cause its already late ????
And whats about the comment of Digitall.doc?
That a rounded 2/5 could result as 0 radius on tempsoften??
Could this help?
Code:
....
...
...
TemporalSoften( fmax( round(2/nf), 1)......
.......
And therefore also adding below the script another function like this which will keep the radius at least at 1??
Code:
function fmax( int f1, int f2) {
return ( f1<f2 ) ? f2 : f1
}
Well in a case if I would rise the threshold which refers to the start of tempsoften to 5!
And thats also Digitall.doc what I see now when typing these lines!
As the threshold was set to not more than 4 in the old version this means
a max nf of 4 and therefore 2/nf as send as the radius value to tempsoften would be round(0.5)! And a rounded 0.5 will result in 1,.... so the Radius will at least set to 1.
PS: @ Audioslave
TemporalSoften(int clip, int radius, int luma_threshold, int chroma_threshold [, int scenechange] [, int mode])
Quote:
Originally Posted by Avisynth.org
int scenechange = Using this parameter will avoid blending across scene changes. 'n' defines the maximum average pixel change between frames. Good values for 'n' are between 5 and 30. Requires ISSE
int mode = An optional mode=2 parameter: It has a new and better way of blending frame and provides better quality. It is also much faster. mode=1 is default operation, and works as always.
|
And as we are using AVS in a version >= 2.51 its useful to switch to mode 2