digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Ads() a function using a masked denoising etc (http://www.digitalfaq.com/archives/avisynth/12288-avisynth-ads-function.html)

jorel 09-27-2004 07:28 AM

Quote:

The real link:

http://www.imageshack.us/
yes, it's too Pro but here where i live open first the other.
if call the xxx.us is slow! :wink: and the other is not "unreal" :lol:
thanks!

Quote:

@ Jorel

On clean DVD sources??
Well EVERY "clean" DVD source gots diff. amount of noise, so do the testing using diff. Thresholds and do preview the avs in Vdub.
Start from threshold=3 and do rise it till the noise is off AND all needed details are kept. :wink:
yes ink i know(knew) some dvds have noises and old brazilian movies have lots.(and bad actors too) :roll:
thanks for that details ! i will test it today, seems 8) .

scorpio 09-27-2004 01:05 PM

Thanks Inc .... it is much clearer now.

LMAF refers to Linear Motion Adaptive Filter from kwag's optimal script.

I use that script after ADS as follows

Code:

# ADS - INC 23-9
MPEG2Source("ads.d2v")
#
#
#

ADS(72, 72, 1, Letterbox=false, Sharpen=8, Threshold=2, HQmask=false, show=false)

nf = 0 # Current frame.

## 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.

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)  ")


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

ConvertToYUY2()

This is just a test and the idea is to reduce the file size in order to get a higher Q value in CCE. So Inc ... do not be unduly worried as we need the guidance .... and the promises looks bright.

Cheers!
Scoprio

Dialhot 09-27-2004 01:11 PM

Quote:

Originally Posted by scorpio
This is just a test and the idea is to reduce the file size in order to get a higher Q value in CCE.

Too much filtering will not help. And ADS + MA is too much.

incredible 09-27-2004 02:01 PM

@ Scorpio

I underline Phils Statement as I also sid it before! DO NOT JUST MIX diff. Scripts without knowing what youre doing.

Look at the functions and youll see that ADS and MA do BOTH got a temporal denoise routine and two times temporaldenoising will finally result in a "static-dot wall" on moving plain areas.

Beside that ... on the one hand you do apply a sharpen using ADS() and on the other hand you add blurring using MA and therefore its internal Unfilter(-x,-x) ... blurring will be processed even on almost static scenes as the latest MA does let process its filters continously!

scorpio 09-27-2004 02:30 PM

Inc .... I am aware that LMAF does sharped/soften plus noise removal ontop of what ADS does ... as I mentioned my aim was to reduce size and I am sharing the outcome.

Anyway .... if someone can try out the combination and share their thought on the output ... that would be great.

The test I did yeild resonable result (for sure Ads alone is better) have a look here.

Shot 1
Shot 2

So Inc do not get unduly worried .... I hope whatever test I did and posted will help you in one way or the other .... if it does not .... remember I am still learning.

Cheers!
Scorpio

Jellygoose 09-27-2004 03:52 PM

@scorpio:

Sorry to say that, but in your case screenshots of single frames does not help to judge the outcome of ADS + MA...
that is because the MA part really will do most of the blurring (temporal smoothing) at high action scenes. I'm pretty sure the double temporal filtering is not very pleasant to your eye during these scenes. ghosting, and a blurred picture is most likely what you'll see, when you take a closer look at panning/fast moving scenes...
just my 2 cents! however, thanks for your hard work with uploading all these shots, and your tests in general!

incredible 09-27-2004 05:07 PM

No Problem Scorpio ;-)


But I do clearly see that the actor gots even less details when using the adding of MA. Look at his Hairs. And his skin gets more and more flat.

And thats what I meant. If you dont care about details, you dont need to put MA afterwards but rise the threshold of ADS and switch sharpen off. That "would" result in the same ;-)

FuPP 09-30-2004 05:04 PM

Hi all !

simply one remark : in order to complete a good comparison between both scripts, you need to compare them in non static areas too (including compressibility tests if needeed) : there is indeed a huge difference between both scripts, ie motion processing.

Anyway, nice work Inc. !

FuPP

jorel 09-30-2004 05:49 PM

welcome back FuPP.stay with us too!
:D

FuPP 09-30-2004 05:55 PM

Hi Jorge !

I've never really left, you know ;) Just a lot of work, that's all !

FuPP

Peter1234 10-01-2004 12:54 AM

incredible,
Please do not eliminate the HQmask=false option in ADS. The HQmask=true option sometimes causes flickering on the edges of horizontal lines at 352x240.

incredible 10-01-2004 03:54 AM

I dont gonna remove anything (maybe the resizing part). ;-)

The mask of didée is BETTER beleive me, ... but as said above its all about adjusting the mask using the levels command. The mask isnt that "hard edged" that oszillating effects will occur in general. The HQmask of didée will keep more detais if set right. ;-)

Developing continues ... but Im just in the work getting the best possible Backup of my SW Box Set. 8)

@ Fupp
Thanks! :)

Maybe ads() has some parts which would be useful for hybridFupp()... as the "heart" of it is the downscaling the height by2-filtering-and upscaling again --- on progressive material. Which will be overlayed by the original details afterwards. I tested pixiedust() on that vertical reduced image and on noisy captures it did wonders.

Jellygoose 10-18-2004 03:50 AM

hi inc...

can you give some hints how to set the threshold level right? I encoded a rather noisy dvd with ADS, and results were really great, compared to standard scripts.
this is what i used...

Code:

ADS(16,16,2,Letterbox=false,Sharpen=4,Threshold=5,HQmask=true,show=false)
it seems though, that some surfaces just got too plain. i tried to set the mask right before. details were preserved pretty good, the problem is that the rest of the picture got too flat... :roll:

incredible 10-18-2004 05:14 AM

As you use hqmask=true ....

set Show=true to see WHATwill be treaten. Now go into the script where you find the levels command and play with the values as described above to find a moderate mask where more details will be kept. After that do set show to "false" and preview the output in Vdub.

Jellygoose 10-18-2004 05:33 AM

Quote:

Originally Posted by incredible
As you use hqmask=true ....
set Show=true to see WHATwill be treaten. Now go into the script where you find the levels command and play with the values as described above to find a moderate mask where more details will be kept. After that do set show to "false" and preview the output in Vdub.

you mean the threshold command right? setting that to a higher value will make the mask smaller, so more details will be smoothed right? with a lower value the mask will be larger, and more detail will be sharpened... do i get that right?
but how can I set the smoothing level for the picture outside the mask?

incredible 10-18-2004 07:12 AM

Quote:

Originally Posted by Jellygoose
[you mean the threshold command right? setting that to a higher value will make the mask smaller, so more details will be smoothed right? with a lower value the mask will be larger, and more detail will be sharpened... do i get that right?
but how can I set the smoothing level for the picture outside the mask?

The threshold command ONLY affects the normal mask! If you choose hqmask then you have to enter the levels() command.
You also could use the normal mask and the threshold parameter as at some movies it also preserves very good details.

Jellygoose 10-19-2004 04:06 AM

Ok, thanks Inc, I gathered that much, because the mask would not change with the threshold value... :lol:
so the standard Levels values in the script are these?

Code:

levels(0,1.0,255,0,255,false)
so which values will change the mask? do you have an explanation about what these values mean? I'm sorry for the inconvenience...

incredible 10-19-2004 06:52 AM

Code:

levels(0,1.0,255,0,255,false)
Just try to modifiy these params by still having the show option setted!
The first Number (here zero) will make the mask more harde if rised.
You also could tweak the 1.0 which si the gamma, a brighter gamma makes more details in the mask visible ... so do try :wink:


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

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