[2/5] libweston: provide support to set color transformation matrix for output

Submitted by Harsha Manjula Mallikarjun (RBEI/ECF3) on June 22, 2018, 1:23 p.m.

Details

Message ID 1529673803-18288-3-git-send-email-harsha.manjulamallikarjun@in.bosch.com
State Superseded
Headers show
Series "Implement support for drm properties "GAMMA_LUT" and "CTM"" ( rev: 1 ) in Wayland

Commit Message

Harsha Manjula Mallikarjun (RBEI/ECF3) June 22, 2018, 1:23 p.m.
From: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>

Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
---
 libweston/compositor.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Patch hide | download patch | download mbox

diff --git a/libweston/compositor.h b/libweston/compositor.h
index c2c40ee..1e47721 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -270,6 +270,18 @@  struct weston_output {
 			  uint16_t *g,
 			  uint16_t *b);
 
+	/** set a color tranformation matrix for output
+	 *
+	 * @param output_base: is the output to set tranformation for.
+	 * @param ctm_matrix: 4x4 matrix floating point matrix. only matrix
+	 *                    member "d" of weston_matrix is relevant here.
+	 *
+	 * One of the examples of using this matrix is, for tuning the output
+	 * color with respect to hue saturation and brightness.
+	 */
+	void (*set_ctm)(struct weston_output *output_base,
+			struct weston_matrix *ctm_matrix);
+
 	struct weston_timeline_object timeline;
 
 	bool enabled; /**< is in the output_list, not pending list */

Comments

Just some style suggestions...

On Fri, Jun 22, 2018 at 10:23 AM, <harsha.manjulamallikarjun@in.bosch.com>
wrote:

> From: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
>
> Signed-off-by: Harsha M M <harsha.manjulamallikarjun@in.bosch.com>
> ---
>  libweston/compositor.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/libweston/compositor.h b/libweston/compositor.h
> index c2c40ee..1e47721 100644
> --- a/libweston/compositor.h
> +++ b/libweston/compositor.h
> @@ -270,6 +270,18 @@ struct weston_output {
>                           uint16_t *g,
>                           uint16_t *b);
>
> +       /** set a color tranformation matrix for output
>

According to other similar comments, I think we should capitalize the first
letter ("Set").


> +        *
> +        * @param output_base: is the output to set tranformation for.
> +        * @param ctm_matrix: 4x4 matrix floating point matrix. only matrix
>

Would "4x4 floating point matrix" (deleting the first "matrix" occurrence)
be enough?

Also, maybe we should capitalize "Only".


> +        *                    member "d" of weston_matrix is relevant here.
> +        *
> +        * One of the examples of using this matrix is, for tuning the
> output
> +        * color with respect to hue saturation and brightness.
> +        */
> +       void (*set_ctm)(struct weston_output *output_base,
> +                       struct weston_matrix *ctm_matrix);
> +
>         struct weston_timeline_object timeline;
>
>         bool enabled; /**< is in the output_list, not pending list */
> --
> 2.7.4
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>



Best regards,
Matheus