diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-21 08:03:23 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-15 16:09:41 -0300 |
commit | ad3b81faa1db60b2052f5f5a6ddae712f51b2dff (patch) | |
tree | ed721580a611593488ecb0630abfda9156929b76 /include/media | |
parent | 1c0f95eec6d6c4cedfbead8eade7d879534da651 (diff) |
[media] soc-camera: Add plane layout information to struct soc_mbus_pixelfmt
To compute the value of the v4l2_pix_format::bytesperline field, we need
information about planes layout for planar formats. The new enum
soc_mbus_layout conveys that information.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/soc_mediabus.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/media/soc_mediabus.h b/include/media/soc_mediabus.h index 73f1e7eb60f..e18eed4e567 100644 --- a/include/media/soc_mediabus.h +++ b/include/media/soc_mediabus.h @@ -47,6 +47,24 @@ enum soc_mbus_order { }; /** + * enum soc_mbus_layout - planes layout in memory + * @SOC_MBUS_LAYOUT_PACKED: color components packed + * @SOC_MBUS_LAYOUT_PLANAR_2Y_U_V: YUV components stored in 3 planes (4:2:2) + * @SOC_MBUS_LAYOUT_PLANAR_2Y_C: YUV components stored in a luma and a + * chroma plane (C plane is half the size + * of Y plane) + * @SOC_MBUS_LAYOUT_PLANAR_Y_C: YUV components stored in a luma and a + * chroma plane (C plane is the same size + * as Y plane) + */ +enum soc_mbus_layout { + SOC_MBUS_LAYOUT_PACKED = 0, + SOC_MBUS_LAYOUT_PLANAR_2Y_U_V, + SOC_MBUS_LAYOUT_PLANAR_2Y_C, + SOC_MBUS_LAYOUT_PLANAR_Y_C, +}; + +/** * struct soc_mbus_pixelfmt - Data format on the media bus * @name: Name of the format * @fourcc: Fourcc code, that will be obtained if the data is @@ -60,6 +78,7 @@ struct soc_mbus_pixelfmt { u32 fourcc; enum soc_mbus_packing packing; enum soc_mbus_order order; + enum soc_mbus_layout layout; u8 bits_per_sample; }; |