Re: [PATCH 2/2] Move the EDID parsing to its own file

2013-05-17 Thread Bill Spitzak



Graeme Gill wrote:

Bill Spitzak wrote:

The Y of the primaries can be used as alternative method of specifying the 
whitepoint. (convert the
3 Yxy colors to XYZ, add them, then convert back to Yxy and the xy is the 
whitepoint, I think).


Correct, but this assumes the display is perfectly additive. Real world ones 
mightn't be, so
Yxy or XYZ x RGBW does provide extra information.


I suppose that is possible if the primaries and whitepoint were all Yxy 
triples, because that provides 12 degrees of freedom. However I have 
always seen them specified as xy pairs thus giving 8 degrees of freedom, 
which is less than the 9 degrees of freedom from three Yxy triples.


Also non-additiveness is usually considered a second step after 
conversion to additive primaries. I have doubts it can be specified by 
just one extra point in the color space.



I think the reason rgb sets are specfied as 4 pairs of xy (the three primaries 
and the whitepoint)
instead of 3 triples is to remove the arbitrary multiplier that makes there be 
9 numbers instead of 8.


A lot of display folk are very chromaticity diagram oriented - they are used to 
just
specifying xy, and it's nice to have the white point be explicit so you can 
more easily
check what the white point color temperature is.


xy of the whitepoint does define the color temperature. Possibly you are 
thinking of X and Z?

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 2/2] Move the EDID parsing to its own file

2013-05-16 Thread Graeme Gill
Bill Spitzak wrote:
 The Y of the primaries can be used as alternative method of specifying the 
 whitepoint. (convert the
 3 Yxy colors to XYZ, add them, then convert back to Yxy and the xy is the 
 whitepoint, I think).

Correct, but this assumes the display is perfectly additive. Real world ones 
mightn't be, so
Yxy or XYZ x RGBW does provide extra information.

 I think the reason rgb sets are specfied as 4 pairs of xy (the three 
 primaries and the whitepoint)
 instead of 3 triples is to remove the arbitrary multiplier that makes there 
 be 9 numbers instead of 8.

A lot of display folk are very chromaticity diagram oriented - they are used to 
just
specifying xy, and it's nice to have the white point be explicit so you can 
more easily
check what the white point color temperature is.

Graeme Gill.

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 2/2] Move the EDID parsing to its own file

2013-05-06 Thread Bill Spitzak
The Y of the primaries can be used as alternative method of specifying 
the whitepoint. (convert the 3 Yxy colors to XYZ, add them, then convert 
back to Yxy and the xy is the whitepoint, I think).


I think the reason rgb sets are specfied as 4 pairs of xy (the three 
primaries and the whitepoint) instead of 3 triples is to remove the 
arbitrary multiplier that makes there be 9 numbers instead of 8.


Richard Hughes wrote:

On 4 May 2013 00:16, Kai-Uwe Behrmann k...@gmx.de wrote:

+struct weston_edid_color_Yxy {
+   double Y;
+   double x;
+   double y;
+};

Why is the Y value set when it is all about primaries. No one will ever use
that other than for assuming 1.0 .


I assumed a standard type would be more useful than a custom type. If
it stays as Yxy, then colord can use it without having to do a:

var2-Y = 1.0;
var2-x = var1-x;
var2-y = var1-y;

...every time.

Richard
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 2/2] Move the EDID parsing to its own file

2013-05-04 Thread Richard Hughes
On 4 May 2013 00:16, Kai-Uwe Behrmann k...@gmx.de wrote:
 +struct weston_edid_color_Yxy {
 +   double Y;
 +   double x;
 +   double y;
 +};
 Why is the Y value set when it is all about primaries. No one will ever use
 that other than for assuming 1.0 .

I assumed a standard type would be more useful than a custom type. If
it stays as Yxy, then colord can use it without having to do a:

var2-Y = 1.0;
var2-x = var1-x;
var2-y = var1-y;

...every time.

Richard
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH 2/2] Move the EDID parsing to its own file

2013-05-03 Thread Kai-Uwe Behrmann

Am 02.05.2013 23:33, schrieb Richard Hughes:

---
  src/Makefile.am  |   2 +
  src/compositor-drm.c | 180 +--
  src/compositor.c |  21 ++
  src/compositor.h |   5 ++
  src/edid.c   | 175 +
  src/edid.h   |  48 ++
  6 files changed, 254 insertions(+), 177 deletions(-)
  create mode 100644 src/edid.c
  create mode 100644 src/edid.h

+   /* get primaries and whitepoint */
+   edid-primary_red.Y = 1.0f;
+   edid-primary_red.x = edid_decode_fraction(data[0x1b], 
edid_get_bits(data[0x19], 6, 7));
+   edid-primary_red.y = edid_decode_fraction(data[0x1c], 
edid_get_bits(data[0x19], 5, 4));
+   edid-primary_green.Y = 1.0f;
+   edid-primary_green.x = edid_decode_fraction(data[0x1d], 
edid_get_bits(data[0x19], 2, 3));
+   edid-primary_green.y = edid_decode_fraction(data[0x1e], 
edid_get_bits(data[0x19], 0, 1));
+   edid-primary_blue.Y = 1.0f;
+   edid-primary_blue.x = edid_decode_fraction(data[0x1f], 
edid_get_bits(data[0x1a], 6, 7));
+   edid-primary_blue.y = edid_decode_fraction(data[0x20], 
edid_get_bits(data[0x1a], 4, 5));
+   edid-whitepoint.Y = 1.0f;
+   edid-whitepoint.x = edid_decode_fraction(data[0x21], 
edid_get_bits(data[0x1a], 2, 3));
+   edid-whitepoint.y = edid_decode_fraction(data[0x22], 
edid_get_bits(data[0x1a], 0, 1));
+



+#ifndef _WESTON_EDID_H_
+#define _WESTON_EDID_H_
+
+struct weston_edid_color_Yxy {
+   double Y;
+   double x;
+   double y;
+};


Why is the Y value set when it is all about primaries. No one will ever 
use that other than for assuming 1.0 .


kind regards
Kai-Uwe
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel