diff options
| author | Ruben Brunk <rubenbrunk@google.com> | 2014-03-15 00:14:56 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-15 00:14:56 +0000 |
| commit | 38900b15544e03aa8252022dc4b939748772ed6b (patch) | |
| tree | f5365be90dbcf7ad41c8543a4a7e11a71179985a /core/java/android | |
| parent | defe4b3fdbd2bd9ec04496178a338e32f986228d (diff) | |
| parent | 9d454fd6096dad310a476d50b5e7175e38cdc4ea (diff) | |
| download | frameworks_base-38900b15544e03aa8252022dc4b939748772ed6b.zip frameworks_base-38900b15544e03aa8252022dc4b939748772ed6b.tar.gz frameworks_base-38900b15544e03aa8252022dc4b939748772ed6b.tar.bz2 | |
Merge "hal3: Add availableHotPixelModes, update modes."
Diffstat (limited to 'core/java/android')
4 files changed, 84 insertions, 19 deletions
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index d27485b..4c04caa 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -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> diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index a62df0f..a3fbfbe 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -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; diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index a8caba0..fbac529 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -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, diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 0f2c7f7..ab1525e 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -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> |
