Log in

View Full Version : Deep Color Utilities - testing


jmac698
9th January 2011, 03:38
Running this script under virtualdub, I do see the video. If I uncomment the last line to see the lsbs, I see black, confirming that my "10b video" is really 8b video in a 10b format.

What is weird is that the film has 5023 frames, but if I view deeplastlo, virtualdub says that I have 240 frames.
I have no way of testing qtinput right now, nor really a method to create specific v210 files, but you can try this:

fn="c:\videos\test.mov"
hi=qtinput(fn,color=2,audio=true,mode=1,raw="v210")
lo=qtinput(fn,color=2,audio=true,mode=1,raw="v210",dither=1)
subtract(hi,lo)
and try to see if there's any different color pixels. Using AvsPmod and moving your mouse on the video will show the differences.
Update:
I got to see some pixels myself, however there's a bug in my program in the calculation of deeplastlo.
Wait for the new release.
thanks for testing!

jmac698
9th January 2011, 04:40
Try this:

deepread("v210.mov")
deeplastlo

function deepread(string fn) {
global deeplasthi=qtinput(fn,color=2,audio=true,mode=1,raw="v210")
qtinput(fn,color=2,audio=true,mode=1,raw="v210",dither=1)#9th bit
#low bit to high bit
Overlay(last,deeplasthi, mode="Subtract", pc_range=true)#e.g. y:129-128=1, 128-128=0. u,v are 128 or 129
coloryuv(gain_y=127*256,off_u=-128,off_v=-128)
coloryuv(gain_u=127*256,gain_v=127*256)
global deeplastlo=last
deeplasthi
}

Gavino
9th January 2011, 09:48
The same correction (adding 'global' to all assignments to deeplasthi/lo) must of course be made to all the other functions too.

Also, deepgreyclip should return deeplasthi.

jmac698
9th January 2011, 10:12
yep, try again with version 0.2.
It was much "deep"ly flawed than you noticed :) You can finally access those low bits on real video! Try it, it's useable.

Gavino
9th January 2011, 10:47
function clamphi(string s, int n) {
s+" "+string(n)+" > "+string(n)+" "+string(s)+" ?"
}

function clamplo(string s, int n) {
s+" "+string(n)+" < "+string(n)+" "+string(s)+" ?"
}

function clamprange(string s, int low, int high) {
clamplo(s,low)
clamphi(s,high)
}
clamprange is wrong (which affects clamptweak) as the result of the first line is simply thrown away.
It should be clamphi(clamplow(s,low),high) [or s.clamplow(low).clamphi(high)]
Also, string(s) in clamphi and clamplo is redundant as s is a string.
And deepgrayscale should return deeplasthi ;)

jmac698
9th January 2011, 11:01
fixed!
And deepgrayscale should return deeplasthi
Got me :)
Many eyes...

frustum
18th January 2011, 04:52
BTW, jmac, although it turns out that my "v210" videos contain only 8 meaningful bits, I appreciate your work on this and conclusively showing that I shouldn't spend any time trying to use those two lost bits.