From 72333917a7802d2a1f233418a0e2c15d7e86a357 Mon Sep 17 00:00:00 2001 From: Chien-Yu Chen Date: Wed, 8 Jul 2015 11:55:19 -0700 Subject: [PATCH] Camera: Enforce ZERO_SHUTTER_LAG mode Camera devices that support YUV or PRIVATE reprocessing must list ZERO_SHUTTER_LAG mode in android.edge.availableEdgeModes and android.noiseReduction.availableNoiseReductionModes, and it must be the default mode for ZSL template. Bug: 22266686 Change-Id: I4728b2261760d11d695e9e364d8a72b3b2d31284 --- core/java/android/hardware/camera2/CameraCharacteristics.java | 6 +++++- core/java/android/hardware/camera2/CameraMetadata.java | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 6c74a9f4632f..547cce4b7e32 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -738,7 +738,9 @@ public final class CameraCharacteristics extends CameraMetadataList of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera * device.

- *

Full-capability camera devices must always support OFF; all devices will list FAST.

+ *

Full-capability camera devices must always support OFF; camera devices that support + * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will + * list FAST.

*

Range of valid values:
* Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}

*

Optional - This value may be {@code null} on some devices.

@@ -1176,6 +1178,8 @@ public final class CameraCharacteristics extends CameraMetadataList of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported * by this camera device.

*

Full-capability camera devices will always support OFF and FAST.

+ *

Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support + * ZERO_SHUTTER_LAG.

*

Legacy-capability camera devices will only support FAST mode.

*

Range of valid values:
* Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}

diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index f7c6274759a9..0aa6447e7470 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -2024,7 +2024,8 @@ public abstract class CameraMetadata { * reasonable preview quality.

*

This mode is guaranteed to be supported by devices that support either the * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities - * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities).

+ * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will + * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.

* * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CaptureRequest#EDGE_MODE @@ -2154,7 +2155,8 @@ public abstract class CameraMetadata { * applied for reasonable preview quality.

*

This mode is guaranteed to be supported by devices that support either the * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities - * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities).

+ * ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} lists either of those capabilities) and it will + * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.

* * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES * @see CaptureRequest#NOISE_REDUCTION_MODE -- 2.11.0