[2/3] libcamera: software_isp: Separate IPA start/stop
diff mbox series

Message ID 20261005131700.97438-3-mzamazal@redhat.com
State New
Headers show
Series
  • Use softisp IPA with simple pipeline raw output
Related show

Commit Message

Milan Zamazal Oct. 5, 2026, 1:16 p.m. UTC
The SoftwareIsp start() and stop() methods start both the IPA and
debayering.  Let's isolate the IPA start and stop into separate methods.
This allows starting just the softisp IPA from the simple pipeline,
which is useful to get information from the IPA even with only raw
output.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
---
 .../internal/software_isp/software_isp.h      |  3 ++
 src/libcamera/software_isp/software_isp.cpp   | 28 +++++++++++++++++--
 2 files changed, 29 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h
index 7c41bc7ad..3e420242b 100644
--- a/include/libcamera/internal/software_isp/software_isp.h
+++ b/include/libcamera/internal/software_isp/software_isp.h
@@ -78,6 +78,9 @@  public:
 	int start();
 	void stop();
 
+	int startIpa();
+	void stopIpa();
+
 	void queueRequest(const uint32_t frame, const ControlList &controls);
 	int queueBuffers(uint32_t frame, FrameBuffer *input,
 			 const std::map<const Stream *, FrameBuffer *> &outputs);
diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp
index 46a7cb5c1..11e0c49ed 100644
--- a/src/libcamera/software_isp/software_isp.cpp
+++ b/src/libcamera/software_isp/software_isp.cpp
@@ -378,7 +378,7 @@  int SoftwareIsp::queueBuffers(uint32_t frame, FrameBuffer *input,
  */
 int SoftwareIsp::start()
 {
-	int ret = ipa_->start();
+	int ret = startIpa();
 	if (ret)
 		return ret;
 
@@ -388,6 +388,19 @@  int SoftwareIsp::start()
 				      ConnectionTypeBlocking);
 }
 
+/**
+ * \brief Starts the software ISP IPA
+ *
+ * Only the IPA is started here. If you want full software ISP with debayering,
+ * use \a start() instead.
+ *
+ * \return 0 on success, any other value indicates an error
+ */
+int SoftwareIsp::startIpa()
+{
+	return ipa_->start();
+}
+
 /**
  * \brief Stops the Software ISP streaming operation
  *
@@ -409,7 +422,7 @@  void SoftwareIsp::stop()
 
 	Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this);
 
-	ipa_->stop();
+	stopIpa();
 
 	for (auto buffer : queuedOutputBuffers_) {
 		buffer->_d()->cancel();
@@ -424,6 +437,17 @@  void SoftwareIsp::stop()
 	queuedInputBuffers_.clear();
 }
 
+/**
+ * \brief Stops the software ISP IPA
+ *
+ * Only the IPA is stopped here. If you stop full software ISP with debayering,
+ * use \a stop() instead.
+ */
+void SoftwareIsp::stopIpa()
+{
+	ipa_->stop();
+}
+
 /**
  * \brief Passes the input framebuffer to the ISP worker to process
  * \param[in] frame The frame number