NMM视频技术(旧)

 找回密码
 成为会员
搜索
查看: 8089|回复: 10

[AVS技巧] AnimeAntiAliasing?

[复制链接]
发表于 2006-7-5 18:47 | 显示全部楼层 |阅读模式
如何使用?
发表于 2006-7-5 20:53 | 显示全部楼层
aaa()
 楼主| 发表于 2006-7-6 12:08 | 显示全部楼层
需要加载什么么?
还有功能怎么用
发表于 2006-7-8 00:22 | 显示全部楼层
用Import()导入相应的脚本文件。脚本文件可以在DOOM9论坛的AVS版里面找到。

至于作用……就跟他的字面意思一样,用于动画的反锯齿。
 楼主| 发表于 2006-7-8 10:53 | 显示全部楼层
原帖由 dgwxx 于 2006-7-8 00:22 发表
用Import()导入相应的脚本文件。脚本文件可以在DOOM9论坛的AVS版里面找到。

至于作用……就跟他的字面意思一样,用于动画的反锯齿。

AAA()中需要设置什么参数吗?
MS很多个脚本文件.不知道那个.你有没有可以发一个么

[ 本帖最后由 风月 于 2006-7-8 10:54 编辑 ]
 楼主| 发表于 2006-7-9 22:25 | 显示全部楼层
AVS为下:

#Anti-aliasing script
#
#This script removes "stairs artefacts" without reducing definition, then it can be especially useful, for example, #when deinterlacing (maybe with TDeint or Smart Deinterlace) hi-quality DVs.
#
#Let me know what do you think about it!
#
#
# AAA - AnimeAntiAliasing
#
# Thanks @ Didйe, mf, Akirasuto, SpikeSpiegel & ScharfisBrain...
#________________________________________________________________________________________
#
# Usage: AAA(Xres, Yres, Xshrp, Yshrp, Us, Ds, chroma)
#________________________________________________________________________________________
#
# Xres/Yres = The final resolution... InputSize = OutputSize is the default
#
# Xshrp/Yshrp = Unfilter strength... Settings of 50,50 are the defaults
#
# Us = Resizer for upsampling... 0 = PointResize (default) / 1 = Lanczos
#
# Ds = Resizer for downsampling... 0 = Bilinear (default) / 1 = Bicubic / 2 = Lanczos
#
# Chroma = Enable/disable chroma antialiasing... Disable = false (default) / enable = true
#________________________________________________________________________________________
#
# Example...
#
# Import("C:\Programme\AviSynth 2.5\plugins\AAA.avs")
#
# AAA(720,576,50,50,1,2,chroma=false)
#________________________________________________________________________________________

function AAA(clip clp, int "Xres", int "Yres", int "Xshrp", int "Yshrp",
\ int "US", int "DS", bool "chroma")
{
clp = clp.isYV12() ? clp : clp.ConvertToYV12()
ox = clp.width
oy = clp.height
Xres = default(Xres, ox)
Yres = default(Yres, oy)
us = default(us, 1)
ds = default(ds, 2)
Xshrp = default(Xshrp, 50)
Yshrp = default(Yshrp, 50)
chroma = default(chroma, false)

us==0 ? clp.PointResize(ox*2,oy*2) : clp.LanczosResize(ox*2,oy*2)

TurnLeft()
SangNom()

TurnRight()
SangNom()

ds==0 ? BilinearResize(Xres,Yres) :
\ ds==1 ? BicubicResize(Xres,Yres) :
\ LanczosResize(Xres,Yres)

Unfilter(Xshrp,Yshrp)

chroma ? MergeChroma(clp.Lanczosresize(Xres,Yres)) : last

}




这样加载对吧

Import("E:\压制工具\GORDIA~1\AviSynthPlugins\AnimeAntiAliasing.avs")
AAA(864,480,50,50,1,0,chroma=false)



打开后怎么老出现这个

打开AVI合成器失败

unexpected character" "

(t:\OP.AVS,line 10)
发表于 2006-7-10 11:39 | 显示全部楼层
这个是我修改过的代码aaa.avs:

  1. LoadPlugin("masktools.dll")
  2. LoadPlugin("SangNom.dll")

  3. function AAA(clip clp, int "Xres", int "Yres", int "Xshrp", int "Yshrp",
  4. \          int "US", int "DS", bool "chroma")
  5.        {
  6.          #clp = clp.isYV12() ? clp : clp.ConvertToYV12()
  7.           clp = clp.ConvertToYV12()
  8.          ox = clp.width
  9.          oy = clp.height
  10.          Xres  = default(Xres,  ox)
  11.          Yres  = default(Yres,  oy)
  12.          us  = default(us, 1)
  13.          ds = default(ds, 2)
  14.          Xshrp = default(Xshrp, 15)
  15.          Yshrp = default(Yshrp, 15)
  16.          chroma = default(chroma, false)
  17.          
  18.          us==0 ? clp.PointResize(ox*2,oy*2) : clp.LanczosResize(ox*2,oy*2)

  19.          TurnLeft()
  20.          SangNom()

  21.          TurnRight()
  22.          SangNom()

  23.          ds==0 ? BilinearResize(Xres,Yres) :
  24. \         ds==1 ? BicubicResize(Xres,Yres) :
  25. \         LanczosResize(Xres,Yres)

  26.          #Unfilter(Xshrp,Yshrp)

  27.          chroma ? MergeChroma(clp.Lanczosresize(Xres,Yres)) : last

  28.          }
复制代码

需要将masktools.dll和SangNom.dll放在与aaa.avs相同的目录下。

我非常非常少使用这个脚本,因为会让画面模糊,所以没有研究过参数。
使用的时候大概是这样的:

  1. LoadVFAPIPlugin("F:\TMPGEnc Plus-2.521.58.169\TMPGEnc.vfp","Source")
  2. Import("F:\gk\AviSynthPlugins\aaa.avs")
  3. Source("01.tpr").FlipVertical().ConvertToYV12.aaa()
复制代码
发表于 2006-7-10 15:29 | 显示全部楼层
而且听说极慢无比……
发表于 2006-7-10 16:57 | 显示全部楼层
蜗牛吧。
参数貌似用默认就很好了
发表于 2006-7-10 20:58 | 显示全部楼层
原帖由 雷鸣 于 2006-7-10 16:57 发表
蜗牛吧。
参数貌似用默认就很好了

蜗牛也没办法好多类似锯齿的东东..
发表于 2006-7-11 08:26 | 显示全部楼层
原帖由 雷鸣 于 2006-7-10 16:57 发表
蜗牛吧。
参数貌似用默认就很好了

在我的旧电脑上2分钟/帧(P4 2.4 + 512M DDR333),在现在用的电脑上大概也要十好几秒。
您需要登录后才可以回帖 登录 | 成为会员

本版积分规则

小黑屋|手机版|NMM视频技术

GMT+8, 2025-5-6 00:52 , Processed in 0.105585 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表