Skip to content

Commit 324f34e

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

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
@@ -1333,6 +1333,13 @@ void video_closest_frmival(const struct device *dev, enum video_endpoint_id ep,
13331333
*/
13341334
#define VIDEO_PIX_FMT_UYVY VIDEO_FOURCC('U', 'Y', 'V', 'Y')
13351335

1336+
/**
1337+
* @code{.unparsed}
1338+
* | Yyyyyyyy Uuuuuuuu Vvvvvvvv | ...
1339+
* @endcode
1340+
*/
1341+
#define VIDEO_PIX_FMT_YUV24 VIDEO_FOURCC('Y', 'U', 'V', '3')
1342+
13361343
/**
13371344
* The first byte is empty (X) for each pixel.
13381345
*
@@ -1419,6 +1426,7 @@ static inline unsigned int video_bits_per_pixel(uint32_t pixfmt)
14191426
return 16;
14201427
case VIDEO_PIX_FMT_BGR24:
14211428
case VIDEO_PIX_FMT_RGB24:
1429+
case VIDEO_PIX_FMT_YUV24:
14221430
return 24;
14231431
case VIDEO_PIX_FMT_XRGB32:
14241432
case VIDEO_PIX_FMT_XYUV32:

0 commit comments

Comments
 (0)