From patchwork Fri Nov 8 20:54:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2314 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D5D1B60180 for ; Fri, 8 Nov 2019 21:54:28 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 78B9A71D for ; Fri, 8 Nov 2019 21:54:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1573246468; bh=SeM3/DvuD4bWBGpBt9k2BU9LufAwUKx+ds7visS/VYI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qHlK4mXewdmo1Jm9nT4mw4eqB5s92DqNNA+cqCEyd2eC75NikNjgmABlA6fKqJpoL G6wxzjc7xzdomsu+Zq7JTohsGA6WVlq8j0PjxTdjtkTZLVTO5QTH9rQTvdOMAhv1tv DGlYewa7B5VbPE927oIfBzpmkQgDp5Yh8QUFeEHY= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Fri, 8 Nov 2019 22:54:03 +0200 Message-Id: <20191108205409.18845-19-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191108205409.18845-1-laurent.pinchart@ideasonboard.com> References: <20191108205409.18845-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 18/24] ipa: Pass ControlInfoMap references to IPAInterface::configure() 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-List-Received-Date: Fri, 08 Nov 2019 20:54:29 -0000 The IPAInterface::configure() operation receives a map of ControlInfoMap instances. Pass const references instead to avoid copies when not required (the callee can still make manual copies), and to allow for the future serialization layer to keep references to the original object. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- include/ipa/ipa_interface.h | 2 +- src/ipa/ipa_vimc.cpp | 2 +- src/ipa/rkisp1/rkisp1.cpp | 4 ++-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +- src/libcamera/proxy/ipa_proxy_linux.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h index 8fd658af5fdb..35dc4b4e3165 100644 --- a/include/ipa/ipa_interface.h +++ b/include/ipa/ipa_interface.h @@ -43,7 +43,7 @@ public: virtual int init() = 0; virtual void configure(const std::map &streamConfig, - const std::map &entityControls) = 0; + const std::map &entityControls) = 0; virtual void mapBuffers(const std::vector &buffers) = 0; virtual void unmapBuffers(const std::vector &ids) = 0; diff --git a/src/ipa/ipa_vimc.cpp b/src/ipa/ipa_vimc.cpp index 9fd5212b0381..50ca8dd805fb 100644 --- a/src/ipa/ipa_vimc.cpp +++ b/src/ipa/ipa_vimc.cpp @@ -31,7 +31,7 @@ public: int init() override; void configure(const std::map &streamConfig, - const std::map &entityControls) override {} + const std::map &entityControls) override {} void mapBuffers(const std::vector &buffers) override {} void unmapBuffers(const std::vector &ids) override {} void processEvent(const IPAOperationData &event) override {} diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp index d741d5677d0e..41babf0c4140 100644 --- a/src/ipa/rkisp1/rkisp1.cpp +++ b/src/ipa/rkisp1/rkisp1.cpp @@ -33,7 +33,7 @@ public: int init() override { return 0; } void configure(const std::map &streamConfig, - const std::map &entityControls) override; + const std::map &entityControls) override; void mapBuffers(const std::vector &buffers) override; void unmapBuffers(const std::vector &ids) override; void processEvent(const IPAOperationData &event) override; @@ -62,7 +62,7 @@ private: }; void IPARkISP1::configure(const std::map &streamConfig, - const std::map &entityControls) + const std::map &entityControls) { if (entityControls.empty()) return; diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index b21cf92435e7..4a583a7a1d7e 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -777,7 +777,7 @@ int PipelineHandlerRkISP1::start(Camera *camera) .size = data->stream_.configuration().size, }; - std::map entityControls; + std::map entityControls; entityControls.emplace(0, data->sensor_->controls()); data->ipa_->configure(streamConfig, entityControls); diff --git a/src/libcamera/proxy/ipa_proxy_linux.cpp b/src/libcamera/proxy/ipa_proxy_linux.cpp index 27b6639d6312..c7218fb47249 100644 --- a/src/libcamera/proxy/ipa_proxy_linux.cpp +++ b/src/libcamera/proxy/ipa_proxy_linux.cpp @@ -28,7 +28,7 @@ public: int init() override { return 0; } void configure(const std::map &streamConfig, - const std::map &entityControls) override {} + const std::map &entityControls) override {} void mapBuffers(const std::vector &buffers) override {} void unmapBuffers(const std::vector &ids) override {} void processEvent(const IPAOperationData &event) override {}