From 1f3071d540fcefca6ca941568b7486657cd9198a Mon Sep 17 00:00:00 2001 From: Jayant Chowdhary Date: Mon, 9 Aug 2021 23:34:04 +0000 Subject: camera2: Documentation updates for ultra high resolution sensors. Bug: 195987968 1) Document mininum pixel array size restriction for ultra high resolution sensors. 2) Add docs explaining mandatory stream combinations for ultra high resolution sensors. Change-Id: Ic630259a57906c475210465588eda1a5cc3f68ec Signed-off-by: Jayant Chowdhary --- .../android/hardware/camera2/CameraDevice.java | 27 ++++++++++++++++++++++ .../android/hardware/camera2/CameraMetadata.java | 6 ++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/core/java/android/hardware/camera2/CameraDevice.java b/core/java/android/hardware/camera2/CameraDevice.java index af48b71f9962..3c1ec3e629a9 100644 --- a/core/java/android/hardware/camera2/CameraDevice.java +++ b/core/java/android/hardware/camera2/CameraDevice.java @@ -807,6 +807,23 @@ public abstract class CameraDevice implements AutoCloseable { * The same logic applies to other hardware levels and capabilities. *

* + *

Devices with the ULTRA_HIGH_RESOLUTION_SENSOR capability have some additional guarantees + * which clients can take advantage of :

+ * + * + * + * + * + * + * + *
Additional guaranteed combinations for ULTRA_HIGH_RESOLUTION sensors
Target 1 Target 2 Target 3 Sample use case(s)
Type SC MapMax size Type SC MapMax size Type SC MapMax size
{@code YUV / JPEG / RAW}{@code MAX_RES}{@code MAX}{@code PRIV / YUV}{@code DEFAULT}{@code PREVIEW} Ultra high res still image capture with preview
{@code YUV / JPEG / RAW}{@code MAX_RES}{@code MAX}{@code PRIV}{@code DEFAULT}{@code PREVIEW}{@code PRIV / YUV}{@code DEFAULT}{@code RECORD} Ultra high res still capture with preview + app based RECORD size analysis
{@code YUV / JPEG / RAW}{@code MAX_RES}{@code MAX}{@code PRIV}{@code DEFAULT}{@code PREVIEW}{@code JPEG / YUV / RAW}{@code DEFAULT}{@code MAX} Ultra high res still image capture with preview + default sensor pixel mode analysis stream

+ * + *

Here, SC Map, refers to the {@link StreamConfigurationMap}, the target stream sizes must + * be chosen from. {@code DEFAULT} refers to the default sensor pixel mode {@link + * StreamConfigurationMap} and {@code MAX_RES} refers to the maximum resolution {@link + * StreamConfigurationMap}. The same capture request must not mix targets from + * {@link StreamConfigurationMap}s corresponding to different sensor pixel modes. + * *

Since the capabilities of camera devices vary greatly, a given camera device may support * target combinations with sizes outside of these guarantees, but this can only be tested for * by calling {@link #isSessionConfigurationSupported} or attempting to create a session with @@ -989,6 +1006,16 @@ public abstract class CameraDevice implements AutoCloseable { * {@code PRIV}{@code MULTI_RES} {@code PRIV}{@code MULTI_RES} {@code YUV}{@code PREVIEW} {@code YUV}{@code MULTI_RES} Maximum-resolution two-input ZSL in-app processing. * {@code PRIV}/{@code YUV}{@code MULTI_RES} Same as input{@code MULTI_RES} {@code PRIV}{@code PREVIEW} {@code YUV}{@code PREVIEW} {@code JPEG}{@code MULTI_RES} ZSL still capture and in-app processing. *
+ *

Devices with the ULTRA_HIGH_RESOLUTION_SENSOR capability have some additional guarantees + * which clients can take advantage of :

+ * + * + * + * + * + * + * + *
Additional guaranteed combinations for ULTRA_HIGH_RESOLUTION sensors (YUV / PRIV inputs are guaranteed only if YUV / PRIVATE reprocessing are supported)
Input Target 1 Target 2 Target 3 Sample use case(s)
Type SC MapMax sizeType SC MapMax size Type SC MapMax size Type SC MapMax size
{@code RAW}{@code MAX_RES}{@code MAX}{@code RAW}{@code MAX_RES}{@code MAX}{@code PRIV / YUV}{@code DEFAULT}{@code PREVIEW} RAW remosaic reprocessing with seperate preview
{@code RAW}{@code MAX_RES}{@code MAX}{@code RAW}{@code MAX_RES}{@code MAX}{@code PRIV / YUV}{@code DEFAULT}{@code PREVIEW}{@code JPEG / YUV}{@code MAX_RES}{@code MAX} Ultra high res RAW -> JPEG / YUV with seperate preview
{@code YUV / PRIV}{@code MAX_RES}{@code MAX} {@code YUV / PRIV}{@code MAX_RES}{@code MAX}{@code YUV / PRIV}{@code DEFAULT}{@code PREVIEW}{@code JPEG }{@code MAX_RES}{@code MAX} Ultra high res PRIV / YUV -> YUV / JPEG reprocessing with seperate preview

* No additional mandatory stream combinations for RAW capability and LEVEL-3 hardware level. *

* diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index d9fa56e1cbaa..4b35294826db 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -1138,10 +1138,14 @@ public abstract class CameraMetadata { * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} describes the streams supported in 'default' * mode. * The stream configurations supported in 'max resolution' mode are described by - * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}.

+ * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION android.scaler.streamConfigurationMapMaximumResolution}. + * The maximum resolution mode pixel array size of a camera device + * ({@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}) with this capability, + * will be at least 24 megapixels.

* * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION + * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES */ public static final int REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR = 16; -- cgit v1.2.3-59-g8ed1b