@@ -372,6 +372,12 @@ void AwbAlgorithmBase::process(awb::ActiveState &state,
const AwbStats &stats, unsigned int lux,
ControlList &metadata)
{
+ /* Populate metadata. */
+ metadata.set(controls::AwbEnable, frameContext.autoEnabled);
+ metadata.set(controls::ColourGains, { static_cast<float>(frameContext.gains.r()),
+ static_cast<float>(frameContext.gains.b()) });
+ metadata.set(controls::ColourTemperature, frameContext.colourTemperature);
+
if (!stats.valid())
return;
@@ -393,12 +399,6 @@ void AwbAlgorithmBase::process(awb::ActiveState &state,
state.automatic.gains = awbResult.gains * speed +
state.automatic.gains * (1 - speed);
- /* Populate metadata. */
- metadata.set(controls::AwbEnable, frameContext.autoEnabled);
- metadata.set(controls::ColourGains, { static_cast<float>(frameContext.gains.r()),
- static_cast<float>(frameContext.gains.b()) });
- metadata.set(controls::ColourTemperature, frameContext.colourTemperature);
-
LOG(Awb, Debug) << std::showpoint << "Means " << stats.rgbMeans()
<< ", gains " << state.automatic.gains
<< ", temp " << state.automatic.colourTemperature << "K";
A pipeline handler can call processStats() on the IPA even in the case that no valid stats are available, just to populate the metadata with the values from the frame context. Add support for that to the AWB algorithm by populating the metadata before checking if stats are valid. Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> --- src/ipa/libipa/awb.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)