summaryrefslogtreecommitdiff
path: root/include/media/v4l2-dv-timings.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2018-02-15 20:55:29 +0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-02-22 20:41:09 +0300
commit357a856a6ceba0fac54623aef483ca99906c4747 (patch)
treef2b3ba5d63ba9e3f61d2bdea3a46c318791fe1e1 /include/media/v4l2-dv-timings.h
parentbd2a0f082b0cc7bab0104d83a15e36a5b29de54f (diff)
downloadlinux-357a856a6ceba0fac54623aef483ca99906c4747.tar.xz
media: v4l2-dv-timings: add v4l2_hdmi_colorimetry()
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@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media/v4l2-dv-timings.h')
-rw-r--r--include/media/v4l2-dv-timings.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/media/v4l2-dv-timings.h b/include/media/v4l2-dv-timings.h
index 8778263a8f5d..17cb27df1b81 100644
--- a/include/media/v4l2-dv-timings.h
+++ b/include/media/v4l2-dv-timings.h
@@ -212,5 +212,26 @@ static inline bool can_reduce_fps(struct v4l2_bt_timings *bt)
return false;
}
+/**
+ * struct v4l2_hdmi_rx_colorimetry - describes the HDMI colorimetry information
+ * @colorspace: enum v4l2_colorspace, the colorspace
+ * @ycbcr_enc: enum v4l2_ycbcr_encoding, Y'CbCr encoding
+ * @quantization: enum v4l2_quantization, colorspace quantization
+ * @xfer_func: enum v4l2_xfer_func, colorspace transfer function
+ */
+struct v4l2_hdmi_colorimetry {
+ enum v4l2_colorspace colorspace;
+ enum v4l2_ycbcr_encoding ycbcr_enc;
+ enum v4l2_quantization quantization;
+ enum v4l2_xfer_func xfer_func;
+};
+
+struct hdmi_avi_infoframe;
+struct hdmi_vendor_infoframe;
+
+struct v4l2_hdmi_colorimetry
+v4l2_hdmi_rx_colorimetry(const struct hdmi_avi_infoframe *avi,
+ const struct hdmi_vendor_infoframe *hdmi,
+ unsigned int height);
#endif