<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 8, 2016 at 7:17 PM, walter harms <span dir="ltr"><<a href="mailto:wharms@bfs.de" target="_blank">wharms@bfs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
<br>
Am 08.07.2016 16:09, schrieb Arnaud Vrac:<br>
> From: Arnaud Vrac <<a href="mailto:avrac@freebox.fr">avrac@freebox.fr</a>><br>
><br>
> This only prints VIC codes, not DTD.<br>
> ---<br>
> edid-decode.c | 31 +++++++++++++++++++++++++++++++<br>
> 1 file changed, 31 insertions(+)<br>
><br>
> diff --git a/edid-decode.c b/edid-decode.c<br>
> index cd5a257..2e367b3 100644<br>
> --- a/edid-decode.c<br>
> +++ b/edid-decode.c<br>
> @@ -795,6 +795,36 @@ cea_y420vdb(unsigned char *x)<br>
> cea_svd(x + 2, length - 1);<br>
> }<br>
><br>
> +static void<br>
> +cea_vfpdb(unsigned char *x)<br>
> +{<br>
> + int length = x[0] & 0x1f;<br>
> + int i;<br>
> +<br>
> + for (i = 2; i <= length; i++) {<br>
> + unsigned char svr = x[i];<br>
> +<br>
> + if ((svr > 0 && svr < 128) || (svr > 192 && svr < 254)) {<br>
> + unsigned char vic;<br>
> + const char *mode;<br>
> + int index;<br>
> +<br>
> + vic = svr;<br>
> + index = vic - 1;<br>
<br>
<br>
</div></div>why do you need vic ? i could be dropped for srv<br>
btw you are checking index and use vic.<br></blockquote><div><br></div><div>This is just for clarity, I can remove it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> +<br>
> + if (index < ARRAY_SIZE(edid_cea_modes))<br>
> + mode = edid_cea_modes[vic];<br>
> + else<br>
> + mode = "Unknown mode";<br>
> +<br>
> + printf(" VIC %02d %s\n", vic, mode);<br>
> +<br>
> + } else if (svr > 128 && svr < 145) {<br>
> + printf(" DTD number %02d\n", svr - 128);<br>
> + }<br>
> + }<br>
> +}<br>
<br>
<br>
</span>when I see the ranges i am wondering ...<br>
[1-127] edid_cea_modes [01-7F]<br>
[129-144] DTD number [81-91]<br>
[193-253] edid_cea_modes [C0-FD]<br>
<br>
I would expect to see some pattern in the bits.<br>
Are you sure about the ranges ?<br></blockquote><div><br></div><div>I'm sure about the ranges (they are in decimal in CEA 681-F), but I could not find a pattern in the bits like I did in patch 2. So I preferred to keep the same numbers that are in the spec.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
re,<br>
wh<br>
<span class=""><br>
> +<br>
> static const char *edid_cea_hdmi_modes[] = {<br>
> "3840x2160@30Hz",<br>
> "3840x2160@25Hz",<br>
> @@ -1128,6 +1158,7 @@ cea_block(unsigned char *x)<br>
> break;<br>
> case 0x0d:<br>
> printf("Video format preference data block\n");<br>
> + cea_vfpdb(x);<br>
> break;<br>
> case 0x0e:<br>
> printf("YCbCr 4:2:0 video data block\n");</span></blockquote></div><div><br></div><div>Thanks,</div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Arnaud</div></div></div>
</div></div>