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. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Here is LimitedSharpen()
Hello friends
![]() Seems this is my millenium post. Since for me this is a rather seldom event, I thought I could at least make a usable and halfway worthy one, instead of doing only small talk in other places. Time ago, I started a thread in the Development section about "thresholded sharpening". The thread turned into a little idea bin (and is still open for that purpose ), and one of the breed's results is the function "LimitedSharpen()" It's been around for a while now, a little wild at times, in several different versions regarding features and so ... but by now, I think it has reached a status where it is working quite nice and sufficiently fast, and has (most) of the features it's supposed to have. Time to make an own, proper thread in Avisynth Usage for this little function. So, what's the deal? LimitedSharpen() can be used like a traditional sharpener, but producing much less artefacts. It can be used as a replacement for the common "resize(x4)-XSharpen-resize(x1)" combo, with very similar results (perhaps even better) - but at least 2 times faster, since it requires much less oversampling. And by chaining several instances, it can even be used for something like a "[very] poor man's deconvolution" - but only if one knows how to battle the noise ![]() What's the problem with "normal" sharpening? Traditional sharpeners like sharpen() or UnsharpMask() compare each pixel against the average of its neighborhood, and emphasize the difference between them. The results (something like "per-pixel contrast enhancement") are good as long as the strength is kept low enough. But artefacts will arise very soon. XSharpen, being a non-linear sharpener, replaces each pixel with either its darkest or brightest neighbor, depending on which is nearer in range. By the nature of the method, XSharpen produces edges with maximal possible aliasing (jaggyness). So one has either to reduce the percentage, thereby weakening the overall effect, or to work with big supersampling, which makes it both extremely slow and less effective. Let's have a look at a simple transition from dark to bright, and what our standard sharpeners will do to it: ![]() The blue line represents the original edge, the dark side on the left, the bright side on the right, and in-between the gradient that builds "the edge". Red is (basically) the result of sharpen() or UnsharpMask(), pink is the result of XSharpen(). Obviously, both methods have their pro's, and both have their con's. Note: Discussion about "ideal sharpening" is lengthy. To make an "optimal" sharpness restauration or enhancement, one would need to know the exact process that did reduce the source's sharpness. Since we never know that, we can only search for compromises that work sufficiently good in most cases. Now, LimitedSharpen() doesn't re-invent the wheel. It just tries to take the best of both worlds. Shortly, LimitedSharpen() applies one out of three different sharpeners (two domain sharpeners or a windowed range sharpener) to the source, but will limit the oversharpening (either "hard" or "soft") IF it exceeds a defined "overshoot". In reference to the graphs above, the script's results look like that (basically) : ![]() (The proportions are not "real" - both graphs were constructed free-handed.) As you see, LimitedSharpen always takes the enhanced edge steepyness from normal sharpening, but avoids oversharpening in the same way as XSharpen, as long as overshoot is kept at zero, and limiting mode 1 is used. In many cases, this comes out really nice, and is sufficient. However, with really strong sharpening there may still occur jaggy edges and/or noticeable loss of gradients in edge neighborhoods. For these cases, limiting mode 2 can be used, as well as supersampling. (The required supersampling factors are only half of what XSharpen usually needs - therefore this script will run much faster in comparison, since only a quarter of image data has to be processed, as opposed to "4*SSXSharpen") The basic operation is like this: - make a traditional sharpening operation - compare each pixel's sharpened result against its brightest and darkest neighbor in the original clip: -- if the result is inbetween of these, then the pixel is not oversharpened, and the result is used as-is -- if the result exceeds either the min or max neighbor, then the pixel is oversharpened, and will get limited. "Neighborhood" of a pixel currently is either its 3x3 or its 5x5 neighborhood, depending on the "wide=true|false" parameter. Available sharpeners are: UnsharpMask(), Sharpen(), and MinMaxSharpen(). UnsharpMask() and Sharpen() are common - the former sharpens each pixel against a gaussian blurred input, the latter against a 3x3 average. The third mode sharpens each pixel against the average of the brightest & the darkest neighbor. This primitive form of range filtering is less "exact" in theory, but nevertheless turns out useful. The effect is stronger than that of a normal sharpen() operation, and somehow it is less prone to enhance noise and hi-frequency DCT artefacts. The downside is that it does a less optimal job in restoration of blurred corners - but that's mostly neglectable when working with supersampling. The limiters are: hard limiting, and soft limiting. With hard limiting, each pixel that becomes either darker than [min_neighbor - overshoot] or brighter than [max_neighbor + overshoot] through sharpening, will simply get clipped to that min|max value. With soft limiting, no clipping takes place, but a reduction: the effective overshoot from sharpening will get replaced by sqrt(overshoot). This means, a little oversharpening will be present, but it'll be much weaker than it would normally be. As long as the sharpening strength is kept in reasonable range, the oversharpening will still be hardly visible, while still being less prone to loose gradient tone levels in edge neighborhoods. Lastly, there is the "special" switch. It should be considered as "experimental". Activating this one, the function will perform a simple "smart contrast sharpening": in the range of low levels, pixels will get only brighter through sharpening, not darker. In the high levels range, pixels will get only darker, not brighter. Mid level pixels may get darker/brighter as usual. This is done by building the comparison frame through a sliding blend of (min_neighbor) for dark pixels and (max_neighbor) for bright pixels, instead of taking the plain average over the whole range. Therefore, in dark areas all values will get sharpened against their darkest neighbor, vice versa in bright areas. Visually, especially in dimmed and dark areas more detail will raise out of the "dark swamp". Simple, not too scientific, but often effective. However, one should use relatively low strengths for this one, or the effect might become strange. But even bigger strengths might come handy for some special tasks of mask creations. Usage of "wide = true" might be a good idea too with lower strengths. This mode is available only together with Smode=3. Full function call & parameter description: Code:
LimitedSharpen( float "ss_x", float "ss_y", int "dest_x", int "dest_y", \ int "Smode", int "strength", int "radius", \ int "Lmode", bool "wide", int "overshoot", \ bool "soft", int "edgemode", bool "special", \ int "exborder" ) ss_x, ss_y As usual, these floats are the factors for supersampled operation. You'll hardly ever need to go higher than 2.0. For simple sharpening tasks, set these to 1.0 (no supersampling). Default is 1.5 each, however. dest_x, dest_y These parameters specify an arbitrary output resolution. Comes handy if supersampled operation is used in a processing chain that involves resizing anyways, to avoid an unneeded extra resizing step. Default is [none], i.e. same resolution as the input clip. Smode ("Sharpen mode") 1 = UnsharpMask() [from WarpSharp.dll package] 2 = Sharpen() 3 = "MinMaxSharpen()" [private routine of LimitedSharpen] Default is Smode=3. Change yourself if you prefer another one. strength Obviously, the strength of sharpening. For Smode=1, it can be 0~127 (simple sharpening), 128~255 (simple overdrive), 255~4096 (big overdrive). For Smode=2, values 0~100 are handled over to Sharpen() as 0.0~1.0. Values >100 are mapped to 100. For Smode=3, 0~100 is common, but 100~inf. can be used if necessary. Default is strength=160 for Smode=1, and strength=100 for Smode=2|3. radius The radius for the unsharp masking of Smode=1. For Smode=2|3, it's simply ignored. In contrary to former versions, the radius now applies "directly". It's no more scaled along with the ss_x|y values. I like it more this way. Default is radius=2. Lmode ("Limiting mode") 1 = hard limiting, together with "overshoot". 2 = soft limiting (use square of real overshoot) Default is Lmode=1. wide false = use min. and max. values of a 3x3 neighborhood for limiting. true == use min. and max. values of a 5x5 neighborhood for limiting. Default is wide=false, and this should do the job most times. TRUE might come handy for very blurry sources and/or bigger supersampling factors. overshoot This specifies how much the sharpening result may "shoot over" the min and max limits, before either clipping or reduction will be done. 0=no overshoot allowed at all, 128="make-this-script-useless" Default is overshoot=1. soft A misleading name. If TRUE, then the clip will undergo a blur(1) command only for finding the min and max limits (in order to not acidentially use too high or too low limits, caused by noise, small artefacts, or edge-halos.) This does not blur the processed clip itself. But attention!! This is mostly useful for soft sources with noise. On sharp sources with little noise, you'll loose some detail nevertheless. Default is soft=FALSE. edgemode 0 = deactivated, process the whole frame 1 = process only edge areas 2 = process only NOT-edge areas Default is edgemode=0 special When TRUE, *and* Smode=3, this will activate the above mentioned smart contrast sharpening. When using other sharpeners, it has simply no effect. This feature is not fully mature. But be sure to try it out, the effect might be pleasing. Default is special=FALSE exborder If the outmost borders of the input clip are not clean, they can be excluded from the sharpening by setting exborder > 0. values of 1 to 4 will exclude roughly 2 to 8 pixels from each side of the frame, plus an additional soft transition to the processed area. This feature is thought for cases when you don't want to crop into the image area. The transition to black borders usually contains artefacts. Setting exborder to an approbriate value will prevent these artefacts from getting emphasized. Default is 0 (no border exclusion). Usage of borderexclusion will cause a small speed loss. The defaults are equivalent to Code:
LimitedSharpen( ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height, \ Smode=3, strength=100, radius=2, \ Lmode=1, wide=false, overshoot=1, \ soft=false, edgemode=0, special=false, \ exborder=0 ) Notes Required are MaskTools >= v1.5.1 and the WarpSharp.dll package. In case someone's going to use "edgemode": check yourself if the hardcoded values are suited. If not, please adjust them yourself. I myself use it almost never, and don't want to blow up the parameter list unnecessarily. No RGB input accepted. Parameter checkings are not water proof, and in no way fool proof. This is a sharpener. Of course the needed bitrate will grow noticeably. Be careful. Use a denoiser beforehand. Examples Hah, gotcha! No, I won't kill your fun of toying-around ... However, the initially mentioned "speedy version" of 4*supersampled XSharpen'ing would look as simple as LimitedSharpen( ss_x=2.0, ss_y=2.0, Smode=2) Apart from that, there are so many possibilities to use this script, dependant on the source quality and the effect one wants to achieve ... toy around with the parameters, I'm sure you will get a good grip to it in short time. And if something is not clear, feel free to ask. Have fun! - Didée
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 24th October 2004 at 14:58. |
|
|
|
|
|
#3 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Patience. I'm still smoking that cigar.
edit 24 Oct '04: added "exborder" parameter (border exclusion). edit 26 Nov '04: made the "wide=true" limiting mode working correctly. Code:
# LimitedSharpen()
#
# A multi-purpose sharpener by Didée
#
function LimitedSharpen( 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",
\ bool "soft", int "edgemode", bool "special",
\ int "exborder" )
{
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 )
Lmode = default( Lmode, 1 )
wide = default( wide, false )
overshoot= default( overshoot, 1)
overshoot= overshoot<0 ? 0 : overshoot
soft = default( soft, false )
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 = logic( tmp.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=2)
\ ,tmp.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=2)
\ ,"max").levels(0,0.86,128,0,255,false)
bright_limit = (soft == true) ? tmp.blur(1.0) : tmp
dark_limit1 = bright_limit.inpand()
bright_limit1 = bright_limit.expand()
dark_limit = (wide==false) ? dark_limit1 : dark_limit1 .inflate.deflate.inpand()
bright_limit = (wide==false) ? bright_limit1 : bright_limit1.deflate.inflate.expand()
minmaxavg = special==false
\ ? yv12lutxy(dark_limit1,bright_limit1,yexpr="x y + 2 /")
\ : maskedmerge(dark_limit,bright_limit,tmp,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)
\ : yv12lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +")
OS = string(overshoot)
Lmode == 1 ? yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x "+OS+" + ?")
\ : yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?")
Lmode == 1 ? yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x "+OS+" - ?")
\ : yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x x y - "+OS+" - 1 2 / ^ - "+OS+" - ?")
edgemode==0 ? NOP
\ : edgemode==1 ? MaskedMerge(tmp,last,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1)
\ : MaskedMerge(last,tmp,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1)
(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).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)
\ : maskedmerge(tmp,last,ex,Y=3,U=1,V=1) )
\ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2())
\ : tmp.mergeluma( maskedmerge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1)
\ .converttoyuy2()) )
return last
}
#
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 26th November 2004 at 10:52. |
|
|
|
|
|
#5 | Link |
|
Registered User
Join Date: Jun 2003
Location: Land of the Noobs & the Home of the Brave
Posts: 349
|
Wonderful explaination!
I've been waiting for the documention for LimitedSharpen(). Now if only we could have an explaination on how to get good input values for IIP .Regards! Josh |
|
|
|
|
|
#6 | Link |
|
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,655
|
I cannot see the images.
the image-server is terribly slow. I could host them for you on me arcor-account, which is fast and reliable.
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
|
|
|
|
|
#9 | Link |
|
Does it really matter?
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
|
wow impressive. this might be by far the best documentation I have ever seen. I tested out the filter and all I can say is WOW. The increase in sharpening is amazing. it's scary how effective this is. Keep up the good work.
|
|
|
|
|
|
#10 | Link |
|
Moderator, Ex(viD)-Mascot
Join Date: Oct 2001
Posts: 2,564
|
Congrats 1000!
LimitedSharpen gives very good results, but you know that. Easy to use, safe, fine results.
__________________
It's a man's life in Doom9's 52nd MPEG division. "The cat sat on the mat." ATM I'm thoroughly enjoying the Banshee - a fantastic music player/ripper for Linux. Give it a whirl! |
|
|
|
|
|
#11 | Link | |
|
Registered User
Join Date: Jul 2003
Posts: 35
|
Quote:
edgemode=2 didnt help ? koszopal |
|
|
|
|
|
|
#17 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Québec, Canada
Posts: 107
|
Quote:
I know you can't pass whatever resolution to PixieDust. LimitedSharpen doesn't use PixieDust, but it use a library called MaskTools. So the real question was: is there a call to a function of the MaskTools library that require a clip with a resolution which respects a given mod specification (à la PixieDust)?
__________________
PiXuS |
|
|
|
|
|
|
#18 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Thanks everyone for the warming comments. Always a pleasure to serve the community
![]() I have now added the possibility to exclude the borders from processing, as oo_void suggested. It works similar as the same-named parameter in iiP, but allows to control the size of the borders that will be excluded (see updated parameter description). Tried to implement it in a way that looses as little speed as possible - after all, it means an additional plane copying operation. In case of YUY2 input, also an additional colorspace conversion is needed. That won't affect the output in any way, but makes the operation a little more costly for YUY2 than for YV12 input. In one respect, the actual implementation is not as smart as it could be: In case that edgemode=1|2 is used, the script will do two separate plane copy operations where the job could be done with only one. It would be not so awful tricky to do it like that ... but I'm currently a little tired of all those "?" and ":" oo_void: This function doesn't try to be a replacement for iiP. But I'll implement LimitedSharpen into iiP soon, to make the big boy walk a little faster. In fact, I'm using iiP with this implementation for quite some time now. Only thing is, I'm not sure yet how much LS should be crippled for that purpose, and how much features should be exposed to iiP's function call. koszopal: Usage of edgemode=2 is not recommended. At least I don't see much sense in sharpening everything except detail. It's only there for completeness (perhaps someone wants to use that together with UnSmooth(), you never know) MrTibs: Mug Funky had a similar thought of using this principle for halo reduction. Though I follow the general idea, I still can't see how it actually should work out. Perhaps if you two stick together heads, and fiddle it out ... PiXuS: Just as malkion said. The script works internally in YV12 colorspace, so MOD4 resolutions are required even for YUY2 input. It were possible to work around that with internal padding - but I'm simply too lazy to do that I think MOD4 for input is fair enough.I have close to no idea how good or bad LimitedSharpen() works on comic or animee sources, as that's not my world at all. If someone has particular issues with such input, please report them.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#19 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
anime looks fine with limitedsharpen, don't you worry (wasn't one of the test images in the original thread from chobits? hehe... that little robot girl is so cute).
the halo reduction looks like it'll be easier thanks to the new slew of median filters (and hopefully the speed arms-race that competing plugins would create. hmm... competition doesn't work the same for free stuff, though). i've aleady tried using median filtered clips to get cleaner motion-vectors from MVtools, though to be honest i haven't checked to see if they actually work better.
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#21 | Link | |
|
Member
Join Date: Dec 2001
Location: somewhere far beyond
Posts: 270
|
Quote:
![]() ![]() (oversharpened, just to show the sharpening effect) CU, lamer_de Last edited by lamer_de; 25th October 2004 at 08:22. |
|
|
|
|
|
|
#23 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
PSSSSST - secret!
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#25 | Link | |
|
Does it really matter?
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
|
I was using it on Rurouni kenshin Episode 1 and near the end of the episode during the main fight scene the lines in kenshins hair become much bigger than the original.
To counter this I use Fastlinedarken() to shrink the lines back to their original size which points back to Quote:
thinning script. =) Hopes this clarifies things. I love limitedsharpen() on anime sources is because it works better than awarpsharp() without the side effects. Thanks again for such a kickass script. Anyone want to contribute to the ChronoCross needs a new PC fund? lol |
|
|
|
|
|
|
#26 | Link |
|
Registered User
Join Date: Feb 2004
Posts: 156
|
Didee, just finished pass 1 of a non-resized 720x480 Kill Bill v2 using a custom matrix. Just gosta say, beau-ti-ful!
mpeg2source("e:\project\bill2.d2v",cpu=0,idct=3) converttoyuy2() pixiedust(2) converttoyv12() limitedsharpen() colormatrix() dctfilter(1,1,1,1,1,1,.5,0) smode=3 also yields the lowest file size compared to smode=1 or smode=2. I gave up on multiple calls of limitedsharpen with smode=1 on resolution @ 1280x720, since end file sizes ended up higher than a dvd's storage capacity. Much obliged for a very nice function. |
|
|
|
|
|
#29 | Link | |
|
Registered User
Join Date: Jan 2003
Posts: 90
|
I'm trying the filter but AVS is reporting "there is no function named yv12lutxy". I have Masktools loaded. Any ideas?
Here's the line it is compainning about: Quote:
Last edited by MrTibs; 26th October 2004 at 21:47. |
|
|
|
|
|
|
#30 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Get the latest version of the masktools, yours is outdated :
http://jourdan.madism.org/~manao/MaskTools-v1.5.4.zip |
|
|
|
|
|
#32 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Québec, Canada
Posts: 107
|
Quote:
__________________
PiXuS |
|
|
|
|
|
|
#33 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Québec, Canada
Posts: 107
|
Quote:
__________________
PiXuS |
|
|
|
|
|
|
#34 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
Special=true is, as said, a pretty simple trick, considered experimental, and not really recommended for regular use. While it may have nice effects on dark & bright image areas, there are also some strange side effects, such as warpsharp-alike shifts of edges and boundaries, thinning or widening of narrow features, or even haloing when certain level ranges lie next to each other. (For overall contrast enhancement, I've another more serious approach in the works. I dare to say it delivers already spectacular results ... but the noise is totally out of control, yet. So the forced bitrates are awesome, to not say mayhem - "through the roof" is a too weak term to describe it. Even PixieDust is hardly able to hold it.) While in contrast Smode=3 is pretty safe, occasionally it may also deliver results a little different from what one expects, when looking very close. Reason is that mode 3 works only in relation to the present range of a given area. It does not care for the overall distribution in the area, like modes 1 & 2 do. (Throwing around with terminology, mode 3 is sort of a range filter, whereas modes 1 & 2 are domain filters.) Consequently, the effect of mode 3 on detail's edges is not always fully symmetric. For natural sources, me too prefers Smode=3. For animated content, I simply don't know. That's why I asked about that some posts above.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#37 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Québec, Canada
Posts: 107
|
Quote:
Weird!
__________________
PiXuS |
|
|
|
|
|
|
#39 | Link | |
|
Does it really matter?
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
|
Quote:
|
|
|
|
|
|
|
#40 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
![]() Seriously, has anyone a description about Denoise3D's principle of operation? Is it similar to Convolution3d, or is it using weightening à la SmartSmoothHiQ, or is it choosing the "best" diagonal from a 3x3 cube like STMedianFilter, or ... Only having some vague "strength" options without explanation makes me feel like being in free fall , even if it works nicely. Which it does, without doubt.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#41 | Link | |
|
Confused
Join Date: Apr 2003
Location: Euroland
Posts: 2,820
|
Quote:
Dont try to detract from the eye-riddle... |
|
|
|
|
|
|
#43 | Link |
|
DVD Destroyer
Join Date: Dec 2003
Location: Land of the burning embacies
Posts: 68
|
It would be very nice if you gonna integrate limitedsharpen into iiP...
There's surely the problem about the encoding speed and how to merge some funktions to get more FPS of the encoding.... but I'm not an advanced so i can only imagine that there would be more problems someone wanna solve ![]() PS: LimitedDarken? Let me imagine what that can be ![]() Does it perhaps go in direction of Mf's Toon-function? Maybe to control the darkening of lines and avoid thick lines?... It also could be a controled color-correcting function?? Give us some hints please
Last edited by DeepDVD; 4th November 2004 at 00:33. |
|
|
|
|
|
#45 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Okay. For all the impatient people, a little preview: "The quick hack".
No guarantees, no claims, no responsibilities. No support. No need to report any bugs.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#47 | Link | |
|
Potentate
Join Date: Mar 2003
Posts: 219
|
Quote:
I'll give it a try tonight some time.... Many thanks! T |
|
|
|
|
|
|
#50 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Québec, Canada
Posts: 107
|
Quote:
__________________
PiXuS |
|
|
|
|
|
|
#51 | Link |
|
Guest
Posts: n/a
|
This is my script:
Import("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\limitedsharpen.avsi") LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgdecode.dll") LoadPlugin("C:\Program Files\GORDIA~1\AviSynthPlugins\MaskTools\MaskTools.dll") mpeg2source("D:\My Documents\My video\Mind\Mind.d2v", idct=0) crop(4,6,712,562) LimitedSharpen() LanczosResize(592,320) Any ideas why it is so slow ? |
|
|
|
#52 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
Before you get too disappointed, try the following: -------------------------------------------- crop(4,6,712,562) Lanczos4Resize(712*4,562*4).XSharpen(255,255) LanczosResize(592,320) -------------------------------------------- After trying *that*, tell again how slow LimitedSharpen really is ... ![]() However there are two or three steps to make it faster: 1. Use crop(4,6,712,562,true) because of memory related Avisynth-internal details. 2. You are doing one resizing step too much. Try -------------------------------------------- crop(4,6,712,562,true) LimitedSharpen(dest_x=592,dest_y=320) -------------------------------------------- This won't give you the real breaktrough either, but it will be faster. 3. Reduce supersampling (but quality as well). Try ----------------------------------------------------------------------------- crop(4,6,712,562,true) LimitedSharpen(ss_x=1.0,ss_y=1.0,dest_x=592,dest_y=320,Smode=2,strength=40~~80) ----------------------------------------------------------------------------- Rule of thumb: The better the result, the longer it takes. (The reverse conclusion is not necessarily true, however)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#54 | Link |
|
DVD Destroyer
Join Date: Dec 2003
Location: Land of the burning embacies
Posts: 68
|
I took a look at the alpha some hours ago and it looks cool ATM.
The speed is approx 2-3 FPS (Athlon XP 2600+ @ 2300 MHz on nForce 2 Dual Channel 521 MB RAM) I think that could be the best quality improving filterfunction ever posted in this forum ... but i'm beginner
|
|
|
|
|
|
#55 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I am trying to use LimitedSharpen on a new encode I'm trying but for some reason warpsharp.dll can't be loaded. Does LimitedSharpen need it if it's going to be called like this: LimitedSharpen(ss_x=2.0, ss_y=2.0)?
|
|
|
|
|
|
#56 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Québec, Canada
Posts: 107
|
Quote:
BTW.. warpsharp.dll loads normally here.
__________________
PiXuS |
|
|
|
|
|
|
#57 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I had inspected the avs and didn't catch any warpsharp calls except for unsharpmask, but I wanted to make sure. BTW, warpsharp usually loads without problems
Has anyone else had any issues trying to load it?
|
|
|
|
|
|
#59 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
LimitedSharpen washes out the color?
First of all if you have read my thread on using Avisynth in ffdshow for DVD playback you know I am using LimitedSharpen in an unorthodox manner for on the fly DVD viewing. Here are the settings I use: LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=40) If you look at the before and after pics you can see I get a much sharper image but the colors are faded compared to the original. So now I am wondering if there is a way to automatically compensate for that with little overhead and without having to mess with Hue & Saturation settings? Thanks for any input Here are the pics; Before ![]() After Limited Sharpen
|
|
|
|
|
|
#60 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
That's not the fault of LimitedSharpen: It does not process chroma at all
(the last step in the function is the merging of the unprocessed original color planes).In these two pictures here it's a luma problem - there is much contrast missing, it looks like a gray haze was layed over the 2nd one. Also note that none of your screenshots in the other thread actually show this problem, so ... dunno what it is, but something went wrong here.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#62 | Link | |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
|
|
|
|
|
|
|
#64 | Link |
|
Registered User
Join Date: Dec 2002
Location: leeds england
Posts: 94
|
Didee,
I'm having a problem with limited sharpen I hope you can help with. when I run this script below, virtualdubmod throws up the following error message. avisynth open failure. script error: there is no function named "limitedsharpen" I am running avisynth version 255 and I have mask tools version 1.5.4 #Star Wars Episode IV : A New Hope Master Script #Plugins LoadPlugin("h:\avsfilters\sangnom.dll") LoadPlugin("h:\avsfilters\asharp.dll") LoadPlugin("h:\avsfilters\atc.dll") LoadPlugin("h:\avsfilters\MPEG2Dec3.dll") # because Avisynth 2.5 didn't support Autoloading yet LoadPlugin("h:\avsfilters\msharpen.dll") LoadPlugin("H:\avsfilters\stmedianfilter.dll") LoadPlugin("H:\avsfilters\warpsharp.dll") LoadPlugin("D:\Program Files\AviSynth2\plugins\masktools\MaskTools.dll") Loadplugin("H:\avsfilters\removedirts.dll") Loadplugin("H:\avsfilters\de.dll") Import("D:\Program Files\AviSynth2\plugins\limitedsharpen.avsi") #Source Files v1 = AviSource("p:\anh_source.avi").crop(0,45,0,-73).ConvertToYV12().Lanczos4Resize(720,600) v2a = v1.SangNom(order=0).Lanczos4Resize(720,270) v2b = v1.SangNom(order=1).Lanczos4Resize(720,270) v3 = v2a.overlay(v2b, opacity = 0.5, mode="darken").tweak(bright=-12,cont=1.05,sat=1.30).LimitedSharpen() v4 = v3.AddBorders(0,36,0,36) #v4 = v3.AddBorders(0,52,0,52) #v5 = v4#.DeDot(50,5,5,25) #v6 = v5.Subtitle("Going somewhere, Solo?", first_frame=70640, last_frame=70680, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5).Subtitle("It's too late.", first_frame=70808, last_frame=70847, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v7 = v6.Subtitle("You should have paid him when you had the chance.", first_frame=70855, last_frame=70913, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5).Subtitle("Jabba's put a price on your head so large...", first_frame=70924, last_frame=70994, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v8 = v7.Subtitle("...every bounty hunter in the galaxy will be looking for you.", first_frame=71006, last_frame=71073, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5).Subtitle("I'm lucky I found you first.", first_frame=71081, last_frame=71119, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v9 = v8.Subtitle("If you give it to me, I might forget I found you.", first_frame=71191, last_frame=71270, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5).Subtitle("Jabba's through with you.", first_frame=71349, last_frame=71394, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v10 = v9.Subtitle("He has no time for smugglers who drop their shipments...", first_frame=71418, last_frame=71506, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5).Subtitle("..at the first sign of an Imperial cruiser.", first_frame=71514, last_frame=71550, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v11 = v10.Subtitle("You can tell that to Jabba. He may only take your ship.", first_frame=71640, last_frame=71730, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5).Subtitle("That's the idea.", first_frame=71787, last_frame=71818, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v12 = v11.Subtitle("I've been looking forward to this for a long time.", first_frame=71826, last_frame=71912, x=-1, y=334, font="BD Hanover", size=20, text_color=$ffFFff, spc=5) #v13 = v12.Lanczos4Resize(720,480) return v4 #total running time is # #1:52:15s
__________________
when someone says yes it usually means no or maybe with a perhaps thrown in for good measure |
|
|
|
|
|
#68 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
lancer:
You have it running now, yes? One more tip: Currently your clip undergoes two resize operations where only one would be sufficient (due to LS's internal supersampling. Adapt your script like this: Code:
ss_factor = 1.5
v1 = AviSource("p:\anh_source.avi").crop(0,45,0,-73).ConvertToYV12().Lanczos4Resize(720,600)
v2a = v1.SangNom(order=0) .Lanczos4Resize(720,round(270*ss_factor/4)*4)
v2b = v1.SangNom(order=1) .Lanczos4Resize(720,round(270*ss_factor/4)*4)
v3 = v2a.overlay(v2b, opacity = 0.5, mode="darken").tweak(bright=-12,cont=1.05,sat=1.30)
\ .LimitedSharpen(ss_x=ss_factor,ss_y=1.0, dest_x=720,dest_y=270)
Code:
v3 = logic(v2a,v2b,"min",Y=3,U=2,V=2).tweak(bright=-12,cont=1.05,sat=1.30) \ .LimitedSharpen(ss_x=ss_factor,ss_y=1.0,dest_x=720,dest_y=270)) Code:
ss_factor = 1.5
v1 = AviSource("p:\anh_source.avi").crop(0,45,0,-73).ConvertToYV12().Lanczos4Resize(720,600)
v2a = v1.SangNom(order=0)
v2b = v1.SangNom(order=1)
v3 = logic(v2a,v2b,"min",Y=3,U=2,V=2).tweak(bright=-12,cont=1.05,sat=1.30)
\ .LimitedSharpen(ss_x=ss_factor,ss_y=round(270/600*ss_factor/4)*4,dest_x=720,dest_y=270)
Happy restauration
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 19th November 2004 at 09:38. |
|
|
|
|
|
#70 | Link |
|
Registered User
Join Date: Dec 2002
Location: leeds england
Posts: 94
|
didee,
I'm resizing down again because then I add black bars and put in subtitles which are then all stretched anamorphic before being passed to TMPGenc. if it wasn't for the subtitles I wouldn't have to size it down again.
__________________
when someone says yes it usually means no or maybe with a perhaps thrown in for good measure |
|
|
|
|
|
#71 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
lancer,
in some sense you got me wrong ... and in some sense I got you wrong ![]() I did not see that you resize to anamorphic aspect ratio at the very end ![]() But that's not the point I was referring to. Your actual chain is doing the following: Code:
upsize -> Sangnom^2 -> downsize -> average(Sangnom) -> LimitedSharpen(upsize->sharpen->downsize) 1st one: Code:
upsize -> Sangnom^2 -> average(Sangnom) -> downsize -> LimitedSharpen(upsize->sharpen->downsize) Code:
upsize -> Sangnom^2 -> average(Sangnom) -> LimitedSharpen(sharpen->downsize) Regarding the anamorphic step: in respect to picture quality, it would be much better to perform LimitedSharpen at the very end, and let LS do the anamorphic resizing during doing its work. But it could be that the subtitles get a little un-beautyfied through LS (I suppose not, but it could be). Just try to use LS at the very end, with (dest_x=720,dest_y=480). In case the subtitles get aliasing, try again with (ss_x=2.0,ss_y=2.0,dest_x=720,dest_y=480). Alternatively, one could produce an anamorphic frame through LS, create the subtitles on a fake clip where they seperately would be resized to anamorphic, and then transfer the subtitles from the fake to the real clip. No big deal to do that, but it would lead a little too far for this thread
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 20th November 2004 at 19:07. |
|
|
|
|
|
#72 | Link |
|
Registered User
Join Date: Nov 2004
Posts: 3
|
Ugh, probably just me being crap .. but when I try to get this to work it get errors, mostly being:
LoadPlugin: unable to load "C:\dodo\MaskTools.dll" This is the script: Code:
Import("C:\dodo\limitedsharpen.avsi")
LoadPlugin("C:\dodo\dgmpgdec\DGDecode.dll")
LoadPlugin("C:\dodo\MaskTools.dll")
LoadPlugin("C:\dodo\UnFilter.dll")
LoadPlugin("C:\dodo\Decomb521.dll")
mpeg2source("sample.d2v", idct=5)
Crop(0,4,-0,-4)
Unfilter(40,40)
LanczosResize(640,352)
LimitedSharpen(ss_x=1.0,ss_y=1.0)
Any clues?
Last edited by flib; 21st November 2004 at 01:57. |
|
|
|
|
|
#73 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Let me guess... You have a P4 with hyperthreading ?
Fetch this version, it should work : http://manao4.free.fr/MaskTools-p4-5.dll Second solution : disable hyperthreading. |
|
|
|
|
|
#74 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
IMHO hyperthreading is more trouble than it's worth. i never had it explained to me: what benefit is to be gained by simply "pretending" to have 2 processors, considering most apps aren't all that good with multi-proc anyway?
things are less stable with hyperthreading, that's for sure.
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#75 | Link | |
|
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,424
|
Quote:
Anyway, the same bugs that plague a Hyperthreading system will bite you if you've got a dual-CPU system, so if more bugs get fixed by HT getting popular that's fine with me. |
|
|
|
|
|
|
#76 | Link | |
|
Registered User
Join Date: Nov 2004
Posts: 3
|
Quote:
|
|
|
|
|
|
|
#77 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Update
A small update to LimitedSharpen:
Limiting with "wide=true" was b0rked, giving rather coarse results (braindead error with variable names). This is fixed now. (I wonder why nobody has complained about that yet. Everybody using the defaults and nothing else? Lame ... )The function script on page 1 is updated. There are a few more refinements coming, amongst them a custom unsharp masking, targeting at "uneven" x/y sharpening, e.g. for VHS captures. Perhaps an easy halo reducer will also find its way in ... let's see.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#78 | Link | |
|
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
i think i could put a very simplyfied version of the script into a plug-in
just these lines: Quote:
maybe someone with mroe experience on that can tell |
|
|
|
|
|
|
#80 | Link | |
|
Registered User
Join Date: Nov 2003
Posts: 148
|
@Didée:
Quote:
@E-Male: i tried it. performance is exactly the same. a very little improvement could be the follow line-replacement at the ending: tmp=clp.lanczosresize(dest_x,dest_y) -> tmp= (dest_x != ox || dest_y != oy) ? clp.lanczosresize(dest_x,dest_y) : clp greetings. Last edited by Heini011; 1st December 2004 at 16:28. |
|
|
|
|
|
|
#81 | Link |
|
Registered User
Join Date: Dec 2002
Location: leeds england
Posts: 94
|
didee,
I've been using limited sharpen smode=3 for a few days and I am wondering at times if it is even there. there seems to be little improvment unless I ramp up the strength to some ridiculous level and then end up with ugly line artifacting. do you think I should be adjusting the overshoot to give it something more to bite with. also, having seen that picture of the eyes and the different modes, I think I might give Smode=1 a try as this seemed to capture the texture of the better and ehance the lines in this area. at the moment I can't see much improvement which is a shame considering how much people rave about it. script will be posted when I get home.
__________________
when someone says yes it usually means no or maybe with a perhaps thrown in for good measure |
|
|
|
|
|
#82 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
lancer, perhaps it's your expectations, and not the script ...
![]() LS is meant more as a "refinement" sharpener, not so much as a "contrast booster". That means, you won't get "blown away" by the effect - at least not with the defailt settings. For more contrast enhancement, try (strength=200,wide=true,Lmode=2) as a start. This is most probably way too strong, and you'll have to reduce the strength ... but you need to have the noise-level already very low, and you'll likely to get some edge-halos again, with those settings. *** Next version of LimitedSharpen is almost ready. Late Yesterday (very late), it produced things like this ... when chaining two instances of it, and denoising in-between them
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#83 | Link |
|
Registered User
Join Date: Dec 2002
Location: leeds england
Posts: 94
|
maybe,
the thing is, I'll tell you where I'm coming from on this, perhaps you can make a suggestion because I am flailing a bit. I think I got spoiled by MSU smart sharpen. you see, that on my file produces some nice results, but I object on principle to a filter that isn't even remotely optimised. the rest of the script prior to the application of MSU in vdub yields 10-12fps. as oon as MSU is applied it drops to 1-2 fps and that is just unacceptable when I've got 180,000 frames to process. now before someone says its because of the switch to RGBmode in vdub, no it isn't I tested that and it is entirely down to the MSU smart sharpen filter. what I'm trying to do then is accomplish the same 'look' as MSU smart sharpen but by using other filters so the outputting is quicker. the creators say it is basically a warpsharpen filter with some routines of their own running. there's definitely some form of contrast running in their somewhere but I've dealt with that. I've used asharp and that is nice, but the very fine line detail on faces and clothing is not as good as msu. so I'm thinking perhaps limited sharpen in combination with asharp and maybe unfilter may deliver for me. the noise level is low on my source file so I'm not worried about halo's but I am trying to avoid edge enhancment delineation on the edges. when you say chaining two instances, I take it you mean something like limitedsharpen() denoiser here limitedshapren() I was considering this, perhaps trying one mode on first pass and another mode on the second. In combination therefore I might do quite well. what do you think?
__________________
when someone says yes it usually means no or maybe with a perhaps thrown in for good measure |
|
|
|
|
|
#85 | Link |
|
Registered User
Join Date: Dec 2002
Location: leeds england
Posts: 94
|
thanks for that didee, I'll give iip a try tonight.
few things about ltd sharpen that went wrong last night. when I tried smode=1 it said it couldn't because it couldn't find unsharpmask.dll anyone got a link for this? oops, just realised my version of warpsharppackage might be out of date. second smart contrast sharpening didn't work. when made special=true vdubmod popped up with a message saying line 56 or thereabouts(not in front of my computer so working from memory here) of limitedsharpen.avsi in the avisynth plugins directory was missing a flag for MMX. I'm getting better results. still not as good as MSU smart sharpen is but it is faster and maybe iip will cure the final bits I'm looking for.
__________________
when someone says yes it usually means no or maybe with a perhaps thrown in for good measure |
|
|
|
|
|
#87 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 148
|
Hi,
has someone tried the older version of this script with 'wide=true' and a low strength value ? i still use it and i'am very satisfied with the results! for example: LimitedSharpen(strength=20,ss_x=1.5,ss_y=1.5,wide=true) here is the slight modified older code again: --- # LimitedSharpen(): A multi-purpose sharpener by Didée function LimitedSharpen( 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", \ bool "soft", int "edgemode", bool "special", \ int "exborder" ) { 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 ) Lmode = default( Lmode, 1 ) wide = default( wide, false ) overshoot= default( overshoot, 1) overshoot= overshoot<0 ? 0 : overshoot soft = default( soft, false ) 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 = logic( tmp.DEdgeMask(0,255,0,255,"5 10 5 0 0 0 -5 -10 -5", divisor=2) \ ,tmp.DEdgeMask(0,255,0,255,"5 0 -5 10 0 -10 5 0 -5", divisor=2) \ ,"max").levels(0,0.86,128,0,255,false) bright_limit = (soft == true) ? tmp.blur(1.0) : tmp dark_limit = bright_limit.inpand() bright_limit = bright_limit.expand() dark_limit = (wide==false) ? dark_limit : dark_limit .inflate.deflate.inpand() bright_limit = (wide==false) ? bright_limit : bright_limit.deflate.inflate.expand() minmaxavg = special==false \ ? yv12lutxy(bright_limit,dark_limit,yexpr="x y + 2 /") \ : maskedmerge(dark_limit,bright_limit,tmp,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) \ : yv12lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +") OS = string(overshoot) Lmode == 1 ? yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x "+OS+" + ?") \ : yv12lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?") Lmode == 1 ? yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x "+OS+" - ?") \ : yv12lutxy( dark_limit, last, yexpr="y x "+OS+" - > y x x y - "+OS+" - 1 2 / ^ - "+OS+" - ?") edgemode==0 ? NOP \ : edgemode==1 ? MaskedMerge(tmp,last,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1) \ : MaskedMerge(last,tmp,edge.inflate.inflate.blur(1.0),Y=3,U=1,V=1) (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).inpand().blur(1.3).bicubicresize(dest_x,dest_y,1.0,.0) tmp= (dest_x != ox || dest_y != oy) ? clp.lanczosresize(dest_x,dest_y) : clp clp.isYV12() ? ( exborder==0 ? tmp.mergeluma(last) \ : maskedmerge(tmp,last,ex,Y=3,U=1,V=1) ) \ : ( exborder==0 ? tmp.mergeluma(last.converttoyuy2()) \ : tmp.mergeluma( maskedmerge(tmp.converttoyv12(),last,ex,Y=3,U=1,V=1) \ .converttoyuy2()) ) return last } greetings. |
|
|
|
|
|
#88 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Well, I could easily integrate that "old" behaviour again. Most probably I'd change the type of the "wide" parameter from "bool" to "integer", so that a selection can be made through it.
The "old" method for wide=true was not really "wrong" ... it simply wasn't the way I wanted it to be: wide=true is meant to gather the hi & lo limits from a wider neighborhood, but to get the average (against which a pixel gets sharpened) still from a narrow neighborhood. The old method did the former correctly, but not the latter - the average was also build from a wide neighborhood. This gave an effect with characteristics quite similar to unsharp masking, which isn't what I wanted to have. (All of which refers to Smode=3 exclusively.) Heini011, if you so much like the way it was done formerly, did you try to use Smode=1 instead, together with wide=true? Because that mode *is* unsharp masking, and should be very similar to the abandoned old behaviour ![]() Next version makes steady progress. Can't say if I'll get it baken 'til this week's end ... but I think it's worthwile waiting for it. Although I'm not sure if the current name still will be suited ... it gets more in the direction of "Sharpening Suite", or something like that ... ![]() Stay tuned, but don't hold your breath until.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#89 | Link |
|
mad computer-scientist
Join Date: Mar 2002
Posts: 1,375
|
i made an experiment with the limited sharpen formula (fixed strength and overshoot) vs. a lookup table
and the lookup table is noticably slower but i see a possible way for optimizing it: we have three values: pixel, maximum and minimum (max and min of the pixel and it's 3x3 neighborhood) now since the minimum can't be bigger than the pixeland the maximum is never smaller we have many unused values in the table i don't know if i'm anywhere near able to take advantage of that now, but i'll have another look tomorrow |
|
|
|
|
|
#90 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
|
|
|
|
|
|
|
#91 | Link |
|
Registered User
Join Date: Dec 2004
Posts: 6
|
Some questions
Didée
Exellent script. Thanx to U and Socio I can use it with ffdshow. Can I ask you about^ 1. Can you recomend denoiser(s) with parameters for light, medium and strong dvd noise, that are not so CPU intensive ? Can it be in your script ? 2. Can "autocrop" can be done by script ? Autocrop plugin do not work with ffdshow. Can it be in your script ? 3. Is the splitting luma and chroma for denoising, resizing and sharpen by different algorithm good idea ? 4. Is adding to the end of you script a little "wow effect" edge contrast enhancement is good ? And what is your recomendations ? Thankx again. |
|
|
|
|
|
#92 | Link | |
|
DVD Destroyer
Join Date: Dec 2003
Location: Land of the burning embacies
Posts: 68
|
Quote:
Didee, i'm begging... please give us your new version
|
|
|
|
|
|
|
#93 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Welcome to our little forum, VictorD.
It's not fully clear to me if all your questions belong to realtime usage through ffdshow - however: 1. Uh, I never bothered too muc about realtime denoising. From ffdshow's internal filters, 'temporal', 'gradual', and 'mplayer temporal' should be fast enough to run along LimitedSharpen. Of the avisynth filters, 'FluxSmooth', 'Convolution3D'(yv12) and good old 'temporalsoften' should be appliable. And probably some more that currently don't come to my mind. 2. Autocrop in realtime? Don't think that's possible - Firstly autocropping needs some analysis that obviously can't be done in realtime. Secondly, cropping alters the frame size, and the framesize gets fixed during the creation of the DirectShow graph, and AFAIK can only be altered again by recreating the graph. For not-realtime encoding, there are autocrop filters that do their job - but I haven't used such a one once. 3. Yes. 4. If you like, you can add so much EE as you want. I'll cry murder, then. The whole aim of LS is to sharpen without EE - if you're going to add it afterwards, you can completely drop LS out, and enjoy the effect of a simple 'sharpen()' ![]() The "wow effect" is included in the next version. But bad news, the wow will d.e.f.i.n.e.t.l.y will not run in realtime ... DeepDVD: Mind you, I know. Developping problems. Of all new features, the cores themselves were working, but the integration in LS, the integration ![]() And the special feature (greetings to MSU ;-) ) drove me crazy: Had it running, broke it, had it running ... broke it more than hundred times, repaired it same often ... wondered on which of the past five 5-junctions another way would've been the right one instead of the chosen ... and finaly took a footpath instead of any way. See, the script is a chain of inter-knotted knots ... It's all up'n'running now. One additional knot, and some finetuning ... with alittle luck, within the old year. From a two weeks old intermediate version: (1) This to that, (2) this to that, (3) this to that, and (4) this to that. (Orig: encoded@712*424(original) / screenshot lanczos-resized. LS-EX: encoded@720*544 / screenshot lanczos-resized.) In the meantime it has become more graceful, sharper, and the EE artefacts have vanished.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#94 | Link |
|
Registered User
Join Date: Dec 2004
Posts: 6
|
More about #3
Thanx. Yes all questions about only realtime usage.
"Is the splitting luma and chroma for denoising, resizing and sharpen by different algorithm good idea ?" 3. Can you (or it's allready done by your script ?) tell me about it more: a) how can I split luma & chroma in right way: - luma (proceed) - clip - - clip - croma (procced) - b) what is good (or need to know) for denoising luma / croma ? c) can luma & chroma be resized by different chains & how ? d) what is good (or need to know) for sharpen luma / croma ? Can you provide some good startup example ? I'm just the beginer and want to know what can be done. """4. If you like, you can add so much EE as you want. The whole aim of LS is to sharpen without EE - if you're going to add it afterwards, you can completely drop LS out, and enjoy the effect of a simple 'sharpen()'""" I understand, but for "all in one" script can you did like: 1)EE, 2)LS, 3)99% LS + 1% EE. I realy like your script and looking forward for your next version. I think it's can be revolution#2 (#1 is ffdshow) for realtime DVD show. |
|
|
|
|
|
#95 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
to a) and c) :
Exactly speaking, a true "splitting" into Luma/Chroma is not possible in AviSynth2. A YUV clip always has three planes, a single plane (greyscale) colorspace does not exist. But one can build a clip by mixing together the planes of other clips, and that is one way how individual plane treating usually is done. The other way is to use filters that can be explicitely told to work only on certain planes. E.g. to use sharp luma resizing together with soft chroma resizing, one would do: Code:
source = last soft = source.bilinearresize(x,y) # soft #soft = source.bicubicresize(x,y,1,0) # very soft sharp = source.lanczosresize(x,y) sharp.MergeChroma(soft) to b) : There are hundreds of different denoising filters out there, for a reason: denoising is not a trivial task, and all depends on noise characteristics, personal taste, and available processing time. For realtime usage, the ones mentioned in previous post should be the ones to try first (plus denoise3Dhq, but that probably draws too much CPU cycles to run along LimitedSharpen in realtime). If you're watching your DVDs on a PC monitor, you might try out the YlevelsG/S/C functions - they might give a little "wow" effect, too ![]() (Note: these are also to find in recent ffdshow versions - but the port seems to have been a little buggy: the effect of ffdshow's Ylevels is not the same as when using my functions - pity ...)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#96 | Link |
|
Registered User
Join Date: Feb 2002
Posts: 76
|
WHAT a GREAT filter!!!!!!!
Didee' and others, whoever you may be, THANK YOU for this filter. I am still a somewhat newby to avisynth and last week and again yesterday I used the limitedsharpen filter and the results yesterday were astounding. NOW THATS SHARP!!!!
I have used: LimitedSharpen(ss_x=2,ss_y=2,Smode=3) SHARPness increased slightly LimitedSharpen(ss_x=2,ss_y=2,Smode=3,strength=100) REAL SHARPENING and no visible artifacts Great job! |
|
|
|
|
|
#98 | Link |
|
Registered User
Join Date: Apr 2004
Posts: 105
|
I don't really think a source can be sharpened without having edgy looks everywhere...making the image look like a sheet of glass with small cracks everywhere...well, bad way of putting it, but I'd have to see some screenshots. Plus, using the maximum strength of a filter such as sharpening IMO would make the image too sharp. Is this filter really different? I am unable to try it since I am waiting for a new mobo and my current one doesn't detect hardware such as my firewire so I am unable to access the videos on my external HD or upload video. Anyway... I'll give this a shot when things return to normal for me.
|
|
|
|
|
|
#99 | Link |
|
Registered User
Join Date: Apr 2004
Posts: 105
|
On another note, I _personally_ don't care much about the speed of a plugin. I mean, if it is truly the best of its kind, then it should be well worth such a wait, I think. As long as it doesn't take 24 hours to render a 5 minute clip, you know. But if people refer to 3, 4 or 5 fps as slow, then I have to disagree with them. I remember when I first dealth with video rendering in Ulead VideStudio and it would take all night to do a 15 minute clip with my videocard (at the time it was a Voodoo 4 4500 AGP), and that didn't bother me.
I am still pretty new to this stuff, but me and my friends did backyard wrestling today and I know the source video of my DVC isn't going to be perfect. There will be noise, I might want to sharpen, enhance the colors, etc... but I'd rather use the plugins and codes you people use than use some All-In-One application that does a crap-ass job. Cheers to all and Happy New Year, Jeremy |
|
|
|
|
|
#100 | Link |
|
Guest
Posts: n/a
|
Here are some shots for you:
Source (notice the major haloing): ![]() After BlindDeHalo2(2.5,2.5,100) & HQDering(255): ![]() After LimitedSharpen(ss_x=2.0,ss_y=2.0,Smode=3,strength=100): ![]() While I won't say that no artifacts are introduced to the picture, cause that would be untrue, but the sharpening artifacts are significantly less then that in the source and the picture is very sharp looking. |
|
|
|
#101 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Nice example, ObiKenobi.
StateOfMind's doubts have some ground, though. In digital images, "sharpness" cannot get beyond a certain limit: the aliasing limit. Beyond "sharpness", there's nothing but aliasing to come. That's "geometric" sharpness, if I can say so. "Perceptual sharpness" is more about contrast than about edge sharpness - but there arise other problems: edge halos, loss of gradient shades, and so on. So, a source that is rather clean, but is soft or blurry, is a perfect target for sharpening. If OTOH one takes a source with good sharpness and contrast, and tries to further enhance this one, than there is big danger of doing more harm than good - if sharpness and contrast are already @ MAX, then the story has reached its end. Unless one is going to upsize the source, since that gives additional headroom for sharpening. LOTR TTT, original: ![]() Trying something, despite all doubts: ![]()
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 31st December 2004 at 03:42. |
|
|
|
|
|
#103 | Link |
|
Registered User
Join Date: Apr 2004
Posts: 105
|
Wow...I saved the images and compared by looking back and forth about 50 thousand times in IrfanView, LOL...and I can say that I'll definitely be using this filter with my DV sources if necessary. Experimentin will sure be fun for a kid at heart like me!
Didée, good points. ![]() Thank you all for the screenshots. Muchly appreciated. Cheers, Jeremy |
|
|
|
|
|
#105 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
/*hands over cough syrup to plagued Soulhunter*/
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#107 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
good question. i'd say bob first then limitedsharpen. interlaced sources should be kinda blurry in the vertical direction, otherwise you're driven mad by bouncing lines when you watch it on a TV.
i'm too lazy to look through the source right now, but is there a way to limit limitedsharpen (hehe) to the horizontal axis only? that would allow interlaced processing without bobbing, and would also be useful for those annoying half-size-upscaled DV cameras out there, where horizontalreduceby2 + lanczos(720,height) actually makes them look better, and limitedsharpen finishes the job.
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#108 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
That's a problem. I suggest waiting for LS-EX to get finished.
First point is that most sharpeners can't be restricted to work in one direction only. In fact, "sharpen()" is the only one that offers that possibility. LS-EX will additionally offer a custom unsharp masking, that can work in only one direction - aiming mainly at sharpening VHS captures, but probably also for those DV sources Mug Funky mentioned. Second point is that getting the neighbor's extrema is currently done by "inpand()" and "expand()", which is reasonably cheap and fast. Building an according functionality that works on only one axis is cumbersome, and would be rather slow, in comparison. What's generally better for the interlaced case - well, I just can't tell you. Either seperate/weave, or dumb|smart bobbing + re-weaving. I never aim for interlaced output, and very seldom deal with interlaced input at all. So try for yourself, and share your findings ![]() For the time being, there are two possibilities to sharpen only (or ~mostly~) horizontally: 1) use double or triple as much vertical supersampling than horizontal. This gets pretty slow, though. 2) Use "Smode=2", and make yourself the following change to the function: Code:
normsharp = Smode==1 ? unsharpmask(strength,radius,0) \ : Smode==2 ? sharpen(float(strength)/100.0 ,0) \ : yv12lutxy(tmp,minmaxavg,yexpr="x x y - "+Str+" * +")
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#109 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
hehe, i'd already made that hack earlier today. couldn't say how successful it was - i simply discovered how vertically unsharp my DV source was as well.
man, consumer-level DV will be the death of me. if i have to do any more editing of some guy's crappy handheld-in-the-crowd of some gig or other, i'll scream. people should be required to get a license to use a DV cam (and there should be a way to turn the compressor off and set a manual recording level). oh, and there should be a ban on LP mode enforced with heavy sack beatings.
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#111 | Link | |
|
Registered User
Join Date: Nov 2004
Posts: 268
|
Please someone help me... Through all day long I can't load it at all !!!
I have MaskTools.dll (1.5.1), Warpsharp.dll from 2003.11.03 package, and limitedsharpen.avsi script from the first page of this thread. This is my script: ------------------------------------------- LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgdecode.dll") LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\Loadpluginex.dll") LoadPlugin("C:\1\Warpsharp.dll") LoadPlugin("C:\1\MaskTools.dll") LoadPlugin("C:\1\limitedsharpen.avsi") mpeg2source("C:\Cradle\Cradle.d2v") crop(10,0,694,570) Lanczos4Resize(688,400) Deen() YlevelsS(0,1.5,255,0,255) ----------------------------------------- What am I doing wrong ? I am at a loss I have ALL possible msvcr's & msvcp's in my windows\system32 directory. And still: Quote:
|
|
|
|
|
|
|
#115 | Link | |
|
Guest
Posts: n/a
|
Quote:
Last edited by L'il Jerry; 8th March 2005 at 00:17. |
|
|
|
|
#116 | Link |
|
Registered User
Join Date: Nov 2004
Posts: 268
|
L'il Jerry, I can't use it until I load it properly. OK, I removed ALL plugins from autoload directory.This is the script which works OK but it doesn't work without # before LoadPlugin("C:\1\limitedsharpen.avs"), I get a message "Avisynth open failure":
------------------ LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgdecode.dll") LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\Loadpluginex.dll") LoadPlugin("C:\1\Warpsharp.dll") LoadPlugin("C:\1\MaskTools.dll") #LoadPlugin("C:\1\limitedsharpen.avs") mpeg2source("C:\Cradle\Cradle.d2v") crop(10,0,694,570) Lanczos4Resize(688,400) ------------------ |
|
|
|
|
|
#118 | Link | |
|
Registered User
Join Date: Sep 2002
Location: California
Posts: 1
|
Quote:
Removed LimitedSharpen.avsi from the plugin folder and then Vdudmod would load. Hmm. Copied and pasted the script again in wordpad but saved it as text not RTF as I had originally done. LimitedShapen autoloads and manually loads when I changed it to LimitedSharpen.avs as a test. |
|
|
|
|
|
|
#120 | Link |
|
Registered User
Join Date: Mar 2004
Location: Germany => Hamburg City
Posts: 9
|
How about opening your avs file in Media Player Classic!
If there is some problem with the plugins or whatever the Player showes you some information where exactly the problem is (but this doesn't help allways!). Great for debugging! Hope I could help...
__________________
Athlon XP 3.200 Barton | 2 x 512MB 400 DDR | GF 6800LE | Win XP + SP2 |
|
|
|
|
|
#121 | Link | |
|
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,424
|
Quote:
Either use Import("C:\1\limitedsharpen.avs"), or rename it to limitedsharpen.avsi and put it in your plugin directory, but stop trying to load something with LoadPlugin that isn't a plugin... np: Up, Bustle & Out - Los Locos Cubanos (Snowboy Mix) (Xen Cuts (Disc 2)) |
|
|
|
|
|
|
#123 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
That's the behaviour to be expected. Nothing wrong with that. The bigger the used supersampling, the smaller the range of the fixed 3*3 (default) or 5*5 (wide=true) neighborhood window gets, wich consequently lessens the maximum possible change for a pixel.
For ss values > 1.5~1.75, you could use wide=true, and bigger strength as well.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#126 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Sorry, I dont't understand your question. Please rephrase.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#128 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
YV12 *is* a YUV colorspace. You probably mean LS should support YUY2 ...
This is not directly possible. The internal transformations are done with the command "YV12LUTxy()" -- the name speaks for itself. However, if you feed a YUY2 clip to LS, then you get back the original, fully untouched YUY2 color planes - not the ones downsampled by ConvertToYV12 (since I copy back the color planes of the input clip at the very end).
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#129 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 450
|
@Didée
Wow..! It's very very impressive even at default mode! Very very compliments! ![]() Now, can you suggest me a setting to enhance only those little details like a small beard on a face straight in front the camera, or little visage lines, in other words, those small details that makes a look more photorealistic-like rather than film-like? I don't mind Cpu time. Thanks for now
|
|
|
|
|
|
#130 | Link | |
|
Registered User
Join Date: Oct 2004
Posts: 129
|
Quote:
--Leonid |
|
|
|
|
|
|
#131 | Link | ||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
However, digging out faint detail is not the job where LS is best at. For such purposes, I would rather try iiP -- the intention for iiP was exactly this: enhance faint detail (but not the noise). The upcoming big brother of LS will offer good alternatives to both of them. Alas the gestation progress is quite problematic. Let's hope the best ![]() Quote:
![]() I must do the conversion, to be able to process YUY2 input at all. So, at first the YUY2 color planes are "parked". Then the input gets converted & the luma processed. At the end, the parked chroma planes are copied back, and the output contains the sharpened luma plane plus the virgin color planes.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
||
|
|
|
|
|
#133 | Link |
|
Registered User
Join Date: Jun 2004
Location: Netherlands
Posts: 129
|
Currently a code like this one:
Code:
Limitedsharpen(ss_x = 1.5, ss_y = 2,dest_x = 720, dest_y = 480,strength = 200, exborder = 4) I guess what i'm asking is, which of the options gets you a speed boost by turning it on/off, lower/higher? I get the trade-off between supersampling and strength, are there any others? |
|
|
|
|
|
#134 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
- Smode=3 (default) is the slowest. Smode=1 is somewhat faster. Smode=2 is the fastest.
- Processing a YUY2 clip is slower than processing a YV12 clip. - Using "exborder=true" slows down the process (one additional MaskedMerge() is done). - Processing a YUY2 clip +plus+ using "exborder=true" is the slowest possible combination ... So, activate "exborder" only if it is absolutely unavoidable. If it's possible to get clean borders by some minor additional cropping, this would be preferable. Smode=2 is the fastest, but doesn't allow as strong sharpening as the modes 3 and 1 do. Therefore, you should try "Smode=1" together with "radius=1". It would be possible to integrate kassandro's "limitchange" into the script, to increase performance. However, in its current form this one allows only "hard clipping". All the neat stuff like "overshoot", "Lmode=2" and "wide=true" would not be available, and usage of Smode=3 would cut the possible benefit immediately to half again. The biggest braker is the supersampling, anyways.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 19th April 2005 at 16:00. |
|
|
|
|
|
#136 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Yes indeed, that was a typo. While typing the post, meself lost track of all the modes & parameters
![]() - Corrected, thanks.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#140 | Link |
|
Registered User
Join Date: Jul 2003
Posts: 1,152
|
Slightly OT - Didée you dont somehow work for Sony do you?
I was looking for something when I came up to this (direct link to PDF, look at page 5) and I thought I've seen this somewhere.. ![]() Adaptive Detail Control on the one side and 'Electronic Soft Focus' on the other. Their graphs do illustrate how to do 'smart blurring'. Oh and nice job on your original illustrations
|
|
|
|
|
|
#141 | Link |
|
Registered User
Join Date: Oct 2004
Posts: 129
|
I have the following question. I wanted to convert some footage from PAL to NTSC and apply limitedsharpen. My plan was to replace the LanczosResize function with limitedsharpen right in the middle of conversion. Here's what I had in mind:
AVISource("pal.avi") AssumeFrameBased() AssumeTFF() SeparateFields() PixieDust() # clean VHS fft3dFilter() # more noise reduction Weave() TDeint(mode=1,order=1,type=2) LimitedSharpen(dest_x = 352, dest_y = 480) ConvertFPS(59.94) AssumeFrameBased() AssumeTFF() SeparateFields() SelectEvery(4,0,3) Weave() So is it a good idea to stick limitedsharpen in the middle of all this. Or should I do it either before or after? Thanks. And by the way, inside LimitedSharpen, I replaced LanczosResize with Lanczos4Resize. --Leonid Last edited by leonid_makarovsky; 15th June 2005 at 04:23. Reason: Forgot to add LanczosResize->Lanczos4Resize replacement |
|
|
|
|
|
#143 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
![]() The wording "PAL video" suggests you're dealing with interlaced footage. Applying LimitedSharpen to interlaced footage is a big NO-NO. LS is for progressive content only. For your interlaced source, put it between SeparateFields() and Weave(), as you did for the other progressive filters. Moreover, sharpening after deinterlacing generally might give problems -- a smart deinterlacer usually is set up let minor combing sneak through. Without sharpening, that's okay. But when sharpening afterwards, the weak residual combing will bite you back... Plus, almost all deinterlaces produce line shimmering. Some do more, some do less ... but they all do. Sharpening doesn't exacly help on the shimmering problem. Last time I had to deinterlace and (strongly!) sharpen a combed source, I switched to double-height deinterlacing plus additional post-supersampling (by ELA) to bring the shimmering down. @ communist Ooops, completely forgot to answer on that one ![]() No. Regarding video processing, neither I work for Sony, nor for any other company. Perhaps I should, but contract offers so far sum up to zero ... However, similar ideas may coincidentially appear simultaneously. E.g. it is said that another man invented the long-glass at about the same time than DaVinci did. In fact, this is a common phenomenon. History is full of examples where the same kind of thing suddenly was inventend almost simultaneously, but fully independend, by different minds. (Think about Sheldrake's idea of Morphogenetic fields...) This doesn't exclude the possibility that some of the ideas I have posted in this forum might have appeared in commercial products. Someone told about a PhotoShop plugin containing a sharpener which results looks pretty similar to LimitedSharpen. Lately I've stumbled over several DVD releases (doodad in TV illustrates) with very little noise and pretty good sharpness, where the overall characteristics strongly reminded me of iiP(). And a week ago, I captured a snip of (the original, old) "War of the Worlds" by DVB, which contained a form of "textured" noise, almost exactly like what is generated by the premature "noise factory" I posted here. Coincidences or not - what I can assure you of is that everything I have, do and will post about video processing, has grown in my own grey cells. And in cases I make use of ideas brewed by other people, sure as anything I give credit. (I couldn't sleep well when selling other's ideas as my own.)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 29th June 2005 at 09:30. |
|
|
|
|
|
|
#144 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 66
|
Hi Didee,
Someone posted a strip down version of the LimitedSharpen at AVSForum HTPC forum LimitedSharpen discussion here http://www.avsforum.com/avs-vb/showt...&&#post5816796 Maybe you can comment if it's the right way to work! ![]() regards, Li On |
|
|
|
|
|
#145 | Link | |
|
Confused
Join Date: Apr 2003
Location: Euroland
Posts: 2,820
|
Quote:
Now I wait for this "more noise to smooth areas / less noise to detailed areas" thing !!! Bye Last edited by Soulhunter; 29th June 2005 at 10:17. |
|
|
|
|
|
|
#146 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
And you must have a very good resciever in your mind. And if you have the attitude not claiming credits for other people ideas, then you always rescieve new ideas of your own. Paul Mc Cartney always said he just could pick the songs out of the air.. Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
|
|
|
|
|
|
#147 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ psme
Looks okay so far, nothing false with that. However, for this kind of coarse realtime processing without any supersampling, why at all make a "mod" of LimitedSharpen, that doesn't really deserve the name anymore? You can get almost the same, and even faster, by using something like Code:
import(".../RemoveGrain.dll")
import(".../unfilter.dll")
# use either one or the other of the following two lines
# repair(sharpen(.3),last, 1,1,1) # chroma is sharpened, too
# repair(unfilter(30,30),last, 1,0,0) # chroma untouched, even faster)
![]() Practically, that script is kassandro's "ModerateSharpen".
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#148 | Link | ||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
Quote:
Sure, mind & memory play a big role. Time back, you saw or heard something, but immediately "forgot" it again. Then, weeks or months later, all of a sudden you have a brilliant "idea" ... ![]() True forgetting, in the sense of "loosing/erasing information" is almost impossible to human's brain. ( edit )@ Soulhunter: Take an edgemask in your left hand. Take the differently noised clips in your right hand. Then clap hands.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 29th June 2005 at 12:38. |
||
|
|
|
|
|
#149 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
But I understood...Maybe the DOS command 'format b:' (b=Brain) Fred
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 29th June 2005 at 12:56. |
|
|
|
|
|
|
#151 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
C'mon, no ...
Code:
s = source n = o.MakeMuchNoise() e = o.MakeEdgeMask() .expand .MakeBlurry(much) MaskedMerge(o,n,e)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#152 | Link | |
|
Confused
Join Date: Apr 2003
Location: Euroland
Posts: 2,820
|
Quote:
O = TheSource() N = O.AddMuchNoise() E = O.MakeEdgeMask().Expand.UberSmooth() MaskedMerge(O,N,E) No matter, with "smells like 1fps" I meant the denoising... Coz you have to use a smart (so very slow) denoiser to get it work (in a proper way) no? Bye |
|
|
|
|
|
|
#153 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
A denoiser? For adding noise?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#154 | Link | |||
|
Registered User
Join Date: Oct 2004
Posts: 129
|
Quote:
Quote:
Now, do you recommend Smode = 1, 2 or 3? Quote:
--Leonid |
|||
|
|
|
|
|
#158 | Link | |
|
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Quote:
|
|
|
|
|
|
|
#159 | Link | |
|
Registered User
Join Date: Apr 2005
Location: Sumner, WA
Posts: 7
|
Quote:
|
|
|
|
|
|
|
#160 | Link | |
|
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Quote:
Of course, it is not able to find that function. In the first page of this thread, you will find the function. Save that as LimitedSharpen.avsi, import and invoke that.If you haven't read this thread yet properly, please do that first. |
|
|
|
|
|
|
#161 | Link |
|
Registered User
Join Date: Apr 2005
Location: Sumner, WA
Posts: 7
|
lol, sorry, I didnt know what that was. When I was directed to this thread, I was looking for a download link. I didnt realize it was the function. (Even though I read over it a couple of times) Now it makes sense, thanks
|
|
|
|
|
|
#162 | Link | |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
/obnioxious nitpicking mode off
|
|
|
|
|
|
|
#163 | Link |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Limitedsharpen() Rocks!!
Many old 8mm filmscenes where taken out of focus.
And even good focused 8mm filmframes are not that sharp. For several reasons a projected film looks a lot sharper. So for my captured 8mm film files I need a very good and strong sharpener. It took a while before I realised how good limitedsharpen() realy is! For my purpose I need smode=1 , and strenght above 500! Here is a result: (I also use overlay() with a BW/reversal mask to bright up the dark parts) Not bad for 8mm film, hug? ![]() Now this looks wonderful both on computer and on TV. But if I enlarge the picture and if I modify brightness I see these artifacts: ![]() The question is: what are these artifacts and how to prevent/remove them? The artifacts are not caused by the overlay, I see them on the (sharpened)original, too. Maybe limitedsharpen() amplifies something that is already in the original? Thanks! Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 12th August 2005 at 12:54. |
|
|
|
|
|
#164 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
looks like you're sharpening so much that it's running into quantization noise.
looks to me like you need more than 8 bits to sharpen that hard. there may be an elegant way to prevent sharpening of edges that are 1/255 apart. not sure how much it would complicate and slow down the script though (Didee?). [edit] btw, that looks really good. film might need a bit of colour adjustment though - grass looks a bit aqua
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#165 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
What is quantization noise, and is there a way to remove it from the original to begin with? Here's another example of the power of limitedsharpen(), it also proves of the quality of real film. The dog Bessy way back in.... 1968!! Wait a moment... do I hear music? ![]() Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 12th August 2005 at 14:48. |
|
|
|
|
|
|
#166 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
- one inpand - one expand - four yv12lutxy's: * 1x getting local detail strength (A) * 1x producing difference(orig, sharpened) (B) * 1x modifying (A) with (B) --> (C) * 1x applying (C) to input Would be rather slow when done on the supersampled source, and not very fast when done at the original resolution ... The better news is that Smode=3 can be modified to do almost the same, with >zero< speed penalty. ![]() (That "sharpen2"-function surely is floating somewhere on my HD's ... perhaps I'll manage to retrieve it )@ videoFred: Did you also try Smode=3? Is it suitable in your case, generally? And: what's the exact script you used for the B/W reversal? For this operation it is *very* important to blur the mask. This will suppress lots of small fluctuations, which else may lead to artificial amplifications. (Check >>histogram(mode="levels")<< before and after the operation!) I'd suggest to use at least blur(1.58) (better RemoveGrain(11) or (19) ), or even a small gaussian blur on the B/W mask. *** There are also some small-but-efficient tricks that can be done by limiting, which turn simple blurring operations into something like "noise downshifters" - especially when linked into the middle of the sharpening chain. But that's rather specific, one has to try a few possibilities to find the one that really bites. Example: A basic one I use rather frequently (as a preparation for moderately noisy DVB captures, prior to sharpening) is this: Code:
SmoothLimit = 3 # 1 to ??? (5? 9? 11?) # (Change no pixel by more than +/- this value) #--------------- o = last SL1 = string(SmoothLimit) SL2 = string(SmoothLimit*1.67) yv12lutxy(o, o.removegrain(4), \ "x "+SL2+" + y < x "+SL1+" + x "+SL2+" - y > x "+SL1+" - x 49 * y 51 * + 100 / ? ?",U=2,V=2)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#167 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
Thank you for supporting this exellent function. Yes, I tried it.. Smode=3 works also, but Smode=1 is better. Here is the mask script: mask2=Greyscale(invert(clipD2)).tweak(bright=-80,cont=1.5) Thank you also for the hint to blur the mask! I try it. I should have mentioned I also use degrainmedian() and fft3dfilter() before limitedsharpen(). I use these because otherwise limitedsharpen() amplifies filmgrain too much. I tried several denoisers in the past and these two are the best for my purpose. But I used the others without limitedsharpen(). Maybe I should try them again. MVdenoice() was very good, I remember. I'm very shure by now the artifacts are not caused by limitedsharpen(). I'm afraid I must do more tests again!! At my age! Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 12th August 2005 at 16:04. |
|
|
|
|
|
|
#168 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Another thing you can try is the following tweak inside of LS:
Code:
... Str=string(float(strength)/100.0) normsharp = Smode==1 ? unsharpmask(strength,radius,0) \ : Smode==2 ? sharpen(float(strength)/100.0) ... Downside is, that with strong sharpening values a "cutoff" effect may become visible. That's why for LS-EX (which I fear will never get finished...) there's also a custom unsharp mask function implemented, providing a soft threshold of similar kind, almost completely avoiding the ugly cutoff effect. I'll try to prepare some of the small tweaks & tricks you could try additionally, this WE. (Cry "no" if I should not )
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#169 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
videoFred, you should probably reduce your strength settings. In the locomotive pictures, I can clearly see aliasing in the red strips or the iron beams that join the wheels. Also, will you be watching your captures enlarged and with modified brightness? Probably not, therefore you shouldn't worry too much about removing those artifacts, whatever they are.
BTW, I concur with Mug Funky. Your results blow the originals out of the water, except for the colors, which look less vibrant. |
|
|
|
|
|
#170 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
Please do so!And thank you for thinking with me. It was a long weekend, here in Belgium. So I had time to do lots of tests. Remember the artifacts I mentioned above? It looks like limitedsharpen() not only is the best sharpener I know of, but it is also a very good tester for denoisers, because with (abnormal) high settings, it makes the artifacts of the denoisers visible. The artifacts mentioned above where caused by fft3dfilter(), but at the same time fft3dfilter() still is the best denoiser for my purpose. With other denoisers I get strange moving objects, I do not have this effect with fft3dfilter(). Sometimes I even use degrainmedian() before fft3dfilter(), to have even stronger denoising, without too much blurring or artifacts. Some first results: Fuji Single-8 film, 1972. Please keep in mind a 8mm filmframe is only 6x4mm, and film has a different -awesome!- look than digital. I want to preserve this special film look, so sharpening must be not too heavy. And these are very compressed jpeg files also. ![]() ![]() a happy Fred
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 16th August 2005 at 10:45. |
|
|
|
|
|
|
#171 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
Maybe a short explenation of my system for those who are interested in real film. Here we go: I use a 1024x768 fire wire machine vision camera and a 35mm lens with extention tubes. The camera is looking straight at the 6x4mm filmframe. I capture frame-by-frame: on my projector is a swith connected to an old computer mouse. With special software I create a growing AVI-file, each time the mouse gets a trigger one more frame is added to the file. It runs at 4fps, but the frame rate of the AVI file is taken over by the frame rate of the machine cam: 15fps. Here is my system: ![]() As you see, there are no settings on the camera, it's just a square box. All settings must be done with software. Normal camcorders have all kinds of things already build-in: DV codec, sharpening etc... With a machine camera it is possible to change these settings independent from each other and manual : white balance, hue, saturation, contrast, sharpness etc etc... Even the iris of the lens is set manual. So the end result depends strongly on these settings. But to give you a better idea, here you can download the original bitmap of the lokomotive picture. I agree the artifacts are almost not visible on TV. http://users.telenet.be/ho-slotcars/testmap/erik3.bmp As you see, the original was taken very out of focus, limitedsharpen() realy did a miracle, in this case! . Colors are less vibrant because I use a brighter overlay to get back all the info hidden in the darker parts of the picture. I must do this, because there is more contrast in film. A digital camera can not capture this contrast. So maybe I tweaked gamma and offset of this overlay a little too much.Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 16th August 2005 at 14:26. |
|
|
|
|
|
|
#172 | Link |
|
Registered User
Join Date: Aug 2005
Location: Germany, Munich
Posts: 3
|
Hello, I'm trying to use your LimitedSharpen Filter and downloaded warpsharp_2003_1103.cab as a required component. But they say in http://forum.doom9.org/showthread.ph...451#post188451 that it's only for YUY2 colorspace, and LimitedSharpen uses YV12 only. Can I use warpsharp anyway or should I use a different warpsharp file?
br Joerg |
|
|
|
|
|
#173 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Just use it, it's fine. That post of Sh0dan is from 2002 ...
But be sure to have those msvcr70/msvcr71/msvcp70/msvcp71 DLLs in your system root. (Actually only one DLL pair is needed, but I can never remember which is needed for which version of WarpSharp ... having them all is the paranoid's safety strategy )
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#175 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
But then sharpness is not so "crisp" anymore, and this "crispness" is what makes limitedsharpen() so nice... However, I posted the artifacts in the FFT thread also, maybe someone knows how to tweak FFT3Dfilter(). Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
|
|
|
|
|
|
#177 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Always a pleasure
![]() You might try to postprocess LimitedSharpen with Soothe() - should give a more calm and bitrate saving result. Perhaps I'll implant it directly into LimitedSharpen, let's see if there is positive feedback. @ videoFred: If there are temporal fluctuations in the artefacts you're getting, Soothe() could be helpful, too.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 6th September 2005 at 15:38. |
|
|
|
|
|
#178 | Link |
|
HDConvertToX author
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,550
|
Hi All !
i have i umble request is possible to post a link (or attachment) to a full working LimitedSharpen (and IIP btw...) package ? Just all dll/script and a mini how to.. a big thanks ! BHH |
|
|
|
|
|
#179 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
In the meantime: here are some first results. OK, maybe I oversharpened it a bit And I must learn to configure the WMV files, too. http://users.telenet.be/ho-slotcars/s8_video3.htm Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
|
|
|
|
|
|
#180 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ buzzqw
I pretty much dislike the habit to make "packages" or "bundles" for each and every thing. The same plugins are downloaded hundreds & thousands of times, where one download per user is fully sufficient. Moreover, bundling "naked" DLLs in many cases is a violation of licenses - for the case of "script packages" usually this is tolerated, but a violation is a violation nonetheless. And distributing the "full" original DLL archives is even more overhead. For LimitedSharpen, you need the MaskTools (currently v1.5.8, and the big WarpSharp package. A basic script could look like this: Code:
LoadPlugin("path\to\dgdecode.dll")
LoadPlugin("path\to\MaskTools.dll")
LoadPlugin("path\to\warpsharp.dll")
mpeg2source("path\to\yoursource.d2v")
crop( whatever )
orig = last
sharp = orig.LimitedSharpen()
sharp
# stacked comparison:
# stackvertical( orig.subtitle("orig"), sharp.subtitle("LimitedSharpen") )
# interleaved comparison:
# interleave( orig.subtitle("orig"),sharp.subtitle("LimitedSharpen") )
Basic knowledge about AviSynth is simply presumed.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#182 | Link |
|
Solaris: burnt by the Sun
Join Date: Oct 2004
Location: /etc/default/moo
Posts: 1,921
|
wow
I was wondering what everyone was going on about in the threads, nice one mate I'll defenatly use this next time, which may not be long seeing as how I have this nice shiny new slayer consert dvd <.< |
|
|
|
|
|
#183 | Link |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Didée, I notice that on YUV video with compressed luma (TV range), LimitedSharpen breaks the TV range by adding luma values outside the 16..235 range. Have you noticed this? I've verified this by using ColorYUV(analyze=true) on a clip with interleaved raw and sharpened frames.
One could argue that this is to be expected because sharpening requires intensifying edges which often means making whites whiter and blacks blacker. However, this seems like an undesirable side effect in TV and DVD production. What are your thoughts? |
|
|
|
|
|
#184 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
if you set "overshott=0" then this will not happen
![]() but it will change the sharpening effect as well. i wouldn't worry about edges being outside the acceptable ranges though - the limited bandwidth of a TV will effectively make the overshoot cancel on playback (and reverse some of the sharpening effect as well).
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#186 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
hehe. hell no - we just put on whatever's on the tape, except the very rare black/white point adjustments when things look wrong.
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#187 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ zambelli
Like Mug Funky and Boulder said - the output range of LS will be the same as that of the input, -[overshoot] on the dark and +[overshoot] on the bright end. And yes, most sources we usually deal with already come along with pixel values outside of CCIR-601 specs - at least after decoding. This is one of the topics one could debate about endlessly ... similar like resizing issues of +/- 1 or 2 pixels to achieve a *correct* aspect ratio ![]() I think this is not what LS should take much care of, and decided to just stay with the small range expansion +-[overshoot], and leave it up to the user to apply Limiter() or Levels() corrections themselves.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#188 | Link | |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Quote:
Does compressing luma to TV range, applying LimitedSharpen (with overshoot=1) and then clamping the luma range at 16..235 sound like a reasonable idea? That way the luma compression and the overshooting would cancel each other out a little bit, IMO. |
|
|
|
|
|
|
#189 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
![]() I've some pics in preparation ... waiting for lunch break.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#190 | Link | |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
Quote:
This is getting OT, but anyway: ColorYUV frame 1 Limiter frame 1 ColorYUV frame 2 Limiter frame 2 I often wonder why they don't stick to the TV range. The borders (that I've cropped off) even contained values as low as 6 for luma.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
|
#191 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
There's a general issue I am having with compressions or expansions of colorrange: the output is no more smooth, but contains "hill ridges": on expansion, there are "holes" in the created spectrum; on compression, there will be "spikes" due to melting-together formerly differnt values to identical new values. This is caused by the linear way in that the operation is usually done, like e.g. by ColorYUV. *)
Problem is, that these stairsteps actually are an artificial sort of "detail" (the "holes" of expansion), or are a sort of detail loss (the "spikes" of compression). When doing plain range conversions, this usually is not a problem. However, if one is planning to perform a sharpening operation afterwards, things look different: in this case, the introduced artificial detail (which would be sharpened as well), or the loss of detail (which could not be sharpened anymore), very well might become an issue. Some time ago, I created some small functions that try to produce a more smoothe output for these conversions. Actually, they are very dirty - the operation done is not fully "correct" in the way it should be ... but the result at least is closer to what one would like to have. *) Making a "fully correct" smooth range conversion is not trivial, but pretty computanional intensive instead. Look at these pictures: ( source | PC->TV | TV->PC ) ![]() Personally, I would not do a colorrange conversion prior to sharpening (if you call me pedantic, it's okay ). But of course you can do whatever you like. ![]() Code:
function pc2tv_smooth(clip clp)
{
pc2tv = clp.coloryuv(levels="PC->TV")
pc2tvd=yv12lutxy(clp,pc2tv,"x y - 4 * 128 +","x y - 4 * 128 +","x y - 4 * 128 +",U=3,V=3)
yv12lutxy(clp,pc2tvd.removegrain(19),"x y 128 - 4 / -","x y 128 - 4 / -","x y 128 - 4 / -",U=3,V=3)
}
function tv2pc_smooth(clip clp)
{
tv2pc = clp.coloryuv(levels="TV->PC")
tv2pcd=yv12lutxy(clp,tv2pc,"x y - 4 * 128 +","x y - 4 * 128 +","x y - 4 * 128 +",U=3,V=3)
yv12lutxy(clp,tv2pcd.removegrain(19),"x y 128 - 4 / -","x y 128 - 4 / -","x y 128 - 4 / -",U=3,V=3)
}
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#192 | Link |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Awesome! That function works great! I made one change though: I replaced ColorYUV with Levels because it allows me to specify my own mapping.
A note to anyone else who wants to try it: you'll need the 1.0 prerelease of RemoveGrain in order to use mode 19. |
|
|
|
|
|
#193 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ zambelli:
Fine. ![]() Still, you should make sure what your out-of-range pixels are. For example, in Boulders screenshot #4 above ("Limiter frame 2"), it is very obvious that the outliers derive from DCT/iDCT - errors. In this case, you would *not* want to keep those (and perhaps even sharpen them - ouch!), but rather clamp them instead ... To also give a vizualisation of the problem's practical side: In the following example, first a double conversion PC -> TV -> PC was done, then some (insane) sharpening was applied. In fact this is hoplessly exaggerated, but it makes the basic problem easily visible. In practice, the effect is of course much smaller ... but often it's those very small glitches that escape the eye at first glance, but bite you somewhen later - when it's too late. ![]()
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#194 | Link | |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Quote:
Anyway... I've been using the Histogram function to tweak my Levels values. One of the sources that I'm working with has very hot whites that go well above 235 and they don't look like noise, while on the other end of the luma range the blacks seem to comply with CCIR.601 and stay above 16. Simply applying LimitedSharpen(overshoot=1) to this source expands the luma range, which I think effectively clamps some of the superwhite information beyond 255 (255 + anything = 255, right?), and pushes the low luma values below 16. Doing a simple ColorYUV("PC->TV") compression unnecessarily pushes the low range too high, so I think doing a custom Levels() adjustment is the right thing to do here. Through some trial and error (see pics below), I decided that the following mapping worked best: Levels(1, 1, 255, 6, 227, coring=false) I rewrote your function like this: Code:
function Levels_Smooth(clip clp, int min_luma, int max_luma)
{
pc2tv = clp.Levels(1, 1, 255, min_luma, max_luma, coring=false)
pc2tvd=yv12lutxy(clp,pc2tv,"x y - 4 * 128 +","x y - 4 * 128 +","x y - 4 * 128 +",U=3,V=3)
yv12lutxy(clp,pc2tvd.removegrain(mode=19),"x y 128 - 4 / -","x y 128 - 4 / -","x y 128 - 4 / -",U=3,V=3)
}
sharp = dull.Levels_Smooth(6,227).LimitedSharpen( ss_x=1.5, ss_y=1.5, strength=200, overshoot=1 ) Here are the samples: Original source Just LimitedSharpen ColorYUV then LimitedSharpen Levels_Smooth(6,227) then LimitedSharpen As you can see, the Levels_Smooth(6,227) image has a lot more white detail than the original, which is apparent in the face and bright costume, but it's not as washed out as the ColorYUV version or as hot as the version without any levels pre-adjustment. |
|
|
|
|
|
|
#195 | Link | |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
Quote:
MPEG2Source("path\clip.d2v",idct=4) # reference iDCT used to minimize errors #ColorYUV(analyze=true) Limiter(show="luma") # shows all out-of-range luma in red
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
|
#196 | Link | |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Quote:
|
|
|
|
|
|
|
#198 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
zambelli -
looking at that histogram, you are doing fully right. No more to say. Some small notes: 1. (this one doesn't matter here, just for clarification) A smooth version for levels I had made, too ... but one has to be careful. If gamma values != 1.0 are used, then the "4" multipliers and divisors in the LUTs (".. 4 * .." and ".. 4 / ..") should be reduced. The formers are providing more of "free room" where the smoother can put values in, the latters normalize the result again. It depends on the maximum pixel change being done, which should be spread as far as possible to fit into 0..128. For PC<-->TV, the maximum change is 255-235=20, hence the 4-multiplyer is okay. But on arbitrary levels adjustments, changes could be much bigger, and the multiplier should be reduced. "2" should be safe for most sane operations. 2. Levels() changes luma and chroma simultaneously. While you have too wide luma, chroma seems fine, and must not be reduced in the same way as luma. You could replace the levels() call with a YV12Lut() that's working only on luma ... or simply copy chroma back at the end. 3. Lastly, >> sharp = dull.Levels_Smooth().LimitedSharpen() still is not optimal. dull = dull.Levels_Smooth() sharp=dull.LimitedSharpen() Soothe(sharp,dull) is better. With your call, Soothe() might undo some changes of the range conversion, too. To make it clear once more: When using Soothe(a,b), then the *only* difference between a and b should be a sharpen operation, nothing else.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#199 | Link | |||
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Quote:
Quote:
Code:
chroma = last # Compress luma range Levels_Smooth(6,227) MergeChroma(chroma) Quote:
), I actually did do the right thing. I was probably just using shorthand in my post. But it's good to know it for sure.THANK YOU! |
|||
|
|
|
|
|
#200 | Link |
|
Registered User
Join Date: Aug 2005
Posts: 213
|
Didee I think I saw some YUY12 to YUV12 back and forth conversions in the LimitedSharpen script I have...is that needed? I ask cause it ends up converting to YUV12 which is the format I am outputting from my decoder too.
Regards |
|
|
|
|
|
#201 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
You feed YV12 in, you get YV12 out. If you start with YUY2 and in the end want to have YV12 anyways, then ConvertToYV12() yourself before LS.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 12th September 2005 at 07:58. |
|
|
|
|
|
|
#203 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 324
|
LimitedSharpen is a script. Look at post #3 in this topic. Copy and save
the code to LimitedSharpen.avs You will need these filters to to use it: MaskTools-1.51 or higher Warpsharp (03Nov03) <- MUST HAVE Go to http:/www.avisynth.org/warpenterprises Get warpsharppackage_25_dll_20031103.zip Extract warpsharp.dll from that. From the same site, get masktools_25_dll_20050808.zip and extract Masktools.dll Do the ususal LoadPlugin("..."), import ("LimitedSharpen.avs") |
|
|
|
|
|
#204 | Link | |
|
Registered User
Join Date: Feb 2004
Location: NTSC R1
Posts: 2,046
|
Quote:
__________________
|
|
|
|
|
|
|
#205 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
WarpSharp.dll is not absolutely necessary, but is required for Smode=1. (too lazy to construct "catch()" safety checks for al pssible plugins to inform the user about missing ones ...)
Apart from that, I'd bold, underline and make red the "MUST HAVE" for both WarpSharp.dll and MaskTools ![]() Edit: Oh, I wanted to say "welcome to the forum, Surfinette", but now I see ... did it really take you 2 1/2 years to make your first post?! Congratulations!
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 16th October 2005 at 03:37. |
|
|
|
|
|
#206 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 324
|
Totaly off-topic:
Didée: Some time ago, I posted help to someone reguarding "cleaning" a clip. I suggested PixieDust and LimitedSharpen, but I warned about using PixieDust in certain situations, ie, that it could cause "halos" in gradients. You posted an address to me to view some pics, and I was flippent; I said something stupid, like, "I don't know about that." (Casa Blanca, ring a bell?). I apologize for that remark. I don't know why I said it. RE: over-doing gradients: I ran across some terminology and thought that it described best what I tried to express: turning grandients into "contours." Well, perhaps it will "catch," perhaps not. Again, I apologize for my stupid remarks. |
|
|
|
|
|
#208 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Because of multiple requests, I've attached a modded version of LimitedSharpen. It adds a new Smode, a new Lmode as well, allows a seperate "undershoot", and handles the "soft" option completely different.
I don't want to call this one "official", there is some more stuff that should go in before that. However, feedback is of course welcome. Whether you like it or not, or perhaps I've broken something ... ... have fun with toying. ![]() edit 29 Nov: The small bug in Smode=4 was only fixed in the version for MaskTools 2.0alpha. Now corrected this version for old MaskTools, too.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 25th January 2007 at 13:06. Reason: typo |
|
|
|
|
|
#209 | Link |
|
Registered User
Join Date: Apr 2005
Posts: 1,339
|
RemoveGrain Prerelease 1.0 - http://home.arcor.de/kassandro/Remov...emoveGrain.rar
I've only tried a few test encodes so far, and it looks quite nice - I like the edgemode=-1 option you added for previewing the areas to be processed - example: ![]() What else can one say, except thanks for making my encodes look so damned good
Last edited by Pookie; 2nd November 2005 at 08:29. |
|
|
|
|
|
#210 | Link | ||
|
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,988
|
Quote:
Quote:
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
||
|
|
|
|
|
#211 | Link | |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
Wow, can a movie be encoded this way (i.é: can this effect be used as filtering, not just previewing)? I'd love to see a LOTR movie with only white outlines . Why hasn't kassandro posted about this?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
|
#213 | Link | |
|
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,424
|
Quote:
np: David Holmes - Minus 61 In Detroit (This Film's Crap, Let's Slash The Seats) |
|
|
|
|
|
|
#215 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Neither, nor. First you must
deinterlace ! ![]() And using Smode=4,strength=300,overshoot=16 will show if you did it good...
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#216 | Link |
|
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,988
|
What about separating the fields then weaving afterwards? How about breaking the source into 2 streams, running the entire filter chain, then weaving at the end?
I have to tell you, LimitedSharpen is a joy. I played with the overshoot paramter and found it made my noisy, complex animation look noisier. It's probably nicer for more simple source, though.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
|
|
|
|
|
#217 | Link |
|
Registered User
Join Date: Apr 2005
Posts: 1,339
|
Hey Chainmax, I believe the "edgemode=-1" is a Didee creation rather than kassandro's doing (although I could be wrong, and have been many times). I was just linking to the latest RemoveGrain package to make it easier for all to try out the latest LimitedSharpen.
|
|
|
|
|
|
#218 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
I have been using this new version of LS for a couple days now, mostly for real-time DVD movie viewing and I have to give it the proverbial two thumbs up! I don't know what all has changed but it is faster than previous versions as I am able to enable better more powerful denoisers in ffdshow prior to LS which would when used with older versions of LS would slow down the process to much to use in real-time. Also with my testing it appears that the new Smode 4 gives near the same high quality as Smode 3 and is slightly faster which is great for real-time viewing. I will test is out with some actual encoding this weekend see what I can do with it but in the meantime I can't wait to see what the "some more stuff that should go in before that." is going to be. |
|
|
|
|
|
|
#219 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
I got the new Limitedsharpen working with new Masktools alpha (2.0a7)
You can download this version of Limitedsharpen here Didee, Along with subbing out some function names I had change some parameters and remove the divisors=4 under "edge" to get it to work, and it seems to work ok but you might want to check it out. I seem to get less CPU overhead when using this in real time as much as 30% less however it takes several seconds like 20 seconds for it to initialize. I am not sure if it is something I changed in LS or if it is just that the new Masktools takes longer to fire up. |
|
|
|
|
|
#220 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Seems fully okay, glancing over it. However the edgemask will be way too dark now . To get the divisor thingy working, IIRC you'll have to put the divisor value into the string as last value:
Code:
ESTR="8 16 8 0 0 0 -8 -16 -8 4" # the last "4" is the divisor mt_edge(thY1=0,thY2=255,ESTR) For the delay on script loading, I've no idea. Have to actually try it myself. Edit: wait, something is fishy ...
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 6th November 2005 at 21:40. |
|
|
|
|
|
#221 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
There should be no reason for additionnal delay at start up.
__________________
|
|
|
|
|
|
#222 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
But there is. confirmed on a Celeron2600, XP SP1, Avisynth v2.56a. Its varying, mostly between 10 and 20 seconds.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#223 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
LS fixed |
|
|
|
|
|
|
#224 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Smode=4 is broken. Exchange Line 85 with
Code:
\ : 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 / * + ?")
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#225 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
You forgot maskedmerge --> mt_merge, and inflate --> mt_inflate.
Indeed, the script is slow to open. Dunno why, I'll investigate
__________________
|
|
|
|
|
|
#227 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Here is a before and after pic I know it is "NOT" the exact same frame but it still gives you a good idea of the LS Smode 4 effect and looks pretty freaking good too!
I used this call as per Didee's suggestion: Quote:
![]()
|
|
|
|
|
|
|
#229 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
The delay issue is there for me.
But once up and running, it's heaps fast.
__________________
http://www.7-zip.org/ |
|
|
|
|
|
#230 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
It seems either the normalization or the thresholding of mt_edge() is not working: if a divisor is given in the string, everything except 0 becomes 255. Also, mt_merge() seems to do nothing. Hence, all edgemodes except 0 are not working correctly in this version of LimitedSharpen.
( That's why it takes a little longer until I come out with "new versions" )
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#232 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
I'd assume the slowdown is due to the generation of lutxy value tables? And the other functions' tables if they use the same, if those generations aren't optimized.
Aside, I never knew this could be a realtime playback filter, awesome.
|
|
|
|
|
|
#233 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Yup, quite possible that that's the price to pay for all those cries "down with postfix notation , we need infix."
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#234 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
For mt_edge, there's a bug in with custom kernels in mmx, so use mmx = false and it'll work ( and it'll be as fast as with the old MaskTools ).
For mt_merge, I didn't have time yet to check, but I find it strange that it doesn't work ( because there's little room for mistake in this case, and I remember checking it ) For the lut table initialization : parsing the expression takes no time at all ( that part hasn't changed ). Once the expression is parsed, however, I must admit that I made a nice but slow OO scheme to fill the lut. I didn't think it would be that slow, so I'll see how to speed that up a little bit. I'll fix the mmx version of mt_edge tonight, and check mt_merge.
__________________
|
|
|
|
|
|
#235 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Sorry, mt_merge seems to work fine. Probably I was fooled because a too dark mask was used in LS - made a syntetic test, and it works as expected.
However the startup delay due to filling up the LUTs really is a PITA ... and LS doesn't even use _that_ much of lut/xy. My HD holds scripts with tenfold numbers of lut/xy calls. Erh, what about using the respective code from 1.5.x versions? That one was pretty fast
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#236 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
It was fast, but it was ugly
. No really, it'll be easy to make it faster. I just woudln't have thought it would take that much time, so I really didn't care at all about speed. But, for example, I overchecking the validity of the expression ( overchecking <-- at each steps in fact ) which makes the algorithm O(n²) where it could be simple O(n)... Basically, i just forgot to remove the development checks I put when I first implemented it
__________________
|
|
|
|
|
|
#238 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Not that much : it's only done during initialization ( that's why I didn't care in the first place ). And the optimization itself doesn't even deserve to be named optimization : I work on list, and I checked at each iteration the size of the list, which is dumb ( but easy while checking for mistakes ) --> O(n²) instead of O(n), where n is the size of the list ( the number of token in the expression ).
__________________
|
|
|
|
|
|
#239 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Follow the link to my signature : mt_edge is fixed, mt_lutxy delays are lowered.
__________________
|
|
|
|
|
|
#241 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
That's better, loads much faster now.
Thanks.
__________________
http://www.7-zip.org/ |
|
|
|
|
|
#243 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
For script development, this still means you've to mix old and new MaskTools ...
Example: Soothe(LimitedSharpen()) on a P3-800: v2.0a7: ~46 seconds loading time v2.0a8: ~21 seconds loading time Even if those numbers cuts into half on a recent machine, that's not how I'd like to build & tweak my scripts ... The Soothe+LS combo contains a whole of "only" 16 lut/xy calls. Imagine, my current denoiser project holds around ~50 different lut/xy calls ... It's not a big issue at the moment, since one can perfectly work around it by using the "old" YV12Lut/xy. However before going v2.0 final (or even integrating into Avisynth), something more should happen.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#244 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Strange, I thought the speed gain was bigger than that. I'll have a deeper look tonight then.
__________________
|
|
|
|
|
|
#245 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
With just limitedsharpen() and v2.0a8 of masktools, i'm getting a 3 second load time.
edit: although that is against the almost instant load time with v1.5.8.
__________________
http://www.7-zip.org/ Last edited by Audionut; 8th November 2005 at 13:03. |
|
|
|
|
|
#246 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Try the new version in my signature. Hopefully, speed should be ok this time.
__________________
|
|
|
|
|
|
#251 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Or simply, he must have mistyped his username without checking
Fixed
__________________
|
|
|
|
|
|
#252 | Link |
|
Registered User
Join Date: Nov 2004
Location: Brazil
Posts: 816
|
thank you Manao,the link is working now.
starting to use LimitedSharpen. all i need is masktools.dll in avisynth plugins folder and this script http://forum.doom9.org/showthread.ph...994#post559994 (or new),nothing more? thank you. |
|
|
|
|
|
#253 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
Download the alpha version of masktools in Manao sig.
And use this version. http://forum.doom9.org/showpost.php?...&postcount=226
__________________
http://www.7-zip.org/ |
|
|
|
|
|
#254 | Link |
|
Registered User
Join Date: Nov 2004
Location: Brazil
Posts: 816
|
all right,i got the script :-)
in the .bat file have del build\masktools.ncb rmdir /s /q build\Release rmdir /s /q build\Debug copy "C:\Program Files\Avisynth 2.5\plugins\mt_masktools.dll" . the default avisynth plugins folder in my sYstem(BR) is in C:\Arquivos de programas and was change but don't know if the others lines from the .bat had worked(not an expert here) i need to change some more in the .bat? thank you so much. |
|
|
|
|
|
#255 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
You do not need that .bat, it's only there for my need at the moment ( to clean up files that were created during the building process ).
__________________
|
|
|
|
|
|
#257 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 450
|
@Didée
I'm a little bit confused ![]() From what i've understood LimitedSharpen() and Iip(), are quite similar, so at this point i don't know clearly what to choose. I want the best possible quality regadless the cpu usage, so what you suggest me LimitedSharpen() or Iip()? Thank you
|
|
|
|
|
|
#258 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
LimitedSharpen is, basically, a plain sharpener that does hardly care about what might be noise, artefacts, or real detail. It just takes the input and sharpens everything, while avoiding oversharpening. iiP is a combined solution that offers noise reduction, halo removal, some contrast enhancement, detail sharpening & and refinement. See how similar they are? ![]() So, everything depends on the quality of the source you're starting with, and of course on your personal taste. There are clean sources that hardly need any processing at all, and there are sources so crappy that even iiP is "too weak" to get a nice result. Therefore, same answer as if you were asking me which of two women to marry: "The one you like more."
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#259 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
I would have said "both"
![]() Anyway, Socio, the speed up you're observing isn't my fault. I only sped up the loading time.
__________________
|
|
|
|
|
|
#261 | Link | ||
|
Guest
Posts: n/a
|
Quote:
Quote:
So if all you need to do is just sharpen the source you will only want to use LimitedSharpen. If on the other hand you need to do denoise, sharpen, etc. then you will want to go to iiP. Last edited by Anonymouses; 10th November 2005 at 06:17. |
||
|
|
|
#262 | Link |
|
Registered User
Join Date: Jan 2004
Location: Czech
Posts: 181
|
Hi all.
I used old Didée version LS, but found, you improve that guys. So today I tested new version, but got this error: there is no function named "mt_edge". I agonize my brain some time , but nothing think out. Script still not working Used last Manao Masktools 2.0a9. Or I missed something like: some more AVS dll's are needed to work? Any help? Thx.
__________________
(Sorry for my bad english, I'm czech, not englishman... :)) Last edited by JnZ; 13th November 2005 at 17:21. |
|
|
|
|
|
#263 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
The alphas of MaskTools 2.0 will only run with AviSynth v2.56 (or former betas, not all recommended). Not sure at which point exactly the cut occured - just fetch the latest version (2.56a) from sourceforge download page.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#264 | Link | |
|
Registered User
Join Date: Jan 2004
Location: Czech
Posts: 181
|
Quote:
EDIT: Now it's working, but I had to use RemoveGrain 1.0 instead 0.9. Thx a lot Didée. So this is recap of needed things: - MaskTools 2.0a9 - RemoveGrain 1.0 - Avisynth 2.5.6 - LimitedSharpen moded script
__________________
(Sorry for my bad english, I'm czech, not englishman... :)) Last edited by JnZ; 13th November 2005 at 17:21. |
|
|
|
|
|
|
#265 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
Hey Didee
I thought you might get a kick out of this, I have limitedsharpen working beautifully with live TV from my HTPC. Here is a link to a thread where I just posted about it with a couple pic's: http://www.avsforum.com/avs-vb/showthread.php?t=608161 |
|
|
|
|
|
#266 | Link | |
|
Registered User
Join Date: Nov 2004
Location: Brazil
Posts: 816
|
excuse me Socio, i read there:
Quote:
the pictures are differents and the source is horrible and when the source is horrible using that filters the result will be....best than horrible. why not the same picture from good source and with filters?!? |
|
|
|
|
|
|
#267 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
|
|
|
|
|
|
|
#268 | Link | |
|
Registered User
Join Date: Nov 2004
Location: Brazil
Posts: 816
|
Quote:
i mean that you have to use the same picture from the source with and without filters. thanks. |
|
|
|
|
|
|
#270 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ Socio
Heyhey, for *realtime* processing of *720p* content, that's a result, isnt it! (What processor did you say you are running ...) :dreams: The still has some of that "plastic" look, okay ... but there's a considerable amount of interference noise to be removed, and everything is done with simple and basic filtering - in RT. Good result, I'd say. It's just that with the used settings, you almost reduced LimitedSharpen() to ModerateSharpen(). Which indeed could be a way to free some CPU cycles for another task. Give a try on repair(last.sharpen(0.6),last,1,3) instead of LimitedSharpen, and see if there's much of a difference. This could also allow you to ease the croma settings of another filter (most probably: ditch the chroma part of the gaussian blur, and/or reduce HQDN3D's spatial chroma setting). Another thing to try: seeing there're still leftover noise from the interference, try if you can afford to put something like mergeluma( removegrain(2,-1), 0.25 ~ 0.50 ) (weak), up to mergeluma( removegrain(4,-1), 0.08 ~ 0.16 ) (strong) before the sharpening. Could work out with the simplified sharpening from above. (It's hard to judge from here how much of an issue the leftover noise really is, if at all. But you have the experience with toying around, I guess )A pity there's no time to reduce the haloing ...
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#271 | Link |
|
Registered User
Join Date: Jun 2005
Posts: 575
|
@ Didée:
May I use some of your expert sharpening knowledge? :P What could you advise to use for sharpening in scenes where anime producers apply sorta blur + halo filtering? An example of such scene follows. I tried several interesting things for such scenes sharpening [including sledgehammer approach :P], but they have some drawbacks. Actually, the biggest problem is those halos around egdes... After strong sharpening they just look too dirty... An example of anime with scenes processed like that would be HiMM (he's my master). In each episode around half of the scenes is heavily blurried, and the rest is pretty sharp. I would like some sharpening settings which could make them more or less similar. Here is screenshot example from negima (in himm it is similar). I couldn't find anything really good to sharpen such scenes and thus can't release that anime It's the only serious thing delaying actual release ![]() http://img358.imageshack.us/img358/1...asample4do.png |
|
|
|
|
|
#272 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ Egh
Cheap stuff, basically. A Gaussian Blur of very big radius (or s-th similar) was applied with some percentage. Same Effekt as used in soap operas. Obviously, you need to apply the reverse effekt of gaussian blurring, which is called "Unsharp Masking". A mini script like Code:
lft=crop(0,0,8,0) rgt=crop(width-8,0,-0,-0) crop(8,0,-8,-0) o=last ox=o.width oy=o.height blur1=o.bicubicresize(m4(ox/20.0),m4(ox/20.0)) .bicubicresize(ox,oy,1,0) yv12lutxy(o,blur1,"x x y - 1.5 * +","x x y - 1 * +","x x y - 1 * +",U=3,V=3) mergeluma(blur1,0.16) stackhorizontal(lft,last,rgt) Of course it needs quite some more fiddling around ... should be no problem. Since you're one of the big boys releasing things, you know what you're doing.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#273 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Mmm, I like what I see...
...... ...the sharpening, I mean
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#274 | Link | |
|
Registered User
Join Date: Jun 2005
Posts: 575
|
Quote:
Btw, even in your example I can still notice halo around egdes. Is it possible to completely remove it? As for artefacts, haven't tried yet, but almost sure RemoveGrain+DeGrainMedian will do the job there. P.S. Why bicubic resizer was used in the script btw? |
|
|
|
|
|
|
#275 | Link | |||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
Quote:
![]() Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|||
|
|
|
|
|
#276 | Link |
|
stupid
Join Date: Sep 2004
Location: Cologne
Posts: 638
|
@ Didee
I´ve heard many good topics about Limited Sharpen but I don´t know anyone who knows how to use it (max knows it). Is this also a project for noone like your "Logoskript" which is impossible to get used by the normal user? So please stop making anything in the way you do - the normal (but skilled) user would be much happier if you just make internal posts and we don´t see what you do.
__________________
cu Joe ------------------------ freedom is just another word for nothing left to loose |
|
|
|
|
|
#278 | Link | |
|
Registered User
Join Date: Sep 2003
Posts: 267
|
Quote:
|
|
|
|
|
|
|
#279 | Link | |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
|
#281 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ JoeBG
Oh come on. What's your problem, what's your problem with LimitedSharpen, and who is "max"?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#284 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Yep, Smode 4 has ... something.
![]() However on it's own, it has this tendency to give some small crumbling ... for real encoding, I'd recommend to Soothe() it. Aaargh ... I corrected that small buglet only in the version for MT_alpha, not the normal one. /*slaps forehead*/ Under work ... Edit: The preview version of LimitedSharpen for "old" MaskTools v1.5.x is corrected. (this thread) Smode=4 is calmer now. Formerly it did enhance small&weak noise somewhat more than it should.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 27th November 2005 at 12:47. |
|
|
|
|
|
#285 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
So, is there a new official version out or not? If so, will the script in the 1st page be updated?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#286 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
You're still encoding with the official "v1.0" version of XviD?
![]() I'll update the first page when all things are in that should be in. Which will not be during the next week, definetly.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 28th November 2005 at 01:38. |
|
|
|
|
|
#287 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 66
|
Hi Didée,
Your post said: "edit 29 Nov: The small bug in Smode=4 was only fixed in the version for MaskTools 2.0alpha. Now corrected this version for old MaskTools, too." So where is this "the version for MaskTools 2.0alpha" with the Smode=4 fix? Thanks in advance. regards, Li On |
|
|
|
|
|
#288 | Link |
|
Registered User
Join Date: Aug 2004
Posts: 6
|
I've been using this script since shortly after it was released and I love it. Thanks a lot, Didée.
I just recently tried out the modded version and wanted to offer some feedback on "a separate "undershoot" parameter, to allow for some line darkening in comic or Anime." The line darkening effect seems very light to me. For example, even undershoot=255 has only about 1/10 the effect of FastLineDarken(). In other words, I think that feature needs a bit more work to be useful. Once again, thanks a lot.
__________________
Encoder for Shinsen-Subs |
|
|
|
|
|
#289 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ psme
Socio was so kind to make the adaption for MaskTools v2-alpha. See this post. @ Jcubed04 "Undershoot" is not meant do force any line darkening. It just allows to do the cutting-off of the sharpening effect "later", in those places where it actually makes pixels darker. To force more darkening, you have to increase the sharpening strength. Try LimitedSharpen(Smode=1, radius=3, strength=2048, undershoot=255) and look again whether lines get darker or not ![]() (But heaven help, never use it like this!)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 25th January 2007 at 13:05. |
|
|
|
|
|
#290 | Link |
|
Learning...
Join Date: Nov 2005
Location: 12.97°N, 77.56°E
Posts: 135
|
Nice script Didee. But could you edit the first post with the latest developments. Perphaps add a link to the current version and put the requirements listed in this post into LimitedSharpen.avs itself ?
Then we would see less rants from frustrated users
|
|
|
|
|
|
#291 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Wait a minute, LimitedSharpen now does line thinning?
/keels over and falls to the ground/ Would it be possible to make thinning the way aWarpSharp does?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#292 | Link | ||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
Sometimes it may look like that, if a steepy gradient happens to have a certain slope - but that's more of a random side-effect. Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
||
|
|
|
|
|
#293 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Oy, darkening <> thinning. I should make an appointment with my ophthalmologist already
.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. Last edited by Chainmax; 28th November 2005 at 18:23. |
|
|
|
|
|
#294 | Link |
|
Registered User
Join Date: Jan 2004
Location: earth, barely
Posts: 96
|
Howdy guys,
I am unable to download the newest LS with the fixes that Socio made. When I click on the "Download Now" anchor on the savefile web page, nothing happens. Am I the only one to experience this? Am I doing something wrong? ck |
|
|
|
|
|
#295 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Yea that place is not doing so good for my downloads but I can't complain too much because it is free after all.
Here is Didees LimitedSharpen that works with Masktools 2.0 versions: Quote:
|
|
|
|
|
|
|
#297 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Something promised long ago...
I wrote filter equivalents of two script functions:
Code:
function scriptclamp(clip main, clip bright_limit, clip dark_limit, int overshoot, int undershoot)
# clamp main to lie between bright_limit + overshoot and dark_limit - overshoot
{
OS = string(overshoot)
US = string(undershoot)
yv12lutxy( bright_limit, main, yexpr="y x "+OS+" + < y x "+OS+" + ?")
yv12lutxy( dark_limit, last, yexpr="y x "+US+" - > y x "+US+" - ?")
return last
}
function scriptsimpleaverage(clip first, clip second)
{
yv12lutxy( first, second, yexpr="x y + 2 /")
return last
}
LimitedSupport, 28 November 05 Source The functions are 5 to 10 times faster than script equivalents; incorporating them gives a measurable but pretty small speed up. OTOH the cost (i.e. loading one more plug-in) is also pretty small... To do better requires ignoring some options...can I ask: -- how important are wide and special? -- is SMode 4 planned to become the new default?
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 28th November 2005 at 22:11. |
|
|
|
|
|
#298 | Link |
|
Registered User
Join Date: Aug 2004
Posts: 6
|
@Didée: Ah, I understand how undershoot works now, thanks for the explanation. For my purposes definitely better to use LimitedSharpen at sane strength levels then FastLinkDarken afterwards. I'm also liking the development of Smode=4, keep up the good work.
__________________
Encoder for Shinsen-Subs |
|
|
|
|
|
#299 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
Thanks for the suggestions! I like the mergeluma(removegrain) over the denoise3d, I get a much clearer cleaner image. In fact I eliminated ffdshow Denoise3d and swscaler altogether and use your abcxyz dehaloing script that I fixed to run with masktools 2.0. I run it in between the mergeluma(removegrain) and Limitedsharpen ( I prefer Limitedsharpen over the Repair sharpen call) and it runs just fine in real time even re-sized to 780P.
|
|
|
|
|
|
|
#300 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Jcubed04, don't you find FastLineDarken to produce slight aliasing even at low settings and with thinning disabled?
Socio, abcxyz is completely pasée now. Didée made a new halo removal function that works wonderfully. It can also be found in the "New halo removers discussion" thread.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#302 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Ah, mode 19 is not in the 0.9 version indeed. So it does need the pre-1.0 version of RemoveGrain:
http://home.arcor.de/kassandro/Remov...emoveGrain.rar
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#303 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
You know I modified it to work with masktools 2.0 versions and tried it out but found it to slow for real time. However after your post I played with it again. The one thing I forgot to do when previously testing DeHalo_alpha for real time usage was turn off super sampling. I tried it with SS off and it runs great in real time with Limitedsharpen and mergeluma-remove grain calls and the PQ looks awesome. I think abcxyz is very proficient in my real time application of it but so far I am liking the DeHalo_alpha now that I have it running, even more. |
|
|
|
|
|
|
#304 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
@ Clouded
Quote:
![]() (BTW, did you ever post a link to the 17Oct05 version? I seem to only find posts linking to the 08Aug05 version, prior to including "multiplier".) "wide" I consider rather important, personally ... would not want to miss it. It should be much faster anyway, when using MaskTools 2.0 alpha (with its optimized In/Expand). "special" I would not consider important. It often produces artefacts, like halos and whatnotelse. It will be ditched, and replaced with something ... pssst ... much more special. ![]() "Smode" - the available sharpening modes will be extended and modified. What Smode=4 is now running with some fixed values, will be parametrized & adjustable. (Here, a filter ala "RemoveGrain(x)^(-1)_plus_Lutxy" would be handy...).
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#305 | Link | ||
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Oops
. I added 17-Oct Prewitt to LimitedSupport -- saves hunting down a gazillion DLLs. I may release it separately with a few more options.LimitedSupport, 29 November 05 @all: it's just an edge mask; usage is Prewitt(multiplier = 1.0). Chroma is trashed; output luma is scaled by multiplier. More details here. Quote:
BTW, using Clamp and SimpleAverage should give a bigger speed up to the MT 2.0 version than the main version. Quote:
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 29th November 2005 at 23:41. |
||
|
|
|
|
|
#306 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
mg262,
I am trying to figure out what you are doing and how to implement your dll. Are you replacing sections of Limitedsharpen with calls to your dll or trying to make Limitedsharpen a dll plugin? Also it looks like you are working with the older version of maskedtool functions when the 2.0 versions are faster you, if it is speed you are after you might want to switch to the 2.0 versions. |
|
|
|
|
|
#307 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
I'm trying to speed it up, but not because I need it to be fast... I just wanted to code something useful. When I upgrade to 2.5.6, MaskTools version 2.0 is going to be the first thing moved into my plug-in directory. [I think I have got part of it working in 2.5.5, but I don't want to rely on that.]
I'm writing fragments, mostly intended for use in specific bits of the script but also usable generally. I should probably have written out a modified script...but I didn't like to do that without asking Didée, plus there are at least 4 versions out there... . Sorry if it was confusing. In your script, try the following changes: Code:
\ ? mt_lutxy(dark_limit1,bright_limit1,yexpr="x y + 2 /") Code:
\ ? SimpleAverage(dark_limit1, bright_limit1) Code:
OS = string(overshoot) US = string(undershoot) Lmode == 1 ? mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x "+OS+" + ?") \ : mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?") Lmode == 1 ? mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x "+US+" - ?") \ : mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x x y - "+US+" - 1 2 / ^ - "+US+" - ?") Code:
OS = string(overshoot) US = string(undershoot) Lmode == 1 ? 0 \ : mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS+" + < y x y x - "+OS+" - 1 2 / ^ + "+OS+" + ?") Lmode == 1 ? clamp(normsharp, bright_limit, dark_limit, overshoot, undershoot) \ : mt_lutxy( dark_limit, last, yexpr="y x "+US+" - > y x x y - "+US+" - 1 2 / ^ - "+US+" - ?") Code:
OS2 = "0" US2 = "0" mt_lutxy( bright_limit, normsharp, yexpr="y x "+OS2+" + < y x "+OS2+" + ?") mt_lutxy( dark_limit, last, yexpr="y x "+US2+" - > y x "+US2+" - ?") zero=last Code:
zero = clamp(normsharp, bright_limit, dark_limit, 0, 0)
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 29th November 2005 at 22:43. |
|
|
|
|
|
#308 | Link |
|
Registered User
Join Date: Aug 2004
Posts: 6
|
@Chainmax: I only use FastLineDarken for anime sources and I use at least some line thinning. Under those conditions I've never had aliasing problems.
__________________
Encoder for Shinsen-Subs |
|
|
|
|
|
#309 | Link | ||
|
Registered User
Join Date: May 2004
Posts: 288
|
mg262,
This is strange but I can change out the first codes you suggested and the last codes you suggested and LS runs just fine but when I swap out: Quote:
Quote:
Last edited by Socio; 1st December 2005 at 00:13. |
||
|
|
|
|
|
#310 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Syntax error. Replace that "0" (in Lmode==1 ? 0) with "clp", or "last", or "NOP()", or "blankclip" ... or even comment out the whole line if you're not going to use Lmode=2.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#311 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
I thought that since both numbers and videos can be stored in an AVSValue, it would be okay... but presumably the interpreter needs to know the type (clip/int) of the expression before its evaluated. It ran fine on my machine -- but it sounds like that's just luck. So either change it as suggested or clean up the messiness I created like this:
Code:
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 ? clamp(normsharp, bright_limit, dark_limit, overshoot, undershoot) : last
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
#313 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Okay, you asked for it
![]() The "soft" option now works as follows: - first compute the sharpening - build the difference map between "input" and "sharpened" - apply a modified blurring to the difference map - apply the blurred difference map to the input The modified blurring works by only allowing pixel values getting closer to 128, not farther away from 128. This is important: a plain blur to the difference map in the end would result in the "fat" look of unsharp masking (ugh!). This sort of "reduction blur" retains the sharp look, because it is more similar to a linear scaling. But then again, it is smarter then just doing linear scaling: where plain scaling would just reduce the effect everywhere by the same amount, this sort of blurring is respecting spatial coherency of the current pixel. (Kind of that ... it's a poor man's method. True spatial "tracing" is not possible to do through an avisynth script.) So, for a pixel that received sharpening values very different from those of its neighbors, the sharpening will be reduced more (i.e. a pixel that got darker, where all of its neighbors got brighter). For a pixel that received sharpening values rather similar to those of its neighbors, the sharpening will be reduced less. The idea behind the new "soft" mode were: - reduce aliasing when using only little supersampling (or none at all) - try to be detail- and noise-aware. The more neighbor pixels are having similar properties than the current pixel, the more likely it is we're on a detail's edge, and we want to allow sharpening. If current pixel's properties are very different to those of its neighbors, the pixel probably is noisy, and we don't want to sharpen it. That's basically it. Good values for "soft" depend on the supersampling factors (small ss factors --> small values for "soft", and TOWR), and on the sharpening strength. Or vice versa for strength - if you use e.g. soft=33, increase also the strength ... perhaps by 33% as a start, and make your way from there.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#314 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
mg262,
I tried Didees suggestions and your new code but it still crashes and appears to be a bug in your dll perhaps in conjunction with using masktools 2.0 I don't know. It it was as simple as a syntax error I would get a blurb on my image screen saying " syntax error line xx" however this is typical crash pop up when I try it with any variation of that second set of code:
|
|
|
|
|
|
#315 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Sorry about this. I've loaded version 2.56rc2/2.0a10 and your script but I can't reproduce the error so it may take a bit to hunt down. I don't want to clutter up this thread, so I will PM you if that's okay...
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 1st December 2005 at 19:46. |
|
|
|
|
|
#316 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Socio found an eeevil assembly bug for particular frame widths. I'll release a fixed version as soon as it's confirmed that it's ok.
The speed up due to LimitedSupport in the MaskTools 2.0 version is considerable -- from 15 FPS to 21 FPS on my box (as measured with AVSTimer; n.b. this excludes time in DGDecode, etc). Looking at where the time is spent (all default params): ![]() it seems that the new bottleneck is in AVISynth itself, i.e. upsampling and downsampling. So, if you're playing back DVDs on a fast box, I think real-time LimitedSharpen may be possible by supersampling up to the target resolution (e.g. 1024 x 768) to cut out one resampling step. (Is that sensible, Didée?)
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 2nd December 2005 at 14:55. |
|
|
|
|
|
#317 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Should be like that, yup. But I can't tell for sure, since I'm not on a fast box (Athlon 1800 & Celeron 2600)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#318 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
LimitedSupport, 2 December 05
(+ many thanks to Socio for putting in a lot of work tracking down the problem) Didée, Socio, I hope it's okay if I post the modified script (if you'd rather I didn't, I'll take it down): Fast LimitedSharpen version using both MaskTools 2.0 + LimitedSupport (hopefully no more silly script bugs )MaskTools 2.0 thread RemoveGrain 1.0 pre-release thread Edit: NB Didée, I've avoided SSE2 in this (and in fact in nearly everything else I'm coding recently + henceforth), so it should work on your machine.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 3rd December 2005 at 13:24. Reason: Added link to RemoveGrain thread |
|
|
|
|
|
#319 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
The modified LimitedSharpen and the Limitedsupport.dll do work great by the way! |
|
|
|
|
|
|
#320 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Clouded - Thank you! No objections at all, why should I? (All is fine as long as you don't build in some sort of PoorSharpen(), then sell it as LimitedSharpen34() ... I remember something like that.)
However, the formatting suffered a little. Don't show that to mf! ![]() Oh, and surely you must not avoid using SSE2, and definetly not because of me. It's just that there still are pretty much non-SSE2 Athlons out there ... so you'll simply do a CPU detection, and use uber-optimized code for the respectively available instruction sets, no? /*ducks*/ ![]() Socio: so this means you can now process 1080p in realtime, while doing a couple of encodings in the background? ![]() Thanks for testing, and for supporting Clouded!
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#321 | Link | |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Well, it is your script so I don't like doing anything to it without checking with you. Thank you for letting me poke it
.Quote:
Do you mean the commented section? I've cut that out. Apart from that it's almost the same as the version I modified, I think... although the soft line breaks due to a QUOTE block have disappeared. Shall I put more \s in?BTW, not in this case but for longer scripts (e.g. iip), it gets tricky to cut/paste all the code out of a CODE block; is there an easier way of extracting it? CPU: SSE2 typically isn't much faster than SSE, and having two versions makes it twice as hard to track down problems! It's certainly not just you who is affected*... but most of my plug-ins are for scripts rather than direct use, and I'm shooting myself in the foot if you can't use them.** *turns out to be quite a few people. I'm used to being on the slow-end of things... I had a 7-year-old PC until late '03; now I use a P4/2400. So I had to adjust to not using everything available. **A few are for direct use. A few I actually use(!); you can tell because they are a little more... complicated. Edit: I added one more function, for something I have seen you use once or twice :LimitedSupport, 3 December 05 Delta(a, b) = mt_lutxy(a, b, "x y - 128 +") = mt_lutxy(a, b, "x y 128 - -") 'Delta' is just a working name, not a permanent one; I thought you might want two different names to correspond to the two different uses, something like Diff and SubtractDiff?
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 3rd December 2005 at 15:01. |
|
|
|
|
|
|
#322 | Link | |
|
Registered User
Join Date: Oct 2005
Location: France
Posts: 17
|
Quote:
when I use those versions, I get a mode 19 unsupported error in masktools normal ? |
|
|
|
|
|
|
#324 | Link | |
|
Learning...
Join Date: Nov 2005
Location: 12.97°N, 77.56°E
Posts: 135
|
Quote:
|
|
|
|
|
|
|
#326 | Link | |
|
Registered User
Join Date: Oct 2005
Location: France
Posts: 17
|
Quote:
|
|
|
|
|
|
|
#327 | Link | ||
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Quote:
Quote:
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
||
|
|
|
|
|
#328 | Link | |||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
before - ... vs. yours - ![]() The syntax highlighting is the last bit of rescue for readability ... Well then, my formatting style might not be everyone's taste, too. I know. But I love it ![]() Quote:
)what's actually happening.However there are cases where also the opposite operation is needed. If, perhaps, you could implement "MakeDiff", "SubtractDiff" and "AddDiff", that would be a really nice thing! Also readability of those scripts would be noticeably improved. However those big mysterious LUTs will stay in, no matter what. (Be afraid of LS's successor.)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|||
|
|
|
|
|
#329 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
LimitedSupport, 3 December 05 (revised)
MakeDiff = SubtractDiff = "x y - 128 +" = "x y 128 - -" AddDiff = "x y 128 - +" I shall fix the tabs soon! And say a little more on LUTs... if you stopped using LUTs, I think I would send a doctor around, but there are more than two ways to LUT... Edit: I realised I need to know how many spaces your tabs are set to... ... but one of One, Two may look right? (Tab-killing wasn't deliberate, by the way... I got the script from a QUOTE block, which had killed the whitespace.)
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 3rd December 2005 at 20:04. |
|
|
|
|
|
#330 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Neither. No way with hard tabs, I use fuzzy tabbing.
![]() (Famous old [now dead] painters didn't use any rulers, too.) Perhaps it's browser related? I've no problems with preserving whitespaces when copying {code} from a thread and inserting into a text editor. Thank you very much for the new DLL. Planned deadline for the new monster is in three weeks, not sure if I'll manage that. But the support DLL surely helps.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#331 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
{code} is fine but {quote} (see here) kills whitespace, at least in Opera and IE
. But... I just looked at the HTML and it looks ok . I'll try with that... Edit: done, to match MT2 version (post 295); it's here.Writing these things is good fun (and much easier/quicker than writing full filters) so let me know if you think of any more. Or, if you PM me scripts, I'll hunt for filterisable bits myself .LimitedSupport has taken up more threadspace than I expected... would you rather I move future stuff to a separate thread? Edit: In the course of testing, I seemed to find a discrepancy in LimitedSharpen(LMode = 3) between the versions (as of today) in posts 208 (either attached version or linked version) and 295. I used this (renaming one version, obviously): subtract( limitedsharpen(lmode =3),limitedsharpen_MT2(lmode =3)) levels(128 - 15, 1,128+15, 16, 235, coring = false) It's more than likely that I've done something stupid, but could someone please check?
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 3rd December 2005 at 22:10. |
|
|
|
|
|
#332 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Wasn't there a report that mt_merge was not working correctly? Wait ...
edit: It seems mt_merge does the inverse processing of what MaskedMerge does: MaskedMerge( c1, c2, mask) == mt_merge( c1, c2, mask.invert() ) Seems there's some more work for Manao before MT2 gets really stable ... I remember to have produced some access violations when mt_convolution got the result of a former mt_convolution as input, or something like that ... I've currently no time for bug hunting and reporting. For the moment I'm just not using MT2, if I can avoid it ... sorry.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 3rd December 2005 at 22:06. |
|
|
|
|
|
#334 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Didée,
I don't think you need to apologise -- but do be aware that the old Inpand and Expand are so expensive that the speed up from Lut-replacements or anything else is almost invisible. Using mt_in/expand from 2.0 and all the other functions from 1.5 should give a huge speed up, if you didn't consider it too risky.
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
#335 | Link |
|
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,988
|
Would someone bring me up to speed on the current status of LimitedSharpen? I've been using the script-only version from the start of the thread and just noticed there are some helper DLLs and, it appears, some new modes.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
|
|
|
|
|
#336 | Link |
|
Solaris: burnt by the Sun
Join Date: Oct 2004
Location: /etc/default/moo
Posts: 1,921
|
well
clouded has made some of the function in the script in a mathmaical sequance format, so its more effient, and how it's used I've still to figure out, theres seems to be multiple versions of LS floating around, mostly didee and his many betas, the dll version and the script should output the same, the dll'd one is just faster because of it's higher effienicy, and maybe a release or so of LS behind didee or the betas thats what I gather anyways, the new mode I have no idea |
|
|
|
|
|
#337 | Link |
|
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,988
|
Yeah, that's the way it looks to me. I'm not sure which would be the most recent version using the helper DLLs. I suppose it would be easier if I read French, but I don't. The DLLs look like substitutes for parts of the script.
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
|
|
|
|
|
#338 | Link |
|
Solaris: burnt by the Sun
Join Date: Oct 2004
Location: /etc/default/moo
Posts: 1,921
|
that they are, more tightly coded bits of the script, and I've also been trying to figure out which one is newer and non-beta for a couple days now, maybe didee will tell us ^-^
|
|
|
|
|
|
#339 | Link | |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Quote:
I've yet to see anything in French... and in any case, I think Didée is German, no ? But anyway, there is something on the new modes at the comments at the start of each script.None of these modifications are "official" or checked by Didée... . I think he is working on a new official version, so you may want to wait for that. HTH... Clouded
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 10th December 2005 at 11:53. |
|
|
|
|
|
|
#340 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Exactly like Clouded said. The version from page 1 still is the official one, although the modifikation posted in post 208 works 100% reliable, hence is even recommended. Everything works as expected, and the additions Smode=4 and Lmode=3 might enable stronger texture enhancement than what one was used to formerly (however appliance of Soothe() might be better when using these).
For now, I want to keep any "official" version fully backwards compatible regarding the setup. MaskTools v2.0 as a whole is not free of quirks yet, and - more importantly - it *necessarily* requires Avisynth v2.56, which not everyone might be using yet. So, instead of updating LimitedSharpen with small features or speedups that bring more confusion than benefit to the users (and to me the need of doing much explaining), time is better invested in fiddling with new toys. LimitedSharpen was good and all (and still is, of course), but its possibilities of enhancement are, well, limited. By now, it's time to go beyond what LS can do. I counted carefully, and found all needed puzzle pieces are there. The puzzle is big, and putting it together is very difficult. But then, it's definetly more challenging than doing minor poilshments on old toys, and explaining the change of glance. Oh, and indeed I speak hardly five words of French. Don't be fooled by the acent.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#341 | Link | |
|
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,655
|
Quote:
Is it like: "Voulez vous manger avec moi?"
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
|
|
|
|
|
|
#342 | Link | ||
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Quote:
Quote:
__________________
|
||
|
|
|
|
|
#343 | Link | |
|
Solaris: burnt by the Sun
Join Date: Oct 2004
Location: /etc/default/moo
Posts: 1,921
|
Quote:
I can never spell french in french ever <.< and thanks for the update guys, atleast I know what one to wait for now
|
|
|
|
|
|
|
#344 | Link |
|
Registered User
Join Date: Oct 2005
Posts: 95
|
Hi,
I installed Avisynth 2.56, added LimitedSharpenFaster.avsi, MaskTools alpha (2.0a11) and RemoveGrain1.0 pre (SSE2, tried the others also) to plugin directory and tried to run an avs skript in media player classic. This caused the error message 'there is no function named removegrain....line 70' which is exactly the first call of remove grain in LimitedSharpenFaster script. Did I forget something to do or is there another mistake? |
|
|
|
|
|
#345 | Link | |
|
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,655
|
Quote:
.I prooves you'll never speak or write french. Maybe only your women may enjoy it :-P . Besides this your sentence has six instead of 5 words
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
|
|
|
|
|
|
#346 | Link | |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
|
#347 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
@ m.rup Sounds strange. However I never use plugin autoloading, and seldom run scripts in DS players, except for from within ffdshow. What happens if you put plugins and scripts in another folder, and explicitely load/import plugins and function? Does this work (it should), or not?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#348 | Link |
|
Registered User
Join Date: Oct 2005
Posts: 95
|
@Didee
Well, I use plugin autoloading because DVDrebuilder uses it. Interestingly I can call RemoveGrain directly in the avs script without loading it explicitely! However I will try to load the dll explicitely and see what will happen. Besides, is RemoveGrain 1.0 pre required? I found the following line in the LimitedSharpen script: # - RemoveGrain >= v0.9 IS REQUIRED!! |
|
|
|
|
|
#349 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Better it is, and the note infact should refer to v1.0pre. The features "wide=true" and "soft=something" currently make use of RG modes 19 & 20, which are not available in RG v0.9.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#351 | Link |
|
Registered User
Join Date: Oct 2005
Posts: 95
|
Well! Uninstalled Avisynth and reinstalled it.
Downloaded again all required components. Put them into plugin directory. Learned by loading dll's with LoadPlugin explicitely that only RemoveGrainS is running although CPU-Z tells me I'm having a mobile pentium 4 with SSE2 available. Ran avs script containing call of LimitedSharpenFaster ... and it worked!! Seem's to be about three times faster than LimitedSharpen. Nice! Great work. But there is one little downer: Soothe doesn't seem to work with MaskTools alpha (2.0a11). (blubb...there is no function named yv12lutxy...blah) Could it lead to some interferenes when I would add also masktools 1.5.8 dll? Tried to do so and it seemed to work, but ... who knows? Or, Didee, *duck* would it be possible ... Anyway, a reduction of duration from about 60 hours to 18 hours for one encode is a great benefit. Thank you guys |
|
|
|
|
|
#352 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
No interferences. I prefixed all the functions name in the masktools v2 by "mt_" to avoid clashes.
__________________
|
|
|
|
|
|
#354 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
function Soothe(clip sharp, clip orig, int "keep") { keep = default(keep, 25) keep = (keep>100) ? 100 : (keep<0) ? 0 : keep KP = string(keep) diff = mt_lutxy(orig,sharp,"x y - 128 +", U=1,V=1) diff2 = diff.temporalsoften(1,255,255,32,2) diff3 = mt_lutxy(diff,diff2,"x 128 - abs y 128 - abs > x "+KP+" * y 100 "+KP+" - * + 100 / x ?", U=1,V=1) return( mt_lutxy(orig,diff3,"x y 128 - -",U=2,V=2) ) } |
|
|
|
|
|
|
#355 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
That's the old b0rked version, Socio
![]() This is better: Code:
# Soothe - version for MaskTools v2
function Soothe(clip sharp, clip orig, int "keep")
{
keep = default(keep, 24)
keep = (keep>100) ? 100 : (keep<0) ? 0 : keep
KP = string(keep)
diff = mt_lutxy(orig,sharp,"x y - 128 +", U=1,V=1)
diff2 = diff.temporalsoften(1,255,0,32,2)
diff3 = mt_lutxy(diff,diff2, "x 128 - y 128 - * 0 < x 128 - 100 / " + KP
\ + " * 128 + x 128 - abs y 128 - abs > x " + KP
\ + " * y 100 " + KP + " - * + 100 / x ? ?", U=1,V=1)
return( mt_lutxy(orig,diff3,"x y 128 - -",U=2,V=2) )
}
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#356 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Didée, one of these days you're going to have to get some webspace to keep the definitive stable and beta versions of your awesome filters.
![]() Thanks for the quick fix, Manao, it works great now. =D |
|
|
|
|
|
#359 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
What about using something like RapidUpload? If not, maybe I can arrange some 10MBs for Didée.
By the way, I have a request for Didée: could all your filters be updated to use MaskTools 2.0? I only keep 1.5.8 because your filters need it.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#360 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Webspace is no problem. Finding time (and mood) to actually do it, that's the problem ...
Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#362 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Actually, I'm an idiot, that's what we have the avisynth wiki for.
http://www.avisynth.org/LimitedSharpen [Edit]Okay, it got moved. I'm leaving right now, but I can update with the new beta, masktools2, and clouded's faster one later.... Last edited by foxyshadis; 18th December 2005 at 08:44. |
|
|
|
|
|
#363 | Link | |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Quote:
In any case, while I think these are safe, it is probably sensible to stick to tried and tested tools like mt_lutxy (as I think you are doing); there are plenty of people capable of following in your wake and speeding things up -- and even more of us capable of testing such things. [I.e. Didée is a finite resource .]I am never completely certain about the Wiki... it doesn't have the community-friendly main page/discussion split of e.g. Wikipedia, and I think that maybe means people are reluctant to make changes. (Or at least, I am! Plus it just doesn't look as nice as Wikipedia... silly, but I think it may make a difference .) But, to get back on topic, if you wanted it, Didée, it seems like a sensible step would be for us to gather links to all your scripts, either in a forum thread or on the Wiki?
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 16th December 2005 at 18:42. |
|
|
|
|
|
|
#364 | Link | ||
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,390
|
Quote:
But please do update it!Quote:
|
||
|
|
|
|
|
#365 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 468
|
Genius
Didée, thank you so much for your work! You are certainly a genius of the higher orders... your tool is helping me make my videos so much superior!
I cannot believe such a level of sharpening can be achieved without significant ring or halo... this has got to be a really spectacular achievement! I mean, what can I possibly say? I've got the damn thing cranked to the max and I still can't make it ring or halo. It is slow as hell which is perfect, you could sell this script to some big software company... Oh yes, this stuff is more than sweet, it is truly evil! My day is now made, my rear-end is saved, etc. Your tool is so good that I'm considering paying you, if I get paid well for my computer work. Do you have a PayPal account? Last edited by Isochroma; 18th December 2005 at 04:24. |
|
|
|
|
|
#366 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Zürich, Switzerland
Posts: 29
|
Quote:
Any tips? Peace, Mike |
|
|
|
|
|
|
#367 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
You also need mg262's LimitedSupport_03Dec05.dll in your plug-ins folder.
You do not have to rename anything just use Limitedsharpen calls like normal. |
|
|
|
|
|
#368 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
As Socio says, doesn't need anything clever doing, just the files in the plug-ins directory. Do remember to call LimitedSharpenFaster, though (I renamed the script to reduce version confusion). If you call this and it appears to work, then it really is working... it should run a fair bit faster than LimitedSharpen.
Sorry about all the confusion ... things slowly metamorphosed from my original intention of providing filterlets for Didée (promised 4 months ago when there was just one version* ) to creating a full-fledged version. With the benefit of hindsight, I would have started a separate thread. In any case, I've built all the things that IMO stand a chance of being reusable, and I'm not planning to confuse matters further...I have a bad habit of taking on far too much stuff and having a huge backlog. Deep apologies to everyone who has ever been affected by this, including several readers of this thread...
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
#369 | Link |
|
Registered User
Join Date: Oct 2004
Location: Zürich, Switzerland
Posts: 29
|
Hey mg - don't you dare start apologizing! I stand in awe of what you guys are doing in your spare time. If I'm not paying for there's no way I'm going to complain! Also, I realized that some problems I'm having are actually being caused by an overheated CPU - it seems that I need to turn my fans a little over the silent level to run all this stuff for the duration of a DVD - the thing was hitting 75C and going into automatic slowdown - but the CPU *usage* is actually in the %60s. And the picture is fabulous.
Thanks for the great work! Mike |
|
|
|
|
|
#370 | Link |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
I'm having trouble keeping up with this extra long thread, so let me interject for a second and ask the following questions:
1. Where can one find the latest and greatest version of LimitedSharpen? The Avisynth Wiki page or the first page of this thread? 2. Could the page that lists the latest script also list the latest plugin requirements too? I know, I know, I could read the entire thread, but I'd like to be able to download (or copy+paste) the latest updates from a single location when I come out of hibernation every few months.
|
|
|
|
|
|
#371 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
No need to read the whole thread.
The last 6 or so pages will be fine. I always belive that it's best to read the last few pages atleast, anyway for the information value.
__________________
http://www.7-zip.org/ |
|
|
|
|
|
#372 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
My apologies for flaking earlier, but I updated the wiki. (The first page actually has the same old version as the wiki.) The beta is the newer one, with the other two being sped-up variations. (Latest masktools fixes a bug with Smode=3 in them.) If they change significantly in the future I'll update them again.
I also took the liberty of reformatting them slightly, to wrap a couple of extra long lines.
|
|
|
|
|
|
#374 | Link |
|
Doom9ing since 2001
Join Date: Oct 2001
Location: Seattle, WA, USA
Posts: 2,002
|
Can you make sure that the Wiki page lists all the plugin requirements for each version? I know all 3 scripts use some form of MaskTools, but that's not really made apparent except for the MT2 version which specifically uses MaskTools v2.
Consider whether someone looking at that page for the first time would know what to download and install. |
|
|
|
|
|
#375 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Actually, I don't believe there are any special requirements other than masktools, removegrain (which is linked), and warpsharp for the rarely used Smode=1; plus masktools2/limitedsupport (which are already linked in their respective versions). I'll add a link to original masktools and warpsharp.
I was next going to add in Didée's readme, maybe just a link to the first post of this thread would be better (except it doesn't explain smode=4 and lmode=3...). |
|
|
|
|
|
#376 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
could i possibly request a feature?
this would require some hacking the script, but might be useful in some cases (i can think of 2): allow horizontal-only, or vertical-only modes. horizontal-only could be useful for ex-analog sources that are vertically sharp but horizontally soft (i get a lot of these). vertical only could be useful for NTSC-PAL conversions to restore the vertical sharpness lost in the resizing (i get a lot of these too - the bulk of my workload). it could also be useful for anamorphic sources which have different characteristics in both directions (though i suppose the internal resizing can handle that). btw, i'm checking out all the new developments in this package, and i'm liking it a lot ![]() right now i'm having a go at hacking the script myself - i'll post it if i make something useful without breaking what's there already.
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#377 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quickly, before going home ...
Give a try on this version of LimitedSharpen, Mug Funky. Think I didn't break anything, but perhaps I forgot something [edit: fixed a variable's name]New: "strengthV" parameter, used only when Smode=2. Enables asymetric sharpening, internally it's just "sharpen( strength/100, strengthV/100 ). Smode=0: "custom" unsharp masking (bicubic resizing approximation). Radii can be given through "radius" (--> x-radius) and "radiusV" (--> y-radius). It's really a hack, in that the script looks sooo ugly now but it should work. After cleaning, this probably is very close to a "final" of LimitedSharpen. Only possible extention is scaling for the edgemask, and (surely) building the edgemask through Prewitt/LimitedSupport.Other improvements will go ... into another function. ![]() Some suggestions how to make this x/y stuff more consistent, regarding the parameters?
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 23rd December 2005 at 10:29. |
|
|
|
|
|
#379 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Since you say that SMode=4+LMode=3 can enhance a bit too much, I think that Soothe should be a builtin function
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#380 | Link |
|
interlace this!
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
|
@ scharfi: fixed
![]() @ Didée: i'll give that a try soon (i did a similar hack last night, but only the blur in smode=2 thing). would the asymmetric expand/inpands in masktools 2 help with this?
__________________
sucking the life out of your videos since 2004 |
|
|
|
|
|
#381 | Link |
|
Registered User
Join Date: May 2004
Posts: 288
|
I found a glitch in the new LS script on this line:
\ : Smode==2 ? sharpen(float(strengthH)/100.0,float(strengthV)/100.0) I changed strengthH to just strength and it seems to work just great. Didee to you recommend keeping the "strengthV" setting the same as the "strength" setting i.e LimitedSharpen(ss_x=1.2,ss_y=1.2,Smode=2,strength=40,strengthV=40) |
|
|
|
|
|
#382 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Ah, indeed. Thanks for spotting it, Socio. The previous link now points to a corrected version.
Unless specified otherwise, "strengthV" defaults to the setting for "strength", i.e. normal symmetrical sharpening. The scenarios for asymmetrical sharpening are those mentioned by Mug Funky: mostly for analog sources, perhaps for anamorphic sources, or perhaps when blowing non-anamorphic up to anamorphic. For VHS sources, Smode=0 with radius=1.5~3.0 and radiusV=~1.0 could be a good way ... except for if horizontal oversharpening is already present, but that's another story. Then, in reverse chronological order: @ Mug Funky: You meant Smode=3, didn't you? Yes, this one could be made working asymmetric, too. But that indeed requires MaskTools 2.0 ... it could be done with 1.5.x also, but would be rather slow. Plus, for that Smode it would (will) most likely be horizontal-only and vertical-only sharpening. Producing a weightened version for that one is not trivial, and probably not worth the effort. @ Chainmax: Soothe will not be implanted into LimitedSharpen. Applying Soothe is easy enough, isn't it. Something with integrated Soothing is in the works ... but it's not LimitedSharpen. ![]() @ foxyshadis: Thanks for the service. ![]() Seems like I'll have to revise the documentation anyways, so let's wait for that. @ Clouded: To whom do you apologize - to me?? Wrong address, as I live in the glass house - making announcements, then let people wait 'til they're blue in the face ... However, if some of the "support" filters could work on chroma too, it would help indeed. (Top ranking: the "difference" filters.) @ Isochroma: Fine if you like LimitedSharpen, but no way to accord me money for it. *** Happy Xmas everyone - have a good time. ***
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#383 | Link |
|
Registered User
Join Date: Aug 2004
Location: Canada
Posts: 568
|
Noob entering =p
I'm having some trouble with it. I know I set it up correctly, and results may vary based on signal quality, etc. When I view using GAM the image looks very pastel like, almost cartoonish at medium distance. Up close everything is COMPLETELY smoothed, at medium distance it's cartoonish looking like I said and very aliased as if I were viewing some low quality movie in full screen. I'll post shots later, werk time =p |
|
|
|
|
|
#385 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
JarretH:
Please post the parameters you're calling LimitedSharpen with. Also before/after screenshots could help. Posterization and aliasing is likely to happen with ultra-high values for "strength", or generally when "strength" is set too high for the chosen supersampling factor. If you're using no supersampling (ss_x=1.0 & ss_y=1.0), then aliasing will show up with much lower strength settings already. When no supersampling is used, Smode=4 might be better suited than the others, because of its non-linear response. The "soft" parameter will help on all Smodes to prevent or reduce the introduction of aliasing and posterization.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#386 | Link | |
|
Registered User
Join Date: Aug 2004
Location: Canada
Posts: 568
|
Hey Didee
Are you referring to this? Quote:
Is there a way I can check if it's hyperthreading? I didn't see two processes using half/half cpu. I'm still tweaking what I like. Been doing some tests on foodtv ![]() I could never figure out how to take captures with GAM. |
|
|
|
|
|
|
#388 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Could be caused by RemoveGrain. Especially the first one (merge 75% of RG mode4) for my taste is too strong. Comment out both the lines with MergeLuma(RemoveGrain(..)..), and see if it looks better then.
Note: I had suggested those MergeLuma(Removegrain...) thingies to Socio for realtime processing because this works very fast. For "real" processing, I'd rather recommend SPresso. Takes somewhat more processing power, but it's more efficient, doing less harm.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#389 | Link | |
|
Registered User
Join Date: Aug 2004
Location: Canada
Posts: 568
|
Quote:
|
|
|
|
|
|
|
#391 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
|
|
|
|
|
|
|
#392 | Link | |
|
Registered User
Join Date: Aug 2004
Location: Canada
Posts: 568
|
I think I settled on this
Quote:
|
|
|
|
|
|
|
#395 | Link | |
|
Guest
Posts: n/a
|
Quote:
If you think my point is wrong, just say it with you own words. It's one thing to be sarcastic, another to forge someone's post. . Last edited by Neil Lee; 5th January 2006 at 03:03. |
|
|
|
|
#396 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Clouded already did profiling a few pages back and used it to filterize the slowest and hardest hit luts; his half-and-half variation probably includes 80-90% of the speedup of moving to fully optimized C/asm. A good coder must pick one's battles.
However, I just noticed clouded forgot to modify his script to use MakeDiff/SubtractDiff, so you might give the edited version a whirl. (I'll add the latest mods whenever people think they're stable.) The affected lines are: Code:
sharpdiff=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 : SubtractDiff(tmp,sharpdiff2) |
|
|
|
|
|
#397 | Link | |
|
ReMember
Join Date: Nov 2003
Posts: 416
|
Quote:
|
|
|
|
|
|
|
#399 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
Last edited by Socio; 6th January 2006 at 02:11. |
|
|
|
|
|
|
#400 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 66
|
The MakeDiff version needs the latest support dll here:
http://people.pwf.cam.ac.uk/mg262/po...t_03Dec05B.dll regards, Li On |
|
|
|
|
|
#401 | Link | |
|
Registered User
Join Date: May 2004
Posts: 288
|
Quote:
Thanks that worked, I had the version just prior to that one did not know about that newer one. |
|
|
|
|
|
|
#402 | Link | |
|
Registered User
Join Date: Aug 2004
Location: Canada
Posts: 568
|
If we ever want a settings thread here's mine now =p
Quote:
*Edit...how DO you take screenshots in ATI TV and Got All Media. Why must everything be so difficult! Last edited by JarrettH; 8th January 2006 at 08:08. |
|
|
|
|
|
|
#403 | Link | |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
BUG fixed: the right-hand side of AddDiff wasn't working correctly. Thank you for spotting it, foxyshadis! (I really hope this wasn't causing you headaches yet, Didée.)
LimitedSupport, 8 January 2006 The source is also uploaded if anyone feels like checking it. Quote:
? Because I'm nervous about breaking things. I do test things for quite a while... but in this case, where these things are going to be put to an important use (and where they are replacing something that clearly works), I'd feel better if a couple of you would test them before Didée uses them. It isn't technically difficult -- you get two one-line commands, like yv12lutxy(o,d, "x y 128 - +") adddiff(o,d) and you need to check that they have the same output whatever the input clips o and d are. [For example, like this... a=yv12lutxy(o,d, "x y 128 - +").GreyScale() b=adddiff(o,d).GreyScale() suBTRACT(a,b) ] It isn't technically difficult... the important thing is to try on a wide range of clips. So this is a great opportunity for the average reader to prove helpful .
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
|
#404 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
If it's not too much trouble, then could you create a version with xDiff(o,d,[1/2/3/4]) where the last parameter are similar to the y/u/v parameters to masktools, but always for chroma? (1=>trash, 2=>copy first, 3=>execute, 4=>copy second) Then at least we have something to test out, even if it isn't perfect at first.
|
|
|
|
|
|
#405 | Link | |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
LimitedSupport, 9 January 2006
LimitedSupport, 9 January 2006
All filters have been modified to take an extra argument chroma. chroma can either be be a clip (in which case the chroma of that clip is copied) or one of the following strings: "ignore" "process" "copy first" "copy second" "copy third" The default mode is "ignore". "Copy first", etc. are just for convenience; obviously, you can just repeat the relevant argument. (These strings are case insensitive, so you can also use e.g. "PROCESS".) I'll edit in a proper summary of the functions tomorrow, but just as a recap: SimpleAverage(clip, clip, chroma) MakeDiff(clip, clip, chroma) AddDiff(clip, clip, chroma) SubtractDiff(clip, clip, chroma) Clamp(clip, clip bright_limit, clip dark_limit, int overshoot, int undershoot, chroma) Prewitt(clip, float multiplier, chroma) If you pass in clips whose length differs, the output is not guaranteed to be sensible beyond the length of the shortest clip. *This really hasn't been tested much yet*... Quote:
Edit: I noticed in other threads (which I'm not going to dig out now) that people are citing issues with LimitedSharpenFaster. If you do run into something like this, please try the earlier versions -- both Didée's versions and Socio's modification for MaskTools 2.0; this will pin down which change is responsible for the issue, *and then we can fix it* .
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 9th January 2006 at 02:01. |
|
|
|
|
|
|
#406 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Ah, splendid.
![]() It doesn't really matter too much if one hast to type >>,U=3,V=3<< or >>"process"<< instead. Different syntaxes keep the brain from getting rusty. ![]() Just one question, I seem to have a dumb moment: Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
|
#407 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
No, no, it was only out of deference to compatibility, I like schemes like yours better. I had written my own but left it off as unimportant. Thank you so much, you're the speedy gonzales of avisynth filters.
![]() I tested the first 4 pretty thoroughly with a goofy width and caught no errors. Excellent! I wasn't sure about clamp until I realized it swapped the input clips on each. Copy second gives different results but is meaningless anyway, the rest work fine. I simply have no idea what to compare prewitt with, although I'm guessing the results of an average of 8-part dedgemask? I'll let you handle that one. I'm just curious about how it fits into LimitedSharpen, if it does at all. Is it a replacement forCode:
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)
|
|
|
|
|
|
#408 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Didée,
"copy first" behaves like this: AddDiff(a, b, chroma = a) "Copy second" behaves like this: AddDiff(a, b, chroma = b) Or you can take chroma from a completely different clip, like this AddDiff(a, b, chroma = other_clip) The "copy first" and "copy second" have a slight advantage when you are doing some processing inside the function call... AddDiff(a.Invert(), b, chroma = a.Invert()) will call Invert twice. But AddDiff(a.Invert(), b, chroma = "copy first") will only call it once. Edit + re-edit: foxyshadis, I'm extremely grateful for the testing! But I can't reproduce the clamp problem... this is the script I tried: Code:
function scriptclamp(clip main, clip bright_limit, clip dark_limit, int overshoot, int undershoot)
{
OS = string(overshoot)
US = string(undershoot)
oss="y x "+OS+" + < y x "+OS+" + ?"
uss="y x "+US+" - > y x "+US+" - ?"
yv12lutxy( bright_limit, main, yexpr=oss, uexpr=oss, vexpr=oss, u=3, v=3)
yv12lutxy( dark_limit, last, yexpr=uss, uexpr=uss, vexpr=uss, u=3, v=3)
return last
}
a=scriptclamp(o,p,q,1,2).MergeChroma(p)
b= clamp(o,p,q,1,2,chroma="copy second")
subtract(a,b)
Levels(128-15, 1, 128+15, 16, 235)
Prewitt: Some time back I found a set of Photoshop scripts that contain huge numbers of edge masks: http://members.ozemail.com.au/~binar...volcorner.html (scroll down to Custom_Convolution_Actions_APS5.zip - 298KB) There were a lot of scripts in there, but they were very quick to try (being one click each)... Prewitt stood out as being much better than the others. Method described here. Unlike all the other functions in this filter, it's only in C++ (though it could certainly be converted to assembly). What else? Source code I haven't by any means squeezed out all the speed that is possible; the filterlets were chosen to be reusable and quick to assemblify as much as for the potential speedup. (Also replacing two-argument LUTs is something that I'm keen on doing because two-argument LUTs aren't friendly to 15-bit processing.) The next natural speedup would probably be to write a faster upsampling-resizer than the built-in AVISynth one... I'm pretty sure I know how to do it but it's a lot of work. When the LS successor appears and is declared to be in a stable version, then I might look at speedups again... .
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 9th January 2006 at 03:08. |
|
|
|
|
|
#409 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Ah, see, mergechroma(p) is a better idea! I was just using u=2,v=2... on the two mt_lutxys. Obviously that's going to copy chroma of clip #3 instead! (u/v=4 vs "copy first" works perfectly.) Clamp doesn't accept "copy third" however.
I'll give prewitt a try, I'm developing something with sobel but I'd definitely like more fine details. (Another I'm developing just needs rough edges since it'll be blurred anyway.) If you work on resizing down the line, would it be better just to start with the current avisynth code and optimize that to include in the next version? Or would it be more sensible to just make your own FastResize filter? |
|
|
|
|
|
#410 | Link | |||
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Quote:
LimitedSupport, 9 January 2006 (revised) Quote:
Quote:
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|||
|
|
|
|
|
#411 | Link |
|
the dumbest
Join Date: Oct 2002
Location: Malvinas
Posts: 494
|
Sorry guys to tell you but I guess a new thread should be started beginning with the last version of everything.I read the whole thread and it is quite difficult to follow the modifications of scripts and DLLs...
In fact I read it like four times to get things working...(like more than 2 hours) |
|
|
|
|
|
#412 | Link |
|
ReMember
Join Date: Nov 2003
Posts: 416
|
Code:
LoadPlugIn("LimitedSupport_09Jan06B.dll")
LoadPlugIn("MaskTools.dll")
LoadPlugIn("mt_masktooks.dll")
LoadPlugIn("RemoveGrain.dll")
Import("LimitedSharpenFaster.avsi")
AVISource("xxx.avi")
LimitedSharpenFaster()
Last edited by Backwoods; 9th January 2006 at 19:10. |
|
|
|
|
|
#413 | Link | |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
Quote:
Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
|
|
|
|
|
|
#415 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
What am I going to speed up now
?Didée, May I ask whether these things which you occasionally use: temporalsoften(1,255,0,32,2) are meant to exploit the scene change detection in temporalsoften or circumvent it?
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
#416 | Link | |
|
Registered User
Join Date: Feb 2002
Location: Charlotte, NC USA
Posts: 1,988
|
Quote:
__________________
Reclusive fart. Collecting Military, Trains, Cooking, Woodworking, Fighting Illini, Auburn Tigers |
|
|
|
|
|
|
#417 | Link |
|
HDConvertToX author
Join Date: Nov 2003
Location: Cesena,Italy
Posts: 6,550
|
please build a limitedsharpen.dll that include all mask*.dll/warpsh*.dll limitedspeed*.dll or whatever is needed to load limited sharpen without checking what is to load and what is to not load (because too new/too old) BHH
__________________
HDConvertToX: your tool for BD backup MultiX264: The quick gui for x264 AutoMen: The Mencoder GUI AutoWebM: supporting WebM/VP8 |
|
|
|
|
|
#419 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Well, packaging everything in one archive would make it out of date as soon as an update to masktools was released. I guess I can list everything required for a particular function with its function though. And change the masktools2 link so you don't accidentally download an old one. See if you like it more now.
There should be no errors or warnings if you have the most recent versions of the dlls, as long as you just load them all from the script, unless there's some kind of versioning conflict with older ones. |
|
|
|
|
|
#420 | Link | ||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
Thinking about it, it could be the SC detection in fact isn't needed, and I could use average() ... but then, while average() (24Oct05) generally works nicely, sometimes it b0rks out with returning full green. Didn't find the cause up to know, and no reliable way to reproduce the bug. Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
||
|
|
|
|
|
#421 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Guys...
It looks like some improvement on this front may be in the works. But please bear in mind the following: 1) You're referring to four different plug-ins by four different authors. Compiling other people's code can be a lot of work... consider that (AFAIK) all the code is available and that you can amalgamate it yourself if you want it -- and then release the result as a public service. 2) Similarly the wiki is freely editable... foxyshadis doesn't need to be left to do all the work. 3) What would happen if you loaded the amalgamated plug-in together with (older or newer) versions of the relevant tools? Bugs might be unfixed by the clash... this could cause problems that were very hard to track down. 4) As foxyshadis notes, the thankless maintainer of the amalgamated plug-in you suggest would need to recompile it every time any of the included plug-ins changed. 5) The version of LimitedSharpen that all of this is based on is an experimental version. I wrote LimitedSupport because I promised Didée I would many months ago. I never really intended it to be used by anyone but him... the idea was that he would simply have more functions to play with. If and when he thinks that it is stable and appropriate for use, I expect that he will post scripts that use it. On the front page, with all the appropriate documentation. What I wrote about the functions was (and still largely is) targeted at Didée; I'm very happy for people other to use it, and I'll help with specific issues, but I was never trying to turn one of Didée's experiments into front-page form. Edit: Fred, I'm not great at adapting other people's code . Most of that function seems to be resizes... I do definitely want to write a faster resizer one day, but it's a lot of work. It would fit quite neatly into a framework I have in mind that would speed up many of Didée's filters substantially... but I am waiting to see what the next generation of filters look like before I start on something that might be obsoleted!Didée, Average: Definitely not good -- I will try to hunt it down when my brain is next up to speed; thanks for telling me about it. But for this case I was thinking of writing a much simpler dedicated radius-1 temporal blur, which would be faster anyway. (Actually, this is right down kassandro's street -- I'm surprised he hasn't done this already at a gazillion FPS.) I thought I'd seen that usage in a couple of your functions, but maybe I was just looking at the same ones again and again .
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 14th January 2006 at 19:30. |
|
|
|
|
|
#422 | Link |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
LimitedSharpenFaster()
I did many tests with sharpeners....
Limitedsharpen is the best!! Here are some Super-8 filmframes: I used limitedSharpenFaster(smode:1, radius=2-3, strenght=100-300) I had no problem to download everything to make it work. Yep, it's faster! Please remember real film sharpness is different from digital.. It's softer.. and it should be... It's the film look. The frames are taken from the Mpeg2.. then converted to Jpeg. So you can imagine how the original 1024x768 Huffyuv looks? 1972, Kodak film, Canon Super-8 camera (model unknown) ![]() ![]() Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest Last edited by videoFred; 18th January 2006 at 13:04. |
|
|
|
|
|
#423 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 468
|
There seems to be a problem with LimitedSharpenFaster() in the distribution of MaskTools 2.0 a20. I'm getting frameblends with this avs script:
ImageSource(file = "S:\VideoDone\Escaflowne\EF.%06d.png", start = 0, end = 140636, fps = 23.976) ConvertToYUY2() LimitedSharpenFaster(ss_x=2.0, ss_y=2.0, Smode=3, strength=800) This script doesn't produce any frameblending: ImageSource(file = "S:\VideoDone\Escaflowne\EF.%06d.png", start = 0, end = 140636, fps = 23.976) ConvertToYUY2() LimitedSharpen(ss_x=2.0, ss_y=2.0, Smode=3, strength=800) In my own work, the original LS continues to prove its worth on a daily basis. So many thanks to the devs! I'd request that the MT2 version of the LS script be put back on avisynth.org until the bugs are worked out of the faster version. Here are 3 frames (15782, 15783, 15784) made with the last non-integrated MT2 version of LS (second script in this post): [Pics removed due to bandwidth overconsumption and issue already resolved] and here are the three frames (15782, 15783, 15784) made with the MaskTools a20 version of LS-faster (first script): [Pics removed due to bandwidth overconsumption and issue already resolved] Last edited by Isochroma; 31st January 2006 at 23:33. |
|
|
|
|
|
#424 | Link |
|
Registered User
Join Date: Apr 2005
Posts: 1,339
|
Same here. No biggie. I'll back down on the version until it is working better.
Problem seems to be happening with masktools-v2.0a19 and masktools-v2.0a20, works fine in a18. Last edited by Pookie; 22nd January 2006 at 08:42. |
|
|
|
|
|
#425 | Link | |
|
Potentate
Join Date: Mar 2003
Posts: 219
|
Quote:
T |
|
|
|
|
|
|
#426 | Link | |
|
Registered User
Join Date: Sep 2004
Location: Near LA, California, USA
Posts: 1,544
|
Quote:
Yeah! Who wants to wait 10 minutes to see some anime chicks huggin' each other!
__________________
Pirate: Now how would you like to die? Would you like to have your head chopped off or be burned at the stake? Curly: Burned at the stake! Moe: Why? Curly: A hot steak is always better than a cold chop. |
|
|
|
|
|
|
#427 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Thanks IsoChroma, Pookie. I fixed the bug ( cf the dedicated masktools thread ). Yet, I strongly advise you to keep to the masktools 2.0a18 for the time being, as I have said on the other thread, I'm hunting done another nasty issue, that mostly seems random and that may or may not happen on your computer ( but you wouldn't like it to happen at the #51239 frame of your clip ).
Apart for a bug with very small resolution ( < 128 horizontally ), the 2.0a18 version has no bug that I know of, so it might be considered as stable ( at least, relatively to the v2.0 "stability" standard )I updated my sig to point toward that version, instead of the latest.
__________________
|
|
|
|
|
|
#428 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Ok, the bug wasn't in the masktools, but in the old avisynth.dll that was in my system directory. Once updated to latest avisynth, it works quite alright. So provided that nothing else is wrong in 2.0a21, it can be used.
__________________
|
|
|
|
|
|
#431 | Link | |
|
Does it really matter?
Join Date: Jun 2004
Location: Chicago, IL
Posts: 1,542
|
Quote:
|
|
|
|
|
|
|
#433 | Link |
|
Registered User
Join Date: Oct 2005
Location: France
Posts: 17
|
Hi, I'm using the latest :
- masktools2 - MT + avisynth dll - the second LSF from the wiki page - hqdn3d I get a crash every time after several seconds of read, of course no crash without those filters ... any idea ? |
|
|
|
|
|
#434 | Link | ||
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Reading this...
Quote:
Quote:
Note the requirement for the latest version of AVISynth 2.5.6, and that you will still need the right version of RemoveGrain from here. (<--Excuse the big letters; edited to stand out to those skimming this thread.) But otherwise that post sums up the state of things. Oh yes... one other thing: how dare you call cartoons anime!
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. Last edited by mg262; 25th January 2006 at 20:45. Reason: Reflect requirement for *latest version* of AVISynth 2.5.6 |
||
|
|
|
|
|
#436 | Link | |
|
Registered User
Join Date: Oct 2004
Location: Zürich, Switzerland
Posts: 29
|
Quote:
Mike |
|
|
|
|
|
|
#437 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
I would post these issues in the MaskTools thread...
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
#438 | Link |
|
Registered User
Join Date: Jan 2002
Location: France
Posts: 2,856
|
Mr Bitey, aberforthsgoat : can you check your avisynth.dll version & release data please ? Because builds after 2.0a18 have issues with early 2.5.6, but not with the last one. I can't make it crash on my computer.
So can you try latest 2.5.6 RC, and - if it still doesn't work - can you give me the avs script you used.
__________________
|
|
|
|
|
|
#439 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
So how about someone either updates page 1 or makes a new thread with the newest script and required DLLs + a readme?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#440 | Link |
|
Clouded
Join Date: Jul 2003
Location: Cambridge, UK
Posts: 1,148
|
Front-page version is official. This version isn't (Didée has said so several times).
foxyshadis has listed everything necessary for the experimental version on AVISynth.org and kept it up-to-date through all the changes: http://www.avisynth.org/LimitedSharpen
__________________
a.k.a. Clouded. Come and help by making sure your favourite AVISynth filters and scripts are listed. |
|
|
|
|
|
#441 | Link | |
|
Guest
Posts: n/a
|
Manao,
Im using the avisynth that came with MT05 (tsp says you need to use that version for MT05 in the MT05 thread, or v 2.6 (when its released)). Quote:
There seems to be a similar discussion going on in the MT05 thread with LSF crashing out with MT5 - seems there might be some incompatability with the avisynth.dll needed (or recommended) for MT05 and the avisynth.dll needed for the +18 versions of masktools.. Cheers, Bitey |
|
|
|
|
#442 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
All of these "issues" are why the front-page is still the official version.
![]() I could try testing various version of avisynth.dll, but I normally run a pre-2.5.7 so I guess I won't see any of the problems. Maybe you can ask tsp for a modified 2.5.7 cvs and see if that solves the problem. |
|
|
|
|
|
#443 | Link | |
|
Registered User
Join Date: Oct 2005
Location: France
Posts: 17
|
Quote:
|
|
|
|
|
|
|
#445 | Link | ||
|
Guest
Posts: n/a
|
Quote:
Quote:
![]() Cheers, Bitey |
||
|
|
|
#446 | Link | |
|
Registered User
Join Date: Aug 2003
Location: Spain
Posts: 83
|
Hi, i use the last limitedsharpenfaster with masktool, etc. Maybe is a stupid question but can soft parameter replace the Soothe function for real encoding?
Quote:
|
|
|
|
|
|
|
#447 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
The "soft" option of LimitedSharpen is not related to Soothe's processing. "Soft" in LS is a *spatial* operation, in order to smoothe out pixelation/aliasing/etc that might be caused by strong sharpening settings. Soothe does *temporal* processing to reduce temporal jitter caused by the sharpening process.
So it's two different pairs of shoes, not meant to replace each other, but rather to work together hand-in-hand. BTW, soft=-1 in LS ~tries~ to find a suited value for "soft" automatically, depending on the used supersampling factors. However I would not trust too much in it, but rather set it manually: suited strengths for "soft" depend pretty much on the combination of values for Smode, strength, supersampling & overshoot ... and so far, no formula containing all these variables & spitting out a good value for "soft" appeared to me.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#448 | Link | |
|
Registered User
Join Date: Nov 2005
Posts: 7
|
Ehm... sorry for the dumb question, I'm a newbie.
I use Avisynth as a ffdshow filter. This is my script call: LanczosResize(1280,720) LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,str ength=50,overshoot=7) I noticed that the Lanczos called through Avisynth is better than ffdshow resize (I don't know why, but that's it). However, ffdshow has more options like the choice of multiple resizes respect the original media resolution, and the possibility to set the tap parameter for the Lanczos resize. Is there a way to have these two things even through Avisynth? I read the syntax for the Avisynth Lanczos resize: Quote:
LanczosResize(1280,720,2) What for double resize (source NTSC 720x480 = 1440x960, source PAL 720x576 = 1440x1152)? Thanks, and sorry for my english... Last edited by stealth82; 16th February 2006 at 00:00. |
|
|
|
|
|
|
#451 | Link |
|
Registered User
Join Date: Aug 2004
Location: Canada
Posts: 568
|
Hey Didee, would the Spatial Smoothing option in DScaler AdaptiveNoise combined with Soothe+LimitedSharpen be redundant? I can't even perceive what Spatial Smoothing does and if you're saying Soothe already does that should I just disable it with AdaptiveNoise?
+ What does the top right "Parameter" in Resize > Settings do? I found I couldn't Lanczos resize (multiply by 2) + LimitedSharpen a DVD without the odd frame skip (enough to be irritating). Actually, I couldn't avoid frame skip with LimitedSharpen on its own. Just doing Lanczos resize with luma/chroma sharpen for now. P4 2.8GHz, 2x512MB 2-2-2, Media Player Classic VMR9 Renderless mode Thanks
|
|
|
|
|
|
#453 | Link | ||||
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Mate ...
Quote:
Quote:
Quote:
Quote:
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
||||
|
|
|
|
|
#454 | Link | |
|
Guest
Posts: n/a
|
Quote:
Cheers, Bitey |
|
|
|
|
#456 | Link | |
|
Registered User
Join Date: Aug 2003
Location: Spain
Posts: 83
|
Quote:
|
|
|
|
|
|
|
#457 | Link |
|
Registered User
Join Date: Jul 2005
Posts: 53
|
"There is no function named mt_edge"
"There is no function named DEdge_mask" I get one or the other error using LimitedSharpen and dll's from post 1, the last 5 pages and also from the wiki. I've d/l 4 different versions of every .dll used, 5 different versions of the script and every MaskTools I can find. Can someone test this wiki page and and update if necessary please ? http://www.avisynth.org/LimitedSharpen
__________________
x64 XP, ABIT AN8, AMDx2 4400, 1GB RAM, Seagate SATA drives, 24" Dell, 6600GT. Celtic Druid's builds of SSE2 ffdshow XviD MPC & dlls, DScaler5, Avisynth & LimitedSharpen, DScaler5. Last edited by seehowyouare; 4th March 2006 at 15:22. |
|
|
|
|
|
#458 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
All you need are one of the two versions I linked to.
Step 1: See if you can use LoadPlugin("c:\path\to\Masktools.dll") and whether it now works. If so, it means you're not placing them into your autoload folder. Step 2: You either have to find it and put them there, or change its location. It will not read plugins that are just plopped into the same folder as the script. That's an avisynth issue, not LS, so it doesn't belong on that page. Someday I'll get around to making an avisynth troubleshooting FAQ. ^^; |
|
|
|
|
|
#459 | Link |
|
Registered User
Join Date: Jul 2005
Posts: 53
|
Thanks foxyshadis :-)
I got it working using MaskTools-v1.5.8.zip and the following line. My understanding was obviously wrong that having the MaskTools.dll in the plugins folder would be adequate as the LimitedSharpen script should autload them. Here's the script thing I used. LoadPlugin("C:\Program Files (x86)\AviSynth\plugins\MaskTools.dll") Import("C:\Program Files (x86)\AviSynth\plugins\LimitedSharpen.avs") LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=3,strength=40) Now LimitedSharpen works on my PC, I guess that means the rest of this day is gone :-)
__________________
x64 XP, ABIT AN8, AMDx2 4400, 1GB RAM, Seagate SATA drives, 24" Dell, 6600GT. Celtic Druid's builds of SSE2 ffdshow XviD MPC & dlls, DScaler5, Avisynth & LimitedSharpen, DScaler5. |
|
|
|
|
|
#460 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
This is the plugins and software I'm using.
FFDShow http://www.afterdawn.com/software/vi...rs/ffdshow.cfm Avisynth http://prdownloads.sourceforge.net/a...6.exe?download Masktools http://manao4.free.fr/masktools-v2.0a27.zip Removegrain. Open RemoveGrain with Winrar, http://www.rarlab.com http://home.arcor.de/kassandro/Remov...emoveGrain.rar Media Player classic http://www.afterdawn.com/software/vi...er_classic.cfm ColorMatrix http://www.geocities.com/wilbertdijk...atrix_v110.zip I get mt_masktools.dll and LimitedSharpenFaster.avsi from the masktools link. I get RemoveGrainSSE2.dll from the remove grain link. I get ColorMatrix.dll from the colormatrix link. I put all of these into my avisynth plug-in folder. I delete FFAvisynth.dll, DirectShowSource.dll, TCPDeliver.dll, colors_rgb.avsi from the avisynth plugin folder. In the removegrain link. Use the SSE that your cpu has, either SSE or SSE 2, or SSE 3. If your cpu has no SSE, use the removegrain dll that I showed that end in "S", that means it's not SSE. Get the corresponding SSE FFDShow as well. Copy and paste this script in the FFDShow Avisynth text box; ColorMatrix() Lanczos4Resize(1280,768) LimitedSharpenFaster(ss_x=1.0, ss_y=1.0, Smode=3, strength=60) I read on avsforum.com that there is certain plug-in's and setup that don't need as much cpu power. Is there anything like that available today ? I can't get limitedsharpenfaster to work on my celeron M 1.4 GHz cpu. Is it true ffdshow only uses the cpu ? What hardware is recommended for limitedsharpenfaster + ffdshow ? |
|
|
|
|
|
#461 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Well, first, there's no way you'll ever get realtime playback of DVD-res mpeg-4 with LSF on a Celeron M of any speed, unless you like a lot of stuttering. You'll have to stick with old-fashioned sharpening for playback.
But for encoding it should work. What error do you get? You might need SSETools for removegrain, but I think that comes with it. |
|
|
|
|
|
#462 | Link |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
Why do you delete those dlls?
I think SSETools is supplied with the latest official RemoveGrain package and not the pre-1.0 one, see www.removegrain.de.tf
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
#463 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
The removegrain I link too is from august 2005.
The one you linked to is from may 2005. I don't encode. I just watch dvd's. Please describe the standard pc equipment needed to run limitedsharpenfaster. And do you know if ffdshow only uses the cpu and only uses the graphics card for gamma video overlay ? |
|
|
|
|
|
#465 | Link | |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
Quote:
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
|
#466 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
ffdshow can use the overlay; you need to set it to overlay in its output and set your player to overlay output.
To run LSF on DVD-res in realtime, hm. I would say at least a Pentium M 1.8 or Athlon XP 3000, maybe? (That includes decoding and postprocessing.) Unfortunately I have no experience with P4s or A64s. For smaller video, like vcd, it could work just fine on yours. Thanks for bringing that up, Boulder, I'll make sure to update the links. |
|
|
|
|
|
#467 | Link |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
ColorMatrix will consume some CPU cycles. Try using BicubicResize instead of Lanczos, it's a bit faster.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
#469 | Link |
|
Guest
Posts: n/a
|
Jeremy Duncan,
For the love of god, stop posting that guide on the forums! (here and avsforums) it is inheritly a REALLY bad idead to post a guide for something that yout cant get working yourself for others to follow!. Now back on topic. Overlay mixer uses the overlay to display your video, rather than using VMR9 (or vmr7 which isnt used much) - its usually much quicker (especially on low end video cards). You need to set this in ffdshow AND in your DVD PLAYER SOFTWARE PROGRAM. However the problem you are going to have is that your CPU isnt quick enough to run those settings (from your "guide" in real-time) - ffdshow runs in CPU and not GPU. To resize first, and run those settings you are going to need around a 4Ghz P4. I asked you a long time ago for your system specs so people can help you, and like every other piece of advice/help youve been offered you ignored it. Forget resizing first on your Pentium M. Just run LSF and let your video card scale the video upto your windows resoltion which I presume is 1280x720 from your "guide". If you get stuttering, try smode4 - its a bit quicker and drop the strength down until it plays smooth (if ever). You might also like to try a different denoiser (rather than using denoiser your using in ffdshow under blur & nr). See socio's guide (refer avsforums thread). Cheers, Bitey |
|
|
|
#470 | Link | |
|
Potentate
Join Date: Mar 2003
Posts: 219
|
Quote:
Bitey, I read in one of his posts on AVSForum that not only was he running a Celeron, but it was a laptop as well!! no way in hell will that thing have the bandwidth, not to mention the HP to do anything other than simple filtering. T |
|
|
|
|
|
|
#471 | Link | |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
I can play LSF and denoise3d, with minor stutter. It doesn't matter if overlay is on or off, no performance difference. I tried smode 4. Couldn't see a big difference. I also set the strength to 100, 60, 30. No difference. I tried with denoise3d off. No difference. My pc specs are; Dell Inspiron 1300 Celeron M 512 dual ram Integrated gma 900 graphics 40GB HDD If only I got a dual core notebook instead. But I just learned about limitedsharpen a few days ago. |
|
|
|
|
|
|
#472 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Yep, there's a big difference between a $500 laptop and an $1800 one. Of course ffdshow is utterly single-threaded, so a good P-M would do you better than a core duo right now. And ss_x/ss_y are the only settings that make a noticeable speed difference. Anyway, now that you've figured out all your LSF settings can you not keep posting in this thread, for tidyness' sake?
|
|
|
|
|
|
#474 | Link |
|
Registered User
Join Date: Feb 2006
Location: south east asia blue
Posts: 9
|
i'd like to try this good sharpener. but i still confuse how to set the order on the script..
i would use these filter 1.deinterlacer 2.denoiser 3.??? (anything else?) 4.limited sharpener how should i put in order the filter correctly?? sorry for my english and basic question
|
|
|
|
|
|
#475 | Link |
|
DeadFat
Join Date: May 2004
Posts: 80
|
i have original limitedsharpen and 2 more modiffied version(LimitedSharpen_(modded-27Nov2005), LimitedSharpen_(modded-29Oct2005)) and limitedsharpenfaster
my question is is limitedsharpenfaster really faster than the other 3,and which version is stable, which version i should use Last edited by Yama4050242; 20th March 2006 at 02:40. |
|
|
|
|
|
#477 | Link |
|
Registered User
Join Date: Jul 2005
Posts: 53
|
I still think the Avisynth LimitedSharpen wiki needs an update
You can find all the different LS scripts there but I can't find any working examples of how to load the scripts etc. I have to start digging through this thread to learn the new functions and what they do.
__________________
x64 XP, ABIT AN8, AMDx2 4400, 1GB RAM, Seagate SATA drives, 24" Dell, 6600GT. Celtic Druid's builds of SSE2 ffdshow XviD MPC & dlls, DScaler5, Avisynth & LimitedSharpen, DScaler5. |
|
|
|
|
|
#478 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
I moved it to the new wiki some time ago:
http://www.avisynth.org/mediawiki/wiki/LimitedSharpen Feel free to contribute relevant examples, even if they're just copied from the thread. I kinda let that part slide. |
|
|
|
|
|
#479 | Link |
|
Registered User
Join Date: May 2005
Posts: 157
|
The Wiki doesn't load for me atm.
edit - it's working now, thanks ![]() edit2 - admittedly I do get a little mixed up. I see that there are different versions of LimitedSharpen included in the Wiki (talked about). Which version (of LimitedSharpen(), MaskTools, etc) should be used today? edit3 - LimitedSharpen is the topic, but LimitedSharpenFaster is the download, hhm Last edited by Backflip; 2nd April 2006 at 08:02. |
|
|
|
|
|
#481 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
I guess I should clear that up. You have to copy RG 1 over RG .9, otherwise you'll get errors (specifically, RG 1.0 does not include SSETools.dll, somebody *whistles* should make a package with both). When I make the RemoveGrain wiki page I'll explain that.
|
|
|
|
|
|
#482 | Link | |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
Can somebody please post the text with them together ? And do I call it removegrain.avs ? |
|
|
|
|
|
|
#483 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
They're all .dll plugins, there's no text or avs, just the links you took a screenshot of. If kassandro gets back to me I'll host a combined package so that we can do away with linking to both, and perhaps get 1.0 final to see the light of day, but he's been away for a long time now.
|
|
|
|
|
|
#487 | Link |
|
EphMan
Join Date: May 2004
Posts: 737
|
All-In-One ZIP Package
For those (like myself) that had issues getting the new LimitedSharpenFaster script working, or had a difficult time hunting down all the filters and scripts, I made a simple zip file containing the current LimitedSharpenFaster script and all the needed plugins.
You can get it here: http://rapidshare.de/files/18037395/...v2.0b.zip.html |
|
|
|
|
|
#488 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
When using LMode=3, what difference would there be between using SMode=4 and SMode=3?
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#490 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I know about SMode=4's alleged magic but didn't know about the speed. In any case, reading the whole thread just for this seems pointless.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#491 | Link |
|
Guest
Posts: n/a
|
I think i have found the answer:
http://forum.doom9.org/showthread.php?s=&threadid=87514 Upon further reading of that thread - its not .. Cheers, Bitey Last edited by Mr.Bitey; 20th April 2006 at 03:20. |
|
|
|
#492 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Please tell me if LanczosResize is nessessary or recommended as a additional sharpener if I'm using Limitedsharpenfaster ?
Quoting zambelli " LSF is designed to be better than your average sharpener. From Didee's description: "LimitedSharpen() applies one out of three different sharpeners (two domain sharpeners or a windowed range sharpener) to the source, but will limit the oversharpening (either 'hard' or 'soft') IF it exceeds a defined overshoot." AFAIK, LanczosResize just sharpens the entire image equally with no consideration for oversharpening. Someone please correct me if I'm wrong. Applying LanczosResize together with LSF is then double sharpening. If that's anyone's goal, why not just tweak LSF to produce that much sharpening in the first place? " Link |
|
|
|
|
|
#494 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
I don't resize using limitedsharpen.
My question is about limitedsharpenfaster with resizing vs LanczosResize sharpening. LanczosResize sharpens. AFAIK. Limitedsharpenfaster sharpens. AFAIK. Ok ? You see ? Now. zambelli thinks LanczosResize resizing and using limitedsharpenfaster is sharpening twice, and the reason to use LanczosResize is to sharpen. If this is the case. Is Limitedsharpenfaster with resizing sufficient sharpening, or do we need LanczosResize sharpening too ? |
|
|
|
|
|
#495 | Link |
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
Lanczosresize is not a sharpener.
Limitedsharpen or limitedsharpenfaster is a sharpener. Limitedsharpen/faster by it's nature, resizes video. Limitedsharpen/faster allows you to select the output resolution after it has processed the video. So limitedsharpen/faster is sharpening and resizing. You might aswell select an output resolution in limitedsharpen/faster and just let it do the final resize rather than resizing with lanczosresize aswell. If you need the video sharper, adjust the settings of limitedsharpen/faster. Trying to sharpen with a plain resizer is useless. Last edited by Audionut; 26th April 2006 at 08:13. |
|
|
|
|
|
#496 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
SetMTMode(2)
MT("HQDN3D(0.0,2,0.0,4)") MT("LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=60,overshoot=7)") That's the script I'm using in ffdshow. It's for using hyperthreading. I can't use dest_x= and dest_y= in limitedsharpenfaster. Using the script I've shown. Is limitedsharpenfaster still resizing And sharpening ? Last edited by Jeremy Duncan; 26th April 2006 at 08:21. |
|
|
|
|
|
#498 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
SetMTMode(2)
MT("HQDN3D(0.0,2,0.0,4)") MT("LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=60,overshoot=7)") This is the script I'm using in ffdshow. It's made for hyperthreading. I tried to run dest_x= and dest_y=. It won't work using this setup. You said Limitedsharpenfaster resizes and sharpens. Does the limitedsharpenfaster script I posted sharpen and resize ? Am I correct in thinking I don't need dest_x= and dest_y= in limitedsharpenfaster for it to resize and sharpen ? |
|
|
|
|
|
#499 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
LanczosResize is an alternative to BicubicResize with high values of c about 0.6 ... 0.75 which produces quite strong sharpening. It usually offers better quality (fewer artifacts) and a sharp image.
Lanczos was created for AviSynth because it retained so much detail, more so even than BicubicResize(x,y,0,0.75). As you might know, the more detail a frame has, the more diffiult it is to compress it. This means that Lanczos is NOT suited for low bitrate video, the various Bicubic flavours are much better for this. If however you have enough bitrate then using Lanczos will give you a better picture, but in general I do not recommend using it for 1 CD rips because the bitrate is usually too low (there are exceptions of course). Link |
|
|
|
|
|
#500 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
LanczosResize is a sharpener.
Is this how it removes artifacts ? If I'm using limitedsharpenfaster. Does this act as a replacement for LanczosResize ? And is LanczosResize a replacement for limitedsharpenfaster ? |
|
|
|
|
|
#501 | Link | ||
|
Registered User
Join Date: Nov 2003
Posts: 1,256
|
Quote:
Quote:
However it's default setting will output video at the same resolution as input. If you would like limitedsharpenfaster to output a different resolution, then you must specify parameters of "dest_x=" & "dest_y=". Last edited by Audionut; 26th April 2006 at 10:11. |
||
|
|
|
|
|
#503 | Link | |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
- limitedsharpenfaster resizes. dest_x= & dest_y= add a option, but limitedsharpenfaster resizes without using dest_x= & dest_y= - LanczosResize retains more detail. Does limitedsharpenfaster resize without dest_x= & dest_y= do the same thing ? - What I'm asking is what does the function of LanczosResize do that limitedsharpenfaster does not ? Last edited by Jeremy Duncan; 26th April 2006 at 10:19. |
|
|
|
|
|
|
#504 | Link |
|
Moderator
![]() Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Hi-
LanczosResize is an alternative to BicubicResize with high values of c about 0.6 ... 0.75 which produces quite strong sharpening. It usually offers better quality (fewer artifacts) and a sharp image. In that quotation of yours from the AviSynth docs, the "produces quite strong sharpening" refers to Bicubic tuned to 0.75. I'll admit that it's confusing and badly worded. It's saying that Lanczos resizes while retaining detail, but without adding artifacts such as Edge Enhancement, that you might get from a strong Bicubic resizing. To answer your question (maybe), if for some reason you're unable to get LimitedSharpen(Faster) to give you your final resolution, I don't see why you can't use LanczosResize to do it for you. It won't sharpen any more, but just retain the detail that's already there. |
|
|
|
|
|
#505 | Link |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Hi.
1.) limitedsharpenfaster resizes. dest_x= & dest_y= add a option, but limitedsharpenfaster resizes without using dest_x= & dest_y= 2.) LanczosResize retains more detail. Does limitedsharpenfaster resize without dest_x= & dest_y= do the same thing ? 3.) What I'm asking is what does the function of LanczosResize do that limitedsharpenfaster does not ? Those were my questions. I'm sorry to ask this directly, but please answer my three questions. I'll probably link to it, and it'll help in general I think. Thank you very much. |
|
|
|
|
|
#507 | Link |
|
Confused
Join Date: Apr 2003
Location: Euroland
Posts: 2,820
|
Nooo, not the "lanczos sharpens" discussion again... -.-
@ Jeremy Duncan I dont really understand your questions, but I think you understood the whole concept of LimitedSharpen wrong!? LanczosResize is a resizer and LimitedSharpen is a sharpener... LimitedSharpen uses a resizer internally (LanczosResize iirc) coz it upsizes the image -> sharpens it (in a tricky way) -> downsizes it... Why the upsizing and downsizing? Because the sharpening step causes aliasing (steppy/pixelated edges) and the interpolation of the downsizing step helps to eliminate this effect! Now, as LimitedSharpen does internal resizing anyway, it offers a option to determine the output resolution (which saves you from using another resizing step afterwards) if you dont wanna keep the original resolution! Bye Last edited by Soulhunter; 26th April 2006 at 16:46. |
|
|
|
|
|
#508 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
MT might not be able to resize within, not sure. Anyway, LSF ends with a lancsozresize call. So if you follow it with another, you end up with 3 lanczosresizes, instead of just two, which leads to some more artifacts.
Oh wait, you use no supersampling, which means they're exactly the same, 1 resize whether you do it inside or outside. It'll look worse, but I assume this is for playback, or else there's no good reason to use no supersampling (always sharpen at the final size, whether you resize before or during LSF, but don't do it after unless you absolutely must). |
|
|
|
|
|
#509 | Link | |
|
Didée Fan
Join Date: Feb 2006
Location: Canada
Posts: 1,079
|
Quote:
|
|
|
|
|
|
|
#510 | Link |
|
Guest
Posts: n/a
|
I'll just add that if people are using MT you cannot use different input and ouput resolutions (via dest_x,dest_y) with limited sharpen faster.
Also in testing I found that running LSF with MT and resizing in ffdshow after (lanczos2) was faster than using dest_x,dest_y to resize without using MT. Cheers, Bitey |
|
|
|
#512 | Link |
|
Guest
Posts: n/a
|
Jeremy,
I can only say what works on my system. Are you sure its your video card letting you down? - it might be your CPU - there isnt really any way of telling unless you can find someone with a similar specced PC that can run it without stuttering. I'd suggest a new thread over on avsforums seeking what hardware people are running stutter free, their settings and the test material - something that most people will have so people are able to test it. It also depends if the material is 16:9 or 2.35:1 - eg. I was testing on LOTR FSOTR EE (smooth) but found a couple of small stutters watching "into the void" which has lots of panning but is 16:9.. Im running a P4@3.44 and a radeon9800 pro (128mb,8x agp) - I can only use overlay to ensure stutter-free playback - vmr9 stutters (I havent tried vmr7 yet - but probably wont bother). Cheers, Bitey |
|
|
|
#514 | Link | |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
Quote:
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
|
#515 | Link | |
|
Super Moderator
![]() Join Date: Nov 2001
Location: Netherlands
Posts: 6,390
|
Quote:
Perhaps that technically you can see ringing as sharpening, but it's an unwanted effect if you want to sharpen your image. http://audio.rightmark.org/lukin/gra...resampling.htm http://bigwww.epfl.ch/publications/thevenaz9901.html (page 8,9) |
|
|
|
|
|
|
#516 | Link |
|
Huh?
Join Date: Sep 2003
Location: Uruguay
Posts: 3,103
|
I see, thanks for the explanation
.
__________________
Read Decomb's readmes and tutorials, the IVTC tutorial and the capture guide in order to learn about combing and how to deal with it. |
|
|
|
|
|
#517 | Link |
|
Registered User
Join Date: Nov 2002
Posts: 220
|
invalid floating point error with smode=4 only
Dear all,
I followed all the discussion threads and run avisynth 2.5.6 with masktools 2.0a28 , removegrain 1.0beta and of course LimitedSharpen Faster (29 october version) I wrote: Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avsi") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_maskTools.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE2.dll") LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=50) IT WORKS PERFECTLY but when I want to use: LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=4,strength=150,soft=34) I have a "invalid floating point error" What should I have to do? Thanks francois |
|
|
|
|
|
#518 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Try soft=34 in the Smode=3 version. If it fails, then I'm almost certain it's removegrain failing, most likely because you don't actually have SSE2. (Other things that might cause the same crash: wide=true, special=true, or edgemode=1 or 2.) Try the basic SSE version. If smode=3 works, then it might be some bizarre error in masktools, but I haven't seen it happen on any of my machines. Hm.
Last edited by foxyshadis; 10th May 2006 at 01:29. |
|
|
|
|
|
#519 | Link |
|
Guest
Posts: n/a
|
All,
Aparently there is a new version of ffdshow out that supports SSE2 and Multithreading. I havent tried myself but Jeremy (whom found and posted a link on avsforums) gave it shot and reports it works better than LSF with MT. http://www.free-codecs.com/FFDShow_download.htm Cheers, Bitey |
|
|
|
#521 | Link |
|
Registered User
Join Date: Dec 2004
Location: Terneuzen, Zeeland, the Netherlands, Europe, Earth, Milky Way,Universe
Posts: 698
|
LimitedSharpenFaster is fixing Histograms, too!
Examples: go to bottom of page http://forum.doom9.org/showthread.php?t=93571&page=5 Can someone explain this? Fred.
__________________
About 8mm film: http://www.super-8.be Film Transfer Tutorial and example clips: https://www.youtube.com/watch?v=W4QBsWXKuV8 More Example clips: http://www.vimeo.com/user678523/videos/sort:newest |
|
|
|
|
|
#522 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Anything that convolves the video will smooth the histogram back out. Try blur, sharpen, mipsmooth, frfun, and so on as well. (Certain filters, like removegrain/degrainmedian, don't average, they just pick one of the existing values. Thus they can never reinterpolate the histogram. Well, DGM does to a very very low extent, which might just be roundoff error.)
|
|
|
|
|
|
#523 | Link |
|
Registered User
Join Date: Apr 2006
Location: Israel
Posts: 148
|
Hello I have High cpu
Suddenly with limitedsharpenfaster, which wasn't before.
I don't know what happened , I used LimitedSharpenFaster lot's of time before. It took less then 50% cpu usage. now it takes 100% and I can't use it no more. I didn't change the script, I'm using removegrain 1.0 beta and the latest masktool (2 I think). I love this function but can't use it no more cause of the high cpu usage. I'd appreciate any help thanks in advance Elad |
|
|
|
|
|
#525 | Link | |
|
Registered User
Join Date: Apr 2006
Location: Israel
Posts: 148
|
Quote:
I also tried remove grain and cpu was low, hqdn3d() cpu is 70% .... only limitedsharpen 100% and I don't know why :-( |
|
|
|
|
|
|
#526 | Link |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
If you didn't know, LS is very CPU intensive as it's a very complex function and not meant for realtime processing though you can do that at times.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
#528 | Link |
|
Registered User
Join Date: Apr 2006
Location: Israel
Posts: 148
|
ok I found the reason!
earlier I used ss_x=1.0,ss_y=1.0 .. However when left the default (1.5) or 2.0 the function uses lanczosresize , which cause the function to take 100% of CPU usage.
Same with lmode=3 and edges=1. So now I know better how the function works and how to configure it, 10x any way for trying to help. Elad |
|
|
|
|
|
#531 | Link | |
|
Confused
Join Date: Apr 2003
Location: Euroland
Posts: 2,820
|
Quote:
It should be "(2*x)*(2*y) = 4x more data" or "2*(x*y) = 2x more data" where limitedsharpen's ss params do the first. Thanks n' Bye Last edited by Soulhunter; 30th May 2006 at 01:42. |
|
|
|
|
|
|
#532 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
LS is only 1.5x SS by default, so it's 2.25x the data.
I've considered adding a "fast=true" or "realtime=true" preset to cut down on some of the processing for people who aren't afflicted with dual cores. But setting supersampling is mostly all that needs to be done.
|
|
|
|
|
|
#533 | Link |
|
Registered User
Join Date: Nov 2002
Posts: 220
|
Dear all,
I recently tested LS which is very good for videoprojector. I switched back and forth from smode=3 to smode=4. My conclusion is that smode=3 looks better than smode=4 Do you share this conclusion? thanks Last edited by fjhdavid; 19th July 2006 at 19:19. |
|
|
|
|
|
#536 | Link |
|
ReMember
Join Date: Nov 2003
Posts: 416
|
Sometimes anything won't help below average or poor source footage. Depending on how soft or sharp or what type of source (video, anime) smode can make a big difference, that is what I meant.
Best way is to do tests to determine what works for you. Which seems to be smode=3. |
|
|
|
|
|
#537 | Link |
|
Registered User
Join Date: Nov 2002
Posts: 220
|
ok, I read all the LS posts and the "soothe function" posts.
I have three questions: With a "soft source" (film record from satellite on DVD and de-interlaced with weave) do I have to use smode=3 or smode=4? Is the "soothe function" designed also for smode=3 (I saw only examples with smode=4) and is it useful or mandatory? What is the filters order betwen "denoise and blurr", "lanczos resise" and "limitedsharpenfaster"? thanks Last edited by fjhdavid; 20th July 2006 at 08:28. |
|
|
|
|
|
#538 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Soothe is actually made for any spatial filter that causes temporal instability, which is mostly sharpeners but a few aggressive smoothers as well. All the modes of LS are affected.
The main difference is that for the same strength, Smode 4 is a more powerful sharpening that also tends to pick up more noise (and thus can look worse on bad video), while softer transitions also aren't sharpened as hard, but overall they're very similar. To make the differences really obvious, try this: Code:
s3=LimitedSharpenFaster(Smode=3,strength=5000) s4=LimitedSharpenFaster(Smode=4,strength=5000) stackvertical(s3,s4) # or interleave() Code:
dn=YourDenoiseFilter() SeeSaw(denoised=dn) Resize() Code:
YourDenoiseFilters() LimitedSharpenFaster(Smode=3,dest_x=720,dest_y=288) Code:
YourDenoiseFilters() Resize() o=last LimitedSharpenFaster(Smode=3) Soothe(last,o) Last edited by foxyshadis; 20th July 2006 at 10:25. |
|
|
|
|
|
#542 | Link | ||
|
Waiter groups leader
Join Date: Jul 2006
Posts: 14
|
Quote:
thanx Quote:
i was jst waiting for 5 days[*sigh* that was long] to finish and here iam
Last edited by RogueSquadron; 26th July 2006 at 10:20. |
||
|
|
|
|
|
#543 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
You don't have to specify every argument, expecially the debugging ones, that's why they're named.
(radius isn't even used for smode 3.) So is the lack of details comparing to LS+undot to undot alone? Or both to neither? Because undot has a habit of killing very fine detail very quickly, especially if your source is very sharp like this. With such a high strength you'll probably notice visible ringing as well, which cuts into detail.Oh, and pick up LSF and try Smode 4, you'll probably notice sharpening at a much lower level. The first post in the thread is rather out of date. *pokes Didée to at least link to the wiki* |
|
|
|
|
|
#544 | Link | |
|
Waiter groups leader
Join Date: Jul 2006
Posts: 14
|
Quote:
.. even with the default settings of lsf i loose a lot of color .. so, wud u mean that i stop using ls+undot an use some other denoiser? |
|
|
|
|
|
|
#546 | Link |
|
Waiter groups leader
Join Date: Jul 2006
Posts: 14
|
something exactly like this ...
http://forum.doom9.org/showpost.php?...5&postcount=59 but then i cudnt figure this out http://forum.doom9.org/showpost.php?...2&postcount=61 Last edited by RogueSquadron; 26th July 2006 at 20:27. |
|
|
|
|
|
#547 | Link | |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Quote:
LimitedSharpen/Faster and SeeSaw both are sharpeners. They aim for enhancing detail, and that's what they're doing. Can't imagine how any loss of detail should be happening there. Also, no discoloration will be produced by these functions. What I noted in your script: - ColorMatrix() is called two times (at beginning & at end). Don't do that. Delete the one at the end of the script. - loss of very fine detail indeed may be caused by undot. Try without undot, to compare. - Perhaps (?) some detail is lost during IVTC by TFM, because of (default) postprocessing? (Unsure about this, as usually I'm not working with telecined sources.) Try the following script, zoom in by 200% or 400% in Vdub, and do forth-and-back-stepping with the arrow keys. This should show you that no detail loss or discoloration is caused by LimitedSharpen. (The same could be done for SeeSaw.) Also you should be able to see the changes that LS is doing with "normal" strength values around ~100 ... 1000 is pretty high. But then, perhaps it's wrong expectations on your side ... LS is not intended for turning a dull source into something !boom!bas!tic! For that, just use "sharpen(1)", or even stronger Unsharp Masking, and live with all the uglyness that comes along with those ... ![]() Code:
DGDecode_mpeg2source("C:\movies\Cste\index.d2v",info=3)
ColorMatrix(hints=true)
tfm().tdecimate()
crop( 6, 54, -6, -60)
LanczosResize(720,304) # Lanczos (Sharp)
base = last
LimitedSharpen( ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height,
\ Smode=3, strength=1000, radius=2,
\ Lmode=1, wide=false, overshoot=1,
\ soft=false, edgemode=0, special=false,
\ exborder=0 )
interleave( base .subtitle("no LS"),
\ last .subtitle("with LS" ) .selectevery(4,0,1)
YlevelS(0,1.1,255,0,255)
return(last)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 26th July 2006 at 11:46. |
|
|
|
|
|
|
#548 | Link |
|
Waiter groups leader
Join Date: Jul 2006
Posts: 14
|
thanx didee, will give it try
![]() edit:- i can see the difference! now[this script is similar to seesaw ] its defnetely a problem with undot.. do u recommend anyother denoiser for little noise thanx Last edited by RogueSquadron; 26th July 2006 at 12:05. |
|
|
|
|
|
#549 | Link |
|
Pig on the wing
Join Date: Mar 2002
Location: Finland
Posts: 5,844
|
Furthermore, ColorMatrix is applied to avoid the color changes when encoding so no need to worry about the change of colors when you load the script in VDub.
__________________
And if the band you're in starts playing different tunes I'll see you on the dark side of the Moon... |
|
|
|
|
|
#550 | Link |
|
Registered User
Join Date: May 2004
Posts: 47
|
After looking at the limitedsharpen page and reading through this thread, I'm still confused. So, some questions:
Should the script be downloaded as a file or should it be copied from the above page? Should it be saved as .avs or .avsi? Does it go in the plugins folder? The warpsharp, removegrain, and masktools downloads contain very many files, some of them in subfolders. What should be done with these? Are all of them to be dumped into the plugins folder? The removegrain documentation actually says not to put all of them in. The page says you need Removegrain 1.0 beta AND Removegrain 0.9. But both contain, for example, a RemoveGrainSSE2.dll -- and it's a different size. In such a case, how do you install both? I'd really like to put only what's needed into the plugins folder. At minimum, what needs to be there? |
|
|
|
|
|
#551 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
The dlls are the main files; all other files are source code for developers, or documentation. The dlls can all be put in the plugins folder safely (although avisynth 2.5.6 and lower has issues with too many files in it). Or you can load them manually; I split them between an auto and non-auto folder because of the old load limit.
As for removegrain, extract the 0.9 dlls and then extract the 1.0 dlls over it - some are missing from 1.0 and kassandro never made a final zip. I guess I should make that page clearer. You'll only need one of each, pick whatever your CPU is capable of. The only difference saving the script as an avsi makes is that if it's in the plugin folder you won't have to add an Import("...") to each script that uses it. Pretty useful. |
|
|
|
|
|
#555 | Link |
|
Registered User
Join Date: May 2004
Posts: 94
|
What I read from Socio is that he was resizing after applying LimitedSharpen, and that his source is not 720p.
But maybe I wrong, I'll check and ask him... Yes, I could encode with LimitedSharpen, but I prefer to encode with as less filters as possible in order to have a better choice during playback. PS: Daodan, I get around 20-22fps, so not that far from the 24fps I should get... |
|
|
|
|
|
#556 | Link | |
|
Registered User
Join Date: May 2004
Posts: 47
|
Quote:
warpsharp.dll - avsfilter.dll - SSE2Tools.dll - DenoiseSharpen.dll -RemoveGrainSSE2.dll - RepairSSE2.dll - RSharpenSSE2.dll - MaskTools.dll - LimitedSupport_09Jan06B.dll but when I try to run the main script I get errors. With LimitedSharpenFaster.avs, it said "there is no function named LimitedSharpenFaster" With the .avsi extension, the error is, "there is no function named 'mt_edge.'" In earlier posts others were having the same mt_edge issue but seemed to solve it by getting a newer avisynth, but I had just upgraded to 2.56. This is the script I'm using: DirectShowSource("E:\Capture\capture\mscl test.mpg") Letterbox(4,0) ConvertToYUY2() PeachSmoother() ConvertToYV12() LimitedSharpenFaster(2) Last edited by pojke; 27th July 2006 at 23:46. |
|
|
|
|
|
|
#559 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Does it work in virtualdub? CCE requires a ConvertToYUY2 at the end, iirc, but that might not be it. If not, at least vdub should give you a useful error.
The newer wiki entry also has better explanations on usage, once you get it working. |
|
|
|
|
|
#560 | Link |
|
Registered User
Join Date: May 2004
Posts: 47
|
I can open the .avs in virtualdub and play or scroll through the clip, but if F5 is pressed in the script editor, it crashes.
I then tried putting a ConvertToYUY2() after limitedsharpen, but it still crashes CCE. And after an F5 in virtualdub, it doesn't crash, but exhibits very strange behavior when playing it -- video seems stuck in a loop where several frames are repeated. |
|
|
|
|
|
#562 | Link |
|
Registered User
Join Date: May 2004
Posts: 47
|
I'm not sure I did it correctly, but I tried the DGIndex method and got an error when opening in virtualdub: "MPEG2Source: couldn't open source file, or obsolete D2V file"
Yes, when LimitedSharpenFaster() was removed, it encoded normally. Because of that, I don't think DirectShowSource is the problem here. I probably should have concluded that about the YUY2 possibility too. As long as LimitedSharpenFaster() was removed, it worked fine even without converting to YUY2. |
|
|
|
|
|
#563 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
DirectShowSource is the least stable part of avisynth; while such an interaction is weird, it's not improbable. The error means that you have a different version of DGIndex vs DGDecode, they always have to be the same. (That's why they're packaged together.)
|
|
|
|
|
|
#564 | Link |
|
Registered User
Join Date: May 2004
Posts: 47
|
It works!
At least on the 24-sec test clip with the following script: LoadPlugin("C:\Program Files\AviSynth 2.5\old plugins\LoadPluginEx.dll") LoadPlugin("C:\Program Files\AviSynth 2.5\old plugins\DustV5.dll") Mpeg2Source("E:\Capture\capture\mscl test.d2v") Letterbox(4,0) ConvertToYUY2() PixieDust(2) ConvertToYV12() LimitedSharpenFaster(2) I downloaded the newest DGIndex and the .dll and CCE accepts it without issue. So it looks like DirectShowSource was the culprit. And strangely, it looks great on the above source, which DGIndex says is interlaced. I thought the fields had to be separated but apparently not. Thanks for all the help.
|
|
|
|
|
|
#565 | Link |
|
Registered User
Join Date: Jul 2006
Posts: 16
|
I get a weird error using this with RemoveNoiseMC's lq_filter. The script runs, but the output is messed up. Sometimes the top half of the frame is tinted green and the bottom half is greyscale, and sometimes the chroma and luma don't match up. The latter looks a little like something that sometimes happened with Soothe, when it was possible for the two used clips to have different resolutions.
SeeSaw seems to be the key to the problem -- commenting out lq_filter but leaving the 'import SeeSaw' line active results in the output of what I think might be the LimitedSharpen mask. I'm not sure which thread it should go in, but since it's LimitedSharpen that's having problems I'll put it here. |
|
|
|
|
|
#567 | Link | |
|
Registered User
Join Date: Jul 2006
Posts: 16
|
Quote:
*edit* Hmm, still isn't working. Come to think of it, that can't be the mask. Pic. *edit again* I copied the version of LimitedSharpen off the very first page of the thread and that works fine. *and again...* And now it doesn't, even though all I changed was some parameters on another filter. I now have no idea what is going on. *one last time* I copied everything over to a new avs file and resolved the dependencies as they came up, and I also changed a couple of the lines in RemoveNoiseMC.avs (changed xxxx.dll to xxxxS.dll). The new script no longer requires the 'import SeeSaw' line, and runs smoothly from beginning to end. So everything is fine now, although I still don't know much about the exact problem or its solution. Last edited by Melanchthon; 30th July 2006 at 01:04. |
|
|
|
|
|
|
#568 | Link |
|
Registered User
Join Date: Aug 2005
Posts: 213
|
Sorry for the stupid Q but if I am reading right, limited sharpen is not for live dvd playback but dvd backsups that are already deinterlaced? If that is so then that could be the reason I get those weird artifacts (line warp?). Can you please direct me to a guide on how to deinterlace a dvd? Ive been reading around but avisynth is a very complex beast indeed.
Thanks for your help. PS BTW, I use a 7900GTX and Theater Tek 2.3 running ffdshow of course and to be honest I dont really see any interlaced issues...perhaps TT takes care of it? |
|
|
|
|
|
#570 | Link | ||
|
Registered User
Join Date: May 2006
Posts: 1
|
Quote:
Quote:
Last edited by ben8778; 1st August 2006 at 04:51. |
||
|
|
|
|
|
#571 | Link |
|
Registered User
Join Date: Aug 2005
Posts: 213
|
I can use Limited Sharpen real time as long as I use x and y 1.0 instead of the normal 1.5x. Still, the artifacts are annoying. I am sure I am doing something wrong. BTW, according to TheaterTek info screen when the movie starts the Title screen shows is a 29.xx fps but when the actual movie starts it shows 23.9xxx so I assume that TheaterTek is actually taking care of the ivtc right? If that is so then I shouldnt have issues with LS.
|
|
|
|
|
|
#572 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
It depends on where the ivtc in applied in relation to the sharpening. If you're loading a script with the source and LSF applied in it, you're doing it pre-ivtc and it won't work. I have no idea how theatertek works, so I can't really help.
You'd better really like sharpness over dct artfacts though, because LS brings them all right into focus. |
|
|
|
|
|
#574 | Link | |
|
Registered User
Join Date: Apr 2005
Posts: 1,339
|
Quote:
Again - why frustrate yourselves trying to add LimitedSharpen in realtime playback ? Just because you can doesn't always mean you should. You're going to spend the whole time keeping your fingers crossed that you don't stutter out during a complicated scene. |
|
|
|
|
|
|
#576 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
With the Merom, I resize by spline up to 800x600, use Levels, DegrainMedian, LSF, Warpsharp, and Deband, and get 80% usage with D1-sized AVC video.
Obviously I really like my sharpness, after years of fuzziness, I guess he might too.See, but once you start doing that you start noticing how terrible your old encodes are, and start wishing you had the power to run mvdegrain or frfun7 in realtime. Now that would be quite a trick. |
|
|
|
|
|
#577 | Link | |
|
Registered User
Join Date: Aug 2005
Posts: 213
|
Quote:
|
|
|
|
|
|
|
#578 | Link |
|
Registered User
Join Date: Nov 2005
Location: California
Posts: 81
|
Hi all! I've been using AviSynth for awhile now for cleaning up and adjusting avi and mpeg sources for archiving (mostly asian drama series that I subtitle) I'm far from an expert with Avisynth, but I'm somewhat proficient for general stuff.
This function is one I've long wanted to try out, as a huge problem of mine has been sharpening vid without adding a grainy or halo effect. After going through the 29 pages of this thread, I'm more confused than ever about which dll versions, script, etc. go together. Is there already or could someone list the requirements for limitedsharpen and limitedsharpenfaster? The ones in the first post seem to be outdated, and the ones further in the thread don't seem to be organized in any way I can understand. I appreciate any help anyone is willing to offer!! |
|
|
|
|
|
#580 | Link | |
|
Registered User
Join Date: Aug 2005
Posts: 213
|
Quote:
|
|
|
|
|
|
|
#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. |
|
|
|
|
|
#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.
|
|
|
|
|
|
#583 | Link |
|
Registered User
Join Date: Aug 2005
Posts: 213
|
Check here for the same problem and solution;
http://forum.doom9.org/showthread.ph...255#post794255 |
|
|
|
|
|
#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.
|
|
|
|
|
|
#586 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
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). |
|
|
|
|
|
#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? |
|
|
|
|
|
#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. |
|
|
|
|
|
#590 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
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).
|
|
|
|
|
|
#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. |
|
|
|
|
|
#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 ;-)
|
|
|
|
|
|
#595 | Link | |
|
Registered User
Join Date: Dec 2006
Location: Heidelberg (DE), Kraków (PL)
Posts: 519
|
Quote:
It gave me sort of brightening, yet such a description is rather simplistic. 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."
|
|
|
|
|
|
|
#597 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
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
|
|
|
|
|
|
#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. |
|
|
|
|
|
#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. |
|
|
|
|
|
#604 | Link |
|
Registered User
Join Date: Apr 2007
Posts: 1
|
1st script
Code:
LoadPlugin("F:\encode.filters.take1\MaskTools.dll")
LoadPlugin("F:\encode.filters.take1\TIVTC.dll")
LoadPlugin("F:\encode.filters.take1\TDeint.dll")
LoadPlugin("F:\encode.filters.take1\DegrainMedian.dll")
LoadPlugin("F:\encode.filters.take1\ColorMatrix.dll")
LoadPlugin("F:\encode.filters.take1\TomsMoComp.dll")
LoadPlugin("F:\encode.filters.take1\RemoveGrainSSE2.dll")
LoadPlugin("F:\encode.filters.take1\DGDecode.dll")
#see saw BEGIN
LoadPlugin("F:\encode.filters.take1\SeeSaw\MaskTools-v1.5.8\MaskTools.dll")
LoadPlugin("F:\encode.filters.take1\SeeSaw\DenoiseSharpen.dll")
LoadPlugin("F:\encode.filters.take1\SeeSaw\RepairSSE2.dll")
LoadPlugin("F:\encode.filters.take1\SeeSaw\RSharpenSSE2.dll")
#see saw END
Import("F:\encode.filters.take1\LimitedSharpenFaster.avsi")
Import("F:\encode.filters.take1\Soothe.avsi")
Import("F:\encode.filters.take1\SeeSaw\SeeSaw_2006.01.02\SeeSaw.avs")
# SOURCE
MPEG2Source("E:\Kelly Clarkson-Behind These Hazel Eyes (MV) 1080i-CtrlHD.d2v")
# IVTC TIVTC
tfm().tdecimate()
TDeint( mode = 2 ).DeGrainMedian( mode = 1, interlaced = false ).DeGrainMedian( mode = 0, interlaced = false )
ColorMatrix( )
LanczosResize( 1280, 720 )
LimitedSharpenFaster( dest_x = last.width, dest_y = last.height, Smode = 3, strength = 250, radius = 2, Lmode = 1, wide = false, overshoot = 1 )
![]() The Result with lsf() ![]() What can I do to make it more sharper? I've tried applying lsf().lsf() but the result is fuzzy Last edited by esix; 29th April 2007 at 07:47. |
|
|
|
|
|
#605 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
What's up? Your source comes along as High Definition, which is advertised as "crystal clear", "real as life", and whatnotever ... so it's already in the best possible quality! Why do you want to sharpen up such a brilliant source?
![]() Well ... Turning such fuzzy sources into "beautifully sharp" ones is difficult. And requires a lot of fiddling-around. And sometimes it just won't. Chaining multiple instances of LimitedSharped is one possibility to try. If doing so, try to: - start with UnsharpMasking (Smode=1) /w some bigger radius - follow with UnsharpMasking /w smaller radius - end up with 3x3-kernel sharpening (Smode=2/3/4) - - for all instances: - - do use the "soft=xx" parameter (!) , and/or reduce the strength for each instance Basic example: source LSF(ss_x=1.0, Smode=1, Lmode=3, radius=4, strength=160, soft=100) LSF(ss_x=1.0, Smode=1, Lmode=1, radius=2, strength=96, soft=75) LSF(ss_x=1.5, Smode=3, Lmode=1 strength=150, soft=75) LSF(ss_x=1.0, Smode=3, Lmode=1 strength=51, soft=51) The values for strength/soft are from the guts and may be quite off, you have to tweak them around. Eventually, it's benefitial to add "edgmode=1" to some of the inner or later instances ... BTW, this kind of "multi-radius-sharpening" is what iiP() actually is doing, which could also be worth a try. No promise that this route of processing will work out. Fiddling is what is needed, and perhaps another way than this one would be better. Compare also this thread - Chainmax is fighting a similar case. Kind of, at least.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 2nd May 2007 at 13:03. |
|
|
|
|
|
#607 | Link |
|
Registered User
Join Date: May 2006
Posts: 957
|
Go to the edit tab of the AviSynth Script Creator of MeGUI (or use a text editor) and then Import the LSF script and use it where you want. Or do you need to know how to use it?
Import("X:\Path\to\LSF script\LimitedSharpenFaster.avs") LimitedSharpenFaster()
__________________
x264 log explained || x264 deblocking how-to preset -> tune -> user set options -> fast first pass -> profile -> level Doom10 - Of course it's better, it's one more. |
|
|
|
|
|
#608 | Link |
|
Registered User
Join Date: Jun 2007
Posts: 33
|
Another great program (
Didée), but I keep getting an error when I close the progam using any script containing LSF:(program).exe Application Error - The Instruction at "0x39797a8" referenced memory at "0x011eb40". The memory could not be "read". (see attached jpg) If I take LSF out of my script - the problem disappears. It doesn't matter whether it's AsvP, VD, VDMod, HCenc or Media Player Classic. I always get the same error when closing the program. Didée or anyone else, please help. My vidoes just don't look as good without LSF. I tried seesaw & got a similar error (The Instruction at "0x10097a8" referenced memory at "0x018a3b08". The memory could not be "read".) I then unistalled & re-installed avisynth (latest ver.) along with all the external plugins, but that didn't fix the problem. FYI - I running XP home SP2 w/ an AMD Athlon X2 AM2 & 1GB of ram. Thanks Last edited by shadowhaze; 10th July 2007 at 03:57. Reason: attach jpg |
|
|
|
|
|
#610 | Link | |
|
Registered User
Join Date: Jun 2007
Posts: 33
|
Quote:
![]() ![]() This is so incredibly frustrating. I've got a ton of stuff I'd like to transfer to DVD.While I didn't delete the file, I did remove it out of the AviSynth folder altogether & put it in a plugin back up folder in my doc. What did you do exactly? How did you figure out it was aWarpSharp.dll? Should I uninstall/reinstall avisynth & the plugins again? At this point, I thinking of removing every plugin one by one (I've got alot) I keep testing. Thanks again for your help and let me know if you have any other ideas or if I missed this somehere in the thread or forum (I've got the same problem w/ seesaw). |
|
|
|
|
|
|
#611 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Hmh. Do you load any "SSE3" DLLs (RemoveGrainSSE3.dll, RepairSSE3.dll), or have those merely present in the plugins folder? If so, remove those DLLs completely, and use the "SSE2" variants.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#612 | Link | |
|
Registered User
Join Date: Jun 2007
Posts: 33
|
Quote:
THANK YOU!!! Everything works perfectly now. I never would have figured that out. All of my RemoveGrain dlls were SSE3. I deleted all of them, downloaded v0.9 & 1.0 again, and inserted only SSE2 dlls I'm sure my processor can do SSE3 instructions (confirmed by CPU-Z) so I don't understand why that causes a problem, but right now I don't care. It works! Now I just have to work on using seesaw, compare to LSF, and spend the next few weeks converting all my avi files to DVD.
|
|
|
|
|
|
|
#613 | Link | |
|
Registered User
Join Date: Jun 2002
Location: Greece
Posts: 242
|
From http://avisynth.org/mediawiki/LimitedSharpen
Quote:
A litle explain what it does the Lmode?
__________________
Greece PAL User... |
|
|
|
|
|
|
#615 | Link |
|
Registered User
Join Date: Jun 2002
Location: Greece
Posts: 242
|
Inside the script there are only Lmode==1 and Lmode==3.
Also the script from the wiki (http://avisynth.org/mediawiki/LimitedSharpen) for the LSF (http://avisynth.org/mediawiki/upload...rpenFaster.avs) is wrong in lines 52 and 53. The wrong lines: xxs=m(8,ox*ss_x) yys=m(8,oy*ss_y) The right lines: xxs=round(ox*ss_x/8)*8 yys=round(oy*ss_y/8)*8
__________________
Greece PAL User... |
|
|
|
|
|
#617 | Link |
|
Registered User
Join Date: Jun 2002
Location: Greece
Posts: 242
|
Thank you foxyshadis for the reply, but the script (LSF) from the wiki give me error on line 52. I don't find m() function.
The script (LSF) from masktools-v2.0a30.zip run fine. Another thing that i notice, you use spline36resize not Lanczos but its ok for me.
__________________
Greece PAL User... |
|
|
|
|
|
#618 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
foxy: when using selfmade brownies like your modulo-function, you should also put them on the Wiki page (or include them in the script).
When an artless user just gets LSF & the needed plugins as stated, s/he is left up with a "there is no function named "m"" error ... and searching for "m()" might become an effort.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#619 | Link | ||
|
Registered User
Join Date: Jun 2002
Location: Greece
Posts: 242
|
From first page: (Thanks Didee)
Quote:
On the wiki: Quote:
__________________
Greece PAL User... |
||
|
|
|
|
|
#620 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Didn't I? ....oops. That was supposed to be at the end of the filter. Sorry about that.
Good call on the better explanation of sharpening. Last edited by foxyshadis; 15th July 2007 at 00:53. |
|
|
|
|
|
#622 | Link |
|
Guest
Posts: n/a
|
I have not read all 32 pages, but I'm using FFdshow and would also like to use LimitedSharpen, but can anyone please paste a quick guide with the needed plugins and the latest settings so I can get a good picture
![]() I have Core 2 Duo E6600 2.4 GHz with GForce 7600. Any help would really be appreciated. |
|
|
|
#623 | Link |
|
Learning
Join Date: Nov 2006
Location: Earth
Posts: 88
|
query concerning LimitedSupport_09Jan06B.dll
I get a MeGUI error (cf. attachment). It occurs only when I open megui 1st time- not later (i.e., no such error if i close that d2v file and open another one without closing megui). I'm just wondering has it got something to do with the .dll file itself.
Following this, i got a file called LimitedSupport_09Jan06B.dll (just 297 bytes). Did i get the file properly. I'm aksing because if i click the link, it says that I don't have permission to access- but when i select 'save link as' i get that small .dll file. My question: is this affectng the encode in anyway when I'm using LSF and Soothe (, both or LSF only)? I'm using the followings (not exactly as suggested on avisynth.org): Removegrain 1.0: from Wittmann's Masktools2: alpha 31(stable) ---- from Manao's site, Warpsharp [if using Smode=1]: same as avisynth.org LimitedSupport: same link as avisynth.org <-- No LONGER NEEDED Updated LSF.avsi: which comes with masktools2 Soothe.avsi: this one Thanks for your time
Last edited by salehin; 23rd October 2007 at 23:44. Reason: clarification |
|
|
|
|
|
#624 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
The "dll" you saved is really just an html error page. You can open it in notepad to see.
You should delete it anyway, there's no need for it now that all the functions in it are part of masktools2.
|
|
|
|
|
|
#626 | Link | |
|
Registered User
Join Date: Mar 2005
Posts: 450
|
@Didee
It was from sometime i was wondering what smode=4 would do and what was its principle. I read on avisynth wiki that Quote:
In other words what is the curve results of this mode? Thanks |
|
|
|
|
|
|
#627 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#628 | Link |
|
Registered User
Join Date: Mar 2005
Posts: 450
|
If i've understood right the graph, comparing with that on first page, it's a more anticipated Lmode=1 but with an overall loss of brightness on the edges?
If not, can you do a graph like that on first page? Thanks |
|
|
|
|
|
#629 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
You cannot compare ^that graph to the one on page 1. There's no relation to Lmode. Those two graphs show two different kind of things.
The graph on page 1 shows how the *limiting* works, i.e. how a pixel is treated once it has been sharpened. The graph above shows how the *sharpening* of Smode=4 works. Blue is "linear" sharpening, i.e. if the sharpener calculated a change of x for a pixel, then the pixel is changed by x. Smode=4 (pink) uses a gamma function to modify the calculated change. It's the very same principle as used in SeeSaw, only that there are no parameters for Spower/SdampLo (LimitedSharpen /w Smode=4 uses fixed values), and SdampHi is not used at all. For Smode=4: if the blurring kernel yielded a change of 'x' for the current pixel, then the change that will be applied is: Code:
16 * sqrt(|x/16|) * (x^2 / (x^2 +4)) * (-sign(x)) | (for strength=100)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 28th November 2007 at 01:26. Reason: corrected formula (missed one pair of parentheses) |
|
|
|
|
|
#630 | Link |
|
Registered User
Join Date: Nov 2006
Posts: 83
|
Hi,
i can't sleep, so i'll use this time to ask a question. First i want to say thanks for all your fine scripts Didée, especially this one! I use Limitedsharpenfaster mostly for downsizing 1080(i/p) stuff and found it more pleasing to replace Lanczos4resize with Spline36resize. With the new introduced Blackmanresize and Spline64resize resizers in Avisynth 2.5.8 i wanted to do some tests, but it's really annoying to fiddle around with multiple versions of this script. My question is now, if somebody could show me how to exchange the Lanczos4resize calls used in the script with variables, so i can do some more testing, the first upsizing call should have a different parameter than the other three downsizing calls. If no parameter is given for the two different resizers, there should be a default. It should be usable like this (for example): Code:
Limitedsharpenfaster(upsize=blackman, downsize=spline64, strength=50) McCauley Last edited by McCauley; 4th November 2007 at 12:32. |
|
|
|
|
|
#631 | Link |
|
Angel of Night
![]() Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,549
|
Replace the resizes by:
last.eval(upsize + "resize(" + string(xxs) + "," + string(xxy) + ")" similar for the downsize. If you want to play with the b/c in bicubic or the taps in lanczos, replace them by a call to a function which will perform the proper resize based on the name, instead. It should be pretty obvious how to add new parameters with all of them up at the top, just add two more. |
|
|
|
|
|
#632 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Code:
Function Resize( clip c,
\ int target_width, int target_height,
\ float "src_left", float "src_top",
\ float "src_width", float "src_height",
\ string "type",
\ float "b", float "c", int "taps", int "p" )
{
... some script code is missing here ...
}
![]() Order of parameters is arguable, too. Full compliancy to the original resizer calls is hardly possible with such an all-in-one thingy, anyway. (Specifying parameters unnamed -> bicubic's b/c parameters, etc.)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#633 | Link | |
|
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,424
|
Quote:
That way you could use whatever you want for resizing by defining the function appropriately.
__________________
now playing: [artist] - [track] ([album]) |
|
|
|
|
|
|
#634 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Possible, but I already see the rookies whining why it doesn't work out of the box. Means that LS would have to define a default function, which the user has to override. Which requires that user's function is declared after LS has been imported -> next pitfall.
Perhaps better: the user has to manually supply an upsampled clip, which then is used for supersampled operations. Only if no upsampled clip is provided, LS upsamples internally.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#635 | Link |
|
Registered User
Join Date: Jan 2008
Posts: 5
|
Hi friends this my first message on Doom9
@Didée First thanks for LSF&SeeSaw This is my script Code:
LoadPlugin("C:\Program Files\GordianKnot\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
import("c:\Program Files\AviSynth 2.5\plugins\blinddehalo2.avs")
import("c:\Program Files\AviSynth 2.5\plugins\Soothe.avs")
import("c:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\RemoveGrainS.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\repairS.dll")
LoadPlugin("c:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll")
mpeg2source("D:\TERMINATOR\audio\VTS_01_1.d2v")
crop(2,12,716,552)
LanczosResize(720,384)
DeGrainMedian(limitY=6,limitUV=6,mode=4)
dull= last
sharp= dull.limitedsharpenfaster(ss_x=2.0,ss_y=2.0,Smode=4,strength=140)
Soothe( sharp, dull, 50 )
Convolution3d("movieHq")
Undot()
blinddehalo2(2.0,2.0,105)
If I should change my script what's your advice? |
|
|
|
|
|
#636 | Link |
|
Registered User
Join Date: Jun 2002
Location: Greece
Posts: 242
|
Try this order:
blinddehalo2(2.0,2.0,105) Undot() DeGrainMedian(limitY=6,limitUV=6,mode=4) Convolution3d("movieHq") dull= last sharp= dull.limitedsharpenfaster(ss_x=2.0,ss_y=2.0,Smode=4,strength=140) Soothe( sharp, dull, 50 )
__________________
Greece PAL User... |
|
|
|
|
|
#638 | Link |
|
Kid for Today
Join Date: Aug 2004
Posts: 1,982
|
hi there,
I'm using the spline36 version of LSF in ffdshow, but the higher I set the SetMemoryMax, the more LSF sucks up ![]() is there any point to go over 512MB(the default option) ? like if I allocate 1300MB, does it do anything better/faster ? it doesn't stutter at 512MB, though. |
|
|
|
|
|
#639 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
The more you specify, the more will be used by Avisynth for internal buffering/caching ... it's not LSF that "sucks up" the memory, it's Avisynth that starts to use all memory that you did allow to use, via SetMemMax.
Memory requirements of LSF are rather little ... with SD PAL input, it runs at "full speed" for me with sth like SetMemoryMax(16), and possibly even less than that.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#640 | Link |
|
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
Hi all!
Advice parameter set for sharpening VHS analog capture movie (not anime). My source progressive and I use MVDegrain3 for denoising and image seeing little blury. Which kind mode prefer for this source 3 or 4? With kind regards yup. |
|
|
|
|
|
#641 | Link |
|
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
Hi all one more!
Very difficult question? I try Code:
dull = last sharp = dull.LimitedSharpenFaster(ss_x=3.0,ss_y=3.0,Smode=3,strength=100,wide=true) Soothe( sharp, dull, 20 ) What I made wrong? May be better way using TempGaussMC as postprocess instead Soothe? yup. |
|
|
|
|
|
#643 | Link | |
|
Registered User
Join Date: Feb 2003
Location: Russia, Moscow
Posts: 854
|
foxyshadis!
![]() I read at first post this thread: Quote:
One more ![]() yup. |
|
|
|
|
|
|
#645 | Link | |
|
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,424
|
Quote:
(You did use a value between 0 and 100 for it, didn't you?) np: Sigur Rós - Andvari (Takk...)
__________________
now playing: [artist] - [track] ([album]) |
|
|
|
|
|
|
#646 | Link |
|
Guest
Posts: n/a
|
Here is the script, I was trying to do simple test. I may doing something wrong but i don't know what i'm doing wrong.
MPEG2Source("C:\Documents and Settings\R4Z3R\My Documents\Rips\test.d2v", cpu=0) Crop(10, 0, -8, -0) LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height, Smode=3, strength=100, radius=2, Lmode=1, wide=false, overshoot=1, soft=false, edgemode=0, special=false, exborder=0) Tweak(hue=5.0, sat=0.7, bright=0, cont=1.2) LanczosResize(416, 320) |
|
|
|
#649 | Link | |
|
ffdshow/AviSynth wrangler
Join Date: Feb 2003
Location: Austria
Posts: 2,424
|
Quote:
np: Butcher The Bar - Get Away (Sleep At Your Own Speed)
__________________
now playing: [artist] - [track] ([album]) |
|
|
|
|
|
|
#650 | Link | |
|
н∂-ƒαиαтι¢
Join Date: May 2006
Location: Bedfordshire, UK
Posts: 1,005
|
Quote:
btw, Leak has pointed it out for you above where you went wrong. MPEG2Source("C:\Documents and Settings\R4Z3R\My Documents\Rips\test.d2v", cpu=0) Crop(10, 0, -8, -0) LimitedSharpenFaster(ss_x=1.5, ss_y=1.5, dest_x=last.width, dest_y=last.height, Smode=3, strength=100, radius=2, Lmode=1, wide=false, overshoot=1, soft=0, edgemode=0, special=false, exborder=0) Tweak(hue=5.0, sat=0.7, bright=0, cont=1.2) LanczosResize(416, 320) |
|
|
|
|
|
|
#651 | Link |
|
Registered User
Join Date: Aug 2007
Location: Italy
Posts: 286
|
I suppose that's the default line inserted by AvsP
![]() The preset (which you should be able to change, even if I just don't recollect how to) relates to an older version of LSF, where "soft" was a boolean
|
|
|
|
|
|
#652 | Link |
|
Registered User
Join Date: Sep 2006
Posts: 108
|
Hi, I'm new to the whole avisynth thing. I am just using AviSynth 2.58 in conjunction with newest ffdshow-tryouts & Zoom Player 7 Max in order to sharpen up any vids I watch. I was using a Dscaler sharpening filter but I find using LimitedSharpenFaster gives me a better picture on my projector. So am using these settings: LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=100,wide=true) but I find Zoom Player using so much more ram than before, up to 512Mb which seems a bit much. How can I limit LimitedSharpenFaster and Zoom Player from using so much ram? Would like to get it down to no more than 128Mb if possible. I tried putting
SetMemoryMax(128) LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=100,wide=true) in ffdshow but that had no effect on ram usage. Thanks for any guidance for this noob, bkm Edit: Made a new thread for this question as it seems this one is dead... Last edited by andybkma; 3rd October 2009 at 04:50. |
|
|
|
|
|
#653 | Link | |
|
Registered User
Join Date: Jun 2009
Posts: 13
|
LSF + Motion Flow script
Hi there,
my question is very simple: Can we use together LSF + this motion flow script ? Quote:
http://www.mediafire.com/?o1dccmm1l1t The same thing happens when I've to install LSF. So my question is: Is there a avisynth.dll that goes right for LSF and Motionflow script together? Thank you, actarus. |
|
|
|
|
|
|
#654 | Link | |
|
nvidia user
Join Date: Sep 2010
Location: Russia, Abakan
Posts: 79
|
Hi!
I have a small question: In order to make XXXResize(width*4, height*4) need to use ss_x=4.0, ss_y=4.0? (values of 4.0 give "width*4, height*4"?) Of course, I read the first post (this and made me ask a question) Quote:
![]() p/s: nice script, it's fast
|
|
|
|
|
|
|
#655 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
> In order to make XXXResize(width*4, height*4) need to use ss_x=4.0, ss_y=4.0?
Yes. The example was in reference to the old SSXSharpen script. 2*supersampled LimitedSharpen looks pretty much the same like 4*supersampled SSXSharpen, but runs much faster. With 4*supersampled LimitedSharpen/Faster you'll get only very weak sharpening. The limiting neighborhood simply becomes too small with such big oversampling factors.
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#657 | Link |
|
Registered User
Join Date: Nov 2006
Posts: 781
|
I'm testing Limitedsharpen currently and i have an issue it put the levels to 0-255, is there a parameter i am missing or it's a normal behaviour ?
the coding part: LimitedSharpenFaster(ss_x=1.5,ss_y=1.5,Smode=4,strength=100,soft=-1,edgemode=1,wide=false) |
|
|
|
|
|
#659 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Well ... take a clip that's strictly [16,235], make
lanczosresize(2*width,2*height).lanczosresize(width,height) , see that the result does not obey TV levels anymore, and start wondering why a simple resize behaves like that. Another one: You have a TV levels clip that's strictly [16,235]. - there is a black line (Y=16) on a very dark background (Y=20). - You perform LSF. What do you expect to happen? Sharpening makes the Y=16-line darker. Disallowing that, you basically can not sharpen that line at all. Making instead the neighborhood brighter means to create halos around the line. That's not good either. So, what to do? Dilemma! (The "special=true/false" switch of older LimitedSharpen versions was loosely related to this problem, but using special=true created .... ugly halos.)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#660 | Link |
|
Registered User
Join Date: Nov 2006
Posts: 781
|
Ok well the author should add in the title "not suited for dvd's and blu rays at all " this way that'll not mislead nobody.
I expect an option to limit the range at the very least but if you say it produce halo's then this filter is useless either ways. |
|
|
|
|
|
#661 | Link |
|
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,407
|
Oh, "not suited" and "useless"? I don't know what you are smoking, but you can always do
LSF().Limiter()
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) |
|
|
|
|
|
#662 | Link |
|
Registered User
Join Date: Feb 2004
Location: USA
Posts: 1,348
|
Pushing small features outside of the limited range is harmless, which is why nobody worries about it. Range limitations are only an issue for frame wide contrast and such, as truncation of global contrast is harmful. Truncation of post sharpening deviations, whether explicitly or by the playback device is only harmful if you want to try to deconvolve the sharpening away later, in which case you shouldn't be sharpening anyway....
|
|
|
|
|
|
#663 | Link |
|
Registered User
Join Date: Sep 2005
Posts: 181
|
Has anyone edited this filter to support high bit depth? If so, could you share it?
Otherwise I may do so myself as I'm in need of a sharpener with support for it, and this was one of my favorite sharpeners when I last used it. |
|
|
|
|
|
#664 | Link | |
|
Registered User
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,758
|
Quote:
__________________
See My Avisynth Stuff |
|
|
|
|
|
|
#666 | Link |
|
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,498
|
Last post was 6 Dec 2015, Didee profile does not list last on-line date, some profiles do, some dont, dont know why (maybe governed by some privacy setting).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
|
|
|
|
#667 | Link |
|
None
Join Date: Jul 2007
Location: The Background
Posts: 329
|
On AviSynth's page for LimitedSharpen, there is an incorrect default value written for the "radius" parameter.
It is incorrectly written that the default value for the radius parameter is "radius=1", when it should be "radius=2". http://avisynth.nl/index.php/LimitedSharpen Could anyone edit this page and write the correct value? |
|
|
|
|
|
#668 | Link | |
|
Broadcast Encoder
Join Date: Nov 2013
Location: Chelsea, UK
Posts: 3,419
|
Quote:
Code:
radius = default( radius, 2 )
|
|
|
|
|
![]() |
|
|