summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ruben Brunk <rubenbrunk@google.com> 2014-01-18 00:44:46 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2014-01-18 00:44:46 +0000
commitc759efb9f3368c5863f62f8a3b7881effda65271 (patch)
tree917c54898acddd5ab140487a9d46810c5c2fcddb
parentf9e039dd0311b5b43cc9d8722a290a93d7eb67cf (diff)
parent5f1dcfe49dfe7b9a4a40482152638af6ca925a6d (diff)
Merge "camera3: Update availableEffects, effectMode tags in frameworks/base."
-rw-r--r--core/java/android/hardware/camera2/CameraCharacteristics.java16
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.java18
-rw-r--r--core/java/android/hardware/camera2/CaptureRequest.java11
3 files changed, 41 insertions, 4 deletions
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index ff249543acfd..adc3a1eea39e 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -196,8 +196,20 @@ public final class CameraCharacteristics extends CameraMetadata {
new Key<byte[]>("android.control.afAvailableModes", byte[].class);
/**
- * <p>what subset of the full color effect enum
- * list is supported</p>
+ * <p>List containing the subset of color effects
+ * specified in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that is supported by
+ * this device.</p>
+ * <p>This list contains the color effect modes that can be applied to
+ * images produced by the camera device. Only modes that have
+ * been fully implemented for the current device may be included here.
+ * Implementations are not expected to be consistent across all devices.
+ * If no color effect modes are available for a device, this should
+ * simply be set to OFF.</p>
+ * <p>A color effect will only be applied if
+ * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
+ *
+ * @see CaptureRequest#CONTROL_EFFECT_MODE
+ * @see CaptureRequest#CONTROL_MODE
*/
public static final Key<byte[]> CONTROL_AVAILABLE_EFFECTS =
new Key<byte[]>("android.control.availableEffects", byte[].class);
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 8756dd1b615d..df200a456c03 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -681,46 +681,64 @@ public abstract class CameraMetadata {
//
/**
+ * <p>No color effect will be applied.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_OFF = 0;
/**
+ * <p>A "monocolor" effect where the image is mapped into
+ * a single color. This will typically be grayscale.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_MONO = 1;
/**
+ * <p>A "photo-negative" effect where the image's colors
+ * are inverted.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_NEGATIVE = 2;
/**
+ * <p>A "solarisation" effect (Sabattier effect) where the
+ * image is wholly or partially reversed in
+ * tone.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_SOLARIZE = 3;
/**
+ * <p>A "sepia" effect where the image is mapped into warm
+ * gray, red, and brown tones.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_SEPIA = 4;
/**
+ * <p>A "posterization" effect where the image uses
+ * discrete regions of tone rather than a continuous
+ * gradient of tones.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_POSTERIZE = 5;
/**
+ * <p>A "whiteboard" effect where the image is typically displayed
+ * as regions of white, with black or grey details.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_WHITEBOARD = 6;
/**
+ * <p>A "blackboard" effect where the image is typically displayed
+ * as regions of black, with white or grey details.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_BLACKBOARD = 7;
/**
+ * <p>An "aqua" effect where a blue hue is added to the image.</p>
* @see CaptureRequest#CONTROL_EFFECT_MODE
*/
public static final int CONTROL_EFFECT_MODE_AQUA = 8;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index 13a6cb6dfc1d..8f398de726bc 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -711,8 +711,15 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
new Key<Integer>("android.control.captureIntent", int.class);
/**
- * <p>Whether any special color effect is in use.
- * Only used if {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</p>
+ * <p>A special color effect to apply.</p>
+ * <p>When this mode is set, a color effect will be applied
+ * to images produced by the camera device. The interpretation
+ * and implementation of these color effects is left to the
+ * implementor of the camera device, and should not be
+ * depended on to be consistent (or present) across all
+ * devices.</p>
+ * <p>A color effect will only be applied if
+ * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
*
* @see CaptureRequest#CONTROL_MODE
* @see #CONTROL_EFFECT_MODE_OFF