本页为 NMM视频技术(旧)论坛(2004–2012)的只读存档,无法登录或发帖。欢迎前往 新论坛 交流。

NMM视频技术(旧)

查看: 9138回复: 10
打印 上一主题 下一主题

[AVS技巧] AnimeAntiAliasing?

[复制链接]
风月
跳转到指定楼层
1楼
发表于 2006-7-5 18:47 只看该作者 回帖奖励 倒序浏览 阅读模式
如何使用?
雷鸣
2楼
发表于 2006-7-5 20:53 只看该作者
aaa()
风月
3楼
 楼主 发表于 2006-7-6 12:08 只看该作者
需要加载什么么?
还有功能怎么用
dgwxx
4楼
发表于 2006-7-8 00:22 只看该作者
用Import()导入相应的脚本文件。脚本文件可以在DOOM9论坛的AVS版里面找到。

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

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

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

[ 本帖最后由 风月 于 2006-7-8 10:54 编辑 ]
风月
6楼
 楼主 发表于 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)
dgwxx
7楼
发表于 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()
复制代码
MeteorRain
8楼
发表于 2006-7-10 15:29 只看该作者
而且听说极慢无比……
雷鸣
9楼
发表于 2006-7-10 16:57 只看该作者
蜗牛吧。
参数貌似用默认就很好了
人么无耻
10楼
发表于 2006-7-10 20:58 只看该作者
原帖由 雷鸣 于 2006-7-10 16:57 发表
蜗牛吧。
参数貌似用默认就很好了

蜗牛也没办法好多类似锯齿的东东..
dgwxx
11楼
发表于 2006-7-11 08:26 只看该作者
原帖由 雷鸣 于 2006-7-10 16:57 发表
蜗牛吧。
参数貌似用默认就很好了

在我的旧电脑上2分钟/帧(P4 2.4 + 512M DDR333),在现在用的电脑上大概也要十好几秒。

小黑屋手机版NMM视频技术

GMT+8, 2026-10-11 12:23 , Processed in 0.020295 second(s), 13 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.