[libcamera-devel] [PATCH v2 5/9] android: camera_device: Report ColorFilterArrangement
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Dec 23 05:06:37 CET 2020
Hi Jacopo,
Thank you for the patch.
On Fri, Dec 18, 2020 at 05:47:50PM +0100, Jacopo Mondi wrote:
> Report the ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT property
> inspecting the draft property reported by the libcamera Camera.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
> 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 1c7bf4ed8073..bad8a51ae7f7 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -897,7 +897,10 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> staticMetadata_->addEntry(ANDROID_SENSOR_INFO_SENSITIVITY_RANGE,
> &sensitivityRange, 2);
>
> + /* Report the color filter arrangement: default it to GRBG. */
How about not adding ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT at all
when libcamera doesn't report the property ? This metadata tag is only
mandatory when raw capture is supported, and for sensors that don't
support capturing the Bayer pattern, we won't be able to support raw
capture.
> uint16_t filterArr = ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG;
> + if (properties.contains(properties::draft::ColorFilterArrangement))
> + filterArr = properties.get(properties::draft::ColorFilterArrangement);
> staticMetadata_->addEntry(ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,
> &filterArr, 1);
>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list