[libcamera-devel,0/1] Change LensPosition units to dioptres
mbox series

Message ID 20221117154500.8829-1-david.plowman@raspberrypi.com
Headers show
Series
  • Change LensPosition units to dioptres
Related show

Message

David Plowman Nov. 17, 2022, 3:44 p.m. UTC
Hi everyone

Only a small patch, but probably warrants a note!

We've been mulling things over for quite a while and have come to the
opinion that we'd rather have the LensPosition control use dioptres as
units (1 / distance in metres) rather than "1 / hyperfocal distance".

The reasons are that it's a completely defined quantity (no ambiguity
about where hyperfocal is) which probably makes it a better
fundamental unit. Also it matches Android better!

Moreover, I'm thinking that there's still not so much use of this in
libcamera that changing it will cause trouble. In fact, many of the
small modules we use probably have a hyperfocal distance not that far
from 1m, so there wouldn't even be a large difference.

I was not so keen on dioptres previously because I wasn't sure how we
would find out where the hyperfocal distance was (which is often the
thing you really want to know). But we've resolved that we will be
able to read a good default position from the control info.

How do other folks feel about this, does it seem like a reasonable
change to make?

Thanks!
David


David Plowman (1):
  libcamera: controls: Change LensPosition units to dioptres

 src/libcamera/control_ids.yaml | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)