From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
linux-media@vger.kernel.org, bingbu.cao@intel.com,
hongju.wang@intel.com, hverkuil@xs4all.nl,
Andrey Konovalov <andrey.konovalov@linaro.org>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
Dmitry Perchanov <dmitry.perchanov@intel.com>
Subject: Re: [PATCH v3 04/10] media: uapi: Add generic serial metadata mbus formats
Date: Thu, 7 Sep 2023 11:04:19 +0000 [thread overview]
Message-ID: <ZPmuM3+tMJLun2c5@kekkonen.localdomain> (raw)
In-Reply-To: <20230906125009.GG17308@pendragon.ideasonboard.com>
Hi Laurent,
On Wed, Sep 06, 2023 at 03:50:09PM +0300, Laurent Pinchart wrote:
> Hi Sakari,
>
> On Wed, Sep 06, 2023 at 12:34:10PM +0000, Sakari Ailus wrote:
> > On Wed, Sep 06, 2023 at 02:31:17PM +0300, Laurent Pinchart wrote:
> > > On Wed, Sep 06, 2023 at 11:28:37AM +0300, Tomi Valkeinen wrote:
> > > > On 05/09/2023 19:38, Laurent Pinchart wrote:
> > > > > On Thu, Aug 24, 2023 at 11:26:56AM +0300, Tomi Valkeinen wrote:
> > > > >> On 24/08/2023 10:24, Sakari Ailus wrote:
> > > > >>> On Wed, Aug 23, 2023 at 04:16:13PM +0300, Tomi Valkeinen wrote:
> > > > >>>> On 08/08/2023 10:55, Sakari Ailus wrote:
> > > > >>>>> Add generic serial metadata mbus formats. These formats describe data
> > > > >>>>> width and packing but not the content itself. The reason for specifying
> > > > >>>>> such formats is that the formats as such are fairly device specific but
> > > > >>>>> they are still handled by CSI-2 receiver drivers that should not be aware
> > > > >
> > > > > Do we want these formats to be CSI-2-specific ?
> > > > >
> > > > >>>>> of device specific formats. What makes generic metadata formats possible
> > > > >>>>> is that these formats are parsed by software only, after capturing the
> > > > >>>>> data to system memory.
> > > > >>>>
> > > > >>>> If I'm not mistaken, the CSI-2 spec doesn't say much about embedded data,
> > > > >>>> except that it may exist. Afaics, in CSI-2, the embedded data is split into
> > > > >>>> "lines", although the amount of data can be different than in the video
> > > > >>>> lines.
> > > > >>>>
> > > > >>>> The CCS specs talks more about embedded data. Some of it is quite odd, like:
> > > > >>>> "The length of the embedded data line shall not exceed the length of the
> > > > >>>> image data line. The embedded data line should have the same length as the
> > > > >>>> image data line.". I think it means the embedded line can be shorter than
> > > > >>>> image line, but not longer.
> > > > >>>
> > > > >>> That's what it means, yes. The CCS also has means to obtain the actual
> > > > >>> length --- frame format descriptors.
> > > > >>>
> > > > >>>> CCS also says that an embedded line should use 0x07 as padding at the end of
> > > > >>>> the line, if there's less data than the image line.
> > > > >>>>
> > > > >>>> CCS also talks about how the embedded data would be packed, and in some
> > > > >>>> cases that packing would be the same as for pixel data.
> > > > >>>
> > > > >>> In fact the packing is the same as for pixel data: the CSI-2 does not
> > > > >>> really differentiate there.
> > > > >>
> > > > >> If I understand the CCS spec right, the packing is not the same as for
> > > > >> the pixel data. You can have RAW12 pixel data but 8-byte embedded data.
> > > > >> But if you meant that the different packing style options are the same
> > > > >> for pixel and embedded data, yes.
> > > > >
> > > > > The idea is to allow CSI-2 receivers to unpack embedded data the same
> > > > > way as pixel data at the hardware level, and guarantee that no embedded
> > > >
> > > > Yes, but my comment was to Sakari's "the packing is the same as for
> > > > pixel data" comment. Afaics, there's nothing in CSI-2 or CCS that says
> > > > the packing is the same for pixel data and embedded data.
> > > >
> > > > In fact, the CSS says "By default, top-embedded data shall use the same
> > > > data packing as the Visible pixel data with one embedded data byte per
> > > > pixel", implying that it would not always be the case. It continues that
> > > > for RAW16/RAW20/RAW24 pixels the embedded data could be sent with
> > > > RAW8/RAW10/RAW12.
> > >
> > > The spec if a bit ambiguous :-S "by default" implies that something else
> > > could be done, but it's not clear what the other options are.
> >
> > The options for packing are detailed in the spec. For higher bit depths
> > there are options (as detailed by Tomi above).
>
> The "by default" wording could be construed as allowing any packing. I
> think the intent was to only allow an alternative packing for RAW16 and
> higher, but it's not very clear.
The optimised packing convention is only available for RAW16 and higher ---
otherwise you won't have enough bits needed to carry two bytes of data. The
packing used is configured using emb_data_ctrl register.
Maybe annex A could be merged to section 7.15 in order to make things
clearer.
>
> > > > That was just for top-embedded data, and I couldn't right away see
> > > > mention of other embedded data.
> > >
> > > The specification also mentions PDAF data for instance.
> >
> > The bottom PDAF data is vendor defined (as it's processed) so the vendor is
> > free to do whatever there. Note that the better way to support PDAF is via
> > embedded PDAF pixels, not via separate bottom embedded (PDAF) data. The
> > bottom embedded data could also be different kinds of statistics.
>
> Lots of ISPs don't support hardware processing of embedded PDAF pixels,
> so sensor-side processing is often nice to have. I wouldn't consider the
> embedded PDAF lines to be always worse than embedded PDAF pixels.
Not necessarily, indeed, but these formats tend not to be documented. :-(
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2023-09-07 16:11 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 7:55 [PATCH v3 00/10] Generic line based metadata support, internal pads Sakari Ailus
2023-08-08 7:55 ` [PATCH v3 01/10] media: Documentation: Align numbered list Sakari Ailus
2023-09-05 13:06 ` Laurent Pinchart
2023-09-06 12:43 ` Sakari Ailus
2023-09-06 12:50 ` Laurent Pinchart
2023-09-07 10:58 ` Sakari Ailus
2023-08-08 7:55 ` [PATCH v3 02/10] media: mc: Check pad flag validity Sakari Ailus
2023-08-10 13:54 ` Jacopo Mondi
2023-08-14 8:49 ` Sakari Ailus
2023-09-05 13:13 ` Laurent Pinchart
2023-08-08 7:55 ` [PATCH v3 03/10] media: mc: Add INTERNAL pad flag Sakari Ailus
2023-08-08 8:15 ` Hans Verkuil
2023-08-11 11:48 ` Sakari Ailus
2023-08-10 14:12 ` Jacopo Mondi
2023-08-11 9:09 ` Sakari Ailus
2023-09-05 13:50 ` Laurent Pinchart
2023-08-08 7:55 ` [PATCH v3 04/10] media: uapi: Add generic serial metadata mbus formats Sakari Ailus
2023-08-23 13:16 ` Tomi Valkeinen
2023-08-24 7:24 ` Sakari Ailus
2023-08-24 8:26 ` Tomi Valkeinen
2023-09-05 16:38 ` Laurent Pinchart
2023-09-06 8:28 ` Tomi Valkeinen
2023-09-06 11:31 ` Laurent Pinchart
2023-09-06 11:39 ` Tomi Valkeinen
2023-09-06 12:34 ` Sakari Ailus
2023-09-06 12:50 ` Laurent Pinchart
2023-09-07 11:04 ` Sakari Ailus [this message]
2023-08-08 7:55 ` [PATCH v3 05/10] media: uapi: Document which mbus format fields are valid for metadata Sakari Ailus
2023-08-10 15:19 ` Jacopo Mondi
2023-08-14 10:23 ` Sakari Ailus
2023-09-05 16:44 ` Laurent Pinchart
2023-08-08 7:55 ` [PATCH v3 06/10] media: uapi: Add a macro to tell whether an mbus code is metadata Sakari Ailus
2023-08-08 8:14 ` Hans Verkuil
2023-08-08 8:16 ` Sakari Ailus
2023-09-05 9:47 ` Tomi Valkeinen
2023-09-05 10:37 ` Sakari Ailus
2023-09-05 17:06 ` Laurent Pinchart
2023-09-06 11:33 ` Sakari Ailus
2023-09-06 12:23 ` Laurent Pinchart
2023-09-06 13:06 ` Sakari Ailus
2023-09-07 8:20 ` Sakari Ailus
2023-08-08 7:55 ` [PATCH v3 07/10] media: uapi: Add generic 8-bit metadata format definitions Sakari Ailus
2023-08-08 8:22 ` Hans Verkuil
2023-08-11 6:31 ` Jacopo Mondi
2023-08-11 9:11 ` Sakari Ailus
2023-08-11 9:43 ` Jacopo Mondi
2023-08-11 10:55 ` Sakari Ailus
2023-09-05 16:47 ` Laurent Pinchart
2023-09-06 11:36 ` Sakari Ailus
2023-09-06 12:36 ` Laurent Pinchart
2023-09-06 13:25 ` Sakari Ailus
2023-09-06 13:30 ` Laurent Pinchart
2023-09-06 13:39 ` Sakari Ailus
2023-09-06 13:47 ` Laurent Pinchart
2023-09-07 8:06 ` Sakari Ailus
2023-09-07 8:16 ` Sakari Ailus
2023-08-11 11:12 ` Sakari Ailus
2023-09-05 16:55 ` Laurent Pinchart
2023-09-06 11:56 ` Sakari Ailus
2023-09-06 13:07 ` Laurent Pinchart
2023-09-22 8:50 ` Sakari Ailus
2023-09-22 10:25 ` Laurent Pinchart
2023-09-07 8:36 ` Sakari Ailus
2023-09-07 8:47 ` Laurent Pinchart
2023-09-07 9:49 ` Sakari Ailus
2023-08-08 7:55 ` [PATCH v3 08/10] media: v4l: Support line-based metadata capture Sakari Ailus
2023-08-10 15:24 ` Jacopo Mondi
2023-08-14 11:02 ` Sakari Ailus
2023-09-05 17:15 ` Laurent Pinchart
2023-09-06 7:21 ` Jacopo Mondi
2023-09-06 12:24 ` Sakari Ailus
2023-09-06 13:20 ` Laurent Pinchart
2023-09-22 8:47 ` Sakari Ailus
2023-09-07 8:48 ` Sakari Ailus
2023-08-08 7:55 ` [PATCH v3 09/10] media: Add media bus codes for MIPI CCS embedded data Sakari Ailus
2023-09-05 17:25 ` Laurent Pinchart
2023-09-06 13:03 ` Sakari Ailus
2023-09-06 13:15 ` Laurent Pinchart
2023-09-07 11:10 ` Sakari Ailus
2023-08-08 7:55 ` [PATCH v3 10/10] media: uapi: v4l: Document source routes Sakari Ailus
2023-08-08 8:55 ` Hans Verkuil
2023-08-11 10:44 ` Sakari Ailus
2023-09-05 23:17 ` Laurent Pinchart
2023-09-06 12:11 ` Sakari Ailus
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=ZPmuM3+tMJLun2c5@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=andrey.konovalov@linaro.org \
--cc=bingbu.cao@intel.com \
--cc=dmitry.perchanov@intel.com \
--cc=hongju.wang@intel.com \
--cc=hverkuil@xs4all.nl \
--cc=jacopo.mondi@ideasonboard.com \
--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