diff options
| author | 2014-01-18 00:46:08 +0000 | |
|---|---|---|
| committer | 2014-01-18 00:46:08 +0000 | |
| commit | b8fb80dd0c0aa00955591bfbe2652f755187b49b (patch) | |
| tree | f57d27e5b5c7fb2e88b634334dc7e21f1efd6cb1 | |
| parent | c759efb9f3368c5863f62f8a3b7881effda65271 (diff) | |
| parent | ba93fe6468ef14865ec341bc14fc4a1dc7e88704 (diff) | |
Merge "Camera2: Update shading mode spec"
| -rw-r--r-- | core/java/android/hardware/camera2/CameraMetadata.java | 25 | ||||
| -rw-r--r-- | core/java/android/hardware/camera2/CaptureRequest.java | 33 | ||||
| -rw-r--r-- | core/java/android/hardware/camera2/CaptureResult.java | 33 |
3 files changed, 91 insertions, 0 deletions
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index df200a456c03..e9d794b83897 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -961,6 +961,31 @@ public abstract class CameraMetadata { public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; // + // Enumeration values for CaptureRequest#SHADING_MODE + // + + /** + * <p>No lens shading correction is applied</p> + * @see CaptureRequest#SHADING_MODE + * @hide + */ + public static final int SHADING_MODE_OFF = 0; + + /** + * <p>Must not slow down frame rate relative to sensor raw output</p> + * @see CaptureRequest#SHADING_MODE + * @hide + */ + public static final int SHADING_MODE_FAST = 1; + + /** + * <p>Frame rate may be reduced by high quality</p> + * @see CaptureRequest#SHADING_MODE + * @hide + */ + public static final int SHADING_MODE_HIGH_QUALITY = 2; + + // // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE // diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 8f398de726bc..176132b68296 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -1148,6 +1148,39 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable { new Key<Integer>("android.sensor.sensitivity", int.class); /** + * <p>Quality of lens shading correction applied + * to the image data.</p> + * <p>When set to OFF mode, no lens shading correction will be applied by the + * camera device, and an identity lens shading map data will be provided + * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens + * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>, + * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map + * shown below:</p> + * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] + * </code></pre> + * <p>When set to other modes, lens shading correction will be applied by the + * camera device. Applications can request lens shading map data by setting + * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide + * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified + * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p> + * + * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE + * @see CaptureResult#STATISTICS_LENS_SHADING_MAP + * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE + * @see #SHADING_MODE_OFF + * @see #SHADING_MODE_FAST + * @see #SHADING_MODE_HIGH_QUALITY + * @hide + */ + public static final Key<Integer> SHADING_MODE = + new Key<Integer>("android.shading.mode", int.class); + + /** * <p>State of the face detector * unit</p> * <p>Whether face detection is enabled, and whether it diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 999014288842..923726742d8a 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -1378,6 +1378,39 @@ public final class CaptureResult extends CameraMetadata { new Key<Float>("android.sensor.temperature", float.class); /** + * <p>Quality of lens shading correction applied + * to the image data.</p> + * <p>When set to OFF mode, no lens shading correction will be applied by the + * camera device, and an identity lens shading map data will be provided + * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens + * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>, + * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map + * shown below:</p> + * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, + * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] + * </code></pre> + * <p>When set to other modes, lens shading correction will be applied by the + * camera device. Applications can request lens shading map data by setting + * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide + * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified + * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p> + * + * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE + * @see CaptureResult#STATISTICS_LENS_SHADING_MAP + * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE + * @see #SHADING_MODE_OFF + * @see #SHADING_MODE_FAST + * @see #SHADING_MODE_HIGH_QUALITY + * @hide + */ + public static final Key<Integer> SHADING_MODE = + new Key<Integer>("android.shading.mode", int.class); + + /** * <p>State of the face detector * unit</p> * <p>Whether face detection is enabled, and whether it |