diff options
| author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2012-03-21 07:03:23 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-15 15:09:41 -0400 |
| commit | ad3b81faa1db60b2052f5f5a6ddae712f51b2dff (patch) | |
| tree | ed721580a611593488ecb0630abfda9156929b76 /include | |
| 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')
| -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 73f1e7eb60f3..e18eed4e5678 100644 --- a/include/media/soc_mediabus.h +++ b/include/media/soc_mediabus.h | |||
| @@ -47,6 +47,24 @@ enum soc_mbus_order { | |||
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| 50 | * enum soc_mbus_layout - planes layout in memory | ||
| 51 | * @SOC_MBUS_LAYOUT_PACKED: color components packed | ||
| 52 | * @SOC_MBUS_LAYOUT_PLANAR_2Y_U_V: YUV components stored in 3 planes (4:2:2) | ||
| 53 | * @SOC_MBUS_LAYOUT_PLANAR_2Y_C: YUV components stored in a luma and a | ||
| 54 | * chroma plane (C plane is half the size | ||
| 55 | * of Y plane) | ||
| 56 | * @SOC_MBUS_LAYOUT_PLANAR_Y_C: YUV components stored in a luma and a | ||
| 57 | * chroma plane (C plane is the same size | ||
| 58 | * as Y plane) | ||
| 59 | */ | ||
| 60 | enum soc_mbus_layout { | ||
| 61 | SOC_MBUS_LAYOUT_PACKED = 0, | ||
| 62 | SOC_MBUS_LAYOUT_PLANAR_2Y_U_V, | ||
| 63 | SOC_MBUS_LAYOUT_PLANAR_2Y_C, | ||
| 64 | SOC_MBUS_LAYOUT_PLANAR_Y_C, | ||
| 65 | }; | ||
| 66 | |||
| 67 | /** | ||
| 50 | * struct soc_mbus_pixelfmt - Data format on the media bus | 68 | * struct soc_mbus_pixelfmt - Data format on the media bus |
| 51 | * @name: Name of the format | 69 | * @name: Name of the format |
| 52 | * @fourcc: Fourcc code, that will be obtained if the data is | 70 | * @fourcc: Fourcc code, that will be obtained if the data is |
| @@ -60,6 +78,7 @@ struct soc_mbus_pixelfmt { | |||
| 60 | u32 fourcc; | 78 | u32 fourcc; |
| 61 | enum soc_mbus_packing packing; | 79 | enum soc_mbus_packing packing; |
| 62 | enum soc_mbus_order order; | 80 | enum soc_mbus_order order; |
| 81 | enum soc_mbus_layout layout; | ||
| 63 | u8 bits_per_sample; | 82 | u8 bits_per_sample; |
| 64 | }; | 83 | }; |
| 65 | 84 | ||
