ipa: rpi: controller: AutoFocus weighting tweak

In getPhase(), stop using different weights for sumWc and sumWcp.
This should improve linearity e.g. in earlyTerminationByPhase().
Phases are slightly larger but confidence values slightly reduced.

Signed-off-by: Nick Hollinghurst <nick.hollinghurst@raspberrypi.com>
Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Nick Hollinghurst 2025-06-20 13:42:24 +01:00 committed by Kieran Bingham
parent a283287fbf
commit 0fa2b05a86

View file

@ -328,9 +328,8 @@ bool Af::getPhase(PdafRegions const &regions, double &phase, double &conf)
if (c >= cfg_.confThresh) {
if (c > cfg_.confClip)
c = cfg_.confClip;
c -= (cfg_.confThresh >> 2);
c -= (cfg_.confThresh >> 1);
sumWc += w * c;
c -= (cfg_.confThresh >> 2);
sumWcp += (int64_t)(w * c) * (int64_t)data.phase;
}
}