{"id":18115,"url":"https://patchwork.libcamera.org/api/1.1/patches/18115/?format=json","web_url":"https://patchwork.libcamera.org/patch/18115/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20230114194712.23272-5-jacopo.mondi@ideasonboard.com>","date":"2023-01-14T19:47:11","name":"[libcamera-devel,v2,4/5] libcamera: rkisp1: Add support for Transform","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"93ba3f078bdc95b6ed8f472c3731995a8af621f4","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/1.1/people/143/?format=json","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/18115/mbox/","series":[{"id":3711,"url":"https://patchwork.libcamera.org/api/1.1/series/3711/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3711","date":"2023-01-14T19:47:07","name":"libcamera: camera_sensor: Centralize flips handling","version":2,"mbox":"https://patchwork.libcamera.org/series/3711/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/18115/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/18115/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0602CC3294\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 14 Jan 2023 19:47:32 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3A15A625DD;\n\tSat, 14 Jan 2023 20:47:30 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 86C9D625DD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 14 Jan 2023 20:47:26 +0100 (CET)","from uno.LocalDomain (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id EE35C4D4;\n\tSat, 14 Jan 2023 20:47:25 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1673725650;\n\tbh=BKsSbLfnR3Agv3+/w4J99xXG8aa2GLCFMdmlQ3kkPOo=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=T/PfXCuUYuAjuSh4+rhKvQH8xUqT+toaz01776RZqVW0PoOJd37HefmCy4YksvjTE\n\tLTZXS79LOyMXXkNHvSSIU5bPymEW6wil2axSJoeppepORNpkSG6Om1mnnmBULxkZRm\n\tItID4zaijj3LciJat6ZQT28GPoK2do/gjN9ifQTVJvOxYWglYmoPf3oN4iPDMeN9FI\n\tpvMph9gxrMJZLGAFl4a3FUDezu3C4odxFdihRu2nJuHEtrgfxYp9hu2oIEUvDcRnoZ\n\tVR1Cd3qIjfVNdPhzbqdZZzhMOXiRxdewh+2R2WHi6aoSfbSAhJEL2cDOYEQDbCuL/3\n\txI4NrXXew3l8g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1673725646;\n\tbh=BKsSbLfnR3Agv3+/w4J99xXG8aa2GLCFMdmlQ3kkPOo=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=cjt5Lnq7+ltt1q+Io1Nj5GIYkeQ493K7qry/DZkBM2kVgxgkd9mXsqvuA90u/DoR1\n\tOf8PrQnKVUmN18VBdL5+enIi1rqeLT7Jr3o2n4LFTDq8vEFcZrg7x9hW0O91wuxUDa\n\tyFG/C+/B+7eCYumRI1CrDT3qKexnZbNkRb6D37vo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"cjt5Lnq7\"; dkim-atps=neutral","To":"libcamera-devel@lists.libcamera.org","Date":"Sat, 14 Jan 2023 20:47:11 +0100","Message-Id":"<20230114194712.23272-5-jacopo.mondi@ideasonboard.com>","X-Mailer":"git-send-email 2.39.0","In-Reply-To":"<20230114194712.23272-1-jacopo.mondi@ideasonboard.com>","References":"<20230114194712.23272-1-jacopo.mondi@ideasonboard.com>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH v2 4/5] libcamera: rkisp1: Add support for\n\tTransform","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Add support for Transform to the RkISP1 pipeline handler.\n\nThe pipeline rotates using the sensor's V/H flips, hence use the\nCameraSensor helpers to handle transformation requests from\napplications.\n\nSigned-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 16 +++++++++++-----\n 1 file changed, 11 insertions(+), 5 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex c27b3ef9bd8e..b81ad647be79 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -23,6 +23,10 @@\n #include <libcamera/control_ids.h>\n #include <libcamera/formats.h>\n #include <libcamera/framebuffer.h>\n+#include <libcamera/request.h>\n+#include <libcamera/stream.h>\n+#include <libcamera/transform.h>\n+\n #include <libcamera/ipa/core_ipa_interface.h>\n #include <libcamera/ipa/rkisp1_ipa_interface.h>\n #include <libcamera/ipa/rkisp1_ipa_proxy.h>\n@@ -469,17 +473,17 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \n \tstatus = validateColorSpaces(ColorSpaceFlag::StreamsShareColorSpace);\n \n-\tif (transform != Transform::Identity) {\n-\t\ttransform = Transform::Identity;\n-\t\tstatus = Adjusted;\n-\t}\n-\n \t/* Cap the number of entries to the available streams. */\n \tif (config_.size() > pathCount) {\n \t\tconfig_.resize(pathCount);\n \t\tstatus = Adjusted;\n \t}\n \n+\tTransform requestedTransform = transform;\n+\tTransform combined = sensor->validateTransform(&transform);\n+\tif (transform != requestedTransform)\n+\t\tstatus = Adjusted;\n+\n \t/*\n \t * Simultaneous capture of raw and processed streams isn't possible. If\n \t * there is any raw stream, cap the number of streams to one.\n@@ -589,6 +593,8 @@ CameraConfiguration::Status RkISP1CameraConfiguration::validate()\n \tif (sensorFormat_.size.isNull())\n \t\tsensorFormat_.size = sensor->resolution();\n \n+\tsensorFormat_.transform = combined;\n+\n \treturn status;\n }\n \n","prefixes":["libcamera-devel","v2","4/5"]}