HardWareMan wrote:
Ok. Here two records, converted to B/W picture (warning: huge sizes).
500MHz sample rateHere is my decodes:
UPDATE:
https://imgur.com/a/auMgr(OLD BUGGED:
https://imgur.com/a/5FVak U&V swaped at the same time R,B swapped in saving routine causing error to be hidden)
bug was found while checking magnitudes of UV for same luma of decoded output.
Explanation:
Decode done in basic mode. Simple Low pass approach, and sync with burst for fixed pixel range.
Burst frequency assumed to be: 4.43361875 MHz.
Pixel frequency assumed to be: 500 MHz
Formula used to convert RGB from png into IRE:
(double(rgb[0])-0x33)/(100.*0x5D/60.)*100.0
thus, 0 IRE is 0x33 byte. From high level of burst (20 IRE) to sync level (-40 IRE), considered to be 0x5D,
so delta in 60 IRE = 0x5D delta in png.
composite: N - signal in png; luma: Y = lowpass(N); chroma is detected by lowpass of multiplication (without pre-highpass of N).
svideo: same as composite but Y = N (no lowpass).
comb filter: hue averaging for adjacent lines.
hue rotation correction: after digging into "why hue slightly differ for adjacent lines", it was detected effect discussed below. This is correction provided below.
HUE artifacts.
In provided dump there is some HUE artifacts.
According to what we know about internals of PPU, there are 12 different phases, with 30 degrees step.
and subcarrier is generated by alternating of HIGH and LOW for selected luma.
this means, that HUE can't drift from 30 degrees step...
but in signal there is drift less than 30 degrees, it means that there is analog stuff which make phase drift.
after some investigation (took for me two days of headache), it was determined that most of drift is caused by luma levels.
luma 0 is considered as "without drift", then
luma 1 has drift ~3.8 degrees
luma 2 has drift ~3.8*2 degrees
luma 3 has drift ~3.8*3 degrees
and drift changes sign by each line, similarly to phase alternation of PAL.
this means, that probably it's so called phase delay.
but for linear filters, we use bode plot to show phase delay, but in bode plot phase delay depends on frequency.
here is different case, it depends on voltage, either highest voltage, or average voltage.
Because luma 3 has tiny amplitude, similar to luma 0. If drift would depend on amplitude of oscilation,
it would be similar drift for luma 3 and for luma 0, but NOPE. Luma 3 has biggest drift.
All degrees here is phase of oscilation in signal. In other words, it's angle in axis V*0.877 and U*0.493.
Even though I call it "HUE rotation", it's in V*0.877 U*0.493 space, phases of oscilation.
My correction has a bit more precise values, it uses table:
Code:
0 0
0.0651628589 0.065681
0.1157002756 0.11697625
0.2222102756 0.2225894167
in radians. even odd rows, luma 0..3.
There is also other kind of hue drift, that's why "best" correction result still has some hue artifacts.
By "best" correction I mean: composite+hue rotation correction+comb filter.
Here is table for those who interested in investigation hue effects.
amplitude:
half of amplitude of oscilation.
phase: in radians from burst, without any fix for even/odd lines.
same here, radians is phase of oscilation in signal. In other words, it's angle in axis V*0.877 and U*0.493.
middle: middle value.
amplitude & middle is in IRE/100 units. i.e. 100 is 1.0
btw, burst
half amplitude is 0.105919 0.107037 (even, odd)
and burst middle level is 0.077083 0.072939 (even, odd)
table has 16*4 rows. to understand what single row mean...
there is 8x8 cells on screen. almost all has colors in it, except 8 cells in second half of screen.
16*4 rows is all cells including "empty ones"
first 16 is all colors of luma 0, i.e. full first row from left to right, and then full fifth row from left to right.
and so on, for all 4 lumas.
Any ideas from where HUE drift based on voltage may come from?
Also, it's considered that PPU has rectangle output. But here it's more like to have more sinus-like output than rectangle.
"Best fit" distorted sine that I come with, is this:
https://i.imgur.com/8KKoi12.pngAny consideration why this form also would be nice.
This form of signal doesn't affect angle of U*0.493 V*0.877, it is only changing its magnitude, and leak a bit into Y.
So, this form of signal doesn't rotate HUE.