[libcamera-devel] [PATCH 2/9] libcamera: delayed_controls: Add helper for controls that applies with a delay

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Nov 3 18:42:07 CET 2020


Hi Naush,

On Tue, Nov 03, 2020 at 10:27:06AM +0000, Naushir Patuck wrote:
> Hi Niklas,
> 
> Thank you for your patch.  Please see some initial comments below.
> 
> On Wed, 28 Oct 2020 at 01:01, Niklas Söderlund wrote:
> 
> > Some sensor controls take effect with a delay as the sensor needs time
> > to adjust, for example exposure. Add a optional helper DelayedControls
> > to help pipelines deal with such controls.
> >
> > The idea is to provide a queue of controls towards the V4L2 device and
> > apply individual controls with the specified delay with the aim to get
> > predictable and retrievable control values for any given frame. To do
> > this the queue of controls needs to be at least as deep as the control
> > with the largest delay.
> >
> > The DelayedControls needs to be informed of every start of exposure.
> > This can be emulated but the helper is designed to be used with this
> > event being provide by the kernel thru V4L2 events.
> >
> > This helper is based on StaggeredCtrl from the Raspberry Pi pipeline
> > handler but expands on its API. This helpers aims to replace the
> > Raspberry Pi implementations and mimics it behavior perfectly.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> > ---
> >  include/libcamera/internal/delayed_controls.h |  87 ++++++
> >  src/libcamera/delayed_controls.cpp            | 282 ++++++++++++++++++
> >  src/libcamera/meson.build                     |   1 +
> >  3 files changed, 370 insertions(+)
> >  create mode 100644 include/libcamera/internal/delayed_controls.h
> >  create mode 100644 src/libcamera/delayed_controls.cpp
> >
> > diff --git a/include/libcamera/internal/delayed_controls.h
> > b/include/libcamera/internal/delayed_controls.h
> > new file mode 100644
> > index 0000000000000000..df5520d240a54e4b
> > --- /dev/null
> > +++ b/include/libcamera/internal/delayed_controls.h
> > @@ -0,0 +1,87 @@
> > +/* SPDX-License-Identifier: LGPL-2.1-or-later */
> > +/*
> > + * Copyright (C) 2020, Google Inc.
> > + *
> > + * delayed_controls.h - Helper to deal with controls that are applied
> > with a delay
> > + */
> 
> Given this is heavily derived from the staggered_write work, would it be ok
> to keep the Raspberry Pi copyright in the header?
> 
> Copyright (C) 2020, Raspberry Pi (Trading) Ltd.

I've discussed this with Niklas, it was an oversight caused by using a
template. The Raspberry Pi copyright definitely applies to the code,
here and in the other files.

[snip]

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list