From patchwork Tue Oct 14 07:52:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 24627 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id E2A33BF415 for ; Tue, 14 Oct 2025 07:53:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A6500605EA; Tue, 14 Oct 2025 09:53:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="rNjLIFZq"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id A5CE4605DD for ; Tue, 14 Oct 2025 09:53:31 +0200 (CEST) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:61fb:8e55:ff1e:be62]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 2712CC73; Tue, 14 Oct 2025 09:51:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1760428313; bh=2Hc+TYFyl1w104gmWwZ01Zd68dWJEywjDmfnavqXN/o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rNjLIFZqm/dSwQr5v7l8DuI5Myiwu+zpuQhxwFAQTas140NCh7UergAMIfa7eJ3hF MJOyFEV2cXkQKfUakOccAA7jlTjpbqACVjqTCYLfwhRxsnckCa5tpL1aYfLey6Vg8m mJskxWNaDKWyrejWqfDifTlfNFKBm6CR3hFvlqeU= From: Stefan Klug To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Jacopo Mondi Subject: [PATCH v1 11/12] libcamera: control_ids: Introduce LensShadingEnable Date: Tue, 14 Oct 2025 09:52:33 +0200 Message-ID: <20251014075252.2876485-12-stefan.klug@ideasonboard.com> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20251014075252.2876485-1-stefan.klug@ideasonboard.com> References: <20251014075252.2876485-1-stefan.klug@ideasonboard.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Introduce a control to enable and disable LSC and replace the draft android control. Signed-off-by: Jacopo Mondi Signed-off-by: Stefan Klug --- 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(-) 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 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()); + data.push_back(value.get()); } 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