From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com,
tomi.valkeinen@ideasonboard.com, bingbu.cao@intel.com,
hongju.wang@intel.com
Subject: Re: [RFC 6/7] media: uapi: Add generic 8-bit metadata format definitions
Date: Fri, 9 Jun 2023 14:27:12 +0000 [thread overview]
Message-ID: <ZIM2wIdKtdQUB5JJ@kekkonen.localdomain> (raw)
In-Reply-To: <7f9143e7-81c5-4b0f-aa4c-08178b9fcc65@xs4all.nl>
Hi Laurent,
On Thu, Jun 08, 2023 at 10:54:43AM +0200, Hans Verkuil wrote:
> On 05/05/2023 23:52, Sakari Ailus wrote:
> > Generic 8-bit metadata formats define the in-memory data layout but not
> > the format of the data itself. The reasoning for having such formats is to
> > allow CSI-2 receiver drivers to receive and DMA drivers to write the data
> > to memory without knowing a large number of device specific formats.
> >
> > These formats may be used only in conjunction of a Media controller
> > pipeline where the internal pad of the source sub-device defines the
> > specific format of the data (using an mbus code).
> >
> > Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> > ---
> > .../userspace-api/media/v4l/meta-formats.rst | 1 +
> > .../media/v4l/metafmt-generic.rst | 317 ++++++++++++++++++
> > drivers/media/v4l2-core/v4l2-ioctl.c | 8 +
> > include/uapi/linux/videodev2.h | 9 +
> > 4 files changed, 335 insertions(+)
> > create mode 100644 Documentation/userspace-api/media/v4l/metafmt-generic.rst
> >
> > diff --git a/Documentation/userspace-api/media/v4l/meta-formats.rst b/Documentation/userspace-api/media/v4l/meta-formats.rst
> > index 0bb61fc5bc00..919f595576b9 100644
> > --- a/Documentation/userspace-api/media/v4l/meta-formats.rst
> > +++ b/Documentation/userspace-api/media/v4l/meta-formats.rst
> > @@ -19,3 +19,4 @@ These formats are used for the :ref:`metadata` interface only.
> > metafmt-vsp1-hgo
> > metafmt-vsp1-hgt
> > metafmt-vivid
> > + metafmt-generic
> > diff --git a/Documentation/userspace-api/media/v4l/metafmt-generic.rst b/Documentation/userspace-api/media/v4l/metafmt-generic.rst
> > new file mode 100644
> > index 000000000000..09d3fabb1e94
> > --- /dev/null
> > +++ b/Documentation/userspace-api/media/v4l/metafmt-generic.rst
> > @@ -0,0 +1,317 @@
> > +.. SPDX-License-Identifier: GPL-2.0 OR GFDL-1.1-no-invariants-or-later
> > +
> > +**************************************************************************************************************************************************************************************************************************************************************************************************************************
> > +V4L2_META_FMT_GENERIC_8 ('MET8'), V4L2_META_FMT_GENERIC_CSI2_10 ('MC1A'), V4L2_META_FMT_GENERIC_CSI2_12 ('MC1C'), V4L2_META_FMT_GENERIC_CSI2_14 ('MC1E'), V4L2_META_FMT_GENERIC_CSI2_16 ('MC1G'), V4L2_META_FMT_GENERIC_CSI2_20 ('MC1K'), V4L2_META_FMT_GENERIC_CSI2_24 ('MC1O'), V4L2_META_FMT_GENERIC_CSI2_2_24 ('MC2O')
> > +**************************************************************************************************************************************************************************************************************************************************************************************************************************
> > +
> > +
> > +Generic line-based metadata formats
> > +
> > +
> > +Description
> > +===========
> > +
> > +These generic line-based metadata formats define the memory layout of the data
> > +without defining the format or meaning of the metadata itself. These formats may
> > +only be used with a Media controller pipeline where the more specific format is
> > +defined in an :ref:`internal source pad <MEDIA-PAD-FL-INTERNAL-SOURCE>` of the
> > +source sub-device. See also :ref:`source routes <v4l2-subdev-source-routes>`.
> > +
> > +.. _v4l2-meta-fmt-generic-8:
> > +
> > +V4L2_META_FMT_GENERIC_8
> > +-----------------------
> > +
> > +The V4L2_META_FMT_GENERIC_8 format is a plain 8-bit metadata format whereas the
> > +rest of the formats have CSI-2 packing that are typically used on camera sensors
> > +in conjunction with pixel data of the same bit depth.
>
> You keep referring to CSI-2 packing without ever defining it.
>
> I'm not sure you should include CSI2 in the name either. It is OK to say something
> here like: "The way the data is stored follows the CSI-2 specification."
>
> But it is not limited to CSI-2 and can be used with other buses as well.
That's true, certainly, but where this packing is most commonly used is
CSI-2 (or derives from CSI-2).
>
> > +
> > +This format is also used on CSI-2 on both 8 bits per sample as well as on
> > +16 bits per sample when two bytes of metadata are packed into one sample.
>
> Little or big endian?
Little endian. I'll address these for v2.
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2023-06-09 14:27 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-05 21:52 [RFC 0/7] Generic line based metadata support, internal pads Sakari Ailus
2023-05-05 21:52 ` [RFC 1/7] media: mc: Add INTERNAL_SOURCE pad type flag Sakari Ailus
2023-05-08 9:52 ` Tomi Valkeinen
2023-05-08 12:04 ` Sakari Ailus
2023-05-08 12:07 ` Tomi Valkeinen
2023-05-08 12:28 ` Sakari Ailus
2023-06-02 9:18 ` Laurent Pinchart
2023-06-02 15:05 ` Sakari Ailus
2023-06-08 7:59 ` Hans Verkuil
2023-06-09 12:44 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 2/7] media: v4l: subdev: Support INTERNAL_SOURCE pads in routing IOCTLs Sakari Ailus
2023-05-08 10:14 ` Tomi Valkeinen
2023-05-08 12:24 ` Sakari Ailus
2023-06-02 9:44 ` Laurent Pinchart
2023-06-02 9:46 ` Laurent Pinchart
2023-06-02 13:10 ` Sakari Ailus
2023-06-04 14:26 ` Laurent Pinchart
2023-06-05 8:06 ` Sakari Ailus
2023-06-05 8:23 ` Laurent Pinchart
2023-06-08 8:06 ` Hans Verkuil
2023-05-05 21:52 ` [RFC 3/7] media: uapi: v4l: Document source routes Sakari Ailus
2023-05-08 10:33 ` Tomi Valkeinen
2023-05-08 16:26 ` Sakari Ailus
2023-05-08 16:35 ` Tomi Valkeinen
2023-05-08 17:41 ` Sakari Ailus
2023-06-02 9:56 ` Laurent Pinchart
2023-06-02 9:56 ` Laurent Pinchart
2023-06-09 12:55 ` Sakari Ailus
2023-06-08 8:20 ` Hans Verkuil
2023-05-05 21:52 ` [RFC 4/7] media: mc: Check pad flag validity Sakari Ailus
2023-06-02 9:58 ` Laurent Pinchart
2023-06-09 14:41 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 5/7] media: uapi: Add generic serial metadata mbus formats Sakari Ailus
2023-06-02 10:36 ` Laurent Pinchart
2023-06-09 14:45 ` Sakari Ailus
2023-06-08 8:35 ` Hans Verkuil
2023-06-09 13:34 ` Sakari Ailus
2023-06-08 8:46 ` Hans Verkuil
2023-06-09 13:38 ` Sakari Ailus
2023-05-05 21:52 ` [RFC 6/7] media: uapi: Add generic 8-bit metadata format definitions Sakari Ailus
2023-06-08 8:54 ` Hans Verkuil
2023-06-09 14:27 ` Sakari Ailus [this message]
2023-05-05 21:52 ` [RFC 7/7] media: v4l: Support line-based metadata capture Sakari Ailus
2023-06-02 10:50 ` Laurent Pinchart
2023-06-09 13:46 ` Sakari Ailus
2023-06-02 7:54 ` [RFC 0/7] Generic line based metadata support, internal pads Naushir Patuck
2023-06-02 8:46 ` Sakari Ailus
2023-06-02 9:35 ` Naushir Patuck
2023-06-02 12:05 ` Sakari Ailus
2023-06-02 9:12 ` Laurent Pinchart
2023-06-02 9:43 ` Naushir Patuck
2023-06-09 13:20 ` Sakari Ailus
2023-06-09 13:59 ` Dave Stevenson
2023-06-09 14:41 ` Sakari Ailus
2023-08-03 22:36 ` Laurent Pinchart
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=ZIM2wIdKtdQUB5JJ@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=hongju.wang@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
/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;
as well as URLs for NNTP newsgroup(s).