[libcamera-devel] [PATCH v4 5/5] libcamera: controls: Add AWB related controls

Naushir Patuck naush at raspberrypi.com
Fri Apr 24 13:27:04 CEST 2020


Hi Laurent,

On Fri, 24 Apr 2020 at 12:00, Laurent Pinchart
<laurent.pinchart at ideasonboard.com> wrote:
>
> Hi Naush,
>
> Thank you for the patch.
>
> On Fri, Apr 24, 2020 at 11:47:00AM +0100, Naushir Patuck wrote:
> > AwbMode is a new enum type to specify operating mode of the AWB
> > algorithm. All modes may not be supported by all platforms.
> >
> > ColourGains is a new float array type used to specify manual red
> > and blue (in that order) colour channel gains when AWB is disabled.
> >
> > ColourTemperature is a new control to return the current estimate of the
> > colour temperature.
> >
> > Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
> > ---
> >  src/libcamera/control_ids.yaml | 55 ++++++++++++++++++++++++++++++++++
> >  1 file changed, 55 insertions(+)
> >
> > diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml
> > index f66b851b..d922b039 100644
> > --- a/src/libcamera/control_ids.yaml
> > +++ b/src/libcamera/control_ids.yaml
> > @@ -169,6 +169,61 @@ controls:
> >        description: |
> >          Enable or disable the AWB.
> >
> > +        \sa ColourGains
> > +
> > +  # AwbMode needs further attention:
> > +  # - Auto-generate max enum value.
> > +  # - Better handling of custom types.
> > +  - AwbMode:
> > +      type: int32_t
> > +      description: |
> > +        Specify the range of illuminants to use for the AWB algorithm. The modes
> > +        supported are platform specific, and not all modes may be supported.
> > +      enum:
> > +        - name: AwbAuto
> > +          value: 0
> > +          description: Search over the whole colour temperature range.
> > +        - name: AwbIncandescent
> > +          value: 1
> > +          description: Incandescent AWB lamp mode.
> > +        - name: AwbTungsten
> > +          value: 2
> > +          description: Tungsten AWB lamp mode.
> > +        - name: AwbFluorescent
> > +          value: 3
> > +          description: Fluorescent AWB lamp mode.
> > +        - name: AwbIndoor
> > +          value: 4
> > +          description: Indoor AWB lighting mode.
> > +        - name: AwbDaylight
> > +          value: 5
> > +          description: Daylight AWB lighting mode.
> > +        - name: AwbCloudy
> > +          value: 6
> > +          description: Cloudy AWB lighting mode.
> > +        - name: AwbCustom
> > +          value: 7
> > +          description: Custom AWB mode.
> > +        - name: AwbModeMax
> > +          value: 7
> > +          description: Maximum allowed value (place any new values above here).
> > +
> > +  - ColourGains:
> > +      type: float
> > +      description: |
> > +        Pair of gain values for the Red and Blue colour channels, in that
> > +        order. ColourGains can only be applied in a Request when the AWB is
> > +        disabled.
> > +
> > +        \sa AwbEnable
> > +      size: [2]
> > +
> > +  - ColourTemperature:
> > +      type: float
>
> I forgot to mention previously, does this need to be a float, or can it
> be an integer ? I would be surprised if we needed more precision than
> 1K, but feel free to tell me I'm wrong. If a integer is fine I'll change
> it when applying, no need to resend.
>

Yes that is fine, we don't need much precision here.  Please convert
to int32_t before submitting.

Regards,
Naush


> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
> > +      description: Report the current estimate of the colour temperature, in
> > +        kelvin, for this frame. The ColourTemperature control can only be
> > +        returned in metadata.
> > +
> >    - Saturation:
> >        type: float
> >        description:  |
>
> --
> Regards,
>
> Laurent Pinchart


More information about the libcamera-devel mailing list