Log in

View Full Version : Soothsaying the Soothes


AlanHK
10th June 2008, 14:57
I've been trying out a few filters on an old fuzzy b/w video.

I tried LimitedSharpenFaster, using this code:
Dull=Last
Sharp=LimitedSharpenFaster(Dull,ss_x=1.50,ss_y=1.50,Smode=4,strength=1500,soft=-1)
Soothe(Sharp,Dull,25)

The "Soothe" function I found at
http://forum.doom9.org/showthread.php?p=1024318
(Didée's version of 21 Nov 2005)

#edit 21 Nov 05:
function Soothe(clip sharp, clip orig, int "keep")
{
keep = default(keep, 24)
keep = (keep>100) ? 100 : (keep<0) ? 0 : keep
KP = string(keep)
diff = yv12lutxy(orig,sharp,"x y - 128 +", U=1,V=1)
diff2 = diff.temporalsoften(1,255,255,32,2)
diff3 = yv12lutxy(diff,diff2, "x 128 - y 128 - * 0 < x 128 - 100 / " + KP
\ + " * 128 + x 128 - abs y 128 - abs > x " + KP
\ + " * y 100 " + KP + " - * + 100 / x ? ?", U=1,V=1)
return( yv12lutxy(orig,diff3,"x y 128 - -",U=2,V=2) )
}


Later I came across Seesaw and installed that (as an AVSI).
from http://forum.doom9.org/showthread.php?t=104701
However, when I tried to compare the two outputs, I found the LimitedSharpenFaster version was all green, though it had been fine earlier.

Eventually I discovered that SeeSaw includes its own Soothe function:

# SeeSaw v0.3e (02 Jan 2006)
# ======= 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 )
}


Since this was also created by Didée, I'm surprised they seem to be incompatible.
I can't really understand how they work internally...

I know of course I can load only the Soothe I need and use that, but I expect that the later version would be preferable. So can I use it after LimitedSharpenFaster without it making the output green? If so, how do I change the call?

Didée
10th June 2008, 15:28
The origin of the confusion is this: When SeeSaw was first "published", it was only a showcase/preview function that was not meant to be made public.

Proceed as follows:

- DELETE your version of SeeSaw

- Get the one from here (http://avisynth.org/mediawiki/SeeSaw) (MaskTools-v2 version, much recommended)

- Everything is good.

AlanHK
10th June 2008, 16:34
The origin of the confusion is this: When SeeSaw was first "published", it was only a showcase/preview function that was not meant to be made public.

Proceed as follows:

- DELETE your version of SeeSaw

- Get the one from here (http://avisynth.org/mediawiki/SeeSaw) (MaskTools-v2 version, much recommended)

- Everything is good.


OK, thanks. I had looked at that version.
As it is labelled "SeeSaw v0.3e (02 Jan 2006)" the same as the one I had, so I thought I had the latest version.
But I see by doing a file compare that they are in fact different.

As for the original stand-alone "Soothe", which is the recommended version to use with LimitedSharpenFaster?

In your post (http://forum.doom9.org/showthread.php?p=708217) you have a version dated 21 Nov 05.
Later in that thread (http://forum.doom9.org/showthread.php?p=1024318#post1024318) 14th July 2007, 12:51, Dragon5152 has a different version. Is that kosher?

Adub
10th June 2008, 19:14
Use the second one. It uses Masktools 2, so it has to be better :)

Ranguvar
11th June 2008, 00:56
Fix for the green LSF, ran into it a while back:

http://www.animemusicvideos.org/phpBB/viewtopic.php?p=1074640