summaryrefslogtreecommitdiff
path: root/utils/ipc/extract-docs.py
AgeCommit message (Collapse)Author
2021-05-31utils: ipc: extract-docs: Extract the SPDX headerPaul Elder
Take the SPDX header from the mojom file. Error out if the mojom file has no SPDX header. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
2021-05-27utils: ipc: Add script to extract doxygen docs from mojom filesPaul Elder
Add a script to extract doxygen documentation comments from mojom files. It matches based on ^\/\*\*$ for start of block and ^ \*\/$ for end of block, and simply copies the comments to the output file along with a header and the libcamera namespace. Also add it to the meson file so it is usable by other meson files. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Acked-by: Umang Jain <umang.jain@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
/a> 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# Copyright (C) 2019, Google Inc.
#
%YAML 1.2
---
# Unless otherwise stated, all controls are bi-directional, i.e. they can be
# set through Request::controls() and returned out through Request::metadata().
controls:
  - AeEnable:
      type: bool
      description: |
        Enable or disable the AE.

        \sa ExposureTime AnalogueGain

  - AeLocked:
      type: bool
      description: |
        Report the lock status of a running AE algorithm.

        If the AE algorithm is locked the value shall be set to true, if it's
        converging it shall be set to false. If the AE algorithm is not
        running the control shall not be present in the metadata control list.

        \sa AeEnable

  # AeMeteringMode needs further attention:
  # - Auto-generate max enum value.
  # - Better handling of custom types.
  - AeMeteringMode:
      type: int32_t
      description: |
        Specify a metering mode for the AE algorithm to use. The metering
        modes determine which parts of the image are used to determine the
        scene brightness. Metering modes may be platform specific and not
        all metering modes may be supported.
      enum:
        - name: MeteringCentreWeighted
          value: 0
          description: Centre-weighted metering mode.
        - name: MeteringSpot
          value: 1
          description: Spot metering mode.
        - name: MeteringMatrix
          value: 2
          description: Matrix metering mode.
        - name: MeteringCustom
          value: 3
          description: Custom metering mode.
        - name: MeteringModeMax
          value: 3
          description: Maximum allowed value (place any new values above here).

  # AeConstraintMode needs further attention:
  # - Auto-generate max enum value.
  # - Better handling of custom types.
  - AeConstraintMode:
      type: int32_t
      description: |
        Specify a constraint mode for the AE algorithm to use. These determine
        how the measured scene brightness is adjusted to reach the desired
        target exposure. Constraint modes may be platform specific, and not
        all constraint modes may be supported.
      enum:
        - name: ConstraintNormal
          value: 0
          description: Default constraint mode.
            This mode aims to balance the exposure of different parts of the
            image so as to reach a reasonable average level. However, highlights
            in the image may appear over-exposed and lowlights may appear
            under-exposed.
        - name: ConstraintHighlight
          value: 1
          description: Highlight constraint mode.
            This mode adjusts the exposure levels in order to try and avoid
            over-exposing the brightest parts (highlights) of an image.
            Other non-highlight parts of the image may appear under-exposed.
        - name: ConstraintShadows
          value: 2
          description: Shadows constraint mode.
            This mode adjusts the exposure levels in order to try and avoid
            under-exposing the dark parts (shadows) of an image. Other normally
            exposed parts of the image may appear over-exposed.
        - name: ConstraintCustom
          value: 3
          description: Custom constraint mode.
        - name: ConstraintModeMax
          value: 3
          description: Maximum allowed value (place any new values above here).

  # AeExposureMode needs further attention:
  # - Auto-generate max enum value.
  # - Better handling of custom types.
  - AeExposureMode:
      type: int32_t
      description: |
        Specify an exposure mode for the AE algorithm to use. These specify
        how the desired total exposure is divided between the shutter time
        and the sensor's analogue gain. The exposure modes are platform
        specific, and not all exposure modes may be supported.
      enum:
        - name: ExposureNormal
          value: 0
          description: Default exposure mode.
        - name: ExposureShort
          value: 1
          description: Exposure mode allowing only short exposure times.
        - name: ExposureLong
          value: 2
          description: Exposure mode allowing long exposure times.
        - name: ExposureCustom
          value: 3
          description: Custom exposure mode.
        - name: ExposureModeMax
          value: 3
          description: Maximum allowed value (place any new values above here).

  - ExposureValue:
      type: float
      description: |
        Specify an Exposure Value (EV) parameter. The EV parameter will only be
        applied if the AE algorithm is currently enabled.

        By convention EV adjusts the exposure as log2. For example
        EV = [-2, -1, 0.5, 0, 0.5, 1, 2] results in an exposure adjustment
        of [1/4x, 1/2x, 1/sqrt(2)x, 1x, sqrt(2)x, 2x, 4x].

        \sa AeEnable

  - ExposureTime:
      type: int32_t
      description: |
        Exposure time (shutter speed) for the frame applied in the sensor
        device. This value is specified in micro-seconds.

        \sa AnalogueGain AeEnable

  - AnalogueGain:
      type: float
      description: |
        Analogue gain value applied in the sensor device.
        The value of the control specifies the gain multiplier applied to all
        colour channels. This value cannot be lower than 1.0.

        \sa ExposureTime AeEnable

  - Brightness:
      type: float
      description: |
        Specify a fixed brightness parameter. Positive values (up to 1.0)
        produce brighter images; negative values (up to -1.0) produce darker
        images and 0.0 leaves pixels unchanged.

  - Contrast:
      type: float
      description:  |
        Specify a fixed contrast parameter. Normal contrast is given by the
        value 1.0; larger values produce images with more contrast.

  - Lux:
      type: float
      description: |
        Report an estimate of the current illuminance level in lux. The Lux
        control can only be returned in metadata.

  - AwbEnable:
      type: bool
      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: int32_t
      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:  |
        Specify a fixed saturation parameter. Normal saturation is given by
        the value 1.0; larger values produce more saturated colours; 0.0
        produces a greyscale image.

  - SensorBlackLevels:
      type: int32_t
      description: |
        Reports the sensor black levels used for processing a frame, in the
        order R, Gr, Gb, B. These values are returned as numbers out of a 16-bit
        pixel range (as if pixels ranged from 0 to 65535). The SensorBlackLevels
        control can only be returned in metadata.
      size: [4]

  - Sharpness:
      type: float
      description:  |
        A value of 0.0 means no sharpening. The minimum value means
        minimal sharpening, and shall be 0.0 unless the camera can't
        disable sharpening completely. The default value shall give a
        "reasonable" level of sharpening, suitable for most use cases.
        The maximum value may apply extremely high levels of sharpening,
        higher than anyone could reasonably want. Negative values are
        not allowed. Note also that sharpening is not applied to raw
        streams.

  - FocusFoM:
      type: int32_t
      description: |
        Reports a Figure of Merit (FoM) to indicate how in-focus the frame is.
        A larger FocusFoM value indicates a more in-focus frame. This control
        depends on the IPA to gather ISP statistics from the defined focus
        region, and combine them in a suitable way to generate a FocusFoM value.
        In this respect, it is not necessarily aimed at providing a way to
        implement a focus algorithm by the application, rather an indication of
        how in-focus a frame is.

  - ColourCorrectionMatrix:
      type: float
      description: |
        The 3x3 matrix that converts camera RGB to sRGB within the
        imaging pipeline. This should describe the matrix that is used
        after pixels have been white-balanced, but before any gamma
        transformation. The 3x3 matrix is stored in conventional reading
        order in an array of 9 floating point values.

      size: [3x3]
...