From patchwork Fri Jul 12 05:29:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 20648 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 BE74DBDB1C for ; Fri, 12 Jul 2024 05:29:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 285FF63370; Fri, 12 Jul 2024 07:29:35 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ilIAoTA5"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6D203619A9 for ; Fri, 12 Jul 2024 07:29:32 +0200 (CEST) Received: from localhost.localdomain (unknown [IPv6:2405:201:2015:f873:55f8:639e:8e9f:12ec]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 12C04CC8; Fri, 12 Jul 2024 07:28:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1720762138; bh=BHNG8LgGdh0bb9lm+OQF+sYvcrjEpw2bB1veDsgIuqE=; h=From:To:Cc:Subject:Date:From; b=ilIAoTA5zuJtHsRbe2fy5FyoMVeK2ZvhIGNjiyLSyVk+lRi1jyVW0nPKh1Vd5beD9 3C1c/FhwseZiZFTKz5XnTdh8AmGBWeUFC04ewY6SlvtiEzzOfNvOh1VmkWg6NWATm6 +ALC/nYfNw1JKMrFnkGgkX34ELHsgE/c1ENw5lwc= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Xavier Roumegue , Umang Jain Subject: [RFC PATCH 0/6] converter_dw100: Add vertex map support Date: Fri, 12 Jul 2024 10:59:14 +0530 Message-ID: <20240712052920.33396-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.45.0 MIME-Version: 1.0 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 vertex map support in converter_dw100. It has been successfully tested via plumbing rkisp1 pipeline handler on i.MX8MP with identity dewarp maps. Please look at each patch for details. This is an RFC/plumbing for setting of vertex map V4L2_CID_DW100_DEWARPING_16x16_VERTEX_MAP on DW100 converter. Based on [1]. Documentation has been deliberately skipped here. It will be done later when the interface is finalised. I feel we need more implementations/integration of dewarpers, before working on an actual dewarper Converter interface. It has been highlighted at previous attempts as well [2]: ``` As we have a single converter that can perform dewarping, I'd prefer moving the Mapping support from V4L2M2MConverter to this class. It's hard to predict what other dewarpers will need, and designing an API based on a single example usually doesn't produce the best design. We can always refactor the code later when we'll get a second device. ``` I agree with above and I have felt the same while ressurcting DW100 work, hence currently tried to contain it within converter_v4l2_m2m and converter_dw100 (without touching the Converter interface). Will wait on more feedback and see what direction it will take. [1]: https://patchwork.libcamera.org/project/libcamera/list/?series=4450 [2]: https://patchwork.libcamera.org/patch/17351/#25248 Umang Jain (4): libcamera: v4l2_device: Add support for V4L2_CTRL_TYPE_U32 libcamera: converter_v4l2_m2m: Add vertex mapping class libcamera: converter_v4l2_m2m: Add helper to apply controls libcamera: converter_dw100: Load and apply dewarp vertex maps Xavier Roumegue (2): include: linux: Update headers for Dw100 dewarper engine libcamera: yaml_parser: Increase sentinel to 100k include/libcamera/controls.h | 5 + .../internal/converter/converter_dw100.h | 5 + .../internal/converter/converter_v4l2_m2m.h | 25 ++++ include/linux/dw100.h | 14 ++ src/libcamera/converter/converter_dw100.cpp | 127 ++++++++++++++++++ .../converter/converter_v4l2_m2m.cpp | 18 +++ src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 + src/libcamera/v4l2_device.cpp | 11 ++ src/libcamera/yaml_parser.cpp | 9 +- 9 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 include/linux/dw100.h