{"id":17894,"url":"https://patchwork.libcamera.org/api/patches/17894/?format=json","web_url":"https://patchwork.libcamera.org/patch/17894/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20221124121220.47000-9-jacopo@jmondi.org>","date":"2022-11-24T12:12:19","name":"[libcamera-devel,8/9] libcamera: rkisp1: Add support for Transform","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"3d272a8bbf462c0d49bddab8d336ef9eb5d48bdd","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/17894/mbox/","series":[{"id":3638,"url":"https://patchwork.libcamera.org/api/series/3638/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=3638","date":"2022-11-24T12:12:11","name":"libcamera: camera_sensor: Centralize flips handling","version":1,"mbox":"https://patchwork.libcamera.org/series/3638/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/17894/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/17894/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 885BABDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 24 Nov 2022 12:12:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 45F1863325;\n\tThu, 24 Nov 2022 13:12:37 +0100 (CET)","from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net\n\t[217.70.183.194])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AD8AF63327\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Nov 2022 13:12:34 +0100 (CET)","(Authenticated sender: jacopo@jmondi.org)\n\tby mail.gandi.net (Postfix) with ESMTPSA id D701E4000C;\n\tThu, 24 Nov 2022 12:12:33 +0000 (UTC)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1669291957;\n\tbh=UGOOsJM9Ac1SccGfvBu28Xir5AaMsbXHKUYraf86zNY=;\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:\n\tFrom;\n\tb=ChfrGvrQzxYCiaSstYQJksiFXBn52m3VC6isYfhLrztB6V1RNoZWAagzflTavUVi0\n\tkV5KLj08kAD+JaWUs6FAcDWvH47Xe2s1WEq6EU8k1ANx+/piiJWDTg+CZqoNuGtb8A\n\tu1RHKlicTAsJL12K+k76YaJOWk4i6hDVPYh8gTDFjDfMkgEkIBqwRUCzCF91xYK6GE\n\t2O2KCZ5j7csGrVNTGOH21nm8qZgXx6URWn12c7I6zWyJd1K7WDFXLYtuy2f7E2I6hH\n\txWW1CozK55ZMlQssg0H23IJMHJ74JoYiGTrz7EhSiladQ8HcLWAmp5A28jteRToeR4\n\t4mwa8awa4nrZw==","To":"libcamera-devel@lists.libcamera.org","Date":"Thu, 24 Nov 2022 13:12:19 +0100","Message-Id":"<20221124121220.47000-9-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.38.1","In-Reply-To":"<20221124121220.47000-1-jacopo@jmondi.org>","References":"<20221124121220.47000-1-jacopo@jmondi.org>","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH 8/9] 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@jmondi.org>","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@jmondi.org>\n---\n src/libcamera/pipeline/rkisp1/rkisp1.cpp | 13 ++++++++-----\n 1 file changed, 8 insertions(+), 5 deletions(-)","diff":"diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\nindex 14741e73e050..41afc98ae2b2 100644\n--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp\n@@ -26,6 +26,7 @@\n #include <libcamera/property_ids.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@@ -430,17 +431,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 * If there are more than one stream in the configuration figure out the\n \t * order to evaluate the streams. The first stream has the highest\n@@ -529,6 +530,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","8/9"]}