[libcamera-devel] [RFC PATCH 0/4] Introduce camera lens properties

Jean-Michel Hautbois jeanmichel.hautbois at ideasonboard.com
Thu Jun 9 08:03:02 CEST 2022


This series introduces a camera lens properties database in the same way
we have a camera sensor properties one. The idea is to be able to
provide to the pipeline handler (and thus, the IPAs) any useful property
defining a tuned lens.

This series is a RFC as it is not really clear, for instance, which
properties may be useful (a macroRange and a FullRange sound like
something useful for instance ?) and which units should be used for
hyperfocale.

I don't have a tuned sensor (and indeed, I really wish I could have a
way to tune it properly :-)) so the values here must be used as examples
only.

Patch 3/4 is a specific property, in order to address one of the
AfControls series "todo".

Currently, we may use a range as large as the one reported by the
V4L2_CID_FOCUS_ABSOLUTE call, but all may not be valid.
For instance, some drivers can set 10 bits values, but only the first 9
are relevant, as the macro mode is limited by the lens properties.
We may want to have multiple ranges in a near future (macro, full,
limited ?) and for the ease the range is returned as a libcamera::Size
object, as I don't really know what would be better yet ;-).

Patch 4/4 is the hyperfocale value, expressed in millimeters. Is it the
correct unit is a question too :-).

Thanks !
JM

Jean-Michel Hautbois (4):
  libcamera: Add a camera lens properties database
  libcamera: lens: Grab the static properties at init time
  libcamera: lens: Add a helper to get the fixed range lens values
  libcamera: lens: Add the hyperfocale property support

 include/libcamera/internal/camera_lens.h      |  5 ++
 .../internal/camera_lens_properties.h         | 25 +++++++
 src/libcamera/camera_lens.cpp                 | 24 ++++++-
 src/libcamera/camera_lens_properties.cpp      | 70 +++++++++++++++++++
 src/libcamera/meson.build                     |  1 +
 5 files changed, 124 insertions(+), 1 deletion(-)
 create mode 100644 include/libcamera/internal/camera_lens_properties.h
 create mode 100644 src/libcamera/camera_lens_properties.cpp

-- 
2.34.1



More information about the libcamera-devel mailing list