Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

Pages: (2) [1] 2  ( Go to first unread post )
Avisynth Filters, Levels, Spatialsoften, TemporalSoften
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
cricket
Posted: Jun 1 2004, 05:01 AM


Advanced Member


Group: Members
Posts: 106
Member No.: 9712
Joined: 6-April 04



Hi,
I have been going through the descriptions and parameters of these filters e.g. Levels, Spatialsoften, TemporalSoften for Avisynth2.5 however I was not able to follow the explanations there. Here is one of the links:
http://www.avisynth.org/index.php?page=Levels

Can someone in this forum explain the parameters of these filters in plain English please?
 
     Top
i4004
Posted: Jun 1 2004, 08:52 AM


Advanced Member


Group: Members
Posts: 2432
Member No.: 4935
Joined: 24-June 03



no,levels cannot be explained in any language...( smile.gif )

how about trying the 'tweak'?
that's easy to explain....same thing as controls on your tv-set...

these softeners are not ideal....
temporalsoften is worse than temporalsmoother(found in dividee's mpeg2dec.dll)
spatialsoften?uhm....
smartsmootherhiq
or
vaguedenoiser

these filters blur the differences across the frame(spatial) or across a bunch of frames ie on time axis(temporal)

--------------------
my signature:
user posted image
 
     Top
cricket
Posted: Jun 1 2004, 10:05 PM


Advanced Member


Group: Members
Posts: 106
Member No.: 9712
Joined: 6-April 04



Surely someone would know about Levels in Avisynth. what I am really trying not to do any processing otherthan encoding in Vdub. As you all know Vdub needs RGB input to use it's filters hence Video:Full Processing Mode where as if I use only Avisynth Filters/plugins I can use Video:fast Recompress which is musch faster than Full Processing Mode...
 
     Top
neuron2
Posted: Jun 1 2004, 10:44 PM


Advanced Member


Group: Members
Posts: 1244
Member No.: 5294
Joined: 18-July 03



Be specific about what you don't understand in the documentation. Then we can help you.
 
    Top
trevlac
Posted: Jun 2 2004, 02:04 AM


Advanced Member


Group: Members
Posts: 176
Member No.: 8501
Joined: 26-January 04



QUOTE (cricket @ Jun 1 2004, 04:05 PM)
Surely someone would know about Levels in Avisynth. what I am really trying not to do any processing otherthan encoding in Vdub. As you all know Vdub needs RGB input to use it's filters hence Video:Full Processing Mode where as if I use only Avisynth Filters/plugins I can use Video:fast Recompress which is musch faster than Full Processing Mode...

Levels:

Imagine a pixel can have a brightness value from 0-255. 0 being black, and 255 being white. If you tell levels that your input range is 16-235 and you want an output range of 0-255, it will remap your pixels and stretch the range for you.

In effect, this is like lowering the brightness (by 16) and increasing the contrast (by about 1.16 times).

Problem with levels is that it effects the color components (not just the luma). I'd use tweak like i4004 said. Works like the knobs on your tv.

If this is not enough, the VirtualDub internal levels filter works just like the Avisynth one (except you can target luma only). AND Avery was nice enough to supply a help file. smile.gif
 
     Top
cricket
Posted: Jun 2 2004, 05:12 AM


Advanced Member


Group: Members
Posts: 106
Member No.: 9712
Joined: 6-April 04



Many thanks Trelac.

And to you Neuron2. I will just first copy how it is explained in Avisynth.org:

Levels(clip input, int input_low, float gamma, int input_high, int output_low,int output_high, bool coring)

The Levels filter adjusts brightness, contrast, and gamma. The input_low and input_high parameters determine what input pixel values are treated as pure black and pure white; the output_low and output_high parameters determine the output values corresponding to black and white; and the gamma parameter controls the degree of nonlinearity in the conversion.


Take another example: The following one is from: Decomb Plugin for Avisynth 2.5
(Version 5.1.1)
Reference Manual
by Donald A. Graft

Telecide(parameter_list)
Commonly used parameters

order (0-1, default none!) defines the field order of the clip. It is very important to set this correctly. The User Manual specifies a reliable procedure for doing so. Use order=0 for bottom field first (bff). Use order=1 for top field first (tff). You must specify order; Decomb throws an exception if you omit this parameter.

guide (0-3, default 0) can be used to improve field matching when the source clip is known to be PAL or NTSC telecined material. To disable this option (blind field matching), set guide=0. For NTSC 24fps->30fps telecine guidance, set guide=1. For simple PAL guidance (tries to maintain lock to the field phase), set guide=2. For NTSC 25fps->30fps telecine guidance, set guide=3.

When this option is enabled, Telecide() can overrule a field match decision and use a predicted match based on the recent clip past and future. The gthresh parameter (below) is used to define how small a discrepancy between the predicted and calculated field matches is required to accept and use the prediction. Do not enable this option unless you know that the source clip corresponds to the selected guidance mode. If in doubt, leave guide=0.

Note that this feature uses Avisynth random frame access, so it works fine when the user uses random timeline navigation.

gthresh (0.0-100.0, default 10.0) defines how large a discrepancy (in percent) between the predicted and calculated field matches is required to reset the pattern. Use the show option, if required, to appropriately tweak this threshold. The show and/or debug output will indicate which matches have been overridden. Overridden matches are denoted with an asterisk, e.g., "in-pattern*".

_______________

I found Donald Graft's explanation much easier to follow. Anyway all what I am trying to say that quite often the Avisynth script explanation is difficult to follow, atlest to me it is difficult.

Many thanks


 
     Top
rfmmars
Posted: Jun 2 2004, 06:22 AM


Advanced Member


Group: Members
Posts: 324
Member No.: 5438
Joined: 29-July 03



What I would do for a better understanding of some of Avisynth's topics is to use Virtualdub's same type filters and play with the numbers there to get a feel for a filters. I have been in video for over 30 years, but I too have a problem dealing with alot of the manual pages for Avisynth.

I try to download every script that is posted, and when I have the time, I try them out. As they says "a picture is worth a thousand words" Doing it in VD gives you that picture.

richard
www.photorecall.net
 
     Top
cricket
Posted: Jun 2 2004, 07:40 AM


Advanced Member


Group: Members
Posts: 106
Member No.: 9712
Joined: 6-April 04



thanks dude..I am with u on that
 
     Top
i4004
Posted: Jun 2 2004, 08:54 AM


Advanced Member


Group: Members
Posts: 2432
Member No.: 4935
Joined: 24-June 03



yes,neuron2...who are you to mess with donald a. graft's stuff anyway?

smile.gif

(somehow i like this 'mild' smileys!)

ps(edit)
QUOTE
As they says "a picture is worth a thousand words"

nope!
these forums say that's not correct,and that poeple like to talk...

i don't like that sentence..never did....
in this example it sucks too;looking at those sliders and image..he won't have a clue what and how are levels working...(not kidding)
but actually reading trevlac's(he said graft's too...although i dunno what does telecide has to do with levels... biggrin.gif ) stuff..).he'll get it ok...

