[{"id":12478,"web_url":"https://patchwork.libcamera.org/comment/12478/","msgid":"<20200913113637.GF695456@oden.dyn.berto.se>","date":"2020-09-13T11:36:37","subject":"Re: [libcamera-devel] [RFC 3/6] libcamera: control_ids: Define\n\tdraft controls","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Jacopo,\n\nThanks for this massive patch :-)\n\nOn 2020-09-11 18:20:36 +0200, Jacopo Mondi wrote:\n> Libcamera is in the process of defining its own set of controls\n> to enable applications to control the image capture process and\n> return information on the captured frames.\n> \n> To temporary close the gap in the Android camera HAL and support all\n> controls required in the LIMITED hw level, define a set of Draft\n> controls whose values are taken from their Android definition, in order\n> to allow pipeline handlers to support Android.\n> \n> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>\n> ---\n>  src/libcamera/control_ids.yaml | 253 +++++++++++++++++++++++++++++++++\n>  1 file changed, 253 insertions(+)\n> \n> diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml\n> index 4c415545dcae..6d4655349241 100644\n> --- a/src/libcamera/control_ids.yaml\n> +++ b/src/libcamera/control_ids.yaml\n> @@ -284,4 +284,257 @@ controls:\n>          order in an array of 9 floating point values.\n>  \n>        size: [3x3]\n> +\n> +  - DraftAePrecaptureTrigger:\n> +      type: int32_t\n> +      description: |\n> +        Draft control for AE metering trigger. Currently identical to\n> +        ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER.\n> +\n> +        Whether the camera device will trigger a precapture metering sequence\n> +        when it processes this request.\n> +      enum:\n> +        - name: DRAFT_AE_PRECAPTURE_TRIGGER_IDLE\n> +          value: 0\n> +          description: The trigger is idle.\n> +        - name: DRAFT_AE_PRECAPTURE_TRIGGER_START\n> +          value: 1\n> +          description: The pre-capture AE metering is started by the camera.\n> +        - name: DRAFT_AE_PRECAPTURE_TRIGGER_CANCEL\n> +          value: 2\n> +          description: |\n> +            The camera will cancel any active or completed metering sequence.\n> +            The AE algorithm is reset to its initial state.\n> +\n> +  - DraftAfTrigger:\n> +      type: int32_t\n> +      description: |\n> +        Draft control for AF trigger. Currently identical to\n> +        ANDROID_CONTROL_AF_TRIGGER.\n> +\n> +        Whether the camera device will trigger autofocus for this request.\n> +      enum:\n> +        - name: DRAFT_AF_TRIGGER_IDLE\n> +          value: 0\n> +          description: The trigger is idle.\n> +        - name: DRAFT_AF_TRIGGER_START\n> +          value: 1\n> +          description: The AF routine is started by the camera.\n> +        - name: DRAFT_AF_TRIGGER_CANCEL\n> +          value: 2\n> +          description: |\n> +            The camera will cancel any active trigger and the AF routine is\n> +            reset to its initial state.\n> +\n> +  - DraftNoiseReductionMode:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to select the noise reduction algorithm mode. Currently\n> +        identical to ANDROID_NOISE_REDUCTION_MODE.\n> +\n> +        Mode of operation for the noise reduction algorithm.\n> +\n> +        \\sa properties::DraftAvailableNoiseReductionModes.\n> +      enum:\n> +        - name: DRAFT_NOISE_REDUCTION_MODE_OFF\n> +          value: 0\n> +          description: No noise reduction is applied\n> +        - name: DRAFT_NOISE_REDUCTION_MODE_FAST\n> +          value: 1\n> +          description: |\n> +            Noise reduction is applied without reducing the frame rate.\n> +        - name: DRAFT_NOISE_REDUCTION_MODE_HIGH_QUALITY\n> +          value: 2\n> +          description: |\n> +            High quality noise reduction at the expense of frame rate.\n> +        - name: DRAFT_NOISE_REDUCTION_MODE_MINIMAL\n> +          value: 3\n> +          description: |\n> +            Minimal noise reduction is applied without reducing the frame rate.\n> +        - name: DRAFT_NOISE_REDUCTION_MODE_ZSL\n> +          value: 4\n> +          description: |\n> +            Noise reduction is applied at different levels to different streams.\n> +\n> +  - DraftColorCorrectionAberrationMode:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to select the color correction aberration mode. Currently\n> +        identical to ANDROID_COLOR_CORRECTION_ABERRATION_MODE.\n> +\n> +        Mode of operation for the chromatic aberration correction algorithm.\n> +\n> +        \\sa properties::DraftAvailableColorCorrectionAberrationModes.\n> +      enum:\n> +        - name: DRAFT_COLOR_CORRECTION_ABERRATION_OFF\n> +          value: 0\n> +          description: No aberration correction is applied.\n> +        - name: DRAFT_COLOR_CORRECTION_ABERRATION_FAST\n> +          value: 1\n> +          description: Aberration correction will not slow down the frame rate.\n> +        - name: DRAFT_COLOR_CORRECTION_ABERRATION_HIGH_QUALITY\n> +          value: 2\n> +          description: |\n> +            High quality aberration correction which might reduce the frame\n> +            rate.\n> +\n> +  - DraftAeState:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to report the current AE algorithm state. Currently\n> +        identical to ANDROID_CONTROL_AE_STATE.\n> +\n> +        Current state of the AE algorithm.\n> +      enum:\n> +        - name: DRAFT_AE_STATE_INACTIVE\n> +          value: 0\n> +          description: The AE algorithm is inactive.\n> +        - name: DRAFT_AE_STATE_SEARCHING\n> +          value: 1\n> +          description: The AE algorithm has not converged yet.\n> +        - name: DRAFT_AE_STATE_CONVERGED\n> +          value: 2\n> +          description: The AE algorithm has converged.\n> +        - name: DRAFT_AE_STATE_LOCKED\n> +          value: 3\n> +          description: The AE algorithm is locked.\n> +        - name: DRAFT_AE_STATE_FLASH_REQUIRED\n> +          value: 4\n> +          description: The AE algorithm would need a flash for good results\n> +        - name: DRAFT_AE_STATE_PRECAPTURE\n> +          value: 5\n> +          description: |\n> +            The AE algorithm has started a pre-capture metering session.\n> +            \\sa DraftAePrecaptureTrigger\n> +\n> +  - DraftAfState:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to report the current AF algorithm state. Currently\n> +        identical to ANDROID_CONTROL_AF_STATE.\n> +\n> +        Current state of the AF algorithm.\n> +      enum:\n> +        - name: DRAFT_AF_STATE_INACTIVE\n> +          value: 0\n> +          description: The AF algorithm is inactive.\n> +        - name: DRAFT_AF_STATE_PASSIVE_SCAN\n> +          value: 1\n> +          description: |\n> +            AF is performing a passive scan of the scene in continuous\n> +            auto-focus mode.\n> +        - name: DRAFT_AF_STATE_PASSIVE_FOCUSED\n> +          value: 2\n> +          description: |\n> +            AF believes the scene is in focus, but might restart scanning.\n> +        - name: DRAFT_AF_STATE_ACTIVE_SCAN\n> +          value: 3\n> +          description: |\n> +            AF is performing a scan triggered by an AF trigger request.\n> +            \\sa DraftAfTrigger\n> +        - name: DRAFT_AF_STATE_FOCUSED_LOCK\n> +          value: 4\n> +          description: |\n> +            AF believes has focused correctly and has locked focus.\n> +        - name: DRAFT_AF_STATE_NOT_FOCUSED_LOCK\n> +          value: 5\n> +          description: |\n> +            AF has not been able to focus and has locked.\n> +        - name: DRAFT_AF_STATE_PASSIVE_UNFOCUSED\n> +          value: 6\n> +          description: |\n> +            AF has completed a passive scan without finding focus.\n> +\n> +  - DraftAwbState:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to report the current AWB algorithm state. Currently\n> +        identical to ANDROID_CONTROL_AWB_STATE.\n> +\n> +        Current state of the AWB algorithm.\n> +      enum:\n> +        - name: DRAFT_AWB_STATE_INACTIVE\n> +          value: 0\n> +          description: The AWB algorithm is inactive.\n> +        - name: DRAFT_AWB_STATE_SEARCHING\n> +          value: 1\n> +          description: The AWB algorithm has not converged yet.\n> +        - name: DRAFT_AWB_CONVERGED\n> +          value: 2\n> +          description: The AWB algorithm has converged.\n> +        - name: DRAFT_AWB_LOCKED\n> +          value: 3\n> +          description: The AWB algorithm is locked.\n> +\n> +  - DraftScalerCropRegion:\n> +      type: Rectangle\n> +      description: |\n> +        Draft control to report the region of the sensor that has been read-out.\n> +        Currently identical to ANDROID_SCALER_CROP_REGION.\n> +\n> +        The area of the sensor that has been read out, defined relatively to\n> +        the active pixel array size.\n> +\n> +        \\sa Properties::PixelArrayActiveAreas\n> +\n> +  - DraftSensorTimestamp:\n> +      type: int64_t\n> +      description: |\n> +        Draft control to report the start of exposure of the first row of the\n> +        captured image. Currently identical to ANDROID_SENSOR_TIMESTAMP.\n> +\n> +  - DraftSensorRollingShutterSkew:\n> +      type: int64_t\n> +      description: |\n> +        Draft control to report the time between the start of exposure of the\n> +        first row and the start of exposure of the last row. Currently\n> +        identical to ANDROID_SENSOR_ROLLING_SHUTTER_SKEW\n> +\n> +  - DraftLensShadingMapMode:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to report if the lens shading map is available. Currently\n> +        identical to ANDROID_STATISTICS_LENS_SHADING_MAP_MODE.\n> +\n> +        \\sa properties::DraftAvailableLensShadingMapModes.\n> +      enum:\n> +        - name: DRAFT_LENS_SHADING_MAP_MODE_OFF\n> +          value: 0\n> +          description: No lens shading map mode is available.\n> +        - name: DRAFT_LENS_SHADING_MAP_MODE_ON\n> +          value: 1\n> +          description: The lens shading map mode is available.\n> +\n> +  - DraftSceneFlicker:\n> +      type: int32_t\n> +      description: |\n> +        Draft control to report the detected scene light frequency. Currently\n> +        identical to ANDROID_STATISTICS_SCENE_FLICKER.\n> +      enum:\n> +        - name: DRAFT_SCENE_FLICKER_OFF\n> +          value: 0\n> +          description: No flickering detected.\n> +        - name: DRAFT_SCENE_FLICKER_50HZ\n> +          value: 0\n> +          description: 50Hz flickering detected.\n> +        - name: DRAFT_SCENE_FLICKER_60HZ\n> +          value: 0\n> +          description: 50Hz flickering detected.\n\ns/50/60/\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> +\n> +  - DraftPipelineDepth:\n> +      type: int32_t\n> +      description: |\n> +        Specifies the number of pipeline stages the frame went through from when\n> +        it was exposed to when the final completed result was available to the\n> +        framework. Always less than or equal to DraftPipelineMaxDepth. Currently\n> +        identical to ANDROID_REQUEST_PIPELINE_DEPTH.\n> +\n> +        The typical value for this control is 3 as a frame is first exposed,\n> +        captured and then processed in a single pass through the ISP. Any\n> +        additional processing step performed after the ISP pass (in example face\n> +        detection, additional format conversions etc) count as an additional\n> +        pipeline stage.\n> +\n> +        \\sa properties::DraftPipelineMaxDepth\n> +\n>  ...\n> -- \n> 2.28.0\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 04233BF01C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 13 Sep 2020 11:36:42 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7C08A62D27;\n\tSun, 13 Sep 2020 13:36:41 +0200 (CEST)","from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 96EFA62901\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 13 Sep 2020 13:36:39 +0200 (CEST)","by mail-lj1-x242.google.com with SMTP id r24so16206683ljm.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 13 Sep 2020 04:36:39 -0700 (PDT)","from localhost (h-209-203.A463.priv.bahnhof.se. [155.4.209.203])\n\tby smtp.gmail.com with ESMTPSA id\n\tl9sm2794393ljc.37.2020.09.13.04.36.37\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tSun, 13 Sep 2020 04:36:37 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=ragnatech-se.20150623.gappssmtp.com\n\theader.i=@ragnatech-se.20150623.gappssmtp.com\n\theader.b=\"f9DW+18y\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to;\n\tbh=jiXQe7hGhNpH7q3KOsw24D2ICNws3+fPPxp8Pq8kY68=;\n\tb=f9DW+18yPC+gRZjT42hq9595XAVAuBkPMN2cFL92fkN/LoaX272GKQh9KyZljClAJe\n\tQZUxJRuQdTAU6EiGHoz3Ss/ccX1Vi83+ZX2iyyEcmJIwCuwAW8gAVK+jPl6VlxPtebDk\n\tOhC1qBDBCGu/paQDPT0jcVztnTSKgijJwqklxQlkQA1MdeMJmss3KuxwAPk+fhIk6BNM\n\thd9Eb5/RrTDDvo7DxHUVwUPgtek7KybH/phj4CsMybMYemZ+RxTiWuIMHcRRsb8U6zrt\n\tRzWr/7hJTLxhYRDVG1frrTRpqgqxc7glubE3b+3O6oTHmM5jgvyLo6TdsH6PlvGEIABE\n\tF94Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to;\n\tbh=jiXQe7hGhNpH7q3KOsw24D2ICNws3+fPPxp8Pq8kY68=;\n\tb=mn9NY31nDFTUDbS0YnTZ2/bvna2GD3TfuXLqBCma8Ldqm6CZmcFPWqkY/DQbqRmeq3\n\tSQRUbKQYWTYSV98E6VkMTzB/T3mRgYPKHYCgSb0ExEiyINiaolJECU2hB9tEB4qHH4W1\n\tXkZx5VEJIi8rwwkyGa+dlOnc+629SH0VU7jnV6DcTjRx3mreoOHIPubHK/L5AKc7epsw\n\tgaDcmJqaDcj6hKIB2wv2z8iGaQgfxblfT20bhaU8I7BMN/9vG0EKlNqYD8P8aO6BZhXg\n\tRDuo/raQrNEC1CQxxq3ZkTNrgnycecDiua4WRStGrs50O59GfEkguxZEmNm+5bBw47Z/\n\tOZpw==","X-Gm-Message-State":"AOAM5339gEP1jn13kNP3OLgx3EnieMfp5Jkqt7Z/3C2mR3wdzI3eCuOm\n\tU7gRbdY8O7gPO62ynmwBNhthEA==","X-Google-Smtp-Source":"ABdhPJz06hnfVoq0SX0+XyBHODFlwfajZXKQIUe7GrtTBU8tLcO/wwihtwoBhiNgbwSqPwbE9LTKbg==","X-Received":"by 2002:a2e:8782:: with SMTP id n2mr3751168lji.262.1599996998621;\n\tSun, 13 Sep 2020 04:36:38 -0700 (PDT)","Date":"Sun, 13 Sep 2020 13:36:37 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Jacopo Mondi <jacopo@jmondi.org>","Message-ID":"<20200913113637.GF695456@oden.dyn.berto.se>","References":"<20200911162039.61933-1-jacopo@jmondi.org>\n\t<20200911162039.61933-4-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20200911162039.61933-4-jacopo@jmondi.org>","Subject":"Re: [libcamera-devel] [RFC 3/6] libcamera: control_ids: Define\n\tdraft controls","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"hanlinchen@chromium.org, libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"iso-8859-1\"","Content-Transfer-Encoding":"quoted-printable","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]