summaryrefslogtreecommitdiff
path: root/src/ipa/ipu3/ipu3.cpp
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-19 02:34:13 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2022-10-24 16:40:24 +0300
commit11f5c3ad0561a4e4b1e06f477ab2022c69803ad2 (patch)
tree15038a08c2da9c7f25c547f8a5376c1af8f50713 /src/ipa/ipu3/ipu3.cpp
parent32d5f0d2a41a3e973afa4318b37a6db34fe82983 (diff)
ipa: ipu3: Fill AGC and AWB metadata in algorithms
Fill the frame metadata in the AGC and AWB algorithm's prepare() function. This removes the need to fill metadata manually in the IPA module's processStatsBuffer() function. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/ipu3/ipu3.cpp')
-rw-r--r--src/ipa/ipu3/ipu3.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ipa/ipu3/ipu3.cpp b/src/ipa/ipu3/ipu3.cpp
index bc0f6007..a9a2b49c 100644
--- a/src/ipa/ipu3/ipu3.cpp
+++ b/src/ipa/ipu3/ipu3.cpp
@@ -502,6 +502,7 @@ int IPAIPU3::configure(const IPAConfigInfo &configInfo,
/* Initialise the sensor configuration. */
context_.configuration.sensor.lineDuration = sensorInfo_.minLineLength
* 1.0s / sensorInfo_.pixelRate;
+ context_.configuration.sensor.size = sensorInfo_.outputSize;
/*
* Compute the sensor V4L2 controls to be used by the algorithms and
@@ -628,8 +629,6 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,
frameContext.sensor.exposure = sensorControls.get(V4L2_CID_EXPOSURE).get<int32_t>();
frameContext.sensor.gain = camHelper_->gain(sensorControls.get(V4L2_CID_ANALOGUE_GAIN).get<int32_t>());
- double lineDuration = context_.configuration.sensor.lineDuration.get<std::micro>();
- int32_t vBlank = context_.configuration.sensor.defVBlank;
ControlList metadata(controls::controls);
for (auto const &algo : algorithms())
@@ -637,16 +636,6 @@ void IPAIPU3::processStatsBuffer(const uint32_t frame,
setControls(frame);
- /* \todo Use VBlank value calculated from each frame exposure. */
- int64_t frameDuration = (vBlank + sensorInfo_.outputSize.height) * lineDuration;
- metadata.set(controls::FrameDuration, frameDuration);
-
- metadata.set(controls::AnalogueGain, frameContext.sensor.gain);
-
- metadata.set(controls::ColourTemperature, context_.activeState.awb.temperatureK);
-
- metadata.set(controls::ExposureTime, frameContext.sensor.exposure * lineDuration);
-
/*
* \todo The Metadata provides a path to getting extended data
* out to the application. Further data such as a simplifed Histogram