Skip to content

Commit 7c60dd0

Browse files
committed
drivers: video: formats: add grayscale formats
Add the grayscale formats in the same packing as defined by MIPI. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent 2229400 commit 7c60dd0

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

include/zephyr/drivers/video.h

+52
Original file line numberDiff line numberDiff line change
@@ -1005,6 +1005,58 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
10051005
*/
10061006
#define VIDEO_PIX_FMT_SRGGB14P VIDEO_FOURCC('p', 'R', 'E', 'E')
10071007

1008+
/**
1009+
* @}
1010+
*/
1011+
1012+
/**
1013+
* @name Grayscale formats
1014+
* Luminance (Y) channel only, in various bit depth and packing.
1015+
*
1016+
* When the format includes more than 8-bit per pixel, a strategy becomes needed to pack
1017+
* the bits over multiple bytes, as illustrated for each format.
1018+
*
1019+
* The number above the 'Y', 'y' are hints about which pixel number the following bits belong to.
1020+
*
1021+
* @{
1022+
*/
1023+
1024+
/**
1025+
* Same as Y8 (8-bit luma-only) following the standard FOURCC naming.
1026+
*
1027+
* @verbatim
1028+
* 0 1 2 3
1029+
* | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | ...
1030+
* @endverbatim
1031+
*/
1032+
#define VIDEO_PIX_FMT_GREY VIDEO_FOURCC('G', 'R', 'E', 'Y')
1033+
1034+
/**
1035+
* @verbatim
1036+
* 0 1 2 3 0 1 2 3
1037+
* | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | ...
1038+
* @endverbatim
1039+
*/
1040+
#define VIDEO_PIX_FMT_Y10P VIDEO_FOURCC('Y', '1', '0', 'P')
1041+
1042+
/**
1043+
* @verbatim
1044+
* 0 1 1 0 2 3 3 2
1045+
* | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | ...
1046+
* | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | ...
1047+
* @endverbatim
1048+
*/
1049+
#define VIDEO_PIX_FMT_Y12P VIDEO_FOURCC('Y', '1', '2', 'P')
1050+
1051+
/**
1052+
* @verbatim
1053+
* 0 1 2 3 1 0 2 1 3 2
1054+
* | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | yyyyyyyy | yyyyyyyy | ...
1055+
* | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | Yyyyyyyy | yyyyyyyy | yyyyyyyy | yyyyyyyy | ...
1056+
* @endverbatim
1057+
*/
1058+
#define VIDEO_PIX_FMT_Y14P VIDEO_FOURCC('Y', '1', '4', 'P')
1059+
10081060
/**
10091061
* @}
10101062
*/

0 commit comments

Comments
 (0)