From patchwork Mon Oct 19 12:51:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 10096 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 A7E16BDB1F for ; Mon, 19 Oct 2020 12:52:10 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 72147613AD; 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="lcdgmQOp"; dkim-atps=neutral Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D8345610C4 for ; Mon, 19 Oct 2020 14:52:06 +0200 (CEST) Received: by mail-wm1-x344.google.com with SMTP id q5so12730870wmq.0 for ; Mon, 19 Oct 2020 05:52:06 -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=uIX91jVoGdT6Gr8iX2Oiu/Y8Rs2VGCZWrOox2SJ1UZE=; b=lcdgmQOptFl7DL6ncRlgQKj7HLxeNw7dziajMgvrSDNJ00WwrDxUpaq0V1+JU2kzZp TAFynin5IlLdvLWszDAGmVkMmRmY4kfq5tWsZpDVQQpOt7VEiTkOP8OWeCXcQvzKnIQm TO7WRlY27ErckdH3Ld9sR11BAgcFdr06dcHBT+iHXpkrqvp/sCaFiZKY2ghwVpQza5FC yL0RWo0BwlncfNa27A8HVbvuZEcxMt1yE0WdSjnZ5PfUgzb2S4hLsMFWcWU6Rq4Y0J+g yIGf4GKIne+1hpnaLtwrA7CaLN6LC2ILd0cGdxjc803Y97h15cFrsC0nmuzRkaZwc28f FaEw== 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=uIX91jVoGdT6Gr8iX2Oiu/Y8Rs2VGCZWrOox2SJ1UZE=; b=ntd8hfWV/o2oPA75xUtd0Q0KLV1PYInAHZLh94KLgBKr+7oBUV0HDTO2knFrruLdaU k3fxremYe/f6ukf+5NATrhisIquQc0zFzWEJ4506atU9cv9bBtbehPlj7pvBNr9wmcY+ wUtpT+XX00NcsQ6/zVGTOcWJx88RF1884dvcm4XsIRTjIuTN7CyGH6SgZRruQiptpaA+ sHs06umxwnkyRyzcWG6oiypAOYbuUuTLSxmfjvnkOoUWydC9KmVG3hozZGEXT+dPVwmJ 2dsH/iON0FAtHlIxJtQNqF3IZbZhk3VkEA36ev9abjyiVSfmOxHtQKnLmOEQepL7A1dK BxPA== X-Gm-Message-State: AOAM533GoQi9n1RUKvpgdUPvj9NhRprE94gIzpKyW4WC9K4D4M4n7aCQ JtaFG04g4qvX9L8YJ0sazcizz8a7TRjDng== X-Google-Smtp-Source: ABdhPJwSa9kQNuHWbtKx3DHvp+4Tpi2Vh5B4wgdaD92EyZXPr/12xoBTBDhCq6kStrrQAq1zO5bkpw== X-Received: by 2002:a1c:7707:: with SMTP id t7mr18573074wmi.54.1603111926355; Mon, 19 Oct 2020 05:52:06 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Oct 2020 05:52:05 -0700 (PDT) From: David Plowman To: libcamera-devel@lists.libcamera.org Date: Mon, 19 Oct 2020 13:51:53 +0100 Message-Id: <20201019125156.26751-3-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 2/5] libcamera: Initialise the ScalerCropMaximum property 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" Add a default initialisation according to the sensor resolution, though it will need updating when the camera mode changes. Signed-off-by: David Plowman --- src/libcamera/camera_sensor.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libcamera/camera_sensor.cpp b/src/libcamera/camera_sensor.cpp index 78c7ceec..ae25c5c6 100644 --- a/src/libcamera/camera_sensor.cpp +++ b/src/libcamera/camera_sensor.cpp @@ -279,6 +279,12 @@ int CameraSensor::init() */ resolution_ = sizes_.back(); + /* + * Set a default value for the ScalerCropMaximum, though it will have to + * be updated when new camera modes are chosen. + */ + properties_.set(properties::ScalerCropMaximum, Rectangle{ 0, 0, resolution_ }); + return 0; }