summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/rkisp1.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-05 12:46:03 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-24 16:40:23 +0300
commitc20ca6587dcba983e192c65124accacb3a0d21ac (patch)
tree9e220290b5ce93c133024c258de158fd4e27d8c5 /src/ipa/rkisp1/rkisp1.cpp
parentdac1a0549a27b72993e22f273ae05050a13c69a8 (diff)
ipa: Pass metadata to Algorithm::process() function
Extend the Algorithm::process() function with a metadata control list, to be filled by individual algorithms with frame metadata. Update the rkisp1 and ipu3 IPA modules accordingly, and drop the dead code in the IPARkISP1::prepareMetadata() function while at it. This only creates the infrastructure, filling metadata in individual algorithms will be handled separately. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/ipa/rkisp1/rkisp1.cpp')
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index ba3c547e..494d8c89 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -69,7 +69,6 @@ protected:
private:
void setControls(unsigned int frame);
- void prepareMetadata(unsigned int frame, unsigned int aeState);
std::map<unsigned int, FrameBuffer> buffers_;
std::map<unsigned int, MappedFrameBuffer> mappedBuffers_;
@@ -338,14 +337,14 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId
frameContext.sensor.gain =
camHelper_->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());
- unsigned int aeState = 0;
+ ControlList metadata(controls::controls);
for (auto const &algo : algorithms())
- algo->process(context_, frame, frameContext, stats);
+ algo->process(context_, frame, frameContext, stats, metadata);
setControls(frame);
- prepareMetadata(frame, aeState);
+ metadataReady.emit(frame, metadata);
}
void IPARkISP1::setControls(unsigned int frame)
@@ -366,16 +365,6 @@ void IPARkISP1::setControls(unsigned int frame)
setSensorControls.emit(frame, ctrls);
}
-void IPARkISP1::prepareMetadata(unsigned int frame, unsigned int aeState)
-{
- ControlList ctrls(controls::controls);
-
- if (aeState)
- ctrls.set(controls::AeLocked, aeState == 2);
-
- metadataReady.emit(frame, ctrls);
-}
-
} /* namespace ipa::rkisp1 */
/*