@@ -90,6 +90,7 @@ public:
private:
void saveIspParams(const uint32_t paramsBufferId);
void paramsBufferReady(const uint32_t paramsBufferId);
+ bool allocateParamsBuffers();
void setSensorCtrls(const ControlList &sensorControls);
void statsReady(uint32_t frame, uint32_t bufferId);
void inputReady(FrameBuffer *input);
@@ -90,12 +90,8 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor,
LOG(SoftwareIsp, Error) << "Failed to create DmaBufAllocator object";
return;
}
-
- sharedParams_ = SharedMemObject<DebayerParams>("softIsp_params");
- if (!sharedParams_) {
- LOG(SoftwareIsp, Error) << "Failed to create shared memory for parameters";
+ if (!allocateParamsBuffers())
return;
- }
const CameraManager &cm = *pipe->cameraManager();
@@ -181,6 +177,17 @@ SoftwareIsp::~SoftwareIsp()
debayer_.reset();
}
+bool SoftwareIsp::allocateParamsBuffers()
+{
+ sharedParams_ = SharedMemObject<DebayerParams>("softIsp_params");
+ if (!sharedParams_) {
+ LOG(SoftwareIsp, Error) << "Failed to create shared memory for parameters";
+ return false;
+ }
+
+ return true;
+}
+
/**
* \fn int SoftwareIsp::loadConfiguration([[maybe_unused]] const std::string &filename)
* \brief Load a configuration from a file
There will be some additions to that code in followup patches and let's not blow the code in SoftwareIsp constructor even more. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> --- .../internal/software_isp/software_isp.h | 1 + src/libcamera/software_isp/software_isp.cpp | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-)