* [PATCH v1] doc: media: Document MM21 tiled format
@ 2022-02-21 19:12 Nicolas Dufresne
2022-02-22 13:29 ` Ezequiel Garcia
0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Dufresne @ 2022-02-21 19:12 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: kernel, yunfei.dong, Nicolas Dufresne, linux-media, linux-kernel
MM21 has been documented through two software implementation [0] in libyuv and
[2] GStreamer. This format is similar to other tiled format, though it uses
uneven tile sizes. The luma tiles are 16x32 while the chroma tile have a
subsampled size of 16x16. This is the uncompressed cousin of V4L2_PIX_FMT_MT21C
and shares its tiling pattern and alignment.
[0] https://chromium.googlesource.com/libyuv/libyuv/+/b4ddbaf549a1bf5572bf703fd2862d1eb7380c6a
[1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/c9b127dae3af4b3fe78468e697cb491902425254
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
---
.../userspace-api/media/v4l/pixfmt-reserved.rst | 15 ++++-----------
.../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 6 ++++++
2 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
index 2f2133b4cd9ce..cabfa34b7db5a 100644
--- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
+++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
@@ -233,19 +233,12 @@ please make a proposal on the linux-media mailing list.
- ``V4L2_PIX_FMT_MT21C``
- 'MT21'
- - Compressed two-planar YVU420 format used by Mediatek MT8173.
- The compression is lossless.
- It is an opaque intermediate format and the MDP hardware must be
+ - Compressed two-planar YVU420 format used by Mediatek MT8173, MT8192,
+ MT8195 and more. The compression is lossless. This format have
+ similitude with ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling.
+ It remains an opaque intermediate format and the MDP hardware must be
used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``,
``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``.
- * .. _V4L2-PIX-FMT-MM21:
-
- - ``V4L2_PIX_FMT_MM21``
- - 'MM21'
- - Non-compressed, tiled two-planar format used by Mediatek MT8183.
- This is an opaque intermediate format and the MDP3 hardware can be
- used to convert it to other formats.
-
.. raw:: latex
\normalsize
diff --git a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
index 3a09d93d405b2..570791fbc5c8b 100644
--- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
+++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
@@ -296,6 +296,12 @@ 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
identical.
+``V4L2_PIX_FMT_MM21`` store luma pixel in 16x32 tiles, and chroma pixels
+in 16x16 tiles. The line stride must be aligned to a multiple of 16 and the
+image height must be aligned to a multiple of 32. The number of luma and chroma
+tiles are identical, even though the tile size differ. The image is formed of
+two non-contiguous planes.
+
.. _nv12mt:
.. kernel-figure:: nv12mt.svg
--
2.35.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH v1] doc: media: Document MM21 tiled format
2022-02-21 19:12 [PATCH v1] doc: media: Document MM21 tiled format Nicolas Dufresne
@ 2022-02-22 13:29 ` Ezequiel Garcia
0 siblings, 0 replies; 2+ messages in thread
From: Ezequiel Garcia @ 2022-02-22 13:29 UTC (permalink / raw)
To: Nicolas Dufresne
Cc: Mauro Carvalho Chehab, kernel, yunfei.dong, linux-media, linux-kernel
On Mon, Feb 21, 2022 at 02:12:01PM -0500, Nicolas Dufresne wrote:
> MM21 has been documented through two software implementation [0] in libyuv and
> [2] GStreamer. This format is similar to other tiled format, though it uses
> uneven tile sizes. The luma tiles are 16x32 while the chroma tile have a
> subsampled size of 16x16. This is the uncompressed cousin of V4L2_PIX_FMT_MT21C
> and shares its tiling pattern and alignment.
>
> [0] https://chromium.googlesource.com/libyuv/libyuv/+/b4ddbaf549a1bf5572bf703fd2862d1eb7380c6a
> [1] https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/c9b127dae3af4b3fe78468e697cb491902425254
>
> Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> ---
> .../userspace-api/media/v4l/pixfmt-reserved.rst | 15 ++++-----------
> .../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 6 ++++++
> 2 files changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> index 2f2133b4cd9ce..cabfa34b7db5a 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-reserved.rst
> @@ -233,19 +233,12 @@ please make a proposal on the linux-media mailing list.
>
> - ``V4L2_PIX_FMT_MT21C``
> - 'MT21'
> - - Compressed two-planar YVU420 format used by Mediatek MT8173.
> - The compression is lossless.
> - It is an opaque intermediate format and the MDP hardware must be
> + - Compressed two-planar YVU420 format used by Mediatek MT8173, MT8192,
> + MT8195 and more. The compression is lossless. This format have
> + similitude with ``V4L2_PIX_FMT_MM21`` in term of alignment and tiling.
> + It remains an opaque intermediate format and the MDP hardware must be
> used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``,
> ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``.
> - * .. _V4L2-PIX-FMT-MM21:
> -
> - - ``V4L2_PIX_FMT_MM21``
> - - 'MM21'
> - - Non-compressed, tiled two-planar format used by Mediatek MT8183.
> - This is an opaque intermediate format and the MDP3 hardware can be
> - used to convert it to other formats.
> -
> .. raw:: latex
>
> \normalsize
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> index 3a09d93d405b2..570791fbc5c8b 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> @@ -296,6 +296,12 @@ 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
> identical.
>
> +``V4L2_PIX_FMT_MM21`` store luma pixel in 16x32 tiles, and chroma pixels
> +in 16x16 tiles. The line stride must be aligned to a multiple of 16 and the
> +image height must be aligned to a multiple of 32. The number of luma and chroma
> +tiles are identical, even though the tile size differ. The image is formed of
> +two non-contiguous planes.
> +
> .. _nv12mt:
>
> .. kernel-figure:: nv12mt.svg
> --
> 2.35.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-22 13:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 19:12 [PATCH v1] doc: media: Document MM21 tiled format Nicolas Dufresne
2022-02-22 13:29 ` Ezequiel Garcia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®