[libcamera-devel] [PATCH v2 5/6] ipa: rkisp1: Remove AE-related controls

Jacopo Mondi jacopo at jmondi.org
Thu Aug 11 17:02:18 CEST 2022


The RkISP1 IPA registers the AeEnabled control as available but
does not handle it yet and returns the AeLocked control in
the prepareMetadata() function with a value currently hard-coded to 0.

Remove the AEGC-related controls as they currently have no purpose and
both AeLocked and AeEnable will be removed in the next patch.

A proper handling of the AEGC algorithm will have to be implemented
using the newly introduced AEGC controls.

Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
 src/ipa/rkisp1/rkisp1.cpp | 19 ++++---------------
 1 file changed, 4 insertions(+), 15 deletions(-)

diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 17d42d38eb45..dac3a43f803d 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -64,7 +64,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_;
@@ -91,7 +90,6 @@ namespace {
 
 /* List of controls handled by the RkISP1 IPA */
 const ControlInfoMap::Map rkisp1Controls{
-	{ &controls::AeEnable, ControlInfo(false, true) },
 	{ &controls::Brightness, ControlInfo(-1.0f, 0.993f) },
 	{ &controls::Contrast, ControlInfo(0.0f, 1.993f) },
 	{ &controls::Saturation, ControlInfo(0.0f, 1.993f) },
@@ -321,14 +319,15 @@ void IPARkISP1::processStatsBuffer(const uint32_t frame, const uint32_t bufferId
 	context_.frameContext.sensor.gain =
 		camHelper_->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());
 
-	unsigned int aeState = 0;
-
 	for (auto const &algo : algorithms())
 		algo->process(context_, nullptr, stats);
 
 	setControls(frame);
 
-	prepareMetadata(frame, aeState);
+	/* \todo: prepare metadata. */
+
+	ControlList ctrls(controls::controls);
+	metadataReady.emit(frame, ctrls);
 }
 
 void IPARkISP1::setControls(unsigned int frame)
@@ -343,16 +342,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 */
 
 /*
-- 
2.37.1



More information about the libcamera-devel mailing list