From patchwork Tue Jan 19 14:37:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 10896 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 E9E3EBD808 for ; Tue, 19 Jan 2021 14:37:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C020A6815D; Tue, 19 Jan 2021 15:37:05 +0100 (CET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7DD4B68155 for ; Tue, 19 Jan 2021 15:37:00 +0100 (CET) X-Originating-IP: 93.61.96.190 Received: from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it [93.61.96.190]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 449E0C0007 for ; Tue, 19 Jan 2021 14:37:00 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Tue, 19 Jan 2021 15:37:08 +0100 Message-Id: <20210119143711.153517-9-jacopo@jmondi.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210119143711.153517-1-jacopo@jmondi.org> References: <20210119143711.153517-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 08/11] libcamera: ipu3: Report ScalerCrop in metadata 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" Report in the Request metadata the scaler crop region as requested by application through the request controls. No actual scaling is applied in the pipeline at the moment. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- src/libcamera/pipeline/ipu3/ipu3.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index fc5592f33032..329b9d51cf1b 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -968,6 +968,11 @@ void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer) request->metadata().set(controls::draft::PipelineDepth, 3); /* \todo Move the ExposureTime control to the IPA. */ request->metadata().set(controls::ExposureTime, exposureTime_); + /* \todo Handle the scaler crop region for each request. */ + if (request->controls().contains(controls::ScalerCrop)) { + Rectangle cropRegion = request->controls().get(controls::ScalerCrop); + request->metadata().set(controls::ScalerCrop, cropRegion); + } pipe_->completeRequest(request); }