Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 22nd July 2010, 14:14   #11  |  Link
Archimedes
Registered User
 
Join Date: Apr 2005
Posts: 213
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 View Post
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):

Last edited by Archimedes; 22nd July 2010 at 22:14.
Archimedes is offline   Reply With Quote
 

Tags
antialiasing, fastlinedarken, lsf, lsharpaaf, sharpen

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:08.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.