1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
|
LoadPlugin("RemoveGrain.dll")
LoadPlugin("repair.dll")
LoadPlugin("mt_masktools.dll")
Import("LimitedSharpenFaster.avs")
#Import("vinverse.avs")
AviSource("test2_saibo.avi")
o=last
ox=o.width()
oy=o.height()
o.separatefields().pointresize(ox,oy)
o2=last
merge(removegrain(4),0.49)
deblock_qed(quant1=36,aOff1=4,bOff1=4,quant2=40,aOff2=4,bOff2=8)
vinverse(1.60) .clense()
clean = mergeluma(removegrain(4),0.49)
cleanD= mt_makediff(clean,o2,U=3,V=3)
USMD = mt_makediff( clean.bicubicresize(m4(ox/3.0),m4(oy/3.0)).bicubicresize(ox,oy,1,0),
\ clean.merge(clean.removegrain(4,0),0.49), U=3,V=3)
USMDD = USMD.repair(cleanD,1,3)
clean.mt_makediff(USMDD.removegrain(11,0),U=3,V=3)
eedi2().mt_convolution("1","0 -3 8 8 -3",U=3,V=3).turnleft()
eedi2().mt_convolution("1","0 -3 8 8 -3",U=3,V=3).turnright().bicubicresize(ox,oy,0.2,0.4)
limitedsharpenfaster(ss_x=1.414,ss_y=1.414,strength=160,soft=66,overshoot=2)
blurr = bicubicresize(m4(ox/4.0),m4(oy/4.0)).bicubicresize(ox,oy,1,0)
p1 = mt_lutxy(last,blurr,expr="x y - abs 4 < x x x y - abs 3 - 0.32 * x y - x y - abs 0.0001 + / * - ?",U=2,V=2)
removegrain(11,-1)
mt_makediff(removegrain(4,-1))
p1.mt_adddiff(last,U=2,V=2)#.mt_adddiff(xD.removegrain(11),U=2,V=2)
# re-weave 50p zu 25i für DVD
assumeframebased().separatefields().selectevery(4,0,3).weave()
return(last)
#-----------
function m4(float x) {x<16?16:int(round(x/4.0)*4)}
function Vinverse(clip clp, float "str", int "amnt", int "uv")
{
str = default( str, 2.6 )
uv = default( uv, 3 )
amnt = default( amnt, 255)
SSTR = string(str)
AMT = string(amnt)
vblur = clp.mt_convolution("1","1 2 1",U=uv,V=uv)
vblurD = mt_makediff(clp,vblur,u=uv,v=uv)
Vshrp = mt_lutxy(vblur,vblur.mt_convolution("1","1 4 6 4 1",U=uv,V=uv),"x x y - "+SSTR+" * +",U=uv,V=uv)
VshrpD = mt_makediff(Vshrp,vblur,u=uv,v=uv)
Vhalu = mt_lutxy(VshrpD,VblurD,"x 128 - abs y 128 - abs < x y ?",u=uv,v=uv)
mt_adddiff(Vblur,Vhalu,U=uv,V=uv)
(amnt>254) ? last : mt_lutxy(clp,last,"x "+AMT+" + y < x "+AMT+" + x "+AMT+" - y > x "+AMT+" - y ? ?",U=uv,V=uv)
} |