--------------------
my signature:
user posted image
 
     Top
Wilbert
Posted: Jun 2 2004, 09:38 AM


Advanced Member


Group: Members
Posts: 132
Member No.: 6270
Joined: 11-September 03



QUOTE
I have been in video for over 30 years, but I too have a problem dealing with alot of the manual pages for Avisynth.

If people just say which manual pages are not clear, we can do something about it. Which ones do you want to see improved?

If I have time I will do something about the levels docs.
 
     Top
trevlac
Posted: Jun 2 2004, 01:35 PM


Advanced Member


Group: Members
Posts: 176
Member No.: 8501
Joined: 26-January 04



QUOTE (rfmmars @ Jun 2 2004, 12:22 AM)
What I would do for a better understanding of some of Avisynth's topics is to use Virtualdub's same type filters and play with the numbers there to get a feel for a filters. I have been in video for over 30 years, but I too have a problem dealing with alot of the manual pages for Avisynth.

I try to download every script that is posted, and when I have the time, I try them out. As they says "a picture is worth a thousand words" Doing it in VD gives you that picture.

richard
www.photorecall.net

I think Richad and cricket are being unfair... sad.gif

The AVS doc on levels does tell you to use the Vdub one to learn. In addition, levels is a generic tool that seems to be in many pieces of SW (like Photoshop). I looked what it had to say in the photoshop userguide, and there is no generic description. Just how to mess with the low range, high range, gamma, etc.

