OSDN Git Service

Merge "hal3: Add availableHotPixelModes, update modes."
authorRuben Brunk <rubenbrunk@google.com>
Sat, 15 Mar 2014 00:14:56 +0000 (00:14 +0000)
committerAndroid (Google) Code Review <android-gerrit@google.com>
Sat, 15 Mar 2014 00:14:56 +0000 (00:14 +0000)
api/current.txt
core/java/android/hardware/camera2/CameraCharacteristics.java
core/java/android/hardware/camera2/CameraMetadata.java
core/java/android/hardware/camera2/CaptureRequest.java
core/java/android/hardware/camera2/CaptureResult.java

index 4534dd4..4f71a80 100644 (file)
@@ -11296,6 +11296,7 @@ package android.hardware.camera2 {
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_AWB_AVAILABLE_MODES;
     field public static final android.hardware.camera2.CameraMetadata.Key CONTROL_MAX_REGIONS;
     field public static final android.hardware.camera2.CameraMetadata.Key FLASH_INFO_AVAILABLE;
+    field public static final android.hardware.camera2.CameraMetadata.Key HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES;
     field public static final android.hardware.camera2.CameraMetadata.Key INFO_SUPPORTED_HARDWARE_LEVEL;
     field public static final android.hardware.camera2.CameraMetadata.Key JPEG_AVAILABLE_THUMBNAIL_SIZES;
     field public static final android.hardware.camera2.CameraMetadata.Key LENS_FACING;
@@ -11336,6 +11337,7 @@ package android.hardware.camera2 {
     field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_ORIENTATION;
     field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES;
+    field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_INFO_MAX_FACE_COUNT;
     field public static final android.hardware.camera2.CameraMetadata.Key SYNC_MAX_LATENCY;
     field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_MAX_CURVE_POINTS;
@@ -11630,6 +11632,7 @@ package android.hardware.camera2 {
     field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_TEST_PATTERN_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key SHADING_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_FACE_DETECT_MODE;
+    field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_HOT_PIXEL_MAP_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_LENS_SHADING_MAP_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_CURVE_BLUE;
     field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_CURVE_GREEN;
@@ -11667,7 +11670,6 @@ package android.hardware.camera2 {
     field public static final android.hardware.camera2.CameraMetadata.Key EDGE_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key FLASH_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key FLASH_STATE;
-    field public static final android.hardware.camera2.CameraMetadata.Key HOT_PIXEL_MAP;
     field public static final android.hardware.camera2.CameraMetadata.Key HOT_PIXEL_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key JPEG_GPS_COORDINATES;
     field public static final android.hardware.camera2.CameraMetadata.Key JPEG_GPS_PROCESSING_METHOD;
@@ -11704,6 +11706,8 @@ package android.hardware.camera2 {
     field public static final android.hardware.camera2.CameraMetadata.Key SHADING_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_FACES;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_FACE_DETECT_MODE;
+    field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_HOT_PIXEL_MAP;
+    field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_HOT_PIXEL_MAP_MODE;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_LENS_SHADING_MAP;
     field public static final android.hardware.camera2.CameraMetadata.Key STATISTICS_SCENE_FLICKER;
     field public static final android.hardware.camera2.CameraMetadata.Key TONEMAP_CURVE_BLUE;
index d27485b..4c04caa 100644 (file)
@@ -148,7 +148,7 @@ public final class CameraCharacteristics extends CameraMetadata {
      * <p>All camera devices support ON, and all camera devices with
      * flash units support ON_AUTO_FLASH and
      * ON_ALWAYS_FLASH.</p>
-     * <p>Full-capability camera devices always support OFF mode,
+     * <p>FULL mode camera devices always support OFF mode,
      * which enables application control of camera exposure time,
      * sensitivity, and frame duration.</p>
      *
@@ -244,7 +244,7 @@ public final class CameraCharacteristics extends CameraMetadata {
      * given camera device. This entry lists the valid modes for
      * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p>
      * <p>All camera devices will support ON mode.</p>
-     * <p>Full-capability camera devices will always support OFF mode,
+     * <p>FULL mode camera devices will always support OFF mode,
      * which enables application control of white balance, by using
      * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX).</p>
      *
@@ -280,6 +280,17 @@ public final class CameraCharacteristics extends CameraMetadata {
             new Key<Boolean>("android.flash.info.available", boolean.class);
 
     /**
+     * <p>The set of hot pixel correction modes that are supported by this
+     * camera device.</p>
+     * <p>This tag lists valid modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}.</p>
+     * <p>FULL mode camera devices will always support FAST.</p>
+     *
+     * @see CaptureRequest#HOT_PIXEL_MODE
+     */
+    public static final Key<byte[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =
+            new Key<byte[]>("android.hotPixel.availableHotPixelModes", byte[].class);
+
+    /**
      * <p>Supported resolutions for the JPEG thumbnail</p>
      * <p>Below condiditions will be satisfied for this size list:</p>
      * <ul>
@@ -1088,6 +1099,18 @@ public final class CameraCharacteristics extends CameraMetadata {
             new Key<Integer>("android.statistics.info.maxFaceCount", int.class);
 
     /**
+     * <p>The set of hot pixel map output modes supported by this camera device.</p>
+     * <p>This tag lists valid output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}.</p>
+     * <p>If no hotpixel map is available for this camera device, this will contain
+     * only OFF.  If the hotpixel map is available, this should include both
+     * the ON and OFF options.</p>
+     *
+     * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE
+     */
+    public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =
+            new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class);
+
+    /**
      * <p>Maximum number of supported points in the
      * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed}, or
      * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, or {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.</p>
index a62df0f..a3fbfbe 100644 (file)
@@ -1199,7 +1199,10 @@ public abstract class CameraMetadata {
     /**
      * <p>The frame rate must not be reduced relative to sensor raw output
      * for this option.</p>
-     * <p>No hot pixel correction is applied.</p>
+     * <p>No hot pixel correction is applied.
+     * The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
+     *
+     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
      * @see CaptureRequest#HOT_PIXEL_MODE
      */
     public static final int HOT_PIXEL_MODE_OFF = 0;
@@ -1207,7 +1210,10 @@ public abstract class CameraMetadata {
     /**
      * <p>The frame rate must not be reduced relative to sensor raw output
      * for this option.</p>
-     * <p>Hot pixel correction is applied.</p>
+     * <p>Hot pixel correction is applied.
+     * The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
+     *
+     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
      * @see CaptureRequest#HOT_PIXEL_MODE
      */
     public static final int HOT_PIXEL_MODE_FAST = 1;
@@ -1215,7 +1221,10 @@ public abstract class CameraMetadata {
     /**
      * <p>The frame rate may be reduced relative to sensor raw output
      * for this option.</p>
-     * <p>A high-quality hot pixel correction is applied.</p>
+     * <p>A high-quality hot pixel correction is applied.
+     * The hotpixel map may be returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.</p>
+     *
+     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
      * @see CaptureRequest#HOT_PIXEL_MODE
      */
     public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2;
index a8caba0..fbac529 100644 (file)
@@ -876,9 +876,13 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
 
     /**
      * <p>Set operational mode for hot pixel correction.</p>
+     * <p>Valid modes for this camera device are listed in
+     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
      * that do not accurately encode the incoming light (i.e. pixels that
      * are stuck at an arbitrary value).</p>
+     *
+     * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
      * @see #HOT_PIXEL_MODE_OFF
      * @see #HOT_PIXEL_MODE_FAST
      * @see #HOT_PIXEL_MODE_HIGH_QUALITY
@@ -1286,6 +1290,18 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
             new Key<Integer>("android.statistics.faceDetectMode", int.class);
 
     /**
+     * <p>Operating mode for hotpixel map generation.</p>
+     * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
+     * If set to OFF, no hotpixel map should be returned.</p>
+     * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
+     *
+     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
+     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
+     */
+    public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
+            new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
+
+    /**
      * <p>Whether the camera device will output the lens
      * shading map in output result metadata.</p>
      * <p>When set to ON,
index 0f2c7f7..ab1525e 100644 (file)
@@ -1166,24 +1166,14 @@ public final class CaptureResult extends CameraMetadata {
             new Key<Integer>("android.flash.state", int.class);
 
     /**
-     * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the
-     * sensor, where <code>(x, y)</code> lies between <code>(0, 0)</code>, which is the top-left
-     * of the pixel array, and the width,height of the pixel array given in
-     * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.  This may include hot pixels
-     * that lie outside of the active array bounds given by
-     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
-     *
-     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
-     */
-    public static final Key<int[]> HOT_PIXEL_MAP =
-            new Key<int[]>("android.hotPixel.map", int[].class);
-
-    /**
      * <p>Set operational mode for hot pixel correction.</p>
+     * <p>Valid modes for this camera device are listed in
+     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
      * that do not accurately encode the incoming light (i.e. pixels that
      * are stuck at an arbitrary value).</p>
+     *
+     * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
      * @see #HOT_PIXEL_MODE_OFF
      * @see #HOT_PIXEL_MODE_FAST
      * @see #HOT_PIXEL_MODE_HIGH_QUALITY
@@ -1971,6 +1961,33 @@ public final class CaptureResult extends CameraMetadata {
             new Key<Integer>("android.statistics.sceneFlicker", int.class);
 
     /**
+     * <p>Operating mode for hotpixel map generation.</p>
+     * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
+     * If set to OFF, no hotpixel map should be returned.</p>
+     * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
+     *
+     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
+     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
+     */
+    public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
+            new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
+
+    /**
+     * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
+     * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
+     * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
+     * bottom-right of the pixel array, respectively. The width and
+     * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
+     * This may include hot pixels that lie outside of the active array
+     * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
+     *
+     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+     * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
+     */
+    public static final Key<int[]> STATISTICS_HOT_PIXEL_MAP =
+            new Key<int[]>("android.statistics.hotPixelMap", int[].class);
+
+    /**
      * <p>Tonemapping / contrast / gamma curve for the blue
      * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
      * CONTRAST_CURVE.</p>