From patchwork Fri Jul 16 10:56:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13006 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 D6D6FC3228 for ; Fri, 16 Jul 2021 10:56:53 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 249EF6853A; Fri, 16 Jul 2021 12:56:53 +0200 (CEST) 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="SDzovBlw"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 04DF868521 for ; Fri, 16 Jul 2021 12:56:51 +0200 (CEST) Received: from pyrite.rasen.tech (unknown [IPv6:2400:4051:61:600:2c71:1b79:d06d:5032]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 578B33F0; Fri, 16 Jul 2021 12:56:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1626433010; bh=Pchpv+q/E5Ho48feOKxZPoRY3hqJG9ZzqLt0oayF7AY=; h=From:To:Cc:Subject:Date:From; b=SDzovBlwvWkGJiAls2L79LM88c+ElFiGga/iCqrgNdmiste9gW3pe6hgHZFcsws1a x9b0nYtxKdVWeKreNXO0lvhi6nv2f0E6D6px0kNr2omuLsro18i8v0TTS0d+vcoejV 5O/XND6Q5QAgVETWYf0pSuRRbcmRpc+DHvOTzg4Q= From: Paul Elder To: libcamera-devel@lists.libcamera.org Date: Fri, 16 Jul 2021 19:56:10 +0900 Message-Id: <20210716105631.158153-1-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v4 00/21] Preliminary FULL plumbing 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" This series depends on "android: Drive-by cleanups". This patch series adds controls and plumbing necessary for 5 controls to satisfy FULL requirements: - AeLock - AeEnable (AE_MODE) - AwbLock - AwbMode - MaxLatency (SYNC_MAX_LATENCY) New in v3, 1/21 adds a constructor for ControlInfo that takes boolean values. In v4, this has been upgraded so that it actually works. New in v4, 2/21 adds convenience functions to CameraMetadata, and 3/21 fixes some templates in CameraMetadata. Patch 5/21 has the plumbing for capability detection. New in v4, at the end we tally up all the requirements to enable capabilities, instead of turning them off as we set the static metadata. This cleans up the code a lot New in v3, patch 6/21 adds helpers for setting android metadata for libcamera controls, to help keep the HAL capability tracking cleaner. New in v4, patch 7/21 moves static and request and result keys into a set and member variable of CameraCapabilities, to ease adding new controls later. New in v4, patch 8/21 adds skeletal manual and still request templates. Patches 9/21 to 12/21 add the necessary controls. Patches 9/21 and 13/21 to 16/21 plumb the controls into the HAL. They all plumb into the static metadata, and only a few into the result metadata. In v4, they are also plumbed into processControls and result metadata, though not yet to the manual and still templates. Patches 17/21 to 21/21 plumb the controls into the IPU3 pipeline handler. I want review focused on the first half, patches 1/21 to 8/21, because that is the foundation that the rest is built on top of. I'm hoping to merge them before the other half. Paul Elder (21): controls: Add boolean constructor for ControlInfo android: metadata: Add hasEntry and entryContains android: metadata: Fix addEntry template type android: jpeg: get ISO from SENSOR_SENSITIVITY android: Add infrastructure for determining capabilities and hardware level android: Add helpers for setting android metadata from libcamera controls android: capabilities: Make keys list into set and member variable android: Add skeletal still and manual request templates android, controls: Add and plumb MaxLatency control controls: Replace AeLocked with AeState, and add AeLock controls: Replace AwbEnable with AwbMode controls: Replace AwbLocked with AwbState, and add AwbLock android: Plumb AeEnable control android: Plumb AeLock control android: Plumb AwbMode control android: Plumb AwbLock control pipeline: ipu3: Set MaxLatency ControlInfo pipeline: ipu3: Set AeEnable ControlInfo pipeline: ipu3: Set AeLock ControlInfo pipeline: ipu3: Set AwbMode ControlInfo pipeline: ipu3: Set AwbLock ControlInfo include/libcamera/controls.h | 2 + include/libcamera/ipa/raspberrypi.h | 1 - src/android/camera_capabilities.cpp | 642 +++++++++++++++++------ src/android/camera_capabilities.h | 20 + src/android/camera_device.cpp | 43 +- src/android/camera_metadata.cpp | 21 + src/android/camera_metadata.h | 7 +- src/android/jpeg/post_processor_jpeg.cpp | 5 +- src/ipa/raspberrypi/raspberrypi.cpp | 32 +- src/ipa/rkisp1/rkisp1.cpp | 13 +- src/libcamera/control_ids.yaml | 220 +++++--- src/libcamera/controls.cpp | 28 + src/libcamera/pipeline/ipu3/ipu3.cpp | 5 + test/controls/control_info.cpp | 33 ++ test/controls/control_list.cpp | 6 +- 15 files changed, 786 insertions(+), 292 deletions(-)