Quantcast Avisynth: Trying Out Limitedsharpen() - Page 3 - digitalFAQ.com Forums [Archives]
  #41  
09-01-2005, 08:58 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
Funny, ... Im at work so I had to dig for it in the forums as its in my avsiynths plugins folder as permanent available avsi.

Seems there are 2 diff. versions in the outside!
Boulder, do you know which one is more recent?
(anyway someone should try by himself and see which result is better *lol)
Code:
function LRemoveDust(clip input, int _mode, int "limit")
{
limit=default(limit,4)
repmode = 2
clensed = Clense(input)
rep=Repair(clensed, input, mode=repmode)
rg = RemoveGrain(rep, mode=_mode)
rd=TemporalRepair(rg, rep)
return LimitChange(rd, input, limit, limitU=255)
}
EDIT: I figured it out: The version above is for SSE in general capable CPUs (usage of LimitChange), the version posted by Gamma is for NON SSE capable CPUs.

@ Phil
LRemovedust is one of the best denoisers I know IF the aspect "spedd in relation to denoising" counts.
BUT be careful as you should tweak the modes and limits as it could erase Details significantly.
(see Boulders post above)

People say its as good as pixiedust but for shure hughinnnngggg faster, For me Pixiedust is still a tiny bit better.




I also found a fast version of LimitedSharpen at the Gleitz board from Didée. Well NO masks and also other things have been pulled out.
("schnell" means "fast" in german )

Code:
# LimitedSharpen()
#
# A multi-purpose sharpener by DidÈe
#
function LS_schnell_schnell( clip clp, 
 \                       float "ss_x",   float "ss_y",     int "dest_x", int "dest_y",
 \                       int   "Smode",  int   "strength", int  "radius" )
{
ox = clp.width
oy = clp.height
ss_x =     default( ss_x, 1.5 )
ss_y =     default( ss_y, 1.5 )
dest_x =   default( dest_x, ox )
dest_y =   default( dest_y, oy )
Smode =    default( Smode, 3 )
strength = Smode==1 
 \       ? default( strength, 160 )
 \       : default( strength, 100 )
strength = Smode==2&&strength>100 ? 100 : strength
radius =   default( radius, 2 )
#radius =   round( radius*(ss_x+ss_y)/2)  #  If it's you, Mug Funky - feel free to activate it again  

xxs=round(ox*ss_x/8)*8
yys=round(oy*ss_y/8)*8

clp.isYV12() ? clp : clp.converttoyv12()

ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last
tmp = last

dark_limit   = tmp.inpand()
bright_limit = tmp.expand()

minmaxavg    = yv12lutxy(bright_limit,dark_limit,yexpr="x y + 2 /")

Str=string(float(strength)/100.0)
normsharp = Smode==1 ? tmp.unsharpmask(strength,radius,0)
 \        : Smode==2 ? tmp.sharpen(float(strength)/100.0) 
 \        :            yv12lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +",U=2,V=2)

repair(normsharp,tmp,mode=1)

     (ss_x != 1.0 || ss_y != 1.0) 
\ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last

clp.isYV12() ? last
 \           : lanczosresize(clp, dest_x,dest_y).mergeluma(last.converttoyuy2())

 return last
}
#

You should really use it in combination with TemporalRepair as it prevents the output from heavy spatialfilter resulted artifacts.

orig = Mpeg2Source()
filtered = orig. LS_schnell_schnell(.........)
TemporalRepair(Filtered, orig)

In case of Heavy Temporal filtering and avoiding its artifacts...

orig = Mpeg2Source()
filtered = orig. TemporalFilterXYZ()
Repair(Filtered, orig, repmode=x)
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
  #42  
09-01-2005, 08:59 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks. The "mode" parameter made me think this was into RemoveGrain but I did not understood it was a an external function using RemoveGrain.

I have to find now where is "LimitChange"

Note: funny that this function is so smart. Looking at it it seems to be done by someone that wanted to try all functions from RemoveGrain together .
Reply With Quote
  #43  
09-01-2005, 09:09 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
These are the ones that I use:

Code:
function LRemoveDust_YUY2(clip input, int clmode, int "limit")
{
clmode=default(clmode,17)
limit=default(limit,2)
repmode = 2
clensed = Clense(input, grey=true)
rep = Repair(clensed, input, mode=repmode, modeU=-1)
rg = RemoveGrain(rep, mode=clmode, modeU=-1)
return LimitChange(rg, input, limit, limitU=255)
}

