From patchwork Sat Aug 8 10:00:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9270 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 8EC65BD87D for ; Sat, 8 Aug 2020 09:57:15 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 56A4960F22; Sat, 8 Aug 2020 11:57:15 +0200 (CEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 75C0860E4D for ; Sat, 8 Aug 2020 11:57:14 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id E84C2FF804; Sat, 8 Aug 2020 09:57:13 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sat, 8 Aug 2020 12:00:45 +0200 Message-Id: <20200808100046.5347-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200808100046.5347-1-jacopo@jmondi.org> References: <20200808100046.5347-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] libcamera: controls: Define AwbLocked control 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" Define a control to report the AWB algorithm locking state. The control definition is copied from the AeLocked one. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/control_ids.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 3560d4a81882..4c415545dcae 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -208,6 +208,17 @@ controls: value: 7 description: Maximum allowed value (place any new values above here). + - AwbLocked: + type: bool + description: | + Report the lock status of a running AWB algorithm. + + If the AWB algorithm is locked the value shall be set to true, if it's + converging it shall be set to false. If the AWB algorithm is not + running the control shall not be present in the metadata control list. + + \sa AwbEnable + - ColourGains: type: float description: | From patchwork Sat Aug 8 10:00:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9271 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 9EE3ABD87D for ; Sat, 8 Aug 2020 09:57:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 78DB660F22; Sat, 8 Aug 2020 11:57:18 +0200 (CEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 23AA660DCA for ; Sat, 8 Aug 2020 11:57:15 +0200 (CEST) X-Originating-IP: 2.224.242.101 Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 9E196FF804; Sat, 8 Aug 2020 09:57:14 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sat, 8 Aug 2020 12:00:46 +0200 Message-Id: <20200808100046.5347-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200808100046.5347-1-jacopo@jmondi.org> References: <20200808100046.5347-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] libcamera: control_ids: Define draft controls 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" Libcamera is in the process of defining its own set of controls and properties, to advertise the camera capabilities, allow applications to control the image capture process and return information on the captured frames. However, we're still not there yet to have all the controls we need to support the Android Camera3 HAL requisites. To temporary close the gap, and support all controls required in the LIMITED hw level, define a set of Draft controls whose values are taken from their Android definition, in order to allow pipeline handlers to support Android natively. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/control_ids.yaml | 242 +++++++++++++++++++++++++++++++++ 1 file changed, 242 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 4c415545dcae..cdd51911c400 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -284,4 +284,246 @@ controls: order in an array of 9 floating point values. size: [3x3] + + - DraftAePrecaptureTrigger: + type: int32_t + description: | + Draft control for AE metering trigger. Currently identical to + ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER. + + Whether the camera device will trigger a precapture metering sequence + when it processes this request. + enum: + - name: DRAFT_AE_PRECAPTURE_TRIGGER_IDLE + value: 0 + description: The trigger is idle. + - name: DRAFT_AE_PRECAPTURE_TRIGGER_START + value: 1 + description: The pre-capture AE metering is started by the camera. + - name: DRAFT_AE_PRECAPTURE_TRIGGER_CANCEL + value: 2 + description: | + The camera will cancel any active or completed metering sequence. + The AE algorithm is reset to its initial state. + + - DraftAfTrigger: + type: int32_t + description: | + Draft control for AF trigger. Currently identical to + ANDROID_CONTROL_AF_TRIGGER. + + Whether the camera device will trigger autofocus for this request. + + enum: + - name: DRAFT_AF_TRIGGER_IDLE + value: 0 + description: The trigger is idle. + - name: DRAFT_AF_TRIGGER_START + value: 1 + description: The AF routine is started by the camera. + - name: DRAFT_AF_TRIGGER_CANCEL + value: 2 + description: | + The camera will cancel any active trigger and the AF routine is + reset to its initial state. + + - DraftNoiseReductionMode: + type: int32_t + description: | + Draft control to select the noise reduction algorithm mode. Currently + identical to ANDROID_NOISE_REDUCTION_MODE. + + Mode of operation for the noise reduction algorithm. + + enum: + - name: DRAFT_NOISE_REDUCTION_MODE_OFF + value: 0 + description: No noise reduction is applied + - name: DRAFT_NOISE_REDUCTION_MODE_FAST + value: 1 + description: | + Noise reduction is applied without reducing the frame rate. + - name: DRAFT_NOISE_REDUCTION_MODE_HIGH_QUALITY + value: 2 + description: | + High quality noise reduction at the expense of frame rate. + - name: DRAFT_NOISE_REDUCTION_MODE_MINIMAL + value: 3 + description: | + Minimal noise reduction is applied without reducing the frame rate. + - name: DRAFT_NOISE_REDUCTION_MODE_ZSL + value: 4 + description: | + Noise reduction is applied at different levels to different streams. + + - DraftColorCorrectionAberrationMode: + type: int32_t + description: | + Draft control to select the color correction aberration mode. Currently + identical to ANDROID_COLOR_CORRECTION_ABERRATION_MODE. + + Mode of operation for the chromatic aberration correction algorithm. + + enum: + - name: DRAFT_COLOR_CORRECTION_ABERRATION_OFF + value: 0 + description: No aberration correction is applied. + - name: DRAFT_COLOR_CORRECTION_ABERRATION_FAST + value: 1 + description: Aberration correction will not slow down the frame rate. + - name: DRAFT_COLOR_CORRECTION_ABERRATION_HIGH_QUALITY + value: 2 + description: | + High quality aberration correction which might reduce the frame + rate. + + - DraftAeState: + type: int32_t + description: | + Draft control to report the current AE algorithm state. Currently + identical to ANDROID_CONTROL_AE_STATE. + + Current state of the AE algorithm. + + enum: + - name: DRAFT_AE_STATE_INACTIVE + value: 0 + description: The AE algorithm is inactive. + - name: DRAFT_AE_STATE_SEARCHING + value: 1 + description: The AE algorithm has not converged yet. + - name: DRAFT_AE_STATE_CONVERGED + value: 2 + description: The AE algorithm has converged. + - name: DRAFT_AE_STATE_LOCKED + value: 3 + description: The AE algorithm is locked. + - name: DRAFT_AE_STATE_FLASH_REQUIRED + value: 4 + description: The AE algorithm would need a flash for good results + - name: DRAFT_AE_STATE_PRECAPTURE + value: 5 + description: | + The AE algorithm has started a pre-capture metering session. + \sa DraftAePrecaptureTrigger + + - DraftAfState: + type: int32_t + description: | + Draft control to report the current AF algorithm state. Currently + identical to ANDROID_CONTROL_AF_STATE. + + Current state of the AF algorithm. + enum: + - name: DRAFT_AF_STATE_INACTIVE + value: 0 + description: The AF algorithm is inactive. + - name: DRAFT_AF_STATE_PASSIVE_SCAN + value: 1 + description: | + AF is performing a passive scan of the scene in continuous + auto-focus mode. + - name: DRAFT_AF_STATE_PASSIVE_FOCUSED + value: 2 + description: | + AF believes the scene is in focus, but might restart scanning. + - name: DRAFT_AF_STATE_ACTIVE_SCAN + value: 3 + description: | + AF is performing a scan triggered by an AF trigger request. + \sa DraftAfTrigger + - name: DRAFT_AF_STATE_FOCUSED_LOCK + value: 4 + description: | + AF believes has focused correctly and has locked focus. + - name: DRAFT_AF_STATE_NOT_FOCUSED_LOCK + value: 5 + description: | + AF has not been able to focus and has locked. + - name: DRAFT_AF_STATE_PASSIVE_UNFOCUSED + value: 6 + description: | + AF has completed a passive scan without finding focus. + + - DraftAwbState: + type: int32_t + description: | + Draft control to report the current AWB algorithm state. Currently + identical to ANDROID_CONTROL_AWB_STATE. + + Current state of the AWB algorithm. + enum: + - name: DRAFT_AWB_STATE_INACTIVE + value: 0 + description: The AWB algorithm is inactive. + - name: DRAFT_AWB_STATE_SEARCHING + value: 1 + description: The AWB algorithm has not converged yet. + - name: DRAFT_AWB_CONVERGED + value: 2 + description: The AWB algorithm has converged. + - name: DRAFT_AWB_LOCKED + value: 3 + description: The AWB algorithm is locked. + + - DraftScalerCropRegion: + type: Rectangle + description: | + Draft control to report the region of the sensor that has been read-out. + Currently identical to ANDROID_SCALER_CROP_REGION. + + The area of the sensor that has been read out, defined relatively to + the active pixel array size. + + \sa Properties::PixelArrayActiveAreas + \todo This will soon be required to implement digital zoom + + - DraftSensorTimestamp: + type: int64_t + description: | + Draft control to report the start of exposure of the first row of the + captured image. Currently identical to ANDROID_SENSOR_TIMESTAMP. + + - DraftSensorRollingShutterSkew: + type: int64_t + description: | + Draft control to report the time between the start of exposure of the + first row and the start of exposure of the last row. Currently + identical to ANDROID_SENSOR_ROLLING_SHUTTER_SKEW + + - DraftLensShadingMapMode: + type: int32_t + description: | + Draft control to report if the lens shading map is available. Currently + identical to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE. + + \todo Once we define a control to report the lens shading map, we can + deduce if it is available or not. Currently this will always be set to + OFF. + enum: + - name: DRAFT_LENS_SHADING_MAP_MODE_OFF + value: 0 + description: No lens shading map mode is available. + - name: DRAFT_LENS_SHADING_MAP_MODE_ON + value: 1 + description: The lens shading map mode is available. + + + - DraftSceneFlicker: + type: int32_t + description: | + Draft control to report the detected scene light frequency. Currently + identical to ANDROID_STATISTICS_SCENE_FLICKER. + + enum: + - name: DRAFT_SCENE_FLICKER_OFF + value: 0 + description: No flickering detected. + - name: DRAFT_SCENE_FLICKER_50HZ + value: 0 + description: 50Hz flickering detected. + - name: DRAFT_SCENE_FLICKER_60HZ + value: 0 + description: 50Hz flickering detected. + ...