Bit more fiddling about.
Code:
Function VideoTek(clip clp) {
clp
nChannels=(HasAudio)?AudioChannels:0 # ssS, HasAudio = audio_samples_per_second!=0
Assert(IsYV12,"VideoTek: source must be yv12 (YUV 4:2:0 8bit)")
Assert(nChannels<9,"VideoTek: sources with more than 8 audio channels are not supported")
CSZ = 480 # Chroma Size box (W & H)
A_W = 320 # Audio Box Width
A_H = 460 # Audio Box Height (Audio & Lissajoua)
L_W = (704+704+6)-700-A_W # Lissajous Width
SilentStereo=Last.BlankClip(width=1480, height=920,audio_rate=48000,channels=2,sample_type="Float")
myBlack= (nChannels>0) ? SilentStereo.AudioDubEx(Last) : SilentStereo.Killaudio
Stereo = (nChannels>=2) ? Last.GetChannels(1,2) : (nChannels==1) ? MergeChannels(GetChannels(1),GetChannels(1)) : SilentStereo
StereoClip = Last.BlankClip(width=16,height=16).AudioDub(Stereo) # Histogram(mode="StereoOverlay") requires 2 channel only clip.
Picture = BicubicResize(704, 396)
luma = TurnRight.Histogram(mode="classic").TurnLeft.Crop(0,0,0,256).BiCubicResize(704, 396)
chroma = Histogram("color2").Crop(clp.Width, 0, 0,256).BilinearResize(CSZ,CSZ)
Audio = myBlack.Crop(0,0,A_W,A_H).Histogram(Mode="audiolevels")
lissajous = StereoClip.Histogram(mode="StereoOverlay").BicubicResize(L_W,A_H)
MyBlack
Overlay(Picture, x=0, y=0)
Overlay(luma, x=704+6, y=0)
Overlay(chroma, x=(704-chroma.Width)/2,y=396 + (920-396-chroma.height)/2)
Overlay(Audio, x=704-4, y=396 + (920-396-audio.height) /2)
Overlay(lissajous, x=700+Audio.Width, y=396 + (920-396-lissajous.height) /2)
return Last
}
Can mess with this lot to auto center stuff, when happy then might want to hard code numbers.
Code:
CSZ = 480 # Chroma Size box (W & H)
A_W = 320 # Audio Box Width
A_H = 460 # Audio Box Height (Audio & Lissajoua)
L_W = (704+704+6)-700-A_W # Lissajous Width
Have also converted from PointResized source to input source for histogram stuff, and used Bicubic instead where resize necessary,
if too slow, then change BiCubics to BiLinear.
EDIT: Added Levels() on Lissajous trying to make more visible, only minor improvement (before downsize).
Here, downsized,
EDIT:
In Steinberg, I think that the Lissajous thing is known as Phase (or Phase Scope), when spreads out horizontally, is broader stereo,
if dot or vertical line, then is mono, height being amplitude (I guess FranceBB, already knows this).
The Phase Scope, shows info from only first two channels (Left & Right, it is stereo specific, perhaps eg 5.1 should be downmixed somehow).
EDIT: Moved Levels() before BiCubicResize() for Lissajous.
(Levels improvement is only on the cross hair thing, is a bit more visible on FranceBB linked image than in this script)
EDIT:
Changed Levels 126-4 and 126+4, to 126-1, 126+1. (126 being TV levels mid point)
Code:
lissajous = StereoClip.Histogram(mode="StereoOverlay").Levels(126-1,1.0,126+1,16,235,coring=false).BicubicResize(L_W,A_H)
EDIT: Damn, below bug crept back in again, fixed in blue [was (nChannels==2)].
Code:
Stereo = (nChannels>=2) ? Last.GetChannels(1,2) : (nChannels==1) ? MergeChannels(GetChannels(1),GetChannels(1)) : SilentStereo
EDIT: Levels() removed from Lissajous thing, it emphasized the cross hairs stuff, but messed with the dust cloud a bit.