Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.
Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.
fn="G:\project001a\deepcolor\v210.mov" RawReader (fn, format="y8", width=5120, height=1080, numframes=0, filehead=21192, framehead=0)
#v210 Reader Ver 0.4 by jmac698
#Read v210 quicktime files with rawreader, by jmac698
#Requires Sashimi 0.74 http://sites.google.com/site/ourenthusiasmsasham/contributions/open-source-software#TOC-Sashimi
#also http://forum.doom9.org/showthread.php?p=1403600
#Masktools 2a48 http://manao4.free.fr/masktools-v2.0a48.zip
#Ver 0.4 - reads full image in 8bit greyscale, with 10bit easily accessible
#Ver 0.3 - reads fully to 8bit greyscale, now requires masktools 2a48
#Ver 0.2 - fixed wrapping bug. 83 pixels *8=664, that would be the trailing bytes
#Ver 0.1 - reads only greyscale, can only read 1/3 of the size, only reads upper 6 bits, wrapped by 83 pixels
fn="G:\project001a\deepcolor\v210.mov"
readv210(fn)
function every(clip v, int n, int offset) {#select every n bytes horizontally with offset, works on yv12 only
v
w=width
h=height
pointresize(v,w*2,h)
crop(offset*2,0,0,0).addborders(0,0,offset*2,0)#shift left offset pixels
pointresize(w/n,h)
}
function readv210(string fn) {#reads 1/3 size, greyscale v210 file
base=RawReader (fn, format="y8", width=5120, height=1080, numframes=0, filehead=21192-664, framehead=0)#21192 header, 664 trailer
high6=base.every(4,3).every(2,1)
low4=base.every(4,2).every(2,1)
mt_lutxy(low4,high6,yexpr="x 6 >> y 2 << +")
o1=last
high4=base.every(4,2).every(2,0)
low6=base.every(4,1).every(2,0)
mt_lutxy(low6,high4,yexpr="y 15 &u 4 << x 4 >> +")#x 4 >> y 4 << +
o0=last
high2=base.every(4,1).every(2,1)
low8=base.every(4,0).every(2,1)
mt_lutxy(low8,high2,yexpr="y 3 &u 6 << x 2 >> +")#x 4 >> y 4 << +
o2=last
weave3h(o0,o1,o2)
}
function weave3h(clip a, clip b, clip c) {#horizontally weave 3 clips
a=a.turnright
b=b.turnright
c=c.turnright
interleave(a,b,a,c)#0 1 2 3->01 23->0213->213 or abc
assumefieldbased
assumetff
weave
assumefieldbased
assumetff
weave
pointresize(width,height*3/4)#deletes every 4th line offset 0
turnleft
}
|
|