From patchwork Wed Aug 18 15:53:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Michel Hautbois X-Patchwork-Id: 13390 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 C42F9BD87C for ; Wed, 18 Aug 2021 15:54:14 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 65FD1688A6; Wed, 18 Aug 2021 17:54:14 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="T7qGSFMf"; 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 8F4CD68890 for ; Wed, 18 Aug 2021 17:54:09 +0200 (CEST) Received: from tatooine.ideasonboard.com (unknown [IPv6:2a01:e0a:169:7140:946e:2bbb:370e:41e4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 2E360F1; Wed, 18 Aug 2021 17:54:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1629302049; bh=wwrgTHKy2CdyyyI3wyOynvu4iR2y/MegybHoDf442Vc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T7qGSFMfh++oElU5epqPIBxocEBFys4USFDPcV8bhuQaXYQD7AAVsZJZNChUKUGq1 0qGnIdWphBiN87ZtcDZEIl6dc9HPA4qrCtHwFgA62zF96aiFcTsaxrjIjqxPPqYHjl pQUq/FLeWi+CZ65vFmkmSJpbkPrf27LUALV55Ti4= From: Jean-Michel Hautbois To: libcamera-devel@lists.libcamera.org Date: Wed, 18 Aug 2021 17:53:56 +0200 Message-Id: <20210818155403.268694-3-jeanmichel.hautbois@ideasonboard.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com> References: <20210818155403.268694-1-jeanmichel.hautbois@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/9] ipa: ipu3: Introduce a Context structure 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" An increasing amount of data and information needs to be shared between the components that build up to implement image processing algorithms. Create a context structure which will allow us to work towards calling algorithms in a modular way, and sharing information between the modules. The IPA context is a global context set at configure time (IPAConfiguration) and a per-frame context (IPAFrameContext) used while streaming. Signed-off-by: Kieran Bingham Signed-off-by: Jean-Michel Hautbois --- src/ipa/ipu3/ipa_context.h | 53 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/ipa/ipu3/ipa_context.h diff --git a/src/ipa/ipu3/ipa_context.h b/src/ipa/ipu3/ipa_context.h new file mode 100644 index 00000000..76534f7f --- /dev/null +++ b/src/ipa/ipu3/ipa_context.h @@ -0,0 +1,53 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ +/* + * Copyright (C) 2021, Google Inc. + * + * ipu3_ipa_context.h - IPU3 IPA Context + * + */ +#ifndef __LIBCAMERA_IPU3_IPA_CONTEXT_H__ +#define __LIBCAMERA_IPU3_IPA_CONTEXT_H__ + +#include + +namespace libcamera { + +namespace ipa::ipu3 { + +/** + * Fixed configuration of the IPA + * + * This structure contains data set at the configure state of the IPA. + * It can't be modified while streaming. + */ +struct IPAConfiguration { +}; + +/** + * Context of a frame for each algorithms + * + * This may be stored in a way that is associated with a given request + * lifetime, though for now a single instance is used. + * It contains informations updated while streaming by the algorithms. + */ +struct IPAFrameContext { +}; + +/** + * Context information shared between the algorithms + * + * The global context structure contains: + * - a configuration structure set while the IPA is configured, and not + * modified when streaming + * - a frameContext structure updated by the algorithms while streaming + */ +struct IPAContext { + IPAConfiguration configuration; + IPAFrameContext frameContext; +}; + +} /* namespace ipa::ipu3 */ + +} /* namespace libcamera*/ + +#endif /* __LIBCAMERA_IPU3_IPA_CONTEXT_H__ */