From patchwork Mon Mar 9 12:33:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 3061 Return-Path: Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6664C62923 for ; Mon, 9 Mar 2020 13:35:35 +0100 (CET) Received: by mail-wr1-x442.google.com with SMTP id v11so10850392wrm.9 for ; Mon, 09 Mar 2020 05:35:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vIBOmEPiN9DPLPXp5Nwe4wgfwUUdjRgobQ695qMK1iM=; b=CNIYZ+APaojZX8+6HhzuNp4KFNE3sexp8ueSLdCD97IsviESraOu+WlsVmjAIqCBXQ GONJ196Dirh29f43wP5HDYWmdDqjEHOxnV1FAun/zUZum/HEg6pEQg6zhq+46u4Nauu0 CLAq3jFPL9MwLNbJbJVdUnK1pkps6BolevQ3VwGAPxoynG2/ZBJX0S9vjBc/Qc50ygLq G/MtVYjBO2lwls4MHzxJWQEMRxzHooivZD5p+vrL6vOggqBoWxqBKOvrl6IktcpO31U+ /d/HvmH1NodMuBA6x4tDS8QxPBgShb3kxJaxAievBtHl/brzrdTUqa7qm+6Lt2WDlqDD zxdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vIBOmEPiN9DPLPXp5Nwe4wgfwUUdjRgobQ695qMK1iM=; b=V070UnYxdvYf6EqMWcmICXwmYYN2MgaecnyutKi+XyFlauueuz5CY/s8ZFG6nhEVJm 08FFC9d2rk7NO6Gcq3pHRVQ7l7OXK8JWsudiozfJWm3Mhi5WfsEIynME8cuEqA0XamZw Qn3G3ocygT/S3agsZMdBdcnendZ1LLijrVIQDR+/67Ri0b/BCWAez8m2aI6bmMbrbPG3 WBVtgOIbcNCTtZRFnsTiS5re9zStxyzEZE5hSIiqEV3EoUPCpZZ+RGk6mWlDaV8VQ/m/ GrPZklOIvL2NanCw2xuvxGSZnZlEbxO0Enbegb5hbvugzJN8EJC58OqViMbgh6lCSJFw ih9w== X-Gm-Message-State: ANhLgQ2EqrkOLn73stXrA/Cxlx0V6/sB2fljFgbq6Ef2AvMY7Bvaknqu 8Hj/6W3br/8VaQgUsNIaio9aQlzl9vcVUg== X-Google-Smtp-Source: ADFU+vuBjOY59vU+XCpb9sKvPtyKwS9tAz0uUZJ0lywwz0cCBoZppJbPQjng3VRm82vJj/ILj3vIEg== X-Received: by 2002:adf:82ee:: with SMTP id 101mr20626058wrc.7.1583757334843; Mon, 09 Mar 2020 05:35:34 -0700 (PDT) Received: from naushir-VirtualBox.pitowers.org (cust51-dsl50.idnet.net. [212.69.50.51]) by smtp.gmail.com with ESMTPSA id z135sm25693827wmc.20.2020.03.09.05.35.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 05:35:34 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Mon, 9 Mar 2020 12:33:16 +0000 Message-Id: <20200309123319.630-4-naush@raspberrypi.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200309123319.630-1-naush@raspberrypi.com> References: <20200309123319.630-1-naush@raspberrypi.com> Subject: [libcamera-devel] [PATCH v2 3/6] libcamera: controls: Add AE related 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: , X-List-Received-Date: Mon, 09 Mar 2020 12:35:35 -0000 AeMeteringMode, AeConstraintMode, and AeExposureMode are new enum type controls used to specify operating modes in the AE algorithm. All modes may not be supported by all platforms. ExposureValue is a new double type control used to set the log2 exposure adjustment for the AE algorithm. Signed-off-by: Naushir Patuck --- src/libcamera/control_ids.yaml | 121 +++++++++++++++++++++++++++++---- 1 file changed, 109 insertions(+), 12 deletions(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 5bbe65ae..da1a7b43 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -23,24 +23,104 @@ controls: \sa AeEnable - - AwbEnable: - type: bool + - AeMeteringMode: + type: int32_t description: | - Enable or disable the AWB. - - \sa ManualGain + Specify a metering mode for the AE algorithm to use. The metering + modes determine which parts of the image are used to determine the + scene brightness. Metering modes may be platform-specific and not + all metering modes may be supported. + enum: + - name: MeteringCentreWeighted + value: 0 + description: Centre-weighted metering mode. + - name: MeteringSpot + value: 1 + description: Spot metering mode. + - name: MeteringMatrix + value: 2 + description: Matrix metering mode. + - name: MeteringCustom1 + value: 3 + description: Custom metering mode 1. + - name: MeteringCustom2 + value: 4 + description: Custom metering mode 2. + - name: MeteringCustom3 + value: 5 + description: Custom metering mode 3. + - name: MeteringModeMax + value: 5 + description: Maximum allowed value (place any new values above here). - - Brightness: + - AeConstraintMode: type: int32_t - description: Specify a fixed brightness parameter + description: | + Specify a constraint mode for the AE algorithm to use. These determine + how the measured scene brightness is adjusted to reach the desired + target exposure. Constraint modes may be platform specific, and not + all constaint modes may be supported. + enum: + - name: ConstraintNormal + value: 0 + description: Default constraint mode. + - name: ConstraintHighlight + value: 1 + description: Highlight constraint mode. + - name: ConstraintCustom1 + value: 2 + description: Custom constraint mode 1. + - name: ConstraintCustom2 + value: 3 + description: Custom constraint mode 2. + - name: ConstraintCustom3 + value: 4 + description: Custom constraint mode 3. + - name: ConstraintModeMax + value: 4 + description: Maximum allowed value (place any new values above here). - - Contrast: + - AeExposureMode: type: int32_t - description: Specify a fixed contrast parameter + description: | + Specify an exposure mode for the AE algorithm to use. These specify + how the desired total exposure is divided between the shutter time + and the sensor's analogue gain. The exposure modes are platform + spcific, and not all exposure modes may be supported. + enum: + - name: ExposureNormal + value: 0 + description: Default metering mode. + - name: ExposureSport + value: 1 + description: Sport metering mode (favouring short shutter times). + - name: ExposureLong + value: 2 + description: Exposure mode allowing long exposure times. + - name: ExposureCustom1 + value: 3 + description: Custom exposure mode 1. + - name: ExposureCustom2 + value: 4 + description: Custom exposure mode 2. + - name: ExposureCustom3 + value: 5 + description: Custom exposure mode 3. + - name: ExposureModeMax + value: 5 + description: Maximum allowed value (place any new values above here). - - Saturation: - type: int32_t - description: Specify a fixed saturation parameter + - ExposureValue: + type: float + description: | + Specify an Exposure Value (EV) parameter. The EV parameter will only be + applied if the AE alogrithm is currently enabled. + + By convention EV adjusts the exposure as log2. For example + EV = [-2, -1, 0.5, 0, 0.5, 1, 2] results in an exposure adjustment + of [1/4x, 1/2x, 1/sqrt(2)x, 1x, sqrt(2)x, 2x, 4x]. + + \sa AeEnable - ManualExposure: type: int32_t @@ -57,4 +137,21 @@ controls: applied to all colour channels. \sa ManualExposure + + - AwbEnable: + type: bool + description: | + Enable or disable the AWB. + + - Brightness: + type: int32_t + description: Specify a fixed brightness parameter + + - Contrast: + type: int32_t + description: Specify a fixed contrast parameter + + - Saturation: + type: int32_t + description: Specify a fixed saturation parameter ...