From patchwork Wed Jul 1 12:30:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 8539 X-Patchwork-Delegate: jacopo@jmondi.org 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 6EBA7BF415 for ; Wed, 1 Jul 2020 12:27:29 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4892C60C5C; Wed, 1 Jul 2020 14:27:29 +0200 (CEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 109EB60CC2 for ; Wed, 1 Jul 2020 14:27:26 +0200 (CEST) X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id A5E741C0007; Wed, 1 Jul 2020 12:27:25 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Wed, 1 Jul 2020 14:30:33 +0200 Message-Id: <20200701123036.51922-13-jacopo@jmondi.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200701123036.51922-1-jacopo@jmondi.org> References: <20200701123036.51922-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 12/15] libcamera: ipu3: add ImgUDevice::Pipe 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" Add a structure that describes the ImgU pipe configuration. The new structure reports the size of the ImgU input frame, the desired main output size and desired viewfinder size. Signed-off-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/pipeline/ipu3/imgu.cpp | 19 +++++++++++++++++++ src/libcamera/pipeline/ipu3/imgu.h | 6 ++++++ 2 files changed, 25 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/imgu.cpp b/src/libcamera/pipeline/ipu3/imgu.cpp index d7f4173d3607..7e9047cc8dc1 100644 --- a/src/libcamera/pipeline/ipu3/imgu.cpp +++ b/src/libcamera/pipeline/ipu3/imgu.cpp @@ -19,6 +19,25 @@ namespace libcamera { LOG_DECLARE_CATEGORY(IPU3) +/** + * \struct Pipe + * \brief Describe the ImgU requested configuration + * + * The ImgU unit processes images through several components, which have + * to be properly configured inspecting the input image size and the desired + * output sizes. This structure collects the ImgU input configuration and the + * requested main output and viewfinder configurations. + * + * \var Pipe::input + * \brief The input image size + * + * \var Pipe::output + * \brief The requested main output size + * + * \var Pipe::viewfinder + * \brief The requested viewfinder size + */ + /** * \brief Initialize components of the ImgU instance * \param[in] mediaDevice The ImgU instance media device diff --git a/src/libcamera/pipeline/ipu3/imgu.h b/src/libcamera/pipeline/ipu3/imgu.h index 5c124af2e9fe..8fb271fb8350 100644 --- a/src/libcamera/pipeline/ipu3/imgu.h +++ b/src/libcamera/pipeline/ipu3/imgu.h @@ -23,6 +23,12 @@ struct StreamConfiguration; class ImgUDevice { public: + struct Pipe { + Size input; + Size output; + Size viewfinder; + }; + int init(MediaDevice *media, unsigned int index); int configureInput(const Size &size, V4L2DeviceFormat *inputFormat);