版面规则
提问时请注意:尽量详细描述操作过程、AVS脚本内容等,最好能写出片名,只贴图有时无法看出问题原因。
提示:发布原创内容请尽量使用附件上传。使用网盘会出现过期失效的问题,请注意。
头像
06_taro
核心会员
核心会员
帖子: 998
注册时间: 2010-09-22 18:32
来自: United Kingdom
联系: 网站

LumaDB v0.6 & GrainFactory3mod 1.1 - 高速Y平面debanding脚本

首先声明其实核心的东西都不是我写的,
HaibaraAi菊苣给我的,
Ai菊苣说是tp7菊苣写的……
于是函数化,
变量该有的基本都有了,
因为脚本很简单就懒得在avsi里面写文档了,
反正参数名全都和用到的其他滤镜参数名相同,
而且我写出来向来自己都看不懂。

核心思路就是以GradFun3为debanding核心,
GrainFactory3按照亮度不同自适应加grain,
GradFun3的thrradiusampn参数可调,
v0.3开始radius的默认值根据分辨率自适应调整,
GrainFactory3的g1strg2strg3str
g1shrpg2shrpg3shrp
g1sizeg2sizeg3size
g1texg2texg3tex
temp_avg可调整,
以及我自己添加的mod版里:
g1constg2constg3const可调,
v0.2及之前的是seed和constant,seed已经去掉,
constant现在按dark/midtone/bright分为g1const/g2const/g3const,
然后mask,
TEdgeMask的preblur可调,
deflate控制是否对mask做mt_deflate,
blur控制是否用RemoveGrain处理mask,
只处理Y平面。

我函数化以后专门设置了dither参数和grain参数,
大家可以自己设置dither与grain的滤镜,
"none"表示不处理,
例如LumaDB(dither="gradfun2db(thr=1.5)", grain="none")这样;

其实不蛋疼一般用默认参数就行了……
另外就是默认输出的grain是静态的,
有需要的可以自己用g1const=false、g2const=false这样改成动态grain。

顺便修改了一下LumaDB里面用到的GrainFactory3,
我的mod版可以分别用g1const、g2const、g3const让dark/midtone/bright area生成静态噪声,
顺便把控制噪声强度的g1str、g2str、g3str参数给float化了,
默认参数没动所以默认效果不变,
不过应该没人会真的用默认参数吧(默认是让AddGrainC生成var=13-25的噪声,貌似是旧版AddGrain的参数,对现在的值来说这口味重得……)

Requirements:
AddGrainC_1.6.1.7z
dither-1.14.1.zip
masktools-v2.0a48.zip (dither-1.6必须a48之后否则绿屏,自定义其他dither或用旧版GradFun3则无此要求)
RemoveGrain-1.0.rar
TEdgeMaskv09.zip
输入为YV12的色彩空间

下载:

LumaDB-0.6-1.7z(仅LumaDB与GrainFactory3mod两个avsi):
MediaFirenmm备份

LumaDB-0.4+Requirements.7z(包括Requirements里的其他滤镜):
MediaFirenmm备份

单独的GrainFactory3mod:
MediaFireNMM备份

用法举例:

代码: 全选

LumaDB(g1const=false, g2const=true, g3const=true)
生成dark区域的动态噪声和midtone/bright区域的静态噪声,其他为默认参数

代码: 全选

LumaDB(dither="flash3kyuu_deband(range=12, Cb=0, Cr=0, ditherY=1, ditherC=0)", grain="AddGrainC(var=0.6)")
用皮神的flash3kyuu_deband处理,用AddGrainC加grain,说实话这样速度挺快的……

代码: 全选

LumaDB(dither="""GradFun2DBmod(custom="NoiseGenerator")""", grain="none")
GradFun2DBmod处理并在GradFun2DBmod里面用NoiseGenerator加grain,LumaDB不再加grain,只是用来示范引号用法的,这参数完全没实际意义……


================== Changelog ===================

2012.03.13
v0.6 增加自定义mclip,支持Chroma处理,默认g*const改为false以适应10-bit时代

2011.11.21
v0.5 默认关闭GradFun3内部的mask并增加gf3mask来控制,另外增加mask来控制LumaDB是否做mask,方便用于MCTD_PP之类已经有mask的脚本内

2011.09.26
v0.4 增加th1/th2/th3/th4来自定义luma划分区域的范围,具体直接看GrainFactory3mod里的说明。dither更新到1.12.0,16-bit版也准备出来了……

2011.05.28
v0.3 GrainFactory3mod用g1const/g2const/g3const替换constant,从而噪点的constant也按照g1/g2/g3来区分;LumaDB去掉seed,反正不会有人用这个参数,constant也相应被替换为g1const/g2const/g3const,参数里radius的默认值修改为按分辨率自适应调整。

2011.05.27
v0.2 增加几个GrainFactory3里可以直接修改的参数方便使用,早改好了一直在用不过忘了在这里更新了……

2011.05.22
v0.1 脚本化。
上次由 06_taro 在 2012-03-27 16:18,总共编辑 12 次。
つまんねー事聞くなよ!

I, personally, for me, believe (obviously sometimes) that my OS choice is right. That's me. I'm not telling you that you should believe it. Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one. (source)

Follow me: @06_taro

304——
为纪念伟大的宇宙史上最强压制304先生,联合国教科文组织决定,将每年的第304天,即平年的10月31日或者闰年的10月30日,定为世界304日。
头像
-o-o-304-o-o-
超级版主
帖子: 640
注册时间: 2010-10-10 20:00
来自: US
联系: 网站

Re: LumaDB v0.1 - 高速Y平面debanding脚本

taro大v5,话说一夜之间选择多了不少啊,泪目
► 显示剧情透露 En Taro 06!Taro Pie NC Fanclub project始动!聊天用Q群开放中
► 显示剧情透露 胸中有万言,退敌无一策,是谓书生误国"
► 显示剧情透露 前辈们的信念
► 显示剧情透露 妇联招新广告,走过路过可以看看撒
► 显示剧情透露 香芋派,后期菊苣们的一致选择
► 显示剧情透露 众菊苣喜评香芋派
► 显示剧情透露 聊天用工具
头像
06_taro
核心会员
核心会员
帖子: 998
注册时间: 2010-09-22 18:32
来自: United Kingdom
联系: 网站

Re: LumaDB v0.6 & GrainFactory3mod 1.1 - 高速Y平面debanding脚本

批量发片方便XX什么的……
反正都是mawen菊苣鞭策出来的结果……
つまんねー事聞くなよ!

I, personally, for me, believe (obviously sometimes) that my OS choice is right. That's me. I'm not telling you that you should believe it. Learn the facts, and the origins behind the facts, and make up your own damn mind. That's why you have one. (source)

Follow me: @06_taro

304——
为纪念伟大的宇宙史上最强压制304先生,联合国教科文组织决定,将每年的第304天,即平年的10月31日或者闰年的10月30日,定为世界304日。

回到 “AviSynth”