[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c1dc5de9-e81d-b9bd-b587-1a94de96f97c@infradead.org>
Date: Tue, 6 Feb 2018 17:22:40 -0800
From: Randy Dunlap <rdunlap@...radead.org>
To: Tim Harvey <tharvey@...eworks.com>, linux-media@...r.kernel.org,
alsa-devel@...a-project.org
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
shawnguo@...nel.org, Steve Longerbeam <slongerbeam@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>,
Hans Verkuil <hansverk@...co.com>,
Mauro Carvalho Chehab <mchehab@...pensource.com>,
Hans Verkuil <hverkuil@...all.nl>,
Hans Verkuil <hans.verkuil@...co.com>
Subject: Re: [PATCH v8 1/7] v4l2-dv-timings: add v4l2_hdmi_colorimetry()
On 02/06/2018 12:27 PM, Tim Harvey wrote:
> From: Hans Verkuil <hverkuil@...all.nl>
>
> Add the v4l2_hdmi_colorimetry() function so we have a single function
> that determines the colorspace, YCbCr encoding, quantization range and
> transfer function from the InfoFrame data.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@...co.com>
> Signed-off-by: Tim Harvey <tharvey@...eworks.com>
> ---
> drivers/media/v4l2-core/v4l2-dv-timings.c | 141 ++++++++++++++++++++++++++++++
> include/media/v4l2-dv-timings.h | 21 +++++
> 2 files changed, 162 insertions(+)
>
> diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c
> index 930f9c5..0182d3d 100644
> --- a/drivers/media/v4l2-core/v4l2-dv-timings.c
> +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c
> @@ -27,6 +27,7 @@
> #include <linux/v4l2-dv-timings.h>
> #include <media/v4l2-dv-timings.h>
> #include <linux/math64.h>
> +#include <linux/hdmi.h>
>
> MODULE_AUTHOR("Hans Verkuil");
> MODULE_DESCRIPTION("V4L2 DV Timings Helper Functions");
> @@ -814,3 +815,143 @@ struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait)
> return aspect;
> }
> EXPORT_SYMBOL_GPL(v4l2_calc_aspect_ratio);
> +
> +/** v4l2_hdmi_rx_colorimetry - determine HDMI colorimetry information
> + * based on various InfoFrames.
> + * @avi - the AVI InfoFrame
> + * @hdmi - the HDMI Vendor InfoFrame, may be NULL
> + * @height - the frame height
kernel-doc format for function parameters is like:
* @avi: the AVI InfoFrame
etc.
> + *
> + * Determines the HDMI colorimetry information, i.e. how the HDMI
> + * pixel color data should be interpreted.
> + *
> + * Note that some of the newer features (DCI-P3, HDR) are not yet
> + * implemented: the hdmi.h header needs to be updated to the HDMI 2.0
> + * and CTA-861-G standards.
> + */
> +struct v4l2_hdmi_colorimetry
> +v4l2_hdmi_rx_colorimetry(const struct hdmi_avi_infoframe *avi,
> + const struct hdmi_vendor_infoframe *hdmi,
> + unsigned int height)
> +{
thanks,
--
~Randy
Powered by blists - more mailing lists