View Full Version : New Sharpening Function from Didée -'SeeSaw'
Pookie
27th December 2005, 18:47
Per the file - " This function provides a (simple) implementation of the "crystality sharpen" principle. In conjunction with a user-specified denoised clip, the aim is to enhance weak detail, hopefully without oversharpening or creating jaggies on strong detail, and produce a result that is temporally stable without detail shimmering, while keeping everything within reasonable bitrate requirements. This is done by intermixing source, denoised source and a modified sharpening process, in a seesaw-like manner "
More of a detail enhancer than a regular sharpener. Also lets you really turn up the denoising without the typical ringing and haloing. I've had very nice results using DegrainMedian as the function's denoiser. VagueDenoiser also seems to work well.
Requirements -
http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar
http://manao4.free.fr/MaskTools-v1.5.8.zip
http://home.arcor.de/dhanselmann/_stuff/SeeSaw_2006.01.02.rar
Call it from your script like this:
a= last
b=a.yourfavoritedenoiser()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Several additional parameters documented in the SeeSaw.avs file.
Good Stuff, Didée. Thanks.
(Examples)
Original
http://img506.imageshack.us/img506/806/4769fn.png (http://imageshack.us)
SeeSaw
http://img506.imageshack.us/img506/6889/476s1gc.png (http://imageshack.us)
6MB XVID Example ftp://tempclips%40avisynth.org:QfJY(86m@avisynth.org/c3x.avi
(Thanks to Richard Berg for the hosting space)
Chainmax
27th December 2005, 20:06
I experimented with SeeSaw on a crappy source that had little detail and needed deblocking and it didn't give me too good results. Could you post a few suggested usages, like your alternative with DeGrainMedian as denoiser?
Pookie
27th December 2005, 20:16
I experimented with SeeSaw on a crappy source that had little detail and needed deblocking and it didn't give me too good results. Could you post a few suggested usages, like your alternative with DeGrainMedian as denoiser?
You bet. As a 'detail enhancer', the SeeSaw function seems well suited for clarifying already decent looking video. A friend who saw the examples likened it to "putting the fuzz back on the peach". So, a blocky source is going to look like a pronounced blocky target. Here are the settings I used on the above examples:
a = last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Here's an example of a noisier source, using FFT3Dfilter in place of DegrainMedian and VagueDenoiser. This one has been pushed to demonstrate the effect. There's a huge amount of chroma cleaning/stripping applied (look at the eyes), but the target looks clean and sharp.
ftp://tempclips%40avisynth%2Eorg:QfJY(86m@avisynth.org/SeeSaw-3d-CGX.avi
morsa
28th December 2005, 11:39
Big Question:
Only way to use SeeSaw is having a denoised video or can it be used alone?
Pookie
28th December 2005, 12:18
Big Question:
Only way to use SeeSaw is having a denoised video or can it be used alone?
Even if you don't invoke your own denoising, there's a light RemoveGrain call in there that runs. That's part of the way Didee's function gets the target video looking as clean as it does. Try it out so you can understand how the denoising portion of the function works. Just as any processing tool, you'll want to use it in certain cases, and in other cases, another function will be more appropriate.
Look at the source video still in the original post and see what can be done.
http://img508.imageshack.us/my.php?image=ozzy2iv.png
http://img231.imageshack.us/my.php?image=ozzy210seesawmcnr2sq.png
Chainmax
28th December 2005, 22:35
Take a look at a before/after comparison with my current filterchain:
http://img227.imageshack.us/img227/7250/before8fg.th.png (http://img227.imageshack.us/my.php?image=before8fg.png)http://img227.imageshack.us/img227/9864/after1xx.th.png (http://img227.imageshack.us/my.php?image=after1xx.png)
Do you think using SeeSaw could yield better results?
Pookie
29th December 2005, 05:13
Try it out, Chainmax. It's an easy function to test.
FredThompson
29th December 2005, 11:59
Look at the source video still in the original post and see what can be done.
http://img508.imageshack.us/my.php?image=ozzy2iv.png
http://img231.imageshack.us/my.php?image=ozzy210seesawmcnr2sq.pngThose are not the same frame.
Pookie
31st December 2005, 14:29
Those are not the same frame.
Sorry, Fred. Just trying to show more examples of the general effect.
Here's another one, and this one IS the same frame :)
http://img432.imageshack.us/img432/8585/lostin5lh.th.png (http://img432.imageshack.us/my.php?image=lostin5lh.png)
Dark Alchemist
31st December 2005, 16:05
Where exactly do I get SCSelect from that this is calling for?
FredThompson
2nd January 2006, 02:21
Pookie, your video is smoothing way too much. Look at frame 266. Does the filter also remove stains and fill in cracks? Apparently, it does.
Besides, where's the fun in a clean Ozzy? It's just...wrong.
Pookie
2nd January 2006, 04:31
Which video are you refering to ? SeeSaw works with the filter of your choice, so Deen() is going to have a different result than using Undot(). Plus, you can tune the ratio of cleaning to sharpening in order to limit artifacts.
FredThompson
2nd January 2006, 04:36
Look at the video in the top post. Go to the frame I mentioned, or one near it, and look at the guy's shoulder. There's too much smoothing.
What is this from? It looks very interesting.
Pookie
2nd January 2006, 06:00
This frame -
http://img400.imageshack.us/img400/826/3danime5pk.png (http://imageshack.us)
Yeah, the shoulder is overly smoothed, but as I mentioned I was posting some obvious examples of SeeSaw on different media. It would be easy to back off on the smoothing strength.
foxyshadis
2nd January 2006, 06:41
That's FF7: Advent Children. ;) Seesaw gave me decent results on something I was having trouble with, but I ended up going with degrainmedian+limitedsharpen until I can figure out just how it can be tweaked best.
FredThompson
2nd January 2006, 07:03
Hmm...I'll have to add that to my NetFlix or Blockbuster queue. Thanks for the info.
I'm wondering if SeeSaw+DeGrainMedian would give better results than:
LRemoveDust_YV12(17,2)
Soothe(LimitedSharpen(ss_x=1.0,ss_y=1.0,Smode=4),last,24)
It should, given DeGrainMedian is spatio-temporal. I've been fiddling with Heavy Metal (I'm an old fart, not into Manga...ok...young women with abnormally large...attributes...would interest me...but I digress) and the biggest annoyance I'm finding with dirty transfers is the MPEG artifacting that's left after cleaning. Blech!!! Some of that should go away with a move to SeeSaw and DeGrainMedian but some is going to require dedicated hunting and killing...
Dark Alchemist
2nd January 2006, 12:50
Hmmm, filter looks nice for those who can even run it.
Didée
2nd January 2006, 16:39
Oh, here's a SeeSaw thread ... should I drop a comment? :)
First of all, I consider SeeSaw only as an intermediate step to a more complete solution. That's why I didn't post about it, and also didn't make an in-depth description of it, yet. Posting a "new incredible enhancement function" every few weeks is not such a smart idea, especially if the incredibleness is only half-finished.
The general aim of SeeSaw is to dig out weak detail from below, while not amplifying noise. The internal sharpening process enhances weak pixel differences much stronger, and strong pixel differences much weaker than a normal "linear" sharpener. This produces the wished effect, but on its own it will also bring up noise and artefacts into ugly presence. (Anyone remembering the "unsmooth" script of mf? ;) )
To get a stable result, usually one applies some smoothing before or after sharpening ... but however you turn it, the coin has always two sides:
a) first sharpen, then smoothe:
the sharpener has full detail to work with, but will also enhance noise. For a stable result, because of the sharpener's enhancement the smoother will need wider thresholds and/or more aggressive settings, thereby taking away much of the sharpening effect again, and also cutting deeper into the original source because of the stronger settings.
b) first smoothe, then sharpen:
result might be more stable, but most probably the smoother has already taken away much of the weak detail. Detail that has been killed can't be enhanced anymore, so there's always danger to end up with "sharp soup" (already prominent features have been enhanced, but the overall appearance is "empty").
So SeeSaw tries to do something other: to walk on the coin's border. First an intermediate clip is constructed: a version of the provided denoised clip with reduced denoising (reduction is controlled by "NRlimit2" and "bias"). This reduces temporal jitter of the source, but retains most of the present pixel differences (not all, but most). This calmed version then is sharpened with the mentioned non-linear sharpener, limited by the result of a (also non-linear)median sharpener to avoid halo'ing, and soothe'd against the calmed clip for even more temporal stableness of the effect-of-sharpening. Finally, the difference [calm]-[calm+sharp] is applied to the denoised input clip, with optional limiting of the original denoising effect.
BTW, for rather clean sources it's perfectly possible to not denoise/smoothe the source at all, but still use some denoising for a stable sharpening result: Just set NRlimit=0 and NRlimit2=1~8. This will let the original source fully unaffected, only the sharpening effect will be created on the reduce-denoised intermediate clip.
For low-bitrate artefact feasts, using SeeSaw is like digging for oil on Mount Everest: senseless.
There are lots of possible ways how SeeSaw can be set up, according to the source's characteristics. And of course the kind of used denoising should fit to that, too. Moreover, if the source contains noticeable blocking artefacts, these should be filtered out beforehand - we surely don't want to sharpen mpeg blocking at all. (Deblock_QED might be indicated, since it mostly keeps more detail than plain Deblock() or BlindPP().) Also, if the source contains halos, these should be removed beforehand. Although SeeSaw by itself will hardly create any edge halos, it will happily enhance them if they're already present in the source ...
Update with some small changes: today's version (http://home.arcor.de/dhanselmann/_stuff/SeeSaw_2006.01.02.rar)
- renamed "Sdamp" to "SdampLo"
- "SdampHi" (new) will further reduce sharpening on detail that's already strong (even less aliasing, hopefully)
- "SootheT=0" and "NRlimit=0" now are really NOPs (formerly these cases applied YV12Lutxy, with zero effect.)
Todo: replace [additive] sharpening with [multiplication] sharpening - but not today. ;)
Didée
2nd January 2006, 16:44
@ Dark Alchemist
What's the actual problem? In the first post, Pookie noted all needed plugins: MaskTools and RemoveGrain (1.0 pre-release). That's all.
Oh, you mentioned something about "SCSelect" ("that this is asking for") - now you see me :confused: - where does this appear? Never heard, never seen ...
anton_foy
2nd January 2006, 17:21
thats an amazing sharpener! Do you think it gives better sharpening than Limitedsharpen on a clip with low noise?
Dark Alchemist
2nd January 2006, 19:45
Didee:
orig = DirectShowSource("yyy.mpg")
x = mcnr_simple2(orig,frames=3,thY=24,thC=20,thY2=-1,thC2=-1,removdirt=true,LPrad=2.0,LPlosens=1,LPhisens=5)
SeeSaw(orig,denoised=x,NRlimit=15,bias=32,Smode=11,Szp=25,Sdamp=20,sootheT=-49,sootheS=86)
The error I get (http://i3.photobucket.com/albums/y81/GhostOfACPast/SCSelect.jpg)
That is telling me something is borked so I was asking where I would find SCSelect to satisify it.
Didée
2nd January 2006, 20:06
@ anton_foy
"Do you think tomorrow it will rain?"
I'm sure as anything that it'll rain tomorrow ... *where* it will rain, that's the question.
(Sorry, but you asked the "better" question :p )
The biggest strenght of LimitedSharpen - the limiting - is also a shortcoming: it prevents enhancement of detail beyond the local [min,max] range. (But Lmode=3 breaks that rule.)
SeeSaw aims at sharpening beyond the local extrama, to achieve more detail enhancement. In exchange, the limiting method used in SeeSaw is more likely to fail if the original source already shows haloing, may it be even so slight.
(However there's a commented line in the script that might help for that ;) )
@ Dark Alchemist
SCSelect does not occur in my scripts, neither SeeSaw nor MCNR_simple. I don't even know what it is (edit: it is part of RemoveGrain - post link (http://forum.doom9.org/showthread.php?p=650951#post650951))
Do a search where in any of the involved scripts this SCSelect function is called, and figure why. If it's not needed, deactivate it.
Dark Alchemist
2nd January 2006, 20:10
I did Didee on the two scripts but maybe one of them is calling other scripts? I never got that until I tried the scripts for this. I did a search and no SCSelect in either so I wonder where that thing could be at? Hmmmmm.
edit: Really weird. I removed my entire plugins folder and restarted avsynth editor and still I get that error using this. You would think I would get an error about missing plugins instead.
edit #2: I just uninstalled and reinstalled 2.5.6 so now to see what is going on.
On a fresh install only adding the two packages that this requires I get "mvanalyze function can't be found". So, I added the mvtools package and it wants the removedirt package.
So, I added the removedirt.avsi and POW SCSelect.
function RemoveDirt(clip input, bool "_grey", int "repmode")
{
_grey=default(_grey, false)
repmode=default(repmode, 16)
clmode=17
clensed=Clense(input, grey=_grey, cache=4)
sbegin = ForwardClense(input, grey=_grey, cache=-1)
send = BackwardClense(input, grey=_grey, cache=-1)
alt=Repair(SCSelect(input, sbegin, send, clensed, debug=true), input, mode=repmode, modeU = _grey ? -1 : repmode )
restore=Repair(clensed, input, mode=repmode, modeU = _grey ? -1 : repmode)
corrected=RestoreMotionBlocks(clensed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, debug=false, noise=10, noisy=12, grey=_grey)
return RemoveGrain(corrected, mode=clmode, modeU = _grey ? -1 : clmode )
}
JoeBG
2nd January 2006, 20:32
@ Didée
As a member from german doom9 and as a member from movie2digital I opened a german discusiion about this topic http://technik.movie2digital.de/thread.php?postid=304020#post304020
Dark Alchemist
2nd January 2006, 21:38
Well, it is now safe to say that the new removedirt was the problem. When I went back to the old dll way (the author no longer does it the dll way) SeeSaw works.
Thanks again everyone.
Didée
2nd January 2006, 23:27
Yeee, now I see it, too. You used the (new) scripted version of RemoveDirt for usage within MCNR_simple, and that one obviously requires SCSelect(). Looking at the function's header of MCNR_simple, you see that it expects the (old) DLL version. (The new one might work just as well, but I never tested that.)
Sidenote: In MCNR_simple, "removdirt=true" is meant for sources with rather strong noise/grain/dirt. For the average DVD or DVB rip, "removdirt=false" should suffice.
@ JoeBG
It's really nice that you introduce my scripts to folks on other German forums, too, which is a big help for those who are not familiar with the English language. Thank you for that.
However I *did* see all that babbling and whining "Didée is an abnigator at explaining & even he himself admits that" Alas, I have to disappoint you - in single letters: b.u.l.l.s.h.i.t! Like it or not, but what I'm hearing rather frequently is, in contrary, "man, you should have become a teacher" ... but then, in every class there are some pupils where the teacher stands without a chance -- at least not without loosing sight of those pupils learning at normal speed. That's why things like private lessions have been invented.
So, please do not misinterpret my lack of time for private lessons as inability of explaining... In elementary school, a teacher has to assure all pupils can follow. At university, it's the teacher who is setting the pace, and it's up to the student to somehow follow him.
Mind you, I visited both institutions - so this was a description out of practice. Welcome to the real world.
Dark Alchemist
3rd January 2006, 00:15
Didee, yep. I could not find the dll version until today so it works but the original author says the new scripted version is better than the dll version so I wonder if all of this should be upgraded to work with the new way?
It is now considered deprecated and was already hard for me to find the old dll so maybe soon the dll will just go poof.
psme
3rd January 2006, 13:55
Thanks Didée again for the new toys! I just tried this:
a = last
b=a.SPresso()
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, SdampLo=6, Szp=16)
Setup:
WinXP Pro, P4 506, non-HT, 2.66G overclocked to 3.8G (190x20), 1G DDR380 ram, ATI Radeon 9500, ZoomPlayer 4.x, DScaler5 decoder, FFDShow, Avisynth 2.56.
For real-time DVD playback, I think I have around 80% framerate on good flag 24fps film source.
Consider with only decent to great DVD source, is there anyway to slightly speed up the process to get full real-time framerate?
Btw, the stuttering playback already looks great! :D
regards,
Li On
Pookie
4th January 2006, 00:17
RemoveGrain can be loaded with optimized Dlls depending on your Processor. Download CPU-Z from http://www.cpuid.com/cpuz.php On the first page it will tell you if you have SSE, SSE2, and/or SSE3 capabilities. If you do, then load
RemoveGrainSSE2 or RemoveGrainSSE3 instead of RemoveGrain in your script. Doing this should significantly increase performance. I suspect your system supports SSE2 or better.
Another option is just to use
b=a.RemoveGrain(mode=11) for a smooth looking image or (mode=25) for a sharp looking one. Also try DegrainMedian(mode=2) - very fast and it renders a really nice image in SeeSaw.
Dark Alchemist
4th January 2006, 01:37
I noticed on the SeeSaw-3d-CGX.avi clip that the colors are off and/or the saturation needs to be turned backed up a little as some of the chars started to turn white.
http://i3.photobucket.com/albums/y81/GhostOfACPast/compare.jpg
Pookie
4th January 2006, 03:59
Dark - Try it with a different denoiser and see if the colors change.
dbzgundam
4th January 2006, 15:36
Hmm, seems to work well for me! While I don't think the filter is great as a sharpener on its own, I certainly like to use it to preserve or restore sharpness in video that I lose in filtering.
The best results I could gather was that on live action it works best if sharpened first, and then filtered; on animation it seems better to filter first, and then restore that subliminal sharpness with SeeSaw (Anyone here who encodes anime will probably know that though it's not significant, there is a VERY small loss of sharpness after filtering and warpsharping isn't exactly the best way to get it back!). Thanks a lot, Didée!
Dark Alchemist
4th January 2006, 15:47
You bet. As a 'detail enhancer', the SeeSaw function seems well suited for clarifying already decent looking video. A friend who saw the examples likened it to "putting the fuzz back on the peach". So, a blocky source is going to look like a pronounced blocky target. Here are the settings I used on the above examples:
a = last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamp=6, Szp=16)
Here's an example of a noisier source, using FFT3Dfilter in place of DegrainMedian and VagueDenoiser. This one has been pushed to demonstrate the effect. There's a huge amount of chroma cleaning/stripping applied (look at the eyes), but the target looks clean and sharp.
ftp://tempclips%40avisynth%2Eorg:QfJY(86m@avisynth.org/SeeSaw-3d-CGX.avi
This is the one I noticed the horrible color shifting/fading in and the one I posted the difference with.
So you say use something different than your example here? I like how sharp everything is but I wish I could figure out how to save the color/chroma values.
Didée
4th January 2006, 17:24
@ Dark Alchemist
You don't need to figure out anything. SeeSaw just takes the chroma from the "denoised" clip for the output. It doesn't do any own processing of chroma (except for limiting the difference [original-denoised] to not go beyond NRlimit).
So:
If the "denoised" clip has intact chroma, so will have the output.
If the "denoised" clip has overprocessed chroma, so will have the output.
Easy as that.
@ psme
Some minor speedups could be possible, but surely nothing that will lift you from 80% RT to 100% RT (perhaps 85%, estimated). Plus I don't worry too much about "realtime" processing generally. If user's CPU cuts it, fine. If not, user has to get a more beefy CPU ...
Also don't forget that sharpen(1) runs very fast :p
Dark Alchemist
4th January 2006, 19:03
Fair enough but why did that clip have the washed out and faded colors? I tried a simple saturation addition but that wasn't quite right.
XadoX
4th January 2006, 19:05
can SeeSaw also resize like LimitedSharpen?
Pookie
5th January 2006, 11:51
I think the color difference is due to my use of FFT3dFilter(plane=3), which cleans luma AND chroma.
http://img216.imageshack.us/img216/5205/ahfftp34bl.png (http://imageshack.us)
If you use a filter that cleans only luma, or back off on the chroma cleaning strength, I suspect you won't see the color change on the target. At least I'm guessing that's the case. Here's FFT3DFilter Using Plane=0 (clean luma only).
http://img216.imageshack.us/img216/9914/ahfftp00ff.png (http://imageshack.us)
DeepDVD
6th January 2006, 19:16
I played around with additional sharpening with LimitedSharpenFaster and got strange broken lines on picture parts with fast keychange:
http://img314.imageshack.us/img314/1215/1112221kt.jpg
My Script:
a=last
b=mcnr_simple2(frames=3,thY=24,thC=20,thY2=-1,thC2=-1,removdirt=true,LPrad=2.0,LPlosens=1,LPhisens=5).LimitedSharpenFaster(ss_x=2.5,ss_y=2.5,strength=100,smode=4)
SeeSaw(a,b,NRlimit=17,bias=18,Smode=11,Szp=18,SdampLo=20)
It doesn't matter if I put LSF before, in, or behind SeeSaw. The lines are always the same. The Source is DVD.
Pookie
6th January 2006, 21:45
What happens when you take MCNR out of the picture ? Dunno if that's the issue, but I don't seem to get the dotted lines, as noted below.
http://img230.imageshack.us/img230/1640/compare3mq.png (http://imageshack.us)
DeepDVD
7th January 2006, 10:35
It's strange. I tried every combination. LSF in the SeeSaw-function (any place there), extern (before and after the function). With or without MCNR, with FFT3 as an other denoiser. The only thing that change, is the color of the broken lines. Sometimes they are white (as in the sample on upper place), sometimes they are black. To get rid of 'em I have to disable LSF, no other way to solve for now. Maybe I got a wrong script? It's allways in scenes the whole picture moves.
Here's my whole one:
LoadPlugIn("F:\Functions\mt_masktools.dll")
LoadPlugIn("F:\fft3dfilter.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\aWarpsharp.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\asharp.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\SSETools.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\RemoveGrainS.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\RepairS.dll")
LoadPlugIn("F:\Functions\MVTools.dll")
LoadPlugIn("C:\Programme\GordianKnot\DGMPGDec\dgdecode.dll")
LoadPlugIn("F:\Functions\RemoveDirt\RemoveDirt.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugin\MaskTools155.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\undot.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\deen.dll")
LoadPlugIn("C:\Programme\AviSynth 2.5\plugins\unfilter.dll")
LoadPlugIn("C:\Programme\Avisynth 2.5\Plugin\warpsharp.dll")
LoadPlugIn("F:\Functions\LimitedSupport_03Dec05.dll")
Mpeg2Source("F:\VIDEO_TS\test.d2v")
crop(0,72,-0,-72)
Import("F:\Functions\LimitedSharpenFaster.avsi")
Import("F:\Functions\DeHalo_alpha.avs")
Import("F:\Functions\SeeSaw.avs")
Import("F:\Functions\MCNR_simple2.avs")
LimitedSharpenFaster(ss_x=2.5,ss_y=2.25,strength=30,smode=4)
a=last
#b=fft3dfilter(plane=0)
b=mcnr_simple2(frames=3,thY=24,thC=20,thY2=-1,thC2=-1,removdirt=true,LPrad=2.0,LPlosens=1,LPhisens=5).DeHalo_alpha()
SeeSaw(a,b,NRlimit=17,bias=18,Smode=11,Szp=18,SdampLo=20)
temporalsoften(2,2,3,23,2)
AddBorders(0,72,0,72)
Before i forget: DeHalo doesn't play any role. It's LSF only, the rest is OK.
bdogg
7th January 2006, 11:59
Originally posted by DeepDVD
I played around with additional sharpening with LimitedSharpenFaster and got strange broken lines on picture parts with fast keychange:
I would get the same effect if I used certain values of super sampling with LimitedSharpenFaster, ie. ss_x=1.2,ss_y=1.2. However, just changing to 1.3 or 1.1 would remove the lines.
Try setting ss_x=1.0,ss_y=1.0 and see if the lines go away.
DeepDVD
7th January 2006, 12:37
Wow... that seems to be the problem. How come the supersampling is to blame for it? I tried 1.1 for both dimensions and it was OK. So I cannot use specific supersampling-figures? Strangely a small change of +0.25 on both dimensions works without lines...
ObeewanVOB
22nd January 2006, 15:57
Really like what I see here, especially the results on Deep DVD's video above since I have a souce that looks just like the original one above I want to clean up. All this is extremely confusing to me though. I have only used regular scripts until now and have no idea how to implement a script funtion. Is there anywhere I can go to try to learn this? Just like to learn rather than just be given the answer. Tried google and it just returned everything imaginable except what I wanted.
Do the scripts have to load all the plugins like Deep listed above or is this just an option? Thanks
Boulder
22nd January 2006, 16:41
Just extract the SeeSaw.avs to your Avisynth plugins directory (by default C:\Program Files\Avisynth 2.5\plugins). Then rename the extension from .avs to .avsi. This way Avisynth will automatically load the function and you can call it in your script.
Another option is to copy-paste the contents of SeeSaw.avs at the end of your script but it's not very convenient. Doing the process above you'll always have the function available.
ObeewanVOB
22nd January 2006, 16:52
Just extract the SeeSaw.avs to your Avisynth plugins directory (by default C:\Program Files\Avisynth 2.5\plugins). Then rename the extension from .avs to .avsi. This way Avisynth will automatically load the function and you can call it in your script.
Always so simple:thanks: :rolleyes:
ObeewanVOB
23rd January 2006, 01:11
OK, this is getting interesting. First I made sure that my script loads up in VirtualDub or MediaPlayer to make sure there are no syntax errors there. Now I'm trying to load up MCNR_Simple2 and LimitedSharpen. With each one I get an error. With MCNR I keep getting mvanalyse does not have argument truemotion. If I take this out of the function it moved on to the next one, chroma. With LimitedSharpen it says there is no function mt_edge. I downloaded and installed the files at the beginning of the post but this has not helped. Any ideas?
foxyshadis
23rd January 2006, 02:27
Well, this thread isn't about MCNR so the requirements in the first post don't fit it. You need masktools 1.5+, mvtools 1.0+, ttempsmooth, removegrain, and removedirt.
And you don't have LimitedSharpen, you have LimitedSharpenFaster. :p http://www.avisynth.com/LimitedSharpen for the latest and its requirements (masktools 2.x).
Didée
23rd January 2006, 02:33
Yee, the usual plugin desease ;)
Regarding MVNR_simple: to use this one, you have to load Fizick's v1.0.3 version of MVTools.dll. Not sure if the packacke is currently on- or offline on Fizick's pages ... in case of doubt, have a look here (http://home.arcor.de/dhanselmann/_stuff/).
Also required is this version (http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar) of RemoveGrain.
Regarding LimitedSharpen: The error message you're getting means that you are using one of the modified scripts (more speedy), not the original one.
Get the new MaskTools v2.0a21 (http://manao4.free.fr/masktools-v2.0a21.zip) package froma Manao. It contains the plugin mt_masktools.dll, which must be loaded, and the latest script modification LimitedSharpenFaster.avsi. Attention: Avisynth v2.56 is needed, it will not run correctly if you're using Avisynth v2.55, or even older.
mg262
23rd January 2006, 12:07
Didée,
PS -- why true motion for denoising? :scared:
Didée
23rd January 2006, 12:37
why true motion for denoising? :scared:
Why not? Is truemotion/warping really *that* bad that a [scared] smiley is indicated ? Makes me wonder, because IIRC there is another motion compensation tool that uses warping, too ... :p
Seriously: Because it seems to fit. The average overall denoising efficiency might be a tad lower with truemotion compared to blockbased, yes. But at least the user will never get the usual MC-denoiser artefacts: there are no "blocking" artefacts with truemotion. In those spots where blockbased compensation would give blocking, the truemotion approach at worst will give some "smearing" - and the included "LPprotect" option will compensate for exactly this.
Now how do we get this on-topic ... ah yes, it already is. MCNR_simple is a valid denoiser for SeeSaw. :)
mg262
23rd January 2006, 15:17
Why not? Is truemotion/warping really *that* bad that a [scared] smiley is indicated ?Nononono, the smiley was because there was something deep and mysterious happening which I didn't understand :). [We need more semantic resolution in smileys :D.]
Actually I'm glad to see things going this way, because it implies that even Motion might be useful for denoising... or at least that its fast warping code might be.
Pookie
23rd January 2006, 18:29
Found a nice looking combination of filters for SeeSaw and certain 1080i source material. Wondering if there's a functional equivalent to PeachSmoother which wouldn't require a YUY to YV12 conversion.
a = last
b=a.converttoyuy2().peachsmoother(NoiseReduction=35,Stability=40).converttoyv12().removegrain(mode=1)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=8, Szp=16,soothet=25,soothes=35,bias=60)
ftp://tempclips%40avisynth%2Eorg:QfJY(86m@avisynth.org/see-peach.avi (3MB)
Thanks for hosting, Richard Berg. You rock !
aberforthsgoat
24th January 2006, 09:22
Say,
I just found this thread and perused a while. I'm currently using LimitedSharpenFaster and hqdn3d for DVD playback and live TV. Is SeeSaw going to be an option or does it place higher demands on my system?
Just wanted to ask before I throw myself into another orgy of filter testing!
Mike
Didée
24th January 2006, 10:05
Is SeeSaw going to be an option
Yes.
or does it place higher demands on my system?
Yes.
Just wanted to ask before I throw myself into another orgy of filter testing!
Yes. ;)
Read: I can't save you from testing whether it fits your needs, or not ...
Razorholt
24th January 2006, 22:10
Hi,
I'd love to test SeeSaw but I get that following error:
-----
there is no function named "yv12lutxy"
Xe: ,line72
-----
Here is my script:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools20a21\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_02Dec05.dll")
DirectShowSource("Z:\trailers\Hills\thehillshaveeyes_XviD-2000_lancsoz4.avi")
ConvertToYv12()
a = last
b=a.degrainmedian(mode=2)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Szp=16)
Thank you for your help.
- Dan
Pookie
24th January 2006, 22:14
You need to load the older >1.58 version of Masktools. Look on the first page for the link. It can co-exist with the MT_masktools.dll.
Also, you need to load RemoveGrain, found on the first page.
Also, you need to import SeeSaw.avs into your script.
Razorholt
24th January 2006, 22:32
Ok, I did it but now it crashes AVSEdit when I want to preview the video. Megui crashes too after I load the AVS file.. :(
RemoveGrain loads automatically, I have the dll under Plugins.
Thanks,
- Dan
Pookie
25th January 2006, 02:36
Create a new AVS file for your SeeSaw test. Manually load RemoveGrain and the older Masktools, plus DegrainMedian.
Are you sure you have the RemoveGrain from the front page ?
You should have 2.56 of AviSynth.
Didée
25th January 2006, 10:48
DirectShowSource("Z:\trailers\Hills\thehillshaveeyes_XviD-2000_lancsoz4.avi")
For an *.avi source file better use "AviSource()", not "DirectShowSource()" ...
Razorholt
25th January 2006, 22:02
Thank you Pookie and Didee!!!
I had to reinstall AviSynth and get rid of all the plugins I had already. Fresh start was the cure here. :)
Quick question: The clip is 1024x432, so is it better to add borders to reach the "normal" size of 1024x768?
Cheers,
- Dan
thegame
31st January 2006, 04:21
hi guys i need help,i have been trying to get this to work ALL weekend,and this is the error i get now:
"there is no function named "repair"."
this is my script,now keep in mind i am a newbie at this but really want to learn,i am trying to capture(Laserdisc w/Canopus ADVC-110 & ScenalyzerLive) and process my Star Wars Japanese Special Collection Trilogy to dvd,i want to make the video look as good as i can,i already figured out how to crop out the japanese text and recenter the video and make anamorphic WS,but i would like to clean up the video as best i can,and Dide'e's filters look very promising,so here is where i am at now:
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\MaskTools20a26\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\MaskTools158\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\RemoveGrain\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\MVTools0991\MVTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\LimitedSupport_09Jan06B.dll")
Import("C:\Program Files\AviSynth 2.5\scripts\SeeSaw.avs")
avisource("F:\LaserDisc Caps\test avi's\tns.avi")
ConverttoYV12
AssumeBFF()
Telecide(guide=1,post=0)
Decimate()
crop(10,58,704,280)
a = last
b=a.converttoyv12().removegrain(mode=1)
SeeSaw()
lanczos4resize(720,382)
addborders(8,53,8,53)
thanks in advance for any help
keep up the GREAT work Dide'e and others
game
Pookie
31st January 2006, 05:26
Repair is part of the RemoveGrain package. Download this and load the .dll(s) manually
http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar
RemoveGrain and Repair can be loaded with optimized Dlls depending on your Processor. Download CPU-Z from http://www.cpuid.com/cpuz.php On the first page it will tell you if you have SSE, SSE2, and/or SSE3 capabilities. If you do, then load RemoveGrainSSE2.dll or RemoveGrainSSE3.dll instead of RemoveGrain.dll in your script. Same goes with Repair. Doing this should significantly increase performance.
note: Put a () after ConverttoYV12 in your script, right below your Avisource line. No need to declare it again in the b=a.converttoyv12().removegrain(mode=1) line. Also, no need for limitedsupport.
IIRC, the StarWars laserdisc material is pretty difficult to enhance - Rainbowing and other noise. You might want to run a different or additional filter to removegrain(mode=1) with SeeSaw. Check out VagueDenoiser and DegrainMedian(mode=1), that's a pretty nice combination on some stuff. :) Still, don't expect miracles, considering what your source is.
3ngel
31st January 2006, 11:20
Hi, i'm trying SeeSaw but i got error :
- YV12Lutxy : Input Clip format must be YUV12
I'm missing something? Is SeeSaw functioning only on YV12 sources?
foxyshadis
31st January 2006, 11:28
That would be the obvious conclusion. Pretty much anything using masktools requires yv12 (or i420/y8, I guess) unless special considerations are made for it.
3ngel
31st January 2006, 11:56
I see, so there are any plans on doing YUY2 support? I would like to test this on a DVD source.
mg262
31st January 2006, 11:58
DVDs are yv12.
Mug Funky
31st January 2006, 12:02
you could of course convert your yuy2 source to yv12, filter, convert back to yuy2 and merge in the un-filtered chroma - only luma will be filtered, but that's all you'll need (you ever see what a TV does to chroma? there's absolutely no need to sharpen it unless you're doing some kind of correction on a special source).
3ngel
31st January 2006, 12:28
you could of course convert your yuy2 source to yv12, filter, convert back to yuy2
But in this way i don't lose precious informations converting from YUY2 to yv12 colorspace ?
EDIT : ohh, you're saying in the conversion i lose the chroma, but there is no need to enhance chroma. Mmm i see, but how do i merge with the unfiltered chroma back?
mg262
31st January 2006, 12:44
Using MergeChroma (syntax and examples in the documentation).
What is your source?
Didée
31st January 2006, 12:45
But in this way i don't lose precious informations converting from YUY2 to yv12 colorspace ?
No.
source_yuy2 = whatever
source_yv12 = source_yuy2 .ConvertToYV12() # Chroma gets upsampled (slight softening). No changes on luma.
processed_yv12 = source_yv12 .WhateverFilter(yv12_only)
processed_yuy2 = processed_yv12 .ConvertToYUY2()
\ .MergeChroma(source_yuy2) # Luma processed (there's no conversion loss)
# chroma is the original one -> not changed at all
However in case of SeeSaw, most probably you should not merge back chroma from the original clip, but from the denoised version. (If your denoising filter(s) worked on chroma too, that is.)
But in this way i don't lose precious informations converting from YUY2 to yv12 colorspace ?
In the end, you will be loosing all those precious informations anyway. For sure if you're going to encode to something like XviD/DivX, x264, mpeg-2 for DVD authoring, or whatever ... because in these usual cases,
you're always encoding to
YV12
;)
3ngel
31st January 2006, 12:57
Thanks mg262, and thanks Didee your explanations are always precious ;)
And yes i know that i'm always encoding to yv12 but you know, the less you lose during the travel the more you can sell :D
Isochroma
31st January 2006, 20:29
You could do a lanczos4resize(4x,4y) before the functions(s) that require yv12 and lanczos4resize(1/4x,1/4y). This would prevent chroma loss but result in much slower operation and higher memory usage. In fact, I bet even a pointresize or bilinear would be just as accurate in such a case?
foxyshadis
31st January 2006, 20:55
Not really worth it, better to just do separate luma/chroma filtering and merge them later, even it takes twice as long. (Except for filters where luma/chroma is selectable... most of Didée's can be trivially modified to support other colorspaces, they'd just end up more complex.) The main problem is enlarging screws up luma thresholds and radius settings, if they're even settable. I could set something up if there's a real demand for it.
Typically it will only make any difference if you're translating to a YV24/RGB end product, for whatever reason, though.
thegame
1st February 2006, 00:42
THANK YOU very much Pookie,i will try everything you suggested and download CPUZ.
thanks again guys for ALL the great work
game
I just checked with CPUZ and in Instructions there is "MMX,SSE,SSE2,SSE3"so what exactly does this mean?
thanks again
Pookie
1st February 2006, 03:10
That means you'll want to do the following (with the RemoveGrain Package)
Load("c:\yourPlugins\RemoveGrainsse2.dll")
Load("c:\yourPlugins\Repairsse2.dll")
Load("c:\yourPlugins\Masktools.dll")
Load other Plugins, etc
I know you have SSE3 capability, but I haven't always been able to get that one to work. Just try the above for starters.
thegame
2nd February 2006, 00:44
thanks again Pookie,it works now,if i posted a link to a sample of my captured from laserdisc clip,would you be willing to look at it and give me some ideas\pointers?
thanks agian
game
Pookie
2nd February 2006, 02:23
Yeah, but it is your eyes that matter. Check out this thread on the StarWars laserdisc saga - 58 Pages (lol) http://forum.videohelp.com/viewtopic.php?t=102812
Here's an entire website devoted to the Star Wars laserdisc transfer process
http://x0project.com/articles.php?i=00012 (lots of specific details on cleaning up your source)
As I mentioned, don't expect miracles on the Star Wars material. .
Also, tweak the denoise strength of SeeSaw to a higher setting than default.
a= last
b=a.degrainmedian(mode=1,limituv=8)
SeeSaw(a,b, NRlimit=8, NRlimit2=9, Sstr=1.5, Slimit=5, Spower=6, Sdamp=6, Szp=16)
thegame
2nd February 2006, 03:23
thanks again Pookie,and i am very much aware of Zion Mebejedi and others of the X0 project,they are regulars\moderators at Originaltrilogy dot com,as am I(dark jedi,not a mod though)i just got my hands on a NICE pioneer cld 97 Elite player, and alot more software and knowledge so i am going back and redoing some of my captures,here is a link to what i have done(all NTSC SW LD's):
http://www.galactictradefederation.com/dvd/OT/dj.html
and i really am interested in all of the filters by Dide'e,the example pics look great,from LimitedSharpen to SeeSaw.
i will upload a clip,also now with your latest suggestion,i have a argument "sdamp" error.
am I suppose to rename "sdamp" to "sdamplo" or "sdamphi"?
also here is the link to the clip i am working with:
http://www.megaupload.com/?d=FHEJKV8W
thanks for your help
game
Pookie
2nd February 2006, 08:50
Looked at your clip. You need to do a lot of things to it before SeeSaw. This gets to be off topic for this thread. Check the clip posted below with your original and what it looks like after processing. Search the threads for more info, but the steps are as follows:
Inverse Telecine --> Decimate --> Crop --> Denoise --> SeeSaw
http://www.megaupload.com/?d=PHEBLN4I (8MB Xvid)
thegame
3rd February 2006, 00:37
sorry for getting off topic,WOW Pookie that looks alot better,could you possibly post the script you used and i can try to copy it,how did you IVTC,what program did you use?or is avisynth scripts all you use?
after these questions i will ask no more about this in this thread,sseing how i am way off topic now,sorry guys,just really excited to learn new things from you PRO's
thanks again,and great looking clip Pookie,alot better than the original
game
here is what i am using now is this right?
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\RemoveGrain\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\RemoveGrain\RepairSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\DeGrainMedian\degrainmedian.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\vaguedenoiser\vaguedenoiser.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\MVTools0991\MVTools.dll")
Import("C:\Program Files\AviSynth 2.5\scripts\SeeSaw.avs")
avisource("F:\LaserDisc Caps\test avi's\tns.avi")
ConverttoYV12()
AssumeBFF()
Telecide(guide=1,post=0)
Decimate()
crop(10,58,704,280)
a= last
b=a.degrainmedian(mode=1,limituv=8)
SeeSaw(a,b, NRlimit=8, NRlimit2=9, Sstr=1.5, Slimit=5, Spower=6, SdampLo=6, Szp=16)
addborders(8,83,8,83)
#lanczos4resize(720,382)
#addborders(8,53,8,53)
the 2 bottom # is what i would use to make anamorphic WS.
Pookie
3rd February 2006, 08:22
Yes, that's about the same as mine. Just PM me if you need more help.
SetMemoryMax(320)
LoadPlugin("d:\YOURPLUGINDIR\degrainmedian.dll")
#http://www.avisynth.org/warpenterprises/files/degrainmedian_25_dll_20050421.zip
LoadPlugin("d:\YOURPLUGINDIR\tivtc.dll")
#http://www.missouri.edu/~kes25c/TIVTCv1RC1.zip
LoadPlugin("d:\YOURPLUGINDIR\cnr2.dll")
#http://www.missouri.edu/~kes25c/cnr2_v261.zip
LoadPlugin("d:\YOURPLUGINDIR\fft3dfilter.dll") #read the doc for additional DLL needed.
#http://www.avisynth.org/warpenterprises/files/fft3dfilter_25_dll_20050803.zip
LoadPlugin("d:\YOURPLUGINDIR\removegrainSSE2.dll") #SeeSaw
LoadPlugin("d:\YOURPLUGINDIR\RepairSSE2.dll") #SeeSaw
LoadPlugin("d:\YOURPLUGINDIR\masktools.dll") #SeeSaw
import("D:\SCRIPTS\seesaw.avs")
AviSource("D:\clip\clip.avi")
converttoyv12()
tfm()
tdecimate()
crop(16,64,-16,-144)
Spline36Resize(1440,608) # Blow up the image so denoising will look more natural.
fft3dfilter(sigma=5,plane=0)
fft3dfilter(sigma=6,plane=3)
a = last
b=a.degrainmedian(mode=1).cnr2()
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=6, Spower=8, Sdamp=5, Szp=16)
Spline36Resize(720,304) #Reduce Size back to NTSC DVD spec
addborders(0,88,0,88)
thegame
4th February 2006, 01:23
thank you so very much Pookie,i will try this and get back to you,and thanks for letting me PM you,i will let you know how this works for me,and thanks for adding the links too
thanks again
game
on this line here;
"SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=6, Spower=8, Sdamp=5, Szp=16)"
how does sdamp work for you,wasnt it renamed to sdamplo or sdamphi?the only way i can get that to work is if i add a lo or hi,am i doing something wrong or different?
thanks again
game
Pookie
4th February 2006, 06:46
I'm sure I was pointing to an older version of SeeSaw.avs as I have stuff scattered all over the place at the moment. The fun part of all this stuff is creating the recipe which will make your eyes happy. Try combinations of settings and see what you like. Those "aha!" moments are great :)
thegame
4th February 2006, 23:01
thanks again Pookie,you also have PM
game
Didée
4th February 2006, 23:24
how does sdamp work for you,wasnt it renamed to sdamplo or sdamphi?
Exactly. I told the story (http://forum.doom9.org/showthread.php?p=760935#post760935).
xara
6th February 2006, 21:11
Am I blind or loosed something?
Import("D:\Program Files\AviSynth 2.5\plugins\vdub_filters.avsi")
Import("D:\Program Files\AviSynth 2.5\plugins\SeeSaw.avsi")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
LoadPlugin("D:\Program Files\AviSynth 2.5\plugins\VagueDenoiser.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("D:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
# SOURCE
mpeg2source("I:\dvd\monstros3\monstros3.d2v")
AssumeTFF()
a = last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=0, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, SdampLo=6, Szp=16)
# DEINTERLACING (2)
KernelDeInt(order=1,sharp=true,threshold=5)
# CROPPING
crop(12,16,696,446)
# REDIMENSIONANDO
LanczosResize(640,448)
# DENOISING
Undot()
ConvertToRGB()
VD_logo(579, 9, 200, true, 0, 0, 255, 0, "D:\Program Files\VirtualDub\plugins\xara24.bmp", false, 770, 0, 0, 100, 1270, 100)
Every time VirtualDubMPEG2 closes without any warning when I load this code.
- I download the linked filters in the first post
- Remove the a,b variables, calling only SeeSaw()
- Update AviSynth to 2.56
- Tried SSE2 filters
- Placed SeeSaw in different positions in the filters chain
I waste all my options and nothing works.
Any help will be really appreciate.
In time: should I use SeeSaw with separatefields/wave on interlaced sources? Didnt try this.
foxyshadis
6th February 2006, 22:10
Just to be certain: Removing seesaw entirely works, correct?
And since it's not an interlacing-aware filter, you will need to separatefields or bob first, yes.
xara
6th February 2006, 22:41
Just to be certain: Removing seesaw entirely works, correct?
Yes, when entirely removing SeeSaw I can compress in XviD.
And since it's not an interlacing-aware filter, you will need to separatefields or bob first, yes
I dont know. Is it? I just tried with separatefieds and as VDMPEG2 crashes I can't tell if it's interlacing-aware.
xara
7th February 2006, 01:31
Well, I disable "crop" and "lanczosresize" and VD show me the message below.
This is going beyond my expertise :scared:
Source is 720x480
Pookie
7th February 2006, 17:10
I would put SeeSaw last in the chain, after deinterlace/IVTC/delogo,etc
Are you pointing to the .d2v file on a networked drive ? Can you copy it to your local hard drive and try it ?
Add a Converttoyv12(), right after your Mpeg2Source line
Simplify your SeeSaw denoiser filters temporarily. Replace degrainmedian and vaguedenoiser with
a=last
b=a.RemoveGrain(mode=25)
SeeSaw(a,b, NRlimit=2, NRlimit2=3, Sstr=1.5, Slimit=5, Spower=5, SdampLo=6, Szp=16)
Finally, try a different source, just for testing purposes.
xara
7th February 2006, 23:09
Thank you Pookie for the tips and time.
I think the problem is solved and was related with the RemoveGrain filter path.
I found another thread about this issue and relocated all RemoveGrain filters suite out of AviSynth/plugins directory.
Now VD is loading the code with SeeSaw. I'm happy again :D
Razorholt
8th February 2006, 23:41
Is it possible to tweak SeeSaw in order to get rid of the echo on edges (or whatever you call that effect)? Should I consider adding another filter?
http://www.nubastream.com/dan/badcontour.gif
My code is:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools158\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VagueDenoiser\VagueDenoiser.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\mvbob\mvbob.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
MPEG2Source("Z:\DestB\VTS_01_2.d2v")
mvbob()
Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
ConvertToYv12()
a = last
b=a.VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Szp=16)
Lanczos4Resize(640,372)
Thanks for your help :)
- Dan
Didée
9th February 2006, 00:02
Sure - use a halo remover beforehand. The sharpening part of SeeSaw is rather delicate in this respect: it will hardly create any halo artefacts if the source is free of them (perfectly free). However if halos are already present in the source, be it even-so-slightly, the sharpener will happily enhance them.
Oh, and I hope that your result of MVBob() is absolutely free of any residual combing... Sharpening of sources that have been deinterlaced is always problematic, same goes for SeeSaw.
Razorholt
9th February 2006, 01:26
Ok, I added the DeHalo_alpha() filter and the result was not too bad. :) Which part(s) of Seesaw you'd recommend me to play with?
Regarding MVBob() it doesn't create any noise or halo at all. It's a pretty good filter actually.
Thanks,
- Dan
Pookie
9th February 2006, 20:01
That's a textbook perfect example of haloing. :D
You might want to run your source through FFT3Dfilter with SeeSaw, although it will be slow. Still, the results might be worth it.
Razorholt
9th February 2006, 20:38
Good idea Pookie.. I'm going to try that. :) Thanks!
boombastic
23rd May 2006, 20:40
I'm calling seesaw in this way:
LoadPlugin("i:\PROGRAMMI\Avisynth 2.5\filtri\degrainmedian.dll")
LoadPlugin("i:\PROGRAMMI\Avisynth 2.5\filtri\RSharpen.dll")
LoadPlugin("i:\PROGRAMMI\Avisynth 2.5\filtri\DenoiseSharpen.dll")
LoadPlugin("i:\PROGRAMMI\Avisynth 2.5\filtri\Repair.dll")
LoadPlugin("c:\PROGRAMMI\Avisynth 2.5\filtri\mt_masktools.dll")
LoadPlugin("c:\PROGRAMMI\Avisynth 2.5\filtri\RemoveGrain.dll")
import("c:\PROGRAMMI\Avisynth 2.5\filtri\SeeSaw.avs")
a= last
b=a.DegrainMedian(mode=2)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
but i get the error:
ther's no function named yv12lutxy
what am i missing?
Boulder
23rd May 2006, 20:55
You need the v1.x Masktools dll.
Pookie
24th May 2006, 02:49
http://manao4.free.fr/MaskTools-v1.5.8.zip
boombastic
24th May 2006, 06:18
Sorry for not reading a few post ago where someone had the same problem.Thanks for the help,now everything is fine!
unskinnyboy
23rd July 2006, 17:05
I stumbled upon something and thought it was worth mentioning, in case Didée was interested.
There seems to be a conflict between Soothe() and SeeSaw(). In a script using LS+Soothe, if I import SeeSaw (just import, it is not being called), I get artifacts. Mostly discoloration or green screens like these:
http://img153.imageshack.us/img153/2281/seesawissue01ow2.th.jpg (http://img153.imageshack.us/my.php?image=seesawissue01ow2.jpg) http://img97.imageshack.us/img97/3555/seesawissue02qc0.th.jpg (http://img97.imageshack.us/my.php?image=seesawissue02qc0.jpg)
LS alone is OK, but LS+Soothe isn't.
Here, I was using
dull = last
sharp = LimitedSharpen(ss_x=1.0,ss_y=1.0,overshoot=1,special=true,smode=4,strength=40)
Soothe(sharp,dull,20)
Hope this wasn't already reported before.
Didée
23rd July 2006, 19:22
Yes, there's a conflict. Did I never mention? :o
SeeSaw comes along with its own Soothe-Function, extended for 2-frame-distance soothing, and not caring about chroma at all, because chroma is restored at another place within SeeSaw.
Best would be, open SeeSaw in your editor, and call a "replace all:" "Soothe" by "SootheX", or something like that.
Sloppy scripting here, eh? My perfect excuse: It wasn't me who brought a half-finished experiment into public, it wasn't me ... :p ;)
unskinnyboy
23rd July 2006, 20:14
Got it. The wrong function was getting called. Should have checked & fixed it myself. Thanks Didée.
Pookie
23rd July 2006, 21:51
Soothe or No Soothe (sootheless?), it's still a cool function. :D
foxyshadis
23rd July 2006, 22:48
The version on the wiki already has a renamed Soothe, I called it SootheSS, as soon as I noticed it had the same name but different functionality while sorting the script out. ;)
3ngel
25th July 2006, 21:57
Hi,
i've tested a little SeeSaw, and i find one limitation that has a consequence:
the function accept only YV12 and there is an evident color reduction in the grandients after the function.
Example in YUY2 mode there are 60 state of gradients, after the function the grandient are reduced to 30 with the kind of "16 color grandient" effect.
There is a way to modify SeeSaw in order to make it YUY2 tolerating?
Pookie
25th July 2006, 22:29
Read the thread, in particular page 4. It's been discussed.
foxyshadis
25th July 2006, 22:35
It's possible. It would involve a lot of conversions and substituting subtract & overlay for mt_makediff & mt_merge, so performance would drop dramatically, but it'd work. (Or convert/apply/convertback/mergechroma... hey, wasn't it you who asked the same question and got that answer before?)
You'd probably be better off reinterpolating the gradient after application.
What format are you saving to that uses yuy2/yv16 instead of yv12?
3ngel
25th July 2006, 22:54
wasn't it you who asked the same question and got that answer before?
Mmm... you say so? It's possible if i used it long time ago :)
Ohhhh i remember pheraps! You posted if i'm not wrong a script to refix the chroma losted, interpolating the Yv12 with the original YUY2 (i'll search for it), but i don't know if it would be able to properly recreate the gradients. Anyway I'll try it.
Obviously it would be easier to operate directly in YUY2 :p
I do all the operations possibly in RGB, YUY2 mode, so it's a considerably loss of quality when i came to downgrade to Yv12.
EDIT: I found it. Woa i had totally forgot about my early post :) The script is by Didee. Thanks Didee!
shaolin95
1st August 2006, 08:09
Is there a way to use MT (dualcore) to speeds things up?
Awesome work btw!
Boulder
1st August 2006, 08:21
Possibly with SetMTMode, I'm not sure if MT would work correctly.
foxyshadis
1st August 2006, 08:43
Both work fine. SetMTMode 1 may even work, can't recall.
fjhdavid
1st August 2006, 11:20
After LS, I went to seesaw, but here comes the denoiser problem. For the moment I use Blur&NR (with HQ) from ffdshow.
My source are films recorded on a DVD recorder from Sat (with some blocks sometimes (I would like to drop)! the quality is average)
Is there a better denoiser function to use with seesaw or LS?
Is there a way to de-block my source?
thanks for your help
shaolin95
1st August 2006, 15:13
Both work fine. SetMTMode 1 may even work, can't recall.
Will this work?
SetMode(1)
a = last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
I am ultra dumb with scripts...bascially I copy and try to modify.
Pookie
1st August 2006, 15:24
Try it with DegrainMedian(mode=1) and remove the VagueDenoiser part, unless your source is really bad.
Boulder
1st August 2006, 15:33
You must place the SetMTMode line before the line where you load the source (MPEG2Source, AVISource etc.)
shaolin95
1st August 2006, 16:29
I am not loading any source just playing a dvd thru TheaterTek and using ffdshow+avisynth. I like how it looks although I sure dont know if I am doing thins right :-) I know it is sharpening and I like it more than my regular sharpening thru ffdshow but I need to figure a way to use my dual core. My opteron 165 runs at 3ghz so its very fast.
Boulder, so since I am just playing DVDs where do I put the setMTmode...before the SeeSaw line?
Boulder
1st August 2006, 16:51
The SetMTMode line needs to be before the source is loaded so it probably won't work the way you are trying do make it work. As foxyshadis said MT will work, you should use it.
shaolin95
1st August 2006, 17:03
Well I will give it a try again with SetMTmode since I had a typo yesterday as you can read I entered SetMode.
Also if using MT mode will this be the script?
a = last
b=a.degrainmedian(mode=1)
MT("SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)")
I think I tried it yesterday and got some error saying the vertical heigh has change and telling me to try verticalsplize=enable or something like that.
foxyshadis
1st August 2006, 17:51
I ususally use:
MT("
#entire script inside here
")
which works fine, doesn't have to be all on one line. I had trouble getting setmtmode to give good results during playback, presumably because the source couldn't be loaded after the mode was set.
Pookie
1st August 2006, 19:13
shaolin95 - Do you have the modded AviSynth.dll for MT loaded?
http://www.avisynth.org/tsp/
shaolin95
1st August 2006, 19:50
Great..Ill give it a try tonight. Thanks!
PS Yes I do have the modified one but thanks for telling me :-)
UPDATE:!
It worked perfectly! The difference between using dual core and single is great and makes it possible for real time dvd playback unlike before.
The image I am getting is awesome as I get really great detail without the usual artifacts that my pushing sharpeness levels cause. I am completely stunned by the my new and improved PQ. My infocus 4805 (8' wide screen) has never looked better. If you have the power to make it run smoothly its simply amazing for real time dvd playback.
Thanks for this masterpiece.
flood555
9th August 2006, 11:26
I have a source from DV camera,interlaced.Trying next:
LoadPlugin("D:\Capture\dll\TomsMoComp.dll")
LoadPlugin("D:\Capture\dll\FFT3dGPU.dll")
LoadPlugin("D:\Capture\dll\depan.dll")
LoadPlugin("D:\Capture\dll\RemoveGrain.dll")
LoadPlugin("D:\Capture\dll\MaskTools.dll")
LoadPlugin("D:\Capture\dll\Repair.dll")
Import("D:\Capture\SeeSaw.avsi")
AVISource("D:\Capture\da.avi")
ConvertToyv12()
TomsMoComp(1,5,1)
Motion=DePanEstimate(trust=2.5,fftw=true)
DePanInterleave(data=Motion)
MergeChroma( FFT3Dgpu(sigma=2, plane=0, bt=3, bw=32, bh=32, sharpen=1),
\ FFT3Dgpu(sigma=2, plane=3, bt=3, bw=32, bh=32, sharpen=1))
SelectEvery(3,1)
DePanInterleave(data=Motion)
MergeChroma( FFT3Dgpu(sigma=2, plane=0, bt=3, bw=4, bh=4, sharpen=1),
\ FFT3Dgpu(sigma=2, plane=3, bt=3, bw=4, bh=4, sharpen=1))
SelectEvery(3,1)
a=last
b=a.RemoveGrain(mode=25)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
BilinearResize(512,384)
SeeSaw.avsi contains:
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : yv12lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
NRdiff = yv12lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = yv12lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.maskedmerge(tame,tame.prewitt(multiplier=1.0).expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
Soothe(last,tame,sootheT,sootheS)
sharpdiff= yv12lutxy(tame,last,"x y - 128 +",U=1,V=1)
(NRlimit==0) ? clp : \
yv12lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)
Slimit>=0 ? yv12lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : yv12lutxy(last,sharpdiff,"y 128 = x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)
return( last )
}
When try open script in VD,getting an error:
http://img127.imageshack.us/my.php?image=1jk6.png
How to resolve that problem?Any advice...
Boulder
9th August 2006, 12:07
You miss this from your SeeSaw.avsi:
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
flood555
9th August 2006, 13:36
Thanx for quick replay!Now SeeSaw looks:
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : yv12lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
yv12lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y = x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",U=2,V=2)
return( last )
}
NRdiff = yv12lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = yv12lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.maskedmerge(tame,tame.prewitt(multiplier=1.0).expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
function Soothe(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
yv12lutxy(orig,sharp,"x y - 128 +","x y - 128 +","x y - 128 +", U=1,V=1)
(sootheS==0) ? last
\ : yv12lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", U=1,V=1)
(sootheT==0) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
(sootheT > -1) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
yv12lutxy(orig,last,"x y 128 - -","x y 128 - -","x y 128 - -",U=1,V=1)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
Soothe(last,tame,sootheT,sootheS)
sharpdiff= yv12lutxy(tame,last,"x y - 128 +",U=1,V=1)
(NRlimit==0) ? clp : \
yv12lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)
Slimit>=0 ? yv12lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : yv12lutxy(last,sharpdiff,"y 128 = x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)
return( last )
}
Again VD error:
http://img116.imageshack.us/my.php?image=afud6.png
What's wrong?
Boulder
9th August 2006, 16:17
Like the error message says, you ran out of video memory. You have four FFT3DGPU calls so it's no wonder.
flood555
9th August 2006, 19:58
Like the error message says, you ran out of video memory. You have four FFT3DGPU calls so it's no wonder.
So,seems 2GB of RAM isn't enough:( .I've excluded two FFT3DGPU calls and now script's working fine.Thanx a lot!;)
foxyshadis
9th August 2006, 21:07
You might have 2GB of ram, but likely only 256MB or less of video ram. ;)
Boulder
9th August 2006, 21:10
I actually thought that a recent version of FFT3DGPU is supposed to use the system ram if you run out of video ram. Looks like it isn't so.
Anyway, the filter would probably get dead slow if it used the system ram in flood555's case.
flood555
9th August 2006, 22:19
I actually thought that a recent version of FFT3DGPU is supposed to use the system ram if you run out of video ram. Looks like it isn't so.
Me too...
序列人
10th August 2006, 04:29
This is my avs file as follow,why this always clues to wrong,it worries me so much.and i really can not find a better way to solve.pls help me as soon as possible.Deadly Thanks.
# PLUGINS
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\removegrain.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\warpsharp.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\Repair.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\degrainmedian.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\cnr2.dll")
Import("c:\PROGRA~1\AviSynth 2.5\plugins\seesaw.avs")
DGDecode_mpeg2source("I:\08.05.06.Capote.2005.NTSC.R3.DVDR-iCETEA\VTS_02_1.d2v",info=3)
ColorMatrix(hints=true)
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(clip2=tdeintted).tdecimate(hybrid=1)
crop(2,64,716,352)
AddBorders(2,0,2,0)
a = last
b=a.degrainmedian(mode=1).cnr2()
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=6, Spower=8, Sdamp=5, Szp=16)
http://img161.imageshack.us/img161/8753/snap2at6.jpg
Didée
10th August 2006, 05:58
Older versions of SeeSaw had only one "Sdamp" parameter. Probably you're importing a newer version, where "Sdamp" was was replaced by "SdampLo", along with adding "SdampHi".
序列人
10th August 2006, 06:24
# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Did閑, for your pleasure.
#
# ======= Main function =======
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : yv12lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
NRdiff = yv12lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = yv12lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.maskedmerge(tame,tame.prewitt(multiplier=1.0).expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
Soothe(last,tame,sootheT,sootheS)
sharpdiff= yv12lutxy(tame,last,"x y - 128 +",U=1,V=1)
(NRlimit==0) ? clp : \
yv12lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)
Slimit>=0 ? yv12lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : yv12lutxy(last,sharpdiff,"y 128 = x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
yv12lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y = x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",U=2,V=2)
return( last )
}
# ======= Soothe() function to stabilze sharpening =======
function Soothe(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
yv12lutxy(orig,sharp,"x y - 128 +","x y - 128 +","x y - 128 +", U=1,V=1)
(sootheS==0) ? last
\ : yv12lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", U=1,V=1)
(sootheT==0) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
(sootheT > -1) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
yv12lutxy(orig,last,"x y 128 - -","x y 128 - -","x y 128 - -",U=1,V=1)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
this my seesaw.avs!
Pookie
10th August 2006, 07:37
OK, you have a version that supports SdampLo and SdampHi
Change you script to:
a = last
b=a.degrainmedian(mode=1).cnr2()
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=6, Spower=8, Sdamplo=5, Szp=16)
-----------------------------------------------------------
The plugin DegrainMedian(mode=1) looks very nice with SeeSaw and is fast, but try a lower noise reduction setting like NRlimit=4, NRLimit2=5 or lower for newer movies.
序列人
10th August 2006, 08:43
This is my avs file as follow,why this always clues to wrong,it worries me so much.and i really can not find a better way to solve.pls help me as soon as possible.Deadly Thanks.
# PLUGINS
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\SSETools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\asharp.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\aWarpSharp.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\mt_MaskTools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\MaskTools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\removegrain.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\warpsharp.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\Repair.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\degrainmedian.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\fft3dfilter.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\VagueDenoiser.dll")
#Import("c:\PROGRA~1\AviSynth 2.5\LimitedSharpenFaster.avsi")
#Import("c:\PROGRA~1\AviSynth 2.5\plugins\seesaw.avs")
#Import("c:\PROGRA~1\GORDIA~1\AviSynthPlugins\limitedsharpen.avs")
Import("c:\PROGRA~1\GORDIA~1\AviSynthPlugins\MCNR_simple2.avs")
#converttoyv12()
DGDecode_mpeg2source("I:\08.05.06.Capote.2005.NTSC.R3.DVDR-iCETEA\VTS_02_1.d2v",info=3)
ColorMatrix(hints=true)
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(clip2=tdeintted).tdecimate(hybrid=1)
crop(2,64,716,352)
AddBorders(2,0,2,0)
trim(25000,26000)
a = last
b=mcnr_simple2(frames=3,thY=24,thC=20,thY2=-1,thC2=-1,removdirt=true,LPrad=2.0,LPlosens=1,LPhisens=5).LimitedSharpenFaster(ss_x=2.5,ss_y=2.5,strength=100,smode=4)
SeeSaw(a,b,NRlimit=17,bias=18,Smode=11,Szp=18,SdampLo=20)
http://img301.imageshack.us/img301/461/snap2je6.jpg
thx very much!
Blue_MiSfit
10th August 2006, 08:55
a bit OT, but I know for a fact that the NTSC version of Capote is 24p with pulldown, why not just use force film and not deinterlace??
Sorry to be OT :)
~MiSfit
Didée
10th August 2006, 14:10
1) To use MCNR_simple, you have to import MVTools.dll & RemoveDirt.dll
2) In the last script, you've commented out (#) the imports for SeeSaw and LimitedSharpenFaster, although you're still using both these functions in the script. Remove the according # signs.
Facct
13th August 2006, 20:10
First thing I want to say is Didee, even though you're not particularly interested in that area, your functions take HTPC to a whole nother level and without them i would consider the £1300 i spent on mine a complete waste. So thanks for all your hard work.
Up until recently I was using LSF which is great, but now with the multithreaded ffdshow builds i'm finally able to run SeeSaw and resize DVD's to 1920x1080 (and even throw in a LSF call in there too on some DVD's) and DAMN, it raises the bar even higher, it looks freakin amazing.
However, I can't seem to get SeeSaw to play nice with any film-source NTSC (PAL and 29.97 NTSC are fine), each second it seems to skip the 23rd frame and then duplicate the 24th from what I can tell. I'm using NVIDIA PureVideo Decoder for the 3:2 pulldown. Here's the call:
MT("a=last
b=a.mergeluma(removegrain(4,-1),0.28)
SeeSaw(a,b, NRlimit=2, NRlimit2=8, bias=49,Smode=11,Szp=16,SdampLo=18,SdampHi=28)
converttoyv12()")
Any ideas?
shaolin95
13th August 2006, 20:35
So facct, do you consider Seesaw to be better than LSF? I have been trying both and I still like LSF more. Do you mind sharing your call scripts so that I can try them.
I am currently testing many different ones and for some reason I like this one which seem kind of extreme:
Import("C:\Program Files\AviSynth 2.5\plugins\LimitedSharpenFaster.avs")
SetMTMode(2)
MT("LimitedSharpenFaster(ss_x=2,ss_y=2,Smode=3,strength=400, overshoot=1,wide=true)")
MT("Colormatrix()")
I am gonna give the one you posted a try as well.
Facct
13th August 2006, 23:03
Well I was never really able to use LSF with supersampling on DVD's, but now with the ffdshow multithreading I'm able to resize to 1920x1080 first and then sharpen at the target size (unfortunately no denoising before LSF or Soothe, which might well change things), and yes imo SeeSaw and then resize is better - especially because on some DVD's I can call LSF either within or after SeeSaw (sometimes I have to use Lanczos2, though).
shaolin95
14th August 2006, 00:14
The supersampling and wide option makes the image "smoother" and cleaner when sharpening in my case. How does that lsf and seesaw call looks like? I tried it once (briefly) and it was all weird artifacts.
Jeremy Duncan
14th August 2006, 18:29
a= last
b=a.hqdn3d(0.0, 2.0, 0.0, 4.0)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
If I remove the a,b from the seesaw script the picture looks clean.
With it included in the script it looks quite grainy.
Notice I've changed the slimit and spower settings.
Maybe, Dideé.
You can fix it so I can use the a,b in the seesaw script I posted.
I use this when I use seesaw;
a= last
b=a.hqdn3d(0.0, 2.0, 0.0, 4.0)
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
Jeremy Duncan
14th August 2006, 18:30
What's the bare minimum cpu that can run this seesaw script ?
a= last
b=a.hqdn3d(0.0, 2.0, 0.0, 4.0)
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
Pookie
14th August 2006, 18:35
Jeremy -
That isn't going to work without adding "a,b" in the SeeSaw line. Add it back.
I would use DegrainMedian(mode=1) instead of HQ3d... - It looks especially nice with SeeSaw
If you want it to run faster, use RemoveGrain(mode=25)
Jeremy Duncan
14th August 2006, 18:42
I like this script the best.
a= last
b=a.SPresso(2, 20, 4)
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
I know the a,b in the seesaw was intended to be there.
Try the seesaw script I just posted.
Seeing is believing.
It (seesaw), still works without putting the a,b in the seesaw script.
I want the seesaw improved so I can put the a,b back into the script I just posted without it being all grainy.
Try this script with and without the a,b
Seeing is believing.
If it shouldn't work, I don't know why it is.
:helpful:
Boulder
14th August 2006, 18:48
With that script, you are actually feeding the a-clip twice and you don't use the denoised clip anywhere at all. SeeSaw does a simple cleanup if you don't define a b-clip.
So if you like the results, you can ditch the b-portion completely.
Jeremy Duncan
14th August 2006, 19:03
The top picture used this;
SPresso(2, 20, 4)
LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=100,overshoot=1)
The bottom picture used this;
a= last
b=a.SPresso(2, 20, 4)
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
Both were resized by a multiple of 2.0, Lanczos, 2 taps.
http://upload.enetation.co.uk/uploads/7e17bd3316.png
Boulder
14th August 2006, 19:10
What are you trying to show with those screenshots?
a= last
b=a.SPresso(2, 20, 4)
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)is the same as
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)but slower.
Jeremy Duncan
14th August 2006, 19:47
http://upload.enetation.co.uk/uploads/1cc9a8b816.png
http://upload.enetation.co.uk/uploads/ac04c98765.png
Top picture settings.
a= last
b=a.SPresso(2, 20, 4)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
Bottom picture settings.
a= last
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
Same resizing as before.
When I use the a, b in the seesaw script, and the denoiser. I get a lot more grain in the picture.
I'm not sure if you can see it, but the top picture shows the grain.
Jeremy Duncan
14th August 2006, 19:53
What are you trying to show with those screenshots?
I was trying to show that seesaw improves the picture better than limitedsharpenfaster, even without using the denoiser and a,b in the seesaw script.
The picture with the guy with the hat.
The top picture has grain disfiguring his face, the walls too.
I wanted to show Dideé this so it might help somehow.
In some way, I dunno.
Boulder
14th August 2006, 20:56
If you don't specify the a- and b-clips in SeeSaw, the function does some denoising on its own because SeeSaw would be totally useless if there wasn't a denoised clip available for it to use. You can affect the output greatly by using an appropriate denoiser.
This snippet shows you what it does to create a denoised clip:
mt_lutxy(clp,clp.removegrain(4),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
SeeSaw often does a better job than LSF but it depends on the material, good quality source is the most important thing. And there is a price to pay - encoding time.
shaolin95
14th August 2006, 21:06
I just think seesaw looks a bit soft compared to LSF... I know the strenght parameter we shouldnt play with it so what else can I change to make it a bit sharper?
Boulder
14th August 2006, 21:14
By raising SLimit? The docs say that you shouldn't touch the sharpening strength too much
BigDid
14th August 2006, 21:39
I just think seesaw looks a bit soft compared to LSF... I know the strenght parameter we shouldnt play with it so what else can I change to make it a bit sharper?
Hi,
If Spresso is involved (like here: SPresso(2, 20, 4) ), you might want to know that removegrain mode=4 (last param) is one of the strongest compression mode available in RMG; and it soften a lot!. Other modes can also be used like mode=17 or less compressible like mod 8 or 9; same use: SPresso(2, 25, 17)
Did
shaolin95
15th August 2006, 02:34
I dont use Spresso, I use degrainmedian(mode=2). Still LSF gives me better results.
Jeremy Duncan
15th August 2006, 02:46
Hi,
If Spresso is involved (like here: SPresso(2, 20, 4) ), you might want to know that removegrain mode=4 (last param) is one of the strongest compression mode available in RMG; and it soften a lot!. Other modes can also be used like mode=17 or less compressible like mod 8 or 9; same use: SPresso(2, 25, 17)
Did
I tried SPresso(2, 25, 17) vs SPresso(2, 20, 4).
I see the spresso is a little less sharp than either hqdn3d(0.0, 2.0, 0.0, 4.0) or denoise3d; 0.0, 2.0, 4.0, HQ checked.
But the mode 4 is no different to my eye and screenshot comparison than mode 17.
BigDid
15th August 2006, 03:03
I tried SPresso(2, 25, 17) vs SPresso(2, 20, 4).
I see the spresso is a little less sharp than either hqdn3d(0.0, 2.0, 0.0, 4.0) or denoise3d; 0.0, 2.0, 4.0, HQ checked.
But the mode 4 is no different to my eye and screenshot comparison than mode 17.
Hi,
Defaut given by Didée is 2 for limit ; 25 for strength and 4 for removegrain mode: http://forum.doom9.org/showthread.php?p=743559#post743559
Please compare at equal strength:
2, 25, 4 against
2, 25, 17
Or at 30/33 strength which seems (for me) the compromise between compressibility (file size) and strength (softening) and I do see some differences between the mode 4 and 17 (a little sharper, a little less compressible).
Lots of tools actually available, pick your own :)
Did
Jeremy Duncan
15th August 2006, 07:34
I looked at screenshots that shows loss/gain between 2 pictures quality.
I saw what looked like a little better sharpness using 2, 25, 17
But it was so faint that it might have been my imagination.
I used;
2, 25, 4
vs
2, 25, 17
Jeremy Duncan
15th August 2006, 08:17
Ok. So this is what I'm using for seesaw. Is this right Boulder ?
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
Boulder
15th August 2006, 08:19
Yes, if you don't wish to use any denoised clip of your own.
Jeremy Duncan
15th August 2006, 09:01
Dideé,
I understand from your first post in this thread that Pookie released Seesaw without your permission.
My question is when will you officially release Seesaw ?
I don't want to use the one Pookie released.
Didée
15th August 2006, 09:23
No reason to flinch from using it. Pookie had my OK to post it, and after all, there even were quite a few updates since the first post ... ;)
One of the main reasons to hold SeeSaw back was that I wanted to include a tailored halo-protection. Currently, if the source already has slight halos, there is danger that they will be emphasised. (In the script there's a commented "head=head.maskedmerge(..." line, which will help for the problem when it's uncommented. Not the perfect solution, but it's not bad, either.)
Jeremy Duncan
15th August 2006, 09:47
No reason to flinch from using it. Pookie had my OK to post it, and after all, there even were quite a few updates since the first post ... ;)
One of the main reasons to hold SeeSaw back was that I wanted to include a tailored halo-protection. Currently, if the source already has slight halos, there is danger that they will be emphasised. (In the script there's a commented "head=head.maskedmerge(..." line, which will help for the problem when it's uncommented. Not the perfect solution, but it's not bad, either.)
Ok. I'll use Seesaw then.
Thank you for building it.
Pookie
15th August 2006, 09:58
Dideé,
I understand from your first post in this thread that Pookie released Seesaw without your permission.
My question is when will you officially release Seesaw ?
I don't want to use the one Pookie released.
http://wilstar.com/midi/twilzone.wav :D
BigDid
15th August 2006, 18:46
I saw what looked like a little better sharpness using 2, 25, 17
But it was so faint that it might have been my imagination.
I used;
2, 25, 4
vs
2, 25, 17
Hi,
I noticed (and indicated) more differences in
2, 33, 4 -> softer, more compressible
vs
2, 33, 17-> sharper, less compressible
Did
Facct
15th August 2006, 22:06
No reason to flinch from using it. Pookie had my OK to post it, and after all, there even were quite a few updates since the first post ... ;)
One of the main reasons to hold SeeSaw back was that I wanted to include a tailored halo-protection. Currently, if the source already has slight halos, there is danger that they will be emphasised. (In the script there's a commented "head=head.maskedmerge(..." line, which will help for the problem when it's uncommented. Not the perfect solution, but it's not bad, either.)
Dideé, do you have any ideas re the real-time NTSC playback problem? (http://forum.doom9.org/showthread.php?p=862776#post862776)
Jeremy Duncan
16th August 2006, 04:01
Hi BigDid,
I tried;
2, 33, 4
vs
2, 33, 17
I compared frames.
When I do this I can see minut changes in the picture.
I use Windows picture and fax viewer.
There was no difference between these two settings.
I can see a different between;
SPresso(2, 20, 4)
hqdn3d(0.0, 2.0, 0.0, 4.0)
denoised3d; 0.00, 2.00, 4.00, HQ checked.
Mug Funky
16th August 2006, 04:21
@ facct:
seesaw doesn't cause dupe-frames. that'll most likely be nvidia doing that.
Facct
17th August 2006, 01:42
I see, but there is no problem with IVTC with any other combination of source/filtering, only SeeSaw manages to break it!
Pookie
17th August 2006, 03:05
Facct - Do you have the PureVideo 1.02-223 from June 28th?
http://www.nvidia.com/object/dvd_decoder_1.02-223-retail.html
That seems to be the latest.
You can also try the Dscaler decoder with IVTC from -
http://www.avsforum.com/avs-vb/showthread.php?t=596942&page=4&pp=30&highlight=1080i+dscaler5
Another possible workaround might be using Tom Barry's Uncomb filter, which is supposed to be a fast IVTC filter for Avisynth.
http://mywebpages.comcast.net/trbarry/downloads.htm
Also, there may be a bug in the Avisynth plugin for FFdshow - purely guessing, but it could be something to check.
Finally, there's always LimitedSharpen, which could be an interesting test to see if the issue persists.
I think I recall Dideé mentioning that he doesn't use his functions for playback on his system, and SeeSaw.avs has the "Consider this Alpha" disclaimer, so you may have to address the issue from other angles.
Encode a clip of data with SeeSaw and go frame by frame through the target, looking for interlace/Telecine artifacts.
BTW, I liked your settings with SeeSaw that you posted. Looks nice on a lot of different sources.:)
shaolin95
17th August 2006, 17:13
I cant seem to make my mind between LSF and Seesaw. I thought LSF was sharper and better but yesterday I tried seesaw and tweaked some more and now it seems bring out small detail better than LSF. Gonna have to sit down and take lots of screenshots with different settings to compare. Any reference scenes that will help pinpoint artifacts easier?
foxyshadis
17th August 2006, 20:25
Anything with DCT artifacts ("mosquito noise"), anything with a lot of banding.
Jeremy Duncan
18th August 2006, 16:40
SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, Sdamplo=6, Szp=16)
This new SeeSaw script is easier on the cpu, but not as detailed as the quoted one.
SeeSaw(NRlimit=2, NRlimit2=2, Sstr=1.0, Slimit=16, Spower=4, Sdamplo=6, Szp=16, bias=49)
Jeremy Duncan
19th August 2006, 14:16
a= last
b=a.SPresso(2, 20, 4)
SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=16, Spower=4, Sdamplo=6, SdampHi=15, Szp=16, bias=50, sootheT=1)
Here's another SeeSaw script to try.
:helpful:
ARL67
19th August 2006, 18:17
Just an FYI:
I agree with Jeremy that putting a & b in the SeeSaw call makes things very grainy, regardless of what b might be.
- Andy
Jeremy Duncan
20th August 2006, 00:12
Decent results;
SetMTMode(2)
MT("SeeSaw(NRlimit=2, NRlimit2=2, Sstr=1.0, Slimit=16, Spower=4, Sdamplo=6, Szp=16, bias=49)")
Better Results;
SetMTMode(2)
MT("SeeSaw(NRlimit=2, NRlimit2=1, Sstr=1.0, Slimit=16, Spower=4, Sdamplo=6, SdampHi=15, Szp=16, bias=50, sootheT=1)")
Best Results;
SetMTMode(2)
MT("SeeSaw(NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=16, Spower=4, Sdamplo=6, SdampHi=15, Szp=16, bias=50, sootheT=1)")
I removed the a,b in the SeeSaw script.
shaolin95
20th August 2006, 23:06
Do you mind trying this and seeing how it compares in your opinion, to your seesaw results?
SetMTMode(2)
MT("HQDN3D(2)")
MT("LimitedSharpenFaster(ss_x=1.5,ss_y=1.5,Smode=3,lmode=2,strength=200,wide=true, overshoot=0)")
Gonna do the same now but need to get some window sun blocker for my room.
Jeremy Duncan
21st August 2006, 03:54
Do you mind trying this and seeing how it compares in your opinion, to your seesaw results?
SetMTMode(2)
MT("HQDN3D(2)")
MT("LimitedSharpenFaster(ss_x=1.5,ss_y=1.5,Smode=3,lmode=2,strength=200,wide=true, overshoot=0)")
The quoted settings are better than my "Decent" and "Better" settings.
But my "Best" settings show more detail than the quoted settings.
shaolin95
21st August 2006, 05:46
It does have more detail but unfortunately also a lot of artifacts. What is your display? You can try strength 300 with my script to achieve a sharper image and still not get the artifacts I got with the seesaw call. Maybe you are resizing before or something else I am not doing.
Like this:
SetMTMode(2)
MT("HQDN3D(1)")
MT("LimitedSharpenFaster(ss_x=1.5,ss_y=1.5,Smode=3,lmode=2,strength=300,wide=true, overshoot=0)")
Regards
frednerk33
21st August 2006, 10:55
Amazing Pookie strong denoising magic ... SeeSaw combined with MVDegrain2 and DeGrainMedian ...
Samples in http://forum.doom9.org/showthread.php?p=865872#post865872
Code in http://forum.doom9.org/showthread.php?p=865906#post865906
Couldn't believe my eyes.
Jeremy Duncan
21st August 2006, 12:53
The Plugin's you'll need to run the tests.
http://img244.imageshack.us/img244/7937/pluginsic6.jpg
http://avisynth.org.ru/mvtools/mvtools-v1.4.10.zip
http://avisynth.org.ru/degrain/degrainmedian081.zip
http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar
http://manao4.free.fr/MaskTools-v1.5.8.zip
http://home.arcor.de/dhanselmann/_stuff/SeeSaw_2006.01.02.rar
http://manao4.free.fr/masktools-v2.0a28.zip
Pookies
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
Mine
SeeSaw(NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=16, Spower=4, Sdamplo=6, SdampHi=15, Szp=16, bias=50, sootheT=1)
shaolin95
LimitedSharpenFaster(ss_x=1.5,ss_y=1.5,Smode=3,lmode=2,strength=300,wide=true, overshoot=0)
Order of Pictures from Left to right; Pookie, Me, shaolin95 (http://upload.enetation.co.uk/uploads/7fd134cd48.png)
Order of Pictures from Left to right; Pookie, Me, shaolin95 (http://upload.enetation.co.uk/uploads/95dd396b0d.png)
Jeremy Duncan
21st August 2006, 12:57
It does have more detail but unfortunately also a lot of artifacts. What is your display? You can try strength 300 with my script to achieve a sharper image and still not get the artifacts I got with the seesaw call. Maybe you are resizing before or something else I am not doing.
Regards
I resize after Avisynth. My Monitor is a Samsung 793df.
frednerk33
21st August 2006, 13:44
Very Subjectively, to me, Pookie's seems nice, then Jeremy's, then shaolin95 ... how does one ask for a poll (you may consider one if it's easy) ?
PS I'm not sure how much diff the SeeSaw settings make if you fiddle with them for this source...
shaolin95
21st August 2006, 16:03
I resize after Avisynth. My Monitor is a Samsung 793df.
Perhaps in the smaller display is not visible but I get very bad artifacts (easy to see in motion) with your seesaw script with my front projector. I am gonna play with it to see which paramater is causing that.
Pookie
21st August 2006, 17:09
Just to demonstrate that the source file dictates which type of script to use - Here's a noisy, grainy source image
Source Frame
http://fileserver2.jpghosting.com/images/tn_Source-0059_35d3e1ca7105175cb9bbfc5e19eb8b80.png (http://fileserver2.jpghosting.com/images/Source-0059_35d3e1ca7105175cb9bbfc5e19eb8b80.png)
Jeremy's Script
http://fileserver2.jpghosting.com/images/tn_Jeremy-0059_635ac67e2911e40ddccb0c85030c714e.png (http://fileserver2.jpghosting.com/images/Jeremy-0059_635ac67e2911e40ddccb0c85030c714e.png)
Shaolin's Script
http://fileserver2.jpghosting.com/images/tn_Shaolin-0059_e3d64aaf7f7e5013659d5f4a2e5bd355.png (http://fileserver2.jpghosting.com/images/Shaolin-0059_e3d64aaf7f7e5013659d5f4a2e5bd355.png)
Pookie's Script
http://fileserver2.jpghosting.com/images/tn_MVdegrain-0059_84af7bd165aed6a1b0ef29af7cd42376.png (http://fileserver2.jpghosting.com/images/MVdegrain-0059_84af7bd165aed6a1b0ef29af7cd42376.png)
Conversely, it would be silly to use MVdegrain with SeeSaw on a great quality source.
shaolin95
22nd August 2006, 05:29
Agree just noticed that my call really looks bad for some dvds and good for others. I am now trying this one and seem to like it:
MT("colormatrix",3)
MT("a = last
b=a
SeeSaw(a,b, NRlimit=1, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, SdampLo=6, Szp=16)",3)
NOTE: resize 1.5 lanczos 4 BEFORE the avisynth
Jeremy Duncan
22nd August 2006, 18:48
Pookies; Top Left Picture.
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
Mine; Top Right Picture.
MT("SeeSaw(NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=16, Spower=4, Sdamplo=6, SdampHi=15, Szp=16, bias=50, sootheT=1)",3)
Shaolin95; Bottom Left Picture.
MT("colormatrix",3)
MT("SeeSaw(NRlimit=1, NRlimit2=4, Sstr=1.5, Slimit=16, Spower=10, SdampLo=6, Szp=16)",3)
Mine; Bottom Right Picture.
MT("SPresso(2, 20, 4)
LimitedSharpenFaster(ss_x=1.0,ss_y=1.0,Smode=3,strength=100,overshoot=1)",3)
Link to Picture (http://fileserver2.jpghosting.com/images/PookieMeShaolinMe_948017e3ec8418fb8af48e8852590cbf.PNG)
Jeremy Duncan
22nd August 2006, 18:50
Pookie,
I tried to use MT on your script.
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
It would not play using MT. I tried just the Seesaw, just the Seesaw and denoise, and the entire script.
I got 3fps not using any MT.
Boulder
22nd August 2006, 18:54
Any MVTools-related function doesn't work with multithreading (MT or SetMTMode) and MVDegrain is one of those. Leave the a-clip out of the MT call and it should work.
Jeremy Duncan
22nd August 2006, 19:33
Any MVTools-related function doesn't work with multithreading (MT or SetMTMode) and MVDegrain is one of those. Leave the a-clip out of the MT call and it should work.
MT("backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
SeeSaw( NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )",3)
This one can use MT. It goes from 3fps not using MT, to 14fps using MT.
shaolin95
22nd August 2006, 19:36
Nice comparison Jeremy. I think mine shows more "detail" followed by your top right one show better detail but I am not sure if I like what colormatrix does to mine. Are you using Theater Tek? If you are try this, take a screen shot using nvidia AND ffdshow processing and then using only ffdshow. For some reason I get a color change (basically reds) when trying these two settings.
Boulder
22nd August 2006, 19:42
MT("backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
SeeSaw( NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )",3)
This one can use MT. It goes from 3fps not using MT, to 14fps using MT.
No, it will be screwed up one way or the other. MVTools is not multithread friendly at the moment, if you don't believe me, just take a look at the MVTools thread.
Jeremy Duncan
22nd August 2006, 20:01
No, it will be screwed up one way or the other. MVTools is not multithread friendly at the moment, if you don't believe me, just take a look at the MVTools thread.
To use MT;
This must be changed...
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
To this
MT("SeeSaw(NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )",3)
shaolin95
22nd August 2006, 23:25
Newer and slightly better (I hope) call:
resize 1.5x lanc4
then:
MT("SeeSaw(NRlimit=0, NRlimit2=4, Sstr=1.5, Slimit=56, Spower=10, SdampLo=6,Szp=16,bias=50,soothet=60)",3)
MT("ColorMatrix()",3)
bkman
23rd August 2006, 01:31
Any MVTools-related function doesn't work with multithreading (MT or SetMTMode) and MVDegrain is one of those. Leave the a-clip out of the MT call and it should work.
I've gotten it to work on my single-core. See: http://forum.doom9.org/showthread.php?p=866343#post866343
Does it suddenly fail on an actual dual-core?
Boulder
23rd August 2006, 05:10
It shouldn't just fail but it may cause some weird behaviour and artefacts. This is what tsp (the author of multithreaded Avisynth) said:
Mvtools is not coded with multithreading in mind as there are many places in the code that could cause trouble with multithreading(like global motion getting estimated by two different frames at the same time making it rather random witch value will be used).So I really wouldn't use any multithreading for the MVTools-related part of the script. You can use SetMTMode if you add SetMTMode(5) right before those MVTools parts and then re-enable multithreading by adding SetMTMode(2) (or whatever mode you use) after them.
Backwoods
23rd August 2006, 05:18
EDIT: Nevermind, I see that MVTools wasn't called in the changed script. MVTools doesn't work with MT in my test scripts.
bkman
23rd August 2006, 08:11
It shouldn't just fail but it may cause some weird behaviour and artefacts. This is what tsp (the author of multithreaded Avisynth) said:
So I really wouldn't use any multithreading for the MVTools-related part of the script. You can use SetMTMode if you add SetMTMode(5) right before those MVTools parts and then re-enable multithreading by adding SetMTMode(2) (or whatever mode you use) after them.
That's odd. I've tested pookie's script that uses MVAnalyse and MVDegrain with two threads, and it works without errors or corrupted output in modes 2 and 5/6 (though all others fail or result in corrupt output). Mode 2 was quite a bit slower than the mode 5/6, however.
Would it behave differently on a dual-core CPU vs a single-core using two threads?
Boulder
23rd August 2006, 08:16
Post the scripts you used..
If you read the quote I posted, you see it may or may not work but MVTools is not multithread friendly. You might not see the artefacts in one frame but they may appear in the other.
It doesn't matter whether you have one or two cores because the principle is the same.
bkman
23rd August 2006, 08:37
The script was basically this:
SetMTmode(2,2)
loadplugin("removegrainsse2.dll")
loadplugin("masktools.dll")
loadplugin("mvtools.dll")
loadplugin("repairsse2.dll")
import("seesaw.avs")
DGDecode_mpeg2source("VTS_11.d2v",info=3)
ColorMatrix(hints=true)
crop( 8, 16, -8, -16)
deblock()
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = last.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = last.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
a=last.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.RemoveGrain(mode=11)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Spower=8, Szp=16,soothet=80)
I encoded 300 frames and compared against the single-threaded output. It was bit-identical.
Btw, I realize now that mode 5 disables multi-threading (though it's not documented) so I didn't post that.
Boulder
23rd August 2006, 08:41
You've had some luck there. The idx's are a real swamp what comes to multithreading (probably one big reason for MVTools not being MT-compliant). Did you do a binary compare?
Try encoding the whole clip and see what happens.
bkman
23rd August 2006, 08:46
Did you do a binary compare?
Just an md5sum, but I trust it ;)
Try encoding the whole clip and see what happens.
That would take way too long. Do you have a dual-core to try it on?
Boulder
23rd August 2006, 08:49
I've tried running MVTools stuff in two threads and I know it doesn't work. I asked tsp about it and already posted his response. It seems I'm just banging my head against the wall here but to save Didée and Fizick (and others as well) a few bug reports, I still say "don't use multithreading for any MVTools-related thingies".
bkman
23rd August 2006, 08:51
Maybe you should just say: Use with caution! :p
shaolin95
23rd August 2006, 19:28
Levels; Input 0-235, Output 0-255
I was playing with that a few days ago but doesnt it creat blooming for you? I also saw some defaul Didee setups there.
Jeremy Duncan
23rd August 2006, 19:44
I use Levels like that because it helps. I know that it won't work for every monitor, but it gives mine that extra "Pep".
I didn't understand what you said about Dideé ?
Say again, please.
shaolin95
23rd August 2006, 19:55
If you look inside the LEVELS option where it says MODE: there are some named after Didee.
Jeremy Duncan
23rd August 2006, 20:01
Yeah, I see it.
Didée
23rd August 2006, 20:21
Oh, you're talking about those modes for levels in ffdshow?
Never mind, don't use them. Seems that Milan misinterpreted(?) the LUT expressions from within those YLevelsX() functions, because:
In ffdshow, YLevelsG/S/C do the exact opposite of what I intended them to do ...
shaolin95
23rd August 2006, 23:51
Thanks Didee! BTW, since I rarely have the chance to "talk" to you, let me say a big THANKS! You are a freaking Genius not to mention the reason I cant sleep due to my addiction of tweaking Seesaw, Limited Sharpen etc :-)
So, let me ask you about levels, do you think I should input 16-235 and output 0-255 or is that better left untouched for real time dvd playback? Same goes for colormatrix, do I need it for dvd playback?
Sorry to bother :-)
foxyshadis
24th August 2006, 00:45
Colormatrix (used properly) can't hurt, it can only help; as long as the d2v is passed in it won't accidentally butcher your colors.
Use the levels if you need to - if it's too grey, usually, or rarely in reverse if it's blown out. It depends on your video input and output more than anything.
Use HDRAGC if you want blooming/gain-corection/etc, or the simpler Bloom filter for just that. Crowbarring levels into doing it is fast but low-quality, blows out all the whites and blacks.
frednerk33
24th August 2006, 12:23
http://forum.doom9.org/showthread.php?p=866565#post866565
MT("backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
SeeSaw( NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )",3)
This one can use MT. It goes from 3fps not using MT, to 14fps using MT.
Er, please help me understand, isn't there a line or 2 missing here ? eg in relation to
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
specifcally, something which uses the stuff produced by the MVAnalyse's ? (ie what is using the vectors and giving SeeSaw the 2 clips ?)
Jeremy Duncan
24th August 2006, 12:58
MT("backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
SeeSaw( NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )",3)
This one can use MT. It goes from 3fps not using MT, to 14fps using MT.
Er, please help me understand, isn't there a line or 2 missing here ? eg in relation to
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
specifcally, something which uses the stuff produced by the MVAnalyse's ? (ie what is using the vectors and giving SeeSaw the 2 clips ?)
Your right.
Here's the full code.
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
You can put this as well.
SetMTmode(2,2)
backward_vec2 = last.MVAnalyse( isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
backward_vec1 = last.MVAnalyse( isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec1 = last.MVAnalyse( isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1 )
forward_vec2 = last.MVAnalyse( isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1 )
a = last.MVDegrain2( backward_vec1, forward_vec1, backward_vec2, forward_vec2, thSAD=400, idx=1 )
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
It works, but is no faster.
Boulder said to leave out the a clip. I wasn't sure what that meant, exactly. So I tried that quoted script.
Boulder
24th August 2006, 13:05
I don't understand why you denoise both clips..the a-clip is supposed to be the untouched one and b-clip the denoised. Oh well, each one to his choice :)
I told you to leave out the a-clip from the MT section because MVTools still isn't multithread friendly. You are just asking for trouble sooner or later if you use SetMTMode or MT with MVTools.
frednerk33
24th August 2006, 13:14
I don't understand why you denoise both clips..the a-clip is supposed to be the untouched one and b-clip the denoised. Oh well, each one to his choice :)
Good question... Pookie must have had a reason which I hope can be subject to elucidation :) Original Pookie source: http://forum.doom9.org/showthread.php?p=862199#post862199
Boulder
24th August 2006, 13:20
Hmm..the amount of grain must have been quite excessive. I've never had to use MVDegrain2 on any other material than analog captures :D
frednerk33
24th August 2006, 13:31
Well, yes, the sciipt came from
http://forum.doom9.org/showthread.php?p=865865#post865865 which dealt with significantly noisy sources with apparently great results... would that explain the denoising of both clips ? Visual results on http://forum.doom9.org/showthread.php?p=865853#post865853
fight2win
24th August 2006, 16:20
can this filter be used in megui x264 encoding, or is it just for xvid, also, should limited sharpen be also used with seesaw, or one is enough???
Boulder
24th August 2006, 17:26
It can be used with any encode.
fight2win
24th August 2006, 21:59
here is my script, can someone please tell me how to modify this script in order to use sharpening/detaling:
DGDecode_mpeg2source("E:\CHRONICLES_OF_RIDDICK\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
#blank deinterlace line
crop( 0, 60, 0, -64)
LanczosResize(720,288) # Lanczos (Sharp)
#denoise
Pookie
25th August 2006, 01:14
Good question... Pookie must have had a reason which I hope can be subject to elucidation :) Original Pookie source: http://forum.doom9.org/showthread.php?p=862199#post862199
It is the source that dictates your script settings. On very grainy sources, you might have to hit your video with a one-two punch --> filter the lows with one degrainer, filter the highs with another (or call the same filter twice with different settings to denoise the high and low frequencies). In this case, I liked the visual combination of MVdegrain and DegrainMedian processed through SeeSaw. Normally, two denoisers on a source can result in a blurry or oversmoothed target. The thing I like most about SeeSaw is the ability to retain sharpness and stability despite turning up the denoiser strength (within reason :p ).
You can see below that adding DegrainMedian(mode=1) took care of the high frequency artifacts that MVdegrain alone wasn't processing.
Your source might not need more than one degrainer, in which case you can use the "traditional" a=last and b=a.yourdegrainer() . If you like the end result, that's all that matters. :D
How about we use the same 5 second clip to have a point of reference - 20MB Mpeg2 - 23.976 fps - Big, crunchy noise with chroma grain.
http://www.bigupload.com/d=009B43FB
alternate link(rapidshare is faster)
http://rapidshare.de/files/30651466/grainy.zip.html
Here's MVdegrain on the Left. MVdegrain PLUS DegrainMedian(mode=1) on the right. Looks like chroma and high frequency noise is being filtered.
Frame 54
http://fileserver2.jpghosting.com/images/tn_54_77560ec9439c9aee55e27a7119086b12.png (http://fileserver2.jpghosting.com/images/54_77560ec9439c9aee55e27a7119086b12.png)
frednerk33
26th August 2006, 07:02
Thanks Pookie. Took your lead and tried to compare various combinations of filters with SeeSaw, on a bit of your grainy source clip.
Poor test script in http://users.tpg.com.au/walshdcw/z-seesaw.avs Tests:
1. MVDegrain2+DeGrainMedian(mode=1)
2. MVDegrain2+FFT3DFilter(sigma=3, plane=4, bt=3, sharpen=0, interlaced=false)
3. MVDegrain2+RemoveGrain(mode=17)
4. MVDegrain2+FFT3DFilter(sigma=3.5, plane=4, bt=3, sharpen=0, interlaced=false)
5. MVDegrain2+Convolution3D(0,32,128,32,128,10,0)
6. MVDegrain2+Convolution3D(1,32,128,32,128,10,0)
7. Convolution3D(0,32,128,32,128,10,0)
8. Convolution3D(1,32,128,32,128,10,0)
Results (9.6Mb .mpv) in http://users.tpg.com.au/walshdcw/z-seesaw.mpv - I'm not too sure I'm comfortable with any of these results (look at the sky)... any more suggestions for heavy noise removal & SeeSaw (usually analogue sources) ? Particuarly as shown in incredible snaps per http://forum.doom9.org/showthread.php?p=865849#post865849 Unfussed too much by FPS (or Didee type SPF :) ) processing time (want to DVD-ize family PAL-VHS of kids growing up).
References:
Original thread & pics (is "Neat Video" worth the money ?) http://forum.doom9.org/showthread.php?p=865853#post865853
Method referred to here (Noisy Witness) http://forum.doom9.org/showthread.php?p=865865#post865865
Pookie test here (New Sharpening Function from Didée -'SeeSaw') http://forum.doom9.org/showthread.php?p=867628#post867628
PS, any new news on halo removers for strong analog capture halos ? eg updates to, or daughters/sons of, dehalo_alpha
Jeremy Duncan
27th August 2006, 16:43
here is my script, can someone please tell me how to modify this script in order to use sharpening/detaling:
DGDecode_mpeg2source("E:\CHRONICLES_OF_RIDDICK\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
#blank deinterlace line
crop( 0, 60, 0, -64)
LanczosResize(720,288) # Lanczos (Sharp)
#denoise
I don't know. I don't encode, I only use realtime.
shaolin95
27th August 2006, 19:06
I don't know. I don't encode, I only use realtime.
Jeremy your latest scripts are very nice. Much more detailed than mine and with less moire and artifacts. Not sure how you do it since your strenght is kept mostly at 1.0 or 1.4 so obvi ously you know something I dont. Anyway, the only problem is a bit too much noise so I took the median denoiser and moved it to the last step of the script after seesaw and it seems to be a slightly cleaner without any compromises. Are you doing any luma sharpen when resizing?
Regards
Jeremy Duncan
27th August 2006, 19:09
No Luma Sharpening. Please post the script your talking about.
To lower the noise. Set these lower. SdampHi=10, Szp=10.
You'll lose resolution though, as this is as low as they could go while keeping the detail in the picture.
shaolin95
27th August 2006, 20:09
I am using this one:
MT("a = last
b = a.SPresso(limit=0, limitC=4, bias=0, biasC=40, RGmode=1, RGmodeC=17)
SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=16, Spower=4, Sdamplo=6, SdampHi=15, Szp=16, bias=50, sootheT=1)
DeGrainMedian(limitY=0,limitUV=4,mode=1)",3)
I am very happy how it looks so the noise is not as bad as I said in my previous post. I dont want to lose resolution in any case.
Jeremy Duncan
27th August 2006, 20:20
I've updated the script I posted for SeeSaw.
Have a look. Link (http://forum.doom9.org/showthread.php?t=115144)
The one you've just posted isn't as effective.
Jeremy Duncan
27th August 2006, 20:40
Setting to SdampHi=10, Szp=10. You'll lose no resolution ,but the noise will be much less.
Setting SdampHi, Szp, lower than this though, and you will lose resolution.
shaolin95
28th August 2006, 02:59
I somehow like the older ones better at least with my display. By using the denoiser at the end and lowering my luma sharp I finally got the desired image.
I wish I understand all those limit, rgmode, etc that you are tweaking.
turstar
31st August 2006, 17:49
ERROR ???
import("C:\Program Files\GordianKnot\AviSynthPlugins\seesaw.avs")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\removegrain.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\repair.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\ssetools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\masktools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\mt_masktools.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\undot.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
mpeg2source("E:\NEW\VIDEO_TS\matrix 1.d2v")
crop(0,80,718,416)
LanczosResize(720,288)
undot()
Convolution3d("moviehq")
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
ERROR ????
http://img435.imageshack.us/img435/8875/riprd4.jpg
Boulder
31st August 2006, 18:58
You need to specify a (and b) in your script. See the scripts other have posted here.
Jeremy Duncan
9th September 2006, 22:37
Here's a walkthrough guide for SeeSaw.
Link. (http://forum.doom9.org/showthread.php?t=115727)
spyOne
21st September 2006, 02:07
I was trying to use seesaw and i get this error:
http://img221.imageshack.us/img221/2244/errozz4.jpg
my script:
# PLUGINS
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("H:\Gordian output\Riping Add ons\Avisynth plugins\warpsharp\warpsharp.dll")
LoadPlugin("H:\Gordian output\Riping Add ons\Avisynth plugins\Masktools\MaskTools.dll")
Import("H:\Gordian output\Riping Add ons\Avisynth plugins\limitedsharpen\LimitedSharpen.avs")
loadplugin("H:\Gordian output\Riping Add ons\Avisynth plugins\degrainmedian\DeGrainMedian.dll")
LoadPlugin("H:\Gordian output\Riping Add ons\Avisynth plugins\RemoveGrain\RemoveGrainSSE3.dll")
Import("H:\Gordian output\Riping Add ons\Avisynth plugins\SeeSaw\SeeSaw.avs")
# SOURCE
mpeg2source("H:\Gordian output\Jogo Espiões\vob spllited\testes\espioestestes.d2v")
DeGrainMedian(limitY=5,limitUV=5,mode=3)
crop(2,78,716,428)
LimitedSharpen(ss_x=1.5,ss_y=1.5,Smode=4,strength=100, overshoot=1)
LanczosResize(720,304)
a = last
b=a.DeGrainMedian( mode=1 )
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Szp=16)
Im new in using scripts so be patient;)
Backwoods
21st September 2006, 04:59
Check out the post above you. You need to load mt_masktools.dll.
http://manao4.free.fr/masktools-v2.0a30.zip
Bh4i
2nd October 2006, 08:39
Does it matter if u use Seesaw (or any sharpening) before or after resizing? Should u use it as ur last script?
unskinnyboy
2nd October 2006, 13:09
Does it matter if u use Seesaw (or any sharpening) before or after resizing? Should u use it as ur last script?
Either way is OK. Resizing first is faster though, because you are reducing the pixel area on which the sharpener will work with.
havix
2nd October 2006, 14:29
Anyone have some scripts that they like to use on 1080i material, possibly one for low-bitrate 8gb-12gb movies and then maybe for something around 16gb+? Low-bitrate seems to need some help with some macroblocking that occurs.
Didée
2nd October 2006, 14:42
Anyone have some scripts that they like to use on 1080i material,
Could be I have some script's I'd like to try on HD material. Only thing is, I have no HD material ... :)
If macroblocking is the main problem, there are
- native filters like the "cpu/2" option in DGDecode, it's "BlindPP" counterpart, or the h.264 deblocking routine "deblock".
- custom filters like FunkyDeblock, Deblock_qed, or SmoothDeblock. (The latter surely tooo slow for HD.)
havix
2nd October 2006, 18:55
Macroblocking is the main concern along with quite a bit of noise, although I'm not used to seeing film grain so I believe that's what is making my eyes confused :) On a sidenote I would suggest you signup for giganews or usenetserver. Plenty of hidef content.
Backwoods
3rd October 2006, 08:51
Could be I have some script's I'd like to try on HD material. Only thing is, I have no HD material ... :)
2 options:
1) post your scripts or send them to me, I can test for you
2) shoot me your address and I will mail you some HD material
Didée
3rd October 2006, 14:25
2 options:
1) post your scripts or send them to me, I can test for you
2) shoot me your address and I will mail you some HD material
Quoting a PM:
Hehe, it wasy only a joke ... mostly in that sense that I don't capture HD content from satellite. Samples I have a few, of course. But HD is too time intensive for serious filtering, you know ... and since I can't find the time to convert all the captured stuff, by now I've roughly 300-400 GB of captured material lying around. And that's only SD! Now imagine I would capture HD ... my rig would burst within a week or two! :D
havix
3rd October 2006, 16:34
Yeah I'm at the point where I'm considering building just 2 core 2 duo machines since I'll have to dedicate one to encoding and my current spare 2.8ghz machine isn't quite cutting it.
Backwoods
3rd October 2006, 20:20
I shoot in HD and filtering a 2min segment took me 2hrs while running a AMD 4800+ 2gigs of RAM. I've heard good things about those Core Duo chips, maybe after some AVISynth tests I'll look into them for encoding.
scilli
7th October 2006, 05:58
I have an e6400 and am very pleased with encoding speeds. I don't know about a 2 min segment but with light filtering I can encode a 1hr40min movie in x264 it takes me about 5-6 hours for 2 passes to complete. Coming from my shitty 1.4gHz pentium 4 this blows me away! Buy light filtering I mean cropping and maybe some light fft3dGPU filtering for noise.
Backwoods
7th October 2006, 08:48
On SD or HD footage? Sounds like SD.
scilli
8th October 2006, 05:31
On SD footage. I just ran a test on some HD content while writing this comment! I took a 1min clip from a 1080i source and resized to 720p, than used SeeSaw.
Here is the gist of my script:
Lanczos4Resize(1280,720,0,0,1920,1080)
MT("a=last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a, b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)")
I used forcefilm in dgindex cause I'm lazy, so I don't know how much time ivtc would add but my first pass was done in 3min55sec at about 5.78fps and my second pass finished in about 12mins running at 1.99 fps. So I think a 2 minute clip would take less than 2 hours. Encoding without resizing would add some time I think, so if you'd like me to see how long that would take me I'll be more than happy to try. I would deffinatly recommend one of these cause I'm running at stock(2.13gHz) and I have had it up to 2.8gHz dual-prime stable for 12hrs. And I seem to have a dud chip cause many people have been able to get up to 3.2gHz easily, mine seems to hit a wall at around 3gHz. Prices considering performance are very good too.
Pookie
8th October 2006, 06:40
You should see if DegrainMedian(mode=1) alone is enough for your denoising, you might be able to get another FPS perhaps. In the case of transcoding HD resolution material, SeeSaw is not the bottleneck.
scilli
8th October 2006, 09:36
I'll have to test that out. I really haven't tried adjusting too many settings yet, even within SeeSaw itself. It probably will be enough seeing as my source's are usually pretty high quality. I need to keep in mind that looking at single frames in vdub doesn't mean I'll be able to tell the difference when actually viewing a completed encode:)
*edit* I decided that degrainmedian(mode=1) was in fact strong enough, but I also overclocked from 2.13gHz to 2.66gHz so who knows how much fps increase is do to less denoising. Anyway I'm currently running my second pass at 3.46fps:)
oligophant
13th October 2006, 19:11
this i what i get
Script error: there is no function named "repair"
c:\....\seesaw.avsi
my script is
LoadPlugin("C:\...\DGDecode.dll")
LoadPlugin("C:\...\VSFilter.dll")
LoadPlugin("C:\...\degrainmedian.dll")
LoadPlugin("C:\...\Decomb521VFR1.3_PPro-P3.dll")
LoadPlugin("C:\...\MaskTools.dll")
LoadPlugin("C:\...\fft3dfilter.dll")
LoadPlugin("C:\...\MSharpen.dll")
LoadPlugin("C:\...\MipSmooth.dll")
LoadPlugin("C:\...\LeakKernelDeint.dll")
LoadPlugin("C:\...\RemoveGrain.dll")
LoadPlugin("C:\...\mt_masktools.dll")
Import("C:\...\LimitedSharpen.avs")
Import("C:\...\Ylevels.avs")
Import("C:\...\BlindDeHalo2.avs")
Import("C:\...\DeHalo_alpha.avs")
Import("C:\...\SeeSaw.avsi")
MPEG2Source("D:\...\brother-wife01.d2v")
Telecide(order=1,guide=0,post=4,vthresh=25)
leakkernelbob(order=1,sharp=true,twoway=true,threshold=4)
a = last
b=a.degrainmedian(mode=2)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
BlindDeHalo2(2.0,2.0,100)
DeHalo_alpha()
FFT3DFILTER(sigma=3,bt=3,sharpen=1.0, interlaced=true)
LimitedSharpen(ss_x=2.0,ss_y=2.0,dest_x=640,dest_y=480,Smode=3,strength=100)
YlevelsS(0,0.9,255,0,255)
textsub("D:\...\OVA01.ass")
any suggestions?
Boulder
13th October 2006, 19:18
You need the Repair dll as well. It's in the RemoveGrain package.
oligophant
15th October 2006, 05:39
now it works ^_^ thanks boulder =]
koolcracker
3rd November 2006, 02:55
Is there an internal resize function in SeeSaw like there is in LimitedSharpenFaster? Also, I am looking for any speed improvement tips, because at the rate its at, its going to take almost 18 hours to do a two and a half hour movie.
Video=MPEG2source("C:\DVD Rips\BatmanBegins.d2v", cpu=4, info=3).ColorMatrix(hints=true)
Audio=WavSource("C:\DVD Rips\BatmanBegins T01 3_2ch 448Kbps 48KHz.wav")
Audiodub(Video, Audio)
a = last
b=a.FluxSmoothST()
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
BicubicResize(640, 480)
Pookie
3rd November 2006, 11:17
If you resize before the SeeSaw lines, it will run faster. Try placing the Bicubicresize line above the a=last line. Also, I think that movie is Aspect Ratio: 2.35:1 which means it can be cropped to 640x272 to remove the black bars (could be wrong, I don't have the movie).
You ought to IVTC and Decimate since you have a Mpeg2 FILM source (unless you already set Dgindex to ForceFilm). Doing so will enhance your target file just as much as running it through SeeSaw.
Do you really have macroblocks? If you don't, remove the CPU=4 section from the Mpeg2Source line - your system will transcode faster and the resulting file will probably look more detailed.
NRlimit=6, NRlimit2=7 - I've noticed the higher these numbers are, the slower the processing. See if you can cut it back to 3 and 4.
Didée
3rd November 2006, 22:27
NRlimit=6, NRlimit2=7 - I've noticed the higher these numbers are, the slower the processing. See if you can cut it back to 3 and 4.
Are you sure about that? There's no reason why it should make any noticeable difference. The processing done is always the same, no matter what the NRlimits are. (Except for NRlimit=0, which will bypass a LutXY that's working on all 3 planes.) Everything runs through the same lookup ... there's a slight chance that with smaller limits, LutXY can bail out earlier from some loops, hence doing internal copying work faster. But speed differences from this should be marginal.
Pookie
3rd November 2006, 23:18
I was hoping you'd see that, Didée. I'll do a test. Of course, I could be wrong (and have been - many, many, many times) :D
EDIT: Yes Indeed, I was wrong. Did some more tests of the NR settings. Some other variable must have been affecting my encoding speeds. For this test, the following settings were used:
SeeSaw(a,b, NRlimit=X, NRlimit2=Y, Sstr=1.5, Spower=5, Sdamplo=2, Szp=16,soothet=-49)
NRlimit=2, NRlimit2=3
ffmpeg.exe -i "NR23.avs" -threads 1 -benchmark -vcodec mpeg2video -r 23.976 -dc 10 -g 15 -bufsize 480 -minrate 6000 -b 6000 -maxrate 6000 -aspect 16:9 -s 720x400 -an -mbd 2 -qmin 2 -async 1 -y "test1.vob"
bench: utime=1655.370s
NRlimit=3, NRlimit3=4
ffmpeg.exe -i "NR34.avs" -threads 1 -benchmark -vcodec mpeg2video -r 23.976 -dc 10 -g 15 -bufsize 480 -minrate 6000 -b 6000 -maxrate 6000 -aspect 16:9 -s 720x400 -an -mbd 2 -qmin 2 -async 1 -y "test1.vob"
bench: utime=1636.564s
NRlimit=5, NRlimit2=6
ffmpeg.exe -i "NR56.avs" -threads 1 -benchmark -vcodec mpeg2video -r 23.976 -dc 10 -g 15 -bufsize 480 -minrate 6000 -b 6000 -maxrate 6000 -aspect 16:9 -s 720x400 -an -mbd 2 -qmin 2 -async 1 -y "test1.vob"
bench: utime=1637.204s
NRlimit=7, NRlimit2=8
ffmpeg.exe -i "NR78.avs" -threads 1 -benchmark -vcodec mpeg2video -r 23.976 -dc 10 -g 15 -bufsize 480 -minrate 6000 -b 6000 -maxrate 6000 -aspect 16:9 -s 720x400 -an -mbd 2 -qmin 2 -async 1 -y "test1.vob"
bench: utime=1636.032s
NRlimit=8, NRlimit2=9
ffmpeg.exe -i "NR89.avs" -threads 1 -benchmark -vcodec mpeg2video -r 23.976 -dc 10 -g 15 -bufsize 480 -minrate 6000 -b 6000 -maxrate 6000 -aspect 16:9 -s 720x400 -an -mbd 2 -qmin 2 -async 1 -y "test1.vob"
bench: utime=1635.021s
NRlimit=9, NRlimit2=9
ffmpeg.exe -i "NR99.avs" -threads 1 -benchmark -vcodec mpeg2video -r 23.976 -dc 10 -g 15 -bufsize 480 -minrate 6000 -b 6000 -maxrate 6000 -aspect 16:9 -s 720x400 -an -mbd 2 -qmin 2 -async 1 -y "test1.vob"
bench: utime=1635.221s
fjhdavid
6th November 2006, 12:34
dear Didee and all,
I read your posts and I know that I asked for a different question, but if you have several minutes, could you answer my simple question:
I used LSF with the Soothe function (maybe seesaw one day when I will understand more about it).
I watch only Film movies and my filters are in the following order:
1- denoise 3D HQ
2- Lanczos resize 1280, 720
3- LSF (smode=3) and soothe
I would like to add a "deblocking filter". Two questions:
- Which deblocking filter do you prefer? (I was thinking of ffdshow postprocessing filter)
- In which position do I have to put the deblocking filter in the sequence regarding to the others filters in order to get the best picture?
thanks
Francois
Didée
6th November 2006, 13:00
As I replied to the PM you sent in parallel:
Smoothing/denoising might (or will) turn the "sharp" borders of the blocking artefacts into "not-sharp" borders. Most deblockers need those "sharp" block borders to reckognize where blocking occurs.
Moreover, resizing will relocate the blocking borders so that they're no more aligned with the 8x8 grid. This alignment is something on which most deblockers rely on, too.
Thus, you should use deblocking before smoothing or denoising, and before resizing.
What I actually mostly use for deblocking is Deblock_QED ... but I'm biased in that respect. ;)
Holomatrix
7th November 2006, 00:14
As soon as I put the removegrain files in my Avisynth 2.5 plugin folder I can't get any scripts to run. What did I miss? All I'm doing is calling the seesaw avs and has the removegrain files, do I need something else?
Pookie
7th November 2006, 02:36
Don't put them ALL in, just the one that best suits your hardware platform. Try keeping *SSE2.dll and remove the others which don't for starters. (Unless your PC is Pre-P4). Also, you might need mscvcr71.dll in your \windows\system32 folder.
Holomatrix
7th November 2006, 04:49
I'm running an AMD so I copied, DenoiseSharpen.dll, RemoveGrain.cpp, RemoveGrain.dll, RemoveGrain.htm, Repair.dll and RSharpen.dll into my plugin directory. Anything else? where do I find the mscvcr file?
Pookie
7th November 2006, 05:39
http://www.cpuid.org/cpuz.php
Use the utility above to determine if your system supports SSE or SSE2 . If it does, use those plugins instead.
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr71
Holomatrix
7th November 2006, 06:36
I tried just;
0=BicubicResize(^TargetWidth,^TargetHeight,^b_value,^c_value)
1=Import(!SeeSaw.avs)
2=SeeSaw(NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=5, Spower=7, Sdamplo=6, Szp=16))
3=AddBorders(^BorderLeft,^BorderTop,^BorderRight,^BorderBottom)
^b_value=0.0
^c_value=0.6
!SeeSaw.avs=C:\Program Files\DVD2SVCD\Avisynth2.5 Plugins\SeeSaw\SeeSaw.avs
Without any plugins but still getting a script error in DVD2SVCD :(
Pookie
7th November 2006, 09:32
You Still Need RemoveGrain.
superuser
7th November 2006, 18:59
One thing, what was is difference between LimitedSharpen and LimitedSharpenFaster. This might be already answered in this thread, but there are two many posts to dig through.
thnxs in advance.
Edit:" Also are there newer revision of LimitedSharpen Script than posted in starting of the thread, if so where to get it from. Currently most of the pages on avisynth r down, so other link or script itself will be helpful.
thnxs.
Boulder
7th November 2006, 19:19
LimitedSharpen is LimitedSharpen..
..LimitedSharpenFaster is.....
a faster LimitedSharpen :p
Pookie
8th November 2006, 04:36
Holomatrix - I was looking at the DVD2SVCD faq - there's an option to edit the AVS file before encoding. Rather than confuse yourself with "^!" notation, just try a plain ol' modification of an AviSynth script. Voila !
Pookie
17th November 2006, 01:48
For very fast transcodes with SeeSaw, the recently compiled Vinverse function seems to work nicely as a dumb denoiser/smoother.
http://bengal.missouri.edu/~kes25c/vinverse.zip
Thanks to Didée and Tritical
a=last
b=a.vinverse()
SeeSaw(a,b, NRlimit=4, NRlimit2=5, Sstr=1.5, Spower=7, Szp=2, bias=90)
Reference to original post: http://forum.doom9.org/showthread.php?p=841641&highlight=vinverse#post841641
fjhdavid
21st November 2006, 18:13
I thought vinverse was "against residual combing" and not a denoiser filter like HQDN3D
am I wrong?
Pookie
21st November 2006, 19:04
It's a denoiser as much as Blur() is. Just a fast method to calm down a picture during transcoding or playback and using SeeSaw to keep it all from turning into mush.... The b variable in SeeSaw can consist of many kinds of filters/functions, including Addgrain, Limitedsharpen, etc - stuff that seems counterintuitive, but it all depends on the source. If Vinverse doesn't please the eyes, FluxsmoothT is great (but slower).
Some people use LimitedSharpen or SeeSaw for realtime playback on their PCs, in which case an accurate and "smart" denoiser like fft3dfilter is going to consume too many cpu cycles for smooth viewing.
fjhdavid
21st November 2006, 22:38
HQDN3D is not one of the best denoiser available (for realtime viewing) and perfectly suited for seeaw?
Pookie
21st November 2006, 23:19
Could be. Haven't tested the performance. That filter originally comes from the FFdshow code, doesn't it? In that case, perhaps it makes more sense to invoke it from FFdshow directly rather than call it via an Avisynth script.
Egh
22nd November 2006, 23:06
HQDN3D is not one of the best denoiser available (for realtime viewing) and perfectly suited for seeaw?
Who knows :P
You see, some people do have different tastes and work with different sauces using different standards.
Some praise convolution3d + deen + hqdn3d, some (like me :shy: ), rejected removegrain(mode=2) with FluxSmoothT(3) on the grounds of far too much quality degradation for one particular encode.
Basic hqdn3d in my experience destroys far too much even for dvds with values higher than (2).
fjhdavid
23rd November 2006, 17:18
egh, what you said for the values higher than 2 for hqdn3d is true only for the luminance and the chroma (even if the resolution of chroma is half the luma), BUT the last two arguments named "TIME" need to be at least 4 and are very efficient. In fact the filter is looking during 4 seconds to pixels change and remove those which change to much.
so a very efficient way is to call the function this way
hqdn3d (0,0,4,4)
Egh
23rd November 2006, 20:23
In fact the filter is looking during 4 seconds to pixels change and remove those which change to much.
so a very efficient way is to call the function this way
hqdn3d (0,0,4,4)
Sure that's 4 *seconds* aka roughly 100 frames? :) Not just 4 frames? :)
foxyshadis
23rd November 2006, 20:28
Actually, hqdn3d is a 3x3x3 filter (very similar to degrainmedian), it only compares against the next and previous frames. Not coincidentally, its effects are also similar to degrainmedian, although it doesn't always clip as hard. The oddly-named "time" parameter merely determines how strong the next/previous temporal smoothing is - it corresponds to luma strength, and all three parameters are combined to determine chroma smoothing strength.
fjhdavid
24th November 2006, 01:40
and my question remains :
what is actually the best denoisers for realtime viewing (with a intel core duo for example)?
JarrettH
30th November 2006, 03:47
anyone compare output of SeeSaw to FluxSmooth?:cool:
Blue_MiSfit
3rd December 2006, 12:40
Hey everyone,
So I'm LOVING SeeSaw's sharpening, it seems to enhance detail significantly while maintaining a calmer clip overall! I've been trying to get the best out of my copy of The Andromeda Strain, and here's what I'm working with right now:
DGDecode_mpeg2source("F:\Movies Work\Andromeda Strain\Andromeda.d2v",info=3)
ColorMatrix(hints=true)
crop( 8, 62, -8, -66)
a=last
b=last
c=last
b=b.DeGrainMedian(limitY=3, limitUV=7, mode=1)
b=b.DeGrainMedian(limitY=3, limitUV=7, mode=1)
d=SeeSaw(a,b,bias=40).histogram().subtitle("seesaw")
c=c.histogram().subtitle("source")
stackvertical(c,d)
The bits for stacking, and histograms and so forth are just for my tweaking - they won't go into the actual encode. Here are some screenshots:
http://home.comcast.net/~blue_misfit/andromeda1.png
http://home.comcast.net/~blue_misfit/andromeda3.png
I'm really pleased. I haven't encoded anything yet, so we'll see how x264 likes it. What do you guys think? It still seems a little noisy to me, but much sharper.
I seem to get better compressibility for this source using fft3dgpu(sigma=3) as my denoiser. With degrainmedian+seesaw I was getting almost 1/2 the compressibility of the source
I still have one issue with seesaw though, no matter how much I denoise, I seem to have little sparkling artifacts left in the end, they mostly appear in large flat areas, like walls etc. Any idea how to remove them? Here's a sample - this time seesaw (denoised before by fft3dgpu) is on the top. It was point resized up to 1024x1024.
http://home.comcast.net/~blue_misfit/sparkle.png
~MiSfit
fjhdavid
3rd December 2006, 15:16
Good job!
I am on the same way, and I still hesitate between a "strong degrainmedian (Y=5, mode=0) and two succesive more modest degrainmedian like yours.
(in fact sparkling seems to be noise which remains and goes through seesaw...)
what histogram stand for? and colormatrix (hints=true)?
Pookie
3rd December 2006, 20:05
Try reducefluctuations(limit=2) from the ReduceFlicker plugin by kassandro. Might help on the flat parts. 264 transcodes can make problems in the flat areas more obvious. Test it out before you do another 2 day encode :)
Blue_MiSfit
3rd December 2006, 22:32
histogram() gives you those neat little vector scopes on the right side of the images. If you are comparing a denoised and a noisy clip, the histograms can show you how calm the clip is overall. It's just another way to look at the video.
Thanks for the idea Pookie. I gave it a try, and the little sparklies are still there... Maybe I just need different settings.
For example, in another scene (helicopter taking off, camera pointed at sky) where the sky is an even blue, with RGB values at roughly 94/100/121 with some variation , and the little dots are 103/111/129 with some variation. So overall, things just get about 10 levels hotter overall. Not sure how this correlates to a YUV colorspace, but maybe the info will help :)
I tried just a simple removegrain(mode=1), since these evil pixels have no temporal stability and seem to be very small, only 1 or 2 adjacent pixels. It had no effect.
~MiSfit
Blue_MiSfit
12th December 2006, 04:44
Still having strange artifacts with SeeSaw - I seem to get them with every source, and cannot kill them no matter what settings I use - even with sootheT and sootheS at 100, I still get these strange artifacts.
Anyone have some suggestions?
Didée
12th December 2006, 12:29
It really seems there's something wrong, since all those speckles are brighter than they should be, never darker.
Are you using the modded-for-MaskToolsV2 version of SeeSaw (and if so, can you post or upload it somewhere? AS Wiki is still down, and I can't find that mod on my HDs or here in the forum...), or the "old" one for MTools v.1.5.8 ?
The effect looks like if not all conditions from some Lutxy expression would be processed. But other causes are possible, too.
I glanced through the old (my) version-for-MaskToolsV158, but can't see anything wrong there.
Boulder
12th December 2006, 12:52
I've seen the speckle effect as well, and that has kept me from using SeeSaw. I actually thought that I hadn't tweaked the parameters properly (I used the defaults) and never had the time to really start investigating the issue. From what I remember, I had the problem with rather noisy sources but it is apparent even with less noisy ones.
I'll post some screenshots a bit later along with the seesaw.avs I'm using.
Blue_MiSfit: do you happen to have soothe.avsi in your plugins folder? IIRC SeeSaw also has a function named Soothe included but the functionality is not the same..
Boulder
12th December 2006, 14:20
Here are some screenshots from a rather clean source (Nanny McPhee R2):
http://www.saunalahti.fi/sainki/mcphee_original.png
http://www.saunalahti.fi/sainki/mcphee_seesaw.png
http://www.saunalahti.fi/sainki/mcphee_seesaw_dgm.png
The scripts are rather simple ones:
MPEG2Source()
a=last
b=DegrainMedian()
SeeSaw(a,b) # or SeeSaw() in mcphee_seesaw.png
The speckles appear in the kids face. They are not extremely obvious as the source is quite clean. If the source is noisy (let's say a quite good quality VHS source), they are more visible - and I wouldn't want to kill all the details by extreme denoising before SeeSaw'ing. In that case it wouldn't make much sense using SeeSaw since there's not much detail to enhance.
Yes, chances are that I just don't know how to tweak the parms:)
Here's the seesaw.avs:
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "Sdamp", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
Sdamp = default( Sdamp, Spower+1 ) # reduces overdrive sharpening for very small changes
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
Sdamp = Sdamp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
ZRP = string( abs(Szp) )
PWR = string( abs(Spower) )
DMP = string( Sdamp )
denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
NRdiff = mt_lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,Sdamp,4)
# head = mt_merge(head,tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,Sdamp,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,Sdamp,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
# shrp=last
Soothess(last,tame,sootheT,sootheS)
sharpdiff= mt_lutxy(tame,last,"x y - 128 +",U=1,V=1)
mt_lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)
# NRR=last
Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : mt_lutxy(last,sharpdiff,"y 128 = x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)
# NRR .mergechroma(clp)
# sharpdiff.greyscale
# subtitle(SLIM)
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float ldmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( ldmp )
mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y = x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * + ?",U=2,V=2)
return( last )
}
# ======= Soothess() function to stabilze sharpening =======
function Soothess(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
mt_lutxy(orig,sharp,"x y - 128 +","x y - 128 +","x y - 128 +", U=1,V=1)
(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", U=1,V=1)
mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
mt_lutxy(orig,last,"x y 128 - -","x y 128 - -","x y 128 - -",U=1,V=1)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
foxyshadis
12th December 2006, 14:27
mt_lutxy(last,sharpdiff,"y 128 == x x y etc...
stands out, but that's not even used since you didn't specify a negative slimit. It was corrected in the wiki (RIP) but that's gone now. Hmm. Too sleepy to thoroughly investigate now.
Aha, there's also a single = in sharpen2, that should be doubled.
The speckles are why I always avoided seesaw, I thought it was just part of the script, but I should have known better.
Pookie
12th December 2006, 14:36
It is the negative values in the Removegrain statements that makes the specks, but I haven't seen that artifact in transcoded files. Might it be 2.x of Masktools? I've only used the 1.5 version with SeeSaw.
Didée
12th December 2006, 14:56
It is the negative values in the Removegrain statements.
No, it is not. It's those single equal-sign's in the lut expressions.
A negative argument in RemoveGrain just means "don't process that plane", same as "Y/U/V = 1" does in MaskTools. Where negative arguments for RemoveGrain are appearing in the script, they are fully intentional.
It's those "x y = ... ?" in places where maskTools v2 requires "x y == ... ?" that completely f**k up the sharpening operation, and consequently all of the MT2 version of SeeSaw.
replacing "=" by "==" in line 55 (unimportant;)) and line 73 (essential) should fix the problem.
However, this is a Deja vu to me ... I could bet we've already had this discussion time ago, and the script in the Wiki had been corrected?
It's the old story ... even if only one single piece of a faulty script gets out of the house, it will spread around the world like mad. (Variant of Murphy's Law.)
The speckles are why I always avoided seesaw, I thought it was just part of the script,
Oh, come on!
but I should have known better.
Yep.
Pookie
12th December 2006, 18:42
The modification for MT_Masktools in Boulder's example appears to be on an early release of SeeSaw, as the "SdampLo" and "SdampHi" settings haven't appeared yet.
n3w813
12th December 2006, 19:25
Here is the newest SawSaw script that I have dated 1/2/06 4:54pm.
# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Did?, for your pleasure.
#
# ======= Main function =======
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : yv12lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
NRdiff = yv12lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = yv12lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.maskedmerge(tame,tame.prewitt(multiplier=1.0).expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
Soothe(last,tame,sootheT,sootheS)
sharpdiff= yv12lutxy(tame,last,"x y - 128 +",U=1,V=1)
(NRlimit==0) ? clp : \
yv12lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)
Slimit>=0 ? yv12lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : yv12lutxy(last,sharpdiff,"y 128 = x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
yv12lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y = x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",U=2,V=2)
return( last )
}
# ======= Soothe() function to stabilze sharpening =======
function Soothe(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
yv12lutxy(orig,sharp,"x y - 128 +","x y - 128 +","x y - 128 +", U=1,V=1)
(sootheS==0) ? last
\ : yv12lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", U=1,V=1)
(sootheT==0) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
(sootheT > -1) ? last
\ : yv12lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
yv12lutxy(orig,last,"x y 128 - -","x y 128 - -","x y 128 - -",U=1,V=1)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
Boulder
12th December 2006, 19:37
The modification for MT_Masktools in Boulder's example appears to be on an early release of SeeSaw, as the "SdampLo" and "SdampHi" settings haven't appeared yet.I wish I remembered where I got the script from..we really need that sticky thread with all useful functions up-to-date :)
Blue_MiSfit
13th December 2006, 04:43
That was totally it Didee!
What a strange little bug!
Thanks guys, now I can use SeeSaw!!
Jeremy Duncan
13th December 2006, 08:33
Please compare my configuration to your SeeSaw configuration. :)
a = last
b = a.FluxSmoothT(3)
SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30)
SPresso(limit=2, limitC=0, bias=15, biasC=0, RGmode=17, RGmodeC=0)
n3w813
13th December 2006, 17:50
Can some please post the latest working SeeSaw script that uses Masktools 2.0?
Thanks :)
foxyshadis
13th December 2006, 19:47
# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Didée, for your pleasure.
#
# ======= Main function =======
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",chroma="copy first")
NRdiff = mt_makediff(clp,denoised,chroma="process")
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
SootheSS(last,tame,sootheT,sootheS)
sharpdiff= mt_makediff(tame,last)
(NRlimit==0) ? clp : \
mt_lutxy(clp,NRdiff, "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",chroma="process")
Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",chroma="copy first")
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",chroma="copy first")
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",chroma="copy first")
return( last )
}
# ======= Soothe() function to stabilze sharpening =======
function SootheSS(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
mt_makediff(orig,sharp)
(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", chroma="ignore")
(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")
(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?",chroma="ignore")
mt_makediff(orig,last)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
[/hugepost]
n3w813
13th December 2006, 22:06
Thanks Foxyshadis. :)
jeremyofmany
17th December 2006, 07:52
Greetings.
I need some scripting assistance if you don't mind. :)
I'm obviously using:
a= last
b=a.yourfavoritedenoiser()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
and changed it to suit me:
AviSource("D:\Hamsters(DV).avi")
LoadPlugin("D:\Video Tools\AviSynth Filters\MVTools.dll")
fields=AviSource("D:\Hamsters(DV).avi").AssumeTFF().SeparateFields() # or AssumeBFF
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
fields.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
Weave()
a = last
b = a.AssumeTFF().SeparateFields()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
First, I don't know if the B section is correct when in accordance to the above script.
Second, it tells me there is no function called "SeeSaw".
I downloaded it from the first post in this thread, and it's just the .AVS file, right?
I'm very tired (2:50 AM), but I hope to see a response in the morning.
Cheers & Thanks,
Jeremy
Adub
17th December 2006, 08:02
In order to use Seesaw like a plugin you either have to use
Import()
or you can change the file extension to ".avsi" instead of ".avs"
try that and see if that works.
jeremyofmany
17th December 2006, 08:16
I take it Import() is a built-in function that I can use? You mean just throw it in the script before the "a = last"? That didn't work. Neither did Import(SeeSaw). Changing the file extension prevents Media Player Classic or VirtualDub from recognising it.
Adub
17th December 2006, 08:22
no, no, no.
here is an example of Import(). You throw it in at the very beginning of the script. Like this
Import("C:\Program Files\Avisynth 2.5\plugins\SeeSaw.avs")
I like to keep my Seesaw in the Avisynth plugins folder. Easy management.
With the .avsi extension, you take that SeeSaw script. Open Notepad. copy the script to Notepad. Save the script as either
Seesaw.avs or SeeSaw.avsi, the latter if you want it to autoload and not need the Import() function. You take that file and put it into the avisynth plugins folder. Then load your different script like the one you have in your above post and play it. Or encode it, whatever.
Pookie
17th December 2006, 13:32
put the weave() statement at the end of your script
Didée
17th December 2006, 18:27
I never actually tried, but most definetly you'll have no fun when applying SeeSaw to a interlaced source.
Sharpening of interlaced sources generally is problematic, and even more so for a "dancing-on-the-edge" script like SeeSaw.
- Applying to interlaced full-frames totally messes up everything.
- Applying to separated fields messes up the temporal aspects.
- Applying to (quickly) bobbed frames weakens the response of the used medianfilter, and temporal aspects still are not good.
And that's only the bad news from the "enhancement" side. But moreover, even any denoising will either be less efficient than it could be, or will do more harm than necessary.
For the theoretical maximum of quality, the source first would need to be smartbobbed (with "smart" being as smart as only possible). Only then there is a reasonable base for denoising and sharpening.
Applying to even/odd separately could be tried, too. Though filters then work on halved temporal resolution, at least they see static parts as being static, that way.
***
Interlaced footage simply is not well suited to perform "image processing" tasks on ...
... and it was never meant to be: Interlacing was invented to spare bandwidth when delivering meant-for-viewing-only sources to the recipients. Doing lots of substantial processing never was the plan.
jeremyofmany
18th December 2006, 01:32
When I import the SeeSaw script into mine, it then says:
Avisynth open failure:
Script error: there is no function named "yv12lutxy"
(D:\Video Tools\AviSynth Filters\SeeSaw.avs, line 72)
(D:\Video Tools\AviSynth Script.avs, line 12)
Line 72 is as follows:
NRdiff = yv12lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
Any ideas?
Didee, I intend on de-interlacing my footage for both DVD and AVI. Everyone seems to have a different definition of what is the best method of deinterlacing. Didee, what do you suggest?
Didée
18th December 2006, 02:27
[hurdy-gurdy]
SeeSaw needs to have loaded: MaskTools v158 or v2a30 (for the old or the corrected new script), and RemoveGrain + Repair.
[/hurdy-gurdy]
Links to: MaskTools (http://forum.doom9.org/member.php?u=4630) ;)
Link: RemoveGrain (http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar)
Everyone seems to have a different definition of what is the best method of deinterlacing
That's true ... there's no natural law defining a rating scale that "best" is referring to. Only human preferences, of which there are plenty. That's why this' forum rules include a certain aspect about the word "best". :)
what do you suggest?
Find out the kind of your scale. :)
jeremyofmany
18th December 2006, 09:17
SeeSaw needs to have loaded: MaskTools v158 or v2a30 (for the old or the corrected new script), and RemoveGrain + Repair.
Import("D:\Video Tools\AviSynth Filters\SeeSaw.avs")
AviSource("D:\Hamsters(DV).avi")
LoadPlugin("D:\Video Tools\AviSynth Filters\MVTools.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\mt_masktools.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\RemoveGrain\RemoveGrain.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\RemoveGrain\Repair.dll")
fields=AviSource("D:\Hamsters(DV).avi").AssumeTFF().SeparateFields() # or AssumeBFF
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
fields.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
a = last
b = a.AssumeTFF().AssumeFrameBased().SeparateFields()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Weave()
Same error message. :(
Didée
18th December 2006, 09:21
"There is no function named ..."
- "yv12lutxy":
=> LoadPlugin("path\to\MaskTools.dll")
- "mt_lutxy":
=> LoadPlugin("path\to\mt_masktools.dll")
foxyshadis
18th December 2006, 09:44
Hey, this seesaw thing actually looks really nice in realtime. Now that it, y'know, works... >.> Sorry about that mixed up conversion before, again.
Guess I'm going to have to start looking for something better than Degrainmedian to feed it.
jeremyofmany
18th December 2006, 16:18
Didee, am I annoying yet? lol
Ok, so I have the plugins loaded but now it says:
YV12LUTxy : Clip's size must be the same
I read several things on the MaskTools page, but can't figure it out. Mind giving me a hand on this one?
krieger2005
18th December 2006, 16:23
Maybe the two clips you passed to SeeSaw have different dimensions?
Pookie
18th December 2006, 16:49
a = last
b = a.AssumeTFF().SeparateFields()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Nope. Not gonna work that way.
a= 1080
b= 540
That's what happens when you SeparateFields()
foxyshadis
18th December 2006, 17:26
q4u, Didée. Would SeeSaw make sense in place of LSF for upsized video at all? Here there aren't really many pixel-size details and I mainly want it to crispen edges without banding the gradients. However, I have no idea what sort of denoiser or parameters one would use to get the effect. (Whereas with LSF it's easy; just up the strength until it's sharp enough, then raise the soft until it looks decent. :p)
krieger2005
18th December 2006, 19:15
I tune just two parameters: SdampLo and NRLimit. The First one defines the threshold for noise and NRLimit the amount of the sharpening... I have relativly fast results by tuning this two values, but maybe someone have better tuning-alternatives.
Boulder
18th December 2006, 22:48
Regarding usage with MT: should I use
MT("
a=last
b=whateverdenoiser()
SeeSaw(a,b)
",2)or just put SeeSaw inside MT? The question is, does SeeSaw get the correct a- and b-clips (=the correct half of the frame) if they are not inside MT.
jeremyofmany
19th December 2006, 02:27
SeeSaw now works but it makes the source extremely noisy, to the point where a lot of detail is lots of specks/spots everywhere.
SeeSaw Screenshot (http://jeremy.zxian.org/Screenshots/SeeSaw.jpg)
But I understand that I should deinterlace it first and try to filter out the natural noise first, then maybe use SeeSaw at a lower threshold. I don't really need it sharpened too much. Another thing I am interested in is color balance. I'd like to adjust the contrast to make it look better. What do you guys think?
Pookie
19th December 2006, 03:47
Jeremy -
Do this
SeparateFields()
A=last
B=A.RemoveGrain(mode=24)
SeeSaw(a,b, NRlimit=7, NRlimit2=8, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Weave()
BTW, your link wasn't quite right - http://jeremy.zxian.org/Screenshots/SeeSaw.jpg
SeeSaw looks great on progressive material. It might not be what you want, since your screenshot looks like DV.
Hey, at least you learned a few things about scripts :D
-------------------
Boulder -
http://forum.doom9.org/showthread.php?p=857865#post857865 Dunno. Perhaps that's a question for TSP.
jeremyofmany
19th December 2006, 05:47
Pookie, thanks. I fixed the link. Too many ()'s makes /'s and \'s strange. /()\... wait a minute.. oh geez... ;)
Anyway, lmao
The script sample you provided stretches my video horizontally, seen here (http://jeremy.zxian.org/Screenshots/SeperateFields().jpg).
My source is DV. I actually started this topic (http://forum.doom9.org/showthread.php?t=119452).
And yes, I love learning through more experienced people. :D
Boulder
19th December 2006, 10:25
The script sample you provided stretches my video horizontally, seen here (http://jeremy.zxian.org/Screenshots/SeperateFields().jpg).
Weave() should return the video to full height. I wonder why it isn't doing that.
Didée
19th December 2006, 13:29
@ jeremyofmany:
Instead of just "Weave()", try "AssumeFieldbased().Weave()" at the end. When the source fed into SeeSaw actually is fieldbased, it's quite possible that the clip is losing that property somewhere along the transformations.
@ krieger:
SdampLo and NRLimit. The First one defines the threshold for noise and NRLimit the amount of the sharpening
Doesn't hit the point. NRlimit is an absolute limit (sharpening won't sharpen any pixel more than this, no matter what). The general amount of sharpening is controled by Szp and Spower.
It helps to realize that SeeSaw first builds a "normal" sharpening transformation, then takes the result of that (i.e. the difference before/after sharpening), and transforms the difference map by a sort-of gamma function.
A quick drawing:
http://img147.imageshack.us/img147/2669/fourcurvesbf8.png
Red is the resulting curve of a normal linear kernel sharpener: x=y, i.e. when the kernel sharpening calculated a pixelchange of "8", then a change of "8" is applied.
Light blue shows "Szp=16, Spower=4, SdampLo=0.01, SdampHi=255".
Dark blue shows "Szp=16, Spower=2, SdampLo=3, SdampHi=255"
Dark green shows "Szp=16, Spower=4, SdampLo=4, SdampHi=24"
After some breeding, it becomes clear:
In relation to the pixelchange resulting from the linear kernel sharpener,
- differences below Szp are amplified
- differences above Szp are reduced
- SdampLo damps down the too steepy amplification of gamma's power for very small values
- SdampHi damps down any big differences, because big differences would result in oversharpening anyway
One may note that the "neutral point" (Szp = Sharpening Zero Point) isn't always located exactly at Szp, since it gets shifted alittle by the damping parameters ... I was too lazy to make a long complicated formula to compensate for that ... doesn't matter, since absolute exactness of Szp is not really important. ;)
@ foxyshadis:
Heh, out of time, can't really elaborate on that now ...
Generally, on upsized images the benefits of SeeSaw fade away rather quickly, and results become closer to just LimitedSharpen+Soothe. Better would be to use SeeSaw's supersampling routine, just without the re-downsampling at the end.
For producing upsized images, the whole thing needs a good amount of adaptions. Most of my fiddling with temporal-superresolution-for-the-average-source is based on the SeeSaw principle, but with several more twists.
jeremyofmany
19th December 2006, 15:56
@ jeremyofmany:
Instead of just "Weave()", try "AssumeFieldbased().Weave()" at the end. When the source fed into SeeSaw actually is fieldbased, it's quite possible that the clip is losing that property somewhere along the transformations.
Avisynth open failure:
SeparateFields: SeparateFields should be applied on frame-based material: use AssumeFrameBased() beforehand
When I do that, it stretches. This is my script:
Import("D:\Video Tools\AviSynth Filters\SeeSaw.avs")
AviSource("D:\Hamsters(DV).avi")
LoadPlugin("D:\Video Tools\AviSynth Filters\MVTools.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\mt_masktools.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\Masktools.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\RemoveGrain\RemoveGrain.dll")
LoadPlugin("D:\Video Tools\AviSynth Filters\RemoveGrain\Repair.dll")
fields=AviSource("D:\Hamsters(DV).avi").AssumeTFF().SeparateFields() # or AssumeBFF
backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
fields.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
A=last
B=A.RemoveGrain(mode=24)
SeeSaw(a,b, NRlimit=7, NRlimit2=8, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
AssumeFrameBased().SeparateFields().Weave()
Boulder
19th December 2006, 15:58
A small correction: if you have DV video, it's BFF.
jeremyofmany
19th December 2006, 20:31
I had SeperateFields() in there twice and I made the correction, thank you Boulder. It works, but I was doing it remotely as I am at work. I'll check it out once I'm home. Thanks again! :D
Jeremy Duncan
19th December 2006, 20:55
q4u, Didée. Would SeeSaw make sense in place of LSF for upsized video at all? Here there aren't really many pixel-size details and I mainly want it to crispen edges without banding the gradients. However, I have no idea what sort of denoiser or parameters one would use to get the effect. (Whereas with LSF it's easy; just up the strength until it's sharp enough, then raise the soft until it looks decent. :p)
Try this:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FluxSmooth.dll")
a = last
b = a.FluxSmoothT(3)
SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30)
SPresso(limit=2, limitC=0, bias=15, biasC=0, RGmode=17, RGmodeC=0)
Didée,
Can Seesaw be made faster ?
If both the old and new masktools is in the plugins folder seesaw uses, which will seesaw use ?
Boulder
19th December 2006, 21:36
If the SeeSaw code includes MaskTools v2 functions, it will naturally be used. The functions don't have the exact same names in MaskTools v1 and v2 for compatibility reasons.
Pookie
20th December 2006, 04:21
Didée,
Can Seesaw be made faster ?
Computers can....:D
Maybe that's the solution. Why have Didée do it when you can ?
Software methods are going to be more limited.
1) Make sure you're using the flavor of RemoveGrain that is optimized for your CPU (removegrainsse2.dll, etc)
2) Seek out the MT_Masktools version of the script
3) Test out other fast denoisers.
4) Use SeeSaw without a denoiser at all
5) On Dual/Trial/Quadrical/Pentacle Cores, you can try something like http://www.mlin.net/SMPSeesaw.shtml (don't get too excited by the name), or http://www.ice-graphics.com/ICEAffinity/IndexE.html
Adub
20th December 2006, 04:55
Is the MT Masktools version the one dated on January 2nd? Or is there a separate one entirely?
Pookie
20th December 2006, 05:07
Somewhere around here...
http://forum.doom9.org/showthread.php?t=104701&page=15
Adub
20th December 2006, 05:33
Found it! Thanks! I thought they were all the same script. After further analysis, I see other wise.
jeremyofmany
20th December 2006, 09:33
So I've been working on my script a little bit, also trying some deinterlacers. I've tried KernelDeint(0) and have a serious issue.
http://jeremy.zxian.org/Screenshots/Hamster.jpg
Is that what "combing" is? Does anyone know how I might avoid/remove that? I'm off to bed, thanks for your help with all of my scripting so far. I'm using that HDRACG filter to increase the lighting, excellent plugin!
foxyshadis
20th December 2006, 12:00
I think LeakKernelDeint might just not be cut out for something as noisy as that, and you'd get better results from TDeint instead. That one includes comb-processing routines even if there's too much noise for a good match. Anyway, this probably isn't the thread for it.
jeremyofmany
20th December 2006, 21:18
Thanks.
Adub
21st December 2006, 02:22
So what is the difference between using the Masktools 1.5.8 or less version of the script versus the Masktools 2.0 version? Is 2.0 faster? Higher quality?
Jeremy Duncan
21st December 2006, 05:08
So what is the difference between using the Masktools 1.5.8 or less version of the script versus the Masktools 2.0 version? Is 2.0 faster? Higher quality?
It's faster and it takes care of a problem with Spots.
Adub
21st December 2006, 05:48
Righteous. Thanks Jeremy.
nicksteel
23rd December 2006, 00:52
What is latest version of seesaw, which masktools does it use?
Adub
23rd December 2006, 00:59
look at post #326.
Or skip to page 15, and look for FoxyShadis' post.
Masktools 2.0 is used.
Edit: Read the forum next time!
Pookie
23rd December 2006, 01:01
The one released by the author, Didée can be downloaded on page 1 of this thread. It uses Masktools v1.58
There's a hacked version which uses Masktools v2 (MT_Masktools). I believe it is on page 15 somewhere. Read the threads, however, as the hack needed to be modified to actually work properly.
Jeremy Duncan
23rd December 2006, 05:52
From Foxyshadis post
# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Didée, for your pleasure.
#
# ======= Main function =======
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",chroma="copy first")
NRdiff = mt_makediff(clp,denoised,chroma="process")
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
SootheSS(last,tame,sootheT,sootheS)
sharpdiff= mt_makediff(tame,last)
(NRlimit==0) ? clp : \
mt_lutxy(clp,NRdiff, "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",chroma="process")
Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",chroma="copy first")
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",chroma="copy first")
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",chroma="copy first")
return( last )
}
# ======= Soothe() function to stabilze sharpening =======
function SootheSS(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
mt_makediff(orig,sharp)
(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", chroma="ignore")
(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")
(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?",chroma="ignore")
mt_makediff(orig,last)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
From Boulders post, including Didée's tweak suggestions.
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "Sdamp", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
Sdamp = default( Sdamp, Spower+1 ) # reduces overdrive sharpening for very small changes
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
Sdamp = Sdamp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
ZRP = string( abs(Szp) )
PWR = string( abs(Spower) )
DMP = string( Sdamp )
denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",U=2,V=2)
NRdiff = mt_lutxy(clp,denoised,"x y - 128 +","x y - 128 +","x y - 128 +",U=3,V=3)
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,Sdamp,4)
# head = mt_merge(head,tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,Sdamp,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,Sdamp,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
# shrp=last
Soothess(last,tame,sootheT,sootheS)
sharpdiff= mt_lutxy(tame,last,"x y - 128 +",U=1,V=1)
mt_lutxy(clp,NRdiff,"y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",
\ "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",U=3,V=3)
# NRR=last
Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",U=2,V=2)
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",U=2,V=2)
# NRR .mergechroma(clp)
# sharpdiff.greyscale
# subtitle(SLIM)
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float ldmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( ldmp )
mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * + ?",U=2,V=2)
return( last )
}
# ======= Soothess() function to stabilze sharpening =======
function Soothess(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
mt_lutxy(orig,sharp,"x y - 128 +","x y - 128 +","x y - 128 +", U=1,V=1)
(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", U=1,V=1)
mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", U=1,V=1)
mt_lutxy(orig,last,"x y 128 - -","x y 128 - -","x y 128 - -",U=1,V=1)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
The one from Foxyshadis post uses these settings:
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\FluxSmooth.dll")
a = last
b = a.FluxSmoothT(3)
SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30)
SPresso(limit=2, limitC=0, bias=15, biasC=0, RGmode=17, RGmodeC=0)
The one from Boulders post uses these settings:
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\FluxSmooth.dll")
a = last
b = a.FluxSmoothT(3)
SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Szp=10, bias=1, sootheT=30)
SPresso(limit=2, limitC=0, bias=15, biasC=0, RGmode=17, RGmodeC=0)
There is NO quality different using these settings between either version of Seesaw.
However, Boulders version is Much faster, and at times played without lag on my Pentium M 725.
So there you have it.
foxyshadis
23rd December 2006, 08:37
All you have there is an older version of seesaw, without sdamphi and a couple micro-optimizations. But in the interests of science one must measure. The script is just:
avisource("funkynew.avi")
LoadPlugin(avsplugins+"avstimer.dll")
LoadPlugin(avsplugins+"fluxsmooth.dll")
trim(0,500)
avstimer(quiet=true)
a = last
b = FluxSmoothT(3)
false
\ ? SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30).avstimer(name="avstimer new",frames=50)
\ : SeeSaw2(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30).avstimer(name="avstimer old",frames=50)
New results:
[5172] [49] avstimer new = 21.8 fps
[5172] [99] avstimer new = 21.3 fps
[5172] [149] avstimer new = 21.2 fps
[5172] [199] avstimer new = 21.8 fps
[5172] [249] avstimer new = 21.1 fps
[5172] [299] avstimer new = 21.6 fps
[5172] [349] avstimer new = 22.2 fps
[5172] [399] avstimer new = 21.6 fps
[5172] [449] avstimer new = 21.6 fps
[5172] [499] avstimer new = 21.2 fps
[5172] [49] avstimer old = 21.5 fps
[5172] [99] avstimer old = 21.1 fps
[5172] [149] avstimer old = 20.9 fps
[5172] [199] avstimer old = 21.2 fps
[5172] [249] avstimer old = 21.1 fps
[5172] [299] avstimer old = 21.8 fps
[5172] [349] avstimer old = 21.2 fps
[5172] [399] avstimer old = 20.4 fps
[5172] [449] avstimer old = 20.8 fps
[5172] [499] avstimer old = 20.4 fps
No difference on average. The takeaway may be that it's dependant on your system (mine is core2 merom), although the extra sdamphi in the lut shouldn't really affect it. And I thought you had a celeron M, did you upgrade to enjoy a little more cache and speedstep? :p I suppose later I could test on the P-M, AXP, and Opterons.
Either way, if you're going to be posting a script, pleeeease make it compatible with the current version. Creating pointless versioning conflicts is not fun. In this case, that means adding sdamplo and hi back to old seesaw, and changing this line:
Sdamp = default( Sdamp, default(Sdamplo, Spower+1) ) # reduces overdrive sharpening for very small changes
At the bare minimum. Or just rename Sdamp to Sdamplo and ignore Sdamphi but please don't break api and cause spurious errors. I would say that's even a good idea for the original, except the original is so rarely used (compared to something that was around a while, like LimitedSharpen).
nicksteel
23rd December 2006, 12:01
I wish I remembered where I got the script from..we really need that sticky thread with all useful functions up-to-date :)
This would eliminate a lot of apparent confusion.:confused:
Jeremy Duncan
23rd December 2006, 19:39
All you have there is an older version of seesaw, without sdamphi and a couple micro-optimizations. But in the interests of science one must measure. The script is just:
avisource("funkynew.avi")
LoadPlugin(avsplugins+"avstimer.dll")
LoadPlugin(avsplugins+"fluxsmooth.dll")
trim(0,500)
avstimer(quiet=true)
a = last
b = FluxSmoothT(3)
false
\ ? SeeSaw(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30).avstimer(name="avstimer new",frames=50)
\ : SeeSaw2(a, b, NRlimit=2, NRlimit2=1, Sstr=1.4, Slimit=7, Spower=2, Sdamplo=8, SdampHi=10, Szp=10, bias=1, sootheT=30).avstimer(name="avstimer old",frames=50)
New results:
[5172] [49] avstimer new = 21.8 fps
[5172] [99] avstimer new = 21.3 fps
[5172] [149] avstimer new = 21.2 fps
[5172] [199] avstimer new = 21.8 fps
[5172] [249] avstimer new = 21.1 fps
[5172] [299] avstimer new = 21.6 fps
[5172] [349] avstimer new = 22.2 fps
[5172] [399] avstimer new = 21.6 fps
[5172] [449] avstimer new = 21.6 fps
[5172] [499] avstimer new = 21.2 fps
[5172] [49] avstimer old = 21.5 fps
[5172] [99] avstimer old = 21.1 fps
[5172] [149] avstimer old = 20.9 fps
[5172] [199] avstimer old = 21.2 fps
[5172] [249] avstimer old = 21.1 fps
[5172] [299] avstimer old = 21.8 fps
[5172] [349] avstimer old = 21.2 fps
[5172] [399] avstimer old = 20.4 fps
[5172] [449] avstimer old = 20.8 fps
[5172] [499] avstimer old = 20.4 fps
No difference on average. The takeaway may be that it's dependant on your system (mine is core2 merom), although the extra sdamphi in the lut shouldn't really affect it. And I thought you had a celeron M, did you upgrade to enjoy a little more cache and speedstep? :p I suppose later I could test on the P-M, AXP, and Opterons.
Either way, if you're going to be posting a script, pleeeease make it compatible with the current version. Creating pointless versioning conflicts is not fun. In this case, that means adding sdamplo and hi back to old seesaw, and changing this line:
Sdamp = default( Sdamp, default(Sdamplo, Spower+1) ) # reduces overdrive sharpening for very small changes
At the bare minimum. Or just rename Sdamp to Sdamplo and ignore Sdamphi but please don't break api and cause spurious errors. I would say that's even a good idea for the original, except the original is so rarely used (compared to something that was around a while, like LimitedSharpen).
I did update the cpu from a celeron.
That test you ran using funkynew.avi, the old Seesaw script can't use Sdamplo and Sdamphi. So maybe run a test with the old Seesaw note using these.
And are you talking to Boulder about posting a script without sdamplo and sdamphi, because I don't know how to make a Seesaw script script without Didée's help.
Boulder
23rd December 2006, 20:21
I didn't create any SeeSaw script, the one I posted was a copy-paste from some old thread. That's why the two options are missing - they simply were not available when I copied the function.
Didée
14th January 2007, 15:50
Oh my Lord.
For anyone who's reading the "parameter explanation" for SeeSaw in the above post:
Disregard it. Please.
It's plain nonsense for the most parts.
***
BTW, Jeremy: Simply deleting a multi-multi-page thread (your "Walkthrough Guide") is not a good practice. Not at all.
I'll probably try to never post in any of your threads again - - if the answer might disappear the other day (like mine of yesterday did), then why bother...
Guest
14th January 2007, 15:54
deleting a multi-multi-page thread (your "Walkthrough Guide") is not a good practice. That's right. It's an unfortunate loophole in the new forum software. I have restored the thread. Jeremy, you can remove your own posts if you like.
AGKnotUser
15th January 2007, 20:48
Hello,
I am looking for general detail enhancement for DVD transcoding from Double Layer to Single Layer but i am confused as to which script for SeeSaw to use for that. Can someone suggest which of the many scripts seen here would be the best for my use? The DVDs would be clean sources. Thanks.
Pookie
15th January 2007, 22:16
Your perception is your own....
AGKnotUser
16th January 2007, 04:51
@Pookie: I understand what you mean, that what looks good to me is what I should use. At this point I lack the knowledge and tools to do a side by side comparison of frames. That's on my todo list.
@Jeremy Duncan: Thank you for your script. I'll give it a try. Also, I ran both versions of SeeSaw.avs that you posted on page 17 and found that foxyshadis' version ran faster than Boulders. Can you point me to the original post by Boulder so I can see his comments about the tweaks? Normally I wouldn't ask, but I gave up after an hour of hunting through this thread.
spanky123
16th January 2007, 06:51
Cheers Jeremy
What's that
SPresso(___) do ?
Jeremy Duncan
16th January 2007, 07:18
AGKnotUser,
Look at post # 285
spanky123,
Spresso is a denoiser.
I wrote a guide. Here's the link
Link (http://forum.doom9.org/showthread.php?t=115727)
You can find all the plugins you need and all the info for setting it up.
Boulder
16th January 2007, 07:19
Can you point me to the original post by Boulder so I can see his comments about the tweaks? Normally I wouldn't ask, but I gave up after an hour of hunting through this thread.I don't think I made any comments. Like I said, I just copy-pasted something that I had copy-pasted from the forum earlier. The function I posted was EDIT:broken as was pointed out a bit later.
spanky123
16th January 2007, 07:22
Cheers Duncs
:)
AGKnotUser
20th January 2007, 06:18
Which Removegrain should be used with the MT_Masktools version of SeeSaw, 0.9 or 1.0 beta?
Pookie
20th January 2007, 06:24
The one on the first page of this thread.
xbox360
1st February 2007, 23:55
This is my script:
DirectshowSource("C:\Movies\My Clip.mpg", fps=25, audio=false).ConvertToYV12
Bob(height=480)
BicubicResize(720,480,0,0.5)
ChangeFPS(60000, 1001)
SeparateFields.SelectEvery(4,0,3)
Can someone please modify it to use seesaw, please & thank you.
also where to download LimitedSupport_02Dec05.dll ?
xbox360
2nd February 2007, 01:03
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RepairSSE2.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
DirectshowSource("D:\ConvertXtoDVD\MTV\VR_MOVIE.mpg", fps=25, audio=false)
ConvertToYv12
Bob(height=480)
BicubicResize(720,480,0,0.5)
ChangeFPS(60000, 1001)
SeparateFields.SelectEvery(4,0,3)
Weave
a = last
b=a.degrainmedian
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Szp=16)
It's now working ! YAY !
beviet
14th February 2007, 14:57
Hi,
I've reading all of this stuff and source of understand and not understand, I am using avisynth with dvdrebuilder.
Could some one post a see-saw script for rebuilder please???
Also, is see-saw=sharpening + denoise ( in one together )?
Thanks
steve77
21st February 2007, 17:59
I just tried it out and noticed a very subtle difference between the source and the "SeeSawed" version. Good, but subtle.
I just did a basic:
Mpeg2Source("...")
a=last
SeeSaw(a)
The source in question is a 2500kbps WMV file, which seems to have been made from a high quality source.
Questions:
1-I'm definately not getting the same changes as in the first post of this thread. It's MUCH more subtle.
2-I didn't use a denoiser, and the only one I know if is Convolution3d, which is old, as I understand it. Could sombody suggest a good denoiser? I have a fast machine, so I'm looking for the best quality within a reasonable time frame (MCBOB for me is just barely reasonable as a deinterlacer, speed wise).
Thanks so much for the assistance.
Steve
nurbs
21st February 2007, 20:14
I have only been playing around with it for a couple of days myself, but I will try to help. :)
1 - The parameters in the first post sharpen more than the defaults you are using. Also the choice of denoiser has some influence on the outcome.
2 - If you don't specify a denoiser some default filter is used. In the first post degrainmedian and vaguedenoiser are mentioned. There is also removegrain, fft3dfilter (rather slow) and fft3dgpu (if your gpu can handle it) just to name a few. I suggest you consult the threads to these filters if you want to know more.
Pookie
22nd February 2007, 21:58
Can't really recommend a denoiser without seeing your source. Post a screen cap.
Try some of the examples on the first page with the exact same plugins and settings.
I've found Fluxsmooth to be a nice and fast denoiser for high quality sources, but again, your source will dictate the denoiser choice and the strength settings.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Fluxsmooth.dll")
a=last
b=a.FluxsmoothST()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Szp=16)
steve77
24th February 2007, 19:52
Ok, I have got everything working the way I want it. It's an AMAZING filter. Thanks Didée.
The major problem is that on large uniformly colored surfaces, it would get SUPER noisy (a wall, for example)
Then I played wiht sootheS, and it made all the diffrence. Setting it to 100 removed all of the detail, but at 50 + another pass of MedianDegrain(Mode=4) and I get truly AMAZING results. Like night and day.
Does this happen to others? I haven't seen many people play with sootheS much.
I'd share my results, but the caps are a litte racy (no nudity of course). If it were allowable for women in lingerie, I'd post so you may comment on the great results I've obtained.
Keepitsimple
8th March 2007, 08:02
Hello Im using the avisynth box within ffdshow and Im trying to use this script for dvd playback
LoadPlugIn("E:\Program Files\AviSynth 2.5\plugins\RemoveGrainSSE3.dll")
a= last
b= a.RemoveGrainSSE3(mode=2)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
But avisynth says: Script error: there is no function named "RemoveGrainSSE3"
foxyshadis
8th March 2007, 08:14
All versions of RemoveGrain are still called RemoveGrain internally. The suffix is only there for you to distiguish them, they're all the same to avisynth. (The exception is if you're testing more than one, then you can use RemoveGrainSSE3_RemoveGrain(), but you almost never need that capability.)
Keepitsimple
8th March 2007, 08:39
Thx for the quick response!
I noticed that my cpu utilization went to 100% so I installed the MT plugin (version 0.7 and replaced the avisynth.dll in system32). Im now using this
a= last
b= a.RemoveGrain(mode=2)
MT("SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)",3)
However avisynth says: MT: Function changed the hight! Try splitvertical=true
Also do you know of any good deinterlacers that can run MT and in realtime? I have a e6600 and can OC to 3.3Ghz if I have to.
TheRainmaker
8th March 2007, 17:28
I am tried many times to get answers to my questions about sharpen but never found corrects...
I found right place(this thread) to get all my answers...
But i don't know anything about typing avisynth...
If i learn i want use avisynth scripts for all my rips...
So which scripts usefull for best results?
I read all of thread but i couldn't understand good enough!
There are many test codes here and i complicated!
And can i use GKnot for encoding?
If i;
(I got following code when encoding is finished in GKnot,The output video is not sharpened its so blurid)
I hurt from some forums if you use the right scripts you can get great quality than DVD!
Is that true?
# Created with Gordian Knot
#
# http://gknot.doom9.org
# PLUGINS
LoadPlugin("F:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
# SOURCE
mpeg2source("F:\BARBAR\VTS_01_1.d2v")
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=0)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(2,72,716,432)
# SUBTITLES
#VobSub("FileName")
# RESIZING
LanczosResize(720,304)
# DENOISING: choose one combination (or none)
Undot()
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(93,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
I want to go edit codes as like yours:
a = last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Which lines has to go edit for SeeSaw sharpening and which line has to go delete?
I downloaded all needed tools and Avisynth 2.5.7?
So which is the easyway to use SeeSaw?
Or where can i start to use SeeSaw?
Thanks for all your helps...
Pookie
8th March 2007, 20:16
Loadplugin("RemoveGrain.dll")
LoadPlugin("Masktools.dll")
Import("SeeSaw.avs")
a=last
b=a.Degrainmedian(mode=1)
SeeSaw(..................... your settings here)
Terranigma
8th March 2007, 21:38
Instead of degrainmedian, you should use Soothe.
Also, you might wanna increase supersampling for both horizontal, vertical areas to avoid aliasing.
Boulder
8th March 2007, 22:01
Did you mean SPresso as Soothe is not a denoiser?
Terranigma
8th March 2007, 22:14
Did you mean SPresso as Soothe is not a denoiser?
Of course I know Soothe's not a denoiser. I said Soothe for temporal stabilization. He/she would be better off using mvdegrain as a denoiser (IMO).
Pookie
8th March 2007, 22:51
Yeah, you're right. Didn't see the page before where he wanted to use it for playback. That playback stuff always entertains me, Probably because the next question will be how to "fix" Avisynth so you can play a DVD at full res on a 2.8P4:D Doesn't jeremy have a thread on realtime playback with SeeSaw ?
Terranigma
9th March 2007, 00:08
Doesn't jeremy have a thread on realtime playback with SeeSaw ?
Yes. I had to search for it myself since I accidentally deleted all my bookmarks. Here (http://forum.doom9.org/showthread.php?p=873467#post873467)'s the thread.
TheRainmaker
9th March 2007, 08:12
Loadplugin("RemoveGrain.dll")
LoadPlugin("Masktools.dll")
Import("SeeSaw.avs")
a=last
b=a.Degrainmedian(mode=1)
SeeSaw(..................... your settings here)
Thank you so much Pookie :)
Can I add them too?
LoadPlugin("C:\Program Files\AviSynth 2.5\filters\DeGrainMedian\degrainmedian.dll")
ConverttoYV12()
Instead of degrainmedian, you should use Soothe.
Also, you might wanna increase supersampling for both horizontal, vertical areas to avoid aliasing.
@Terranigma
What is the useful settings and code for Soothe and where can i type in my code?Same line of "b=a.Degrainmedian(mode=1)" or SeeSaw Scripts line
Pookie
9th March 2007, 09:44
Terranigma posted a link to the perfect thread for you....
TheRainmaker
9th March 2007, 10:09
Terranigma posted a link to the perfect thread for you....
Terranigma posted a link to the perfect thread for you....
I had a problem with GKnot&VDM
Avisynth open failure
Script Error:there is no function named "DegrainMedian"
(H:\Chapter_6\VTS_01_1.avs, line 92)
# PLUGINS
#LoadPlugin("F:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\TweakColor.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\DenoiseSharpen.dll)
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll)
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\MaskTools-v1.5.8\MaskTools.dll)
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\DegrainMedian\degrainmedian.dll")
LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\SeeSaw.avs")
Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\TweakColor.avs")
# SOURCE
mpeg2source("H:\Chapter_6\VTS_01_1.d2v")
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=0)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(2,72,716,432)
# SUBTITLES
#VobSub("FileName")
# RESIZING
LanczosResize(720,304)
# DENOISING: choose one combination (or none)
Undot()
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(93,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
a= last
b=a.DegrainMedian(Mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Thanks for link but i think its not useful with GKnot?Isn't it?
Terranigma
9th March 2007, 16:06
I had a problem with GKnot&VDM
Avisynth open failure
Script Error:there is no function named "DegrainMedian"
The reason why you're getting this error is because you need the degrainmedian plugin. It's an external plugin. You can download the latest version from Fizick (http://avisynth.org.ru/)'s page. (Though i did'nt mention degrainmedian at all. I said soothe and seesaw :p )
Thanks for link but i think its not useful with GKnot?Isn't it?
Check out the link to Jeremy Duncan's guide, download the package that says
1 Click Link to Complete Kit, includes comparison pictures. Updated XX XX, XXXX and read the included readme.
TheRainmaker
9th March 2007, 16:33
The reason why you're getting this error is because you need the degrainmedian plugin. It's an external plugin. You can download the latest version from Fizick (http://avisynth.org.ru/)'s page. (Though i did'nt mention degrainmedian at all. I said soothe and seesaw :p )
Check out the link to Jeremy Duncan's guide, download the package that says
1 Click Link to Complete Kit, includes comparison pictures. Updated XX XX, XXXX and read the included readme.
I had same version of that! Its interesting when i download and extract to plugings dir i couldn't see that error now but;
New error:
Script error:expected a, or
F:Barbar\VTS_01_2.avs line 90 column 82
(I changed the video dir and name)
Here is understandtable but that link (Jeremy's) is too complicated for me cause i m a beginner of avisynth...
Terranigma
9th March 2007, 16:46
I had same version of that! Its interesting when i download and extract to plugings dir i couldn't see that error now but;
New error:
Script error:expected a, or
F:Barbar\VTS_01_2.avs line 90 column 82
(I changed the video dir and name)
Here is understandtable that link (Jeremy's) is too comlicated for me cause i m a beginner of avisynth...
"F:Barbar\VTS_01_2.avs"
Try adding quotation marks at the beginning and end of your .avs path. Might need to add brackets at the beginning as well, (Depending on how you have your .avs file setup) so your complete path might look like this
("F:Barbar\VTS_01_2.avs")
TheRainmaker
9th March 2007, 17:33
"F:Barbar\VTS_01_2.avs"
Try adding quotation marks at the beginning and end of your .avs path. Might need to add brackets at the beginning as well, (Depending on how you have your .avs file setup) so your complete path might look like this
("F:Barbar\VTS_01_2.avs")
There is an error in MeGui but I am opened avs in VDM now!
But i am not sure the scripts(codes) are right or not?
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\DegrainMedian\degrainmedian.dll")
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\MaskTools-v1.5.8\MaskTools.dll")
Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\SeeSaw.avs")
DGDecode_mpeg2source("F:\BARBAR\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
#Not doing anything because the source is progressive
crop( 0, 70, -2, -72)
LanczosResize(720,304) # Lanczos (Sharp)
#denoise
a=last
b=a.DegrainMedian(Mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
If is ok what will i do now?
Set Xvid for 2 pass and...?
I started VDM for only one pass (as Jeremy says in his guide)
I saw Projected File size is so strange : around 450-500 MB with audio...
And Total Time(estimated): around 1:51:00
I am sure i will get crapped avi after them...
I aborted job in VDM and i got this picture!!!
http://img513.imageshack.us/img513/4968/51205195at7.th.png (http://img513.imageshack.us/my.php?image=51205195at7.png)
Terranigma
9th March 2007, 18:04
Can you not pinpoint this error? Perhaps you're trying to use an invalid seesaw, or don't have all the necessary plugins to use it properly? It's crucial that you figure out what the problem is exactly before trying to encode.
This's how I'd go about using your script.
d2vpath = "F:\BARBAR\VTS_01_1.d2v"
mpeg2source(d2vpath,ipp=true,info=3)
ColorMatrix(hints=true, interlaced=true)
Spline36Resize(720,304,0,70,-2,-72)
a=last
b=a.DegrainMedian(Mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Removegrain(mode=1)
(I really doubt that your mpeg2source is progressive. Examine the .d2v file, or use a text editor gui and type info(), then display your video file to check to see if it's interlaced)
TheRainmaker
9th March 2007, 18:21
Can you not pinpoint this error? Perhaps you're trying to use an invalid seesaw, or don't have all the necessary plugins to use it properly? It's crucial that you figure out what the problem is exactly before trying to encode.
This's how I'd go about using your script.
d2vpath = "F:\BARBAR\VTS_01_1.d2v"
mpeg2source(d2vpath,ipp=true,info=3)
ColorMatrix(hints=true, interlaced=true)
Spline36Resize(720,304,0,70,-2,-72)
a=last
b=a.DegrainMedian(Mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Removegrain(mode=1)
(I really doubt that your mpeg2source is progressive. Examine the .d2v file, or use a text editor gui and type info(), then display your video file to check to see if it's interlaced)
I had a problem with VDM when i use follow script;
# PLUGINS
#LoadPlugin("F:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\TweakColor.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\DenoiseSharpen.dll)
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll)
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\MaskTools-v1.5.8\MaskTools.dll)
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\DegrainMedian\degrainmedian.dll")
LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\SeeSaw.avs")
Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\TweakColor.avs")
# SOURCE
mpeg2source("H:\Chapter_6\VTS_01_1.d2v")
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=0)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(2,72,716,432)
# SUBTITLES
#VobSub("FileName")
# RESIZING
LanczosResize(720,304)
# DENOISING: choose one combination (or none)
Undot()
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(93,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
a= last
b=a.DegrainMedian(Mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
But so strange i decided to work with MeGui and than I got problem there but i got codes from MeGui as like;
(I analysis my DVD source in MeGui and Megui says:Progresive)
oadPlugin("F:\Program Files\AviSynth 2.5\plugins\DegrainMedian\degrainmedian.dll")
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\MaskTools-v1.5.8\MaskTools.dll")
Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\SeeSaw.avs")
DGDecode_mpeg2source("F:\BARBAR\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
#Not doing anything because the source is progressive
crop( 0, 70, -2, -72)
LanczosResize(720,304) # Lanczos (Sharp)
#denoise
a=last
b=a.DegrainMedian(Mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
And its work in VDM i saw video at last...
My .d2v file is;
DGIndexProjectFile15
6
F:\BARBAR\VTS_01_1.VOB
F:\BARBAR\VTS_01_2.VOB
F:\BARBAR\VTS_01_3.VOB
F:\BARBAR\VTS_01_4.VOB
F:\BARBAR\VTS_01_5.VOB
F:\BARBAR\VTS_01_6.VOB
Stream_Type=1
MPEG_Type=2
iDCT_Algorithm=3
YUVRGB_Scale=1
Luminance_Filter=0,0
Clipping=0,0,0,0
Aspect_Ratio=16:9
Picture_Size=720x576
Field_Operation=0
Frame_Rate=25000 (25/1)
Location=0,0,5,4ecc8
900 1 0 2048 1 1 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 1 0 397312 1 1 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 1 0 894976 1 1 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2...
.........and goes like that....
900 1 4 479223808 1 9 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 1 4 479748096 1 9 32 32 92 b2 b2 a2 b2 b2 a2 b2 b2 a2
900 1 4 4
FINISHED 100.00% VIDEO
I think no chance to learn avisynth i will never learn... :(
Its so bad start for me...
Terranigma
9th March 2007, 18:34
Well megui tells me sometimes that my sources are progressive as well, when they're really interlaced.
I'll give you some of my scripts (And yes, they work properly)
Download This (http://www.savefile.com/files/541465) package and move all files in your avisynth plugins directory.
Remove this line from your script Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\SeeSaw.avs")
By the way. I think the problem could lie within' your removegrain plugin. You can't, lets say, use removegrainsse3 on a machine that don't have sse3 capabilities. Only use the one that corresponds with your machine.
Try opening the script in megui now :p
TheRainmaker
9th March 2007, 18:47
Well megui tells me sometimes that my sources are progressive as well, when they're really interlaced.
I'll give you some of my scripts (And yes, they work properly)
Download This (http://www.savefile.com/files/541465) package and move all files in your avisynth plugins directory.
Remove this line from your script Import("F:\Program Files\AviSynth 2.5\plugins\Scripts\SeeSaw.avs")
By the way. I think the problem could lie within' your removegrain plugin. You can't, lets say, use removegrainsse3 on a machine that don't have sse3 capabilities. Only use the one that corresponds with your machine.
Try opening the script in megui now :p
Thanks so much for your helps Terranigma
When i use MeGui i never got any best results cause i am not good to use MeGui...
I am only knows enough AGK and GKnot...
I am sure it will not success but i'll try...
I downloaded that pack from your link but i couldn't see any scripts... There are only filters and plugings...
Which scripts will i use?
Terranigma
9th March 2007, 19:07
Thanks so much for your helps Terranigma
When i use MeGui i never got any best results cause i am not good to use MeGui...
I am only knows enough AGK and GKnot...
I am sure it will not success but i'll try...
I downloaded that pack from your link but i couldn't see any scripts... There are only filters and plugings...
Which scripts will i use?
actually, the seesaw and soothe files are scripts that loads automatically when placed in the plugin directory (depending on the avisynth version you use). That's why I asked you to remove the seesaw line from your script.
.avsi and .dll files are supposed to load automatically, so overwrite the ones you currently have with the one in the package and try previewing the script in megui. Again, make sure you choose the correct .dlls from the removegrain archive that's compatible with your computer.
TheRainmaker
9th March 2007, 19:21
actually, the seesaw and soothe files are scripts that loads automatically when placed in the plugin directory (depending on the avisynth version you use). That's why I asked you to remove the seesaw line from your script.
.avsi and .dll files are supposed to load automatically, so overwrite the ones you currently have with the one in the package and try previewing the script in megui. Again, make sure you choose the correct .dlls from the removegrain archive that's compatible with your computer.
Thanks so much Terranigma
I will try as soon as possible your mentioned things ... :)
I hope i can do correctly...
And I'll write results here...
TheRainmaker
11th March 2007, 17:23
I did at last to use SeeSaw with GKnot... :)
It looks better with SeeSaw...
without any filters(Simple GK)
http://img103.imageshack.us/img103/5688/50813526sv5.th.png (http://img103.imageshack.us/my.php?image=50813526sv5.png)
with SeeSaw +
http://img103.imageshack.us/img103/7766/a1we0.th.png (http://img103.imageshack.us/my.php?image=a1we0.png)
without any filters(Simple GK)
http://img103.imageshack.us/img103/167/95275947og5.th.png (http://img103.imageshack.us/my.php?image=95275947og5.png)
with SeeSaw +
http://img103.imageshack.us/img103/6451/b1ct1.th.png (http://img103.imageshack.us/my.php?image=b1ct1.png)
But What about this;
without any filters
http://img103.imageshack.us/img103/9349/5agp2.th.png (http://img103.imageshack.us/my.php?image=5agp2.png)
with SeeSaw +
http://img103.imageshack.us/img103/3725/36726552gk3.th.png (http://img103.imageshack.us/my.php?image=36726552gk3.png)
The Code was:
# PLUGINS
LoadPlugin("F:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\Repair.dll)
import("F:\Program Files\AviSynth 2.5\plugins\seesaw.avs")
import("F:\Program Files\AviSynth 2.5\plugins\Soothe.avs")
# SOURCE
mpeg2source("F:\Video\VTS_01_1.d2v")
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=0)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(0,72,718,432)
# SUBTITLES
#VobSub("FileName")
# RESIZING
LanczosResize(720,304)
# DENOISING: choose one combination (or none)
Undot()
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
a=last
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
Removegrain(mode=1)
Everything is good or the setting are high?
Maybe some setting should be lover... Or more filters?
What is your suggestions?
Terranigma
11th March 2007, 17:46
I did at last to use SeeSaw with GKnot... :)
It looks better with SeeSaw...
without any filters(Simple GK)
The reason why you'd think SeeSaw looks better without any filters, is because the filters in your chain denoises your source, blurring it a bit. This's why you should adjust SeeSaw's sstr and slimit paramaters.
Please, check This (http://forum.doom9.org/showthread.php?p=873467#post873467) thread and download Jeremy Duncan's Kit and use Soothe instead of degrainmedian, and use a good denoiser such as mvdegrain, fft3dfilter to denoise.
You should denoise first, sharpen, followed lastly by the use of RemoveGrain(mode=1) to save some extra bits.
So
1. Denoiser
2. Seesaw + Soothe
3. RemoveGrain
You can check out some examples from Jeremy's kit on how to denoise as well :)
TheRainmaker
11th March 2007, 18:21
The reason why you'd think SeeSaw looks better without any filters, is because the filters in your chain denoises your source, blurring it a bit. This's why you should adjust SeeSaw's sstr and slimit paramaters.
Please, check This (http://forum.doom9.org/showthread.php?p=873467#post873467) thread and download Jeremy Duncan's Kit and use Soothe instead of degrainmedian, and use a good denoiser such as mvdegrain, fft3dfilter to denoise.
You should denoise first, sharpen, followed lastly by the use of RemoveGrain(mode=1) to save some extra bits.
So
1. Denoiser
2. Seesaw + Soothe
3. RemoveGrain
You can check out some examples from Jeremy's kit on how to denoise as well :)
1. Denoiser
2. Seesaw + Soothe
3. RemoveGrain
a=last
b = a.DeGrainMedian( mode=1 )----Denoiser( or not?)
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )----SeeSaw
Removegrain(mode=1)----Removegrain
So you mean lines are not correct for best results?
I think i used as you said...
I can adjust again SeeSaw's sstr and slimit paramaters no prob...
Jeremy's settings and filters are too different of mine...
Because i said there is no stabil scripts for SeeSaw in his thread...
He is using LSF scripts more there...
Check this one pls;
a = last
b = a.FluxSmoothT(10)
SeeSaw(a, b, NRlimit=10, NRlimit2=4, Sstr=1.4, Szp=1, Slimit=16, Spower=1, bias=0, sootheT=0, Sdamplo=8, SdampHi=0)
SPresso(limit=2, limitC=0, bias=69, biasC=0, RGmode=17, RGmodeC=0)
And he has got many of them cause i said his thread is too hard for beginners...
You know i am not professianol on avisynth and you saw the pictures...
I just wonder which denoiser could be better for the main source...
Thanks for all your helps... :)
Terranigma
11th March 2007, 18:34
Yes. Degrainmedian's a denoiser, it's just the ones I've suggested would be better suited for higher quality encodes. But if you wish to use degrainmedian, you can use a script like this:
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=2.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
:)
TheRainmaker
11th March 2007, 18:47
Yes. Degrainmedian's a denoiser, it's just the ones I've suggested would be better suited for higher quality encodes. But if you wish to use degrainmedian, you can use a script like this:
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=2.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
:)
Ohh! i see that thanks for the script...
So i will use that without;
a=last
b = a.
and end of the line of script?
PS: Its very hard to know which denoiser is suitable for main source...How can we know...?
Need to learn much more things i know...
Lets take a try again with your script...
Thanks so much... :)
Terranigma
11th March 2007, 18:48
So i will use that without;
a=last
b = a.
and end of the line of script?
Yes, just like I have it. Copy/Paste.
TheRainmaker
12th March 2007, 15:34
I used that script but nothing has changed in output movie!
It same as before one
I think SeeSaw script and others not worked!
Still blur...
I forgot something or not?
The code was i used;
# PLUGINS
LoadPlugin("F:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\decomb.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\KernelDeInt.dll")
LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\dgbob.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\Convolution3d.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\FluxSmooth.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\TomsMoComp.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\VSFilter.dll")
#LoadPlugin("F:\PROGRA~1\GORDIA~1\AviSynthPlugins\SimpleResize.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\MaskTools.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
#LoadPlugin("F:\Program Files\AviSynth 2.5\plugins\Repair.dll)
import("F:\Program Files\AviSynth 2.5\plugins\seesaw.avs")
import("F:\Program Files\AviSynth 2.5\plugins\Soothe.avs")
# SOURCE
mpeg2source("F:\BARBAR\VTS_01_1.d2v")
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# or use
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DEINTERLACING (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
# DEINTERLACING (2)
#KernelDeInt(order=1,sharp=true)
# or maybe
#DGBob(order=1,mode=0)
# DEINTERLACING (3) - special requests
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(0,72,718,432)
# SUBTITLES
#VobSub("FileName")
# RESIZING
LanczosResize(720,304)
# DENOISING: choose one combination (or none)
Undot()
# 1) little noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
# 2) medium noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
# 3) heavy noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
# BORDERS
#AddBorders(left,top,right,bottom)
# COMPRESSIBILITY CHECK
# !!!!Snip Size now has to be 14 for use in GKnot!
#SelectRangeEvery(280,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=2.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
Because the pictures are some as with simple GKnot result...
Simple:
http://img181.imageshack.us/img181/3638/95275947og5gf0.th.png (http://img181.imageshack.us/my.php?image=95275947og5gf0.png)
With:
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=2.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
http://img181.imageshack.us/img181/7716/58955155mq1.th.png (http://img181.imageshack.us/my.php?image=58955155mq1.png)
With:
a=last
b = a.DeGrainMedian( mode=1 )
SeeSaw( a, b, NRlimit=4, NRlimit2=5, Sstr=1.5, Slimit=9, Spower=9, Szp=16, sootheT=80, bias=40 )
Removegrain(mode=1)
http://img181.imageshack.us/img181/9771/b1ct1fz7.th.png (http://img181.imageshack.us/my.php?image=b1ct1fz7.png)
Terranigma
12th March 2007, 16:12
if you wanna increase the details, increase the sstr parameter like so
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=3.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
I had you used an increased super sampling to prevent less aliasing as possible at the cost of it being less sharp. But you can always increase the sharpening strength. :)
TheRainmaker
12th March 2007, 16:20
if you wanna increase the details, increase the sstr parameter like so
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=3.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
I had you used an increased super sampling to prevent less aliasing as possible at the cost of it being less sharp. But you can always increase the sharpening strength. :)
Thanks Terranigma... :)
I will try one more with your parameters...I want more sharpening but i dont know that scripts gives me more sharpening?
I would like ask that; can i add Convolution3d filter too with them?
Terranigma
12th March 2007, 16:24
Should be able to. Add it before degrainmedian, and don't forget to adjust seesaw's sstr paramter if it blur :)
TheRainmaker
12th March 2007, 16:28
Should be able to. Add it before degrainmedian, and don't forget to adjust seesaw's sstr paramter if it blur :)
You mean like this:
Convolution3d("moviehq")
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=3.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
Thanks... :)
Terranigma
12th March 2007, 16:29
Yes, preview the results in avsp or virtualdub :)
TheRainmaker
12th March 2007, 16:33
Yes, preview the results in avsp or virtualdub :)
Alright! It's opening in GKnot & AvSP...
Take a try...
Many Thanks.... :)
TheRainmaker
13th March 2007, 10:13
The results for my tests:
Without seesaw:
http://img223.imageshack.us/img223/2521/25747482gw7.th.png (http://img223.imageshack.us/my.php?image=25747482gw7.png)
With seesaw but different parameters:
http://img223.imageshack.us/img223/8387/a1ti1.th.png (http://img223.imageshack.us/my.php?image=a1ti1.png)
And the final:
http://img223.imageshack.us/img223/713/14446733ef2.th.png (http://img223.imageshack.us/my.php?image=14446733ef2.png)
Without seesaw:
http://img223.imageshack.us/img223/3529/90920735yr4.th.png (http://img223.imageshack.us/my.php?image=90920735yr4.png)
With seesaw but different parameters:
http://img223.imageshack.us/img223/628/b1kf7.th.png (http://img223.imageshack.us/my.php?image=b1kf7.png)
-------------------------------------------------------------------------------------
(If you compare only two of them its look like almost dvd source out... but i think need a little bit more sharpness...)
And the final:
http://img223.imageshack.us/img223/1115/49124340nd7.th.png (http://img223.imageshack.us/my.php?image=49124340nd7.png)
Original DVD Source for Compare:
http://img246.imageshack.us/img246/599/origjr1.th.png (http://img246.imageshack.us/my.php?image=origjr1.png)
--------------------------------------------------------------------------------
Without seesaw:
http://img223.imageshack.us/img223/5795/59939749bn5.th.png (http://img223.imageshack.us/my.php?image=59939749bn5.png)
With seesaw but different parameters:
http://img223.imageshack.us/img223/1668/z1la8.th.png (http://img223.imageshack.us/my.php?image=z1la8.png)
And the final:
http://img223.imageshack.us/img223/4510/32708199ap8.th.png (http://img223.imageshack.us/my.php?image=32708199ap8.png)
PS: Pls compare eyes on that pictures...The Final results are looks more brightness and sharpness... :)
And sample(no audio) for final results:
http://rapidshare.tc/13550111
I think final results are looks better befores...
Do you think some more sstr + (exmpl:higher than 3.0) for increase the details or some more sets?
Special thanks to Terranigma... :)
I learned lots of things what i know about avisynth and seesaw from him...
TheRainmaker
13th March 2007, 15:22
If its able I would like to try with different sstr(4.0) parameters for more increase the details and add one more plugin as like ColorMatrix v2.1 with code as below;
ColorMatrix()
Convolution3d("moviehq")
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=4.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
And i have a question about Undot() and Deen() ? What will be differences if i use them in above code before ColorMatrix?
What is your suggestions?
Terranigma
13th March 2007, 15:54
If its able I would like to try with different sstr(4.0) parameters for more increase the details and add one more plugin as like ColorMatrix v2.1 with code as below;
ColorMatrix()
Convolution3d("moviehq")
degrainmedian(mode=3)
dull= last
sharp = dull.SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=4.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
Soothe(sharp, dull, 5)
RemoveGrain(mode=1)
And i have a question about Undot() and Deen() ? What will be differences if i use them in above code before ColorMatrix?
What is your suggestions?
Deen is a noise remover, undot is a slight deringing , dotcrawl remover. Undot it the equivalent to removegrain(mode=1), except removegrain would be faster depending on what version u use, i.e., SSE2, SSE3. So undot isn't really necessary as I had you use removegrain already :)
Deen destroys too much detail. I'd avoid ever using that. Check out mvtools and it's internal denoisers or fft3d instead.
Colormatrix would be better if used like so.
If Interlaced:
d2vpath = "F:\BARBAR\VTS_01_1.d2v"
mpeg2source(d2vpath,ipp=true,info=3)
ColorMatrix(hints=true, interlaced=true)
If progressive:
d2vpath = "F:\BARBAR\VTS_01_1.d2v"
mpeg2source(d2vpath,ipp=false,info=3)
ColorMatrix(hints=true, interlaced=false)
TheRainmaker
13th March 2007, 16:13
My source is progressive so i'll use;
d2vpath = "F:\BARBAR\VTS_01_1.d2v"
mpeg2source(d2vpath,ipp=false,info=3)
ColorMatrix(hints=true, interlaced=false)
Do i have to use after mpeg2source line?
Can i use before of Convolution3d("moviehq")?
Because i saw in this forum someone used different as like;
ColorMatrix()
And you mean the should be as like;
mpeg2source(F:\BARBAR\VTS_01_1.d2v,ipp=false,info=3)(without quotation marks)
ColorMatrix(hints=true, interlaced=false)
Did you check/compare that pictures and sample video?
If you did already what do you think about that?
Can i set sstr paramaters as like 3.5 or 4.0, is it able?
PS:How can i know definetly my DVD source is Progressive or Interlaced?
Terranigma
13th March 2007, 16:40
My source is progressive so i'll use;
d2vpath = "F:\BARBAR\VTS_01_1.d2v"
mpeg2source(d2vpath,ipp=false,info=3)
ColorMatrix(hints=true, interlaced=false)
Do i have to use after mpeg2source line?
Can i use before of Convolution3d("moviehq")?
Because i saw in this forum someone used different as like;
ColorMatrix()
And you mean the should be as like;
mpeg2source(F:\BARBAR\VTS_01_1.d2v,ipp=false,info=3)(without quotation marks)
ColorMatrix(hints=true, interlaced=false)
Did you check/compare that pictures and sample video?
If you did already what do you think about that?
Can i set sstr paramaters as like 3.5 or 4.0, is it able?
PS:How can i know definetly my DVD source is Progressive or Interlaced?
a. Yes, I checked and compared. The Final output looks better :)
b. Yes, you can set the sstr parameters to 3.5, 4.0. If you want to truly experience the crystal clarity principle, raise the slimit, or make it limitless :p
c. There's a couple of ways you can determine if your source is progressive or interlaced:
1. In dgmpgdec (dgindex), choose "preview" to check.
2. Use a gui text editor such as "AvsP', and add info() as a function, then preview the clip with "F5" to check.
Lastly. No, the way I showed you above is a simpler, more proficient way to use mpeg2source :)
I don't know who'd use colormatrix like that. Definately not me. You should use it like I've mentioned above. Let dgindex (info=3) determine the colorimetry property. :)
TheRainmaker
13th March 2007, 17:06
MeGui:
Progressive
DGindex:
Interlaced
AvSP:
I couldn't get info... :( something is wrong i thing)
How can you do in AvSP?
If you want to truly experience the crystal clarity principle, raise the slimit, or make it limitless
Are you sure...? :)
What is the limit of slimit paramater?
Or which one is able 60 or 70?
What is your prefer sets?
I wanna get acceptable rip from DVD... If i get better quality more than DVD source that is enough... :p
Thanks for your more tips... :)
Terranigma
13th March 2007, 17:19
MeGui:
Progressive
DGindex:
Interlaced
AvSP:
I couldn't get info... :( something is wrong i thing)
How can you do in AvSP?
If you want to truly experience the crystal clarity principle, raise the slimit, or make it limitless
Are you sure...? :)
What is the limit of slimit paramater?
Or which one is able 60 or 70?
What is your prefer sets?
I wanna get acceptable rip from DVD... If i get better quality more than DVD source that is enough... :p
Thanks for your more tips... :)
This's what I was telling someone the other day. That megui sometimes reports some sources as progressive when it's really interlaced. Always Trust Dgindex :)
In avsp.. Open your script, add info, then hit "f5". You might have to specify an external media player as well such as mpclassic.
Yes i'm sure.
I'm not sure about the limit, but I assume it's 100. (Perhaps Didée could clairfy)
Raise it to levels that satisfies you. You pick the limit. I keep it near 60-70 myself. :devil:
TheRainmaker
13th March 2007, 17:36
This's what I was telling someone the other day. That megui sometimes reports some sources as progressive when it's really interlaced. Always Trust Dgindex :)
In avsp.. Open your script, add info, then hit "f5". You might have to specify an external media player as well such as mpclassic.
Yes i'm sure.
I'm not sure about the limit, but I assume it's 100. (Perhaps Didée could clairfy)
Raise it to levels that satisfies you. You pick the limit. I keep it near 60-70 myself. :devil:
This one in GSpot:
http://img374.imageshack.us/img374/8053/gspotge0.th.jpg (http://img374.imageshack.us/my.php?image=gspotge0.jpg)
In AvsP with MPClassic:
http://img374.imageshack.us/img374/5582/adszrj4.th.jpg (http://img374.imageshack.us/my.php?image=adszrj4.jpg)
(I didn't see any info about progressive/interlaced)
I am gonna crazy... :confused:
Cause Dgindex says for all my dvd's: interlaced
i never saw progressive on there!
You checked output video...There is no problem i think but,do i have to add deinterlace plugin as like TomsMoComp?
Or what is suggestion for deinterlace?
Terranigma
13th March 2007, 17:44
I am gonna crazy... :confused:
Cause Dgindex says for all my dvd's: interlaced
i never saw progressive on there!
Dgindex is correct because it checks flags to determine if a source is interlaced or not.
From gspot, I/L is highlighted. That means it's interlaced. Just because a clip displays it's using the interlaced flag, doesn't mean it needs to be deinterlaced. If the frames looks like they're progressive, then leave them as is and encode as progressive.
And yea, you're right about info not displaying whether something is interlaced, excuse me there :/
TheRainmaker
13th March 2007, 17:55
Dgindex is correct because it checks flags to determine if a source is interlaced or not.
From gspot, I/L is highlighted. That means it's interlaced. Just because a clip displays it's using the interlaced flag, doesn't mean it needs to be deinterlaced. If the frames looks like they're progressive, then leave them as is and encode as progressive.
And yea, you're right about info not displaying whether something is interlaced, excuse me there :/
So i didn't see any problem in output video and i'll not add deinterlace filter too...:)
I never know that and good to know when i get preview in AvsP with info() end of the line:
CPU detected x87 MMX ISSE SSE SSE2 SSE3
That means my CPU is suitable for SSE3 so i can use RemoveGrainSSE3 instead of RemoveGrain... :)
I'll try more practice with my DVD with your suggestions...
Thanks a lot...
foxyshadis
13th March 2007, 18:49
Playing with sstr too much without balancing other parameters isn't a great idea; it can cause weird artifacts, with jarring transitions from smooth to crackling, or at least won't scale the way you expect from something named "strength". There's a reason it says "# Sharpening strength (don't touch this too much)".
The sdamplo parameter also strongly effects the amount of sharpening, and bias, slimit, and szp will all effect the nature of the output.
TheRainmaker
13th March 2007, 19:41
Playing with sstr too much without balancing other parameters isn't a great idea; it can cause weird artifacts, with jarring transitions from smooth to crackling, or at least won't scale the way you expect from something named "strength". There's a reason it says "# Sharpening strength (don't touch this too much)".
The sdamplo parameter also strongly effects the amount of sharpening, and bias, slimit, and szp will all effect the nature of the output.
Thanks for this good tip... :)
But when i leaved alone with default sets i got blurid output...
Please tell me which sets is touchable for sharpness?
Also 3.0 is not good idea for sstr parameter?
Terranigma
13th March 2007, 20:00
Thanks for this good tip... :)
But when i leaved alone with default sets i got blurid output...
Please tell me which sets is touchable for sharpness?
Also 3.0 is not good idea for sstr parameter?
foxyshadis's just warning us that setting the sharpening strength (sstr) too high will cause unexpected results. 3.0 with a super sampling factor of 1.25 is fine. But don't increase it much higher than that, or at all :)
Seraphic-
14th March 2007, 13:08
Is the version of SeeSaw.avs on page one the most up-to-date version or is there a newer version that is recommended? I'm thinking of giving this 'SeeSaw' sharpening tool a go as it seems to be designed to work well for what I need, which is re-sharpening a source that is somewhat blurred after a resizing for 16:9 wide-screen. However, I see most of the result images are from live-action sources. Will this work well for 3D Rendered Graphics?
The top image is with no sharping after resize and the below is with the internal sharping tool in VirtualDub at level 15 after resize.
Question: (How does the internal sharpener of VirtualDub compare to Avisynth based ones? The VirtualDub one seems to over-sharpen my sources when set to anything over 20.)
http://www.seraphicgate.com/1.png
foxyshadis
14th March 2007, 14:43
Didée's are designed specifically to avoid that halo around edges. Other generic sharpens (like the built-in one or the warpsharp unsharpmask) will give you the halo, since they're the same old thing and vdub and photoshop have.
LimitedSharpenFaster will halo if you push it too hard, but it sharpens much much more first. And SeeSaw never will in my experience; instead, it creates aliasing (like xsharpen), which tends to look better for cartoons and CG. But in normal use you won't ever see this.
Here's the seesaw scripts: http://forum.doom9.org/showthread.php?p=920642#post920642
Those are both the same image, btw. :p
Seraphic-
14th March 2007, 15:40
Didée's are designed specifically to avoid that halo around edges. Other generic sharpens (like the built-in one or the warpsharp unsharpmask) will give you the halo, since they're the same old thing and vdub and photoshop have.
LimitedSharpenFaster will halo if you push it too hard, but it sharpens much much more first. And SeeSaw never will in my experience; instead, it creates aliasing (like xsharpen), which tends to look better for cartoons and CG. But in normal use you won't ever see this.
Here's the seesaw scripts: http://forum.doom9.org/showthread.php?p=920642#post920642
Those are both the same image, btw. :p
Thanks for the link, if I get a chance later today I'll give it a try. But what you said about it adding some "aliasing" makes me wonder if it will make the image too jagged around the edges.
Oh, that is the same frame, but like I said, the top has no sharpening and the bottom has some from the internal sharpener of VirtualDub (compare the two images and their text). As you can see, I don't need much correction for my source, just to re-sharpen after the resize.
Terranigma
14th March 2007, 16:38
SeeSaw never will in my experience; instead, it creates aliasing (like xsharpen), which tends to look better for cartoons and CG.
Ahh, So you're saying that aliasing is a good thing for Animes/Mangas?
So that means I should keep the ssx ,ssy parameters at the default value since it doesn't avoid, but create aliasing? :p
foxyshadis
14th March 2007, 17:33
Not that it's good, just that it's less ugly than huge halos around every line. Raising ss does prevent aliasing, but also places an upper limit on the possible sharpening; since the resolution is finite, the only way to raise local contrast (sharpen) is to move adjacent pixels further from each other. Aliasing means they separate into immediate plateaus, haloing means they boost every transition regardless of what's beyond. There isn't really any other way of sharpening.
You can raise the resolution permanently (dest_x and dest_y) to achieve more sharpening without aliasing/ringing, but at the cost of more storage, of course.
Didée
14th March 2007, 22:07
Oh my ... two days not here, and things go like this.
I used that script but nothing has changed in output movie!
It same as before one
I think SeeSaw script and others not worked!
...
SeeSaw(ssx=1.25,NRlimit=0, NRlimit2=5, Sstr=2.0, Szp=1, Slimit=50, Sdamplo=6, Spower=0, bias=0, sootheT=0, SdampHi=52)
No surprise. Who was the jester telling you those totally fu**ed-up settings? They're so insanely screwed from sanity, it's hard to believe ...
Szp=1 : drives sharpening strength way beyond sanity.
Default is 16. Useful is 8 ~ 64.
Slimit=50 : no harm, but you really don't want pixels that are sharpened by that much ...
Spower=0 : Wohaaargh!! By this you turn SeeSaw into a borked joke! For some plugin writers, "power" eventually might be just a "cool" denomination. When I name it "power", then the meaning is "power" in the mathematical sense, i.e. (value)^(power).
Never ever set this to zero. (x^0 == 1, no matter what value x is. Unusable for processing...)
bias=0 : Oh well. That's a good way to exclude as much detail as possible from sharpening.
SeeSaw's default values surely are not "the best" for each&every source. But they are a *reasonable* starting point.
Terranigma
14th March 2007, 22:15
Oh my ... two days not here, and things go like this.
No surprise. Who was the jester telling you those totally fu**ed-up settings? They're so insanely screwed from sanity, it's hard to believe ...
Szp=1 : drives sharpening strength way beyond sanity.
Default is 16. Useful is 8 ~ 64.
Slimit=50 : no harm, but you really don't want pixels that are sharpened by that much ...
Spower=0 : Wohaaargh!! By this you turn SeeSaw into a borked joke! For some plugin writers, "power" eventually might be just a "cool" denomination. When I name it "power", then the meaning is "power" in the mathematical sense, i.e. (value)^(power).
Never ever set this to zero. (x^0 == 1, no matter what value x is. Unusable for processing...)
bias=0 : Oh well. That's a good way to exclude as much detail as possible from sharpening.
SeeSaw's default values surely are not "the best" for each&every source. But they are a *reasonable* starting point.
Didée I think he/she took a page from my book, which I took a page from Jeremy Duncan. The settings can be found
Here (http://forum.doom9.org/showthread.php?p=873467#post873467)
Could you give us some good initial settings to start with besides the default values? :p
Pookie
14th March 2007, 22:42
Terranigma - The first post in the thread (page 1) has a example setting that should demonstrate the SeeSaw effect without overdoing things. Of course, your source video will dictate the settings when you use SeeSaw. The before and after pic I posted on page 1 is that source using those particular settings. DegrainMedian was the denoiser.
I'm working on the Wiki doc for SeeSaw right now and I'll include some info Didée sent a while back about what the major parameters actually do.
Terranigma
14th March 2007, 22:50
Thanks Pookie, I'll be looking forward to that wiki :D
Edit: Pookie, I just tried your results on the first page and I like it much more than Jeremy Duncan's :)
Pookie
15th March 2007, 00:01
Jeremy focuses on realtime playback. Might look different on his equipment/eyes.
Terranigma
15th March 2007, 00:44
Yea i've noticed. Would be great to see an optimized .dll version of it.
TheRainmaker
15th March 2007, 10:09
DidéeCould you give us some good initial settings to start with besides the default values?
Yes! I really wonder that after reading of Didée's post, if someone says here best values of them...I know it depends to your source...
Slimit? Spower? Bias? etc...
I tried many rips and spent much more time to get real SeeSaw sharpening...
Many questions if compare to with SeeSaw avs:
SeeSaw(ssx=1.25(1.35)(?),NRlimit=0(2-3)(?), NRlimit2=5, Sstr=2.0(1.5)(?), Szp=1(16(8~64)(?), Slimit=50(5)(?), Sdamplo=6, Spower=0(4-5)(?), bias=0(49-50>)(?), sootheT=0(49)(?), SdampHi=52(24>)(?))
foxyshadis
15th March 2007, 10:30
Well, one option is to get avsp. Create a user slider set (sorry, too pressed for time to make one for you) with all the parameters, and then just tweak them however you like so you can see exactly what they do. I've come to understand more than one formerly mysterious filter that way.
TheRainmaker
15th March 2007, 10:40
Well, one option is to get avsp. Create a user slider set (sorry, too pressed for time to make one for you) with all the parameters, and then just tweak them however you like so you can see exactly what they do. I've come to understand more than one formerly mysterious filter that way.
Thanks for your reply...
Is AvsP giving realtime results for what looks like output without encoding?
foxyshadis
15th March 2007, 11:00
Yes, everytime you adjust a slider it refreshes the screen. (Not quite fast enough to refresh instantly, ala photoshop.)
Jeremy Duncan
22nd March 2007, 05:03
Oh my ... two days not here, and things go like this.
No surprise. Who was the jester telling you those totally fu**ed-up settings? They're so insanely screwed from sanity, it's hard to believe ...
Szp=1 : drives sharpening strength way beyond sanity.
Default is 16. Useful is 8 ~ 64.
Slimit=50 : no harm, but you really don't want pixels that are sharpened by that much ...
Spower=0 : Wohaaargh!! By this you turn SeeSaw into a borked joke! For some plugin writers, "power" eventually might be just a "cool" denomination. When I name it "power", then the meaning is "power" in the mathematical sense, i.e. (value)^(power).
Never ever set this to zero. (x^0 == 1, no matter what value x is. Unusable for processing...)
bias=0 : Oh well. That's a good way to exclude as much detail as possible from sharpening.
SeeSaw's default values surely are not "the best" for each&every source. But they are a *reasonable* starting point.
Thanks for pointing those errors out, Didée.
I redid it. Have a look.
SeeSaw(NRlimit=0, NRlimit2=5, Sstr=1.70, Szp=1, Slimit=50, Sdamplo=29, Spower=1, sootheT=0, SdampHi=35)
Thanks for making Seesaw.
Jeremy Duncan
25th March 2007, 00:44
Here's some pictures I took comparing different Seesaw configurations, the New Limitedsharpenfaster config I made today, and one that just uses resizing with no filters.
I've included the FFDshow settings used for each picture.
Link is about 30 MB (http://rapidshare.com/files/22623284/Pictures.zip.html)
Thanks again for your time in making Seesaw, Didée.
Take the time to compare the work I've made using your lsf and seesaw code.
salman1
25th March 2007, 19:49
how to use seasaw filter and where could i dl it thx a lot and is that better than everything
Boulder
25th March 2007, 20:33
Did you happen to read this thread which actually discusses the usage?
dvdfernandes
25th March 2007, 21:12
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\MaskTools-v1.5.8\MaskTools-v1.5.8\MaskTools.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\mvtools-v1.6.2\mvtools.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\masktools-v2.0a30\mt_masktools.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\RemoveGrain\RemoveGrain.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\RemoveGrain\Repair.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\RemoveGrain\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files\GordianKnot\AviSynthPlugins\degrainmedian\degrainmedian.dll")
Import("C:\Program Files\GordianKnot\AviSynthPlugins\SeeSaw\Seesaw.avs")
a= last
b=a.degrainmedian(mode=3)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
It does not work... Am I missing somethig
The error that comes out is
"script error: Ther is no function named "mt_makediff"
I've been reading this thread for a while but can't seem to find the answer.
Thx in advance!
Didée
25th March 2007, 21:53
MaskTools v2 does not work with Avisynth v.2.5.5 - it "doesn't exist", even if imported. Needed is at least Avisynth v.2.5.6. It was mentioned even today, here (http://forum.doom9.org/showthread.php?t=123908).
Pookie
25th March 2007, 23:35
how to use seasaw filter and where could i dl it thx a lot and is that better than everything:goodpost:
fight2win
15th April 2007, 12:34
dude help me out with one thing, with seesaw and compressibility of even more than 140 percent, i get noise and artifacts, is there any way of fine tuning seesaw to get rid of those artifacts??? source is retail dvd9 and encoder is megui-xvid_encraw....
Terranigma
15th April 2007, 15:51
dude help me out with one thing, with seesaw and compressibility of even more than 140 percent, i get noise and artifacts, is there any way of fine tuning seesaw to get rid of those artifacts??? source is retail dvd9 and encoder is megui-xvid_encraw....
Have you tried using seesaw with soothe? It helps with the artifacts, set soothe to around 3%
e.g. using the above seesaw settings
dull= last
sharp = dull.SeeSaw(NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Soothe(sharp, dull, 3)
Didée
15th April 2007, 16:19
@ Terranigma: that's a funny comment. SeeSaw does have Soothe integrated already, by the "SootheT" parameter (temporal soothing); in contrast to the standalone function, it even offers the possibility of "double soothing" by using negative values for SootheT.
Additionally, by "SootheS" it offers the the spatial soothe-down of sharpening known from LimitedSharpen(soft=x).
So no need to combine SeeSaw with Soothe. It's in the package from the start.
@ fight2win:
You have to balance out denoising and sharpening, and there's no general rule for how to achieve that. Basically, you need to use a denoiser that's capable of removing the artefacts that are present in the source. Then, you have to adjust SeeSaw's sharpening settings to needs - remember that SeeSaw performs sharpening on an intermediate clip which is somewhere inbetween "original" and "denoised" (percentual mix, controlled by "bias"). So, given that your denoiser is sufficient, you have to make bias just so big that artefacts creeping through can be sufficiently reduced by the later soothing, which you have to adjust, too.
Terranigma
15th April 2007, 16:48
Didée, Yes I know that. I was going to change SootheT to 0 (to speed up processing). Anyways, what would be the benefit of using double-soothe that's in seesaw over the Soothe Script (Using Soothe from the script seems to speed up things a lot) ?
Didée
15th April 2007, 18:17
Didée, Yes I know that. I was going to change SootheT to 0 (to speed up processing). Anyways, what would be the benefit of using double-soothe that's in seesaw over the Soothe Script (Using Soothe from the script seems to speed up things a lot) ?
The difference of "normal" soothing vs. "double" soothing is (kind of) similar to TemporalSoften(radius=1) vs. TemporalSoften(radius=2), with the target being the "effect-of-sharpening".
I was going to change SootheT to 0 (to speed up processing)
When in a couple of months I'm back into things, I'll try to finally do the MV-version of SeeSaw. After all, that's what it was planned to be from the very start.
In that case, many "speed questions" will get irrelevant ... in particular, questions about realtime-usage. :)
3ngel
16th April 2007, 09:17
@Didee
When in a couple of months I'm back into things, I'll try to finally do the MV-version of SeeSaw. After all, that's what it was planned to be from the very start.
Didee, can you try to stay in YUY2 colorspace? YV12 sometimes (as if you remember i already posted) gives gradients problems (and yes i remember you posted a trick to take the chroma from the unSeesawed clip but that's not the same :)).
Didée
16th April 2007, 09:42
Didee, can you try to stay in YUY2 colorspace? YV12 sometimes (as if you remember i already posted) gives gradients problems (and yes i remember you posted a trick to take the chroma from the unSeesawed clip but that's not the same :)).
Well ... usage of mt_LutXY is an elementary part in most of my scripts, and MaskTools do not support YU2 colorspace ...
But I don't see a problem in this case: the denoising you can do before SeeSaw, and during the sharpening stage, SeeSaw does not touch chroma at all. So there is no "loss of functionality" when merging in the desired chroma after SeeSaw.
Of course this kind of handling could be integrated directly, e.g. LimitedSharpen does it like that.
3ngel
16th April 2007, 09:50
Mmm, so you say SeeSaw doesn't touch chroma...
So the LutXY functions are related only to sharpening?
In this case i could modify (for my use) SeeSaw in order to remain in YUY2 until the sharpening stage, then to YV12?
Moreover i've read into another thread that the latest alpha version of AVS support (or it has to support?) YV16 (=YUY2) and Manao posted a 2.6 masktools.dll, at this point i've not uderstood if that AVS 2.6 actually support YV16 and the mt26.dll does support YV16 itself. Do you know something?
Didée
16th April 2007, 10:31
Mmm, so you say SeeSaw doesn't touch chroma...
So the LutXY functions are related only to sharpening?
[Looks into SeeSaw script] Ermmmh ... partly.
Sharpening only works on luma. For chroma, the difference (original-denoised) is taken, and limited by NRdiff, too. From this point of view, SeeSaw indeed *does* touch chroma.
Mind that SeeSaw was posted quite early, so it's still a bit inmature with its options. For ex., regarding chroma, there are at least the possibilities
- use original chroma
- use denoised chroma as-is
- use denoised chroma, plus limiting
but currently there's no knob to choose between them ... the last one is used, silently. ;)
Moreover i've read into another thread that the latest alpha version of AVS support (or it has to support?) YV16 (=YUY2) and Manao posted a 2.6 masktools.dll, at this point i've not uderstood if that AVS 2.6 actually support YV16 and the mt26.dll does support YV16 itself. Do you know something?
No, I missed that one. Fine if there is progress on the AS 2.6 front, but until it enters beta stage, it's not for me. No time to climb through bare brickwork, sorry.
3ngel
16th April 2007, 11:15
[Looks into SeeSaw script] Ermmmh ... partly.
Sharpening only works on luma. For chroma, the difference (original-denoised) is taken, and limited by NRdiff, too. From this point of view, SeeSaw indeed *does* touch chroma.
Eheh, ok. Then i'll live with it until (hopefully soon) AVS will support officially YV16 and hopefully Manao and you modify the script accordingly :)
foxyshadis
18th April 2007, 09:52
I had some sample code to do a YUY2->YV16 plugin (and YV24), but never finished it because I was more interested in 16-bit. The basic premise was packing it all into the luma plane and setting it to height*width*2 of the original (*3 for YV24). It wouldn't work for spatial processing, but I just thought of adding a 4- or 8-pixel buffer between them so that it wouldn't hurt. Since there's also no Y8, space for chroma planes is wasted, but... *shrug*
You could do the same thing (without padding) now with this:
StackVertical(Greyscale(),UToY(),VToY())
Then some trickery with crop to split it on the other side.
Jeremy Duncan
19th April 2007, 00:55
Didée,
No more realtime Seesaw ? The MV version will be turtle slow ?
I'm a optimist. So I'm not sure of what you meant about the realtime comment in post 435.
JarrettH
23rd April 2007, 04:15
Didee :cool:
dull = ColorMatrix(Mode="Rec.601->Rec.709",scaling=2,threads=2)
sharp = dull.MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=1.70, Szp=1, Slimit=50, Sdamplo=29, Spower=1, sootheT=0, SdampHi=35)",3)
Soothe(sharp, dull, 5)
So I can remove the Soothe line and changing to sootheT=5 would have the same effect?
Boulder
23rd April 2007, 05:52
SeeSaw's Soothe is not the same as the standalone function. I think the difference has been explained in detail somewhere in this thread.
JarrettH
23rd April 2007, 05:57
I did read back a bit and all I got was T=temporal S=spatial
Didée
23rd April 2007, 11:13
dull = ColorMatrix(Mode="Rec.601->Rec.709",scaling=2,threads=2)
sharp = dull.MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=1.70, Szp=1, Slimit=50, Sdamplo=29, Spower=1, sootheT=0, SdampHi=35)",3)
Soothe(sharp, dull, 5)
So I can remove the Soothe line and changing to sootheT=5 would have the same effect?
Well, yeah ... using SeeSaw with "external" soothing was a "carrying sand to the beach"-invention by Jeremy. :p ;)
In "standalone" Soothe, in a temporally mood I had decided to make the parameter "keep", i.e. how much of the original sharpening to keep at least. Hence, 0=maximum soothing (no minimum sharpening to keep), 100=minimum soothing (keep all sharpening).
When building SeeSaw, I found it's a bit unintuitive this way, and reversed the meaning to "strength-of-soothing". Hence, in SeeSaw, sootheT=0 means minimum soothing (do no soothing, keep all sharpening), sootheT=100 means maximum soothing (no minimum sharpening to keep).
So, to achieve the same effect, remove the Soothe line, and set sootheT=95. (95 = 100-5)
Jeremy Duncan
24th April 2007, 03:07
Good stuff.
Comparison pictures. Updated April 30, 2007 (http://rapidshare.com/files/28815879/Pictures.zip.html)
Basic resize used Lanczosresize in avisynth, and colormatrix.
________ Basic ________
I added the Queue output samples part
This version is using the newest FFdshow.
Codecs: All Supported
Blur & NR: denoise3d: Luma: 0.00, Chroma: 2.00, Time: 3.00, HQ Checked
Avisynth: YV12 checked, Add FFdshow Video source checked
ColorMatrix(Mode="Rec.601->Rec.709",scaling=2,threads=2)
Resize & aspect:
Multiply by 2.000
No aspect ratio correction checked
Lanczos
Taps: 2
Luma Sharpen: 0.90
Queue & Output: Queue output samples checked
Output: YV12 checked
________ LimitedSharpenFaster ________
Codecs: All supported
Blur & NR: denoise3d: Luma: 0.00, Chroma: 2.00, Time: 5.00, HQ Checked
Avisynth: YV12 checked, Add FFdshow Video source checked
SetMemoryMax(1024)
ColorMatrix(Mode="Rec.601->Rec.709",scaling=2,threads=2)
Lanczosresize(1680, 1050)
MT("LimitedSharpenFaster(ss_x=1.0, ss_y=1.0, Smode=3, strength=250, overshoot=1)",3)
Queue & Output: Queue output samples checked
Output: YV12 checked
________ SeeSaw Avisynth ________
Codecs: All supported
Avisynth: YV12 checked, Add FFdshow Video source checked
FluxSmoothT(3)
ColorMatrix(Mode="Rec.601->Rec.709",scaling=2,threads=2)
MT("SeeSaw(NRlimit=0, NRlimit2=5, Sstr=2.40, Szp=1, Slimit=50, Sdamplo=16, Spower=1, sootheT=95, SdampHi=39)",3)
lanczosresize(1280, 800)
Queue & Output: Queue output samples checked
Output: YV12 checked
sujit
11th June 2007, 14:45
Yes, that's about the same as mine. Just PM me if you need more help.
Spline36Resize(1440,608) # Blow up the image so denoising will look more natural.
fft3dfilter(sigma=5,plane=0)
fft3dfilter(sigma=6,plane=3)
a = last
b=a.degrainmedian(mode=1).cnr2()
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=6, Spower=8, Sdamp=5, Szp=16)
Spline36Resize(720,304) #Reduce Size back to NTSC DVD spec
addborders(0,88,0,88)
This is something new to me (upsize and then denoise). So, in general, is it a good idea to upsize before denoise?
Thanks:)
Porsche_fan
14th June 2007, 05:17
Well I have been through this thread twice and the only thing I know for sure is that Didée is as funny to read as he is smart.:) That and the advantages of SeeSaw is easily nullified if you play with the parameters too much.
Actually, I think I have a basic understanding of how SeeSaw works. I really like the default settings for the most part, although there are times when I’d like to tweak it a bit. I thought it best to start varying slightly from these defaults, however, I am still new at reading scripts and I am not really sure if I understood correctly what are SeeSaw’s default settings.
I went through and tried to pull them out but I noticed for example that Didée indicates, in this thread, that the default setting for Szp is 16…yet the way I read it I got 18 (16+2). Could someone either help me with the defaults or explain how to read them. Here is my interpretation of the default settings. SeeSaw(ssx=1.0,ssy=1.0,NRlimit=2,NRlimit2=3,Sstr=1.5,Slimit=4,Spower=4,Szp=18,SdampLo=5,SdampHi=24,bias=49,Smode=11,sootheT=49,sootheS=0)
Thanks
hannah
1st July 2007, 05:44
First of all thanks to Didée for this script. I am applying to the badminton games I filmed in my Panasonic NV GS 180 mini DV camcorder. I had been successful in applying the seesaw script on these videos and had very good outcome. I have read this whole thread probably 3 times now however having difficulties finding a post explaining all the parameters in seesaw. Understand that this script is still in development however an explanation of all the parameters will be really helpful. Can someone please direct me to the post if it is already explained somewhere?
Cheers
hannah
2nd July 2007, 03:00
I found this post within this post explaining different parameters.
http://forum.doom9.org/showthread.php?p=920642#post920642
Thanks anyway guys.
Nikos
26th July 2007, 01:11
In main function the default setting for sootheT is 49
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
In Soothe function the default setting for sootheT is 25.
sootheT = default(sootheT, 25 )
Also a little help for Smode and Spower settings please.
radar
14th September 2007, 02:06
hi.
im trying to use seesaw.ive read this entire thread and have some understanding what seesaw dose.im using the filters from the first page,heres my error.
import:couldnt open "c:\program files\avisynth 2.5\plugins\seesaw\seesaw.avs"
(c:\dvd-rb\workin~1\d2vavs\v01000~1.avs,line 14)
#------------------
# AVS File Created by DVD Rebuilder
# VOBID:01, CELLID:01
#------------------
LoadPlugin("C:\Program Files\DVD-RB PRO\DGDecode.dll")
mpeg2source("C:\DVD-RB\WORKING FILES\D2VAVS\V01.D2V")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\RemoveGrainS.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\degrainmedian.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\RepairSSE2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\VagueDenoiser.dll")
import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw\SeeSaw.avs")
a= last
b=a.VagueDenoiser.dll()
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
trim(0,647)
ConvertToYUY2()
AudioDub(BlankClip())
rb ini if this helps
[Status]
version=v1.26.3
mode=1
MovieOnly=1
VTS_MIN_SIZE=25625
VTSM_MIN_SIZE=25625
Original_Size=13174
NavPack_Sectors=55
Excluded_Audio_Sub_Size=0
Space_For_Video=2236025
MainVTS=01
minTiming=11218
Reduction=100.00
VTS_01_SIZE=12781
Progress=2
CCEType=3
Summary=- HIGH/LOW/TYPICAL Bitrates: 7,747/7,747/7,748 Kbs
Encode_Progress=1
[V0100001]
Last_Sector=13156
[V01000000001001]
Action=0
SCR=16890880.000
PTS=16923464.000
Frame_Rate_Code=1
Pulldown=1
Structure=3
Frames=648
Playback=810
First_Sector=0
Last_Sector=13156
Reduction=100.00
Aspect_Ratio=3
HalfD1=0
Pan_and_Scan=0
Convert16=0
EndPTM=19355894.000
Sequence_End_Code=0
Audio_Sub_Sectors=322
ILVU=0
Src_Video_Sectors=12779
Video_Sectors=12779
Porsche_fan
15th October 2007, 17:57
No reason to flinch from using it. Pookie had my OK to post it, and after all, there even were quite a few updates since the first post ... ;)
One of the main reasons to hold SeeSaw back was that I wanted to include a tailored halo-protection. Currently, if the source already has slight halos, there is danger that they will be emphasised. (In the script there's a commented "head=head.maskedmerge(..." line, which will help for the problem when it's uncommented. Not the perfect solution, but it's not bad, either.)
I'm trying to use this feature of SeeSaw but I get an error message that there is no function prewitt. I understand from foxyshadis that prewitt is a part of mt_masktools and I already have the mt_masktools.dll installed.
I am using this version of SeeSaw...I believe it is the latest.
# SeeSaw v0.3e (02 Jan 2006)
#
# (Full Name: "Denoiser-and-Sharpener-are-riding-the-SeeSaw" )
#
# This function provides a (simple) implementation of the "crystality sharpen" principle.
# In conjunction with a user-specified denoised clip, the aim is to enhance
# weak detail, hopefully without oversharpening or creating jaggies on strong
# detail, and produce a result that is temporally stable without detail shimmering,
# while keeping everything within reasonable bitrate requirements.
# This is done by intermixing source, denoised source and a modified sharpening process,
# in a seesaw-like manner.
#
# This version is considered alpha.
#
# Usage:
#
# a = TheNoisySource
# b = a.YourPreferredDenoising()
# SeeSaw( a, b, [parameters] )
#
# You're very much encouraged to feed your own custom denoised clip into SeeSaw.
# If the "denoised" clip parameter is omitted, a simple "spatial pressdown" filter is used.
#
#
# Fiddled together by Didée, for your pleasure.
#
# ======= Main function =======
function SeeSaw( clip clp, clip "denoised",
\ int "NRlimit",int "NRlimit2",
\ float "Sstr", int "Slimit", float "Spower", float "SdampLo", float "SdampHi", float "Szp",
\ float "bias", int "Smode", int "sootheT", int "sootheS", float "ssx", float "ssy")
{
ssx = default( ssx, 1.0 ) # supersampling factor x / SeeSaw doesn't require supersampling urgently.
ssy = default( ssy, ssx ) # supersampling factor y / if at all, small values ~1.25 seem to be enough.
NRlimit = default( NRlimit, 2 ) # absolute limit for pixel change by denoising
NRlimit2 = default( NRlimit2, NRlimit+1) # limit for intermediate denoising
Sstr = default( Sstr, 1.5 ) # Sharpening strength (don't touch this too much)
Slimit = default( Slimit, NRlimit+2 ) # positive: absolute limit for pixel change by sharpening
# negative: pixel's sharpening difference is reduced to diff=pow(diff,1/abs(limit))
Spower = default( Spower, 4 ) # exponent for modified sharpener
Szp = default( Szp, 16+2 ) # zero point - below: overdrive sharpening - above: reduced sharpening
SdampLo = default( SdampLo, Spower+1 ) # reduces overdrive sharpening for very small changes
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
bias = default( bias, 49 ) # bias towards detail ( >= 50 ) , or towards calm result ( < 50 )
Smode = default( Smode, ssx<1.35 ? 11 : ssx<1.51 ? 20 : 19 )
sootheT = default( sootheT, 49 ) # 0=minimum, 100=maximum soothing of sharpener's temporal instableness.
# (-100 .. -1 : will chain 2 instances of temporal soothing.)
sootheS = default( sootheS, 0 ) # 0=minimum, 100=maximum smoothing of sharpener's spatial effect.
Szp = Szp / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
SdampLo = SdampLo / pow(Sstr, 1.0/4.0) / pow( (ssx+ssy)/2.0, 1.0/2.0 )
ox=clp.width
oy=clp.height
xss = m4(ox*ssx)
yss = m4(oy*ssy)
NRL = string( NRlimit )
NRL2 = string( NRlimit2 )
NRLL = string( int(round( NRlimit2 * 100.0/bias - 1.0 )) )
SLIM = string( abs(Slimit) )
BIAS1 = string( bias )
BIAS2 = string( 100-bias )
#ZRP = string( abs(Szp) )
#PWR = string( abs(Spower) )
#DMP = string( SdampLo )
denoised = defined(denoised) ? denoised : mt_lutxy(clp,clp.removegrain(4,-1),"x "+NRL+" + y < x "+NRL+" + x "+NRL+" - y > x "+NRL+" - y ? ?",chroma="copy first")
NRdiff = mt_makediff(clp,denoised,chroma="process")
tame = mt_lutxy(clp,denoised,"x "+NRLL+" + y < x "+NRL2+" + x "+NRLL+" - y > x "+NRL2+" - x "+BIAS1+" * y "+BIAS2+" * + 100 / ? ?")
head = tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,4)
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
(ssx==1.0 && ssy==1.0) ? repair(tame.sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head,1,-1,-1)
\ : repair(tame.lanczosresize(xss,yss).sharpen2(Sstr,Spower,Szp,SdampLo,SdampHi,Smode),head.bicubicresize(xss,yss,-.2,.6),1,-1,-1).lanczosresize(ox,oy)
SootheSS(last,tame,sootheT,sootheS)
sharpdiff= mt_makediff(tame,last)
(NRlimit==0) ? clp : \
mt_lutxy(clp,NRdiff, "y 128 "+NRL+" + > x "+NRL+" - y 128 "+NRL+" - < x "+NRL+" + x y 128 - - ? ?",chroma="process")
Slimit>=0 ? mt_lutxy(last,sharpdiff,"y 128 "+SLIM+" + > x "+SLIM+" - y 128 "+SLIM+" - < x "+SLIM+" + x y 128 - - ? ?",chroma="copy first")
\ : mt_lutxy(last,sharpdiff,"y 128 == x x y 128 - abs 1 "+SlIM+" / ^ y 128 - y 128 - abs / * - ?",chroma="copy first")
return( last )
}
# ======= Modified sharpening function =======
function sharpen2(clip clp, float strength, int power, float zp, float lodmp, float hidmp, int rgmode)
{
STR = string( strength )
PWR = string( 1.0/float(power) )
ZRP = string( ZP )
DMP = string( lodmp )
HDMP = (hidmp==0) ? "1" : "1 x y - abs "+string(hidmp)+" / 4 ^ +"
mt_lutxy( clp, clp.RemoveGrain(rgmode,-1,-1), \
"x y == x x x y - abs "+ZRP+" / "+PWR+" ^ "+ZRP+" * "+STR+" * x y - 2 ^ x y - 2 ^ "+DMP+" + / * x y - x y - abs / * "+HDMP+" / + ?",chroma="copy first")
return( last )
}
# ======= Soothe() function to stabilze sharpening =======
function SootheSS(clip sharp, clip orig, int "sootheT", int "sootheS")
{
sootheT = default(sootheT, 25 )
sootheS = default(sootheS, 0 )
sootheT = (sootheT > 100) ? 100 : (sootheT < -100) ? -100 : sootheT
sootheS = (sootheS > 100) ? 100 : (sootheS < 0) ? 0 : sootheS
ST = string( 100 - abs(sootheT))
SSPT = string( 100 - abs(sootheS))
mt_makediff(orig,sharp)
(sootheS==0) ? last
\ : mt_lutxy( last, last.removegrain(20,-1,-1),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+SSPT+" * 128 + x 128 - abs y 128 - abs > x "+SSPT+" * y 100 "+SSPT+" - * + 100 / x ? ?", chroma="ignore")
(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")
(sootheT > -1) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?",chroma="ignore")
mt_makediff(orig,last)
# mergechroma(sharp) # not needed in SeeSaw
return( last )
}
# ======= MOD4-and-atleast-16 helper function =======
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
Didée
15th October 2007, 18:39
Ah, a forgotten artefact in SeeSaw.
The edgedetection function Prewitt() was implemented by mg262 (aka Clouded) before it made it's way into MaskTools. Either consider it an exercise of searching abilities (to go out and find prewitt.dll somewhere ;) ...)
... or more quickly, exchange
# head = head.mt_merge(tame,tame.prewitt(multiplier=1.0).mt_expand().removegrain(20))
with
head = head.mt_merge(tame,tame.mt_edge("prewitt",0,255,0,0,U=1,V=1).mt_expand().removegrain(20,-1))
Porsche_fan
15th October 2007, 19:29
Thanks Didée for the quick reply and the help. I had made a futile attempt to find prewitt.dll yesterday so I opted for the easier changes.:)
After making the change to the SeeSaw function I still get an error message that reads “Invalid arguments to function mt_edge”.
Didée
15th October 2007, 19:34
Gnnnrgh ... my fault, wrong order of parameters. Above post has been corrected.
adhoya
2nd November 2007, 13:02
hi guys i've read the whole threads for 2 days. i've tested seesaw for a hd movie 1080p, generally it's too slow i feel. it has blocknoise on it slightly. speed is almost 0.1 fps for x264 encoding. am i wrong for some parts. i'll appreciate for your help
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrainsse3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\repairsse3.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools\mvtools.dll")
DirectShowSource("d:\movie.grf",fps=23.976, audio=false)
crop( 0, 144, 0, -136)
spline36resize(1920,800)
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = last.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = last.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
a = last.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.degrainmedian(mode=1)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Spower=8, Szp=16,soothet=80)
converttoyv12()
i feel it's working with no error messages. but it's too slow encoding even if i have quad core cpu 6600 2.4ghz. for encoding 2 and half movie, it might take a week or more. pls some advises
Didée
2nd November 2007, 13:12
It's not SeeSaw which is that slow. It's MVDegrain with all the motion stuff which is killing your speed on HD content.
Try adding a "blksize=16" to all MVAnalyze() lines - you should see a huge speed increase, like 0.2 or even 0.3 fps instead of 0.1 fps ... ;)
Morte66
2nd November 2007, 14:22
Try adding a "blksize=16" to all MVAnalyze() lines
And change overlap from 4 to 8
- you should see a huge speed increase, like 0.2 or even 0.3 fps instead of 0.1 fps ... ;)
I get almost exactly 1 fps for 1920x800 decode/mvdegrain2/huffYUV on one core of my AthlonX2 3800+.
Oh for a 3GHz quadcore and 4 GB RAM to run four in parallel...
@adhoya:
You've got a ConvertToVV12 on the end. What does DirectShow feed you?
adhoya
2nd November 2007, 14:56
It's not SeeSaw which is that slow. It's MVDegrain with all the motion stuff which is killing your speed on HD content.
Try adding a "blksize=16" to all MVAnalyze() lines - you should see a huge speed increase, like 0.2 or even 0.3 fps instead of 0.1 fps ... ;)
thanks a lot. it's working as you said. and it's faster. now 2.25fps. but still it takes 26hr long for encode. i guess i should omit analysing or use other script. i feel it's definitely sharper than other encoding but without deblocker i have lots of artifacts. i feel it has got to be smoothed. do you have any recommend for it.
b/regards
Didée
2nd November 2007, 16:04
Try adding a "blksize=16" to all MVAnalyze() lines
And change overlap from 4 to 8
That's a "can", not a "must". For speed reasons, I thought quarter-block-overlapping should be sufficient for denoising, compared to half-block-overlapping. ;)
@adhoya:
Use higher values for "SdampLo" in SeeSaw. The default (SdampLo=Spower+1) might be too low for you. Try e.g. SdampLo=20..25..30.
Also, your Spower of "8" is pretty high. Note that the default is "4", and realize it's a power function.
With base=5 as an example: Default: 5^4=652. Yours: 5^8=390625. See a difference in those numbers? Powers are growing very quickly, and the default choice for SdampLo works linear, not exponential.
Depending on how your "blocking" looks like exactly, the usage of a deblocker might be appropriate indeed. This can't be judged from the mere statement "there is blocking".
Throwing in some "SootheS" might help as well. Default is zero (deactivated), try SootheS=20..40..60..75.
adhoya
2nd November 2007, 17:08
where they are gone? (kidding..^^) really nice no blocks and noise. i used SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=30, Spower=4, Szp=16,soothet=80,sootheS=75) i'm gonna try without mvdegrain2 and analysis. thanks.
adhoya
2nd November 2007, 23:04
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\repair.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DctFilter\DctFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
DirectShowSource("d:\new.grf",fps=23.976, audio=false)
crop( 0, 144, 0, -136)
spline36resize(1920,800)
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
backward_vec1 = last.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
forward_vec1 = last.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
a = last.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.degrainmedian(mode=1)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=40, Spower=4, Szp=16,soothet=100, sootheS=95)
Deblock_QED(quant1=24, quant2=22, aOff1=2, bOff1=4, aOff2=4, bOff2=8, uv=1)
i tried without mvdgrain analysis.
1) fluxsmooth, seesaw and spresso
2) fluxsmooth and seesaw
these combination were not so cool, too rough images with blocks and mosquito noises. no batter than first try, speed is quite fast,though. but first one also has blocks in some dark places in x264 encoding even if i tuned variables of seesaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=35, Spower=4, Szp=16,soothet=80,sootheS=100). and finally i decided another filter Deblock _QED. but when i load in megui. it says there's no funtion like Deblock_QED.but i already installed whole plug-ins pls post any ideas if possible.
R3Z
3rd November 2007, 04:54
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\repair.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DctFilter\DctFilter.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
DirectShowSource("d:\new.grf",fps=23.976, audio=false)
crop( 0, 144, 0, -136)
spline36resize(1920,800)
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
backward_vec1 = last.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
forward_vec1 = last.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1,blksize=16)
a = last.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,idx=1)
b = a.degrainmedian(mode=1)
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=40, Spower=4, Szp=16,soothet=100, sootheS=95)
Deblock_QED(quant1=24, quant2=22, aOff1=2, bOff1=4, aOff2=4, bOff2=8, uv=1)
i tried without mvdgrain analysis.
these combination were not so cool, too rough images with blocks and mosquito noises. no batter than first try, speed is quite fast,though. but first one also has blocks in some dark places in x264 encoding even if i tuned variables of seesaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=35, Spower=4, Szp=16,soothet=80,sootheS=100). and finally i decided another filter Deblock _QED. but when i load in megui. it says there's no funtion like Deblock_QED.but i already installed whole plug-ins pls post any ideas if possible.
Deblock_QED is an avs script function, save the following as deblock_qed.avsi in your plugins folder;
function Deblock_QED ( clip clp, int "quant1", int "quant2",
\ int "aOff1", int "bOff1", int "aOff2", int "bOff2", int "uv" )
{
quant1 = default( quant1, 20 )
quant2 = default( quant2, 40 )
aOff1 = default( aOff1, quant1/2 ) # I've no clue if these are clever values or not!
bOff1 = default( bOff1, quant1/4 ) # So:
aOff2 = default( aOff2, quant1/4 ) # Also try all these 4 values @ 0 (zero),
bOff2 = default( bOff2, quant1/8 ) # and quant1=30, quant2=40~45 instead.
uv = default( uv, 1 ) # u=3 -> use proposed method for chroma deblocking
# u=2 -> no chroma deblocking at all (fastest method)
ox = clp.width() # u=1|-1 -> directly use chroma debl. from the normal|strong deblock()
oy = clp.height()
# With avisynth scripting, there is no information available about the position of the currently
# processed pixel ... there simply is no such thing like an "actual" processed pixel.
# So first I've to build up a grid covering the transitions between all 8x8 blocks,
# and make some LUTmania with it later. Yes, this is cumbersome.
block = blankclip(clp,width=6*4,height=6*4,color=$000000).addborders(4,4,4,4,color=$FFFFFF)
block = stackhorizontal( block,block,block,block)
block = stackvertical( block,block,block,block) .pointresize(32,32) .binarize(upper=false)
block = stackhorizontal( block,block,block,block,block,block,block,block)
block = stackvertical( block,block,block,block,block,block)
block = stackhorizontal( block,block,block)
block = stackvertical( block,block,block)
block = block .crop(0,0,ox,oy)
block = (uv!=3) ? block
\ : YtoUV(block.crop(0,0,ox/2,oy/2),block.crop(0,0,ox/2,oy/2),block)
block = block.trim(1,1) .loop(framecount(clp))
# create normal deblocking (for block borders) and strong deblocking (for block interiour)
normal = clp.deblock(quant=quant1,aOffset=aOff1,bOffset=bOff1)
strong = clp.deblock(quant=quant2,aOffset=aOff2,bOffset=bOff2)
# build difference maps of both
normalD = yv12lutxy(clp,normal,"x y - 128 +","x y - 128 +","x y - 128 +",U=uv,V=uv)
strongD = yv12lutxy(clp,strong,"x y - 128 +","x y - 128 +","x y - 128 +",U=uv,V=uv)
# separate border values of the difference maps, and set the interiours to '128'
strongD2 = yv12lutxy(StrongD,block,"y 255 = x 128 ?","y 255 = x 128 ?","y 255 = x 128 ?",U=uv,V=uv)
normalD2 = yv12lutxy(normalD,block,"y 255 = x 128 ?","y 255 = x 128 ?","y 255 = x 128 ?",U=uv,V=uv)
# interpolate the border values over the whole block: DCTFilter can do it. (Kiss to Tom Barry!)
# (Note: this is not fully accurate, but a reasonable approximation.)
strongD3 = strongD2.yv12lut("x 128 - 1.01 * 128 +","x 128 - 1.01 * 128 +","x 128 - 1.01 * 128 +",U=uv,V=uv).dctfilter(1.0,1.0,0.0,0.0,0.0,0.0,0.0,0.0)# .yv12lut("x 128 - 2 / 128 +")
# apply compensation from "normal" deblocking to the borders of the full-block-compensations calculated
# from "strong" deblocking ...
strongD4 = yv12lutxy(strongD3,normalD2,"y 128 = x y ?","y 128 = x y ?","y 128 = x y ?",U=uv,V=uv)
# ... and apply it.
deblocked= yv12lutxy(clp,strongD4,"x y 128 - -","x y 128 - -","x y 128 - -",U=uv,V=uv)
# simple decisions how to treat chroma
deblocked = (uv<0) ? deblocked.mergechroma(strong) : uv<2 ? deblocked.mergechroma(normal) : deblocked
deblocked
return( last )
}
adhoya
3rd November 2007, 10:38
i tested three options (1pass maxspeed profile x264 encoding with 7520kbps with no built-in x264 filter i.e. deblock filter)
only used below filters. thanks to R3Z and Didée(thru googling i found a script to correct qed by Didée ), i could install deblock_qed correctly
1)orginal encoding(without any filter)
2)only seesaw(MVDegrain2+degrainmedian)
3)only seesaw(MVDegrain2+degrainmedian)+deblock_qed
these are screenshots
original (1 pass maxspeed no x264 analyse )
http://thumbnails.keepmyfile.com/40/1194082279376de3.gif (http://www.keepmyfile.com/image/376de31963159)
seesaw only (1 pass maxspeed no x264 analyse )
http://thumbnails.keepmyfile.com/40/11940822788ad789.gif (http://www.keepmyfile.com/image/8ad7891963158)
seesaw + deblocker (1 pass maxspeed no x264 analyse )
http://thumbnails.keepmyfile.com/40/1194082275cd976f.gif (http://www.keepmyfile.com/image/cd976f1963157)
seesaw+x264 built-in deblocker (2pass hq slow profile, eqm_avc_hr.cfg matrix)
http://thumbnails.keepmyfile.com/40/11940846912bf0b6.gif (http://www.keepmyfile.com/image/2bf0b61963216)
at last blocks gone away.
Didée
3rd November 2007, 14:46
Somehow it seems your image quality problems lie not with SeeSaw, but rather with x264's settings ...
BTW, at that location where you have placed Deblock_qed, it is pretty much useless. That filter deals for removing blocking artefacts that are in the source. After having filtered the whole thing with MVDegrain+DegrainMedian already, there probably is no more blocking there that Deblock_qed could remove (or at least reckognize).
Also, you have a resizer at the start of the script. If that resizer actually does something (i.e. resolution is different than 1920x800 after cropping - not sure if it is, can't tell if your DS decoder spits out 1080p with 1080 or 1088 vertical pixels), then Deblock_qed can no more work correctly no matter what.
Prior to deblocking: NO resizing. NO noise filtering. Cropping only at macroblock boundaries.
adhoya
3rd November 2007, 16:46
resolution is different than 1920x800 after cropping - not sure if it is, can't tell if your DS decoder spits out 1080p with 1080 or 1088 vertical pixels
you're right. i removed resizing script. i got much better results with seesaw itself. now i wonder i got the wrong way. of course, original HD source has perfectly no block but little mosquito noises and it's sharp. with your comment, i realized deblock qed is no use, cause block is generated during encode. only x264 setting can control them. but those filters(i.e mv,degrain,seesaw....) can get rid of other noise and blocks within source, making movie sharper or smooth. just now. but i hoped i could control blocks by encoding within avs scripts. maybe no way~!
and i am wondering why, after encode, colors goes different. it's sharper and has less noise but not that vivid compared to source after encode with seesaw. it could be natural consequense. but i hope to know the method to get back as much as possible. is there any(sharper and vivid)?
Adub
3rd November 2007, 23:04
Are you using Colormatrix?
Fizick
16th November 2007, 17:00
Some bug was found with SeeSaw and Vfapi.
http://forum.doom9.org/showthread.php?t=128611
Didée, here is my bug report :)
VFapi catch all exception internally and report about error in float operation. (Avisynth itselft for some reason skip it).
I tried Sharpen2 function alone: it produce the bug too.
Then I try read your the extra long yv12lutxy expression. :)
It is really expressive expresion! :)
But now I know what is error. It is substring like:
"x y - x y - abs /"
In normal notation it is: (x-y)/abs(x-y)
Probably you wanted to construct the "sign" function.
But if x=y then you have 0/0
What is the result?
VFapi works fine (without error) when I replace the expression by "x < y -1 1 ?" or "x y - x y - abs 0.01 + /" or some other,
but i do not know your intention about value of 0/0.
Please correct it and similar substring like "y 128 - y 128 - abs /"
Didée
16th November 2007, 19:05
How could that be? Note the start of the expression:
"x y == x [...] x y - x y - abs / * + ?"
The case of "division by zero" can only take place if x equals y. But that case is explicitely checked for as first condition. So, IF x equals y, then the part with the division should not even be evaluated.
Same goes for the similar expression with "y 128 -".
Moreover, it's "only" in a mt_lutxy call: even if I overlooked something, then the hypothetical division-by-zero occurs only during the LUT building (which is handled by MaskTools without producing an error).
There is no reason why there should be a problem from that side. Either the script evaluates, or it does not. From my experience, it does.
Fizick
16th November 2007, 20:08
yes, it is during LUT building (at constructor).
yes, masktools for some reason do not report.
The order of internal calulations may differ ( i do not know why).
Probably even if you write condition at the left, evaluator may firstly calculate right part of expression. (to produce intermediate LUT).
And quite probably, that Avisynth or MaskTools skip "weak" exception like division by 0.
It is better to fix even potential bugs. They may appear in some case (next versions etc).
From my experience, the script does not evaluated with VFApi (see post above), but modified script does.
:)
Simple script:
a=version().converttoyv12()
b=a.blur(1)
yv12lutxy(b,a,"x y /",u=2,v=2)
produce the same results. (works itself but do not work with VFapi)
Fizick
16th November 2007, 20:30
Mostly for programmers. DGFapi use:
try {
...
*(j->clip) = j->avsEnv->Invoke("Import", AVSValue(args1, 1)).AsClip();
...
}
catch (AvisynthError e)
{
OutputDebugString("DGVfapi: error (Avisynth Error) loading avisynth script!\n");
sprintf(buf,"DGVfapi: %s.\n", e.msg);
OutputDebugString(buf);
closeAVS(j);
return VF_ERROR;
}
catch (...)
{
OutputDebugString("DGVfapi: error (Unknown) loading avisynth script!\n");
closeAVS(j);
return VF_ERROR;
}
Debugview log:
[3556] DGVfapi: error (Avisynth Error) loading avisynth script!
[3556] DGVfapi: Evaluate: System exception - Float Invalid Operation
Manao
16th November 2007, 20:55
The case of "division by zero" can only take place if x equals y. But that case is explicitely checked for as first condition. So, IF x equals y, then the part with the division should not even be evaluated.Actually it is. Let's take the following expression :
x y = y x y / ?
The expression will be processed as follow :
? -> fetch next three values
/ -> fetch next two values
y -> return y
x -> return x
-> return x / y
y -> return y
= -> fetch next two values
y -> return y
x -> return x
-> return abs(x-y) < 0.000001 ? 1 : -1
-> return abs(x-y) < 0.000001 ? y : x / y
So if in the previous code, y = 0, then it does compute x / 0 even if x = 0.
Alain2
17th November 2007, 15:10
Interesting, thanks for the explanation of how the code is interpreted :) I never use very complex formula in my scripts so I (think I) never came across such problems, but I will keep that in mind now ^^ I think this example would be worth being added to the masktools doc in the section V) Reverse polish notation
cheshire2k
16th January 2008, 23:34
please could someone tell me what i need and how i put a movie thru this seesaw filter I like the quality pictures of it I have virtualdub virtualdubmod and avisynht installed i alreadty downloaded the first 3 files the seesaw one masktools and the other one i just dont know how to do it.
Thanks
CHESH
cheshire2k
23rd January 2008, 15:57
ive got the filter working but how do i get the file size to stay the same. I tried lowering the bitirate but is there any calc to do it. Thanks
CHESH
Adub
26th January 2008, 04:28
Yah. It's called a bitrate calculator.
But, that might not help you, as with the increased sharpness comes the necessity for increased bitrate, meaning larger file size.
In short, if you want sharpness, you are going to have to pay for it with bits.
cyspur
26th January 2008, 10:06
Forgive my ignorance, with which program would one load the following?
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MaskTools158\MaskTools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VagueDenoiser\VagueDenoiser.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\mvbob\mvbob.avs")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
MPEG2Source("Z:\DestB\VTS_01_2.d2v")
mvbob()
Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
ConvertToYv12()
a = last
b=a.VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Szp=16)
Lanczos4Resize(640,372)
Sagekilla
27th January 2008, 02:19
What exactly do you mean "load?" If you mean view it, you can use VirtualDubMod to view your video file, windows media player (yuck) , or media player classic.
cyspur
27th January 2008, 12:27
Hi Sagekilla.
I would like to preview the applied filter (script) effect on a vob video file. Can i do this with MPC & if so how would i go about it please. Thanks.
J_Darnley
27th January 2008, 12:49
Open the AviSynth Script in MPC then. File -> Open , drag and drop, or do what I did and associate the avs extension with MPC.
Or are you asking how to create the script in the fist place? They are just plain text files so use any text editor such as notepad to create it and then save the file with an avs extension.
cyspur
28th January 2008, 10:19
Thanks a lot J_Darney, i am starting to understand how these things are working.
McCauley
5th February 2008, 12:42
Hi,
i already searched for an answer, but i haven't found this discussed, so please excuse if it has been brought up before.
Is there a reason that SeeSaw has no inbuilt resizer like LimitedSharpenFaster? If no, could someone point me out how i have to modify the script? I already tried it, but didn't succeed.
Regards and thanks in advance
McCauley
foxyshadis
5th February 2008, 15:27
Because seesaw doesn't need internal supersampling like LSF does, except in extreme cases, there isn't a need for combining all the resizing into one step. You can just resize and call seesaw after that.
McCauley
6th February 2008, 14:45
Hi,
SeeSaw may not urgently need Supersampling, that's right. In fact it is able to sharpen a lot more than LSF while keeping edges very halofree. BUT: The overall sharpening is way too strong for my taste. Changing the sharpening parameter isn't reducing the applied sharpening as much as i want it. The only way too tame it for my needs i found out is using supersampling.
Regards
McCauley
foxyshadis
6th February 2008, 18:09
In that case change the final LanczosResize to use the final width and height, instead of the original.
Vesi
7th February 2008, 14:35
If I want to use other denoiser then seesaw light denoising function, what should I do to turn it off that seesaw denoising function does not effect the Degrainmedian (mode=1), or any other denoiser I use?
foxyshadis
8th February 2008, 08:53
Seesaw only denoises when you don't supply a denoised clip. If you do, it's disabled.
Jeremy Duncan
9th February 2008, 12:29
I wonder how Didée is doing with that new Seesaw he was making?
Adub
10th February 2008, 05:45
He is making a new Seesaw? I thought that was just a rumor that got spread around which ended up being false?
Didee, can you confirm?
Nikos
12th March 2008, 15:32
From SeeSaw function:
SdampHi = default( SdampHi, 24 ) # further reduces sharpening for big sharpening changes. Try 15~30. "0" disables.
My question:
Big or small number mean strong reduction for differences above Szp ?
From Didee's post #318 i thing that small number mean strong reduction for differences above Szp but i wish a confirm :)
For High Definition sources, with relatively good quality, the recommended values are high(~30) or low(~15)?
In previous post #462 Didee wrote for HD sources:
Use higher values for "SdampLo" in SeeSaw. The default (SdampLo=Spower+1) might be too low for you. Try e.g. SdampLo=20..25..30.
zee944
22nd March 2008, 13:57
Hey,
I'm trying to use SeeSaw for a rather clean source, and SeeSaw smoothes it out too strongly. I don't want to turn it off, I just need a little less smoothing. How can I do that? At the moment it seems I can't really adjust the smoothing strength with NRlimit and NRlimit2 (apart from turning off of course). If I have to use a very simple external smoother for SeeSaw, a few recommendations?
foxyshadis
24th March 2008, 08:11
You can try something like removegrain, fluxsmooth, degrainmedian, fft3dfilter/fft3dgpu, vaguedenoiser, mvdegrain.... all depends on the speed and smoothness you're looking for.
saint-francis
18th June 2008, 14:23
Can anyone help me understand why I can't get seesaw to work? When I try this script, or any script like it, I completely loose multithreading and encoding speeds drop down
to about .01 fps and after about 6 hours or so drop down so low that the progress window in MeGUI can't even display a number. After 9 hours of encoding the resulting
file is still less than 1 MB. :confused:
setMTmode (2,0)
DGDecode_mpeg2source("D:\any\video.d2v",info=3)
colormatrix(hints=true)
crop( 6, 102, -4, -104)
Spline36Resize(720,304)
a = last
b=a.TTempSmooth (maxr=6, lthresh=4, cthresh=5, lmdiff=2, cmdiff=3, strength=2, scthresh=12.0, fp=true, vis_blur=0, debug=false, interlaced=false).FFT3DFILTER(sigma=1.6, ncpu=2, bw=14, bh=14, ow=7, oh=7, bt=5, hr=1).Gradfun2db ()
SeeSaw(a,b, NRlimit=5, NRlimit2=6,Sstr=1.5, Slimit=8, Sdamplo=30, Spower=4, Szp=16,soothet=80,sootheS=75)
jeffy
18th June 2008, 23:14
@saint-francis: try putting SetMemoryMax(512) or a lower value at the beginning.
kandrey89
30th June 2008, 23:21
I'm trying to sharpen a pretty clean MPEG2 DVD source, hoowever when I use SeeSaw, I can't get the settings right.
If I sharpen it enough, the pictures looks clean and great, but in some places on certain frames I find oversharpening artefacts.
If I try to get rid of the artifacts, I do a SootheS. But it reduces the sharpness of the picture while removing the artifacts(oversharpened pixels)
Could anyone suggest a setting for SeeSaw that will sharpen but avoid oversharpening single pixels or pixels on a flat color?
Nikos
1st August 2008, 17:18
Sharpen anamorphic source
I want to sharpen with SeeSaw or LSF an Anamorphic (16:9) NTSC DVD (720x480) and then encode anamorphicaly with x264.
The anamorphic sources have different characteristics in both directions.
The resolution after cropping the black bars is 720x360. The normal display resolution with proper (non ITU) stretch is 852x360.
I have four options:
1.SeeSaw without supersampling.
source = last # the resolution is 720x360
a = source
b = source.degrainMedian(mode=3)
SeeSaw( a, b, ........)
2. SeeSaw with horizontal only external supersampling.
source = last # the resolution is 720x360
a= source.spline36Resize(852,360)
b = source.degrainMedian(mode=3).spline36Resize(852,360) # I prefer first denoise, then resize
SeeSaw( a, b, ........) # i don't use the internal supersampling
spline36Resize(720,360)
3. LSF with same ss_x, ss_y.
source = last # the resolution is 720x360
source.degrainMedian(mode=3)
LSF(smode=4, ss_x=1.5, ss_y=1.5) # internal resizer is spline36Resize
4. LSF with differents ss_x, ss_y.
ss_x=1.5*852/720 = 1.775, ss_y = 1.5
source = last # the resolution is 720x360
source.degrainMedian(mode=3)
LSF(smode=4, ss_x=1.775, ss_y=1.5) # internal resizer is spline36Resize
Which is the prefered way ?
foxyshadis
3rd August 2008, 18:09
There is no preferred. It comes down to your taste, and different sources will be better with different things. Look at all four, pick the one you like; we can't do that for you.
I can only say that I tend to prefer #1 myself, and hardly notice any difference in #3 & #4. ss of 1.5 for smode 4 will make it somewhat softer as it is, which is why 1.25 is default.
Nikos
3rd August 2008, 18:58
Thanks foxyshadis for the reply. The 1.5 was just for example. I know that differences are small. The question is, from technical view which is the correct way because of different characteristics in each direction.
Blue_MiSfit
5th September 2008, 23:19
Is there a modifed SeeSaw out there that works with recent builds of Masktools2?
never mind... I had an outdated version installed. The latest on the wiki works fine with Masktools2...
~MiSfit
elguaxo
19th December 2008, 10:38
Mind that SeeSaw was posted quite early, so it's still a bit inmature with its options. For ex., regarding chroma, there are at least the possibilities
- use original chroma
- use denoised chroma as-is
- use denoised chroma, plus limiting
but currently there's no knob to choose between them ... the last one is used, silently. ;)
what should be changed to use denoised chroma as-is instead of use denoised chroma, plus limiting? TIA.
Didée
19th December 2008, 11:29
That's not a complicated change to do, but needs some thinking how to implement as convenient as possible.
For the moment,
SeeSaw(original,denoised,[params]).MergeChroma(denoised)
is the obvious workaround.
To hardcode the usage of denoised chroma without limiting, exchange the two instances of chroma="process" with chroma="copy second". (Referring to the SeeSawMT2 script for MaskTools v2, obviously.)
elguaxo
19th December 2008, 12:14
To hardcode the usage of denoised chroma without limiting, exchange the two instances of chroma="process" with chroma="copy second".
:thanks:
Nephilis
27th May 2010, 11:35
resurrection
When in a couple of months I'm back into things, I'll try to finally do the MV-version of SeeSaw. After all, that's what it was planned to be from the very start.
Hi Didée,
Any progress with MTools version of SeeSaw? Or those (http://forum.doom9.org/showthread.php?p=1380002#post1380002) scripts are good enough according to you?
dansrfe
30th July 2010, 05:13
For some reason I'm getting a really grainy output when using MDegrain2 @ 300 on a relatively clean (yet detail dull) dvd source. It's like this grain that looks like the frame has a glass cover on it with grainy dust particles. Thanks in advance.
Guest
30th July 2010, 05:16
Post a sample of your unprocessed source video and your script. How can we possibly help you without those things?
dansrfe
30th July 2010, 05:22
Right now I just have:
MPEG2Source("G:\DVD\VTS_01_1.d2v", cpu=0)
Crop(0,70,0,-70)
a = last
b = a.MT("""super = MSuper(pel=2, sharp=1)
bv2 = super.MAnalyse(isb = true, delta = 2, overlap=4, blksize=16,chroma=false)
bv1 = super.MAnalyse(isb = true, delta = 1, overlap=4, blksize=16,chroma=false)
fv1 = super.MAnalyse(isb = false, delta = 1, overlap=4, blksize=16,chroma=false)
fv2 = super.MAnalyse(isb = false, delta = 2, overlap=4, blksize=16,chroma=false)
MDegrain2(super, bv1,fv1,bv2,fv2,thSAD=300)""",2,overlap=8)
SeeSaw(a,b)
Cut (http://www.sendspace.com/file/9bjgik)
Also should I be applying this before or after color/level filters?
Guest
30th July 2010, 05:25
That video looks very clean. Why do you want to "sharpen" that?
dansrfe
30th July 2010, 05:26
It just seemed a bit dull to me. Thought it might need some detail enhancement. I just can't seem to understand what seesaw is doing that seems to add extra grain. Even after turning bias down to 0 and lowering szp and sdamphi values it still gives a slightly grainy output.
Guest
30th July 2010, 05:32
I just can't seem to understand what seesaw is doing that seems to add extra grain. It's sharpening. :)
dansrfe
30th July 2010, 05:32
But why is it sharpening the background into grain?
Guest
30th July 2010, 05:37
Because you told it to sharpen it.
Archimedes
30th July 2010, 09:45
MPEG2Source("G:\DVD\VTS_01_1.d2v", cpu=0)
Crop(0,70,0,-70)
a = last
b = a.MT("""super = MSuper(pel=2, sharp=1)
bv2 = super.MAnalyse(isb = true, delta = 2, overlap=4, blksize=16,chroma=false)
bv1 = super.MAnalyse(isb = true, delta = 1, overlap=4, blksize=16,chroma=false)
fv1 = super.MAnalyse(isb = false, delta = 1, overlap=4, blksize=16,chroma=false)
fv2 = super.MAnalyse(isb = false, delta = 2, overlap=4, blksize=16,chroma=false)
MDegrain2(super, bv1,fv1,bv2,fv2,thSAD=300)""",2,overlap=8)
SeeSaw(a,b)
Is the same as:
MPEG2Source("G:\DVD\VTS_01_1.d2v", cpu=0)
Crop(0,70,0,-70)
a = last
b = a.MT("""super = MSuper(pel=2, sharp=1)
SeeSaw(a,b)
Should be:
…
b = MDegrain2(super, bv1,fv1,bv2,fv2,thSAD=300)""",2,overlap=8)
SeeSaw(a,b)
Gavino
30th July 2010, 10:20
b = a.MT("""super = MSuper(pel=2, sharp=1)
...
MDegrain2(super, bv1,fv1,bv2,fv2,thSAD=300)""",2,overlap=8)
SeeSaw(a,b)
Is the same as:
a = last
b = a.MT("""super = MSuper(pel=2, sharp=1)
SeeSaw(a,b)
Should be:
…
b = MDegrain2(super, bv1,fv1,bv2,fv2,thSAD=300)""",2,overlap=8)
SeeSaw(a,b)
No, you are wrong.
If you put the assignment to b inside the MT call, it will only get the result from one slice of the process, not the combined result of all slices.
Archimedes
30th July 2010, 11:16
My mistake. Thanks. Didn't work with the MT stuff in AviSynth so much.
Nephilis
30th July 2010, 14:06
I think the proper and clean notation is;
MPEG2Source("G:\DVD\VTS_01_1.d2v", cpu=0)
Crop(0,70,0,-70)
MT("""
src = last
src_super = MSuper(src, pel=2, sharp=2)
bv2 = MAnalyse(src_super, isb = true, delta = 2, overlap=4, blksize=16,chroma=false)
bv1 = MAnalyse(src_super, isb = true, delta = 1, overlap=4, blksize=16,chroma=false)
fv1 = MAnalyse(src_super, isb = false, delta = 1, overlap=4, blksize=16,chroma=false)
fv2 = MAnalyse(src_super, isb = false, delta = 2, overlap=4, blksize=16,chroma=false)
NR = MDegrain2(src,src_super,bv1,fv1,bv2,fv2,thSAD=300)
shp = SeeSaw(src,NR,{......})
Return shp
""",2,overlap=8)
With this notation SeeSaw takes the advantage of MT, too..
Didée
30th July 2010, 15:26
SeeSaw is not inventing anything out of thin air. It is only enhancing things that are already there. So, if you're getting a noisy background, you can guess what that means.
However, this sort of problem is quite common when MDegrain is combined with strong sharpening. MDegrain has the habit of not killing noise/grain completely, but to construct some "static"/or/"slowly crawling" noise at low intensity. Usually this isn't noticeable in the end result when just denoising is done. But it becomes noticeable when combined with some strong enhancement.
Beak
12th September 2010, 14:14
Hello. I am trying to get this filter to work in MeGui. I use ffdshow as the decoder with no filtering.
DirectShowSource("C:\Users\Brendan\Videos\Video\Video.m2ts", fps=23.976, audio=false, convertfps=true)
#deinterlace
#crop
#resize
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\degrainmedian.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-26.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE3.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\\SeeSaw.avs")
a=last
b=a.DeGrainMedian(limitY=2,limitUV=3,mode=1).
DeGrainMedian(limitY=2,limitUV=3,mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
It loads and previews OK, but MeGui invariably crashes after a minute or so.
I've tried the older version of Masktools and the SeeSaw avs script is the one from the avisynth wiki.
Any help greatly appreciated.
Didée
12th September 2010, 16:28
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-26.dll")
You must use mt_masktools-25.dll. (The -26.dll is for Avisynth 2.6, which you're probably not using.)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE3.dll")
Better try the ~SSE2.dll plugins. When everything is proven to run rock stable, then you can try the SSE3 plugins.
Of course there's a big drawback - when you use "only" the SSE2 plugins, then a typical 2-hours-encoding might take 2 or 3 seconds longer ... maybe 5, perhaps even 10 seconds. :p
ajp_anton
12th September 2010, 18:49
You must use mt_masktools-25.dll. (The -26.dll is for Avisynth 2.5.6, which you're probably not using.)
I thought -25 was for 2.5.x and -26 for 2.6...
Didée
12th September 2010, 19:08
Yes, of course. Too much typing in too much forums today, I was scatterbrained. Sorry. Post corrected. Thanks for pointing out.
Beak
12th September 2010, 22:03
@Didee
Thank you so much. The encode is in progress. without a crash by switching to the SSE2 dll and the SSE2 repair dlls.
Script now reads:
DirectShowSource("C:\Users\Brendan\Videos\Video\Video.m2ts", fps=23.976, audio=false, convertfps=true)
#deinterlace
#crop
#resize
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\degrainmedian.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-25.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE2.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\\SeeSaw.avs")
a=last
b=a.DeGrainMedian(limitY=2,limitUV=3,mode=1)
DeGrainMedian(limitY=2,limitUV=3,mode=1)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Could you please comment on the denoising commands for DegrainMedian?
I would like 3 noise reduction settings to test.
1 for very light grain or noise. I understand there is some degraining performed by Remove grain. Is this adequate for a relatively clean Bluray source and how must I alter my script?
2 a minimally noisy source.
3 a moderately noisy source.
If degrainmedian is the best choice so much the better but I understand there are many varied filters to use but you have said this filter gives good results with SeeSaw.
The SeeSaw setting I used were from your recommendation near the beginning of the thread.
Thank you very much again for your help. I am excited to see the results several hours from now :)
Your advice on how to use degrainmedian would be invaluable so I can make up some preset type scripts.
Thanks again, BK
Didée
12th September 2010, 23:13
Lots of bad news. :D
1. Can't tell which denoiser is suited better or worse. That depends on the actual source and its specific characteristics.
2. Can't tell you much about DegrainMedian. I've used it only very little over the years.
3. When you're processing HD content, in particular full-HD, then SeeSaw probably won't come out very "impressing". Back then, it really was designed for SD content. One of its key features is using a 3x3 median, and for HD content, 3x3 is too small in most cases. In effect, where SeeSaw can do "BOOM!" on SD, it probably will do "oohh ... nothing" on HD.
Beak
13th September 2010, 00:31
Well. I learned a bit more about scripting anyway.
I have a bunch of DVD's that are 16/9 but encoded as 4/3 so they don't fill the screen properly when I play them.
Ill try the script with the fft 3d filter and see what happens.
Thanks for your help.:thanks:
niru7206
13th September 2010, 17:48
@Didee
Since a week back, seesaw.avs is not working on my pc as well as on my laptop. I have tried those scripts also, which I used earlier for successful ripping. But there is always some error and the script is not working. What should be the reason behind it???
RemoveGrain: invalid mode 20
(c:\program files\avisynth 2.5\plugins\seesaw.avs, line=124)
(c:\program files\avisynth 2.5\plugins\seesaw.avs, line=80)
Help me out, plz!
Didée
13th September 2010, 17:57
Wrong (too old) version of RemoveGrain.
As stated several times ... see e.g. #59 / #60 here (http://forum.doom9.org/showthread.php?p=1418631#post1418631)
niru7206
13th September 2010, 18:43
@Didee
Thanks. It seems to be working. Still I have to check all the Avisynth folder, as some filters are not working properly. Need some guidance...what filter should I retain and what not??? Thanks Didee...seesaw.avs is working now.
Beak
26th September 2010, 04:21
@Didee
Hello. I just used SeeSaw with my improperly letterboxed version of Aliens and got absolutely amazing results with fft3d filter.
I was very disappointed with your revelation that the script would not likely work well on Bluray, then I found out about LSFMod and have been playing with that for now. My first encode is in progress with the following:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\lsfmod\mt_masktools-25.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\lsfmod\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\lsfmod\RepairSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\lsfmod\RSharpen.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\lsfmod\WarpSharp.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\lsfmod\LSFMod.avs")
LSFmod(smode=5)
The source is very slightly grained 1080P.
Frankly, I don't know what I am doing but its great to play with this stuff.
Can you comment on this script I am using? I would be really interested to know what you would suggest as reasonable starter settings for fft3d filter for light and moderate noise.
I currently use ffdshow with the temporal smooth setting at 1 along with the above script but I am not sure it is even required with the rest of the script. I am hoping to remove light noise prior to the avisynth filtering.
My last question is probably contentious, As good as a clean bluray source is already, is additional filtering worth it?. I don't know how to do simultaneous comparisons etc.
I am pretty new to scripting and filtering but I am really intrigued after the result I got on Aliens!! wow
TheProfileth
26th September 2010, 04:58
To do comparisons easily use this site
http://comparescreenshots.slicx.com/
basically just take a screen of the before and then of the after and compare any other conclusions can be drawn from what you see then, also please use another thread if you want continued feed back on this question
Beak
4th October 2010, 03:20
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\FFT3DFilter.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-25.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE3.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE3.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\\SeeSaw.avs")
a=last
b=a.fft3dfilter(sigma=1.5, bt=5, bw=32, bh=32, ow=16, oh=16)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Hello. Can this be modified to run with avisynth MT Version? I could really use some help. The fft3d is slowing things down something silly.
Boulotaur2024
4th October 2010, 14:19
When you're processing HD content, in particular full-HD, then SeeSaw probably won't come out very "impressing". Back then, it really was designed for SD content. One of its key features is using a 3x3 median, and for HD content, 3x3 is too small in most cases. In effect, where SeeSaw can do "BOOM!" on SD, it probably will do "oohh ... nothing" on HD.
I remember you already stating that about LSF, I still use it on HD source even if now I know the plugin's not efficient as it would be on SD source...
But maybe there's a way to apply a proper "LSF-like" effect on HD ? LSFMod is supposed to do that ?
Didée
4th October 2010, 14:42
"LSF-like" effect on HD ? LSFMod is supposed to do that ?
LSFmod probably even less than the original LSF ... iirc, the creator decided to remove the "wide" parameter, which allows (would allow) to accommodate for the farther spatial relations of HD.
Just last week, Motenai Yoda brought up a good idea ... actually a puzzle with one or two pieces missing. A search warrant already has been issued. ;)
Motenai Yoda
4th October 2010, 23:51
one of these pieces was temporal stabilization? :D
Didée
5th October 2010, 01:52
No, not that. Think farther out of the box.
lych_necross
5th October 2010, 07:18
No, not that. Think farther out of the box.
Hmm... Inverse tachyon pulse? :p
Yobbo
5th October 2010, 10:43
Didee's gotta stop taking heroin. He's absorbing into himself.
Didée
5th October 2010, 12:08
Didee's gotta stop taking heroin. He's absorbing into himself.
If that was meant to be a joke, then I did miss it. I don't see how you come to put my name and heroin into context.
This is not funny. (And BTW, definetly not true.)
Midzuki
5th October 2010, 13:24
<OFF-TOPIC>
Hmm... Inverse tachyon
pulse? :p
"Goa'uld technology" would have been less of an absurdity. :p
</OFF-TOPIC>
Yobbo
6th October 2010, 07:14
If that was meant to be a joke, then I did miss it. I don't see how you come to put my name and heroin into context.
This is not funny. (And BTW, definetly not true.)
Well stop posting stupid cryptic comments, you come across as an elitist twat.
Boulder
6th October 2010, 08:11
Maybe he's trying to teach something instead of spoon-feeding everyone?
Yobbo
6th October 2010, 09:01
Maybe he's trying to teach something instead of spoon-feeding everyone?
OK. I "sort of" agree with this sentiment, Boulder. But take it too far, and this forum becomes elitist esoteric "secret cabal" sort of nonsense. Should we use secret passwords & codes and secret handshakes too?
Fer crying out loud, life's short, surely the thing to do is help people out clearly and concisely and not get all smarmy and toffed & ego-massage-craving... Anyway I'll end it here.
MatLz
6th October 2010, 10:15
Anyway I'll end it here.Good boy.
Yobbo
6th October 2010, 12:36
Good boy.
Why you say that? I'm probably older than you, and I raised valid points. Go ahead and be "Didee's bumboy/fanboy", what has he done recently? Some half-assed function that never gets followed-up? Some talk about some gob-smack wonderful "iip" function that never happens? All he does is post condescending/elitist comments everywhere!
I speak the truth, it's up to you whether to listen. I'll end it here, but CAN YOU?
Didée
6th October 2010, 13:22
Sure. I'll end it here just as well.
You explicitely point out your advanced age, but act like a child.
Then, somehow I am missing YOUR history of inventions that would qualify you to attack me in this way. (Crying "crap" is easy. Making useful stuff is not.)
Well, perhaps this comment of you (http://forum.doom9.org/showthread.php?p=1448506#post1448506) is indicating a case of psychological projection (http://en.wikipedia.org/wiki/Psychological_projection)? I know for sure I don't have a drug problem, but the more you speak, the less sure I'm about you ...
Let it be, Yobbo ... for just the reason that it's very off topic for this thread. Fact is, if moderation becomes necessary, the loudest cryer are you.
Bi11
6th October 2010, 17:18
Didée, why do you feel the need to justify the validity or invalidity of an accusation? especially by forcing "examples" that are clearly off-topic/out-of-context for this thread. :(
dansrfe
7th October 2010, 00:13
Hi Didée! I was just wondering whether you were planning on updating or optimizing seesaw in any way or is this basically set in stone? :D btw seesaw rocks :)
Motenai Yoda
7th October 2010, 16:49
if you had any suggestions for the "general purpose non linear pulse multi pass band pass and temporal stabilized sub sharpener", I would appreciate...
I think u sure know the Plato's Allegory of the Cave
Beak
10th October 2010, 01:35
Hello again.
I am running an OC I7 920 at 3.6 Gig. I am getting no more than 3 frames per second with the following script.
DirectShowSource("C:\Users\Brendan\Videos\Video\Video.m2ts", fps=23.976, audio=false, convertfps=true)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\FFT3DFilter.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\mt_masktools-25.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\RepairSSE2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\MT.dll")
Import("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\\SeeSaw.avs")
a=last
b=a.MT("fft3dfilter(sigma=1.5, bt=5, bw=32, bh=32, ow=16, oh=16)",2,8)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
Can anyone tell me if this is normal or if I have made some kind of error?
Thanks for any help or advice.
hartford
10th October 2010, 02:39
I tried your script with several changes: I didn't load MT.dll,
I used RemoveGrainSSE3, and I did a inverse telecine and
decimate on my test.
I have a Dual Conroe, 2.13 MHz. I got 8-9 FPS.
No idea why your fps is half of mine.
Perhaps the MT.dll is the problem? Settings?
My video was 720x480. If your's is 4 times larger that might
account for some of the "slowness."
Beak
10th October 2010, 03:29
Thanks Hartford,
I am working with 1080p and quite a noisy source.
6 of 8 cores are working but still 3 frames per second.
Never thought I would run into horsepower problems. Results on clips are very very good though but 32 hour encodes are no fun.
lych_necross
10th October 2010, 07:16
If I had to guess at your speed problem, it would be fft3dfilter. You could try replacing it with FFT3dGPU. Might help.
Beak
10th October 2010, 13:01
Thanks. I have tried FFT3DGPU in the past and it crashes MeGui consistently. What I did was read more about the parameters. I was using a "best quality" suggestion from the fft3dfilter webpage.
The bt-5 seems to be overkill in this case. I am getting 6.5 frames per second now with bt-3. Still a bit of a wait though, but much better. :)
This might not be a source that responds to any sharpening. Very noisy. These filters are magical but GiGo probably applies still.
I can't get over what SeeSaw and fft3d filter did for my resized version of Aliens. Incredible.
hartford
13th October 2010, 03:56
I don't know about this; perhaps I'm confused (most likely), but there was a problem with respect to "Index."
The "index" problem (I'm vague on this) was between version 1
and version 2 of mt_masktools.
I'm wondering if there is a further problem.
Of course, I could be in left field about this.
Someone please slap me :)
talen9
13th October 2010, 10:21
I don't know about this; perhaps I'm confused (most likely), but there was a problem with respect to "Index."
The "index" problem (I'm vague on this) was between version 1
and version 2 of mt_masktools.
I think you had in mind MVTools vs MVTools2, *not* MaskTools ;)
Nephilis
18th October 2010, 17:08
if you had any suggestions for the "general purpose non linear pulse multi pass band pass and temporal stabilized sub sharpener", I would appreciate...
How about motion compensated temporal limited sharpener (not spatial) that have subpixel precision with more complex edge enhencing feature ?
And @Didée
Can you explain the "crystality sharpen" principle a little bit ?
Thanx in advance..
Didée
18th October 2010, 17:57
What about the explanation in post#18 (http://forum.doom9.org/showthread.php?p=760935#post760935)? Not good enough?
Also, useful basic building blocks for {motion compensated blabla sharpening blable enhancing blablu} are already out there, too -- see e.g. here (http://forum.doom9.org/showthread.php?t=153170).
Problem is, the more "advanced" or "complex" the sharpening routines are, the more specific you have to drill the method to fit the particularities of the actual source. And that's why I've little motivation to build a specific function for that. There's not much point in making a function offering twenty different "modes", with 20 different sub-modes for each single mode, and some twenty different tweaking parameters for each of them.
Really, for me it is faster to look closely at a source video, then build a fitting script from scratch and from the guts. Much easier to see what needs to be done and then just do it, instead of wondering about a bazillion of parameters of a several-thousand-lines function.
Bi11
18th October 2010, 18:51
SeeSaw is a great sharpening function. It's much more effective than LSFmod at enhancing detail (at the cost of enhancing existing halos as well, of course). Keep up the good scripting! :)
:thanks:
Didée
18th October 2010, 19:19
There's always the option to create a de-halo'ed clip, and feed that as "denoised" clip into SeeSaw. In that case, preferably with low/zero bias.
Something that can be adapted for many sources:
mb2=orig.minblur(2)
mb2.mt_edge(prewitt).mt_expand
last.mt_edge(prewitt).mt_expand
mt_merge(orig,mb2,last)
Amount of extension/dilation must be figured acc. to source characteristics. (Yet another case where "fiddling manually" is much easier than controlling through half a dozen parameters.)
dansrfe
18th October 2010, 21:27
3 questions:
1. where is seesaw in the above?^
2. What is the difference between the following: edge enhancement, haloing, and having mosquito noise around people and objects?
3. Is it ok to feed b = a.dehalo_alpha().fft3dfilter([params]) to seesaw in such a combination? What is the general things I should be looking at feeding into seesaw as the "denoised" clip? What combinations of post-processing works best when fed into seesaw for a flat, yet clear source with minimal haloing.
Didée
19th October 2010, 12:33
What is the difference between the following: (1)edge enhancement, (2)haloing, and (3)having mosquito noise around people and objects?
That's easy.
(1) is basically just any sort of sharpening. Can be a plain sharpener, can be more sphisticated like using edge masking to restrict to those areas ... but basically, it's just sharpening. A common method is to apply unsharp masking, then call it "edge enhancement" because it sounds better.
(2) is what you get when (1) is overdone.
(3) is what a DCT-based compressor produces when it's faced with too much of (1) or (2).
where is seesaw in the above?
It would come after that. This was a suggestion for a basic strategy to avoid halo creation, by using such filtering for the "denoised" clip of SeeSaw.
(And there's a certain reason for that, see below.)
Is it ok to feed b = a.dehalo_alpha().fft3dfilter([params]) to seesaw in such a combination?
Basically, that's a perfectly valid strategy. However, you have to be careful with smoothing. SeeSaw uses per default a medianfilter-based denoiser, and for a reason. The same reason why I suggested a medianfilter-based halo removal. Point is, when any sort of blurry smoothing is used, then the preprocessed clip may offer more "sharpening headroom" (e.g. for edge pixels) than the available headroom in the original source. In effect, this again may lead to halo creation. Appropriate usage of medianfiltering can mostly avoid this issue.
(Some diagrams would be good to demonstrate this behaviour, but I'm in the office now and don't have the time.)
Boulotaur2024
20th October 2010, 12:33
SeeSaw is a great sharpening function. It's much more effective than LSFmod at enhancing detail (at the cost of enhancing existing halos as well, of course). Keep up the good scripting! :)
:thanks:I thought they were very close scripts in the way they work internally, isn't LSFMod a sort of mixture between SeeSaw and LSF ? (I thought so anyway). Well then I guess I'll try to see (saw) how the former performs on the source I'm working on
Didée
29th October 2010, 17:23
The SeeSaw script(s) that i have locally here do only contain function(..) {...} statements, nothing else. It is virtually impossible that presence of this *.avsi function in your plugins directory should change anything at all ... simply because there is no "self-active" code in it.
Check your SeeSaw script if it contains any additional code. In case of doubt, grab the script and upload it, I'll check.
BTW, "who" is detecting "1080p encodings as interlaced" ?
Dogway
29th October 2010, 17:32
Sorry Didée, my bad, I forgot to delete mt_masktools-26.dll (I use 2.5.7) which was causing it. It has been a day of file fiddling and testing so...
I just discovered Seesaw and I like it a lot although the first tests I did the other day showed some esporadic noise, eventually cleaned with the removegrain thing people do... but still.
cybersharky
28th December 2010, 14:29
Sorry to resurrect an old thread, but as far as I can see my problem is SeeSaw or plugins it uses related.
Encoding with x264, the script stops working, after many attempts the script stops responding. Once I saw an x264 crash with mt_masktools.dll as the faulting module. If I edit out the SeeSaw part of the script the encode completes.
Avisynth: is MT version 2.5.8.5
masktools: is version 2.0.46
RemoveGrain v1.0: (http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar)
SeeSaw: (http://avisynth.org/mediawiki/upload/e/e1/SeeSaw.avs)
x264 is Revision 1834
SetMemoryMax(512)
SetMTMode(2,0)
LoadPlugin("G:\megui\tools\avisynth_plugin\mt_masktools-25.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\mvtools2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\gradfun2db.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\degrainmedian.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\VagueDenoiser.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\RepairSSE2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\RSharpenSSE2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\UnDot.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\AddGrainC.dll")
Import("G:\megui\tools\avisynth_plugin\GradFunkMirror.avs")
Import("G:\megui\tools\avisynth_plugin\GrainFactory3.avsi")
Import("G:\megui\tools\avisynth_plugin\SeeSaw.avs")
LoadPlugin("G:\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\Gary\Documents\DVDFab\MainMovie\STARGATE_SG1_S1_D1_E1\VIDEO_TS\VTS_01_1.d2v", info=3)
LoadPlugin("G:\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 4, 4, -4, -4)
LanczosResize(704,384) # Lanczos (Sharp)
#denoise
a= last
b=a.degrainmedian(limitY=3, limitUV=5,mode=0).VagueDenoiser(threshold=1.2, method=1, nsteps=6, chromaT=0.8)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16, sootheS=20)
Undot()
GradFunkMirror()
Grainfactory3(1,1,1)
__film = last
__t0 = __film.trim(0, 3600)
__t1 = __film.trim(55600, 59000)
__t2 = __film.trim(101196, 104825)
__t3 = __film.trim(119137, 123169)
__t0 ++ __t1 ++ __t2 ++ __t3
Didée
28th December 2010, 14:48
mpeg2source usually works not with multithreading. At the beginning, replace with SetMTMode(5,0), and place a SetMTMode(2) *after* mpeg2source.
cybersharky
28th December 2010, 15:16
mpeg2source usually works not with multithreading. At the beginning, replace with SetMTMode(5,0), and place a SetMTMode(2) *after* mpeg2source.
Tried that, the encode hung at frame 3460 :confused:
Didée
28th December 2010, 15:20
Update: No, that's not the real culprit. Tried an encode with [4 threads] and [your SeeSaw line] -> x264, and indeed, the process stalled soon.
However, rendering in Vdub is fine. Therefore I guess it's somehow related to the readahead that x264 is doing, and Avisynth-MT not liking that.
Well, We all (should) know that Avisynth-MT is not to be considered "stable". Basically it's a hack - full of enthusiasm, but still a hack. Sad but true. :(
Edit: Update#2: Ouch, even an Vdub analyse pass stalled after ~60% (several test runs, this one failed). A pity that it doesn't crash - without trace it's hard to tell where it breaks apart.
cybersharky
28th December 2010, 15:52
Thank you for your help and reply Didée. I've just finished an encode without SetMTMode.
Didée
28th December 2010, 16:33
First enlightment: "Oh, we're not using VfW, we must add "Distributor()" at the end of the script!"
Added Distributor() at the end of the script. Result: x264 encoding stalled.
Okay ... went with Goethe: "And if you're not willing, then I'll use force!"
Added to the end of the script:
.
.
.
SetMTMode(5)
AssumeFPS(last,last,true)
x264 encode finished successfully.
cybersharky
28th December 2010, 19:06
Thanks for the update Didée.
But, now for me that makes the script slower than without SetMTMode. Without MT I averaged ~15fps, now it's sitting around ~13fps.
Didée
29th December 2010, 06:11
Yes, indeed.
Try like this:
SetMTMode(5,6) # on a Quadcore + HT
mpeg2source("vts_01_1.d2v")
setmtmode(2)
a= last
b=a.degrainmedian(limitY=3, limitUV=5,mode=0).VagueDenoiser(threshold=1.2, method=1, nsteps=6, chromaT=0.8)
b=assumefps(b,true) # #### knock1 ####
setmtmode(5)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16, sootheS=20)
SetMTMode(2) # #### knock2 ####
RemoveGrain(0) # #### knock2 ####
return(last)
Noise Filtering MT'ed, SeeSaw singlethreaded. This mix of SetMTMode(5) and (2) shows interesting behaviour.
Normal 1thread script: 23.5 fps
Without knock_ lines: 23.5 fps
Using only knock2: 41.0 fps
Using only knock1: 80 fps
Both knocks, as posted above: 95.0 fps
The Wonderland of Multithreading.
dansrfe
29th December 2010, 06:52
Can you explain why though? That's the interesting part, since RemoveGrain(0) doesn't do anything and the different setmtmode references change caching/threading parameters I would guess.
cybersharky
29th December 2010, 09:22
Hi Didée,
I've tried to adjust my script to match yours as best I can, but now I get a crash.
Faulting application name: x264.exe, version: 0.0.0.0, time stamp: 0x4d08623f
Faulting module name: mt_masktools-25.dll, version: 2.0.46.0, time stamp: 0x4ce94539
Exception code: 0xc0000005
Fault offset: 0x000a16e1
Faulting process id: 0x1730
Faulting application start time: 0x01cba72559993b9a
Faulting application path: G:\megui\tools\x264\x264.exe
Faulting module path: G:\megui\tools\avisynth_plugin\mt_masktools-25.dll
Report Id: 2806b45c-1319-11e0-80bc-6cf0490e56c4
SetMemoryMax(512)
SetMTMode(5,3) # changed to 3 processor is Q9300
LoadPlugin("G:\megui\tools\avisynth_plugin\mt_masktools-25.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\mvtools2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\gradfun2db.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\degrainmedian.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\VagueDenoiser.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\RemoveGrainSSE2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\RepairSSE2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\RSharpenSSE2.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\UnDot.dll")
LoadPlugin("G:\megui\tools\avisynth_plugin\AddGrainC.dll")
Import("G:\megui\tools\avisynth_plugin\GradFunkMirror.avs")
Import("G:\megui\tools\avisynth_plugin\GrainFactory3.avsi")
Import("G:\megui\tools\avisynth_plugin\SeeSaw.avs")
LoadPlugin("G:\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("C:\Users\Gary\Documents\DVDFab\MainMovie\STARGATE_SG1_S1_D1_E1\VIDEO_TS\VTS_01_1.d2v", info=3)
SetMTMode(2)
LoadPlugin("G:\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
__film = last
__t0 = __film.trim(0, 3600)
__t1 = __film.trim(55600, 59000)
__t2 = __film.trim(101196, 104825)
__t3 = __film.trim(119137, 123169)
__t0 ++ __t1 ++ __t2 ++ __t3
#deinterlace
crop( 4, 4, -4, -4)
LanczosResize(704,384) # Lanczos (Sharp)
#denoise
a= last
b=a.degrainmedian(mode=2).VagueDenoiser(threshold=0.8, method=1, nsteps=6, chromaT=0.8)
b=assumefps(b,true) # #### knock1 ####
setMTmode(5)
SeeSaw(a, b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16, sootheS=20)
SetMTMode(2) # #### knock2 ####
RemoveGrain(0) # #### knock2 ####
return(last)
#Undot()
#GradFunkMirror()
#Grainfactory3(1,1,1)
Gavino
29th December 2010, 10:56
SetMTMode(5,6) # on a Quadcore + HT
mpeg2source("vts_01_1.d2v")
setmtmode(2)
a= last
b=a.degrainmedian(limitY=3, limitUV=5,mode=0).VagueDenoiser(threshold=1.2, method=1, nsteps=6, chromaT=0.8)
b=assumefps(b,true) # #### knock1 ####
...
...
Without knock_ lines: 23.5 fps
Using only knock1: 80 fps
That line means b=assumefps(last,b,true).
Since last is a, the degrainmedian step is missed!
Didée
29th December 2010, 11:40
Aayyy ... yes. Just a few minutes ago I saw that, too. 'T was too deep in the night, it seems. And I was surprised how fast the MT script was running!:rolleyes::D - In fact, when corrected to b=assumefps(b,b,true), the speed is ~45 fps. (Compared to ~23.5 singlethreaded [turbo mode normalized: ~19.5].)
Still doesn't explain why the script crashes for cybersharky -- for me, the exactly-same script encodes to x264 without any problem. (Using Hybrid, though, not MeGUI.)
cybersharky
29th December 2010, 16:57
Thanks again Didée,
I made that correction and for the first time I got a MT script with SeeSaw to complete. :thanks:
I don't know where the crash came from earlier.
Tanbheer
19th October 2011, 18:49
Thanks Didee for this wonderful script
meshaun
8th January 2012, 12:21
Hi, am new with this Seesaw. How to use this script in MeGUI and how about if I use it with a Clear HD video? I mean, I rip my blurays using MeGUI and If I use this filter too, will it improve and enhance the quality or maybe kill it?
3rt4n
28th February 2012, 01:57
Hello Didée, can u pls help me? (sorry my bad english) This is my script, is this true? Or somewhere, am i doing wrong?
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools-25.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\RemoveGrain.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\degrainmedian.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\repair.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\mvtools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\VagueDenoiser.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\MT.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\fft3dgpu.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
SetMTMode(3,4)
DirectShowSource("C:\Documents and Settings\bLack\Desktop\Fast Five 2011\Fast Five Sample.mkv",fps=23.976, audio=true)
crop( 4, 4, -4, -4)
setmtmode(1)
a = last
b=a.fft3dgpu(precision=0,mode=1,sharpen=1,sigma=2,bt=2,bh=64,bw=64,plane=1)
b=assumefps(b,true) # #### knock1 ####
SetMTMode(4)
SeeSaw(a,b, NRlimit=6, NRlimit2=7, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16)
SetMTMode(2) # #### knock2 ####
LimitedSharpenFaster(ss_x=1.0, ss_y=1.0, Smode=3, strength=50, overshoot=1)
LanczosResize(1280,544)
Thanks for any help.
Gavino
28th February 2012, 02:10
...
b=assumefps(b,true) # #### knock1 ####
...
As noted above (posts 575 and 576), this should be
b=assumefps(b,b,true)
3rt4n
28th February 2012, 07:17
As noted above (posts 575 and 576), this should be
b=assumefps(b,b,true)
Thank you.
3rt4n
28th February 2012, 09:27
Yes, indeed.
Try like this:
SetMTMode(5,6) # on a Quadcore + HT
mpeg2source("vts_01_1.d2v")
setmtmode(2)
a= last
b=a.degrainmedian(limitY=3, limitUV=5,mode=0).VagueDenoiser(threshold=1.2, method=1, nsteps=6, chromaT=0.8)
b=assumefps(b,b,true) # #### knock1 ####
setmtmode(5)
SeeSaw(a,b, NRlimit=3, NRlimit2=4, Sstr=1.5, Slimit=5, Spower=5, Sdamplo=6, Szp=16, sootheS=20)
SetMTMode(2) # #### knock2 ####
RemoveGrain(0) # #### knock2 ####
return(last)
Noise Filtering MT'ed, SeeSaw singlethreaded. This mix of SetMTMode(5) and (2) shows interesting behaviour.
Normal 1thread script: 23.5 fps
Without knock_ lines: 23.5 fps
Using only knock2: 41.0 fps
Using only knock1: 80 fps
Both knocks, as posted above: 95.0 fps
The Wonderland of Multithreading.
Hello again, i'm trying this script (Both knocks) but why i got only 14 fps? (sorry my bad eng)
Didée
28th February 2012, 10:19
I have no clue, and the crystal ball is at the garage for maintenance.
What's your CPU, and what's the resolution of your video? It's a long way from NTSC 720x480 to HD1920x1080.
3rt4n
28th February 2012, 10:56
Thank you for quick reply. CPU: AMD Phenom(tm) II X3 710 2.61 GHZ, my video resolution is 1280x544.
Didée
28th February 2012, 11:10
Maybe that is what your CPU can do?
Another important point you didn't tell: is that speed only for script preview, or is that together with encoding? If so, which encoder and which settings?
Which version of Avisynth(MT) are you using? 2.5.7, or 2.5.8, or 2.6, ....
Also, if you delete *all* of the SetMTmode lines, what speed do you get then?
3rt4n
28th February 2012, 11:30
Thanks Didée, i think, i solved my problem with your instructions.
baunduley
31st October 2012, 14:09
i have a clip which is noisy and lack of detail. can seesaw help me out? then how should i tweak it? please show me the path, then i'll be able to check it for myself
FLauBerT
26th December 2012, 11:06
Hello, first of all my english is not very good :) SeeSaw also having an error. SetMTMode using, but I will not come on top of 25% CPU usage. SetMTMode (2,4) and SetMTMode (threads = 4) forms the CPU places. I use the XviD encoder. MT () When using the form no problem, but between 75-80% of the processor again. LimitedSharpenFaster and SetMTMode not a problem at all. Have 100% CPU usage. How to encode with Seesaw should I do? Thanks in advance.
Didée
26th December 2012, 16:08
There is no such error in SeeSaw. 25% sounds like single-threaded. I guess that your are not correctly setting the SetMTmode. Remember you must set SetMTmode before the source filter. And with mode 5 (some say 3), because most source filters do not like to be multithreaded themselves. So you have the general structure
SetMTmode(5,4) # Set up MT to establish 4 threads, but with mode 5 (using only 1 thread) because of the source-filter that comes later
SetMemoryMax(666)
LoadPlugin()
LoadPlugin() # etc.
XyzSource(sourcefile)
SetMTmode(2) # Now that the source has been loaded, switch to mode 2 (use all threads)
Filter()
Filter() # etc.
Return(last)
In other words: If the first "SetMTmode()" in the script comes only after the source filter, then multithreading is NOT activated. The number-of-threads must be initiated before any kind of video object is created.
Quick test on a 720x576 mpeg2 file (10333 frames). SeeSaw with standard parameters. CPU is i7-860 (quadcore/HT)
1 thread 3:07 ( 55.3 fps) 3:07 ( 55.3 fps)
setmtmode() MT("")
2 threads: 1:51 ( 93.1 fps) 1:40 (103.3 fps)
4 threads: 1:10 (147.6 fps) 1:19 (130.8 fps)
6 threads: 0:59 (175.1 fps) 1:35 (108.8 fps)
8 threads: 0:54 (191.4 fps) 2:03 ( 84.0 fps)
(Yes, MT("") with more than 4 threads is becoming slower again. No mistake. Overhead because of spatial overlapping?)
FLauBerT
9th January 2013, 23:49
Thank you for your answers and explanatory depiction. SeeSaw also now getting more effective results. However LimitedSharpenFaster always my favorite. Thank you again. :)
Hi, I have tried the new version of masktools and there is a problem
Evaluate: Unhandled C++ exception!
(SeeSaw.avs, line 128)
(SeeSaw.avs, line 80)
hello_hello
3rd June 2017, 05:39
Hi, I have tried the new version of masktools and there is a problem
Evaluate: Unhandled C++ exception!
(SeeSaw.avs, line 128)
(SeeSaw.avs, line 80)
I don't use SeeSaw much but I tried it and got the same error (Avisynth 2.6.0.6 and XP). I tried a few different versions of pinterf's masktools2 and it's the same for all of them (the older MaskTools2 is fine), so I thought I'd add a link to your post to the masktools2 thread.
https://forum.doom9.org/showthread.php?p=1808558#post1808558
manolito
3rd June 2017, 08:54
SeeSaw requires the old MaskTools 1.5.8. The newer MaskTools v.2 can peacefully coexist with the old version, because Manao renamed all functions to have the "mt_" prefix. From the v.2 readme:
To make the transition to the v2 easier, I renamed all the functions, which will allow the use of both old and new MaskTools dlls.
So just put the old masktools.dll into your AviSynth\plugins folder and be happy...
Cheers
manolito
Groucho2004
3rd June 2017, 09:37
SeeSaw requires the old MaskTools 1.5.8.The version of SeeSaw I took from here (http://avisynth.nl/index.php/SeeSaw) works just fine with masktools2 and RGTools (latest versions from tp7). It does however throw the exceptions mentioned above with pinterf's masktools2.
real.finder
3rd June 2017, 11:05
The version of SeeSaw I took from here (http://avisynth.nl/index.php/SeeSaw) works just fine with masktools2 and RGTools (latest versions from tp7). It does however throw the exceptions mentioned above with pinterf's masktools2.
yes, there are something in
(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")
it's chroma="ignore", If I remove it work
hello_hello
3rd June 2017, 12:06
SeeSaw requires the old MaskTools 1.5.8. The newer MaskTools v.2 can peacefully coexist with the old version, because Manao renamed all functions to have the "mt_" prefix. From the v.2 readme:
If it required MaskTools, wouldn't that mean SeeSaw would fail to work without it in the plugins folder, rather than cause an exception in MaskTools2?
Mind you I can't find a version of SeeSaw for the original MaskTools, although I'll admit I didn't look too hard (Edit. I found a copy here (https://forum.doom9.org/showthread.php?p=915700#post915700)).
The version here specifies MaskTools2. http://avisynth.nl/index.php/SeeSaw
Reel.Deel
3rd June 2017, 14:57
yes, there are something in
(sootheT==0) ? last
\ : mt_lutxy( last, last.temporalsoften(1,255,0,32,2),
\ "x 128 - y 128 - * 0 < x 128 - 100 / "+ST+" * 128 + x 128 - abs y 128 - abs > x "+ST+" * y 100 "+ST+" - * + 100 / x ? ?", chroma="ignore")
it's chroma="ignore", If I remove it work
Although chroma="ignore" has been used in a very few scripts it has never been officially documented by the authors. Maybe pinterf added some sanity checks or fixed a bug which made affected chroma="ignore".
Motenai Yoda
3rd June 2017, 22:17
IIRC chroma="ignore" was removed some time ago.
from deblock_qed changelog
Changes 2011-11-29: (06_taro)
- Replaced (chroma=uv>2?"process":"ignore") by (chroma=uv>2?"process":"copy") to avoid garbage clip when uv=2.
The formal parameter is not used by MaskTools2 any more, if ever used.
Foxyshadis once mentioned chroma="ignore" but I had never found a document containing it.
pinterf
3rd June 2017, 22:35
Although chroma="ignore" has been used in a very few scripts it has never been officially documented by the authors. Maybe pinterf added some sanity checks or fixed a bug which made affected chroma="ignore".
AFAIK, when "chroma" is not matching with any of its valid text values, is converted then to float (or integer before high-bit-depth things). Perhaps "ignore" is not a valid floating point number (yes, I know, it should give human readable error message instead).
AFAIK, when "chroma" is not matching with any of its valid text values, is converted then to float (or integer before high-bit-depth things). Perhaps "ignore" is not a valid floating point number (yes, I know, it should give human readable error message instead).
Reading the old_readme in Masktools2 2.2.8
chroma("") : allow to set the mode of both chroma channels in a more user-friendly way. Possible strings
are "process" ( u=v=3 ), "copy" or "copy first" ( u=v=1 ), "copy second" ( u=v=4 ), "copy third" ( u=v=5 ),
"none" ( u=v=1 ) and finally, a number "xxx" ( u=v=-xxx )
and in the readme
Avisynth+ high bit depth support (incl. planar RGB, color spaces with alpha plane are supported from v2.2.7)
All filters are now supporting 10, 12, 14, 16 bits and float
Threshold and sc_value parameters are scaled automatically to the current bit depth (v2.2.5-) from a default 8-bit value.
Y,U,V,A (and parameters chroma/alpha) negative (memset) values are scaled automatically to the current bit depth (v2.2.7-, chroma/alpha v.2.2.8) from a default 8-bit value.
Default range of such parameters can be overridden to 8-16 bits or float. Disable parameter scaling with scaleparams="none"
So I tried chroma="none" and work only with masktools2-vb1-26
chroma="1" work
GradFun2DBmod also give a problem with the new Masktools2 in Avisynth 2.6 MT total crash
Crash details (best guess as to cause)
An out-of-bounds memory access (access violation) occurred in module 'VirtualDub'
reading address 000000CC
In Avisynth+ gray screen
Error reading source frame 0: Avisynth read error: CAVIStreamSynth: System exception - Access Violation at 0X000000CC
SmoothDeblock3 don't work with Avisynth+
Avisynth open failure:
Script error: expected a variable name
(SmoothDeblock3.avs, line 38, column 6)
Last line
function Dim(string arr, int size, val initValue)
{
# create "base" string variable whose value is its name. every Eval in internal array functions
# needs this to build the element's name
Eval("global " + arr + "=" + chr(34) + arr + chr(34))
# store size so that Length() is O(1)
Eval("global " + arr + "Length = " + string(size))
# create each element
global DimThunkVal = initValue # thunk requires this in case it's a clip
for(0, "<="+string(size), "+1", arr + ".set(i, " + thunk(initValue, "DimThunkVal") + ")")
}
I have written all here, thanks of support!
real.finder
8th June 2017, 14:20
chroma("") : allow to set the mode of both chroma channels in a more user-friendly way. Possible strings
are "process" ( u=v=3 ), "copy" or "copy first" ( u=v=1 ), "copy second" ( u=v=4 ), "copy third" ( u=v=5 ),
"none" ( u=v=1 ) and finally, a number "xxx" ( u=v=-xxx )
I think "copy" and "copy first" should be u=v=2
and added "ignore" that will be like "none" (u=v=1)
pinterf
8th June 2017, 15:26
I think "copy" and "copy first" should be u=v=2
and added "ignore" that will be like "none" (u=v=1)
Even "none" was not checked in my branch.
Now I have put both "ignore" and "none" to the valid chroma options.
Ilya87
31st March 2019, 16:16
I think "copy" and "copy first" should be u=v=2
and added "ignore" that will be like "none" (u=v=1)
I have the same problem with SmoothDeblock2(). What should I change in script to make it work?
Natty
1st April 2019, 09:55
where can i find latest version ?
ABurns
4th April 2019, 14:43
where can i find latest version ?
http://avisynth.nl/index.php/SeeSaw
That's the newest version I'm aware of.
StainlessS
4th April 2019, 16:17
The Version on Wiki is the one I updated in 2015, I presumably did not think the mod deserved an update to version number, and so is still v0.3e, no idea where the v0.3g description on wiki originates.
# SeeSaw v0.3e (02 Jan 2006)
# ( modded 15 Dec 2015 - see http://forum.doom9.org/showthread.php?p=1748710#post1748710 )
# Mod due to this change in v2.6: Force int call arguments to user script function float params to be explicit floats.
Reel.Deel
4th April 2019, 18:46
no idea where the v0.3g description on wiki originates.
That was me, I put g on the just to differentiate from previous version since is no longer identical. :o
orion44
9th June 2023, 05:01
I have read the AViSynth SeeSaw page, but I still don't know which parameters should I modify.
Can someone post SeeSaw parameters for very light, light, medium, and heavy sharpening? I just need to get a feel for how these parameters are used.
What are the most important parameters in SeeSaw?
kedautinh12
9th June 2023, 12:32
Seesaw latest ver
https://github.com/realfinder/AVS-Stuff/blob/Community/avs%202.5%20and%20up/seesaw.avsi
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.