libcamera: controls: Populate direction field in control definitions

In preparation for adding support for querying direction information
from controls, populate the corresponding field in the control ID
defintions.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
This commit is contained in:
Paul Elder 2024-11-26 00:11:50 +09:00
parent ef7c767a0f
commit 9bd9d25a82
3 changed files with 62 additions and 0 deletions

View file

@ -10,6 +10,7 @@ vendor: libcamera
controls: controls:
- AeEnable: - AeEnable:
type: bool type: bool
direction: inout
description: | description: |
Enable or disable the AE. Enable or disable the AE.
@ -17,6 +18,7 @@ controls:
- AeLocked: - AeLocked:
type: bool type: bool
direction: out
description: | description: |
Report the lock status of a running AE algorithm. Report the lock status of a running AE algorithm.
@ -31,6 +33,7 @@ controls:
# - Better handling of custom types. # - Better handling of custom types.
- AeMeteringMode: - AeMeteringMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Specify a metering mode for the AE algorithm to use. Specify a metering mode for the AE algorithm to use.
@ -56,6 +59,7 @@ controls:
# - Better handling of custom types. # - Better handling of custom types.
- AeConstraintMode: - AeConstraintMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Specify a constraint mode for the AE algorithm to use. Specify a constraint mode for the AE algorithm to use.
@ -98,6 +102,7 @@ controls:
# - Better handling of custom types. # - Better handling of custom types.
- AeExposureMode: - AeExposureMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Specify an exposure mode for the AE algorithm to use. Specify an exposure mode for the AE algorithm to use.
@ -120,6 +125,7 @@ controls:
- ExposureValue: - ExposureValue:
type: float type: float
direction: inout
description: | description: |
Specify an Exposure Value (EV) parameter. Specify an Exposure Value (EV) parameter.
@ -134,6 +140,7 @@ controls:
- ExposureTime: - ExposureTime:
type: int32_t type: int32_t
direction: inout
description: | description: |
Exposure time for the frame applied in the sensor device. Exposure time for the frame applied in the sensor device.
@ -153,6 +160,7 @@ controls:
- AnalogueGain: - AnalogueGain:
type: float type: float
direction: inout
description: | description: |
Analogue gain value applied in the sensor device. Analogue gain value applied in the sensor device.
@ -173,6 +181,7 @@ controls:
- AeFlickerMode: - AeFlickerMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Set the flicker avoidance mode for AGC/AEC. Set the flicker avoidance mode for AGC/AEC.
@ -215,6 +224,7 @@ controls:
- AeFlickerPeriod: - AeFlickerPeriod:
type: int32_t type: int32_t
direction: inout
description: | description: |
Manual flicker period in microseconds. Manual flicker period in microseconds.
@ -235,6 +245,7 @@ controls:
- AeFlickerDetected: - AeFlickerDetected:
type: int32_t type: int32_t
direction: out
description: | description: |
Flicker period detected in microseconds. Flicker period detected in microseconds.
@ -257,6 +268,7 @@ controls:
- Brightness: - Brightness:
type: float type: float
direction: inout
description: | description: |
Specify a fixed brightness parameter. Specify a fixed brightness parameter.
@ -265,6 +277,7 @@ controls:
- Contrast: - Contrast:
type: float type: float
direction: inout
description: | description: |
Specify a fixed contrast parameter. Specify a fixed contrast parameter.
@ -273,6 +286,7 @@ controls:
- Lux: - Lux:
type: float type: float
direction: out
description: | description: |
Report an estimate of the current illuminance level in lux. Report an estimate of the current illuminance level in lux.
@ -280,6 +294,7 @@ controls:
- AwbEnable: - AwbEnable:
type: bool type: bool
direction: inout
description: | description: |
Enable or disable the AWB. Enable or disable the AWB.
@ -290,6 +305,7 @@ controls:
# - Better handling of custom types. # - Better handling of custom types.
- AwbMode: - AwbMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Specify the range of illuminants to use for the AWB algorithm. Specify the range of illuminants to use for the AWB algorithm.
@ -323,6 +339,7 @@ controls:
- AwbLocked: - AwbLocked:
type: bool type: bool
direction: out
description: | description: |
Report the lock status of a running AWB algorithm. Report the lock status of a running AWB algorithm.
@ -334,6 +351,7 @@ controls:
- ColourGains: - ColourGains:
type: float type: float
direction: inout
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. order.
@ -345,6 +363,7 @@ controls:
- ColourTemperature: - ColourTemperature:
type: int32_t type: int32_t
direction: out
description: | description: |
Report the estimate of the colour temperature for the frame, in kelvin. Report the estimate of the colour temperature for the frame, in kelvin.
@ -352,6 +371,7 @@ controls:
- Saturation: - Saturation:
type: float type: float
direction: inout
description: | description: |
Specify a fixed saturation parameter. Specify a fixed saturation parameter.
@ -360,6 +380,7 @@ controls:
- SensorBlackLevels: - SensorBlackLevels:
type: int32_t type: int32_t
direction: out
description: | description: |
Reports the sensor black levels used for processing a frame. Reports the sensor black levels used for processing a frame.
@ -370,6 +391,7 @@ controls:
- Sharpness: - Sharpness:
type: float type: float
direction: inout
description: | description: |
Intensity of the sharpening applied to the image. Intensity of the sharpening applied to the image.
@ -384,6 +406,7 @@ controls:
- FocusFoM: - FocusFoM:
type: int32_t type: int32_t
direction: out
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.
@ -396,6 +419,7 @@ controls:
- ColourCorrectionMatrix: - ColourCorrectionMatrix:
type: float type: float
direction: inout
description: | description: |
The 3x3 matrix that converts camera RGB to sRGB within the imaging The 3x3 matrix that converts camera RGB to sRGB within the imaging
pipeline. pipeline.
@ -409,6 +433,7 @@ controls:
- ScalerCrop: - ScalerCrop:
type: Rectangle type: Rectangle
direction: inout
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 final output image.
@ -424,6 +449,7 @@ controls:
- DigitalGain: - DigitalGain:
type: float type: float
direction: inout
description: | description: |
Digital gain value applied during the processing steps applied Digital gain value applied during the processing steps applied
to the image as captured from the sensor. to the image as captured from the sensor.
@ -441,6 +467,7 @@ controls:
- FrameDuration: - FrameDuration:
type: int64_t type: int64_t
direction: out
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. of next exposure, expressed in microseconds.
@ -449,6 +476,7 @@ controls:
- FrameDurationLimits: - FrameDurationLimits:
type: int64_t type: int64_t
direction: inout
description: | description: |
The minimum and maximum (in that order) frame duration, expressed in The minimum and maximum (in that order) frame duration, expressed in
microseconds. microseconds.
@ -485,6 +513,7 @@ controls:
- SensorTemperature: - SensorTemperature:
type: float type: float
direction: out
description: | description: |
Temperature measure from the camera sensor in Celsius. Temperature measure from the camera sensor in Celsius.
@ -497,6 +526,7 @@ controls:
- SensorTimestamp: - SensorTimestamp:
type: int64_t type: int64_t
direction: out
description: | description: |
The time when the first row of the image sensor active array is exposed. The time when the first row of the image sensor active array is exposed.
@ -511,6 +541,7 @@ controls:
- AfMode: - AfMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
The mode of the AF (autofocus) algorithm. The mode of the AF (autofocus) algorithm.
@ -575,6 +606,7 @@ controls:
- AfRange: - AfRange:
type: int32_t type: int32_t
direction: inout
description: | description: |
The range of focus distances that is scanned. The range of focus distances that is scanned.
@ -602,6 +634,7 @@ controls:
- AfSpeed: - AfSpeed:
type: int32_t type: int32_t
direction: inout
description: | description: |
Determine whether the AF is to move the lens as quickly as possible or Determine whether the AF is to move the lens as quickly as possible or
more steadily. more steadily.
@ -620,6 +653,7 @@ controls:
- AfMetering: - AfMetering:
type: int32_t type: int32_t
direction: inout
description: | description: |
The parts of the image used by the AF algorithm to measure focus. The parts of the image used by the AF algorithm to measure focus.
enum: enum:
@ -636,6 +670,7 @@ controls:
- AfWindows: - AfWindows:
type: Rectangle type: Rectangle
direction: inout
description: | description: |
The focus windows used by the AF algorithm when AfMetering is set to The focus windows used by the AF algorithm when AfMetering is set to
AfMeteringWindows. AfMeteringWindows.
@ -665,6 +700,7 @@ controls:
- AfTrigger: - AfTrigger:
type: int32_t type: int32_t
direction: in
description: | description: |
Start an autofocus scan. Start an autofocus scan.
@ -690,6 +726,7 @@ controls:
- AfPause: - AfPause:
type: int32_t type: int32_t
direction: in
description: | description: |
Pause lens movements when in continuous autofocus mode. Pause lens movements when in continuous autofocus mode.
@ -734,6 +771,7 @@ controls:
- LensPosition: - LensPosition:
type: float type: float
direction: inout
description: | description: |
Set and report the focus lens position. Set and report the focus lens position.
@ -768,6 +806,7 @@ controls:
- AfState: - AfState:
type: int32_t type: int32_t
direction: out
description: | description: |
The current state of the AF algorithm. The current state of the AF algorithm.
@ -825,6 +864,7 @@ controls:
- AfPauseState: - AfPauseState:
type: int32_t type: int32_t
direction: out
description: | description: |
Report whether the autofocus is currently running, paused or pausing. Report whether the autofocus is currently running, paused or pausing.
@ -860,6 +900,7 @@ controls:
- HdrMode: - HdrMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Set the mode to be used for High Dynamic Range (HDR) imaging. Set the mode to be used for High Dynamic Range (HDR) imaging.
@ -926,6 +967,7 @@ controls:
- HdrChannel: - HdrChannel:
type: int32_t type: int32_t
direction: out
description: | description: |
The HDR channel used to capture the frame. The HDR channel used to capture the frame.
@ -960,6 +1002,7 @@ controls:
- Gamma: - Gamma:
type: float type: float
direction: inout
description: | description: |
Specify a fixed gamma value. Specify a fixed gamma value.
@ -968,6 +1011,7 @@ controls:
- DebugMetadataEnable: - DebugMetadataEnable:
type: bool type: bool
direction: inout
description: | description: |
Enable or disable the debug metadata. Enable or disable the debug metadata.

