[v1,11/12] libcamera: control_ids: Introduce LensShadingEnable
diff mbox series

Message ID 20251014075252.2876485-12-stefan.klug@ideasonboard.com
State New
Headers show
Series
  • Add resampling support for polynomial LSC data
Related show

Commit Message

Stefan Klug Oct. 14, 2025, 7:52 a.m. UTC
Introduce a control to enable and disable LSC and replace the
draft android control.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/android/camera_capabilities.cpp  |  4 ++--
 src/libcamera/control_ids_core.yaml  |  6 ++++++
 src/libcamera/control_ids_draft.yaml | 14 --------------
 3 files changed, 8 insertions(+), 16 deletions(-)

Patch
diff mbox series

diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp
index b161bc6b3ed6..6fbd83695dfc 100644
--- a/src/android/camera_capabilities.cpp
+++ b/src/android/camera_capabilities.cpp
@@ -1223,10 +1223,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_core.yaml b/src/libcamera/control_ids_core.yaml
index f781865859ac..9244b7eddb77 100644
--- a/src/libcamera/control_ids_core.yaml
+++ b/src/libcamera/control_ids_core.yaml
@@ -1346,4 +1346,10 @@  controls:
         reduces the WdrExposureValue until the amount of pixels that are close
         to saturation is lower than this value.
 
+  - LensShadingEnable:
+      type: bool
+      direction: inout
+      description: |
+        Enable or disable the lens shading algorithm.
+
 ...
diff --git a/src/libcamera/control_ids_draft.yaml b/src/libcamera/control_ids_draft.yaml
index 03309eeac34f..14026de46ad6 100644
--- a/src/libcamera/control_ids_draft.yaml
+++ b/src/libcamera/control_ids_draft.yaml
@@ -110,20 +110,6 @@  controls:
        row and the start of exposure of the last row. Currently identical to
        ANDROID_SENSOR_ROLLING_SHUTTER_SKEW
 
-  - LensShadingMapMode:
-      type: int32_t
-      direction: inout
-      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.
-
   - PipelineDepth:
       type: int32_t
       direction: out