From 9c9167efe229f2d7bad0422c371923d5d1776f52 Mon Sep 17 00:00:00 2001
From: Chien-Yu Chen
Date: Tue, 14 Jul 2015 16:38:25 -0700
Subject: [PATCH] Camera2: Update FAST mode for EE and NR
FAST for EE/NR modes may be the same as OFF for devices
whose EE/NR will slow down the capture rate.
Bug: 22486061
Change-Id: I162dc27a6ba6838fbbc1077dd346f4ff9bbacc43
---
.../android/hardware/camera2/CameraMetadata.java | 8 +++++---
.../android/hardware/camera2/CaptureRequest.java | 12 +++++++-----
.../java/android/hardware/camera2/CaptureResult.java | 12 +++++++-----
3 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index c8ae5d487ebd7..6393e4527ed91 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -1994,8 +1994,9 @@ public abstract class CameraMetadata {
public static final int EDGE_MODE_OFF = 0;
/**
- * Apply edge enhancement at a quality level that does not slow down frame rate relative to sensor
- * output
+ * Apply edge enhancement at a quality level that does not slow down frame rate
+ * relative to sensor output. It may be the same as OFF if edge enhancement will
+ * slow down frame rate relative to sensor.
* @see CaptureRequest#EDGE_MODE
*/
public static final int EDGE_MODE_FAST = 1;
@@ -2117,7 +2118,8 @@ public abstract class CameraMetadata {
/**
* Noise reduction is applied without reducing frame rate relative to sensor
- * output.
+ * output. It may be the same as OFF if noise reduction will reduce frame rate
+ * relative to sensor.
* @see CaptureRequest#NOISE_REDUCTION_MODE
*/
public static final int NOISE_REDUCTION_MODE_FAST = 1;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index a136d0ff49031..e965d654fcc71 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -1584,8 +1584,9 @@ public final class CaptureRequest extends CameraMetadata>
* will be applied. HIGH_QUALITY mode indicates that the
* camera device will use the highest-quality enhancement algorithms,
* even if it slows down capture rate. FAST means the camera device will
- * not slow down capture rate when applying edge enhancement. Every output stream will
- * have a similar amount of enhancement applied.
+ * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
+ * edge enhancement will slow down capture rate. Every output stream will have a similar
+ * amount of enhancement applied.
* ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
* buffer of high-resolution images during preview and reprocess image(s) from that buffer
* into a final capture when triggered by the user. In this mode, the camera device applies
@@ -1594,7 +1595,7 @@ public final class CaptureRequest extends CameraMetadata>
* since those will be reprocessed later if necessary.
* For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
* device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
- * The camera device may adjust its internal noise reduction parameters for best
+ * The camera device may adjust its internal edge enhancement parameters for best
* image quality based on the {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}, if it is set.
* Possible values:
*
@@ -2003,8 +2004,9 @@ public final class CaptureRequest extends CameraMetadata>
* will be applied. HIGH_QUALITY mode indicates that the camera device
* will use the highest-quality noise filtering algorithms,
* even if it slows down capture rate. FAST means the camera device will not
- * slow down capture rate when applying noise filtering. Every output stream will
- * have a similar amount of enhancement applied.
+ * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
+ * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
+ * Every output stream will have a similar amount of enhancement applied.
* ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
* buffer of high-resolution images during preview and reprocess image(s) from that buffer
* into a final capture when triggered by the user. In this mode, the camera device applies
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index f7cf1850ab46b..d5511c122c3d7 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -2095,8 +2095,9 @@ public class CaptureResult extends CameraMetadata> {
* will be applied. HIGH_QUALITY mode indicates that the
* camera device will use the highest-quality enhancement algorithms,
* even if it slows down capture rate. FAST means the camera device will
- * not slow down capture rate when applying edge enhancement. Every output stream will
- * have a similar amount of enhancement applied.
+ * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
+ * edge enhancement will slow down capture rate. Every output stream will have a similar
+ * amount of enhancement applied.
* ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
* buffer of high-resolution images during preview and reprocess image(s) from that buffer
* into a final capture when triggered by the user. In this mode, the camera device applies
@@ -2105,7 +2106,7 @@ public class CaptureResult extends CameraMetadata> {
* since those will be reprocessed later if necessary.
* For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
* device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
- * The camera device may adjust its internal noise reduction parameters for best
+ * The camera device may adjust its internal edge enhancement parameters for best
* image quality based on the {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}, if it is set.
* Possible values:
*