From patchwork Fri May 31 05:25:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 20158 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 0F774BD87C for ; Fri, 31 May 2024 05:25:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 00C89634B6; Fri, 31 May 2024 07:25:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="ldH4vRtn"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 04B6861A39 for ; Fri, 31 May 2024 07:25:16 +0200 (CEST) Received: from fedora.local (unknown [IPv6:2409:4056:ecf:2c0c:629d:1df6:d7ca:cb53]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 83DE0B53; Fri, 31 May 2024 07:25:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1717133111; bh=6hx7KfP9bOMrG1zy33rmDR1BPtk1lnW+h1gUpoZEX48=; h=From:To:Cc:Subject:Date:From; b=ldH4vRtnGCs7zDgIIC3XPKXy8UZf/m9X6B67/fyRHvyZQv9F5ILEYvU4fxLlMQVVC qsaTXA52g5UIi/fECJEPbg+MpRGEcKb8cklTkwPfE0Wh0Sa1BFu4CSb8YXDnFOvN3N WdLDN7mdZA2VeE7wbOIABmgjS9ppfrhkLThsqQzY= From: Umang Jain To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , Andrey Konovalov , Umang Jain Subject: [PATCH v3 0/4] libcamera: converter: Replace usage of stream index by Stream pointer Date: Fri, 31 May 2024 10:55:01 +0530 Message-ID: <20240531052505.150921-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" The converter interface uses the unsigned int output stream index to map to the output frame buffers. This is cumbersome to implement new converters because one has to keep around additional book keeping to track the streams with their correct indexes. The v4l2_converter_m2m and simple pipeline handler are adapt to use the new interface. This work roped in software ISP as well, which also seems to use indexes (although it doesn't implement converter interface) because of a common conversionQueue_ queue used for converter_ and swIsp_. Patch 1/4 and 2/4 drop redundant validation of outputs std::map<>. Patch 3/4 renames private class V4L2M2MConverter::Stream to V4L2M2Mconverter::V4L2M2MStream Patch 4/4 replaces the stream index usage from converter interface and soft isp. Tested-by: Andrei Konovalov # sm8250 RB5 --- Tested with mxc-isi running software isp on i.MX8MP platform --- Changes in v3: - Fix issue while running soft-isp - Fix missing Doxygen changes changes in v2: - Split out patches 1/4 and 2/4 to tackle validation/sanity check - Rename V4L2M2MConverter::Stream to V4L2M2Mconverter::V4L2M2MStream Umang Jain (4): converter: converter_v4l2_m2m: Rectify streams sanity check libcamera: software_isp: Drop unnecessary sanity check converter: converter_v4l2_m2m: Rename private Stream class libcamera: converter: Replace usage of stream index by Stream pointer include/libcamera/internal/converter.h | 5 +- .../internal/converter/converter_v4l2_m2m.h | 13 ++-- .../internal/software_isp/software_isp.h | 5 +- src/libcamera/converter.cpp | 6 +- .../converter/converter_v4l2_m2m.cpp | 77 ++++++++++--------- src/libcamera/pipeline/simple/simple.cpp | 14 ++-- src/libcamera/software_isp/software_isp.cpp | 26 +++---- 7 files changed, 72 insertions(+), 74 deletions(-)