From patchwork Thu Jul 9 08:41:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 8702 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 63017BDB1C for ; Thu, 9 Jul 2020 08:38:17 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 3892B611B7; Thu, 9 Jul 2020 10:38:17 +0200 (CEST) Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [217.70.178.231]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 94DD6611B1 for ; Thu, 9 Jul 2020 10:38:14 +0200 (CEST) Received: from uno.lan (2-224-242-101.ip172.fastwebnet.it [2.224.242.101]) (Authenticated sender: jacopo@jmondi.org) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0C8F010000B; Thu, 9 Jul 2020 08:38:13 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Thu, 9 Jul 2020 10:41:19 +0200 Message-Id: <20200709084128.5316-12-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200709084128.5316-1-jacopo@jmondi.org> References: <20200709084128.5316-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 11/20] libcamera: ipu3: Adjust full frame picture to 32 pixels 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" To respect the same constraint introduced in validate() that the maximum ImgU output size shall be at least 32 pixels smaller than the full frame size, adjust the sizes assigned to the StillCapture role in generateConfiguration(). Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/ipu3.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 18f4a02cc270..d07f1a7b5ae8 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -320,10 +320,14 @@ CameraConfiguration *PipelineHandlerIPU3::generateConfiguration(Camera *camera, /* * Use the sensor resolution aligned to the ImgU * output constraints. + * + * \todo Give 32 pixels from the sensor frame size + * for the IF and BDS rectangles to scale. See + * the todo note for te same operation in validate(). */ - size.width = std::min(sensorResolution.width, + size.width = std::min(sensorResolution.width - 32, IPU3_OUTPUT_MAX_WIDTH); - size.height = std::min(sensorResolution.height, + size.height = std::min(sensorResolution.height - 32, IPU3_OUTPUT_MAX_HEIGHT); size.width &= ~IPU3_OUTPUT_WIDTH_ALIGN; size.height &= ~IPU3_OUTPUT_HEIGHT_ALIGN;