From patchwork Thu Mar 10 20:51:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15440 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 6B2C4BF415 for ; Thu, 10 Mar 2022 20:51:44 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id AABEF632ED; Thu, 10 Mar 2022 21:51:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1646945503; bh=VO8/u67fpPf51y20xXn2IZR/lGfY0XBRVR13z/rHl3Y=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=K2MYaQDW5no1y9o3kSi8tuHntAcKHN+H0IlaTUR7lWoHs11kOJTr3N1nWesiJZFCG e3Cmr+efKbH3Q7/UpcsD7AYxoBpeNNdTzBSH+IZdSAEppTCUjnGqDQyA56lpiH6wc9 855w/RC8MMW1bpNVG9PvHpr71LrGoqC1H3FVUZhDRpxmGOXz6t2xx0u3NtjJqJnpkA kKbJ5JzjTbXzsIzdlt7d4QiB7x55DJbvHzGb15acwRl+muetzHLnXcaIVpeVPywk8l eLBD4DcbxyEr5hPN+y+f1nld6aK0mZyKtVFvz49RTzJMSptqj4eD6Jawh84b6lpadV onA1BEZp0C4kw== 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 964F5604E9 for ; Thu, 10 Mar 2022 21:51:42 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="R6gv7Pjy"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [103.251.226.203]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 25109491; Thu, 10 Mar 2022 21:51:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1646945502; bh=VO8/u67fpPf51y20xXn2IZR/lGfY0XBRVR13z/rHl3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=R6gv7PjyoO2s+hlvODfxfPzo1z6qmhZbVxBJTn6Jljkxmxjo0kmzfQYYXFgVd5Yok mb1NfyXO1uZdBlzspAXykK1lJwpOyK9C4+7UB0GO5E6MrYmCoUvivPtd//se5KjZqX OidPG4WCWU5Wc9M1CJtwKm4INPnChlvqkBm/ZjLQ= To: libcamera-devel@lists.libcamera.org Date: Fri, 11 Mar 2022 02:21:29 +0530 Message-Id: <20220310205130.336361-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220310205130.336361-1-umang.jain@ideasonboard.com> References: <20220310205130.336361-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/3] ipa: ipu3: Mark the beginning and end of a frame 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: , X-Patchwork-Original-From: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Jean-Michel Hautbois Introduce the skeleton for two functions which will be used to instantiate a frame context, and do everything needed when a frame is received. Do the same for the other end, once the algorithms have run and updated the frame context to later deallocate the corresponding frame context. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Kieran Bingham Signed-off-by: Umang Jain --- src/ipa/ipu3/ipu3.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp index 81788b9a..3d5c5706 100644 --- a/src/ipa/ipu3/ipu3.cpp +++ b/src/ipa/ipu3/ipu3.cpp @@ -163,6 +163,14 @@ private: void setControls(unsigned int frame); void calculateBdsGrid(const Size &bdsOutputSize); + /* + * Internal events that mark the beginning of processing a new frame + * to the point that it has successfully completed processing its + * statistics. + */ + void frameStarted(const uint32_t frame); + void frameCompleted(const uint32_t frame); + std::map buffers_; ControlInfoMap ctrls_; @@ -491,6 +499,14 @@ void IPAIPU3::unmapBuffers(const std::vector &ids) } } +void IPAIPU3::frameStarted([[maybe_unused]] const uint32_t frame) +{ +} + +void IPAIPU3::frameCompleted([[maybe_unused]] const uint32_t frame) +{ +} + /** * \brief Prepare the ISP to process the Request * \param[in] frame The frame number @@ -549,6 +565,8 @@ void IPAIPU3::processControls(const uint32_t frame, [[maybe_unused]] const ControlList &controls) { /* \todo Start processing for 'frame' based on 'controls'. */ + + frameStarted(frame); } /** @@ -620,6 +638,8 @@ void IPAIPU3::parseStatistics(unsigned int frame, */ statsBufferReady.emit(frame, ctrls); + + frameCompleted(frame); } /**