From patchwork Tue Dec 21 05:21:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 15197 X-Patchwork-Delegate: paul.elder@ideasonboard.com 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 136D2BE080 for ; Tue, 21 Dec 2021 05:21:43 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C1F4A608ED; Tue, 21 Dec 2021 06:21:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Dlgn4tlV"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D2FD4608A2 for ; Tue, 21 Dec 2021 06:21:39 +0100 (CET) Received: from pyrite.mediacom.info (unknown [IPv6:2604:2d80:ad90:fb00:96fd:8874:873:6c16]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0D98D101E; Tue, 21 Dec 2021 06:21:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1640064099; bh=uBFR11xKqXOmJgRca5o3ENHlVxF4uUpFvAtKkooXDh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dlgn4tlVVJgTl3uB/FzcsqT+mkd5wPsviHNZl/m7hYvVr1oLcmJ9IGvhbzSHtgK7l T6bbPcsxfjKZgFlOLKvalO29UKP0gpcni2egoDdFb3tkNo7gsjFzS92D7vcSuZ9WMy Qy4e1SFPmict//QJRpfYCJpv2qdVDrfWN5p5NdrA= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Mon, 20 Dec 2021 23:21:16 -0600 Message-Id: <20211221052117.2665228-4-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20211221052117.2665228-1-paul.elder@ideasonboard.com> References: <20211221052117.2665228-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 3/3] android: capabilities: Add static black levels 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" Plumb SENSOR_BLACK_LEVEL_PATTERN into the static metadata. Get the information from the sensor database. Note that nothing is added to the capability detector, as black level pattern will always be added to the static metadata. Add a comment to document it. Bug: https://bugs.libcamera.org/show_bug.cgi?id=48 Signed-off-by: Paul Elder --- src/android/camera_capabilities.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/android/camera_capabilities.cpp b/src/android/camera_capabilities.cpp index bc62a928..c716f4bf 100644 --- a/src/android/camera_capabilities.cpp +++ b/src/android/camera_capabilities.cpp @@ -1342,6 +1342,16 @@ int CameraCapabilities::initializeStaticMetadata() whiteLevel); availableCharacteristicsKeys_.insert(ANDROID_SENSOR_INFO_WHITE_LEVEL); + /* This is required for FULL. */ + std::vector blackLevels = { 0, 0, 0, 0 }; + if (properties.contains(properties::SensorFixedBlackLevels)) { + const Span &vals = + properties.get(properties::SensorFixedBlackLevels); + blackLevels = std::vector(vals.begin(), vals.end()); + } + staticMetadata_->addEntry(ANDROID_SENSOR_BLACK_LEVEL_PATTERN, blackLevels); + availableCharacteristicsKeys_.insert(ANDROID_SENSOR_BLACK_LEVEL_PATTERN); + /* Statistics static metadata. */ uint8_t faceDetectMode = ANDROID_STATISTICS_FACE_DETECT_MODE_OFF; staticMetadata_->addEntry(ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES,