Quantcast Avisynth: New MA Script Version? - digitalFAQ.com Forums [Archives]
  #1  
11-21-2003, 05:33 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Just a question Kwag, ...

Quote:
Originally Posted by Kwag
Now both filters are active at all times, and work inversely proportional to the activity.
If Unfilter(xxxx) now is active all the times .... shouldn't we delete at least
MergeLuma(blur(0.1)) ... to avoid double blurring on static scenes

Even if nf results as 1*2 in my experiences performing a unfilter(-2,-2) does break a little the edges?!


Just a thought.

Edit, ... ok I know Kwag want to avoid Kick-over's using the "both all time" activity. But if TemporalSoften performs all the time ... this on the other hand will slow down the performance?!
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  
11-21-2003, 05:36 AM
Boulder Boulder is offline
Free Member
 
Join Date: Sep 2002
Location: Lahti, Finland
Posts: 1,652
Thanks: 0
Thanked 0 Times in 0 Posts
That could also bring a nice speedup, I've noticed that blurring luma and chroma can be quite slow sometimes.
Reply With Quote
  #3  
11-21-2003, 05:47 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
My recommendation would be ... like Kwag did, a nf based Unfiltering active all the time to avoid "blur-kick-overs", BUT Temporalsoften based on a threshold ... this gives the same viewable quality and on the other hand on high nf based scenes it won't slow down the performance
Reply With Quote
  #4  
11-21-2003, 06:00 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
OK, nice, I suppose this will give the film a smoother aspect, with no filters kicking in and out.
Just a doubt: when nf is above 5, the TemporalSoften radius value will be 0, isn't it?. Does this mean that TemporalSoften will be inactive above nf=5, or will it be functioning but doing nothing, or even with a radius of 0 still has an effect?.
Yes, I know, newby question.
Reply With Quote
  #5  
11-21-2003, 06:04 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
One little thing about the script : the two last values of temporal soften aren't very clever if we look at the documantation :
Quote:
TemporalSoften(clip, int radius, int luma_threshold, int chroma_threshold, int "scenechange", 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. Requires ISSE. mode=1 is default operation, and works as always.
* An optional scenechange=n parameter: 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.

[Good initial values: TemporalSoften(4,4,8,15,2)]
Reply With Quote
  #6  
11-21-2003, 06:17 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
If Unfilter(xxxx) now is active all the times .... shouldn't we delete at least
MergeLuma(blur(0.1)) ... to avoid double blurring on static scenes
Yes. Go ahead and delete it. I'll update the script later today. It's not needed anymore.

-kwag
Reply With Quote
  #7  
11-21-2003, 06:19 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot
One little thing about the script : the two last values of temporal soften aren't very clever if we look at the documantation
Thanks Phil.
I guess the 1, 1 are stray values from previous versions of the filter
I'll run a couple of tests, and adjust that. Or go ahead and make a test, and let me know

-kwag
Reply With Quote
  #8  
11-21-2003, 06:23 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by DialHot
[Good initial values: TemporalSoften(4,4,8,15,2)]
Good hint Dialhot.

Thats why I also changed in the past the mode in the TempSoften of the MA routine in my cases to "2"
Reply With Quote
  #9  
11-21-2003, 06:27 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
I just remembered something
I (some people, and me too) HAD problems with parameters other than 1,1
They were specifically set to those values, because of weird artifacts during scene changes.
This was a while ago, so I have to make some tests. Somewhere in the forum it was documented. So I wouldn't mess with the last two parameters of TemporalSoften.

-kwag
Reply With Quote
  #10  
11-21-2003, 06:47 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
I feel so small between you all...
Please, someone to answer my silly question: radius value of 0 makes the filter not switch on, and if not, what's the effect of a radius of 0?. Maybe the answer is obvius, or in the dcumentation, but I think I didn't read that.
Reply With Quote
  #11  
11-21-2003, 07:09 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ Kwag

I just found this....
Could an older AVS (like 2.5) be the reason for your failed outputs using other than 1,1 in TemporalSoften?

Quote:
Changes to 2.51 Released
.....
- Fixed some compiler optimization errors with temporalsoften....
....
- Hopefully fixed jumping frame bugs in temporalsoften.
Reference: http://cultact-server.novi.dk/kpo/avisynth/avs_cvs.html

I don't know now if in > 2.51 more bug-fixes have been done in case of TemporalSoften. But Ill search in the earlier AVS Vers. Changes.

@ Digitall.doc

Code:
.... TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ....
Refering to MAs internal calculations it seems that there won't be a result of exact 0 refering to the Radius settings of TemporalSoften...!?

Kwag/Dialhot .... do I see this right???
Reply With Quote
  #12  
11-21-2003, 07:56 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Thanx incredible:
Quote:
Code:
.... TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ....


Refering to MAs internal calculations it seems that there won't be a result of exact 0 refering to the Radius settings of TemporalSoften...!?
Looking again at it I think with nf above 5, 2/nf is less than 0.4, and round(2/nf) will be 0, isn't it?. And, what will be the effect of a radius of 0?.

With reference to last MA script, I did some fast tests. Notice that the film is an analog videocamera capture, so I also use filters CNR2, viewfields and unviewfields. But I use these filters in all script tests:
Script Size (kb) Encoding time
MA TempSoften (x,x,x,1,1) 40866 7:26
MA TempSoften (x,x,x,0,2) 40868 7:39
new MA with MergeLuma 40854 8:05
new MA w/o MergeLuma 41367 7:32

Twp things else: the film is 2:07 min long, and created with TMPGEnc, as MPEG2, 528x576 size, CQ60
...not bad the new MA, and not that slow without mergeluma. I'll make later visual comparison (but I'm really the worst doing that)
Reply With Quote
  #13  
