[libcamera-devel] [PATCH 2/7] android: camera_device: Report AE_EXPOSURE_COMPENSATION
Jacopo Mondi
jacopo at jmondi.org
Wed Feb 3 17:25:55 CET 2021
The CaptureResultTest#testCameraCaptureResultAllKeys enforces the
presence of the ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION result
metadata.
Report 0 as the current value for
ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION in the result metadata
pack.
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/android/camera_device.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 02908beb867e..cdc75b949206 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 = 850;
+ uint32_t byteSize = 854;
/*
* Calculate space occupation in bytes for dynamically built metadata
@@ -1245,6 +1245,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
std::vector<int32_t> availableResultKeys = {
ANDROID_COLOR_CORRECTION_ABERRATION_MODE,
ANDROID_CONTROL_AE_ANTIBANDING_MODE,
+ ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
ANDROID_CONTROL_AE_LOCK,
ANDROID_CONTROL_AE_MODE,
ANDROID_CONTROL_AE_PRECAPTURE_TRIGGER,
@@ -1961,7 +1962,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
* Total bytes for JPEG metadata: 82
*/
std::unique_ptr<CameraMetadata> resultMetadata =
- std::make_unique<CameraMetadata>(41, 157);
+ std::make_unique<CameraMetadata>(42, 161);
if (!resultMetadata->isValid()) {
LOG(HAL, Error) << "Failed to allocate static metadata";
return nullptr;
@@ -1980,6 +1981,10 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
value = ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF;
resultMetadata->addEntry(ANDROID_CONTROL_AE_ANTIBANDING_MODE, &value, 1);
+ int32_t value32 = 0;
+ resultMetadata->addEntry(ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
+ &value32, 1);
+
value = ANDROID_CONTROL_AE_LOCK_OFF;
resultMetadata->addEntry(ANDROID_CONTROL_AE_LOCK, &value, 1);
--
2.30.0
More information about the libcamera-devel
mailing list