Skip to content

Commit

Permalink
CEA: rudimentary Video Data Block support.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwnk committed Sep 22, 2008
1 parent 02f0a2d commit fa29460
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions edid-decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,16 @@ do_checksum(unsigned char *x)

/* CEA extension */

static void
cea_video_block(unsigned char *x)
{
int i;
int length = x[0] & 0x1f;

for (i = 1; i < length; i++)
printf(" VIC %02x %s\n", x[i] & 0x7f, x[i] & 0x80 ? "(native)" : "");
}

static void
cea_hdmi_block(unsigned char *x)
{
Expand Down Expand Up @@ -447,6 +457,10 @@ cea_block(unsigned char *x)
unsigned int oui;

switch ((x[0] & 0xe0) >> 5) {
case 0x02:
printf(" Video data block\n");
cea_video_block(x);
break;
case 0x03:
/* yes really, endianness lols */
oui = (x[3] << 16) + (x[2] << 8) + x[1];
Expand Down

0 comments on commit fa29460

Please sign in to comment.