From patchwork Fri Sep 11 16:20:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9574 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 51F38BDB1D for ; Fri, 11 Sep 2020 16:16:57 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6553B62DB4; Fri, 11 Sep 2020 18:16:56 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CF01260534 for ; Fri, 11 Sep 2020 18:16:55 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id ACD83240003; Fri, 11 Sep 2020 16:16:54 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Sep 2020 18:20:34 +0200 Message-Id: <20200911162039.61933-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911162039.61933-1-jacopo@jmondi.org> References: <20200911162039.61933-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 1/6] 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: , Cc: hanlinchen@chromium.org 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. Reviewed-by: Niklas Söderlund Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- 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 Fri Sep 11 16:20:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9575 X-Patchwork-Delegate: jacopo@jmondi.org 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 A7173BDB1D for ; Fri, 11 Sep 2020 16:16:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8058162DF5; Fri, 11 Sep 2020 18:16:58 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id DF75460534 for ; Fri, 11 Sep 2020 18:16:56 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 00FCA240006; Fri, 11 Sep 2020 16:16:55 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Sep 2020 18:20:35 +0200 Message-Id: <20200911162039.61933-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911162039.61933-1-jacopo@jmondi.org> References: <20200911162039.61933-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 2/6] libcamera: property_ids: Define draft properties 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: , Cc: hanlinchen@chromium.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Libcamera is in the process of defining its own set of properties, to advertise the camera capabilities. To temporary close the gap in the Android camera HAL and support all static metadata required in the LIMITED hw level, define a set of Draft properties whose values are taken from their Android definition, in order to allow pipeline handlers to support Android. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/property_ids.yaml | 70 +++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml index 74ad0195d631..62bed9f3844d 100644 --- a/src/libcamera/property_ids.yaml +++ b/src/libcamera/property_ids.yaml @@ -640,4 +640,74 @@ controls: \todo Rename this property to ActiveAreas once we will have property categories (i.e. Properties::PixelArray::ActiveAreas) + - DraftAvailableNoiseReductionModes: + type: int32_t + size: [n] + description: | + Draft property to report the list of supported noise reduction modes. + Currently identical to + ANDROID_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES. + 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. + + - DraftAvailableColorCorrectionAberrationModes: + type: int32_t + size: [n] + description: | + Draft property to report the list of supported color correction + aberration modes. Currently identical to + ANDROID_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES. + 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. + + - DraftAvailableLensShadingMapModes: + type: int32_t + size: [n] + description: | + Draft property to report the list of supported lens shading map modes. + Currently identical to + ANDROID_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES. + 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. + + - DraftPipelineMaxDepth: + type: int32_t + description: | + Draft control to report the maximum number of pipeline stages a frame + has to go through from when it is exposed to when it is available to + applications. Currently identical to ANDROID_REQUEST_PIPELINE_MAX_DEPTH. + ... From patchwork Fri Sep 11 16:20:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9576 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 EBEE8C3B5C for ; Fri, 11 Sep 2020 16:16:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A9BB562DFB; Fri, 11 Sep 2020 18:16:58 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 09C4E62D86 for ; Fri, 11 Sep 2020 18:16:58 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 10AAC24000A; Fri, 11 Sep 2020 16:16:56 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Sep 2020 18:20:36 +0200 Message-Id: <20200911162039.61933-4-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911162039.61933-1-jacopo@jmondi.org> References: <20200911162039.61933-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 3/6] 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: , Cc: hanlinchen@chromium.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Libcamera is in the process of defining its own set of controls to enable applications to control the image capture process and return information on the captured frames. To temporary close the gap in the Android camera HAL 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. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/control_ids.yaml | 253 +++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 4c415545dcae..6d4655349241 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -284,4 +284,257 @@ 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. + + \sa properties::DraftAvailableNoiseReductionModes. + 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. + + \sa properties::DraftAvailableColorCorrectionAberrationModes. + 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 + + - 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. + + \sa properties::DraftAvailableLensShadingMapModes. + 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. + + - DraftPipelineDepth: + type: int32_t + description: | + Specifies the number of pipeline stages the frame went through from when + it was exposed to when the final completed result was available to the + framework. Always less than or equal to DraftPipelineMaxDepth. Currently + identical to ANDROID_REQUEST_PIPELINE_DEPTH. + + The typical value for this control is 3 as a frame is first exposed, + captured and then processed in a single pass through the ISP. Any + additional processing step performed after the ISP pass (in example face + detection, additional format conversions etc) count as an additional + pipeline stage. + + \sa properties::DraftPipelineMaxDepth + ... From patchwork Fri Sep 11 16:20:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9577 X-Patchwork-Delegate: jacopo@jmondi.org 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 EC75CBDB1D for ; Fri, 11 Sep 2020 16:17:00 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C5FA662DF1; Fri, 11 Sep 2020 18:17:00 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 0C6C262DEF for ; Fri, 11 Sep 2020 18:16:59 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 2BCAB24000D; Fri, 11 Sep 2020 16:16:58 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Sep 2020 18:20:37 +0200 Message-Id: <20200911162039.61933-5-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911162039.61933-1-jacopo@jmondi.org> References: <20200911162039.61933-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 4/6] libcamera: pipeline_handler: Initialize properties_ 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: , Cc: hanlinchen@chromium.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Initialize the CameraData::properties_ field with the list of libcamera defined properties. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- include/libcamera/internal/pipeline_handler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index a4e1b529c461..e579da711b33 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -17,6 +17,7 @@ #include #include +#include #include #include "libcamera/internal/ipa_proxy.h" @@ -37,7 +38,7 @@ class CameraData { public: explicit CameraData(PipelineHandler *pipe) - : pipe_(pipe) + : pipe_(pipe), properties_(properties::properties) { } virtual ~CameraData() {} From patchwork Fri Sep 11 16:20:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9578 X-Patchwork-Delegate: jacopo@jmondi.org 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 41065BDB1D for ; Fri, 11 Sep 2020 16:17:02 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 17F5E62DEF; Fri, 11 Sep 2020 18:17:02 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2448A60534 for ; Fri, 11 Sep 2020 18:17:00 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 2FF9524000A; Fri, 11 Sep 2020 16:16:59 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Sep 2020 18:20:38 +0200 Message-Id: <20200911162039.61933-6-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911162039.61933-1-jacopo@jmondi.org> References: <20200911162039.61933-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 5/6] libcamera: ipu3: Initialize draft properties 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: , Cc: hanlinchen@chromium.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Initialize three draft properties for the IPU3 platform. IPU3 reports a maximum of three processing stages: exposure, capture and ISP processing and does not support noise reduction and color aberration. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/ipu3/ipu3.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 2d881fe28f98..9ce329a83f5d 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -13,6 +13,7 @@ #include #include +#include #include #include @@ -776,7 +777,14 @@ int PipelineHandlerIPU3::registerCameras() continue; /* Initialize the camera properties. */ - data->properties_ = cio2->sensor()->properties(); + for (const auto &sensorProperty : cio2->sensor()->properties()) + data->properties_.set(sensorProperty.first, + sensorProperty.second); + data->properties_.set(properties::DraftPipelineMaxDepth, 3); + data->properties_.set(properties::DraftAvailableNoiseReductionModes, + { static_cast(properties::DRAFT_NOISE_REDUCTION_MODE_OFF) }); + data->properties_.set(properties::DraftAvailableColorCorrectionAberrationModes, + { static_cast(properties::DRAFT_COLOR_CORRECTION_ABERRATION_OFF) }); /** * \todo Dynamically assign ImgU and output devices to each From patchwork Fri Sep 11 16:20:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 9579 X-Patchwork-Delegate: jacopo@jmondi.org 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 7E283BDB1D for ; Fri, 11 Sep 2020 16:17:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5AB9B62D86; Fri, 11 Sep 2020 18:17:04 +0200 (CEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 27E5062DA1 for ; Fri, 11 Sep 2020 18:17:01 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 38722240006; Fri, 11 Sep 2020 16:17:00 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Sep 2020 18:20:39 +0200 Message-Id: <20200911162039.61933-7-jacopo@jmondi.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200911162039.61933-1-jacopo@jmondi.org> References: <20200911162039.61933-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC 6/6] libcamera: ipu3: Report pipeline depth 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: , Cc: hanlinchen@chromium.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Report for each request the pipeline depth describing the number of processing steps the frames went into. This change shows a limitation in the current implementation as the number of processing steps a frame has been run through is a property of each Stream. Currently we report the maximum depth among all the returned frames. Signed-off-by: Jacopo Mondi Reviewed-by: Kieran Bingham --- src/libcamera/pipeline/ipu3/ipu3.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 9ce329a83f5d..26ea26430f8e 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -41,6 +42,10 @@ static constexpr unsigned int IMGU_OUTPUT_HEIGHT_ALIGN = 4; static constexpr unsigned int IMGU_OUTPUT_WIDTH_MARGIN = 64; static constexpr unsigned int IMGU_OUTPUT_HEIGHT_MARGIN = 32; +static const ControlInfoMap IPU3Controls = { + { &controls::DraftPipelineDepth, ControlInfo(2, 3) } +}; + class IPU3CameraData : public CameraData { public: @@ -786,6 +791,8 @@ int PipelineHandlerIPU3::registerCameras() data->properties_.set(properties::DraftAvailableColorCorrectionAberrationModes, { static_cast(properties::DRAFT_COLOR_CORRECTION_ABERRATION_OFF) }); + data->controlInfo_ = IPU3Controls; + /** * \todo Dynamically assign ImgU and output devices to each * stream and camera; as of now, limit support to two cameras @@ -848,6 +855,7 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer) return; /* Mark the request as complete. */ + request->controls().set(controls::DraftPipelineDepth, 3); pipe_->completeRequest(camera_, request); } @@ -873,6 +881,7 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer) if (request->findBuffer(&rawStream_)) { bool isComplete = pipe_->completeBuffer(camera_, request, buffer); if (isComplete) { + request->controls().set(controls::DraftPipelineDepth, 2); pipe_->completeRequest(camera_, request); return; }