From patchwork Wed Jul 20 15:42:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Sylvestre X-Patchwork-Id: 16706 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 54D19BD1F1 for ; Wed, 20 Jul 2022 15:42:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0EFEB63318; Wed, 20 Jul 2022 17:42:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658331754; bh=QXWBpXyd0SowZcrnrw816J37WkH0rmmWPGgP0X8vZJs=; 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=mg+Ay0RMvSVMbKP1vSRJH9//POT0m4LVF1sz7MNXwIPWNEBQVZ3n0aMQHomf2dSGw WK4vPeYacr2FTmFUpMUq73DwW1a1aUFdr0v9991bQE8fqmlkL+gMgtxmeVW4eX2UEF lEWM7aQoAZoFX92l80ni87II0uqAQuDiAbVK/C/xVpe4p0K5RiYWF3DZm3p4YBZN1y iTH+7XMXU2+P7wXJMhzYnLLqfOIzFRWHIzyRAk4qX65A9d7EleTM6gyXHeLBwpRcSi kRqEuwontI43MIczDr+sAFyRfu56hm9tx4TLGlpf1oPNuw2JSqpLNmQjjxjqACFgeT HZXSPHdgkpdBw== Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 7BFCE6330D for ; Wed, 20 Jul 2022 17:42:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=baylibre-com.20210112.gappssmtp.com header.i=@baylibre-com.20210112.gappssmtp.com header.b="hq7BA65H"; dkim-atps=neutral Received: by mail-wr1-x42b.google.com with SMTP id z13so7118498wro.13 for ; Wed, 20 Jul 2022 08:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W1TeYFQ7GLWFHVHmgPIyyLYNxD2xypTxkXFayFTwW0U=; b=hq7BA65H//O26TS1rf6V3SZYnbkc6NY+JiDBrvbUHqL7OqvzVJ0PlabXz14+I3zkj7 K+uVcNRJapfG/WVlv3ThleKlwcA8MJu93/A/8g6MRbl53kpQoTRfEHrCoXWgOzaRbHk5 Ch+wwhvNEwkx6NflfK6e8XqC8gPAO4ESLCjMN08F5SBJhl1SbSEoB3/yS+ui9PVzOXrX XFlTnJOxEqoDl9YJ1rGod0eKXxuMixT/tQCuJS/gcNpB78CgBvK5jsOnKnC4/CRxg7Ab zwkITcZS9rbrWc8gyjhvnJDnkQLVDmzyglKXnKaizWlfpPtqskaW7OlgfpjK97tRzOJW 3eeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W1TeYFQ7GLWFHVHmgPIyyLYNxD2xypTxkXFayFTwW0U=; b=eaOLLN4a0CvBsGrxZ3PsePX78Y+z92BfeoHCxjD8GVvyF6Ulx/c7cmu4jjOUbEyoCH o+pChWVvVYPmkSoRu8PO4/qSZGmCjr6v8G/zDg7pV5eFGPyE49rMqbBI45QQ0ZEFBIAU QVePECkpjktauvIMNw6pdaM3oGqZU5+SXY52wKXcCtA+oAjfdJYQxMze+yauRIUoaum4 rp2Pl01+MqYg9Mzc+sEFBhdUqPoQMfP0qUDA62GI2yxwC4TynauopNr6Bbmv5PLmZUda QXWNeaph0YIH5KOq6B8QnSk29c3f4eFEL1Sv3fpAZ4GIHgU/jR2DNgGZbVnWy92IChPI uT+Q== X-Gm-Message-State: AJIora8zOK8l21jOcMGybF0tOP2wU+I8Cmwck1wdJv3kJjWvGI5U4Ibk eZ02yvWfsbl1FPqPI5GsrUOVUGj1ly5c5Ij4 X-Google-Smtp-Source: AGRyM1t99KD9VjY3urxiUxo6BorNK2G+v79rVEci6GROkpcxFtNWAdEbO6owIpDONO1iROqTHUIitA== X-Received: by 2002:adf:fcc6:0:b0:21d:8093:1b5c with SMTP id f6-20020adffcc6000000b0021d80931b5cmr30550606wrs.41.1658331751910; Wed, 20 Jul 2022 08:42:31 -0700 (PDT) Received: from BL087.. ([2a01:e34:eea9:e630:516d:f303:6345:b768]) by smtp.gmail.com with ESMTPSA id d2-20020adffbc2000000b0021e489ec78bsm2159294wrs.21.2022.07.20.08.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Jul 2022 08:42:31 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 20 Jul 2022 17:42:18 +0200 Message-Id: <20220720154221.50937-2-fsylvestre@baylibre.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220720154221.50937-1-fsylvestre@baylibre.com> References: <20220720154221.50937-1-fsylvestre@baylibre.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/4] ipa: libipa: algorithm: Add queueRequest() to the Algorithm class 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: Florian Sylvestre via libcamera-devel From: Florian Sylvestre Reply-To: Florian Sylvestre Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add queueRequest() function to the Algorithm class. The queueRequest() function provides controls values coming from the application to each algorithm. Each algorithm is responsible for retrieving the controls associated to them. Signed-off-by: Florian Sylvestre Reviewed-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/ipa/libipa/algorithm.cpp | 16 ++++++++++++++++ src/ipa/libipa/algorithm.h | 8 ++++++++ 2 files changed, 24 insertions(+) diff --git a/src/ipa/libipa/algorithm.cpp b/src/ipa/libipa/algorithm.cpp index 8549fe3f..38200e57 100644 --- a/src/ipa/libipa/algorithm.cpp +++ b/src/ipa/libipa/algorithm.cpp @@ -81,6 +81,22 @@ namespace ipa { * includes setting fields and flags that enable those processing blocks. */ +/** + * \fn Algorithm::queueRequest() + * \brief Provide control values to the algorithm + * \param[in] context The shared IPA context + * \param[in] frame The frame number to apply the control values + * \param[in] controls The list of user controls + * + * This function is called for each request queued to the camera. It provides + * the controls stored in the request to the algorithm. The \a frame number + * is the Request sequence number and identifies the desired corresponding + * frame to target for the controls to take effect. + * + * Algorithms shall read the applicable controls and store their value for later + * use during frame processing. + */ + /** * \fn Algorithm::process() * \brief Process ISP statistics, and run algorithm operations diff --git a/src/ipa/libipa/algorithm.h b/src/ipa/libipa/algorithm.h index 2a8871d8..ccc659a6 100644 --- a/src/ipa/libipa/algorithm.h +++ b/src/ipa/libipa/algorithm.h @@ -9,6 +9,8 @@ #include #include +#include + namespace libcamera { class YamlObject; @@ -40,6 +42,12 @@ public: { } + virtual void queueRequest([[maybe_unused]] typename Module::Context &context, + [[maybe_unused]] const uint32_t frame, + [[maybe_unused]] const ControlList &controls) + { + } + virtual void process([[maybe_unused]] typename Module::Context &context, [[maybe_unused]] typename Module::FrameContext *frameContext, [[maybe_unused]] const typename Module::Stats *stats)