From patchwork Wed Mar 8 16:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 18358 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 65159BE080 for ; Wed, 8 Mar 2023 16:40:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3520A626D1; Wed, 8 Mar 2023 17:40:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1678293644; bh=NblqHh0uIJhLvlMbbYFfNgZZBM/UvnmW/AeEoh9EpBQ=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UxJASbGOO/no5rbvRq9xUTHmVjSQ+GYwgwmbMorHxFFcw5tmyNxr8lM4lhr/6cBaI z/zEyDUcGh9l2r5b52gwAbPlWRjGKlelNFcpRpU1MOiIoVddniG4JZAL+6fx9e8ux+ g79Y0tNVPgamHqg3PnshrIki3i0DNYoFxFxXbiLk6F85nz4pQl6yL49+6zm19tj+ku DjFyRj+cA9VdtNF6l4XK8qNicSOXKJNqIyTN2L8Ec2vJgM20YihPQhZLPZSV3wIG0O bSFx6eTpQl0PylfWYN1ZW3ImrHZG+WMPhEjJ5cFVtvsNc5VR/o/ko9+JSbo3Q2XFSN 4Kq6Wdcl1rrGw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7D33662693 for ; Wed, 8 Mar 2023 17:40:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="jx3en1Wz"; dkim-atps=neutral Received: from uno.homenet.telecomitalia.it (host-79-47-54-87.retail.telecomitalia.it [79.47.54.87]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BD127576; Wed, 8 Mar 2023 17:40:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1678293642; bh=NblqHh0uIJhLvlMbbYFfNgZZBM/UvnmW/AeEoh9EpBQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jx3en1Wz0ol7yxMyVIXd+9E1OiQyi3VcK09ywR+j7srYvSP86ctbmY3PnuQa45Gpq eqFW+vko5+jfX4gxBu26edsThHgkLp8PQXQjLYcizrppjQkPYJ2VQhhODGJUrWynpm 0cr9hI1eBkXggdapTkm3vkB3o8bmJMhfP51OMMoA= To: libcamera-devel@lists.libcamera.org Date: Wed, 8 Mar 2023 17:40:26 +0100 Message-Id: <20230308164028.235638-2-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230308164028.235638-1-jacopo.mondi@ideasonboard.com> References: <20230308164028.235638-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/3] libcamera: control_ids: Introduce LensShadingEnable 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: , X-Patchwork-Original-From: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Jacopo Mondi Introduce a control to enable and disable LSC and replace the draft android control. The control is used to report the algorithm current state when part of a completed Request metadata. Signed-off-by: Jacopo Mondi --- src/android/camera_capabilities.cpp | 4 ++-- src/libcamera/control_ids.yaml | 20 ++++++-------------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index 1bfeaea4b121..040ad7347773 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -1187,10 +1187,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.yaml b/src/libcamera/control_ids.yaml index adea5f90acc5..9457fb3de7b0 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -694,6 +694,12 @@ 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. When reported in the + Request metadata the control reflects the algorithm's current state. + # ---------------------------------------------------------------------------- # Draft controls section @@ -829,20 +835,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