[libcamera-devel] [PATCH v1] android: Hardcode lens focus range in result metadata
Kieran Bingham
kieran.bingham at ideasonboard.com
Tue Dec 21 13:04:25 CET 2021
Quoting Paul Elder (2021-12-21 04:53:40)
> Hardcode the lens focus range in result metadata. As our lens focus
> distance calibration is hardcoded to uncalibrated, and our minimum focus
> distance is zero, we hardcode the lens focus range to [0, 0].
>
> Signed-off-by: Paul Elder <paul.elder at ideasonboard.com>
Given we don't yet have a libcamera control to return something else,
this is probably ok - but we should make sure we remember to get this
updated when the controls go in.
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/android/camera_device.cpp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 6c2ea61f..8861447d 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -1650,6 +1650,9 @@ CameraDevice::getResultMetadata(const Camera3RequestDescriptor &descriptor) cons
> testPatternMode);
> }
>
> + std::vector<float> focusRange = { 0.0f, 0.0f };
> + resultMetadata->addEntry(ANDROID_LENS_FOCUS_RANGE, focusRange);
> +
> /*
> * Return the result metadata pack even is not valid: get() will return
> * nullptr.
> --
> 2.27.0
>
More information about the libcamera-devel
mailing list