libcamera: controls: Improve formatting of control descriptions in YAML

The control descriptions from YAML files are extracted to generate
Doxygen documentation blocks for the controls, which are then compiled
to HTML. The extraction script uses the first line of the description
as the Doxygen \brief, and preserves blank lines to keep paragraphs.

The control descriptions in the YAML files have however not all been
written with this in mind. Many description elements are not formatted
as block string scalars, in the first place, so blank lines are lost
when parsing YAML. Furthermore, they often start with a long initial
paragraph, making the \brief description very long.

Improve the documentation formatting by marking all multiline
descriptions as block string scalars, and try to provide a short
one-line first paragraph to be used as a \brief. While at it, reflow the
documentation to the 80 columns limit.

The draft controls are left as-is, as they should evolve to non-draft
controls eventually (and ideally sooner than later).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Laurent Pinchart 2024-08-10 00:39:05 +03:00
parent 39f01e9185
commit ce690bd9d7
2 changed files with 291 additions and 191 deletions

View file

@ -32,10 +32,11 @@ controls:
- AeMeteringMode: - AeMeteringMode:
type: int32_t type: int32_t
description: | description: |
Specify a metering mode for the AE algorithm to use. The metering Specify a metering mode for the AE algorithm to use.
modes determine which parts of the image are used to determine the
scene brightness. Metering modes may be platform specific and not The metering modes determine which parts of the image are used to
all metering modes may be supported. determine the scene brightness. Metering modes may be platform specific
and not all metering modes may be supported.
enum: enum:
- name: MeteringCentreWeighted - name: MeteringCentreWeighted
value: 0 value: 0
@ -56,33 +57,41 @@ controls:
- AeConstraintMode: - AeConstraintMode:
type: int32_t type: int32_t
description: | description: |
Specify a constraint mode for the AE algorithm to use. These determine Specify a constraint mode for the AE algorithm to use.
how the measured scene brightness is adjusted to reach the desired
target exposure. Constraint modes may be platform specific, and not The constraint modes determine how the measured scene brightness is
all constraint modes may be supported. adjusted to reach the desired target exposure. Constraint modes may be
platform specific, and not all constraint modes may be supported.
enum: enum:
- name: ConstraintNormal - name: ConstraintNormal
value: 0 value: 0
description: Default constraint mode. description: |
Default constraint mode.
This mode aims to balance the exposure of different parts of the This mode aims to balance the exposure of different parts of the
image so as to reach a reasonable average level. However, highlights image so as to reach a reasonable average level. However, highlights
in the image may appear over-exposed and lowlights may appear in the image may appear over-exposed and lowlights may appear
under-exposed. under-exposed.
- name: ConstraintHighlight - name: ConstraintHighlight
value: 1 value: 1
description: Highlight constraint mode. description: |
Highlight constraint mode.
This mode adjusts the exposure levels in order to try and avoid This mode adjusts the exposure levels in order to try and avoid
over-exposing the brightest parts (highlights) of an image. over-exposing the brightest parts (highlights) of an image.
Other non-highlight parts of the image may appear under-exposed. Other non-highlight parts of the image may appear under-exposed.
- name: ConstraintShadows - name: ConstraintShadows
value: 2 value: 2
description: Shadows constraint mode. description: |
Shadows constraint mode.
This mode adjusts the exposure levels in order to try and avoid This mode adjusts the exposure levels in order to try and avoid
under-exposing the dark parts (shadows) of an image. Other normally under-exposing the dark parts (shadows) of an image. Other normally
exposed parts of the image may appear over-exposed. exposed parts of the image may appear over-exposed.
- name: ConstraintCustom - name: ConstraintCustom
value: 3 value: 3
description: Custom constraint mode. description: |
Custom constraint mode.
# AeExposureMode needs further attention: # AeExposureMode needs further attention:
# - Auto-generate max enum value. # - Auto-generate max enum value.
@ -90,10 +99,11 @@ controls:
- AeExposureMode: - AeExposureMode:
type: int32_t type: int32_t
description: | description: |
Specify an exposure mode for the AE algorithm to use. These specify Specify an exposure mode for the AE algorithm to use.
how the desired total exposure is divided between the shutter time
and the sensor's analogue gain. The exposure modes are platform The exposure modes specify how the desired total exposure is divided
specific, and not all exposure modes may be supported. between the shutter time and the sensor's analogue gain. They are
platform specific, and not all exposure modes may be supported.
enum: enum:
- name: ExposureNormal - name: ExposureNormal
value: 0 value: 0
@ -111,8 +121,10 @@ controls:
- ExposureValue: - ExposureValue:
type: float type: float
description: | description: |
Specify an Exposure Value (EV) parameter. The EV parameter will only be Specify an Exposure Value (EV) parameter.
applied if the AE algorithm is currently enabled.
The EV parameter will only be applied if the AE algorithm is currently
enabled.
By convention EV adjusts the exposure as log2. For example 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 EV = [-2, -1, 0.5, 0, 0.5, 1, 2] results in an exposure adjustment
@ -124,7 +136,9 @@ controls:
type: int32_t type: int32_t
description: | description: |
Exposure time (shutter speed) for the frame applied in the sensor Exposure time (shutter speed) for the frame applied in the sensor
device. This value is specified in micro-seconds. device.
This value is specified in micro-seconds.
Setting this value means that it is now fixed and the AE algorithm may Setting this value means that it is now fixed and the AE algorithm may
not change it. Setting it back to zero returns it to the control of the not change it. Setting it back to zero returns it to the control of the
@ -142,6 +156,7 @@ controls:
type: float type: float
description: | description: |
Analogue gain value applied in the sensor device. Analogue gain value applied in the sensor device.
The value of the control specifies the gain multiplier applied to all The value of the control specifies the gain multiplier applied to all
colour channels. This value cannot be lower than 1.0. colour channels. This value cannot be lower than 1.0.
@ -160,9 +175,11 @@ controls:
- AeFlickerMode: - AeFlickerMode:
type: int32_t type: int32_t
description: | description: |
Set the flicker mode, which determines whether, and how, the AGC/AEC Set the flicker avoidance mode for AGC/AEC.
algorithm attempts to hide flicker effects caused by the duty cycle of
artificial lighting. The flicker mode determines whether, and how, the AGC/AEC algorithm
attempts to hide flicker effects caused by the duty cycle of artificial
lighting.
Although implementation dependent, many algorithms for "flicker Although implementation dependent, many algorithms for "flicker
avoidance" work by restricting this exposure time to integer multiples avoidance" work by restricting this exposure time to integer multiples
@ -176,16 +193,21 @@ controls:
enum: enum:
- name: FlickerOff - name: FlickerOff
value: 0 value: 0
description: No flicker avoidance is performed. description: |
No flicker avoidance is performed.
- name: FlickerManual - name: FlickerManual
value: 1 value: 1
description: Manual flicker avoidance. description: |
Manual flicker avoidance.
Suppress flicker effects caused by lighting running with a period Suppress flicker effects caused by lighting running with a period
specified by the AeFlickerPeriod control. specified by the AeFlickerPeriod control.
\sa AeFlickerPeriod \sa AeFlickerPeriod
- name: FlickerAuto - name: FlickerAuto
value: 2 value: 2
description: Automatic flicker period detection and avoidance. description: |
Automatic flicker period detection and avoidance.
The system will automatically determine the most likely value of The system will automatically determine the most likely value of
flicker period, and avoid flicker of this frequency. Once flicker flicker period, and avoid flicker of this frequency. Once flicker
is being corrected, it is implementation dependent whether the is being corrected, it is implementation dependent whether the
@ -194,7 +216,9 @@ controls:
- AeFlickerPeriod: - AeFlickerPeriod:
type: int32_t type: int32_t
description: Manual flicker period in microseconds. description: |
Manual flicker period in microseconds.
This value sets the current flicker period to avoid. It is used when This value sets the current flicker period to avoid. It is used when
AeFlickerMode is set to FlickerManual. AeFlickerMode is set to FlickerManual.
@ -212,7 +236,9 @@ controls:
- AeFlickerDetected: - AeFlickerDetected:
type: int32_t type: int32_t
description: Flicker period detected in microseconds. description: |
Flicker period detected in microseconds.
The value reported here indicates the currently detected flicker The value reported here indicates the currently detected flicker
period, or zero if no flicker at all is detected. period, or zero if no flicker at all is detected.
@ -233,21 +259,25 @@ controls:
- Brightness: - Brightness:
type: float type: float
description: | description: |
Specify a fixed brightness parameter. Positive values (up to 1.0) Specify a fixed brightness parameter.
produce brighter images; negative values (up to -1.0) produce darker
images and 0.0 leaves pixels unchanged. 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: - Contrast:
type: float type: float
description: | description: |
Specify a fixed contrast parameter. Normal contrast is given by the Specify a fixed contrast parameter.
value 1.0; larger values produce images with more contrast.
Normal contrast is given by the value 1.0; larger values produce images
with more contrast.
- Lux: - Lux:
type: float type: float
description: | description: |
Report an estimate of the current illuminance level in lux. The Lux Report an estimate of the current illuminance level in lux.
control can only be returned in metadata.
The Lux control can only be returned in metadata.
- AwbEnable: - AwbEnable:
type: bool type: bool
@ -262,8 +292,10 @@ controls:
- AwbMode: - AwbMode:
type: int32_t type: int32_t
description: | description: |
Specify the range of illuminants to use for the AWB algorithm. The modes Specify the range of illuminants to use for the AWB algorithm.
supported are platform specific, and not all modes may be supported.
The modes supported are platform specific, and not all modes may be
supported.
enum: enum:
- name: AwbAuto - name: AwbAuto
value: 0 value: 0
@ -305,37 +337,43 @@ controls:
type: float type: float
description: | description: |
Pair of gain values for the Red and Blue colour channels, in that 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 order.
disabled.
ColourGains can only be applied in a Request when the AWB is disabled.
\sa AwbEnable \sa AwbEnable
size: [2] size: [2]
- ColourTemperature: - ColourTemperature:
type: int32_t type: int32_t
description: Report the current estimate of the colour temperature, in description: |
kelvin, for this frame. The ColourTemperature control can only be Report the estimate of the colour temperature for the frame, in kelvin.
returned in metadata.
The ColourTemperature control can only be returned in metadata.
- Saturation: - Saturation:
type: float type: float
description: | description: |
Specify a fixed saturation parameter. Normal saturation is given by Specify a fixed saturation parameter.
the value 1.0; larger values produce more saturated colours; 0.0
produces a greyscale image. Normal saturation is given by the value 1.0; larger values produce more
saturated colours; 0.0 produces a greyscale image.
- SensorBlackLevels: - SensorBlackLevels:
type: int32_t type: int32_t
description: | description: |
Reports the sensor black levels used for processing a frame, in the Reports the sensor black levels used for processing a frame.
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 The values are in the order R, Gr, Gb, B. They are returned as numbers
control can only be returned in metadata. 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] size: [4]
- Sharpness: - Sharpness:
type: float type: float
description: | description: |
Intensity of the sharpening applied to the image.
A value of 0.0 means no sharpening. The minimum value means A value of 0.0 means no sharpening. The minimum value means
minimal sharpening, and shall be 0.0 unless the camera can't minimal sharpening, and shall be 0.0 unless the camera can't
disable sharpening completely. The default value shall give a disable sharpening completely. The default value shall give a
@ -349,6 +387,7 @@ controls:
type: int32_t type: int32_t
description: | description: |
Reports a Figure of Merit (FoM) to indicate how in-focus the frame is. 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 singular A larger FocusFoM value indicates a more in-focus frame. This singular
value may be based on a combination of statistics gathered from value may be based on a combination of statistics gathered from
multiple focus regions within an image. The number of focus regions and multiple focus regions within an image. The number of focus regions and
@ -359,11 +398,13 @@ controls:
- ColourCorrectionMatrix: - ColourCorrectionMatrix:
type: float type: float
description: | description: |
The 3x3 matrix that converts camera RGB to sRGB within the The 3x3 matrix that converts camera RGB to sRGB within the imaging
imaging pipeline. This should describe the matrix that is used pipeline.
after pixels have been white-balanced, but before any gamma
transformation. The 3x3 matrix is stored in conventional reading This should describe the matrix that is used after pixels have been
order in an array of 9 floating point values. 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: [3,3] size: [3,3]
@ -371,10 +412,12 @@ controls:
type: Rectangle type: Rectangle
description: | description: |
Sets the image portion that will be scaled to form the whole of Sets the image portion that will be scaled to form the whole of
the final output image. The (x,y) location of this rectangle is the final output image.
relative to the PixelArrayActiveAreas that is being used. The units
remain native sensor pixels, even if the sensor is being used in The (x,y) location of this rectangle is relative to the
a binning or skipping mode. PixelArrayActiveAreas that is being used. The units remain native
sensor pixels, even if the sensor is being used in a binning or
skipping mode.
This control is only present when the pipeline supports scaling. Its This control is only present when the pipeline supports scaling. Its
maximum valid value is given by the properties::ScalerCropMaximum maximum valid value is given by the properties::ScalerCropMaximum
@ -401,8 +444,9 @@ controls:
type: int64_t type: int64_t
description: | description: |
The instantaneous frame duration from start of frame exposure to start The instantaneous frame duration from start of frame exposure to start
of next exposure, expressed in microseconds. This control is meant to of next exposure, expressed in microseconds.
be returned in metadata.
This control is meant to be returned in metadata.
- FrameDurationLimits: - FrameDurationLimits:
type: int64_t type: int64_t
@ -444,9 +488,11 @@ controls:
- SensorTemperature: - SensorTemperature:
type: float type: float
description: | description: |
Temperature measure from the camera sensor in Celsius. This is typically Temperature measure from the camera sensor in Celsius.
obtained by a thermal sensor present on-die or in the camera module. The
range of reported temperatures is device dependent. This value is typically obtained by a thermal sensor present on-die or
in the camera module. The range of reported temperatures is device
dependent.
The SensorTemperature control will only be returned in metadata if a The SensorTemperature control will only be returned in metadata if a
thermal sensor is present. thermal sensor is present.
@ -468,7 +514,7 @@ controls:
- AfMode: - AfMode:
type: int32_t type: int32_t
description: | description: |
Control to set the mode of the AF (autofocus) algorithm. The mode of the AF (autofocus) algorithm.
An implementation may choose not to implement all the modes. An implementation may choose not to implement all the modes.
@ -476,12 +522,12 @@ controls:
- name: AfModeManual - name: AfModeManual
value: 0 value: 0
description: | description: |
The AF algorithm is in manual mode. In this mode it will never The AF algorithm is in manual mode.
perform any action nor move the lens of its own accord, but an
application can specify the desired lens position using the
LensPosition control.
In this mode the AfState will always report AfStateIdle. In this mode it will never perform any action nor move the lens of
its own accord, but an application can specify the desired lens
position using the LensPosition control. The AfState will always
report AfStateIdle.
If the camera is started in AfModeManual, it will move the focus If the camera is started in AfModeManual, it will move the focus
lens to the position specified by the LensPosition control. lens to the position specified by the LensPosition control.
@ -492,31 +538,34 @@ controls:
- name: AfModeAuto - name: AfModeAuto
value: 1 value: 1
description: | description: |
The AF algorithm is in auto mode. This means that the algorithm The AF algorithm is in auto mode.
will never move the lens or change state unless the AfTrigger
control is used. The AfTrigger control can be used to initiate a
focus scan, the results of which will be reported by AfState.
If the autofocus algorithm is moved from AfModeAuto to another In this mode the algorithm will never move the lens or change state
mode while a scan is in progress, the scan is cancelled unless the AfTrigger control is used. The AfTrigger control can be
immediately, without waiting for the scan to finish. used to initiate a focus scan, the results of which will be
reported by AfState.
When first entering this mode the AfState will report If the autofocus algorithm is moved from AfModeAuto to another mode
AfStateIdle. When a trigger control is sent, AfState will while a scan is in progress, the scan is cancelled immediately,
report AfStateScanning for a period before spontaneously without waiting for the scan to finish.
changing to AfStateFocused or AfStateFailed, depending on
the outcome of the scan. It will remain in this state until When first entering this mode the AfState will report AfStateIdle.
another scan is initiated by the AfTrigger control. If a scan is When a trigger control is sent, AfState will report AfStateScanning
cancelled (without changing to another mode), AfState will return for a period before spontaneously changing to AfStateFocused or
to AfStateIdle. AfStateFailed, depending on the outcome of the scan. It will remain
in this state until another scan is initiated by the AfTrigger
control. If a scan is cancelled (without changing to another mode),
AfState will return to AfStateIdle.
- name: AfModeContinuous - name: AfModeContinuous
value: 2 value: 2
description: | description: |
The AF algorithm is in continuous mode. This means that the lens can The AF algorithm is in continuous mode.
re-start a scan spontaneously at any moment, without any user
intervention. The AfState still reports whether the algorithm is In this mode the lens can re-start a scan spontaneously at any
currently scanning or not, though the application has no ability to moment, without any user intervention. The AfState still reports
initiate or cancel scans, nor to move the lens for itself. whether the algorithm is currently scanning or not, though the
application has no ability to initiate or cancel scans, nor to move
the lens for itself.
However, applications can pause the AF algorithm from continuously However, applications can pause the AF algorithm from continuously
scanning by using the AfPause control. This allows video or still scanning by using the AfPause control. This allows video or still
@ -529,34 +578,40 @@ controls:
- AfRange: - AfRange:
type: int32_t type: int32_t
description: | description: |
Control to set the range of focus distances that is scanned. An The range of focus distances that is scanned.
implementation may choose not to implement all the options here.
An implementation may choose not to implement all the options here.
enum: enum:
- name: AfRangeNormal - name: AfRangeNormal
value: 0 value: 0
description: | description: |
A wide range of focus distances is scanned, all the way from A wide range of focus distances is scanned.
infinity down to close distances, though depending on the
implementation, possibly not including the very closest macro Scanned distances cover all the way from infinity down to close
positions. distances, though depending on the implementation, possibly not
including the very closest macro positions.
- name: AfRangeMacro - name: AfRangeMacro
value: 1 value: 1
description: Only close distances are scanned. description: |
Only close distances are scanned.
- name: AfRangeFull - name: AfRangeFull
value: 2 value: 2
description: | description: |
The full range of focus distances is scanned just as with The full range of focus distances is scanned.
AfRangeNormal but this time including the very closest macro
positions. This range is similar to AfRangeNormal but includes the very
closest macro positions.
- AfSpeed: - AfSpeed:
type: int32_t type: int32_t
description: | description: |
Control that determines whether the AF algorithm is to move the lens Determine whether the AF is to move the lens as quickly as possible or
as quickly as possible or more steadily. For example, during video more steadily.
recording it may be desirable not to move the lens too abruptly, but
when in a preview mode (waiting for a still capture) it may be For example, during video recording it may be desirable not to move the
helpful to move the lens as quickly as is reasonably possible. lens too abruptly, but when in a preview mode (waiting for a still
capture) it may be helpful to move the lens as quickly as is reasonably
possible.
enum: enum:
- name: AfSpeedNormal - name: AfSpeedNormal
value: 0 value: 0
@ -568,25 +623,27 @@ controls:
- AfMetering: - AfMetering:
type: int32_t type: int32_t
description: | description: |
Instruct the AF algorithm how it should decide which parts of the image The parts of the image used by the AF algorithm to measure focus.
should be used to measure focus.
enum: enum:
- name: AfMeteringAuto - name: AfMeteringAuto
value: 0 value: 0
description: The AF algorithm should decide for itself where it will description: |
measure focus. Let the AF algorithm decide for itself where it will measure focus.
- name: AfMeteringWindows - name: AfMeteringWindows
value: 1 value: 1
description: The AF algorithm should use the rectangles defined by description: |
the AfWindows control to measure focus. If no windows are specified Use the rectangles defined by the AfWindows control to measure focus.
the behaviour is platform dependent.
If no windows are specified the behaviour is platform dependent.
- AfWindows: - AfWindows:
type: Rectangle type: Rectangle
description: | description: |
Sets the focus windows used by the AF algorithm when AfMetering is set The focus windows used by the AF algorithm when AfMetering is set to
to AfMeteringWindows. The units used are pixels within the rectangle AfMeteringWindows.
returned by the ScalerCropMaximum property.
The units used are pixels within the rectangle returned by the
ScalerCropMaximum property.
In order to be activated, a rectangle must be programmed with non-zero In order to be activated, a rectangle must be programmed with non-zero
width and height. Internally, these rectangles are intersected with the width and height. Internally, these rectangles are intersected with the
@ -611,23 +668,33 @@ controls:
- AfTrigger: - AfTrigger:
type: int32_t type: int32_t
description: | description: |
This control starts an autofocus scan when AfMode is set to AfModeAuto, Start an autofocus scan.
and can also be used to terminate a scan early.
It is ignored if AfMode is set to AfModeManual or AfModeContinuous. This control starts an autofocus scan when AfMode is set to AfModeAuto,
and is ignored if AfMode is set to AfModeManual or AfModeContinuous. It
can also be used to terminate a scan early.
enum: enum:
- name: AfTriggerStart - name: AfTriggerStart
value: 0 value: 0
description: Start an AF scan. Ignored if a scan is in progress. description: |
Start an AF scan.
Setting the control to AfTriggerStart is ignored if a scan is in
progress.
- name: AfTriggerCancel - name: AfTriggerCancel
value: 1 value: 1
description: Cancel an AF scan. This does not cause the lens to move description: |
anywhere else. Ignored if no scan is in progress. Cancel an AF scan.
This does not cause the lens to move anywhere else. Ignored if no
scan is in progress.
- AfPause: - AfPause:
type: int32_t type: int32_t
description: | description: |
Pause lens movements when in continuous autofocus mode.
This control has no effect except when in continuous autofocus mode This control has no effect except when in continuous autofocus mode
(AfModeContinuous). It can be used to pause any lens movements while (AfModeContinuous). It can be used to pause any lens movements while
(for example) images are captured. The algorithm remains inactive (for example) images are captured. The algorithm remains inactive
@ -637,17 +704,21 @@ controls:
- name: AfPauseImmediate - name: AfPauseImmediate
value: 0 value: 0
description: | description: |
Pause the continuous autofocus algorithm immediately, whether or not Pause the continuous autofocus algorithm immediately.
any kind of scan is underway. AfPauseState will subsequently report
The autofocus algorithm is paused whether or not any kind of scan
is underway. AfPauseState will subsequently report
AfPauseStatePaused. AfState may report any of AfStateScanning, AfPauseStatePaused. AfState may report any of AfStateScanning,
AfStateFocused or AfStateFailed, depending on the algorithm's state AfStateFocused or AfStateFailed, depending on the algorithm's state
when it received this control. when it received this control.
- name: AfPauseDeferred - name: AfPauseDeferred
value: 1 value: 1
description: | description: |
This is similar to AfPauseImmediate, and if the AfState is currently Pause the continuous autofocus algorithm at the end of the scan.
reporting AfStateFocused or AfStateFailed it will remain in that
state and AfPauseState will report AfPauseStatePaused. This is similar to AfPauseImmediate, and if the AfState is
currently reporting AfStateFocused or AfStateFailed it will remain
in that state and AfPauseState will report AfPauseStatePaused.
However, if the algorithm is scanning (AfStateScanning), However, if the algorithm is scanning (AfStateScanning),
AfPauseState will report AfPauseStatePausing until the scan is AfPauseState will report AfPauseStatePausing until the scan is
@ -658,15 +729,18 @@ controls:
- name: AfPauseResume - name: AfPauseResume
value: 2 value: 2
description: | description: |
Resume continuous autofocus operation. The algorithm starts again Resume continuous autofocus operation.
from exactly where it left off, and AfPauseState will report
AfPauseStateRunning. The algorithm starts again from exactly where it left off, and
AfPauseState will report AfPauseStateRunning.
- LensPosition: - LensPosition:
type: float type: float
description: | description: |
Acts as a control to instruct the lens to move to a particular position Set and report the focus lens position.
and also reports back the position of the lens for each frame.
This control instructs the lens to move to a particular position and
also reports back the position of the lens for each frame.
The LensPosition control is ignored unless the AfMode is set to The LensPosition control is ignored unless the AfMode is set to
AfModeManual, though the value is reported back unconditionally in all AfModeManual, though the value is reported back unconditionally in all
@ -680,16 +754,16 @@ controls:
For example: For example:
0 moves the lens to infinity. - 0 moves the lens to infinity.
0.5 moves the lens to focus on objects 2m away. - 0.5 moves the lens to focus on objects 2m away.
2 moves the lens to focus on objects 50cm away. - 2 moves the lens to focus on objects 50cm away.
And larger values will focus the lens closer. - And larger values will focus the lens closer.
The default value of the control should indicate a good general position The default value of the control should indicate a good general
for the lens, often corresponding to the hyperfocal distance (the position for the lens, often corresponding to the hyperfocal distance
closest position for which objects at infinity are still acceptably (the closest position for which objects at infinity are still
sharp). The minimum will often be zero (meaning infinity), and the acceptably sharp). The minimum will often be zero (meaning infinity),
maximum value defines the closest focus position. and the maximum value defines the closest focus position.
\todo Define a property to report the Hyperfocal distance of calibrated \todo Define a property to report the Hyperfocal distance of calibrated
lenses. lenses.
@ -697,22 +771,25 @@ controls:
- AfState: - AfState:
type: int32_t type: int32_t
description: | description: |
Reports the current state of the AF algorithm in conjunction with the The current state of the AF algorithm.
reported AfMode value and (in continuous AF mode) the AfPauseState
value. The possible state changes are described below, though we note This control reports the current state of the AF algorithm in
the following state transitions that occur when the AfMode is changed. conjunction with the reported AfMode value and (in continuous AF mode)
the AfPauseState value. The possible state changes are described below,
though we note the following state transitions that occur when the
AfMode is changed.
If the AfMode is set to AfModeManual, then the AfState will always If the AfMode is set to AfModeManual, then the AfState will always
report AfStateIdle (even if the lens is subsequently moved). Changing to report AfStateIdle (even if the lens is subsequently moved). Changing
the AfModeManual state does not initiate any lens movement. to the AfModeManual state does not initiate any lens movement.
If the AfMode is set to AfModeAuto then the AfState will report If the AfMode is set to AfModeAuto then the AfState will report
AfStateIdle. However, if AfModeAuto and AfTriggerStart are sent together AfStateIdle. However, if AfModeAuto and AfTriggerStart are sent
then AfState will omit AfStateIdle and move straight to AfStateScanning together then AfState will omit AfStateIdle and move straight to
(and start a scan). AfStateScanning (and start a scan).
If the AfMode is set to AfModeContinuous then the AfState will initially If the AfMode is set to AfModeContinuous then the AfState will
report AfStateScanning. initially report AfStateScanning.
enum: enum:
- name: AfStateIdle - name: AfStateIdle
@ -725,11 +802,12 @@ controls:
value: 1 value: 1
description: | description: |
The AF algorithm is in auto mode (AfModeAuto), and a scan has been The AF algorithm is in auto mode (AfModeAuto), and a scan has been
started using the AfTrigger control. The scan can be cancelled by started using the AfTrigger control.
sending AfTriggerCancel at which point the algorithm will either
move back to AfStateIdle or, if the scan actually completes before The scan can be cancelled by sending AfTriggerCancel at which point
the cancel request is processed, to one of AfStateFocused or the algorithm will either move back to AfStateIdle or, if the scan
AfStateFailed. actually completes before the cancel request is processed, to one
of AfStateFocused or AfStateFailed.
Alternatively the AF algorithm could be in continuous mode Alternatively the AF algorithm could be in continuous mode
(AfModeContinuous) at which point it may enter this state (AfModeContinuous) at which point it may enter this state
@ -750,9 +828,12 @@ controls:
- AfPauseState: - AfPauseState:
type: int32_t type: int32_t
description: | description: |
Only applicable in continuous (AfModeContinuous) mode, this reports Report whether the autofocus is currently running, paused or pausing.
whether the algorithm is currently running, paused or pausing (that is,
will pause as soon as any in-progress scan completes). This control is only applicable in continuous (AfModeContinuous) mode,
and reports whether the algorithm is currently running, paused or
pausing (that is, will pause as soon as any in-progress scan
completes).
Any change to AfMode will cause AfPauseStateRunning to be reported. Any change to AfMode will cause AfPauseStateRunning to be reported.
@ -766,22 +847,27 @@ controls:
value: 1 value: 1
description: | description: |
Continuous AF has been sent an AfPauseDeferred control, and will Continuous AF has been sent an AfPauseDeferred control, and will
pause as soon as any in-progress scan completes (and then report pause as soon as any in-progress scan completes.
AfPauseStatePaused). No new scans will be start spontaneously until
When the scan completes, the AfPauseState control will report
AfPauseStatePaused. No new scans will be start spontaneously until
the AfPauseResume control is sent. the AfPauseResume control is sent.
- name: AfPauseStatePaused - name: AfPauseStatePaused
value: 2 value: 2
description: | description: |
Continuous AF is paused. No further state changes or lens movements Continuous AF is paused.
will occur until the AfPauseResume control is sent.
No further state changes or lens movements will occur until the
AfPauseResume control is sent.
- HdrMode: - HdrMode:
type: int32_t type: int32_t
description: | description: |
Control to set the mode to be used for High Dynamic Range (HDR) Set the mode to be used for High Dynamic Range (HDR) imaging.
imaging. HDR techniques typically include multiple exposure, image
fusion and tone mapping techniques to improve the dynamic range of the HDR techniques typically include multiple exposure, image fusion and
resulting images. tone mapping techniques to improve the dynamic range of the resulting
images.
When using an HDR mode, images are captured with different sets of AGC When using an HDR mode, images are captured with different sets of AGC
settings called HDR channels. Channels indicate in particular the type settings called HDR channels. Channels indicate in particular the type
@ -795,16 +881,18 @@ controls:
- name: HdrModeOff - name: HdrModeOff
value: 0 value: 0
description: | description: |
HDR is disabled. Metadata for this frame will not include the HDR is disabled.
HdrChannel control.
Metadata for this frame will not include the HdrChannel control.
- name: HdrModeMultiExposureUnmerged - name: HdrModeMultiExposureUnmerged
value: 1 value: 1
description: | description: |
Multiple exposures will be generated in an alternating fashion. Multiple exposures will be generated in an alternating fashion.
However, they will not be merged together and will be returned to
the application as they are. Each image will be tagged with the The multiple exposures will not be merged together and will be
correct HDR channel, indicating what kind of exposure it is. The returned to the application as they are. Each image will be tagged
tag should be the same as in the HdrModeMultiExposure case. with the correct HDR channel, indicating what kind of exposure it
is. The tag should be the same as in the HdrModeMultiExposure case.
The expectation is that an application using this mode would merge The expectation is that an application using this mode would merge
the frames to create HDR images for itself if it requires them. the frames to create HDR images for itself if it requires them.
@ -812,8 +900,10 @@ controls:
value: 2 value: 2
description: | description: |
Multiple exposures will be generated and merged to create HDR Multiple exposures will be generated and merged to create HDR
images. Each image will be tagged with the HDR channel (long, medium images.
or short) that arrived and which caused this image to be output.
Each image will be tagged with the HDR channel (long, medium or
short) that arrived and which caused this image to be output.
Systems that use two channels for HDR will return images tagged Systems that use two channels for HDR will return images tagged
alternately as the short and long channel. Systems that use three alternately as the short and long channel. Systems that use three
@ -823,24 +913,29 @@ controls:
value: 3 value: 3
description: | description: |
Multiple frames all at a single exposure will be used to create HDR Multiple frames all at a single exposure will be used to create HDR
images. These images should be reported as all corresponding to the images.
HDR short channel.
These images should be reported as all corresponding to the HDR
short channel.
- name: HdrModeNight - name: HdrModeNight
value: 4 value: 4
description: | description: |
Multiple frames will be combined to produce "night mode" images. It Multiple frames will be combined to produce "night mode" images.
is up to the implementation exactly which HDR channels it uses, and
the images will all be tagged accordingly with the correct HDR It is up to the implementation exactly which HDR channels it uses,
and the images will all be tagged accordingly with the correct HDR
channel information. channel information.
- HdrChannel: - HdrChannel:
type: int32_t type: int32_t
description: | description: |
The HDR channel used to capture the frame.
This value is reported back to the application so that it can discover This value is reported back to the application so that it can discover
whether this capture corresponds to the short or long exposure image (or whether this capture corresponds to the short or long exposure image
any other image used by the HDR procedure). An application can monitor (or any other image used by the HDR procedure). An application can
the HDR channel to discover when the differently exposed images have monitor the HDR channel to discover when the differently exposed images
arrived. have arrived.
This metadata is only available when an HDR mode has been enabled. This metadata is only available when an HDR mode has been enabled.
@ -868,8 +963,9 @@ controls:
- Gamma: - Gamma:
type: float type: float
description: | description: |
Specify a fixed gamma value. Default must be 2.2 which closely mimics Specify a fixed gamma value.
sRGB gamma. Note that this is camera gamma, so it is applied as
1.0/gamma. The default gamma value must be 2.2 which closely mimics sRGB gamma.
Note that this is camera gamma, so it is applied as 1.0/gamma.
... ...

View file

@ -10,9 +10,11 @@ controls:
- StatsOutputEnable: - StatsOutputEnable:
type: bool type: bool
description: | description: |
Toggles the Raspberry Pi IPA to output a binary dump of the hardware Toggles the Raspberry Pi IPA to output the hardware generated statistics.
generated statistics through the Request metadata in the Bcm2835StatsOutput
control. When this control is set to true, the IPA outputs a binary dump of the
hardware generated statistics through the Request metadata in the
Bcm2835StatsOutput control.
\sa Bcm2835StatsOutput \sa Bcm2835StatsOutput
@ -20,9 +22,11 @@ controls:
type: uint8_t type: uint8_t
size: [n] size: [n]
description: | description: |
Span of the BCM2835 ISP generated statistics for the current frame. This Span of the BCM2835 ISP generated statistics for the current frame.
is sent in the Request metadata if the StatsOutputEnable is set to true.
The statistics struct definition can be found in include/linux/bcm2835-isp.h. This is sent in the Request metadata if the StatsOutputEnable is set to
true. The statistics struct definition can be found in
include/linux/bcm2835-isp.h.
\sa StatsOutputEnable \sa StatsOutputEnable