Skip to content

Commit 4cea4fa

Browse files
committed
video: add nv12 pixel format support
Add YUV420 semi-planar pixel format (NV12). Signed-off-by: Hugues Fruchet <[email protected]>
1 parent 51ca23b commit 4cea4fa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

include/zephyr/drivers/video.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,8 @@ int64_t video_get_csi_link_freq(const struct device *dev, uint8_t bpp, uint8_t l
15511551
*/
15521552
#define VIDEO_PIX_FMT_XYUV32 VIDEO_FOURCC('X', 'Y', 'U', 'V')
15531553

1554+
#define VIDEO_PIX_FMT_NV12 VIDEO_FOURCC('N', 'V', '1', '2')
1555+
15541556
/**
15551557
* @}
15561558
*/
@@ -1597,6 +1599,7 @@ static inline unsigned int video_bits_per_pixel(uint32_t pixfmt)
15971599
case VIDEO_PIX_FMT_SGRBG12P:
15981600
case VIDEO_PIX_FMT_SRGGB12P:
15991601
case VIDEO_PIX_FMT_Y12P:
1602+
case VIDEO_PIX_FMT_NV12:
16001603
return 12;
16011604
case VIDEO_PIX_FMT_SBGGR14P:
16021605
case VIDEO_PIX_FMT_SGBRG14P:

0 commit comments

Comments
 (0)