summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/rkisp1.cpp
diff options
context:
space:
mode:
authorDaniel Semkowicz via libcamera-devel <libcamera-devel@lists.libcamera.org>2022-07-13 10:43:14 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-07-14 20:12:17 +0200
commit0c249cbd2b3711e9372219b655e10bc5f5560a90 (patch)
treed90faf88c4eefeae83651a99bd6098a2ee5be366 /src/ipa/rkisp1/rkisp1.cpp
parent7fdb14fbf51b4cad6390778aa6743941b12d3c3e (diff)
ipa: rkisp1: Add "Windows" Metering mode to auto focus algorithm
Allow manually setting auto focus window. Currently only one window is enabled, but ISP allows up to three of them. Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Diffstat (limited to 'src/ipa/rkisp1/rkisp1.cpp')
-rw-r--r--src/ipa/rkisp1/rkisp1.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/ipa/rkisp1/rkisp1.cpp b/src/ipa/rkisp1/rkisp1.cpp
index 53b53f12..99ac1fb7 100644
--- a/src/ipa/rkisp1/rkisp1.cpp
+++ b/src/ipa/rkisp1/rkisp1.cpp
@@ -319,6 +319,26 @@ void IPARkISP1::queueRequest([[maybe_unused]] const uint32_t frame,
af->setMode(static_cast<controls::AfModeEnum>(ctrlValue.get<int32_t>()));
break;
}
+ case controls::AF_METERING: {
+ Af *af = getAlgorithm<Af>();
+ if (!af) {
+ LOG(IPARkISP1, Warning) << "Could not set AF_WINDOWS - no AF algorithm";
+ break;
+ }
+
+ af->setMetering(static_cast<controls::AfMeteringEnum>(ctrlValue.get<int32_t>()));
+ break;
+ }
+ case controls::AF_WINDOWS: {
+ Af *af = getAlgorithm<Af>();
+ if (!af) {
+ LOG(IPARkISP1, Warning) << "Could not set AF_WINDOWS - no AF algorithm";
+ break;
+ }
+
+ af->setWindows(ctrlValue.get<Span<const Rectangle>>());
+ break;
+ }
case controls::AF_TRIGGER: {
Af *af = getAlgorithm<Af>();
if (!af) {