Skip to content

Commit 1de34ea

Browse files
committed
drivers: video: add the RGB332 format
Introduce the RGB332 format following the Linux V4L2 naming and fourcc definition. Signed-off-by: Josuah Demangeon <[email protected]>
1 parent 324f34e commit 1de34ea

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

include/zephyr/drivers/video.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1211,6 +1211,13 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
12111211
* @{
12121212
*/
12131213

1214+
/**
1215+
* @code{.unparsed}
1216+
* | RrrGggBb | ...
1217+
* @endcode
1218+
*/
1219+
#define VIDEO_PIX_FMT_RGB332 VIDEO_FOURCC('R', 'G', 'B', '1')
1220+
12141221
/**
12151222
* 5 red bits [15:11], 6 green bits [10:5], 5 blue bits [4:0].
12161223
* This 16-bit integer is then packed in big endian format over two bytes:
@@ -1383,6 +1390,7 @@ static inline unsigned int video_bits_per_pixel(uint32_t pixfmt)
13831390
case VIDEO_PIX_FMT_GRBG8:
13841391
case VIDEO_PIX_FMT_RGGB8:
13851392
case VIDEO_PIX_FMT_GREY:
1393+
case VIDEO_PIX_FMT_RGB332:
13861394
return 8;
13871395
case VIDEO_PIX_FMT_SBGGR10P:
13881396
case VIDEO_PIX_FMT_SGBRG10P:

0 commit comments

Comments
 (0)