android: Set result metadata and EXIF fields based on request metadata

Set the following android result metadata:
- ANDROID_LENS_FOCAL_LENGTH
- ANDROID_LENS_APERTURE
- ANDROID_JPEG_GPS_TIMESTAMP
- ANDROID_JPEG_GPS_COORDINATES
- ANDROID_JPEG_GPS_PROCESSING_METHOD

And the following EXIF fields:
- GPSDatestamp
- GPSTimestamp
- GPSLocation
  - GPSLatitudeRef
  - GPSLatitude
  - GPSLongitudeRef
  - GPSLongitude
  - GPSAltitudeRef
  - GPSAltitude
- GPSProcessingMethod
- FocalLength
- ExposureTime
- FNumber
- ISO
- Flash
- WhiteBalance
- SubsecTime
- SubsecTimeOriginal
- SubsecTimeDigitized

Based on android request metadata.

This allows the following CTS tests to pass:
- android.hardware.camera2.cts.StillCaptureTest#testFocalLengths
- android.hardware.camera2.cts.StillCaptureTest#testJpegExif

Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Paul Elder 2021-01-23 13:54:28 +09:00
parent 229653a59b
commit abfabdd6e7
6 changed files with 89 additions and 21 deletions

View file

@ -22,7 +22,8 @@ public:
const libcamera::StreamConfiguration &outCfg) = 0;
virtual int process(const libcamera::FrameBuffer &source,
libcamera::Span<uint8_t> destination,
CameraMetadata *metadata) = 0;
const CameraMetadata &requestMetadata,
CameraMetadata *resultMetadata) = 0;
};
#endif /* __ANDROID_POST_PROCESSOR_H__ */