summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-11-17 09:10:33 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-12-01 15:34:55 -0200
commit11ff030c73655ecd7b153c6bd00d26d27e6cc199 (patch)
tree93043fe01401bf417a7c17d343e912034d7b4607
parentd5735d64e1cebb3748e64f926fa7c35ffabd7afa (diff)
downloadblackbird-op-linux-11ff030c73655ecd7b153c6bd00d26d27e6cc199.tar.gz
blackbird-op-linux-11ff030c73655ecd7b153c6bd00d26d27e6cc199.zip
[media] v4l2-mediabus: improve colorspace support
Add and copy the new ycbcr_enc and quantization fields. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
-rw-r--r--include/media/v4l2-mediabus.h4
-rw-r--r--include/uapi/linux/v4l2-mediabus.h6
2 files changed, 9 insertions, 1 deletions
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h
index 59d7397fb0ea..38d960d8dccd 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 b1934a3961e4..5a86d8ede09c 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__
OpenPOWER on IntegriCloud