All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Subject: [PATCHv3 2/9] v4l2-mediabus: improve colorspace support
Date: Mon,  1 Dec 2014 10:03:46 +0100	[thread overview]
Message-ID: <1417424633-15781-3-git-send-email-hverkuil@xs4all.nl> (raw)
In-Reply-To: <1417424633-15781-1-git-send-email-hverkuil@xs4all.nl>

From: Hans Verkuil <hans.verkuil@cisco.com>

Add and copy the new ycbcr_enc and quantization fields.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
---
 include/media/v4l2-mediabus.h      | 4 ++++
 include/uapi/linux/v4l2-mediabus.h | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 59d7397..38d960d 100644
--- a/include/media/v4l2-mediabus.h
+++ b/include/media/v4l2-mediabus.h
@@ -94,6 +94,8 @@ static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
 	pix_fmt->height = mbus_fmt->height;
 	pix_fmt->field = mbus_fmt->field;
 	pix_fmt->colorspace = mbus_fmt->colorspace;
+	pix_fmt->ycbcr_enc = mbus_fmt->ycbcr_enc;
+	pix_fmt->quantization = mbus_fmt->quantization;
 }
 
 static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
@@ -104,6 +106,8 @@ static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
 	mbus_fmt->height = pix_fmt->height;
 	mbus_fmt->field = pix_fmt->field;
 	mbus_fmt->colorspace = pix_fmt->colorspace;
+	mbus_fmt->ycbcr_enc = pix_fmt->ycbcr_enc;
+	mbus_fmt->quantization = pix_fmt->quantization;
 	mbus_fmt->code = code;
 }
 
diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h
index b1934a3..5a86d8e 100644
--- a/include/uapi/linux/v4l2-mediabus.h
+++ b/include/uapi/linux/v4l2-mediabus.h
@@ -22,6 +22,8 @@
  * @code:	data format code (from enum v4l2_mbus_pixelcode)
  * @field:	used interlacing type (from enum v4l2_field)
  * @colorspace:	colorspace of the data (from enum v4l2_colorspace)
+ * @ycbcr_enc:	YCbCr encoding of the data (from enum v4l2_ycbcr_encoding)
+ * @quantization: quantization of the data (from enum v4l2_quantization)
  */
 struct v4l2_mbus_framefmt {
 	__u32			width;
@@ -29,7 +31,9 @@ struct v4l2_mbus_framefmt {
 	__u32			code;
 	__u32			field;
 	__u32			colorspace;
-	__u32			reserved[7];
+	__u32			ycbcr_enc;
+	__u32			quantization;
+	__u32			reserved[5];
 };
 
 #ifndef __KERNEL__
-- 
2.1.3


  parent reply	other threads:[~2014-12-01  9:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01  9:03 [PATCHv3 0/9] Improve colorspace support Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 1/9] videodev2.h: improve " Hans Verkuil
2014-12-01  9:03 ` Hans Verkuil [this message]
2014-12-03  0:16   ` [PATCHv3 2/9] v4l2-mediabus: " Sakari Ailus
2014-12-03  7:28     ` Hans Verkuil
2014-12-03 10:22       ` Sakari Ailus
2014-12-01  9:03 ` [PATCHv3 3/9] v4l2-ioctl.c: log the new ycbcr_enc and quantization fields Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 4/9] DocBook media: rewrite the Colorspace chapter Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 5/9] vivid-tpg-colors: add AdobeRGB and BT.2020 support Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 6/9] vivid-tpg: improve colorspace support Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 7/9] vivid: add new colorspaces Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 8/9] vivid: add support for YCbCr encoding and quantization Hans Verkuil
2014-12-01  9:03 ` [PATCHv3 9/9] adv7511: improve colorspace handling Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1417424633-15781-3-git-send-email-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=hans.verkuil@cisco.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.