function LRemoveDust_YV12(clip input, int clmode, int "limit")
{
limit=default(limit,2)
clmode=default(clmode,17)
repmode = 2
clensed = Clense(input)
rep = Repair(clensed, input, mode=repmode)
rg = RemoveGrain(rep, mode=clmode)
return LimitChange(rg, input, limit)
}
I've ditched the TemporalRepair part as that's not necessary with mode 17. LimitChange can be found in the latest SSETools plugin, which is in the RemoveGrain v0.9 package.

The YV12 one is for stuff that's originally YV12. The YUY2 version is for my YUY2 captures, process chain is
Code:
AVISource()
org=last
ConverttoYV12()
LRemoveDust(17,2)
ConverttoYUY2()
MergeChroma(org)
Reply With Quote
  #44  
09-02-2005, 06:29 AM
GFR GFR is offline
Free Member
 
Join Date: May 2002
Posts: 438
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Boulder
Uh, I'm often confused as well

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
Hi Boulder,

Do you have some suggested settings for LTSMC (like for VHS camcorders or TV captures)?

How does it compare to LRemoveDust (for captures)? I have used LRemoveDust(4,2) for VHS camcorder works OK for me.

Perhaps we should split this to the capture forum, or start a new thread here at optimal scripts.
Reply With Quote
  #45  
09-02-2005, 07:02 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
Quote:
Originally Posted by GFR
Perhaps we should split this to the capture forum, or start a new thread here at optimal scripts.
http://www.kvcd.net/forum/viewtopic.php?t=16106
Reply With Quote
  #46  
09-06-2005, 10:06 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
Check out Soothe() , another fine function from Didée

Designed to be used after sharpeners, especially LimitedSharpen.

http://forum.doom9.org/showthread.php?t=99679
Reply With Quote
  #47  
09-11-2005, 03:29 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by incredible
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
thanks! Ill have a look at it, even I think its the one Im also working with.
Inc,

Did you fix the alignment problem finally ? If yes, how ?
Because I'm suffering the same problem on a P4 : with ConvertToYUY2().ConvertToYV12() the script needs 4 minutes to encode a 100 second sample, but without it is took... 30 minutes

Edit: Forget. I solved it using "true" in the Crop line and avisynth 2.5.6RC1.

Note: concerning results you are right, this is definitely better than RemoveGrain().Deen() for the same speed and almost the same filesize !
Reply With Quote
  #48  
09-11-2005, 05:10 PM
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
I even used crop(....., align=true) but did not help in my case.
Only when 2x supersampling like done in LS() ... then no CspaceConversion is needed, so it defenitely has something to do with alignment in memory.

Kassandro gots his own forum (link above on the removedirt site).
Till now im a bit busy and I didnt go further tweaking LS() or LRemovedust() ... so someone could ask there or lets wait till I have time.

The ColorQualityloss of that nonsense CspaceConversion can be restored by using mergechroma() as the luma wont be touched - not in the conversion, neither by LRemovedust().

OrigChroma = last
ConverttoYUY2().ConverttoYV12()
LRemovedust(17,x)
MergeChroma(OrigChroma)

Anyhow, these routines even if not touching the chromaquality finally do use unneeded Routines/CPU-power, so that really should be discussed at Kassandros Board.
Reply With Quote
  #49  
12-16-2005, 02:15 PM
gamma gamma is offline
Free Member
 
Join Date: Nov 2003
Location: Rotterdam (The Netherlands)
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
For the ones interested, there's a new version of LS(), which incorporates a new smode (smode=4), different approach to the "soft" option and yes, it's faster!

get it here:
http://forum.doom9.org/attachment.php?attachmentid=5007

All I can say is

BTW you will need the latest removegrain package (1.0), otherwise you'll get an error that mode 19 isn't available.

Look what's smode4 got in store for us...




No tweaked settings. IMO is the second picture a bit overdone, so the defaults are a bit strong.
Reply With Quote
  #50  
12-26-2005, 04:18 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Nice end results gamma.
Could you please point us to the right thread @ D9 where you found this modded LS() ?
TIA
Cheers
__________________
Rui
Reply With Quote
  #51  
12-26-2005, 11:32 PM
supermule supermule is offline
Free Member
 
Join Date: Sep 2005
Location: Donkeyland
Posts: 210
Thanks: 0
Thanked 0 Times in 0 Posts
Btw, which movie are these clippings from, seems interesting, gotta see it
Reply With Quote
  #52  
