From patchwork Tue Jan 20 12:26:19 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Klug X-Patchwork-Id: 25886 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 39630BDCBF for ; Tue, 20 Jan 2026 12:26:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E5DF661FDA; Tue, 20 Jan 2026 13:26:53 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="BBVAyNwp"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2068761FD8 for ; Tue, 20 Jan 2026 13:26:52 +0100 (CET) Received: from ideasonboard.com (unknown [IPv6:2a00:6020:448c:6c00:b09a:fcc3:e9a4:a9a8]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id CC1E12169; Tue, 20 Jan 2026 13:26:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1768911981; bh=/8uZXMnK91LgMoPn0RFpCq1WsPCslKEFgkjxgIcafUQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=BBVAyNwpqns5NWK2bpm5Nh08b+7fHEH7nri32qtk0S9wsedAfSFwhGHnN+W/iWBRS oRwiIH54z9JjiRRPd51NZGMaGpe7hFmeX7kDPgyx3PzaeJYGmheD42M/A+S+0paCkY GsqeA+wJh3ZClA0nC05Bs5T0LEJCbw9Ukr+lCKLQ= From: Stefan Klug Date: Tue, 20 Jan 2026 13:26:19 +0100 Subject: [PATCH v5 14/15] libcamera: control_ids: Introduce LensShadingCorrectionEnable MIME-Version: 1.0 Message-Id: <20260120-sklug-lsc-resampling-v2-dev-v5-14-ef5cec7b299f@ideasonboard.com> References: <20260120-sklug-lsc-resampling-v2-dev-v5-0-ef5cec7b299f@ideasonboard.com> In-Reply-To: <20260120-sklug-lsc-resampling-v2-dev-v5-0-ef5cec7b299f@ideasonboard.com> To: libcamera-devel@lists.libcamera.org Cc: Stefan Klug , Jacopo Mondi X-Mailer: b4 0.14.2 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 LensShadingCorrectionEnable control to enable and disable LSC. This is useful to assess the working and quality of the lens shading correction at runtime as well as being able to disable the correction in case it shall be done manually in post processing. Signed-off-by: Jacopo Mondi Signed-off-by: Stefan Klug --- Changes in v5: - Readd this patch to have a separate patch for the control id - Dropped android specific changes Changes in v2: - Renamed LensShadingEnable to LensShadingCorrectionEnable - Fixed android code to properly handle the boolean value - Added "only if tuned" info sentence to the control description --- src/libcamera/control_ids_core.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libcamera/control_ids_core.yaml b/src/libcamera/control_ids_core.yaml index 8e99bd84825f6060dbc323be3f4b0cd6283e0942..ced98e4625bfba9165be4f93d1fd2756881a2d1b 100644 --- a/src/libcamera/control_ids_core.yaml +++ b/src/libcamera/control_ids_core.yaml @@ -1356,4 +1356,13 @@ controls: Enable or disable lens dewarping. This control is only available if lens dewarp parameters are configured in the tuning file. + - LensShadingCorrectionEnable: + type: bool + direction: inout + description: | + Enable or disable the lens shading algorithm. + + This control is only available when there are valid lens shading + correction parameters available in the tuning file. + ...