[v1,0/8] Raspberry Pi: AF improvements
mbox series

Message ID 20250620124452.557855-1-naush@raspberrypi.com
Headers show
Series
  • Raspberry Pi: AF improvements
Related show

Message

Naushir Patuck June 20, 2025, 12:42 p.m. UTC
Hi,

(submitting on behalf of Nick)

The following patch series improves our AF algorithm in a number of ways:

1. Treat low-confidence PDAF values more linearly, which may improve reliability
and reduce wobble a little.

2. Check for IR lighting and suppress PDAF when it's detected (only when a new
flag is set in the tuning file).

3. Allow CDAF-based scan to be re-triggered multiple times in Continuous AF mode
(when there's no PDAF).

4. Allow subsequent scans to start from the current lens position, rather than
always from 0 (infinity).

5. Skip the "fine" search altogether (when the tuning file has "step_fine": 0).

6. Read the default lens position from the tuning file, rather than hard-coding
it to 1.0 in source code as now.

7. Not send the default position to the lens driver, when it would be
immediately overridden by a user-specified manual setting.

Thanks,
Naush

Nick Hollinghurst (8):
  ipa: rpi: Defer initialising AF LensPosition ControlInfo and value
  ipa: rpi: controller: Improve findPeak() function in AF algorithm
  ipa: rpi: controller: AutoFocus weighting tweak
  ipa: rpi: controller: Autofocus CAF/PDAF stability tweak
  ipa: rpi: controller: AutoFocus tweak earlyTerminationByPhase()
  ipa: rpi: controller: Autofocus to use AWB statistics; re-trigger
  ipa: rpi: controller: AutoFocus bidirectional scanning
  ipa: rpi: Update IMX708 camera tuning files for AutoFocus changes

 src/ipa/rpi/common/ipa_base.cpp             |  53 ++--
 src/ipa/rpi/controller/af_algorithm.h       |   8 +-
 src/ipa/rpi/controller/rpi/af.cpp           | 305 +++++++++++++++-----
 src/ipa/rpi/controller/rpi/af.h             |  52 +++-
 src/ipa/rpi/pisp/data/imx708.json           |  23 +-
 src/ipa/rpi/pisp/data/imx708_noir.json      |  23 +-
 src/ipa/rpi/pisp/data/imx708_wide.json      |  19 +-
 src/ipa/rpi/pisp/data/imx708_wide_noir.json |  19 +-
 src/ipa/rpi/vc4/data/imx708.json            |  23 +-
 src/ipa/rpi/vc4/data/imx708_noir.json       |  23 +-
 src/ipa/rpi/vc4/data/imx708_wide.json       |  19 +-
 src/ipa/rpi/vc4/data/imx708_wide_noir.json  |  19 +-
 12 files changed, 442 insertions(+), 144 deletions(-)