<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jul 8, 2016 at 7:07 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:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5"><br>
<br>
Am 08.07.2016 18:39, schrieb Arnaud Vrac:<br>
>  On Fri, Jul 8, 2016 at 4:56 PM, walter harms <<a href="mailto:wharms@bfs.de">wharms@bfs.de</a>> wrote:<br>
>><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>
>>> ---<br>
>>>  edid-decode.c | 38 ++++++++++++++++++++++++++++++++++++++<br>
>>>  1 file changed, 38 insertions(+)<br>
>>><br>
>>> diff --git a/edid-decode.c b/edid-decode.c<br>
>>> index 2e367b3..c18697f 100644<br>
>>> --- a/edid-decode.c<br>
>>> +++ b/edid-decode.c<br>
>>> @@ -1100,6 +1100,43 @@ cea_colorimetry_block(unsigned char *x)<br>
>>>      }<br>
>>>  }<br>
>>><br>
>>> +static const char *eotf_map[] = {<br>
>>> +    "Traditional gamma - SDR luminance range",<br>
>>> +    "Traditional gamma - HDR luminance range",<br>
>>> +    "SMPTE ST2084",<br>
>>> +};<br>
>>> +<br>
>>> +static void<br>
>>> +cea_hdr_metadata_block(unsigned char *x)<br>
>>> +{<br>
>>> +    int length = x[0] & 0x1f;<br>
>>> +    int i;<br>
>>> +<br>
>>> +    if (length >= 3) {<br>
>>> +     printf("    Electro optical transfer functions:\n");<br>
>>> +     for (i = 0; i < 6; i++) {<br>
>>> +         if (x[2] >> i) {<br>
>>> +             printf("      %s\n", i < ARRAY_SIZE(eotf_map) ?<br>
>>> +                    eotf_map[i] : "Unknown");<br>
>>> +         }<br>
>>> +     }<br>
>><br>
>> i would move "Unknown" into eotf_map[], that make later changes more easy.<br>
>><br>
><br>
> That would add "Unknown" 3 times in the array, which I thought was<br>
> redundant. Bits 3 to 5 are reserved for future use.<br>
<br>
</div></div>mmh, thinking about this...<br>
can there actually more that 1 "Electro optical transfer function" ?<br></blockquote><div><br></div><div>Yes, a sink can support multiple transfer functions. My Samsung TV (edid in last patch) reports SDR and SMPTE ST2084.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
NTL i would say do it just add the "Rffu" to the array<br>
bytes are cheap this days, avoid surprises<br></blockquote><div><br></div><div>Ok. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
re,<br>
 wh<br>
<div class=""><div class="h5"><br>
<br>
><br>
>> I assume that x[2] is a bitfield, so is (x[2] >> i) & 1 intended ?<br>
><br>
> as in "[PATCH edid-decode 3/9] Print speaker allocation data block"<br>
>><br>
><br>
> Ah right, nice catch. I'll update the patch.<br>
><br>
><br>
>> re,<br>
>>  wh<br>
>><br>
>>> +     printf("    Supported static metadata descriptors:\n");<br>
>>> +     for (i = 0; i < 8; i++) {<br>
>>> +         if (x[3] >> i)<br>
>>> +             printf("      Static metadata type %d\n", i + 1);<br>
>>> +     }<br>
>>> +    }<br>
>>> +<br>
>>> +    if (length >= 4)<br>
>>> +     printf("    Desired content max luminance: %d\n", x[4]);<br>
>>> +<br>
>>> +    if (length >= 5)<br>
>>> +     printf("    Desired content max frame-average luminance: %d\n",<br>
>> x[5]);<br>
>>> +<br>
>>> +    if (length >= 6)<br>
>>> +     printf("    Desired content min luminance: %d\n", x[6]);<br>
>>> +}<br>
>>> +<br>
>>>  static void<br>
>>>  cea_block(unsigned char *x)<br>
>>>  {<br>
>>> @@ -1155,6 +1192,7 @@ cea_block(unsigned char *x)<br>
>>>                   break;<br>
>>>               case 0x06:<br>
>>>                   printf("HDR static metadata data block\n");<br>
>>> +                 cea_hdr_metadata_block(x);<br>
>>>                   break;<br>
>>>               case 0x0d:<br>
>>>                   printf("Video format preference data block\n");<br>
>><br></div></div><div class=""></div></blockquote></div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Arnaud</div></div></div>
</div></div>