11-21-2003, 07:57 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
@ Kwag

I just found this....
Could an older AVS (like 2.5) be the reason for your failed outputs using other than 1,1 in TemporalSoften?

Quote:
Changes to 2.51 Released
.....
- Fixed some compiler optimization errors with temporalsoften....
....
- Hopefully fixed jumping frame bugs in temporalsoften.
YEAH
Thanks incredible
That confirms the bug we found a LOOOONG time ago
So feel free to change the last numbers. I'll update the script later.

-kwag
Reply With Quote
  #14  
11-21-2003, 08:00 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Here's what the new MA script does:
http://www.kvcd.net/new-ma.mpg
Sample is 720x480, CQ=63.48, to fit on one CD just like that
I used MIN=300, MAX=2000.

-kwag
Reply With Quote
  #15  
11-21-2003, 08:54 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Hugh... the result is AWFULL on my 21" PC monitor.

Look at the first scene, the "brown object" on the left bottom corner : it shrines from every edges ! And the surface is everything but uniform. Is that normal ?

Next, the girl switching some buttons in the cockpit of the spaceship : mosquitoes everywhere around her arms and shirt.

What the hell is that ? Okay the resolution is big, but I don't think is really a good thing to show as example
Reply With Quote
  #16  
11-21-2003, 09:21 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
BTW....
Especially to JellyGoose (and maybe some others)

If you also set at the beginning of the MA script a ml=x Variable as multiplicator instead of *2 in the unfilter part as I did in a -more blurring on action scenes MA mod - for testing (where I btw never go above 3 and only on selected movies) ---- kick that out! Cause in the new Release of MA where Unfilter() performs constant, no matter which nf results ... this would cause an unwanted! Over-Blur on static scenes!
Reply With Quote
  #17  
11-21-2003, 09:27 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Dialhot

What the hell is that ? Okay the resolution is big, but I don't think is really a good thing to show as example
That's exactly the point
It's 720x480, on one CD-R.
At 528x480, it's probably mosquitoless and totally blockless
But I wanted to stress the sample, as usual

-kwag
Reply With Quote
  #18  
11-21-2003, 09:31 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
Cause in the new Release of MA where Unfilter() performs constant, no matter which nf results ... this would cause an unwanted! Over-Blur on static scenes!
Yes I know, and that's why I mentioned earlier that the parameters have to be tweaked. However, as it is right now, it's not that bad if you use high resolutions. But probably for 352x it will look too blurred.
So the multiplying and dividing values here must be optimized.
Code:
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)  ")
Something to play with later

-kwag
Reply With Quote
  #19  
11-21-2003, 09:55 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Estas equivocado Kwag ,

these caution-lines in my posting above did refer to a modified version of MA where I had defined a ml variable as a multiplicator at the beginning!
And as I know that JellyGoose tested this too, I wanted to give him a hint.

example (but dangerous on many movies with static and detailed things in foreground and in the SAME scene fast (luma) changes in background!):
##############
nf=0
ml=3
...
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf)*ml, 100)), -(fmin(round(nf)*ml, 100)) ).TemporalSoften(fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1)* ")
##############

Reply With Quote
  #20  
11-21-2003, 10:23 AM
digitall.doc digitall.doc is offline
Free Member
 
Join Date: Jul 2003
Location: Valencia (España)
Posts: 741
Thanks: 0
Thanked 0 Times in 0 Posts
Hey incredible:
for tweaking purposes, and on that films you may want raise or lower the multiplier, you could use:
Code:
nf=0 
ml=2.3 
... 
ScriptClip(" nf = YDifferenceToNext()" +chr(13)+ "unfilter( -(fmin(round(nf*ml), 100)), -(fmin(round(nf*ml), 100)) ).TemporalSoften(fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1)  ")
This way you don't need to make a big step between 2 and 3.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth c_.dll Version 2.5? Blubear Avisynth Scripting 7 07-19-2004 03:24 AM
Avisynth: Which version is everyone using? bigggt Avisynth Scripting 6 02-14-2004 12:05 PM
KVCD: Use Version 2 script with TV captures? nicksteel Video Encoding and Conversion 5 10-29-2003 04:16 AM
Avisynth: which version should be used? Insider Avisynth Scripting 3 05-09-2003 03:39 PM
MovieStacker: What AVISynth version? BoxOfSnoo Video Encoding and Conversion 5 03-26-2003 10:09 PM

Thread Tools



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