From patchwork Sun May 19 11:56:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 20070 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 C0FA7BDE6B for ; Sun, 19 May 2024 11:56:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A98376346B; Sun, 19 May 2024 13:56:33 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="hpOUVIpr"; 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 65FEB63469 for ; Sun, 19 May 2024 13:56:31 +0200 (CEST) Received: from fedora.local (unknown [IPv6:2405:201:2015:f873:9278:2c85:fd02:c5f5]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BE51349E; Sun, 19 May 2024 13:56:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1716119780; bh=OWb41xADyxj98gFVstkRj3vIj7Jyy1dJgTmP5Gh+OFU=; h=From:To:Cc:Subject:Date:From; b=hpOUVIprH130xDy5oFrMi6vt6NFpNW3pUdoHi1wlv6nwjmComF7BNML8z+8GlW5XB PEmhGOc+tFpgHoD9xcnyP7zs2oXHimuCrVe7RAW50i+T8dXEyII06JiwQ9Ng3MPFp0 cbGzj4+Ts/SEx9fQvPmFwcIVl78RW1asgxwZWZig= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain Subject: [PATCH v2 0/4] libcamera: rkisp1: Plumb i.MX8MP DW100 dewarper Date: Sun, 19 May 2024 17:26:18 +0530 Message-ID: <20240519115622.32170-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. Changes in v2: - Fix raw capture configuration, disable dewarper in that case 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 | 165 +++++++++++++++++- .../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, 275 insertions(+), 11 deletions(-) create mode 100644 src/libcamera/pipeline/rkisp1/rkisp1_dewarper.cpp create mode 100644 src/libcamera/pipeline/rkisp1/rkisp1_dewarper.h