History

media: Add NV15_4L4 pixel format

NV15_4L4 is the 10-bits per component 4x4 tiled format.

Benjamin Gaignard committed 3 years ago

Commit fc91af01 parent 86c256b4 files · +20 −0Browse files

Unified · Split

4 files
  1. Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst +16 −0
  2. drivers/media/v4l2-core/v4l2-common.c +2 −0
  3. drivers/media/v4l2-core/v4l2-ioctl.c +1 −0
  4. include/uapi/linux/videodev2.h +1 −0
Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst+16−0
@@ -137,6 +137,13 @@ All components are stored with the same number of bits per component. · 136 unmodified lines
137 - Cb, Cr137 - Cb, Cr
138 - No138 - No
139 - Linear139 - Linear
140 * - V4L2_PIX_FMT_NV15_4L4
141 - 'VT15'
142 - 15
143 - 4:2:0
144 - Cb, Cr
145 - Yes
146 - 4x4 tiles
140 * - V4L2_PIX_FMT_NV16147 * - V4L2_PIX_FMT_NV16
141 - 'NV16'148 - 'NV16'
142 - 8149 - 8
@@ -378,6 +385,15 @@ two non-contiguous planes. · 235 unmodified lines
378 385
379 Example V4L2_PIX_FMT_NV12MT memory layout of tiles386 Example V4L2_PIX_FMT_NV12MT memory layout of tiles
380 387
388.. _V4L2-PIX-FMT-NV15-4L4:
389
390Tiled NV15
391----------
392
393Semi-planar 10-bit YUV 4:2:0 formats, using 4x4 tiling.
394All components are packed without any padding between each other.
395As a side-effect, each group of 4 components are stored over 5 bytes
396(YYYY or UVUV = 4 * 10 bits = 40 bits = 5 bytes).
381 397
382.. _V4L2-PIX-FMT-NV16:398.. _V4L2-PIX-FMT-NV16:
383.. _V4L2-PIX-FMT-NV61:399.. _V4L2-PIX-FMT-NV61:
drivers/media/v4l2-core/v4l2-common.c+2−0
@@ -283,6 +283,8 @@ const struct v4l2_format_info *v4l2_format_info(u32 format) · 282 unmodified lines
283 283
284 /* Tiled YUV formats */284 /* Tiled YUV formats */
285 { .format = V4L2_PIX_FMT_NV12_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },285 { .format = V4L2_PIX_FMT_NV12_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },
286 { .format = V4L2_PIX_FMT_NV15_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 5, 10, 0, 0 }, .bpp_div = { 4, 4, 1, 1 }, .hdiv = 2, .vdiv = 2,
287 .block_w = { 4, 2, 0, 0 }, .block_h = { 1, 1, 0, 0 }},
286 { .format = V4L2_PIX_FMT_P010_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 4, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },288 { .format = V4L2_PIX_FMT_P010_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 4, 0, 0 }, .bpp_div = { 1, 1, 1, 1 }, .hdiv = 2, .vdiv = 2 },
287 289
288 /* YUV planar formats, non contiguous variant */290 /* YUV planar formats, non contiguous variant */
drivers/media/v4l2-core/v4l2-ioctl.c+1−0
@@ -1356,6 +1356,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt) · 1355 unmodified lines
1356 case V4L2_PIX_FMT_NV12_4L4: descr = "Y/UV 4:2:0 (4x4 Linear)"; break;1356 case V4L2_PIX_FMT_NV12_4L4: descr = "Y/UV 4:2:0 (4x4 Linear)"; break;
1357 case V4L2_PIX_FMT_NV12_16L16: descr = "Y/UV 4:2:0 (16x16 Linear)"; break;1357 case V4L2_PIX_FMT_NV12_16L16: descr = "Y/UV 4:2:0 (16x16 Linear)"; break;
1358 case V4L2_PIX_FMT_NV12_32L32: descr = "Y/UV 4:2:0 (32x32 Linear)"; break;1358 case V4L2_PIX_FMT_NV12_32L32: descr = "Y/UV 4:2:0 (32x32 Linear)"; break;
1359 case V4L2_PIX_FMT_NV15_4L4: descr = "10-bit Y/UV 4:2:0 (4x4 Linear)"; break;
1359 case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/UV 4:2:0 (4x4 Linear)"; break;1360 case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/UV 4:2:0 (4x4 Linear)"; break;
1360 case V4L2_PIX_FMT_NV12M: descr = "Y/UV 4:2:0 (N-C)"; break;1361 case V4L2_PIX_FMT_NV12M: descr = "Y/UV 4:2:0 (N-C)"; break;
1361 case V4L2_PIX_FMT_NV21M: descr = "Y/VU 4:2:0 (N-C)"; break;1362 case V4L2_PIX_FMT_NV21M: descr = "Y/VU 4:2:0 (N-C)"; break;
include/uapi/linux/videodev2.h+1−0
@@ -672,6 +672,7 @@ struct v4l2_pix_format { · 671 unmodified lines
672#define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */672#define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */
673#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */673#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */
674#define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */674#define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */
675#define V4L2_PIX_FMT_NV15_4L4 v4l2_fourcc('V', 'T', '1', '5') /* 15 Y/CbCr 4:2:0 10-bit 4x4 tiles */
675#define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macroblocks */676#define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macroblocks */
676#define V4L2_PIX_FMT_NV12_8L128 v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */677#define V4L2_PIX_FMT_NV12_8L128 v4l2_fourcc('A', 'T', '1', '2') /* Y/CbCr 4:2:0 8x128 tiles */
677#define V4L2_PIX_FMT_NV12_10BE_8L128 v4l2_fourcc_be('A', 'X', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */678#define V4L2_PIX_FMT_NV12_10BE_8L128 v4l2_fourcc_be('A', 'X', '1', '2') /* Y/CbCr 4:2:0 10-bit 8x128 tiles */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t