A couple of points I don't understand about Re^7: encoding hdmi video byte.
First, in the statement
my $outb = ord pack 'b8',"@Q";
will not "@Q" interpolate the array with spaces between the elements of @Q and so give an oddball result (i.e., only 16 unique values) since a space (ASCII space == 0x20) is packed by b as a 0 bit and half the elements of @Q will be ignored?
I.e., shouldn't it be
my $outb = ord pack 'b8',join '', @Q;
instead?
The other point I don't understand is that I took the OP statement
Data byte D(0:7) encode this to make 9bit data q_m(0:8) q_m[0] = D(0); q_m(1) = q_m(0) XOR D(1); q_m(2) = q_m(1) XOR D(2); q_m(3) = q_m(2) XOR D(3); q_m(4) = q_m(3) XOR D(4); q_m(5) = q_m(4) XOR D(5); q_m(6) = q_m(5) XOR D(6); q_m(7) = q_m(6) XOR D(7); q_m(8) = 1;
to be pseudo-code, and to be the equivalent (on a byte-for-byte basis) of
$q_m_byte = (0x100 | ($D_byte ^ (0xff & ($q_m_byte << 1))));
with a $q_m_byte 'byte' of 9 bits always ending up with its bit-8 set, and bit-7 of the original value of $q_m_byte always being lost.
But
$Q[ 0 ] = $D[ 0 ]; $Q[ 1 ] = $D[ 1 ] ^ $Q[ 0 ]; $Q[ 2 ] = $D[ 2 ] ^ $Q[ 1 ]; $Q[ 3 ] = $D[ 3 ] ^ $Q[ 2 ]; ...
seems to be the equivalent of
$Q[ 0 ] = $D[ 0 ]; $Q[ 1 ] = $D[ 1 ] ^ $D[ 0 ]; $Q[ 2 ] = $D[ 2 ] ^ $D[ 1 ] ^ $D[ 0 ]; $Q[ 3 ] = $D[ 3 ] ^ $D[ 2 ] ^ $D[ 1 ] ^ $D[ 0 ]; ...
which is very different.
In reply to Re^8: encoding hdmi video byte
by AnomalousMonk
in thread encoding hdmi video byte
by hdmiguru
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |