I've changed the posted function
santiag a little bit.
Santiag has now three parameters: type, strh and strv. Type means the anti aliasing type. Possible values are "EEDI3", "NNEDI2" and "NNEDI3". strh is the strength for the horizontal anti aliasing and strv is the strength for the vertical anti aliasing. Default values are: type="nnedi3", strh=1 and strv=1.
Contrary to the first posted function, santiag(strh=0, strv=0) now means no anti aliasing. I've also corected the center shift. With NNEDI3 as type, the center shift now works correct for all possible input clips (YV12, YUY2 and RGB24).
Requirements:
Code:
LoadPlugin("plugins\EEDI3\eedi3.dll")
LoadPlugin("plugins\GScript\GScript.dll")
LoadPlugin("plugins\NNEDI2\nnedi2.dll")
LoadPlugin("plugins\NNEDI3\nnedi3.dll")
Code:
function SantiagMod(clip input, string "type", int "strh", int "strv") {
type = Default(type, "NNEDI3")
strh = Default(strh, 1)
strv = Default(strv, 1)
input
strh > 0 ? AntiAliasing(type=type, strength=strh) : NOP()
TurnLeft()
strv > 0 ? AntiAliasing(type=type, strength=strv) : NOP()
TurnRight()
function AntiAliasing(clip input, string "type", int "strength") {
input
GScript("""
if (type == "EEDI3") {
EEDI3(dh=True, field=0)
for (i = 2, strength) {
EEDI3(dh=False, field=(i + 1) % 2)
}
}
else if (type == "NNEDI2") {
NNEDI2(dh=True, field=0)
for (i = 2, strength) {
NNEDI2(dh=False, field=(i + 1) % 2)
}
}
else {
NNEDI3(dh=True, field=0)
for (i = 2, strength) {
NNEDI3(dh=False, field=(i + 1) % 2)
}
}
""")
Spline36Resize(input.Width(), input.Height(), 0, 0.5, input.Width(), input.Height() * 2)
}
}
Quote:
Originally Posted by Gavino
Also it looks to me that strh and strv are the wrong way round - strh affects vertical and strv horizontal.
|
For me, it looks correct.
Source:
santiag(strh=2, strv=0):
santiag(strh=0, strv=2):