[libcamera-devel] [PATCH v3 4/4] android: camera_device: Align style of active area size
paul.elder at ideasonboard.com
paul.elder at ideasonboard.com
Tue Dec 29 05:19:28 CET 2020
Hi Jacopo,
On Mon, Dec 28, 2020 at 05:52:03PM +0100, Jacopo Mondi wrote:
> Align the style of ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE property
> registration with the one of the other sensor related properties.
s/one/ones/
>
> Cosmetic change only, no functional changes intended.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
Reviewed-by: Paul Elder <paul.elder at ideasonboard.com>
> ---
> src/android/camera_device.cpp | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index 9ad417ee6c3a..b48c7b7c9d2b 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -883,26 +883,25 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> staticMetadata_->addEntry(ANDROID_SENSOR_INFO_PHYSICAL_SIZE,
> physicalSize.data(), physicalSize.size());
>
> + std::vector<int32_t> activeAreaSize(4);
> if (properties.contains(properties::PixelArrayActiveAreas)) {
> const Span<const Rectangle> &rects =
> properties.get(properties::PixelArrayActiveAreas);
> - std::vector<int32_t> data{
> + activeAreaSize = {
> static_cast<int32_t>(rects[0].x),
> static_cast<int32_t>(rects[0].y),
> static_cast<int32_t>(rects[0].width),
> static_cast<int32_t>(rects[0].height),
> };
> - staticMetadata_->addEntry(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE,
> - data.data(), data.size());
> } else {
> /*
> * \todo Drop the default once the ov5670 and ov13858 drivers
> * are updated to report the pixel array size.
> */
> - int32_t data[] = { 0, 0, 2560, 1920 };
> - staticMetadata_->addEntry(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE,
> - data, 4);
> + activeAreaSize = { 0, 0, 2560, 1920 };
> }
> + staticMetadata_->addEntry(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE,
> + activeAreaSize.data(), 4);
>
> int32_t sensitivityRange[] = {
> 32, 2400,
> --
> 2.29.2
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
More information about the libcamera-devel
mailing list