digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Trying out LimitedSharpen() (http://www.digitalfaq.com/archives/avisynth/13762-avisynth-limitedsharpen.html)

incredible 08-31-2005 08:14 AM

I love Kassandros Filter Stuff, but its quite uncomfortable to get an overview of his filters as all do have a separate domain.

Boulder, do you know a link-collection of "his" domains? Or do you even know all his filters/domains? As I wasn't that active the past months in the avisynth dev area :)

Boulder 08-31-2005 08:33 AM

Uh, I'm often confused as well :lol:

I'd say look for removedirt, removegrain, avstimer, avsrecursion and ssetools (under construction) - add the word in www.xxx.de.tf.

As his documenting style is very verbose, I guess he decided to make separate domains for each one. One single page with all the links would have been really great, maybe I should ask him to do that.

Nowadays I use Didée's LTSMC for my analog captures so I haven't had to keep up with all the different plugins, IIRC that one uses RemoveGrain and SSETools from kassandro's plugins. kassandro's forum is a good place for information, and he's also very positive towards any new ideas - as you can see from RemoveGrain, which contains ~30 modes already 8O

Dialhot 08-31-2005 09:19 AM

Quote:

Originally Posted by Boulder
which contains ~30 modes already 8O

Really ? 8O

incredible 08-31-2005 09:28 AM

@ Boulder

Ahhhh ... 8)

www.RemoveGrain.de.tf

www.RemoveDirt.de.tf

www.ReduceFlicker.de.tf

www.AvsTimer.de.tf

www.AvsRecursion.de.tf

www.mdeblock.de.tf

www.SseTools.de.tf (preparation stage)

Btw when searching for LTSMC() I saw this nice "Bazzzzzong" Site:
http://www.avisynth.info/?%B4%D8%CF%...E5%A1%BC%A5%B9

Also interesting for avs 2.56 betas users which still want to use Mpeg2Dec3.dll on DVD2Avi generated d2v projects:
http://videoprocessing.11.forumer.com/viewtopic.php?t=2

Boulder 08-31-2005 09:30 AM

Quote:

Originally Posted by Dialhot
Quote:

Originally Posted by Boulder
which contains ~30 modes already 8O

Really ? 8O

The latest release has 25, and I think kassandro's got some new ones for the official v1.0 8O Of course, not all of them are really useful.

gamma 08-31-2005 10:55 AM

whow, great (and slow) function. 8O

I tweaked around a bit and with:

Code:

limitedsharpen(ss_x=2.0,ss_y=2.0, lmode=2, wide=true, strength=50, dest_x=..., dest_y=...)
I got a picture quality which to my eyes looks better (more detail) and has a smaller filesize than with a lanczosresize.

I'm really impressed with it's capabilities! 8)

incredible 08-31-2005 12:26 PM

Quote:

Originally Posted by gamma
Code:

limitedsharpen(ss_x=2.0,ss_y=2.0, lmode=2, wide=true, strength=50, dest_x=..., dest_y=...)

I see u use a 2x Supersampling on Width & Height (ss_x, ss_y), a supersampling does slow down the process significantly as the picture like explained above will be temporal upsized by the given value. If doing a large supersampling I found out that you can go higher in the "strength" without getting artifacts. Also sometimes its only needed to supersample only one way (x or y) .... thats on every source individual.

The dest_x,dest_y is also very useful by adding the resize parameters from Fitcd if LS() is at the beginning of your script (I for my taste prefer putting that fuction more towards to the script's end as Im used to put the sharpener as one of the last steps.

That LS() in combination with the (fast!) LRemovedust(4,1) function on good DVD sources gives me a hughe enhancement.

I dont care that much about the Speed of LS() in this workout purpose as it will be compensate by the time the OPV encodings do need compared to 2pass. But that always was the rule of tumb: Complexer functions do need more time, but often it's worth the time consumption ... well depends on the function ;).

Dialhot 08-31-2005 01:15 PM

Quote:

Originally Posted by incredible
well depends on the function ;).

