aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/videodev2.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2014-05-27 10:12:43 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 12:44:47 -0300
commitc96fd46afb34a554406bce9784126b96ad09091e (patch)
tree41da27a48407bbd8d8c50d72221ea7f2ad232754 /include/uapi/linux/videodev2.h
parent[media] v4l: Support extending the v4l2_pix_format structure (diff)
downloadlinux-dev-c96fd46afb34a554406bce9784126b96ad09091e.tar.xz
linux-dev-c96fd46afb34a554406bce9784126b96ad09091e.zip
[media] v4l: Add premultiplied alpha flag for pixel formats
When set, the new V4L2_PIX_FMT_FLAG_PREMUL_ALPHA flag indicates that the pixel values are premultiplied by the alpha channel value. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/uapi/linux/videodev2.h')
-rw-r--r--include/uapi/linux/videodev2.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index eb3bdd33816b..b73e8cda7192 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -288,6 +288,7 @@ struct v4l2_pix_format {
__u32 sizeimage;
__u32 colorspace; /* enum v4l2_colorspace */
__u32 priv; /* private data, depends on pixelformat */
+ __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */
};
/* Pixel format FOURCC depth Description */
@@ -452,6 +453,9 @@ struct v4l2_pix_format {
/* priv field value to indicates that subsequent fields are valid. */
#define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe
+/* Flags */
+#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001
+
/*
* F O R M A T E N U M E R A T I O N
*/
@@ -1754,6 +1758,7 @@ struct v4l2_plane_pix_format {
* @colorspace: enum v4l2_colorspace; supplemental to pixelformat
* @plane_fmt: per-plane information
* @num_planes: number of planes for this format
+ * @flags: format flags (V4L2_PIX_FMT_FLAG_*)
*/
struct v4l2_pix_format_mplane {
__u32 width;
@@ -1764,7 +1769,8 @@ struct v4l2_pix_format_mplane {
struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
__u8 num_planes;
- __u8 reserved[11];
+ __u8 flags;
+ __u8 reserved[10];
} __attribute__ ((packed));
/**