summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2021-02-03 16:47:30 +0100
committerJacopo Mondi <jacopo@jmondi.org>2021-02-05 13:25:30 +0100
commitf29601efc40ff638d628dab59ad6a728868adc90 (patch)
tree58ff63b2d20dac49d949f17011a7ffd8190a36fc /src
parent5360d807b443339b53ee339c9d80c80bebed6aa0 (diff)
android: camera_device: Report HOT_PIXEL_MAP_MODE as OFF
The CaptureResultTest#testCameraCaptureResultAllKeys enforces the presence of the ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE result metadata. Report ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF as the Camera HAL does not support the generation of an hot pixel correction map. Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/android/camera_device.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 1e2a933c..ad7e31cf 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -705,10 +705,10 @@ std::tuple<uint32_t, uint32_t> CameraDevice::calculateStaticMetadataSize()
{
/*
* \todo Keep this in sync with the actual number of entries.
- * Currently: 53 entries, 850 bytes of static metadata
+ * Currently: 53 entries, 854 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
@@ -1330,6 +1330,7 @@ const camera_metadata_t *CameraDevice::getStaticMetadata()
ANDROID_SENSOR_TIMESTAMP,
ANDROID_STATISTICS_FACE_DETECT_MODE,
ANDROID_STATISTICS_LENS_SHADING_MAP_MODE,
+ ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE,
ANDROID_STATISTICS_SCENE_FLICKER,
};
staticMetadata_->addEntry(ANDROID_REQUEST_AVAILABLE_RESULT_KEYS,
@@ -2011,7 +2012,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
* Total bytes for JPEG metadata: 82
*/
std::unique_ptr<CameraMetadata> resultMetadata =
- std::make_unique<CameraMetadata>(43, 165);
+ std::make_unique<CameraMetadata>(44, 166);
if (!resultMetadata->isValid()) {
LOG(HAL, Error) << "Failed to allocate static metadata";
return nullptr;
@@ -2118,6 +2119,10 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
resultMetadata->addEntry(ANDROID_STATISTICS_LENS_SHADING_MAP_MODE,
&value, 1);
+ value = ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE_OFF;
+ resultMetadata->addEntry(ANDROID_STATISTICS_HOT_PIXEL_MAP_MODE,
+ &value, 1);
+
value = ANDROID_STATISTICS_SCENE_FLICKER_NONE;
resultMetadata->addEntry(ANDROID_STATISTICS_SCENE_FLICKER,
&value, 1);