All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@iki.fi>
To: David Plowman <david.plowman@raspberrypi.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	linux-media@vger.kernel.org,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH v3 1/2] media: v4l2-ctrls: Add V4L2_CID_NOTIFY_GAIN_XXX controls
Date: Fri, 6 Aug 2021 11:32:51 +0300	[thread overview]
Message-ID: <20210806083251.GH3@valkosipuli.retiisi.eu> (raw)
In-Reply-To: <CAHW6GYJpV0gyNVLFoFbmxRQfhzTaK2DFA7R5ah-+W3U8XpkK7A@mail.gmail.com>

Hi David,

On Fri, Aug 06, 2021 at 09:15:09AM +0100, David Plowman wrote:
> Hi Sakari, Laurent
> 
> Thanks for the various comments and discussion. It did prompt me to
> have some second thoughts about some of the details here, as follows.
> 
> These controls are aimed specifically at sensors that do some kind of
> on-board "demosaic / remosaic" process, for instance to produce
> standard Bayer patterns from non-standard ones. As such the principal
> requirement is for the sensor to know what "grey" looks like, which we
> tell it by sending it the red and blue gains from the white balance
> algorithm. (This obviously enables it to reduce colour aliasing during
> the processing that it does.)
> 
> So perhaps the comparison here should be with the existing
> V4L2_CID_RED/BLUE_BALANCE controls. I'm not sure that it really
> matters exactly what the colours of the pixels on the sensor really
> are, it's knowing what "grey" looks like that is important. Any new
> controls could be quite cumbersome to use if you have to figure out
> what the underlying pixel arrangement looks like, it certainly feels
> much easier to refer simply to red/blue pixels, leaving the driver to
> deal with its own internal idiosyncrasies.

I think I missed these are the gains of the Bayer pattern components, and
by definition you'll be only setting the gains of those components that
are sent out by the sensor. So there wouldn't be other components around,
just these four.

> 
> Having said that, the particular sensor I have exposes a gain for each
> of the four Bayer channels, even though I find myself ignoring the
> green ones!!
> 
> Anyway, I certainly feel I could go either way on this one - do you
> have any more thoughts on the matter?

I'm leaning towards a single array control with specified, mbus code
independent order of components. You should add this control is applicable
to Bayer pattern output only. That leaves it easily extendable later on.

-- 
Kind regards,

Sakari Ailus

  reply	other threads:[~2021-08-06  8:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 12:12 [PATCH v3 0/2] New V4L2 controls V4L2_CID_NOTIFY_GAIN_XXX David Plowman
2021-07-22 12:12 ` [PATCH v3 1/2] media: v4l2-ctrls: Add V4L2_CID_NOTIFY_GAIN_XXX controls David Plowman
2021-08-05 15:04   ` Hans Verkuil
2021-08-05 15:22   ` Laurent Pinchart
2021-08-05 15:40     ` Sakari Ailus
2021-08-05 15:49       ` Laurent Pinchart
2021-08-05 18:05         ` Sakari Ailus
2021-08-06  8:15           ` David Plowman
2021-08-06  8:32             ` Sakari Ailus [this message]
2021-08-06  8:38             ` Laurent Pinchart
2021-08-06 10:34               ` David Plowman
2021-07-22 12:12 ` [PATCH v3 2/2] media: v4l2-ctrls: Document " David Plowman
2021-08-05 15:04   ` Hans Verkuil
2021-08-04 18:44 [PATCH v3 1/2] media: v4l2-ctrls: Add " kernel test robot

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=20210806083251.GH3@valkosipuli.retiisi.eu \
    --to=sakari.ailus@iki.fi \
    --cc=david.plowman@raspberrypi.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.