From patchwork Mon Oct 19 12:51:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 10097 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 1B3F1BDB1F for ; Mon, 19 Oct 2020 12:52:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DD9C261373; Mon, 19 Oct 2020 14:52:10 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="oJVw8URS"; dkim-atps=neutral Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CEF2B613B7 for ; Mon, 19 Oct 2020 14:52:07 +0200 (CEST) Received: by mail-wr1-x429.google.com with SMTP id t9so11255409wrq.11 for ; Mon, 19 Oct 2020 05:52:07 -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 :mime-version:content-transfer-encoding; bh=4HzMT0ebVPZrBLwm6+ejkeV+aBJ486+lHoNIiQ8cjD0=; b=oJVw8URSBASdHW0bGhKU/oEsN1jTMVxEhMfQ0G5jGdBia81h5g21UUMnURR9g7jwAg sfmyV5RfRoh3EWWhA8jaw1sBP0xf0oDodyg7mtjolgw0b9W5mn6buf93Y8GQmgPzOis5 /x2bE1/b7tWlargcmwN2huviB2byMmkEXJZeKCWlfYpnsgWDK2usH+qwZhRmCMuYA4u1 Oci2HPkAf/igdHGMD6ug2jhSifaeYsI3JcpE81dh4W9ekA9wnCYDnC0iXOr49f4cpY7G wXWI5Kg4ibw2Ja7iLuaTOFmYq5R0cp3iK3XvirxPNumSLprzlN4gsveOtxLTMbT741Gh eq2g== 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:mime-version:content-transfer-encoding; bh=4HzMT0ebVPZrBLwm6+ejkeV+aBJ486+lHoNIiQ8cjD0=; b=AXYIifwapx+aF9D3O/RxK1HwY867iHWlyn8wUbX+4cdFxsYMD4tgC5XoOD0FQcjmId j5T52fMt7ENE5tq4InRkibTnbcnE/SRuLC5GebX+J4PWZMN+rzNhuz+d1puujSwK8KzD PalXWU0iHvfZrcrplBQd+XUmouItw0euvWnyfIsaJlu/HBgsfktY5hJ9ExBOXpaBl1Ba MQm3uy3UV3Wals6Ck6bGVpJs+lf65KMrjYtbRqAjYvGcWRuqZqb6E8oZzMLN0+imv428 9bhS8u9XQ+wWuRQsDkMfy+y6C2JaoRpONXhBSr6T/S+fJc4D/4EjqxP2quIPqkZ/Gkxq QcgQ== X-Gm-Message-State: AOAM532AEKs0fEx27vzPfY52dpE6PabguEry/dzr7Q9wtLdFCVx2DDeL f4Cck2Q8HGPO0dPFnFsxL4+Omv7Udtl23g== X-Google-Smtp-Source: ABdhPJyc1dxeJUCjJg/LeB3jbXKxtxS8uYcRTQ+gOfTaOPu8kQCqjOCp3M4xpbO+nhbxTpQaDgjbMg== X-Received: by 2002:adf:f103:: with SMTP id r3mr21155631wro.153.1603111927238; Mon, 19 Oct 2020 05:52:07 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:1ce1:9965:4328:89c4]) by smtp.gmail.com with ESMTPSA id q6sm16634335wma.0.2020.10.19.05.52.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 05:52:06 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 19 Oct 2020 13:51:54 +0100 Message-Id: <20201019125156.26751-4-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201019125156.26751-1-david.plowman@raspberrypi.com> References: <20201019125156.26751-1-david.plowman@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 3/5] libcamera: Add ScalerCrop 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" The ScalerCrop control selects how much of the sensor's output image will be scaled to form the output image. It can be used to implement digital zoom. Signed-off-by: David Plowman --- src/libcamera/control_ids.yaml | 12 ++++++++++++ src/libcamera/property_ids.yaml | 5 ++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/libcamera/control_ids.yaml b/src/libcamera/control_ids.yaml index 4c415545..c6fbcd56 100644 --- a/src/libcamera/control_ids.yaml +++ b/src/libcamera/control_ids.yaml @@ -284,4 +284,16 @@ controls: order in an array of 9 floating point values. size: [3x3] + + - ScalerCrop: + type: Rectangle + description: | + Sets the image portion that will be scaled up to form the whole of + the final output image. The selection rectangle is expressed in the + sensor's native pixels and defined relative to the size of the frame + described by the ScalerCropMaximum property. + + This control can be used to implement digital zoom. + + \sa properties::ScalerCropMaximum ... diff --git a/src/libcamera/property_ids.yaml b/src/libcamera/property_ids.yaml index 022cf65d..2d0fe9d3 100644 --- a/src/libcamera/property_ids.yaml +++ b/src/libcamera/property_ids.yaml @@ -678,7 +678,10 @@ controls: This property is valid only after the Camera has been successfully configured and its value changes whenever a new configuration is - applied. + applied. It can be used to implement digital zoom in conjunction with + the ScalerCrop control. + + \sa controls::ScalerCrop \todo Turn this property into a "maximum control value" for the ScalerCrop control once "dynamic" controls have been implemented.