From patchwork Thu Jun 27 13:46:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 20430 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 A138ABDB1D for ; Thu, 27 Jun 2024 13:47:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 9DCD362CA0; Thu, 27 Jun 2024 15:47:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="DlYT+JMU"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 108B362C95 for ; Thu, 27 Jun 2024 15:47:03 +0200 (CEST) Received: from fedora.local (unknown [IPv6:2405:201:2015:f873:c173:4b:4a04:3a21]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 484A0593; Thu, 27 Jun 2024 15:46:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1719495999; bh=/eHqrrypFunt1gXUa2bq5yKnlbLvtUdGyRjVm0T4VIg=; h=From:To:Cc:Subject:Date:From; b=DlYT+JMUttuPdkWVOPVtpAb2MhbPs6kStVVtxDJ9iI1WeFgmb+jdSGS1HYDf1G245 nXoT3XtZRh2R8PQdmkvm5PwG/wROiTWbmrMDSX107iEHChMww4IPI4guJIExoN44Yc xB1oKYaU/Rq9L84pddF47xVKy6MB5A+PGq30Hc2U= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Umang Jain Subject: [PATCH v4 0/5] libcamera: rkisp1: Plumb the ConverterDW100 converter Date: Thu, 27 Jun 2024 19:16:51 +0530 Message-ID: <20240627134656.582462-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. It is modelled as Converter (inherited from V4L2M2MConverter) and has a helper to support scaler crop control. The converter acts as a base for now, additional development around dewarping capabilites and support in simple pipeline-handler [1] can be added on top as focused tasks. Patch 1/5 add ability to add features to the Converter interface. Each Converter can dictate its own features it can support Patch 2/5 adds crop feature and gets implemented in the V4L2 M2M converter. Patch 3/5 prepares the rkisp1 pipeline handler to register controls for the camera, outside of the IPA. The ConverterDW100 will let us support scaler crop - which will be registered as one of the camera controls. Patch 4/5 adds a ConverterDW100 class inheriting from converter_v4l2_m2m. This provides a scaler crop setting helper. A \todo is added here to handle the case when rectangles get modified while applying. This requires a bit of dicussion I think. Patch 5/5 plumbs the ConverterDW100 in the rkisp1 pipeline handler This series is based on top of [2] Testing: -------- The series is tested on i.MX8MP and cam utility, by setting scaler crop control via capture script with IMX283 attached to isp0. changes in v4: - rework Converter Interface to expose Features - Add Crop Feature interface in Converter setCrop and setCropBound - Implement cropping in V4L2M2MConverter for V4L2 M2M based converters - Introduce useDewarper_ to denote when to use dewarper (simplied code reading). - Trivial typo fixing. Changes in v3: - Base on top of [2] - Model dewarper class as converter, so can be used with Simple pipeline-handler/ISI Changes in v2: - Fix raw capture configuration, disable dewarper in that case [1]: Supporting the ConverterDW100 is simple pipeline handler should be easy, adding the compatibles string and registering the converter with REGISTER_CONVERTER(). However, for testing the i.MX8MP -> ISI -> ConverterDW100 (dewarper) requires me to have a YUV sensor attached, which I have not abled to source it yet. Once I source it, I will test the ConverterDW100 on simple pipeline handler (I don't expect any issues there but still..) and prepare a integration patch. I hope this doesn't act as blocker for the series. [2] [PATCH v4 0/4] libcamera: converter: Replace usage of stream index by Stream pointer Umang Jain (5): libcamera: converter: Add interface for feature flags libcamera: converter: Add interface to support cropping capability libcamera: rkisp1: Prepare for additional camera controls libcamera: converter: Add DW100 converter class libcamera: rkisp1: Plumb the ConverterDW100 converter include/libcamera/internal/converter.h | 18 +- .../internal/converter/converter_dw100.h | 26 +++ .../internal/converter/converter_v4l2_m2m.h | 9 +- .../libcamera/internal/converter/meson.build | 1 + include/libcamera/internal/v4l2_videodevice.h | 1 + src/libcamera/converter.cpp | 57 +++++- src/libcamera/converter/converter_dw100.cpp | 64 +++++++ .../converter/converter_v4l2_m2m.cpp | 90 ++++++++- src/libcamera/converter/meson.build | 1 + src/libcamera/pipeline/rkisp1/rkisp1.cpp | 172 +++++++++++++++++- src/libcamera/pipeline/rkisp1/rkisp1_path.cpp | 12 +- src/libcamera/pipeline/rkisp1/rkisp1_path.h | 14 ++ src/libcamera/v4l2_videodevice.cpp | 32 ++++ 13 files changed, 480 insertions(+), 17 deletions(-) create mode 100644 include/libcamera/internal/converter/converter_dw100.h create mode 100644 src/libcamera/converter/converter_dw100.cpp