12-27-2005, 02:10 AM
gamma gamma is offline
Free Member
 
Join Date: Nov 2003
Location: Rotterdam (The Netherlands)
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rds_correia
Nice end results gamma.
Could you please point us to the right thread @ D9 where you found this modded LS() ?
TIA
Cheers
Thanks. The whole thread is here: http://forum.doom9.org/showthread.ph...limitedsharpen
Look at page 11 for the new version. A few pages further the latest removegrain package is linked. Of course credits to Inc for spotting this in the first place
Reply With Quote
  #53  
12-27-2005, 02:12 AM
gamma gamma is offline
Free Member
 
Join Date: Nov 2003
Location: Rotterdam (The Netherlands)
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by supermule
Btw, which movie are these clippings from, seems interesting, gotta see it
It's Blade Trinity, and yes, you gotta see this
Reply With Quote
  #54  
12-27-2005, 04:57 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
The direct links :
http://forum.doom9.org/showthread.ph...909#post731909
http://forum.doom9.org/showthread.ph...098#post732098

(LS() was few lines before, it is now a complete programm )
Reply With Quote
  #55  
12-27-2005, 06:34 AM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Hi guys,
Thanks for the links .
Cheers
__________________
Rui
Reply With Quote
  #56  
12-28-2005, 01:54 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Could somebody explain the whole process with examples.
I didn't understand nothing.
Reply With Quote
  #57  
12-28-2005, 02:28 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Which post did you find problems understanding?
We're talking about LimitedSharpen() which is in fact a function like ADS, slicer, etc.
LimitedSharpen or simply LS() is especially good for encoding non-Anamorphic sources to Anamorphic targets.
Other than that we just talked about where we can read about it in D9 with more detail.
If you're still missing something, Luis, just ask us again but try to give us a hint on what you're not understanding so that we can help .
Cheers
__________________
Rui
Reply With Quote
  #58  
12-28-2005, 04:36 PM
Prodater64 Prodater64 is offline
Free Member
 
Join Date: Mar 2003
Location: Palma de Mallorca - España
Posts: 2,925
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by rds_correia
Which post did you find problems understanding?
We're talking about LimitedSharpen() which is in fact a function like ADS, slicer, etc.
LimitedSharpen or simply LS() is especially good for encoding non-Anamorphic sources to Anamorphic targets.
Other than that we just talked about where we can read about it in D9 with more detail.
If you're still missing something, Luis, just ask us again but try to give us a hint on what you're not understanding so that we can help .
Cheers
I did read that Inc said that is hard to find out the parameters.
I would want to know if there are some basic parameter as, i.e. LRemoveDust(17,2).
Reply With Quote
  #59  
12-28-2005, 04:46 PM
rds_correia rds_correia is offline
Free Member
 
Join Date: Apr 2003
Location: Chinese Democracy starts now!
Posts: 2,563
Thanks: 1
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Prodater64
I would want to know if there are some basic parameter as, i.e. LRemoveDust(17,2).
I see.
I'd like to know that myself too.
I think LS() is too complex.
And maybe even experienced scripters like Phil, Andrej, Boulder, Kwag, etc have hard times configuring this function.
Let's see if some of them gives us a hint .
__________________
Rui
Reply With Quote
  #60  
12-28-2005, 08:19 PM
Shibblet Shibblet is offline
Free Member
 
Join Date: Jul 2004
Location: Wasilla, Alaska
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Shibblet
I am having three problems with LimitedSharpen().

1. It does clear up the image, and add some missing detail, however it adds edging and pixels to places that weren't really there before. So a stationary object in the background results in some flickering around the edges because of the sharpening from frame to frame.

2. By adding these extra pixeled areas, you are actually increasing the size of your encode. Which results in having to lower your quality level in order to make it fit in the same place it was before.

3. Older movies (which are problematic and noisy to begin with) seem to get a lot of edging issues from frame to frame.

Anybody else get these same results?
__________________
Well if it's not a wolf, then it's a damn big dog.
- Rabbit, from "The Fable"
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: SeaSaw, better than LimitedSharpen ? Dialhot Avisynth Scripting 9 08-25-2006 10:36 AM
Avisynth: How do i use LimitedSharpen, LRemoveDust ? Blubear Avisynth Scripting 14 06-10-2006 06:20 AM

Thread Tools



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