diff --git a/camera/ndk/impl/ACameraMetadata.cpp b/camera/ndk/impl/ACameraMetadata.cpp index 29ad09bc60..62b0ec919d 100644 --- a/camera/ndk/impl/ACameraMetadata.cpp +++ b/camera/ndk/impl/ACameraMetadata.cpp @@ -305,6 +305,7 @@ ACameraMetadata::isCaptureRequestTag(const uint32_t tag) { case ACAMERA_STATISTICS_FACE_DETECT_MODE: case ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE: case ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE: + case ACAMERA_STATISTICS_OIS_DATA_MODE: case ACAMERA_TONEMAP_CURVE_BLUE: case ACAMERA_TONEMAP_CURVE_GREEN: case ACAMERA_TONEMAP_CURVE_RED: diff --git a/camera/ndk/include/camera/NdkCameraMetadataTags.h b/camera/ndk/include/camera/NdkCameraMetadataTags.h index 6e861a69df..b1d46ef441 100644 --- a/camera/ndk/include/camera/NdkCameraMetadataTags.h +++ b/camera/ndk/include/camera/NdkCameraMetadataTags.h @@ -4562,6 +4562,85 @@ typedef enum acamera_metadata_tag { */ ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE = // byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t) ACAMERA_STATISTICS_START + 16, + /** + *

Whether the camera device outputs the OIS data in output + * result metadata.

+ * + *

Type: byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)

+ * + *

This tag may appear in: + *

+ * + *

When set to ON, + * ACAMERA_STATISTICS_OIS_TIMESTAMPS, android.statistics.oisShiftPixelX, + * android.statistics.oisShiftPixelY will provide OIS data in the output result metadata.

+ * + * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS + */ + ACAMERA_STATISTICS_OIS_DATA_MODE = // byte (acamera_metadata_enum_android_statistics_ois_data_mode_t) + ACAMERA_STATISTICS_START + 17, + /** + *

An array of timestamps of OIS samples, in nanoseconds.

+ * + *

Type: int64[n]

+ * + *

This tag may appear in: + *

+ * + *

The array contains the timestamps of OIS samples. The timestamps are in the same + * timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.

+ * + * @see ACAMERA_SENSOR_TIMESTAMP + */ + ACAMERA_STATISTICS_OIS_TIMESTAMPS = // int64[n] + ACAMERA_STATISTICS_START + 18, + /** + *

An array of shifts of OIS samples, in x direction.

+ * + *

Type: float[n]

+ * + *

This tag may appear in: + *

+ * + *

The array contains the amount of shifts in x direction, in pixels, based on OIS samples. + * A positive value is a shift from left to right in active array coordinate system. For + * example, if the optical center is (1000, 500) in active array coordinates, an shift of + * (3, 0) puts the new optical center at (1003, 500).

+ *

The number of shifts must match the number of timestamps in + * ACAMERA_STATISTICS_OIS_TIMESTAMPS.

+ * + * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS + */ + ACAMERA_STATISTICS_OIS_X_SHIFTS = // float[n] + ACAMERA_STATISTICS_START + 19, + /** + *

An array of shifts of OIS samples, in y direction.

+ * + *

Type: float[n]

+ * + *

This tag may appear in: + *

+ * + *

The array contains the amount of shifts in y direction, in pixels, based on OIS samples. + * A positive value is a shift from top to bottom in active array coordinate system. For + * example, if the optical center is (1000, 500) in active array coordinates, an shift of + * (0, 5) puts the new optical center at (1000, 505).

+ *

The number of shifts must match the number of timestamps in + * ACAMERA_STATISTICS_OIS_TIMESTAMPS.

+ * + * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS + */ + ACAMERA_STATISTICS_OIS_Y_SHIFTS = // float[n] + ACAMERA_STATISTICS_START + 20, ACAMERA_STATISTICS_END, /** @@ -4634,6 +4713,24 @@ typedef enum acamera_metadata_tag { */ ACAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = // byte[n] ACAMERA_STATISTICS_INFO_START + 7, + /** + *

List of OIS data output modes for ACAMERA_STATISTICS_OIS_DATA_MODE that + * are supported by this camera device.

+ * + * @see ACAMERA_STATISTICS_OIS_DATA_MODE + * + *

Type: byte[n]

+ * + *

This tag may appear in: + *

+ * + *

If no OIS data output is available for this camera device, this key will + * contain only OFF.

+ */ + ACAMERA_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES = // byte[n] + ACAMERA_STATISTICS_INFO_START + 8, ACAMERA_STATISTICS_INFO_END, /** @@ -7226,6 +7323,20 @@ typedef enum acamera_metadata_enum_acamera_statistics_lens_shading_map_mode { } acamera_metadata_enum_android_statistics_lens_shading_map_mode_t; +// ACAMERA_STATISTICS_OIS_DATA_MODE +typedef enum acamera_metadata_enum_acamera_statistics_ois_data_mode { + /** + *

Do not include OIS data in the capture result.

+ */ + ACAMERA_STATISTICS_OIS_DATA_MODE_OFF = 0, + + /** + *

Include OIS data in the capture result.

+ */ + ACAMERA_STATISTICS_OIS_DATA_MODE_ON = 1, + +} acamera_metadata_enum_android_statistics_ois_data_mode_t; + // ACAMERA_TONEMAP_MODE