summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-09-09 17:07:58 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-03-08 15:38:15 +0100
commitda6c0a692af5d3a21d76ce3915f8e09c454c8d66 (patch)
treed447269051f4f446ebaab80d33aa14830a72ea60
parent6da18d1deba1f9f76ae24cd9fd70cd8aeb2304ef (diff)
libcamera: control_ids: Introduce LensShadingEnable
Introduce a control to enable and disable LSC and replace the draft android control. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
-rw-r--r--src/android/camera_capabilities.cpp4
-rw-r--r--src/libcamera/control_ids.yaml19
2 files changed, 7 insertions, 16 deletions
diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index 1bfeaea4..040ad734 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 adea5f90..b3493f63 100644
--- a/src/libcamera/control_ids.yaml
+++ b/src/libcamera/control_ids.yaml
@@ -694,6 +694,11 @@ 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.
+
# ----------------------------------------------------------------------------
# Draft controls section
@@ -829,20 +834,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