Remember VagueDenoiser ? Everyone droped it because if its speeds.

For the LS I hope that will be acceptable on my 1.6Ghz (:cry:) else I will have to wait before to play with it :)

incredible 08-31-2005 03:17 PM

I do clearly remember VagueDenoiser and the hype on it. I NEVER was that addicted on it when it came out as I experimented a lot with it and the quality wasn't worth the speed drop. (just imho). See the "how funny" thread in here ;)

But I do also remember Pixiedust() which is still used by many experienced persons as it supports motionvector based denoising.

Now back to LS().

There are two parameters which do cause each by its own a hughe speed decrease.

If Supersampling values are bigger than 1 (ss_x, ss_y) which causes temporal total upsizing by *x ...
and if Edgemode is bigger than 0, cause this forces LS() to use a very complex mask and a maskedmerge finally. Even its a double sobel matrix based one, it often keeps some details out. So IF u go into a movie using LS() which is a very clean DVDsource like my StarWars example above I personally do switch that mask off using Edgemode = 0. BUT you should use a good detailkeeping denoiser before so that a unwanted rest of significant irritations or significant uneasy pixels won't be sharpenend too.
If using Edgemode = 0 and the frames do result in more "detailed" noise, then switch the edgemode on using 1.

I tried to find a compromise between details less noise and speed ;)

This is just a first approach NOTHING defenitely for me as it could result even better:

Code:

Mpeg2Source("....",cpu=4)
LRemovedust(4,1) # my favorite one, do use 4,x for the limit, bigger means more denoising but less details
LimitedSharpen( ss_x=1,  ss_y=1,
 \              Smode=1,    strength=150, radius=2,
 \              Lmode=1,    wide=false,  overshoot=3,
 \              soft=false, edgemode=0,  special=true,
 \              exborder=0 )

its quite fast, do set the sharpening level using the "strength" value

A hint: DON'T apply LS() on typo parts like beginning or end credits. It does a nice "subjective" job on natural scenes but on typographics it behaves subectively too strong imho. An ApplyRange() Routine should keep these unwanted scenes not to be treaten by LS().

incredible 08-31-2005 03:50 PM

Yep .. diff Sources are diff. to handle.
For making Titanic 4:3 to 16:9 I used this one finally and its fast:
Code:

dgdecode_MPEG2Source(".....")

crop(8,124,-8,-122)
w = width()
h = height()
ha=int(h/0.75)
lanczosresize(w,ha)
converttoYUY2().converttoYV12().LRemovedust(4,2)

LimitedSharpen( ss_x=1,  ss_y=1,
 \              Smode=1,    strength=150, radius=1,
 \              Lmode=1,    wide=false,  overshoot=4,
 \              soft=true, edgemode=0,  special=false,
 \              exborder=0 )

(Both upsized vertically to 16:9 before)
http://www.digitalfaq.com/archives/error.gif

I have to use converttoYUY2().converttoYV12().LRemovedust(4,2) including that "nonsense" Colorspace conversion as it seems my version of Removegrain does have a chroma memory align bug. If I dont use these, The LRemoveDust() Function drops significantly in its speed.

Dialhot 08-31-2005 04:02 PM

Quote:

Originally Posted by incredible
converttoYUY2().converttoYV12().LRemovedust(4,2)

8O 8O
What the hell is that line ?

Edit: you explained it after, sorry.

Note: what really surprise me is how bad is your source. I should take a snapshot from the KDVD I did from mine just to compare. Yours is so blur that I wonder how I never noticed that. Remember me the time where is this scene and I'll try to pick the same frame.

incredible 08-31-2005 04:35 PM

As told that is a 9,95 Euro trash DVD Edition, means heavy quantisation as much trailers of other moviepreviews are included and took space from the main movie and it has been produced as letterboxed 4:3 ! :puke:
That's why I decided to take that worst orig DVD case as source 8)

Keep in mind that the blur got even more as I sized it up vertically to restore back the wanted anamorph state.

