android: camera_device: Fix exposure time tag in exif and android

The ExposureTime libcamera control is in microseconds while android and
our exif component use nanoseconds. Convert it appropriately.

CTS also expects the ExposureTime exif tag to match the ExposureTime set
in the android result metadata. Fix it.

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Paul Elder 2021-01-28 17:45:44 +09:00
parent c763ae023d
commit 78f49d5e34
2 changed files with 3 additions and 3 deletions

View file

@ -2058,7 +2058,7 @@ CameraDevice::getResultMetadata(Camera3RequestDescriptor *descriptor,
}
if (metadata.contains(controls::ExposureTime)) {
int32_t exposure = metadata.get(controls::ExposureTime);
int64_t exposure = metadata.get(controls::ExposureTime) * 1000ULL;
resultMetadata->addEntry(ANDROID_SENSOR_EXPOSURE_TIME,
&exposure, 1);
}