]> www.infradead.org Git - users/dwmw2/linux.git/commit
media: v4l2: Add NV15 and NV20 pixel formats
authorJonas Karlman <jonas@kwiboo.se>
Tue, 25 Feb 2025 09:40:23 +0000 (10:40 +0100)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 8 Apr 2025 07:21:21 +0000 (07:21 +0000)
commitdcbe2aeda2e09eb69f5feba7e171db2836d9999d
tree2bc4a4eee94f83b10757a1d8195228f455d937f3
parent22f572ce4e7c7fa18f46a445d4270e6d5b5429f2
media: v4l2: Add NV15 and NV20 pixel formats

Add NV15 and NV20 pixel formats used by the Rockchip Video Decoder for
10-bit buffers.

NV15 and NV20 is 10-bit 4:2:0/4:2:2 semi-planar YUV formats similar to
NV12 and NV16, using 10-bit components with no padding between each
component. Instead, a group of 4 luminance/chrominance samples are
stored over 5 bytes in little endian order:

YYYY = UVUV = 4 * 10 bits = 40 bits = 5 bytes

The '15' and '20' suffix refers to the optimum effective bits per pixel
which is achieved when the total number of luminance samples is a
multiple of 8 for NV15 and 4 for NV20.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Tested-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Tested-by: Christopher Obbard <chris.obbard@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
drivers/media/v4l2-core/v4l2-common.c
drivers/media/v4l2-core/v4l2-ioctl.c
include/uapi/linux/videodev2.h