Dialhot 08-31-2005 04:52 PM

Quote:

Originally Posted by incredible
Keep in mind that the blur got even more as I sized it up vertically to restore back the wanted anamorph state.

I did also (the only time I ever use the "4:3 -> 16:9" feature of DVDRebuilder). This movie has never been edited in anamorphic. But my DVD has only the movie, and not a single bonus nor other "precious bits" eater :).

Boulder 09-01-2005 01:14 AM

Quote:

Originally Posted by incredible
I have to use converttoYUY2().converttoYV12().LRemovedust(4,2) including that "nonsense" Colorspace conversion as it seems my version of Removegrain does have a chroma memory align bug. If I dont use these, The LRemoveDust() Function drops significantly in its speed.

Did you try align=true in Crop()?

incredible 09-01-2005 02:25 AM

Yep, that was the first I tried. But no way. I do have an Athlon XP and Im not shure if Im using the latest release of Removegrain and its dlls.

Boulder 09-01-2005 06:28 AM

I've got this one : http://home.arcor.de/kassandro/Remov...emoveGrain.rar (RemoveGrain v1.0 prerelease) and the last SSETools from the official RemoveGrain v0.9 package. Confusing, huh 8O

I'm using the latest Avisynth beta package from SourceForge with the fixed avisynth.dll, which can be found here.

Some earlier Avisynth beta caused a huge degrade in LRemoveDust's performance on my system, due to the changes in the alignment I think.

incredible 09-01-2005 08:06 AM

Quote:

Originally Posted by Boulder
I've got this one : http://home.arcor.de/kassandro/Remov...emoveGrain.rar (RemoveGrain v1.0 prerelease) and the last SSETools from the official RemoveGrain v0.9 package. Confusing, huh 8O

thanks! Ill have a look at it, even I think its the one Im also working with.

Quote:

I'm using the latest Avisynth beta package from SourceForge with the fixed avisynth.dll, which can be found here.

Some earlier Avisynth beta caused a huge degrade in LRemoveDust's performance on my system, due to the changes in the alignment I think.
Thanks#2!
Thats a really good hint as the degraded performance of LRemoveDust() is exactly my issue when not doing the YUY2.YV12 forth'n back conversion.

I also recognised if you got a nice very detailed but noisy DVDsource, even LRemovedust(4,1) does attack some fine details, thats why a combo of that function and LS() is a good way to go for me.
I wanted to try out the latest LTSMC() Function from Didée, but had no time. Im waiting for how "fast" it will perform as IIRC MVtools() are used :lol:

Anyway, Didée is very innovative with his script developings.

Boulder 09-01-2005 08:09 AM

LTSMC (like LimitedSharpen) is pretty slow with non-multithreading processors. I got quite a nice speedup with both of them with the MT plugin on my P4. Needless to say, the cleaning capabilities are superior.

Have you tried LRemoveDust(17,1)? It should be a bit more conservative when it comes to thin lines.

Dialhot 09-01-2005 08:35 AM

In which plugin is the LRemoveDust ?

I can't find it in the RemoveGrain doc. Is is in RemoveDust ?

gamma 09-01-2005 08:47 AM

As far as I know it's a function from Didee:

Code:

function LRemoveDust(clip input, int _mode, int "limit")
{
limit=default(limit,4)
LL=string(limit)
STR="x "+LL+" + y < y "+LL+" - x "+LL+" - y > y "+LL+" + x ? ?"
repmode = 2
clensed = Clense(input)
rep=Repair(clensed, input, mode=repmode)
rg = RemoveGrain(rep, mode=_mode)
TemporalRepair(rg, rep)
return limit!=0 ? yv12lutxy(last,input,yexpr=STR,U=2,V=2) : last
}

Kassandro had made an SSE optimized version, but I don't have it at hand right now.

btw you need to load removegrain and repair for this, both founded in the removegrain package.


All times are GMT -5. The time now is 11:13 PM  —  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.