From patchwork Sun May 19 08:15:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 20065 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 E5A89BD78E for ; Sun, 19 May 2024 08:15:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EA4286346B; Sun, 19 May 2024 10:15:50 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OkDoC6GY"; 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 1CC6761A57 for ; Sun, 19 May 2024 10:15:48 +0200 (CEST) Received: from fedora.local (unknown [IPv6:2405:201:2015:f873:9278:2c85:fd02:c5f5]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 340325A4; Sun, 19 May 2024 10:15:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1716106537; bh=DBFIy5ADqAYcZ89z2qVjBwrO8tqBcr0pB/+jnFGqayU=; h=From:To:Cc:Subject:Date:From; b=OkDoC6GYbgijKn4yj40a8/KbMAYOia1UhJydoPFWKcVp0Y5SWODsBbrNtrjzswoxO S9SMF6jerU6/eIlf6rAwhlqqoeiy49341RyW8LWCJR9tpGPROlhDd1MF/YFr4U3x1p 5h6nLkNl6qT2/Oe1F68En4JyKm2eHsnkNyINKvD4= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain Subject: [PATCH 0/4] libcamera: rkisp1: Plumb i.MX8MP DW100 dewarper Date: Sun, 19 May 2024 13:45:35 +0530 Message-ID: <20240519081539.29832-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.44.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" This series intends to support i.MX8MP DW100 dewarper in rkisp1 pipeline handler. Patch 1/4 prepares the rkisp1 pipeline handler to register controls for the camera, outside of the IPA. The dewarper will let us support scaler crop - which will be registered as camera controls. Patch 2/4 is also a prepartory patch to accept scaler crop rectangles for the converter_v4l2_m2m on each stream. Patch 3/4 adds a base RkISP1Dewarper class inheriting from converter_v4l2_m2m. This provides a scaler crop setting helper. Patch 4/4 finally plumbs the dewarper in the rkisp1 pipeline handler. If the scaler crop control is found set in the request, it is applied on the dewarper. The series is tested on i.MX8MP and cam utility, by setting scaler crop control via capture script. Additional development: Initially when I developed, I added support to load a dewarp config file via environment variables which then can be used to set V4L2_CID_DW100_DEWARPING_16x16_VERTEX_MAP control. However, it has needs adhoc development to support v4l2 compound controls (which also I tried) but ultimately I failed to test, if this control was really working for me. Hence, I decided to send this series without that development and hope it can be done on top of this. Umang Jain (4): libcamera: rkisp1: Prepare for additional camera controls libcamera: converter_v4l2_m2m: Support crop selection libcamera: rkisp1: Add base class DW100 dewarper libcamera: rkisp1: Plumb through RkISP1Dewarper .../internal/converter/converter_v4l2_m2m.h | 5 + .../converter/converter_v4l2_m2m.cpp | 26 +++ src/libcamera/pipeline/rkisp1/meson.build | 1 + src/libcamera/pipeline/rkisp1/rkisp1.cpp | 162 +++++++++++++++++- .../pipeline/rkisp1/rkisp1_dewarper.cpp | 38 ++++ .../pipeline/rkisp1/rkisp1_dewarper.h | 25 +++ src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 12 +- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 14 ++ 8 files changed, 272 insertions(+), 11 deletions(-) create mode 100644 src/libcamera/pipeline/rkisp1/rkisp1_dewarper.cpp create mode 100644 src/libcamera/pipeline/rkisp1/rkisp1_dewarper.h