summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/camera2
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2014-12-05 11:10:15 -0800
committerEino-Ville Talvala <etalvala@google.com>2014-12-05 11:31:08 -0800
commitf4eac129545fd583d33d9e7ab05cc87f61079bb9 (patch)
tree08397133a6739f3e7b990a6e9e9f2bc2f67fec89 /core/java/android/hardware/camera2
parent5a5afe010d2f8fb7e8f00858b8a305b4745c0469 (diff)
downloadframeworks_base-f4eac129545fd583d33d9e7ab05cc87f61079bb9.zip
frameworks_base-f4eac129545fd583d33d9e7ab05cc87f61079bb9.tar.gz
frameworks_base-f4eac129545fd583d33d9e7ab05cc87f61079bb9.tar.bz2
Camera2: Add HDR scene mode for backwards compatibility.
To maximize backwards compatibility, support the HDR scene mode fully, as it was supported on Camera HAL1 / Camera API1. Bug: 18639933 Change-Id: I35c164563379f7f820b42c674bd91f706061170c
Diffstat (limited to 'core/java/android/hardware/camera2')
-rw-r--r--core/java/android/hardware/camera2/CameraMetadata.java38
-rw-r--r--core/java/android/hardware/camera2/CaptureRequest.java2
-rw-r--r--core/java/android/hardware/camera2/CaptureResult.java2
3 files changed, 38 insertions, 4 deletions
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java
index 999de8a..1b10858 100644
--- a/core/java/android/hardware/camera2/CameraMetadata.java
+++ b/core/java/android/hardware/camera2/CameraMetadata.java
@@ -1648,11 +1648,41 @@ public abstract class CameraMetadata<TKey> {
public static final int CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO = 17;
/**
- * <p>Turn on custom high dynamic range (HDR) mode.</p>
- * <p>This is intended for LEGACY mode devices only;
- * HAL3+ camera devices should not implement this mode.</p>
+ * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
+ * <p>In this scene mode, the camera device captures images
+ * that keep a larger range of scene illumination levels
+ * visible in the final image. For example, when taking a
+ * picture of a object in front of a bright window, both
+ * the object and the scene through the window may be
+ * visible when using HDR mode, while in normal AUTO mode,
+ * one or the other may be poorly exposed. As a tradeoff,
+ * HDR mode generally takes much longer to capture a single
+ * image, has no user control, and may have other artifacts
+ * depending on the HDR method used.</p>
+ * <p>Therefore, HDR captures operate at a much slower rate
+ * than regular captures.</p>
+ * <p>In this mode, on LIMITED or FULL devices, when a request
+ * is made with a {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} of
+ * STILL_CAPTURE, the camera device will capture an image
+ * using a high dynamic range capture technique. On LEGACY
+ * devices, captures that target a JPEG-format output will
+ * be captured with HDR, and the capture intent is not
+ * relevant.</p>
+ * <p>The HDR capture may involve the device capturing a burst
+ * of images internally and combining them into one, or it
+ * may involve the device using specialized high dynamic
+ * range capture hardware. In all cases, a single image is
+ * produced in response to a capture request submitted
+ * while in HDR mode.</p>
+ * <p>Since substantial post-processing is generally needed to
+ * produce an HDR image, only YUV and JPEG outputs are
+ * supported for LIMITED/FULL device HDR captures, and only
+ * JPEG outputs are supported for LEGACY HDR
+ * captures. Using a RAW output for HDR capture is not
+ * supported.</p>
+ *
+ * @see CaptureRequest#CONTROL_CAPTURE_INTENT
* @see CaptureRequest#CONTROL_SCENE_MODE
- * @hide
*/
public static final int CONTROL_SCENE_MODE_HDR = 18;
diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java
index e89a402..0849df8 100644
--- a/core/java/android/hardware/camera2/CaptureRequest.java
+++ b/core/java/android/hardware/camera2/CaptureRequest.java
@@ -1294,6 +1294,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
* <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
* <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
* <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
+ * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li>
* </ul></p>
* <p><b>Available values for this device:</b><br>
* {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
@@ -1322,6 +1323,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
* @see #CONTROL_SCENE_MODE_CANDLELIGHT
* @see #CONTROL_SCENE_MODE_BARCODE
* @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO
+ * @see #CONTROL_SCENE_MODE_HDR
*/
@PublicKey
public static final Key<Integer> CONTROL_SCENE_MODE =
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 2c3b85f..1396940 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -1910,6 +1910,7 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
* <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
* <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
* <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
+ * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li>
* </ul></p>
* <p><b>Available values for this device:</b><br>
* {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
@@ -1938,6 +1939,7 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
* @see #CONTROL_SCENE_MODE_CANDLELIGHT
* @see #CONTROL_SCENE_MODE_BARCODE
* @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO
+ * @see #CONTROL_SCENE_MODE_HDR
*/
@PublicKey
public static final Key<Integer> CONTROL_SCENE_MODE =