libcamera: software_isp: Call Algorithm::queueRequest

This patch adds Algorithm::queueRequest call for the defined algorithms.
As there are currently no control knobs in software ISP nor the
corresponding queueRequest call chain, the patch also introduces the
queueRequest methods and calls from the pipeline to the IPA.

This is preparation only since there are currently no Algorithm based
algorithms defined and no current software ISP algorithms support
control knobs.

Signed-off-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Milan Zamazal 2024-09-27 15:46:16 +02:00 committed by Kieran Bingham
parent ecbc05c4c5
commit 04d171e6b2
5 changed files with 25 additions and 1 deletions

View file

@ -73,6 +73,7 @@ public:
int start(); int start();
void stop(); void stop();
void queueRequest(const uint32_t frame, const ControlList &controls);
int queueBuffers(uint32_t frame, FrameBuffer *input, int queueBuffers(uint32_t frame, FrameBuffer *input,
const std::map<const Stream *, FrameBuffer *> &outputs); const std::map<const Stream *, FrameBuffer *> &outputs);

View file

@ -23,6 +23,7 @@ interface IPASoftInterface {
configure(IPAConfigInfo configInfo) configure(IPAConfigInfo configInfo)
=> (int32 ret); => (int32 ret);
[async] queueRequest(uint32 frame, libcamera.ControlList sensorControls);
[async] processStats(uint32 frame, [async] processStats(uint32 frame,
uint32 bufferId, uint32 bufferId,
libcamera.ControlList sensorControls); libcamera.ControlList sensorControls);

View file

@ -78,6 +78,7 @@ public:
int start() override; int start() override;
void stop() override; void stop() override;
void queueRequest(const uint32_t frame, const ControlList &controls) override;
void processStats(const uint32_t frame, const uint32_t bufferId, void processStats(const uint32_t frame, const uint32_t bufferId,
const ControlList &sensorControls) override; const ControlList &sensorControls) override;
@ -270,6 +271,14 @@ void IPASoftSimple::stop()
{ {
} }
void IPASoftSimple::queueRequest(const uint32_t frame, const ControlList &controls)
{
IPAFrameContext &frameContext = context_.frameContexts.alloc(frame);
for (auto const &algo : algorithms())
algo->queueRequest(context_, frame, frameContext, controls);
}
void IPASoftSimple::processStats([[maybe_unused]] const uint32_t frame, void IPASoftSimple::processStats([[maybe_unused]] const uint32_t frame,
[[maybe_unused]] const uint32_t bufferId, [[maybe_unused]] const uint32_t bufferId,
const ControlList &sensorControls) const ControlList &sensorControls)

View file

@ -1421,8 +1421,11 @@ int SimplePipelineHandler::queueRequestDevice(Camera *camera, Request *request)
} }
} }
if (data->useConversion_) if (data->useConversion_) {
data->conversionQueue_.push(std::move(buffers)); data->conversionQueue_.push(std::move(buffers));
if (data->swIsp_)
data->swIsp_->queueRequest(request->sequence(), request->controls());
}
return 0; return 0;
} }

View file

@ -277,6 +277,16 @@ int SoftwareIsp::exportBuffers(const Stream *stream, unsigned int count,
return count; return count;
} }
/**
* \brief Queue a request and process the control list from the application
* \param[in] frame The number of the frame which will be processed next
* \param[in] controls The controls for the \a frame
*/
void SoftwareIsp::queueRequest(const uint32_t frame, const ControlList &controls)
{
ipa_->queueRequest(frame, controls);
}
/** /**
* \brief Queue buffers to Software ISP * \brief Queue buffers to Software ISP
* \param[in] frame The frame number * \param[in] frame The frame number