From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <florian.fainelli@broadcom.com>,
Broadcom internal kernel review list
<bcm-kernel-feedback-list@broadcom.com>,
John Cox <john.cox@raspberrypi.com>,
Dom Cobley <dom@raspberrypi.com>,
review list <kernel-list@raspberrypi.com>,
Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>,
John Cox <jc@kynesim.co.uk>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/7] docs: uapi: media: Document Raspberry Pi NV12 column format
Date: Wed, 8 Jan 2025 08:09:09 +0000 [thread overview]
Message-ID: <Z34ypbE2mNp1tC5V@kekkonen.localdomain> (raw)
In-Reply-To: <20241220-media-rpi-hevc-dec-v1-2-0ebcc04ed42e@raspberrypi.com>
Hi Dave,
Thanks for the set.
On Fri, Dec 20, 2024 at 04:21:13PM +0000, Dave Stevenson wrote:
> 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>
> ---
> .../userspace-api/media/v4l/pixfmt-yuv-planar.rst | 42 ++++++++++++++++++++++
> 1 file changed, 42 insertions(+)
>
> diff --git a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> index b788f6933855..90414491d7b5 100644
> --- a/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> +++ b/Documentation/userspace-api/media/v4l/pixfmt-yuv-planar.rst
> @@ -827,6 +827,48 @@ Data in the 12 high bits, zeros in the 4 low bits, arranged in little endian ord
> - Cb\ :sub:`11`
> - Cr\ :sub:`11`
>
> +NV12MT_COL128 and NV12MT_10_COL128
Please use full macro names of the formats here.
> +----------------------------------
> +
> +``V4L2_PIX_FMT_NV12MT_COL128`` is a tiled version of
> +``V4L2_PIX_FMT_NV12M`` where the two planes are split into 128 byte wide columns
> +of Y or interleaved CbCr.
> +
> +NV12MT_10_COL128 expands that as a 10 bit format where 3 10 bit values are
Ditto.
> +packed into a 32bit word. A 128 byte wide column therefore holds 96 samples
> +(either Y or interleaved CrCb). That effectively makes it 6 values in a 64 bit
> +word for the CbCr plane, as the values always go in pairs.
> +
> +Bit-packed representation.
> +
> +.. 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
> +
> + * - Y'\ :sub:`00[7:0]`
> + - Y'\ :sub:`01[5:0] (bits 7--2)` Y'\ :sub:`00[9:8]`\ (bits 1--0)
> + - Y'\ :sub:`02[3:0] (bits 7--4)` Y'\ :sub:`01[9:6]`\ (bits 3--0)
> + - unused (bits 7--6)` Y'\ :sub:`02[9:4]`\ (bits 5--0)
> +
> +.. 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: 12 12 12 12 12 12 12 12
> +
> + * - Cb\ :sub:`00[7:0]`
> + - Cr\ :sub:`00[5:0]`\ (bits 7--2) Cb\ :sub:`00[9:8]`\ (bits 1--0)
> + - Cb\ :sub:`01[3:0]`\ (bits 7--4) Cr\ :sub:`00[9:6]`\ (bits 3--0)
> + - unused (bits 7--6) Cb\ :sub:`02[9:4]`\ (bits 5--0)
> + - Cr\ :sub:`01[7:0]`
> + - Cb\ :sub:`02[5:0]`\ (bits 7--2) Cr\ :sub:`01[9:8]`\ (bits 1--0)
> + - Cr\ :sub:`02[3:0]`\ (bits 7--4) Cb\ :sub:`02[9:6]`\ (bits 3--0)
> + - unused (bits 7--6) Cr\ :sub:`02[9:4]`\ (bits 5--0)
> +
>
> Fully Planar YUV Formats
> ========================
>
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2025-01-08 8:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 16:21 [PATCH 0/7] Raspberry Pi HEVC decoder driver Dave Stevenson
2024-12-20 16:21 ` [PATCH 1/7] RFC: media: Add media_request_{pin,unpin} API Dave Stevenson
2025-01-06 20:32 ` Nicolas Dufresne
2024-12-20 16:21 ` [PATCH 2/7] docs: uapi: media: Document Raspberry Pi NV12 column format Dave Stevenson
2025-01-08 8:09 ` Sakari Ailus [this message]
2024-12-20 16:21 ` [PATCH 3/7] media: ioctl: Add pixel formats NV12MT_COL128 and NV12MT_10_COL128 Dave Stevenson
[not found] ` <d2f047cd-5c50-454f-95be-601edb79466d@collabora.com>
2025-01-02 12:52 ` Dave Stevenson
2025-01-06 20:52 ` Nicolas Dufresne
2025-01-07 16:28 ` Dave Stevenson
2024-12-20 16:21 ` [PATCH 4/7] media: dt-bindings: media: Add binding for the Raspberry Pi HEVC decoder Dave Stevenson
2024-12-31 13:15 ` Rob Herring
2024-12-20 16:21 ` [PATCH 6/7] RFC: v4l2-mem2mem: Remove warning from v4l2_m2m_job_finish Dave Stevenson
2024-12-20 16:21 ` [PATCH 7/7] arm: dts: bcm2711-rpi: Add HEVC decoder node Dave Stevenson
[not found] ` <20241220-media-rpi-hevc-dec-v1-5-0ebcc04ed42e@raspberrypi.com>
2024-12-20 18:20 ` [PATCH 5/7] media: platform: Add Raspberry Pi HEVC decoder driver Dave Stevenson
2024-12-20 18:58 ` kernel test robot
2024-12-21 18:34 ` kernel test robot
2024-12-21 18:45 ` kernel test robot
2025-01-06 20:46 ` [PATCH 0/7] " Nicolas Dufresne
2025-01-07 16:13 ` Dave Stevenson
2025-01-07 17:36 ` Dave Stevenson
2025-01-08 19:02 ` Nicolas Dufresne
2025-01-08 18:40 ` Nicolas Dufresne
2025-01-08 9:52 ` John Cox
2025-01-08 19:15 ` Nicolas Dufresne
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z34ypbE2mNp1tC5V@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=dom@raspberrypi.com \
--cc=ezequiel@vanguardiasur.com.ar \
--cc=florian.fainelli@broadcom.com \
--cc=jc@kynesim.co.uk \
--cc=john.cox@raspberrypi.com \
--cc=kernel-list@raspberrypi.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox