NMM视频技术(旧)

 找回密码
 成为会员
搜索
查看: 5875|回复: 1

[AVS技巧] 有关decomb和tivtc里的ovr

[复制链接]
发表于 2008-6-13 22:55 | 显示全部楼层 |阅读模式
话说TIVTC真是个好东西,全自动VFR太方便了,效果还非常好。最近处理某混合DVD片源时发现残余大量拉丝,因为实在不想手动处理(太麻烦了。。。),想出了这个办法。

以下脚本内容大部分A自Dgwxx大神的主页:

function CombingInfo(clip c, int "thresh")
{
file = "ovr.txt"
global clip = c
global sep=" +"

global combedthreshold=default(thresh,70)
c=SeparateFields(c)
c=c.Blur(0.0,1.58).Blur(0.0,1.58).Blur(0.0,1.58).Blur(0.0,1.58)
c=c.Blur(0.0,1.58).Blur(0.0,1.58).Blur(0.0,1.58)
c=c.Blur(0.0,1.58).Blur(0.0,1.58)
c=c.Blur(0.0,1.58)
c=weave(c)
c = FrameEvaluate(c, "global a = IsCombed(clip, combedthreshold)")
c = WriteFileIf(c, file, "a==true", "current_frame", "sep")
return c
}

dgdecode_mpeg2source("d2v.d2v")
tfm(slow=2,d2v="d2v.d2v")
combinginfo
crop(0,0,32,32)

(后面的crop是为了加快处理速度)

然后把脚本从头到尾播一次(推荐avs2avi,速度很快),生成ovr.txt,最后直接在tfm的参数里指定ovr="ovr.txt"就可以了。


上面这段是从某人的blog里抽来的

在avs的说明书里面有这么一段..........
那个iscomb的filter就是decomb用来判断是否comb的filter.


Advanced conditional filtering: part II

In the following example, some frame dependent info will be written to a text-file. The first variable "a" indicates whether the frame is combed (for a certain threshold). Note that IsCombed is a filter from the Decomb plugin. The second variable "b" indicates whether there is "much" movement in the frame.

global sep="."
global combedthreshold=25

function IsMoving()
{
global b = (diff < 1.0) ? false : true
}

function CombingInfo(clip c)
{
file = "F:\interlace.log"
global clip = c

c = WriteFile(c, file, "a", "sep", "b")
c = FrameEvaluate(c, "global a = IsCombed(clip,combedthreshold)")
c = FrameEvaluate(c, "IsMoving")
c = FrameEvaluate(c,"global diff = 0.50*YDifferenceFromPrevious(clip) + 0.25*UDifferenceFromPrevious(clip) + 0.25*VDifferenceFromPrevious(clip)")

return c
}

v = mpeg2source("F:\From_hell\from_hell.d2v").trim(100,124)
CombingInfo(v)


然后再用conditional filter就可以使用任何deinterlace filter了.
像下面说明书里面写的那样.........


ConditionalFilter returns source1 when the condition formed by filter+operator+value is met, otherwise it returns source2. If filter is not explicitly applied to a clip, it will be applied on testclip. The audio is taken from source1. An example:

This will choose frames from vid_blur when the average luma value of a frame is less than 20. Otherwise frames from vid will be returned.


vid = AviSource("file")
vid_blur = vid.Blur(1.5)
ConditionalFilter(vid, vid_blur, vid, "AverageLuma()", "lessthan", "20")


这段是从以前popgo一个讨论帖里抽出来的
从函数来看貌似是师出同门,本人编程不懂所以不太理解这个的含义

而用yatta自动跑后也会出一个ovr文件,观察里面的内容则是列出全部i帧,有交错的弄个负号,没交错的没表示

现在问题是ovr这个到底是啥意义,怎么用

还有可能的话解释下函数吧
发表于 2008-6-16 09:22 | 显示全部楼层
抱歉,最近期末考试,时间比较少。回复晚了。

ovr的作用是,手动写脚本辅助IVTC,半自动半手动。自动IVTC有时候会存在一些不足:
1.误匹配:本来能够通过场匹配成功match的帧,却因为误判而没有输出正确的匹配,造成交错;
2.误判pp:本来是正确的帧,却因为误判走了pp,造成画质下降。
3.误判pp2:本来是交错的帧应该走pp,但因为误判没有走pp,造成输出了交错的帧。

tivtc有一个参数叫output,可以用这个参数输出一个log,里面相近分析了每一帧的情况。如果你追求很高的IVTC精度,可以将里面每一帧被标记为+的帧进行分析,尝试在ovr文件里面手动指定匹配方式,或指定是否经过pp处理。此外,还可以通过ovr单独为一部分场景指定某些参数,比如PP、Mode、MI等等。
具体语法可以参考tivtc的使用手册,里面说明很详细。
您需要登录后才可以回帖 登录 | 成为会员

本版积分规则

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

GMT+8, 2025-5-6 01:09 , Processed in 0.038953 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

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