PDA

View Full Version : New Sharpening Function from Didée -'SeeSaw'


Pookie
27th December 2005, 17: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, 19: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, 19: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, 10:39
Big Question:
Only way to use SeeSaw is having a denoised video or can it be used alone?

Pookie
28th December 2005, 11: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, 21: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, 04:13
Try it out, Chainmax. It's an easy function to test.

FredThompson
29th December 2005, 10: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, 13: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, 15:05
Where exactly do I get SCSelect from that this is calling for?

FredThompson
2nd January 2006, 01: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, 03: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, 03: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, 05: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, 05: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, 06: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, 11:50
Hmmm, filter looks nice for those who can even run it.

Didée
2nd January 2006, 15: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, 15: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, 16: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, 18: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, 19: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, 19: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, 19: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, 20: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, 22: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
2nd January 2006, 23: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, 12: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
3rd January 2006, 23: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, 00: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, 02:59
Dark - Try it with a different denoiser and see if the colors change.

dbzgundam
4th January 2006, 14: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, 14: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, 16: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, 18: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, 18:05
can SeeSaw also resize like LimitedSharpen?

Pookie
5th January 2006, 10: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, 18: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, 20: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, 09: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, 10: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, 11: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, 14: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, 15: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, 15: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, 00: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, 01: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, 01: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, 11:07
Didée,

PS -- why true motion for denoising? :scared:

Didée
23rd January 2006, 11: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, 14: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, 17: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, 08: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, 09: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, 21: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, 21: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, 21: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, 01: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, 09:48
DirectShowSource("Z:\trailers\Hills\thehillshaveeyes_XviD-2000_lancsoz4.avi")
For an *.avi source file better use "AviSource()", not "DirectShowSource()" ...

Razorholt
25th January 2006, 21: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, 03: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, 04: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, 10: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, 10: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, 10: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, 10:58
DVDs are yv12.

Mug Funky
31st January 2006, 11: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, 11: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, 11:44
Using MergeChroma (syntax and examples in the documentation).

What is your source?

Didée
31st January 2006, 11: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, 11: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, 19: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, 19: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
31st January 2006, 23: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, 02: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
1st February 2006, 23: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, 01: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, 02: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, 07: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
2nd February 2006, 23: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, 07: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, 00: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, 05: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, 22:01
thanks again Pookie,you also have PM
game

Didée
4th February 2006, 22: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, 20: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, 21: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, 21: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, 00: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, 16: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, 22: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, 22: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
8th February 2006, 23: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, 00: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, 19: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, 19: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)