View file

@ -10,6 +10,7 @@ vendor: draft
controls: controls:
- AePrecaptureTrigger: - AePrecaptureTrigger:
type: int32_t type: int32_t
direction: inout
description: | description: |
Control for AE metering trigger. Currently identical to Control for AE metering trigger. Currently identical to
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER. ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER.
@ -31,6 +32,7 @@ controls:
- NoiseReductionMode: - NoiseReductionMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Control to select the noise reduction algorithm mode. Currently Control to select the noise reduction algorithm mode. Currently
identical to ANDROID_NOISE_REDUCTION_MODE. identical to ANDROID_NOISE_REDUCTION_MODE.
@ -59,6 +61,7 @@ controls:
- ColorCorrectionAberrationMode: - ColorCorrectionAberrationMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Control to select the color correction aberration mode. Currently Control to select the color correction aberration mode. Currently
identical to ANDROID_COLOR_CORRECTION_ABERRATION_MODE. identical to ANDROID_COLOR_CORRECTION_ABERRATION_MODE.
@ -79,6 +82,7 @@ controls:
- AeState: - AeState:
type: int32_t type: int32_t
direction: out
description: | description: |
Control to report the current AE algorithm state. Currently identical to Control to report the current AE algorithm state. Currently identical to
ANDROID_CONTROL_AE_STATE. ANDROID_CONTROL_AE_STATE.
@ -108,6 +112,7 @@ controls:
- AwbState: - AwbState:
type: int32_t type: int32_t
direction: out
description: | description: |
Control to report the current AWB algorithm state. Currently identical Control to report the current AWB algorithm state. Currently identical
to ANDROID_CONTROL_AWB_STATE. to ANDROID_CONTROL_AWB_STATE.
@ -129,6 +134,7 @@ controls:
- SensorRollingShutterSkew: - SensorRollingShutterSkew:
type: int64_t type: int64_t
direction: out
description: | description: |
Control to report the time between the start of exposure of the first Control to report the time between the start of exposure of the first
row and the start of exposure of the last row. Currently identical to row and the start of exposure of the last row. Currently identical to
@ -136,6 +142,7 @@ controls:
- LensShadingMapMode: - LensShadingMapMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Control to report if the lens shading map is available. Currently Control to report if the lens shading map is available. Currently
identical to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE. identical to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE.
@ -149,6 +156,7 @@ controls:
- PipelineDepth: - PipelineDepth:
type: int32_t type: int32_t
direction: out
description: | description: |
Specifies the number of pipeline stages the frame went through from when Specifies the number of pipeline stages the frame went through from when
it was exposed to when the final completed result was available to the it was exposed to when the final completed result was available to the
@ -163,6 +171,7 @@ controls:
- MaxLatency: - MaxLatency:
type: int32_t type: int32_t
direction: out
description: | description: |
The maximum number of frames that can occur after a request (different The maximum number of frames that can occur after a request (different
than the previous) has been submitted, and before the result's state than the previous) has been submitted, and before the result's state
@ -172,6 +181,7 @@ controls:
- TestPatternMode: - TestPatternMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Control to select the test pattern mode. Currently identical to Control to select the test pattern mode. Currently identical to
ANDROID_SENSOR_TEST_PATTERN_MODE. ANDROID_SENSOR_TEST_PATTERN_MODE.
@ -229,6 +239,7 @@ controls:
- FaceDetectMode: - FaceDetectMode:
type: int32_t type: int32_t
direction: inout
description: | description: |
Control to select the face detection mode used by the pipeline. Control to select the face detection mode used by the pipeline.
@ -262,6 +273,7 @@ controls:
- FaceDetectFaceRectangles: - FaceDetectFaceRectangles:
type: Rectangle type: Rectangle
direction: out
description: | description: |
Boundary rectangles of the detected faces. The number of values is Boundary rectangles of the detected faces. The number of values is
the number of detected faces. the number of detected faces.
@ -273,6 +285,7 @@ controls:
- FaceDetectFaceScores: - FaceDetectFaceScores:
type: uint8_t type: uint8_t
direction: out
description: | description: |
Confidence score of each of the detected faces. The range of score is Confidence score of each of the detected faces. The range of score is
[0, 100]. The number of values should be the number of faces reported [0, 100]. The number of values should be the number of faces reported
@ -285,6 +298,7 @@ controls:
- FaceDetectFaceLandmarks: - FaceDetectFaceLandmarks:
type: Point type: Point
direction: out
description: | description: |
Array of human face landmark coordinates in format [..., left_eye_i, Array of human face landmark coordinates in format [..., left_eye_i,
right_eye_i, mouth_i, left_eye_i+1, ...], with i = index of face. The right_eye_i, mouth_i, left_eye_i+1, ...], with i = index of face. The
@ -298,6 +312,7 @@ controls:
- FaceDetectFaceIds: - FaceDetectFaceIds:
type: int32_t type: int32_t
direction: out
description: | description: |
Each detected face is given a unique ID that is valid for as long as the Each detected face is given a unique ID that is valid for as long as the
face is visible to the camera device. A face that leaves the field of face is visible to the camera device. A face that leaves the field of

View file

@ -9,6 +9,7 @@ vendor: rpi
controls: controls:
- StatsOutputEnable: - StatsOutputEnable:
type: bool type: bool
direction: inout
description: | description: |
Toggles the Raspberry Pi IPA to output the hardware generated statistics. Toggles the Raspberry Pi IPA to output the hardware generated statistics.
@ -21,6 +22,7 @@ controls:
- Bcm2835StatsOutput: - Bcm2835StatsOutput:
type: uint8_t type: uint8_t
size: [n] size: [n]
direction: out
description: | description: |
Span of the BCM2835 ISP generated statistics for the current frame. Span of the BCM2835 ISP generated statistics for the current frame.
@ -33,6 +35,7 @@ controls:
- ScalerCrops: - ScalerCrops:
type: Rectangle type: Rectangle
size: [n] size: [n]
direction: out
description: | description: |
An array of rectangles, where each singular value has identical An array of rectangles, where each singular value has identical
functionality to the ScalerCrop control. This control allows the functionality to the ScalerCrop control. This control allows the