[libcamera-devel] [PATCH 1/3] libcamera: control_ids: Introduce LensShadingEnable
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Mar 21 01:25:29 CET 2023
Hi Jacopo,
On Mon, Mar 13, 2023 at 09:34:29AM +0100, Jacopo Mondi wrote:
> On Sun, Mar 12, 2023 at 05:54:12PM +0200, Laurent Pinchart via libcamera-devel wrote:
> > On Wed, Mar 08, 2023 at 05:40:26PM +0100, Jacopo Mondi via libcamera-devel wrote:
> > > From: Jacopo Mondi <jacopo at jmondi.org>
> > >
> > > Introduce a control to enable and disable LSC and replace the
> > > draft android control. The control is used to report the algorithm
> > > current state when part of a completed Request metadata.
> >
> > What's the use case for this ? Also, the new control isn't equivalent to
> > ANDROID_STATISTICS_LENS_SHADING_MAP_MODE, how will we support the latter
> > if you drop LensShadingMapMode ?
>
> I'm not sure I understand your questions here...
>
> 1) What is the use case: to enable/disable LSC at runtime
I meant what's the use case for enabling and disabling LSC dynamically ?
> 2) Isn't it equivalent to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE:
> yes, and so far we had a draft control to support it
No, my point is that your new control is *not* equivalent to
ANDROID_STATISTICS_LENS_SHADING_MAP_MODE, which was supported through
the LensShadingMapMode control that you're removing.
> 3) How we support Android: by translating the libcamera control to the
> Android control as done in this patch for the static metadata
>
> > > Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> > > ---
> > > src/android/camera_capabilities.cpp | 4 ++--
> > > src/libcamera/control_ids.yaml | 20 ++++++--------------
> > > 2 files changed, 8 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
> > > index 1bfeaea4b121..040ad7347773 100644
> > > --- a/src/android/camera_capabilities.cpp
> > > +++ b/src/android/camera_capabilities.cpp
> > > @@ -1187,10 +1187,10 @@ int CameraCapabilities::initializeStaticMetadata()
> > > {
> > > std::vector<uint8_t> data;
> > > data.reserve(2);
> > > - const auto &infoMap = controlsInfo.find(&controls::draft::LensShadingMapMode);
> > > + const auto &infoMap = controlsInfo.find(&controls::LensShadingEnable);
> > > if (infoMap != controlsInfo.end()) {
> > > for (const auto &value : infoMap->second.values())
> > > - data.push_back(value.get<int32_t>());
> > > + data.push_back(value.get<bool>());
> > > } else {
> > > data.push_back(ANDROID_STATISTICS_LENS_SHADING_MAP_MODE_OFF);
> > > }
> > > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> > > index adea5f90acc5..9457fb3de7b0 100644
> > > --- a/src/libcamera/control_ids.yaml
> > > +++ b/src/libcamera/control_ids.yaml
> > > @@ -694,6 +694,12 @@ controls:
> > > Continuous AF is paused. No further state changes or lens movements
> > > will occur until the AfPauseResume control is sent.
> > >
> > > + - LensShadingEnable:
> > > + type: bool
> > > + description: |
> > > + Enable or disable the lens shading algorithm. When reported in the
> > > + Request metadata the control reflects the algorithm's current state.
> > > +
> > > # ----------------------------------------------------------------------------
> > > # Draft controls section
> > >
> > > @@ -829,20 +835,6 @@ controls:
> > > row and the start of exposure of the last row. Currently identical to
> > > ANDROID_SENSOR_ROLLING_SHUTTER_SKEW
> > >
> > > - - LensShadingMapMode:
> > > - type: int32_t
> > > - draft: true
> > > - description: |
> > > - Control to report if the lens shading map is available. Currently
> > > - identical to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE.
> > > - enum:
> > > - - name: LensShadingMapModeOff
> > > - value: 0
> > > - description: No lens shading map mode is available.
> > > - - name: LensShadingMapModeOn
> > > - value: 1
> > > - description: The lens shading map mode is available.
> > > -
> > > - SceneFlicker:
> > > type: int32_t
> > > draft: true
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list