summaryrefslogtreecommitdiff
path: root/src/ipa/rpi/common
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2023-07-20 13:48:23 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-07-28 18:34:02 +0300
commitbaab00721cc577bcfb0d95e810202c57f35055b0 (patch)
tree789ca941e4d18ab66b76720375234ad8ff71c4fd /src/ipa/rpi/common
parent09dd65442b62f4069189f7a92f2b224687257e52 (diff)
ipa: rpi: Fix the reporting of Focus FoMs
The FocusFom metadata was no longer being reported back because the "focus.status" metadata was never being created. Additionally, the scaling of the focus FoMs was over-zealous, rounding just about everything down to zero. Fixes: ac7511dc4c59 ("ipa: raspberrypi: Generalise the focus reporting code") Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/ipa/rpi/common')
-rw-r--r--src/ipa/rpi/common/ipa_base.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp
index 4438ecd9..b11f10fd 100644
--- a/src/ipa/rpi/common/ipa_base.cpp
+++ b/src/ipa/rpi/common/ipa_base.cpp
@@ -462,6 +462,9 @@ void IpaBase::processStats(const ProcessParams &params)
RPiController::StatisticsPtr statistics = platformProcessStats(it->second.planes()[0]);
+ /* reportMetadata() will pick this up and set the FocusFoM metadata */
+ rpiMetadata.set("focus.status", statistics->focusRegions);
+
helper_->process(statistics, rpiMetadata);
controller_.process(statistics, &rpiMetadata);
@@ -1259,7 +1262,7 @@ void IpaBase::reportMetadata(unsigned int ipaContext)
}
}
- uint32_t focusFoM = (sum / numRegions) >> 16;
+ uint32_t focusFoM = sum / numRegions;
libcameraMetadata_.set(controls::FocusFoM, focusFoM);
}