[libcamera-devel] AeLock proposal v4

paul.elder at ideasonboard.com paul.elder at ideasonboard.com
Wed Sep 15 10:56:10 CEST 2021


Hello,

Here's v4 of the aelock proposal, based on what we discussed in the
meeting yesterday.

Requirements:
- LOCK: AGC do not update output results
- MANUAL: override the values computed by AGC
- SEAMLESS TRANSITIONS: no flickering
- custom minimum values for the manual controls (no magic value for
  enabling auto)

The conclusion was that the locked state, as an explicitly selectable
state for the user, is unnecessary. Its presence causes not-very-nice
cases (eg. manual -> locked transition, manual with no values, etc), so
we've decided to turn it into an implicit state combined with manual,
with the presence of a manual control value to act as a trigger to
switch from the internal "locked" state to "manual" state. This blocks
going the other way, but allows going back to auto.

We of course have separate controls for the sub-controls.

In which case the design is so simple that we don't need a diagram...?

Controls:

ExposureTime
- input: the manual exposure time value to use
- output: the exposure time value that was used for the request that is
  returned

ExposureTimeMode:
- states: Auto, Disabled
- input: In Auto mode use the exposure time value computed by the AEC.
  In Disabled mode, don't update the exposure time value until
  ExposureTime is provided. When it is, start to an continue to use the
  provided value.
- output: the mode that was used for the request that is returned

Same two controls for AnalogGain.


The flow for seamless switching from auto to manual:
1. Set ExposureTimeMode to Disabled
2. Wait for the first request where ExposureTimeMode is Disabled
3. Copy the ExposureTime value from that request, and submit it


If a manual value is provided while the mode is auto, the manual value
will be ignored.


The one thing that deviates from the consistency is that a value-control
is used as a trigger. Its value is still saved (thus resubmission is
unnecessary if the value doesn't change), but its presence acts as a
trigger to switch from the internal locked state to manual state. This
is seen as fine, since it's not too intrusive, and it enables a cleaner
API.


Paul


More information about the libcamera-devel mailing list