summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/rkisp1.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/rkisp1/rkisp1.cpp')
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 84ffe6cf..1a89eabf 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -31,6 +31,7 @@
#include "algorithms/algorithm.h"
#include "ipa_context.h"
+#include "params.h"
namespace libcamera {
@@ -322,17 +323,12 @@ void IPARkISP1::fillParamsBuffer(const uint32_t frame, const uint32_t bufferId)
{
IPAFrameContext &frameContext = context_.frameContexts.get(frame);
- rkisp1_params_cfg *params =
- reinterpret_cast<rkisp1_params_cfg *>(
- mappedBuffers_.at(bufferId).planes()[0].data());
-
- /* Prepare parameters buffer. */
- memset(params, 0, sizeof(*params));
+ RkISP1Params params(paramFormat_, mappedBuffers_.at(bufferId).planes()[0]);
for (auto const &algo : algorithms())
- algo->prepare(context_, frame, frameContext, params);
+ algo->prepare(context_, frame, frameContext, &params);
- paramsBufferReady.emit(frame, sizeof(*params));
+ paramsBufferReady.emit(frame, params.size());
}
void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId,