mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 02:36:21 +00:00
media: Add P010 tiled format
Add P010 tiled format [rebased, updated pixel format name and added description] Tested-by: Benjamin Gaignard <benjamin.gaignard@collabora.com> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
1fef11a2f4
commit
3c8e19d3d3
@ -116,6 +116,13 @@ All components are stored with the same number of bits per component.
|
|||||||
- Cb, Cr
|
- Cb, Cr
|
||||||
- Yes
|
- Yes
|
||||||
- Linear
|
- Linear
|
||||||
|
* - V4L2_PIX_FMT_P010_4L4
|
||||||
|
- 'T010'
|
||||||
|
- 10
|
||||||
|
- 4:2:0
|
||||||
|
- Cb, Cr
|
||||||
|
- Yes
|
||||||
|
- 4x4 tiles
|
||||||
* - V4L2_PIX_FMT_NV16
|
* - V4L2_PIX_FMT_NV16
|
||||||
- 'NV16'
|
- 'NV16'
|
||||||
- 8
|
- 8
|
||||||
@ -528,11 +535,12 @@ number of lines as the luma plane.
|
|||||||
- Cr\ :sub:`33`
|
- Cr\ :sub:`33`
|
||||||
|
|
||||||
.. _V4L2_PIX_FMT_P010:
|
.. _V4L2_PIX_FMT_P010:
|
||||||
|
.. _V4L2-PIX-FMT-P010-4L4:
|
||||||
|
|
||||||
P010
|
P010 and tiled P010
|
||||||
----
|
-------------------
|
||||||
|
|
||||||
Like NV12 with 10 bits per component, expanded to 16 bits.
|
P010 is like NV12 with 10 bits per component, expanded to 16 bits.
|
||||||
Data in the 10 high bits, zeros in the 6 low bits, arranged in little endian order.
|
Data in the 10 high bits, zeros in the 6 low bits, arranged in little endian order.
|
||||||
|
|
||||||
.. flat-table:: Sample 4x4 P010 Image
|
.. flat-table:: Sample 4x4 P010 Image
|
||||||
@ -589,6 +597,10 @@ relationship between the luma and chroma line padding and stride.
|
|||||||
|
|
||||||
All components are stored with the same number of bits per component.
|
All components are stored with the same number of bits per component.
|
||||||
|
|
||||||
|
``V4L2_PIX_FMT_P010_4L4`` stores pixels in 4x4 tiles, and stores tiles linearly
|
||||||
|
in memory. The line stride must be aligned to multiple of 8 and image height to
|
||||||
|
a multiple of 4. The layouts of the luma and chroma planes are identical.
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
\small
|
\small
|
||||||
|
@ -278,6 +278,7 @@ const struct v4l2_format_info *v4l2_format_info(u32 format)
|
|||||||
|
|
||||||
/* Tiled YUV formats */
|
/* Tiled YUV formats */
|
||||||
{ .format = V4L2_PIX_FMT_NV12_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 2 },
|
{ .format = V4L2_PIX_FMT_NV12_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 1, 2, 0, 0 }, .hdiv = 2, .vdiv = 2 },
|
||||||
|
{ .format = V4L2_PIX_FMT_P010_4L4, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 1, .comp_planes = 2, .bpp = { 2, 4, 0, 0 }, .hdiv = 2, .vdiv = 2 },
|
||||||
|
|
||||||
/* YUV planar formats, non contiguous variant */
|
/* YUV planar formats, non contiguous variant */
|
||||||
{ .format = V4L2_PIX_FMT_YUV420M, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 3, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 2, .vdiv = 2 },
|
{ .format = V4L2_PIX_FMT_YUV420M, .pixel_enc = V4L2_PIXEL_ENC_YUV, .mem_planes = 3, .comp_planes = 3, .bpp = { 1, 1, 1, 0 }, .hdiv = 2, .vdiv = 2 },
|
||||||
|
@ -1357,6 +1357,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
|
|||||||
case V4L2_PIX_FMT_NV12_4L4: descr = "Y/CbCr 4:2:0 (4x4 Linear)"; break;
|
case V4L2_PIX_FMT_NV12_4L4: descr = "Y/CbCr 4:2:0 (4x4 Linear)"; break;
|
||||||
case V4L2_PIX_FMT_NV12_16L16: descr = "Y/CbCr 4:2:0 (16x16 Linear)"; break;
|
case V4L2_PIX_FMT_NV12_16L16: descr = "Y/CbCr 4:2:0 (16x16 Linear)"; break;
|
||||||
case V4L2_PIX_FMT_NV12_32L32: descr = "Y/CbCr 4:2:0 (32x32 Linear)"; break;
|
case V4L2_PIX_FMT_NV12_32L32: descr = "Y/CbCr 4:2:0 (32x32 Linear)"; break;
|
||||||
|
case V4L2_PIX_FMT_P010_4L4: descr = "10-bit Y/CbCr 4:2:0 (4x4 Linear)"; break;
|
||||||
case V4L2_PIX_FMT_NV12M: descr = "Y/CbCr 4:2:0 (N-C)"; break;
|
case V4L2_PIX_FMT_NV12M: descr = "Y/CbCr 4:2:0 (N-C)"; break;
|
||||||
case V4L2_PIX_FMT_NV21M: descr = "Y/CrCb 4:2:0 (N-C)"; break;
|
case V4L2_PIX_FMT_NV21M: descr = "Y/CrCb 4:2:0 (N-C)"; break;
|
||||||
case V4L2_PIX_FMT_NV16M: descr = "Y/CbCr 4:2:2 (N-C)"; break;
|
case V4L2_PIX_FMT_NV16M: descr = "Y/CbCr 4:2:2 (N-C)"; break;
|
||||||
|
@ -654,6 +654,7 @@ struct v4l2_pix_format {
|
|||||||
#define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */
|
#define V4L2_PIX_FMT_NV12_4L4 v4l2_fourcc('V', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 4x4 tiles */
|
||||||
#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */
|
#define V4L2_PIX_FMT_NV12_16L16 v4l2_fourcc('H', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 tiles */
|
||||||
#define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */
|
#define V4L2_PIX_FMT_NV12_32L32 v4l2_fourcc('S', 'T', '1', '2') /* 12 Y/CbCr 4:2:0 32x32 tiles */
|
||||||
|
#define V4L2_PIX_FMT_P010_4L4 v4l2_fourcc('T', '0', '1', '0') /* 12 Y/CbCr 4:2:0 10-bit 4x4 macroblocks */
|
||||||
|
|
||||||
/* Tiled YUV formats, non contiguous planes */
|
/* Tiled YUV formats, non contiguous planes */
|
||||||
#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 tiles */
|
#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 tiles */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user