Commit af4f4505 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

media: doc: pixfmt-yuv: Move all luma-only YUV formats to common file

Luma-only pixel formats are documented in separate files. This
duplicates information, as those formats share comon traits. Consolidate
them in a single file and describe them in a single table.
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 4bfc1688
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-GREY:
**************************
V4L2_PIX_FMT_GREY ('GREY')
**************************
Grey-scale image
Description
===========
This is a grey-scale image. It is really a degenerate Y'CbCr format
which simply contains no Cb or Cr data.
**Byte Order.**
Each cell is one byte.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - start + 0:
- Y'\ :sub:`00`
- Y'\ :sub:`01`
- Y'\ :sub:`02`
- Y'\ :sub:`03`
* - start + 4:
- Y'\ :sub:`10`
- Y'\ :sub:`11`
- Y'\ :sub:`12`
- Y'\ :sub:`13`
* - start + 8:
- Y'\ :sub:`20`
- Y'\ :sub:`21`
- Y'\ :sub:`22`
- Y'\ :sub:`23`
* - start + 12:
- Y'\ :sub:`30`
- Y'\ :sub:`31`
- Y'\ :sub:`32`
- Y'\ :sub:`33`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y10:
*************************
V4L2_PIX_FMT_Y10 ('Y10 ')
*************************
Grey-scale image
Description
===========
This is a grey-scale image with a depth of 10 bits per pixel. Pixels are
stored in 16-bit words with unused high bits padded with 0. The least
significant byte is stored at lower memory addresses (little-endian).
**Byte Order.**
Each cell is one byte.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - start + 0:
- Y'\ :sub:`00low`
- Y'\ :sub:`00high`
- Y'\ :sub:`01low`
- Y'\ :sub:`01high`
- Y'\ :sub:`02low`
- Y'\ :sub:`02high`
- Y'\ :sub:`03low`
- Y'\ :sub:`03high`
* - start + 8:
- Y'\ :sub:`10low`
- Y'\ :sub:`10high`
- Y'\ :sub:`11low`
- Y'\ :sub:`11high`
- Y'\ :sub:`12low`
- Y'\ :sub:`12high`
- Y'\ :sub:`13low`
- Y'\ :sub:`13high`
* - start + 16:
- Y'\ :sub:`20low`
- Y'\ :sub:`20high`
- Y'\ :sub:`21low`
- Y'\ :sub:`21high`
- Y'\ :sub:`22low`
- Y'\ :sub:`22high`
- Y'\ :sub:`23low`
- Y'\ :sub:`23high`
* - start + 24:
- Y'\ :sub:`30low`
- Y'\ :sub:`30high`
- Y'\ :sub:`31low`
- Y'\ :sub:`31high`
- Y'\ :sub:`32low`
- Y'\ :sub:`32high`
- Y'\ :sub:`33low`
- Y'\ :sub:`33high`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y10BPACK:
******************************
V4L2_PIX_FMT_Y10BPACK ('Y10B')
******************************
Grey-scale image as a bit-packed array
Description
===========
This is a packed grey-scale image format with a depth of 10 bits per
pixel. Pixels are stored in a bit-packed array of 10bit bits per pixel,
with no padding between them and with the most significant bits coming
first from the left.
**Bit-packed representation.**
pixels cross the byte boundary and have a ratio of 5 bytes for each 4
pixels.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - Y'\ :sub:`00[9:2]`
- Y'\ :sub:`00[1:0]`\ Y'\ :sub:`01[9:4]`
- Y'\ :sub:`01[3:0]`\ Y'\ :sub:`02[9:6]`
- Y'\ :sub:`02[5:0]`\ Y'\ :sub:`03[9:8]`
- Y'\ :sub:`03[7:0]`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y10P:
******************************
V4L2_PIX_FMT_Y10P ('Y10P')
******************************
Grey-scale image as a MIPI RAW10 packed array
Description
===========
This is a packed grey-scale image format with a depth of 10 bits per
pixel. Every four consecutive pixels are packed into 5 bytes. Each of
the first 4 bytes contain the 8 high order bits of the pixels, and
the 5th byte contains the 2 least significants bits of each pixel,
in the same order.
**Bit-packed representation.**
.. raw:: latex
\small
.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2cm}|
.. flat-table::
:header-rows: 0
:stub-columns: 0
:widths: 8 8 8 8 64
* - Y'\ :sub:`00[9:2]`
- Y'\ :sub:`01[9:2]`
- Y'\ :sub:`02[9:2]`
- Y'\ :sub:`03[9:2]`
- Y'\ :sub:`03[1:0]`\ (bits 7--6) Y'\ :sub:`02[1:0]`\ (bits 5--4)
Y'\ :sub:`01[1:0]`\ (bits 3--2) Y'\ :sub:`00[1:0]`\ (bits 1--0)
.. raw:: latex
\normalsize
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y12:
*************************
V4L2_PIX_FMT_Y12 ('Y12 ')
*************************
Grey-scale image
Description
===========
This is a grey-scale image with a depth of 12 bits per pixel. Pixels are
stored in 16-bit words with unused high bits padded with 0. The least
significant byte is stored at lower memory addresses (little-endian).
**Byte Order.**
Each cell is one byte.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - start + 0:
- Y'\ :sub:`00low`
- Y'\ :sub:`00high`
- Y'\ :sub:`01low`
- Y'\ :sub:`01high`
- Y'\ :sub:`02low`
- Y'\ :sub:`02high`
- Y'\ :sub:`03low`
- Y'\ :sub:`03high`
* - start + 8:
- Y'\ :sub:`10low`
- Y'\ :sub:`10high`
- Y'\ :sub:`11low`
- Y'\ :sub:`11high`
- Y'\ :sub:`12low`
- Y'\ :sub:`12high`
- Y'\ :sub:`13low`
- Y'\ :sub:`13high`
* - start + 16:
- Y'\ :sub:`20low`
- Y'\ :sub:`20high`
- Y'\ :sub:`21low`
- Y'\ :sub:`21high`
- Y'\ :sub:`22low`
- Y'\ :sub:`22high`
- Y'\ :sub:`23low`
- Y'\ :sub:`23high`
* - start + 24:
- Y'\ :sub:`30low`
- Y'\ :sub:`30high`
- Y'\ :sub:`31low`
- Y'\ :sub:`31high`
- Y'\ :sub:`32low`
- Y'\ :sub:`32high`
- Y'\ :sub:`33low`
- Y'\ :sub:`33high`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y14:
*************************
V4L2_PIX_FMT_Y14 ('Y14 ')
*************************
Grey-scale image
Description
===========
This is a grey-scale image with a depth of 14 bits per pixel. Pixels are
stored in 16-bit words with unused high bits padded with 0. The least
significant byte is stored at lower memory addresses (little-endian).
**Byte Order.**
Each cell is one byte.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - start + 0:
- Y'\ :sub:`00low`
- Y'\ :sub:`00high`
- Y'\ :sub:`01low`
- Y'\ :sub:`01high`
- Y'\ :sub:`02low`
- Y'\ :sub:`02high`
- Y'\ :sub:`03low`
- Y'\ :sub:`03high`
* - start + 8:
- Y'\ :sub:`10low`
- Y'\ :sub:`10high`
- Y'\ :sub:`11low`
- Y'\ :sub:`11high`
- Y'\ :sub:`12low`
- Y'\ :sub:`12high`
- Y'\ :sub:`13low`
- Y'\ :sub:`13high`
* - start + 16:
- Y'\ :sub:`20low`
- Y'\ :sub:`20high`
- Y'\ :sub:`21low`
- Y'\ :sub:`21high`
- Y'\ :sub:`22low`
- Y'\ :sub:`22high`
- Y'\ :sub:`23low`
- Y'\ :sub:`23high`
* - start + 24:
- Y'\ :sub:`30low`
- Y'\ :sub:`30high`
- Y'\ :sub:`31low`
- Y'\ :sub:`31high`
- Y'\ :sub:`32low`
- Y'\ :sub:`32high`
- Y'\ :sub:`33low`
- Y'\ :sub:`33high`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y16-BE:
****************************************
V4L2_PIX_FMT_Y16_BE ('Y16 ' | (1 << 31))
****************************************
Grey-scale image
Description
===========
This is a grey-scale image with a depth of 16 bits per pixel. The most
significant byte is stored at lower memory addresses (big-endian).
.. note::
The actual sampling precision may be lower than 16 bits, for
example 10 bits per pixel with values in range 0 to 1023.
**Byte Order.**
Each cell is one byte.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - start + 0:
- Y'\ :sub:`00high`
- Y'\ :sub:`00low`
- Y'\ :sub:`01high`
- Y'\ :sub:`01low`
- Y'\ :sub:`02high`
- Y'\ :sub:`02low`
- Y'\ :sub:`03high`
- Y'\ :sub:`03low`
* - start + 8:
- Y'\ :sub:`10high`
- Y'\ :sub:`10low`
- Y'\ :sub:`11high`
- Y'\ :sub:`11low`
- Y'\ :sub:`12high`
- Y'\ :sub:`12low`
- Y'\ :sub:`13high`
- Y'\ :sub:`13low`
* - start + 16:
- Y'\ :sub:`20high`
- Y'\ :sub:`20low`
- Y'\ :sub:`21high`
- Y'\ :sub:`21low`
- Y'\ :sub:`22high`
- Y'\ :sub:`22low`
- Y'\ :sub:`23high`
- Y'\ :sub:`23low`
* - start + 24:
- Y'\ :sub:`30high`
- Y'\ :sub:`30low`
- Y'\ :sub:`31high`
- Y'\ :sub:`31low`
- Y'\ :sub:`32high`
- Y'\ :sub:`32low`
- Y'\ :sub:`33high`
- Y'\ :sub:`33low`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _V4L2-PIX-FMT-Y16:
*************************
V4L2_PIX_FMT_Y16 ('Y16 ')
*************************
Grey-scale image
Description
===========
This is a grey-scale image with a depth of 16 bits per pixel. The least
significant byte is stored at lower memory addresses (little-endian).
.. note::
The actual sampling precision may be lower than 16 bits, for
example 10 bits per pixel with values in range 0 to 1023.
**Byte Order.**
Each cell is one byte.
.. flat-table::
:header-rows: 0
:stub-columns: 0
* - start + 0:
- Y'\ :sub:`00low`
- Y'\ :sub:`00high`
- Y'\ :sub:`01low`
- Y'\ :sub:`01high`
- Y'\ :sub:`02low`
- Y'\ :sub:`02high`
- Y'\ :sub:`03low`
- Y'\ :sub:`03high`
* - start + 8:
- Y'\ :sub:`10low`
- Y'\ :sub:`10high`
- Y'\ :sub:`11low`
- Y'\ :sub:`11high`
- Y'\ :sub:`12low`
- Y'\ :sub:`12high`
- Y'\ :sub:`13low`
- Y'\ :sub:`13high`
* - start + 16:
- Y'\ :sub:`20low`
- Y'\ :sub:`20high`
- Y'\ :sub:`21low`
- Y'\ :sub:`21high`
- Y'\ :sub:`22low`
- Y'\ :sub:`22high`
- Y'\ :sub:`23low`
- Y'\ :sub:`23high`
* - start + 24:
- Y'\ :sub:`30low`
- Y'\ :sub:`30high`
- Y'\ :sub:`31low`
- Y'\ :sub:`31high`
- Y'\ :sub:`32low`
- Y'\ :sub:`32high`
- Y'\ :sub:`33low`
- Y'\ :sub:`33high`
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _yuv-luma-only:
*****************
Luma-Only Formats
*****************
This family of formats only store the luma component of a Y'CbCr image. They
are often referred to as greyscale formats.
.. note::
- In all the tables that follow, bit 7 is the most significant bit in a byte.
- Formats are described with the minimum number of pixels needed to create a
byte-aligned repeating pattern. `...` indicates repetition of the pattern.
- Y'\ :sub:`x`\ [9:2] denotes bits 9 to 2 of the Y' value for pixel at colum
`x`.
- `0` denotes padding bits set to 0.
.. flat-table:: Luma-Only Image Formats
:header-rows: 1
:stub-columns: 0
* - Identifier
- Code
- Byte 0
- Byte 1
- Byte 2
- Byte 3
- Byte 4
* .. _V4L2-PIX-FMT-GREY:
- ``V4L2_PIX_FMT_GREY``
- 'GREY'
- Y'\ :sub:`0`\ [7:0]
- ...
- ...
- ...
- ...
* .. _V4L2-PIX-FMT-Y10:
- ``V4L2_PIX_FMT_Y10``
- 'Y10 '
- Y'\ :sub:`0`\ [7:0]
- `000000` Y'\ :sub:`0`\ [9:8]
- ...
- ...
- ...
* .. _V4L2-PIX-FMT-Y10BPACK:
- ``V4L2_PIX_FMT_Y10BPACK``
- 'Y10B'
- Y'\ :sub:`0`\ [9:2]
- Y'\ :sub:`0`\ [1:0] Y'\ :sub:`1`\ [9:4]
- Y'\ :sub:`1`\ [3:0] Y'\ :sub:`2`\ [9:6]
- Y'\ :sub:`2`\ [5:0] Y'\ :sub:`3`\ [9:8]
- Y'\ :sub:`3`\ [7:0]
* .. _V4L2-PIX-FMT-Y10P:
- ``V4L2_PIX_FMT_Y10P``
- 'Y10P'
- Y'\ :sub:`0`\ [7:0]
- Y'\ :sub:`1`\ [9:8]
- Y'\ :sub:`2`\ [9:2]
- Y'\ :sub:`3`\ [9:2]
- Y'\ :sub:`3`\ [1:0] Y'\ :sub:`2`\ [1:0] Y'\ :sub:`1`\ [1:0] Y'\ :sub:`0`\ [1:0]
* .. _V4L2-PIX-FMT-Y12:
- ``V4L2_PIX_FMT_Y12``
- 'Y12 '
- Y'\ :sub:`0`\ [7:0]
- `0000` Y'\ :sub:`0`\ [11:8]
- ...
- ...
- ...
* .. _V4L2-PIX-FMT-Y14:
- ``V4L2_PIX_FMT_Y14``
- 'Y14 '
- Y'\ :sub:`0`\ [7:0]
- `00` Y'\ :sub:`0`\ [13:8]
- ...
- ...
- ...
* .. _V4L2-PIX-FMT-Y16:
- ``V4L2_PIX_FMT_Y16``
- 'Y16 '
- Y'\ :sub:`0`\ [7:0]
- Y'\ :sub:`0`\ [15:8]
- ...
- ...
- ...
* .. _V4L2-PIX-FMT-Y16-BE:
- ``V4L2_PIX_FMT_Y16_BE``
- 'Y16 ' | (1U << 31)
- Y'\ :sub:`0`\ [15:8]
- Y'\ :sub:`0`\ [7:0]
- ...
- ...
- ...
.. note::
For the Y16 and Y16_BE formats, the actual sampling precision may be lower
than 16 bits. For example, 10 bits per pixel uses values in the range 0 to
1023.
...@@ -265,14 +265,7 @@ image. ...@@ -265,14 +265,7 @@ image.
:maxdepth: 1 :maxdepth: 1
pixfmt-packed-yuv pixfmt-packed-yuv
pixfmt-grey pixfmt-yuv-luma
pixfmt-y10
pixfmt-y12
pixfmt-y14
pixfmt-y10b
pixfmt-y10p
pixfmt-y16
pixfmt-y16-be
pixfmt-y8i pixfmt-y8i
pixfmt-y12i pixfmt-y12i
pixfmt-uv8 pixfmt-uv8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment