From 0c249cbd2b3711e9372219b655e10bc5f5560a90 Mon Sep 17 00:00:00 2001 From: Daniel Semkowicz via libcamera-devel Date: Wed, 13 Jul 2022 10:43:14 +0200 Subject: 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 --- src/ipa/rkisp1/rkisp1.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/ipa/rkisp1/rkisp1.cpp') 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(ctrlValue.get())); break; } + case controls::AF_METERING: { + Af *af = getAlgorithm(); + if (!af) { + LOG(IPARkISP1, Warning) << "Could not set AF_WINDOWS - no AF algorithm"; + break; + } + + af->setMetering(static_cast(ctrlValue.get())); + break; + } + case controls::AF_WINDOWS: { + Af *af = getAlgorithm(); + if (!af) { + LOG(IPARkISP1, Warning) << "Could not set AF_WINDOWS - no AF algorithm"; + break; + } + + af->setWindows(ctrlValue.get>()); + break; + } case controls::AF_TRIGGER: { Af *af = getAlgorithm(); if (!af) { -- cgit v1.2.1