Commit 78eee7b5 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab
Browse files

media: Rename V4L2_PIX_FMT_HM12 to V4L2_PIX_FMT_NV12_16L16



The V4L2_PIX_FMT_HM12 format is actually a simple NV12 tiled format,
with 16x16 linear tiles. Rename the format and move its documentation
together with the other tiled NV12 formats.

Keep V4L2_PIX_FMT_HM12 for application compatibility.

Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent b84f60a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ whatever). Otherwise the device numbers can get confusing. The ivtv
  Read-only

  The raw YUV video output from the current video input. The YUV format
  is non-standard (V4L2_PIX_FMT_HM12).
  is a 16x16 linear tiled NV12 format (V4L2_PIX_FMT_NV12_16L16)

  Note that the YUV and PCM streams are not synchronized, so they are of
  limited use.
+3 −5
Original line number Diff line number Diff line
@@ -7,9 +7,7 @@ Non-compressed file format
--------------------------

The cx23416 can produce (and the cx23415 can also read) raw YUV output. The
format of a YUV frame is specific to this chip and is called HM12. 'HM' stands
for 'Hauppauge Macroblock', which is a misnomer as 'Conexant Macroblock' would
be more accurate.
format of a YUV frame is 16x16 linear tiled NV12 (V4L2_PIX_FMT_NV12_16L16).

The format is YUV 4:2:0 which uses 1 Y byte per pixel and 1 U and V byte per
four pixels.
@@ -34,8 +32,8 @@ second line of 8 UV pairs of the top-left block, etc. After transmitting
this block the first line of the block on the right to the first block is
transmitted, etc.

The code below is given as an example on how to convert HM12 to separate
Y, U and V planes. This code assumes frames of 720x576 (PAL) pixels.
The code below is given as an example on how to convert V4L2_PIX_FMT_NV12_16L16
to separate Y, U and V planes. This code assumes frames of 720x576 (PAL) pixels.

The width of a frame is always 720 pixels, regardless of the actual specified
width.
+0 −8
Original line number Diff line number Diff line
@@ -48,14 +48,6 @@ please make a proposal on the linux-media mailing list.
      - ``V4L2_PIX_FMT_HI240``
      - 'HI24'
      - 8 bit RGB format used by the BTTV driver.
    * .. _V4L2-PIX-FMT-HM12:

      - ``V4L2_PIX_FMT_HM12``
      - 'HM12'
      - YUV 4:2:0 format used by the IVTV driver.

	The format is documented in the kernel sources in the file
	``Documentation/userspace-api/media/drivers/cx2341x-uapi.rst``
    * .. _V4L2-PIX-FMT-CPIA1:

      - ``V4L2_PIX_FMT_CPIA1``
+6 −0
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@ of the luma plane.

.. _V4L2-PIX-FMT-NV12MT:
.. _V4L2-PIX-FMT-NV12MT-16X16:
.. _V4L2-PIX-FMT-NV12-16L16:
.. _V4L2-PIX-FMT-NV12-32L32:

Tiled NV12
@@ -278,6 +279,11 @@ If the vertical resolution is an odd number of macroblocks, the last row of
macroblocks is stored in linear order. The layouts of the luma and chroma
planes are identical.

``V4L2_PIX_FMT_NV12_16L16`` stores pixel in 16x16 tiles, and stores
tiles linearly in memory. The line stride and image height must be
aligned to a multiple of 16. The layouts of the luma and chroma planes are
identical.

``V4L2_PIX_FMT_NV12_32L32`` stores pixel in 32x32 tiles, and stores
tiles linearly in memory. The line stride and image height must be
aligned to a multiple of 32. The layouts of the luma and chroma planes are
+1 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ replace define V4L2_CAP_IO_MC device-capabilities
# V4L2 pix flags
replace define V4L2_PIX_FMT_PRIV_MAGIC :c:type:`v4l2_pix_format`
replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA format-flags
replace define V4L2_PIX_FMT_HM12 :c:type:`v4l2_pix_format`
replace define V4L2_PIX_FMT_SUNXI_TILED_NV12 :c:type:`v4l2_pix_format`

# V4L2 format flags
Loading