[PATCH 2/2] Move the EDID parsing to its own file
Kai-Uwe Behrmann
ku.b at gmx.de
Fri May 3 16:16:13 PDT 2013
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
More information about the wayland-devel
mailing list