Skip to content

Commit 07a4138

Browse files
6by9popcornmix
authored andcommitted
docs: uapi: media: Document Raspberry Pi NV12 column format
The Raspberry Pi HEVC decoder uses a tiled format based on columns for 8 and 10 bit YUV images, so document them as NV12MT_COL128 and NV12MT_10_COL128. Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
1 parent 0f0fc08 commit 07a4138

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,6 +827,48 @@ Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian ord
827827
- Cb\ :sub:`11`
828828
- Cr\ :sub:`11`
829829

830+
V4L2_PIX_FMT_NV12MT_COL128 and V4L2_PIX_FMT_NV12MT_10_COL128
831+
------------------------------------------------------------
832+
833+
``V4L2_PIX_FMT_NV12MT_COL128`` is a tiled version of
834+
``V4L2_PIX_FMT_NV12M`` where the two planes are split into 128 byte wide columns
835+
of Y or interleaved CbCr.
836+
837+
V4L2_PIX_FMT_NV12MT_10_COL128 expands that as a 10 bit format where 3 10 bit
838+
values are packed into a 32bit word. A 128 byte wide column therefore holds 96
839+
samples (either Y or interleaved CrCb). That effectively makes it 6 values in a
840+
64 bit word for the CbCr plane, as the values always go in pairs.
841+
842+
Bit-packed representation.
843+
844+
.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2cm}|
845+
846+
.. flat-table::
847+
:header-rows: 0
848+
:stub-columns: 0
849+
:widths: 8 8 8 8
850+
851+
* - Y'\ :sub:`00[7:0]`
852+
- Y'\ :sub:`01[5:0] (bits 7--2)` Y'\ :sub:`00[9:8]`\ (bits 1--0)
853+
- Y'\ :sub:`02[3:0] (bits 7--4)` Y'\ :sub:`01[9:6]`\ (bits 3--0)
854+
- unused (bits 7--6)` Y'\ :sub:`02[9:4]`\ (bits 5--0)
855+
856+
.. tabularcolumns:: |p{1.2cm}||p{1.2cm}||p{1.2cm}||p{1.2cm}|p{3.2cm}|p{3.2cm}|
857+
858+
.. flat-table::
859+
:header-rows: 0
860+
:stub-columns: 0
861+
:widths: 12 12 12 12 12 12 12 12
862+
863+
* - Cb\ :sub:`00[7:0]`
864+
- Cr\ :sub:`00[5:0]`\ (bits 7--2) Cb\ :sub:`00[9:8]`\ (bits 1--0)
865+
- Cb\ :sub:`01[3:0]`\ (bits 7--4) Cr\ :sub:`00[9:6]`\ (bits 3--0)
866+
- unused (bits 7--6) Cb\ :sub:`02[9:4]`\ (bits 5--0)
867+
- Cr\ :sub:`01[7:0]`
868+
- Cb\ :sub:`02[5:0]`\ (bits 7--2) Cr\ :sub:`01[9:8]`\ (bits 1--0)
869+
- Cr\ :sub:`02[3:0]`\ (bits 7--4) Cb\ :sub:`02[9:6]`\ (bits 3--0)
870+
- unused (bits 7--6) Cr\ :sub:`02[9:4]`\ (bits 5--0)
871+
830872

831873
Fully Planar YUV Formats
832874
========================

0 commit comments

Comments
 (0)