Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
23rd August 2006, 00:00 | #581 | Link |
Registered User
Join Date: Nov 2005
Location: California
Posts: 81
|
Hmm.. once I get Limitedsharpen figured out, I'll give Seesaw a try as well. I copied the .dll's for masktools, the sse3 ones for removegrain (removegrainsse3,repairsse3,rsharpensse3, and sse3tools) and avsfilter, loadpluginex, and warpsharp from the warpsharp package to my avisynth plugins folder, as well as adding the contents of the limitedsharpenfaster avs into the avs file for my video and came back with a "no mt_edge" function error. I must be doing something wrong.
Am I supposed to copy the entire contents of the limitedsharpen avs file into mine or am I supposed to copy that avs into my plugins directory? Is there some sort of call feature I'm supposed to use? I also noticed that the limitedsharpenfaster avs says to use removegrain v0.9, but it later references using the 1.0 beta version. Is that why the mt_edge thing isn't loading? I'm not at all familiar with any of the call functions, etc. mentioned in the seesaw one (where to put which files, let alone how to script it...) Last edited by aNToK; 23rd August 2006 at 00:05. |
23rd August 2006, 00:03 | #582 | Link |
Registered User
Join Date: Nov 2005
Location: California
Posts: 81
|
Guess I should mention that I'm trying to use this in the chain after filtering with degrainmedian and fft3d and the blockoverlap function. That part works well, so I'm hoping to finish off with a bit of sharpening on the results.
|
23rd August 2006, 00:05 | #583 | Link |
Registered User
Join Date: Aug 2005
Posts: 293
|
Check here for the same problem and solution;
http://forum.doom9.org/showthread.ph...255#post794255 |
23rd August 2006, 00:26 | #584 | Link |
Registered User
Join Date: Nov 2005
Location: California
Posts: 81
|
Thanks for the fast replies! I've got 4 different series I'm working on right now, and two are in desperate need of denoising and sharpening. Is there a newbie guide somewhere to learn about call functions, etc. and how to call different .avs files as functions like Limitedsharpen and seesaw? I'm all up for doing my homework, but whenever I try following the threads I seem to be a bit over my head.
|
23rd August 2006, 16:28 | #586 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
No, not trial and error, but the wiki's main page includes several pages dedicated to learning your way around avisynth, like importing and calling functions. (The documentation that comes with avisynth is culled from it, though it's almost a year old now.)
Learning to use them effectively, that part's trial and error (along with picking up interesting calls others use). |
24th August 2006, 08:16 | #587 | Link |
Registered User
Join Date: Nov 2005
Location: California
Posts: 81
|
@jeremy: thanks for the step-by-step. LimitedSharpen worked very nicely, though I got an error with Spresso (yv12lutxy as an invalid function), and I haven't been able to figure out the a clip portion, but I'll do some more research before bugging anyone here about it.
Does Soothe work with LimitedSharpen or only with SeeSaw? |
24th August 2006, 12:44 | #589 | Link |
Registered User
Join Date: Jan 2006
Posts: 25
|
sorry, snipped to another thread http://forum.doom9.org/showthread.ph...351#post867351 asking about SPresso
Last edited by frednerk33; 24th August 2006 at 12:53. |
24th August 2006, 23:14 | #590 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Jeremy, could you make a thread starting with this (like your thread on avsforums) so that it can be stickied or at least referenced each time someone asks, that way this information isn't cluttering up all of Didée's sharpening threads? All of this realtime playing and multithreading business is really pretty off-topic for them (and a number of posts spawned by these discussions should really be in the newbies forum).
|
13th January 2007, 15:28 | #593 | Link |
Registered User
Join Date: Dec 2006
Location: Heidelberg (DE), Kraków (PL)
Posts: 519
|
LimitedSharpenFaster
Here you are This is what I've recently downloaded with one of the AviSynth plugins, and it's working
Code:
# LimitedSharpen() ( a modded version, 29 Oct 2005 ) # # A multi-purpose sharpener by Didée # # # Changes in this mod: # # - RemoveGrain >= v0.9 IS REQUIRED!! # ================================== # # - Smode=4 / sometimes does the magic ;-) # - a separate "undershoot" parameter, to allow for some line darkening in comic or Anime # - Lmode=3 / on edges, limited sharpening with zero OS & US. On not-edges, limited sharpening with specified OS + LS # - "soft" acts different now: no more boolean true/false, but instead integer 0 - 100 (or -1 -> automatic) # instead of blurring before finding minima/maxima, it now softens the "effect-of-sharpening" # - edgemode=-1 now shows the edgemask. (scaling still not implemented :p ) # ## - MODIFIED version using MaskTools 2.0 function LimitedSharpenFaster( clip clp, \ float "ss_x", float "ss_y", \ int "dest_x", int "dest_y", \ int "Smode" , int "strength", int "radius", \ int "Lmode", bool "wide", int "overshoot", int "undershoot", \ int "soft", int "edgemode", bool "special", \ int "exborder" ) { ox = clp.width oy = clp.height Smode = default( Smode, 3 ) ss_x = (Smode==4) \ ? default( ss_x, 1.25) \ : default( ss_x, 1.5 ) ss_y = (Smode==4) \ ? default( ss_y, 1.25) \ : default( ss_y, 1.5 ) dest_x = default( dest_x, ox ) dest_y = default( dest_y, oy ) strength = (Smode==1) \ ? default( strength, 160 ) \ : default( strength, 100 ) strength = (Smode==2&&strength>100) ? 100 : strength radius = default( radius, 2 ) Lmode = default( Lmode, 1 ) wide = default( wide, false ) overshoot = default( overshoot, 1) undershoot= default( undershoot, overshoot) softdec = default( soft, 0 ) soft = softdec!=-1 ? softdec : sqrt( (((ss_x+ss_y)/2.0-1.0)*100.0) ) * 10 soft = soft>100 ? 100 : soft edgemode = default( edgemode, 0 ) special = default( special, false ) exborder = default( exborder, 0) #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 smx=exborder==0?dest_x:round(dest_x/Exborder/4)*4 smy=exborder==0?dest_y:round(dest_y/Exborder/4)*4 clp.isYV12() ? clp : clp.converttoyv12() ss_x != 1.0 || ss_y != 1.0 ? last.lanczosresize(xxs,yys) : last tmp = last edge = mt_logic( tmp.mt_edge(thY1=0,thY2=255,"8 16 8 0 0 0 -8 -16 -8 4") \ ,tmp.mt_edge(thY1=0,thY2=255,"8 0 -8 16 0 -16 8 0 -8 4") \ ,"max") .mt_lut("x 128 / 0.86 ^ 255 *") #.levels(0,0.86,128,0,255,false) tmpsoft = tmp.removegrain(11,-1) dark_limit1 = tmp.mt_inpand() bright_limit1 = tmp.mt_expand() dark_limit = (wide==false) ? dark_limit1 : dark_limit1 .removegrain(20,-1).mt_inpand() bright_limit = (wide==false) ? bright_limit1 : bright_limit1.removegrain(20,-1).mt_expand() minmaxavg = special==false \ ? mt_average(dark_limit1, bright_limit1) \ : mt_merge(dark_limit,bright_limit,tmp.removegrain(11,-1),Y=3,U=-128,V=-128) Str=string(float(strength)/100.0) normsharp = Smode==1 ? unsharpmask(strength,radius,0) \ : Smode==2 ? sharpen(float(strength)/100.0) \ : Smode==3 ? mt_lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +") \ : mt_lutxy(tmp,tmpsoft,"x y == x x x y - abs 16 / 1 2 / ^ 16 * "+Str+ \ " * x y - 2 ^ x y - 2 ^ "+Str+" 100 * 25 / + / * x y - x y - abs / * + ?") OS = string(overshoot) US = string(undershoot) mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?") mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x x y - "+US+" - 1 2 / ^ - "+US+" - ?") Lmode==1 ? mt_clamp(normsharp, bright_limit, dark_limit, overshoot, undershoot) : last normal = last zero = mt_clamp(normsharp, bright_limit, dark_limit, 0,0) Lmode==3 ? mt_merge(normal,zero,edge.mt_inflate()) : normal edgemode==0 ? last \ : edgemode==1 ? mt_merge(tmp,last,edge.mt_inflate().mt_inflate().removegrain(11,-1),Y=3,U=1,V=1) \ : mt_merge(last,tmp,edge.mt_inflate().mt_inflate().removegrain(11,-1),Y=3,U=1,V=1) AMNT = string(soft) AMNT2 = string(100-soft) sharpdiff=mt_makediff(tmp,last) sharpdiff2=mt_lutxy(sharpdiff,sharpdiff.removegrain(19,-1), \ "x 128 - abs y 128 - abs > y "+AMNT+" * x "+AMNT2+" * + 100 / x ?") soft==0 ? last : mt_makediff(tmp,sharpdiff2) (ss_x != 1.0 || ss_y != 1.0) \ || (dest_x != ox || dest_y != oy) ? lanczosresize(dest_x,dest_y) : last ex=blankclip(last,width=smx,height=smy,color=$FFFFFF).addborders(2,2,2,2).coloryuv(levels="TV->PC") \.blur(1.3).mt_inpand().blur(1.3).bicubicresize(dest_x,dest_y,1.0,.0) tmp = clp.lanczosresize(dest_x,dest_y) clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last) \ : mt_merge(tmp,last,ex,Y=3,U=1,V=1) ) \ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2()) \ : tmp.mergeluma( mt_merge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1) \ .converttoyuy2()) ) (edgemode!= -1) ? last : edge.lanczosresize(dest_x,dest_y).greyscale return last } PS. I've just discovered it's included in the last MaskTools package (2.0a30) - LSF dated 21.01.2006.
__________________
"Only two things are infinite: the universe and human stupidity, and I'm not sure about the former."
Last edited by HeadBangeR77; 16th January 2007 at 03:45. |
7th February 2007, 03:48 | #594 | Link |
phjbdpcrjlj2sb3h
Join Date: Sep 2005
Location: Western Australia
Posts: 1,691
|
the 'special' switch is interesting. How would I go about changing lsf so that it works in reverse? I was playing around with it on some anime (having not read the info about it), and it produced almost the opposite effect I was looking for ;-)
|
7th February 2007, 04:16 | #595 | Link | |
Registered User
Join Date: Dec 2006
Location: Heidelberg (DE), Kraków (PL)
Posts: 519
|
Quote:
If we made a 'wishlist' of requested features, then working with output resolution is already on the 1st place (), so that SS factor wouldn't change while resizing with LS(F).
__________________
"Only two things are infinite: the universe and human stupidity, and I'm not sure about the former."
|
|
22nd February 2007, 10:33 | #597 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
Of course! It's discussed in this thread, but 30 pages is certainly a lot to wade through. But Jeremy Duncan put together a pretty good tutorial on how to set it up, now bumped to the second page: http://forum.doom9.org/showthread.php?t=115727
|
22nd February 2007, 17:16 | #598 | Link |
Flying Skull
Join Date: Jan 2005
Posts: 397
|
I'm interested in using LimitedSharpenFaster() and Soothe() multithreaded with MT(), which splits the picture into two halves and feeds one to each core. MT() allows you to pad the two halves with an overlap, so filters that don't process to the edges of their input won't show a discontinuity at the join. So I'm wondering how LSF/Soothe handles this. I tried to work it out from the code, but I came over all dizzy...
If it matters, I'm using something like: Code:
function LSFS (clip c) { nonsharpened=c sharpened=c.limitedsharpenfaster(edgemode=1,strength=100) soothe( sharpened, nonsharpened ) return last } #some source MT( "LSFS ()", 2, 8 ) Last edited by Morte66; 22nd February 2007 at 17:20. |
22nd February 2007, 22:57 | #599 | Link |
Registered User
Join Date: Aug 2004
Location: Denmark
Posts: 807
|
Morte66: Well MT just does something like script:
Code:
function LSFS (clip c) { nonsharpened=c sharpened=c.limitedsharpenfaster(edgemode=1,strength=100) soothe( sharpened, nonsharpened ) return last } src=some source left=src.crop(0,0,src.width/2+8,src.height).LSFS() right=src.crop(src.width/2-8,0,src.width/2+8,src.height).LSFS() stackhorizontal(left.crop(0,0,src.width/2,src.height),right.crop(8,0,src.width/2,src.height))
__________________
Get my avisynth filters @ http://www.avisynth.org/tsp/ Last edited by tsp; 22nd February 2007 at 23:03. |
|
|