[libcamera-devel] [RFC PATCH v2 0/4] Enabling AF algorithm to get the VCM attributes from the device driver

Kate Hsuan hpa at redhat.com
Thu Apr 21 09:28:44 CEST 2022


Some of the algorithm, such as autofocus needs the information from the
device to configure the range of the search or the maximum values of the
configurations. Currently, this information, such as VCM attributes was
hardcoded in the code so it can only be used for specific hardware. If the
device attributes can be got through the codes, the algorithm can be
dynamically configured based on the device attributes got from the kernel.

This work proposed an implementation that can be used to get the device
attribute from the kernel and allows the algorithm has a method to get the
device attribute without a specific call. Therefore, for example, the AF
algorithm can get the necessary maximum VCM steps value to configure itself.

During the AF algorithm configuration, the prefetched VCM steps will be
set to the configInfo and based on this the corresponding variable will
also be initiated.

Kate Hsuan (4):
  ipa: ipu3: Variables to hold the maximum VCM steps
  libcamera: camera_lens: Get maximum VCM steps
  libcamera: pipeline: ipu3: Get and set VCM information
  ipa: ipu3: af: Remove hardcoded maximum VCM steps

 include/libcamera/internal/camera_lens.h |  1 +
 include/libcamera/ipa/core.mojom         |  7 +++++++
 src/ipa/ipu3/algorithms/af.cpp           | 13 ++++---------
 src/ipa/ipu3/algorithms/af.h             |  2 ++
 src/libcamera/camera_lens.cpp            | 13 +++++++++++++
 src/libcamera/pipeline/ipu3/ipu3.cpp     | 15 +++++++++++++++
 6 files changed, 42 insertions(+), 9 deletions(-)

-- 
2.35.1



More information about the libcamera-devel mailing list