If Richard and Cricket would take the time to simply point out some important filters that need clarification, I'm sure this could be done. In fact, Wilbert has already taken a great deal of time to get some documentation for us. wink.gif
 
     Top
neuron2
Posted: Jun 2 2004, 10:25 PM


Advanced Member


Group: Members
Posts: 1244
Member No.: 5294
Joined: 18-July 03



Yes, it has been alleged that Donald A. Graft takes extra pains over his documentation. Personally, I find his prose rather stilted and turgid. Each to his own, however.
 
    Top
cricket
Posted: Jun 2 2004, 11:40 PM


Advanced Member


Group: Members
Posts: 106
Member No.: 9712
Joined: 6-April 04



Frankly I do not understand the fuss. We all are here to learn and help others and as long as we keep it that way, it becomes an enjoyable experience. By saying that, I have to admit that this is probably one of the most friendly boards I had come across.

One point needs to be considered is that, I am an average user and I did try my level best to understand the explanation of scripts in Avisynth.org and I failed to understand (not all scripts though). And it seems that I am not alone here. By saying this, I do understand that whoever had written the explanation of the scripts, would have spent an enormous amount of time however the point to be mooted here is that the explanations possibley did not have the desired effect. Please try to understand that I am only trying to use Avisynth to it's capacity.

Let's not forget that I still would like to understand the parameters in Levels, Spatialsoften, TemporalSoften filters.

Many thanks
 
     Top
trevlac
Posted: Jun 3 2004, 01:32 AM


Advanced Member


Group: Members
Posts: 176
Member No.: 8501
Joined: 26-January 04



@cricket,

At least neuron2 has finally moved from newbie status. Still a long way to self actualization. tongue.gif

The real trouble with your questions are not that you don't understand the doc, but that all you say is "I don't understand." Now I possibly think you are joking if you continue to list Levels as something you don't understand.

So let's take spatial soften ... I may go on and on about filtering theory ... wait ... I don't really know that so your safe. smile.gif But all the ways you could use a filter most certainly fill up a page...

spatial soften

Removes noise by blending pixels in a given frame. Radius is how many sets of surounding pixels. 1 should be 9 including the center, 2 would be 25, 3 would be 49 if my math is correct wink.gif

The difference in luma or chroma must be less than the limit values for the given pixel to be considered in the blending process. I can't say how the blending takes place. Possibly it is a simple average, or maybe a weighted average based upon how far the pixel is away. Also, I'm not sure how chroma values are compared, seeing that chroma has 2 components. They could be added, or a saturation could be determined ... something like U^2+V^2= saturation^2, but I imagine all of those squares would slow things down quite a bit.

Temporal probalby takes the 'same' pixel across frames (forward and back).

I can't really picture the results you get from these ... seeing that I never use them. You should give them a try to get a feel for what you get.

But if you say what you don't understand ... I'm sure people will jump to help you out. smile.gif

[edit]
I took a look at the code and ran it thru bable fish. tongue.gif It seems it takes a normal average. U & V both have to both be within the chroma threshold. meaning color would need to be close which makes sense.
 
     Top
rfmmars
Posted: Jun 3 2004, 03:46 AM


Advanced Member


Group: Members
Posts: 324
Member No.: 5438
Joined: 29-July 03



I am not being unfair when I say you can use VD to get a better understanding on how values work in Avisynth.

When you move those sliders with function names, they generate number values. Quickly one can see on the screen what has taken place by changing those values.

VD is live television and AVIsynth is delayed videotape. Once a person has reached a basic understanding though VD, then they can move on to the faster and more flexabe Avisynth.

I hope we are all just having a good time with this but maybe one example per filter with a .JPG insert in the manual might make things a little easier for us non-brainers.

Oh this just in http://forum.doom9.org/showthread.php?s=&t...&threadid=77358

richard
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
27 replies since Jun 1 2004, 05:01 AM Track this topic | Email this topic | Print this topic
Pages: (2) [1] 2 
<< Back to Avisynth Filtering, Processing and Scripts Discussion