diff options
| author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-05-27 09:12:43 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 11:44:47 -0400 |
| commit | c96fd46afb34a554406bce9784126b96ad09091e (patch) | |
| tree | 41da27a48407bbd8d8c50d72221ea7f2ad232754 /include/uapi/linux | |
| parent | d52e23813672c3c72f92e7b39c7408d4b9a40a96 (diff) | |
[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')
| -rw-r--r-- | include/uapi/linux/videodev2.h | 8 |
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 { | |||
| 288 | __u32 sizeimage; | 288 | __u32 sizeimage; |
| 289 | __u32 colorspace; /* enum v4l2_colorspace */ | 289 | __u32 colorspace; /* enum v4l2_colorspace */ |
| 290 | __u32 priv; /* private data, depends on pixelformat */ | 290 | __u32 priv; /* private data, depends on pixelformat */ |
| 291 | __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */ | ||
| 291 | }; | 292 | }; |
| 292 | 293 | ||
| 293 | /* Pixel format FOURCC depth Description */ | 294 | /* Pixel format FOURCC depth Description */ |
| @@ -452,6 +453,9 @@ struct v4l2_pix_format { | |||
| 452 | /* priv field value to indicates that subsequent fields are valid. */ | 453 | /* priv field value to indicates that subsequent fields are valid. */ |
| 453 | #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe | 454 | #define V4L2_PIX_FMT_PRIV_MAGIC 0xfeedcafe |
| 454 | 455 | ||
| 456 | /* Flags */ | ||
| 457 | #define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001 | ||
| 458 | |||
| 455 | /* | 459 | /* |
| 456 | * F O R M A T E N U M E R A T I O N | 460 | * F O R M A T E N U M E R A T I O N |
| 457 | */ | 461 | */ |
| @@ -1754,6 +1758,7 @@ struct v4l2_plane_pix_format { | |||
| 1754 | * @colorspace: enum v4l2_colorspace; supplemental to pixelformat | 1758 | * @colorspace: enum v4l2_colorspace; supplemental to pixelformat |
| 1755 | * @plane_fmt: per-plane information | 1759 | * @plane_fmt: per-plane information |
| 1756 | * @num_planes: number of planes for this format | 1760 | * @num_planes: number of planes for this format |
| 1761 | * @flags: format flags (V4L2_PIX_FMT_FLAG_*) | ||
| 1757 | */ | 1762 | */ |
| 1758 | struct v4l2_pix_format_mplane { | 1763 | struct v4l2_pix_format_mplane { |
| 1759 | __u32 width; | 1764 | __u32 width; |
| @@ -1764,7 +1769,8 @@ struct v4l2_pix_format_mplane { | |||
| 1764 | 1769 | ||
| 1765 | struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; | 1770 | struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES]; |
| 1766 | __u8 num_planes; | 1771 | __u8 num_planes; |
| 1767 | __u8 reserved[11]; | 1772 | __u8 flags; |
| 1773 | __u8 reserved[10]; | ||
| 1768 | } __attribute__ ((packed)); | 1774 | } __attribute__ ((packed)); |
| 1769 | 1775 | ||
| 1770 | /** | 1776 | /** |
