[libcamera-devel] [PATCH 1/7] android: camera_device: Report COLOR_CORRECTION_ABERRATION_MODE
Niklas Söderlund
niklas.soderlund at ragnatech.se
Thu Feb 4 10:21:53 CET 2021
Hi Jacopo,
Thanks for your work.
On 2021-02-03 17:25:54 +0100, Jacopo Mondi wrote:
> The CaptureResultTest#testCameraCaptureResultAllKeys enforces the
> presence of the ANDROID_COLOR_CORRECTION_ABERRATION_MODE result
> metadata.
>
> Report the only supported value of
> ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF.
>
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
As with this and the following patches I trust your calculations when
updating the number and size of the added keys.
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/android/camera_device.cpp | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
> index a50b0ebfe60e..02908beb867e 100644
> --- a/src/android/camera_device.cpp
> +++ b/src/android/camera_device.cpp
> @@ -708,7 +708,7 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
> * Currently: 53 entries, 846 bytes of static metadata
> */
> uint32_t numEntries = 53;
> - uint32_t byteSize = 846;
> + uint32_t byteSize = 850;
>
> /*
> * Calculate space occupation in bytes for dynamically built metadata
> @@ -1243,6 +1243,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
> availableRequestKeys.size());
>
> std::vector<int32_t> availableResultKeys = {
> + ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
> ANDROID_CONTROL_AE_ANTIBANDING_MODE,
> ANDROID_CONTROL_AE_LOCK,
> ANDROID_CONTROL_AE_MODE,
> @@ -1960,7 +1961,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
> * Total bytes for JPEG metadata: 82
> */
> std::unique_ptr<CameraMetadata> resultMetadata =
> - std::make_unique<CameraMetadata>(40, 156);
> + std::make_unique<CameraMetadata>(41, 157);
> if (!resultMetadata->isValid()) {
> LOG(HAL, Error) << "Failed to allocate static metadata";
> return nullptr;
> @@ -1972,7 +1973,11 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
> * from libcamera::Request::metadata.
> */
>
> - uint8_t value = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;
> + uint8_t value = ANDROID_COLOR_CORRECTION_ABERRATION_MODE_OFF;
> + resultMetadata->addEntry(ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
> + &value, 1);
> +
> + value = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;
> resultMetadata->addEntry(ANDROID_CONTROL_AE_ANTIBANDING_MODE, &value, 1);
>
> value = ANDROID_CONTROL_AE_LOCK_OFF;
> --
> 2.30.0
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list