blob: 0160622f2454150a1a939728559f62058fe87dbc [file] [log] [blame]
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08001/*
2 * Copyright (C) 2012 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Eino-Ville Talvala2f1a2e42013-07-25 17:12:05 -070017package android.hardware.camera2;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080018
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070019import android.hardware.camera2.impl.CameraMetadataNative;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080020
21/**
22 * <p>The results of a single image capture from the image sensor.</p>
23 *
24 * <p>Contains the final configuration for the capture hardware (sensor, lens,
25 * flash), the processing pipeline, the control algorithms, and the output
26 * buffers.</p>
27 *
28 * <p>CaptureResults are produced by a {@link CameraDevice} after processing a
29 * {@link CaptureRequest}. All properties listed for capture requests can also
30 * be queried on the capture result, to determine the final values used for
31 * capture. The result also includes additional metadata about the state of the
32 * camera device during the capture.</p>
33 *
34 */
35public final class CaptureResult extends CameraMetadata {
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070036
37 private final CameraMetadataNative mResults;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -070038 private final CaptureRequest mRequest;
39 private final int mSequenceId;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070040
Igor Murashkin70725502013-06-25 20:27:06 +000041 /**
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070042 * Takes ownership of the passed-in properties object
Igor Murashkin70725502013-06-25 20:27:06 +000043 * @hide
44 */
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -070045 public CaptureResult(CameraMetadataNative results, CaptureRequest parent, int sequenceId) {
46 if (results == null) {
47 throw new IllegalArgumentException("results was null");
48 }
49
50 if (parent == null) {
51 throw new IllegalArgumentException("parent was null");
52 }
53
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070054 mResults = results;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -070055 mRequest = parent;
56 mSequenceId = sequenceId;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070057 }
58
59 @Override
60 public <T> T get(Key<T> key) {
61 return mResults.get(key);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080062 }
63
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -070064 /**
65 * Get the request associated with this result.
66 *
67 * <p>Whenever a request is successfully captured, with
68 * {@link CameraDevice.CaptureListener#onCaptureCompleted},
69 * the {@code result}'s {@code getRequest()} will return that {@code request}.
70 * </p>
71 *
72 * <p>In particular,
73 * <code><pre>cameraDevice.capture(someRequest, new CaptureListener() {
74 * {@literal @}Override
75 * void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) {
76 * assert(myResult.getRequest.equals(myRequest) == true);
77 * }
78 * };
79 * </code></pre>
80 * </p>
81 *
82 * @return The request associated with this result. Never {@code null}.
83 */
84 public CaptureRequest getRequest() {
85 return mRequest;
86 }
87
88 /**
89 * Get the frame number associated with this result.
90 *
91 * <p>Whenever a request has been processed, regardless of failure or success,
92 * it gets a unique frame number assigned to its future result/failure.</p>
93 *
94 * <p>This value monotonically increments, starting with 0,
95 * for every new result or failure; and the scope is the lifetime of the
96 * {@link CameraDevice}.</p>
97 *
98 * @return int frame number
99 */
100 public int getFrameNumber() {
101 return get(REQUEST_FRAME_COUNT);
102 }
103
104 /**
105 * The sequence ID for this failure that was returned by the
106 * {@link CameraDevice#capture} family of functions.
107 *
108 * <p>The sequence ID is a unique monotonically increasing value starting from 0,
109 * incremented every time a new group of requests is submitted to the CameraDevice.</p>
110 *
111 * @return int The ID for the sequence of requests that this capture result is a part of
112 *
113 * @see CameraDevice.CaptureListener#onCaptureSequenceCompleted
114 */
115 public int getSequenceId() {
116 return mSequenceId;
117 }
118
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700119 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
120 * The key entries below this point are generated from metadata
121 * definitions in /system/media/camera/docs. Do not modify by hand or
122 * modify the comment blocks at the start or end.
123 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
124
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800125
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700126 /**
Zhijun He379af012014-05-06 11:54:54 -0700127 * <p>The mode control selects how the image data is converted from the
128 * sensor's native color into linear sRGB color.</p>
129 * <p>When auto-white balance is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this
130 * control is overridden by the AWB routine. When AWB is disabled, the
131 * application controls how the color mapping is performed.</p>
132 * <p>We define the expected processing pipeline below. For consistency
133 * across devices, this is always the case with TRANSFORM_MATRIX.</p>
134 * <p>When either FULL or HIGH_QUALITY is used, the camera device may
135 * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
136 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
137 * camera device (in the results) and be roughly correct.</p>
138 * <p>Switching to TRANSFORM_MATRIX and using the data provided from
139 * FAST or HIGH_QUALITY will yield a picture with the same white point
140 * as what was produced by the camera device in the earlier frame.</p>
141 * <p>The expected processing pipeline is as follows:</p>
142 * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
143 * <p>The white balance is encoded by two values, a 4-channel white-balance
144 * gain vector (applied in the Bayer domain), and a 3x3 color transform
145 * matrix (applied after demosaic).</p>
146 * <p>The 4-channel white-balance gains are defined as:</p>
147 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ]
148 * </code></pre>
149 * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
150 * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
151 * These may be identical for a given camera device implementation; if
152 * the camera device does not support a separate gain for even/odd green
153 * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
154 * <code>G_even</code> in the output result metadata.</p>
155 * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
156 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
157 * </code></pre>
158 * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
159 * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
160 * <p>with colors as follows:</p>
161 * <pre><code>r' = I0r + I1g + I2b
162 * g' = I3r + I4g + I5b
163 * b' = I6r + I7g + I8b
164 * </code></pre>
165 * <p>Both the input and output value ranges must match. Overflow/underflow
166 * values are clipped to fit within the range.</p>
167 *
168 * @see CaptureRequest#COLOR_CORRECTION_GAINS
169 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
170 * @see CaptureRequest#CONTROL_AWB_MODE
171 * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
172 * @see #COLOR_CORRECTION_MODE_FAST
173 * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
174 */
175 public static final Key<Integer> COLOR_CORRECTION_MODE =
176 new Key<Integer>("android.colorCorrection.mode", int.class);
177
178 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800179 * <p>A color transform matrix to use to transform
180 * from sensor RGB color space to output linear sRGB color space</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800181 * <p>This matrix is either set by the camera device when the request
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800182 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700183 * directly by the application in the request when the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800184 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800185 * <p>In the latter case, the camera device may round the matrix to account
186 * for precision issues; the final rounded matrix should be reported back
187 * in this matrix result metadata. The transform should keep the magnitude
188 * of the output color values within <code>[0, 1.0]</code> (assuming input color
189 * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800190 *
191 * @see CaptureRequest#COLOR_CORRECTION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700192 */
193 public static final Key<Rational[]> COLOR_CORRECTION_TRANSFORM =
194 new Key<Rational[]>("android.colorCorrection.transform", Rational[].class);
195
196 /**
Igor Murashkin7d2a5c52014-01-17 15:07:52 -0800197 * <p>Gains applying to Bayer raw color channels for
Zhijun Hecc28a412014-02-24 15:11:23 -0800198 * white-balance.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800199 * <p>The 4-channel white-balance gains are defined in
Igor Murashkin7d2a5c52014-01-17 15:07:52 -0800200 * the order of <code>[R G_even G_odd B]</code>, where <code>G_even</code> is the gain
201 * for green pixels on even rows of the output, and <code>G_odd</code>
202 * is the gain for green pixels on the odd rows. if a HAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700203 * does not support a separate gain for even/odd green channels,
Igor Murashkin7d2a5c52014-01-17 15:07:52 -0800204 * it should use the <code>G_even</code> value, and write <code>G_odd</code> equal to
205 * <code>G_even</code> in the output result metadata.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -0800206 * <p>This array is either set by the camera device when the request
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800207 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
Igor Murashkind5ff06a2013-08-20 15:15:06 -0700208 * directly by the application in the request when the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800209 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -0800210 * <p>The output should be the gains actually applied by the camera device to
Igor Murashkinace5bf02013-12-10 17:36:40 -0800211 * the current frame.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800212 *
213 * @see CaptureRequest#COLOR_CORRECTION_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700214 */
215 public static final Key<float[]> COLOR_CORRECTION_GAINS =
216 new Key<float[]>("android.colorCorrection.gains", float[].class);
217
218 /**
Zhijun He379af012014-05-06 11:54:54 -0700219 * <p>The desired setting for the camera device's auto-exposure
220 * algorithm's antibanding compensation.</p>
221 * <p>Some kinds of lighting fixtures, such as some fluorescent
222 * lights, flicker at the rate of the power supply frequency
223 * (60Hz or 50Hz, depending on country). While this is
224 * typically not noticeable to a person, it can be visible to
225 * a camera device. If a camera sets its exposure time to the
226 * wrong value, the flicker may become visible in the
227 * viewfinder as flicker or in a final captured image, as a
228 * set of variable-brightness bands across the image.</p>
229 * <p>Therefore, the auto-exposure routines of camera devices
230 * include antibanding routines that ensure that the chosen
231 * exposure value will not cause such banding. The choice of
232 * exposure time depends on the rate of flicker, which the
233 * camera device can detect automatically, or the expected
234 * rate can be selected by the application using this
235 * control.</p>
236 * <p>A given camera device may not support all of the possible
237 * options for the antibanding mode. The
238 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
239 * the available modes for a given camera device.</p>
240 * <p>The default mode is AUTO, which must be supported by all
241 * camera devices.</p>
242 * <p>If manual exposure control is enabled (by setting
243 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
244 * then this setting has no effect, and the application must
245 * ensure it selects exposure times that do not cause banding
246 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
247 * the application in this.</p>
248 *
249 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
250 * @see CaptureRequest#CONTROL_AE_MODE
251 * @see CaptureRequest#CONTROL_MODE
252 * @see CaptureResult#STATISTICS_SCENE_FLICKER
253 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
254 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
255 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
256 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO
257 */
258 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE =
259 new Key<Integer>("android.control.aeAntibandingMode", int.class);
260
261 /**
262 * <p>Adjustment to AE target image
263 * brightness</p>
264 * <p>For example, if EV step is 0.333, '6' will mean an
265 * exposure compensation of +2 EV; -3 will mean an exposure
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700266 * compensation of -1 EV. Note that this control will only be effective
267 * if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control will take effect even when
268 * {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p>
269 * <p>In the event of exposure compensation value being changed, camera device
270 * may take several frames to reach the newly requested exposure target.
271 * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING
272 * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
273 * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
274 * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
275 *
276 * @see CaptureRequest#CONTROL_AE_LOCK
277 * @see CaptureRequest#CONTROL_AE_MODE
278 * @see CaptureResult#CONTROL_AE_STATE
Zhijun He379af012014-05-06 11:54:54 -0700279 */
280 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION =
281 new Key<Integer>("android.control.aeExposureCompensation", int.class);
282
283 /**
284 * <p>Whether AE is currently locked to its latest
285 * calculated values.</p>
286 * <p>Note that even when AE is locked, the flash may be
287 * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
288 * ON_AUTO_FLASH_REDEYE.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700289 * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
290 * is ON, the camera device will still adjust its exposure value.</p>
Zhijun He379af012014-05-06 11:54:54 -0700291 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
292 * when AE is already locked, the camera device will not change the exposure time
293 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
294 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
295 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
296 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
297 * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
298 *
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700299 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Zhijun He379af012014-05-06 11:54:54 -0700300 * @see CaptureRequest#CONTROL_AE_MODE
301 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
302 * @see CaptureResult#CONTROL_AE_STATE
303 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
304 * @see CaptureRequest#SENSOR_SENSITIVITY
305 */
306 public static final Key<Boolean> CONTROL_AE_LOCK =
307 new Key<Boolean>("android.control.aeLock", boolean.class);
308
309 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800310 * <p>The desired mode for the camera device's
311 * auto-exposure routine.</p>
312 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
313 * AUTO.</p>
314 * <p>When set to any of the ON modes, the camera device's
315 * auto-exposure routine is enabled, overriding the
316 * application's selected exposure time, sensor sensitivity,
317 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
318 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
319 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
320 * is selected, the camera device's flash unit controls are
321 * also overridden.</p>
322 * <p>The FLASH modes are only available if the camera device
323 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
324 * <p>If flash TORCH mode is desired, this field must be set to
325 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
326 * <p>When set to any of the ON modes, the values chosen by the
327 * camera device auto-exposure routine for the overridden
328 * fields for a given capture will be available in its
329 * CaptureResult.</p>
330 *
Zhijun He5f2a47f2014-01-16 15:44:41 -0800331 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800332 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
333 * @see CaptureRequest#FLASH_MODE
Igor Murashkinaef3b7e2014-01-15 13:20:37 -0800334 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
335 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He399f05d2014-01-15 11:31:30 -0800336 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800337 * @see #CONTROL_AE_MODE_OFF
338 * @see #CONTROL_AE_MODE_ON
339 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
340 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
341 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
342 */
343 public static final Key<Integer> CONTROL_AE_MODE =
344 new Key<Integer>("android.control.aeMode", int.class);
345
346 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800347 * <p>List of areas to use for
Ruben Brunkf59521d2014-02-03 17:14:33 -0800348 * metering.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800349 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -0800350 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800351 * specified coordinates.</p>
352 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700353 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800354 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
355 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -0700356 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -0800357 * should be nonnegative.</p>
358 * <p>If all regions have 0 weight, then no specific metering area
Zhijun Hecc28a412014-02-24 15:11:23 -0800359 * needs to be used by the camera device. If the metering region is
360 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
361 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -0800362 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800363 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800364 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800365 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700366 */
367 public static final Key<int[]> CONTROL_AE_REGIONS =
368 new Key<int[]>("android.control.aeRegions", int[].class);
369
370 /**
Zhijun He379af012014-05-06 11:54:54 -0700371 * <p>Range over which fps can be adjusted to
372 * maintain exposure</p>
373 * <p>Only constrains AE algorithm, not manual control
374 * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
375 *
376 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
377 */
378 public static final Key<int[]> CONTROL_AE_TARGET_FPS_RANGE =
379 new Key<int[]>("android.control.aeTargetFpsRange", int[].class);
380
381 /**
382 * <p>Whether the camera device will trigger a precapture
383 * metering sequence when it processes this request.</p>
384 * <p>This entry is normally set to IDLE, or is not
385 * included at all in the request settings. When included and
386 * set to START, the camera device will trigger the autoexposure
387 * precapture metering sequence.</p>
388 * <p>The effect of AE precapture trigger depends on the current
389 * AE mode and state; see {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture
390 * state transition details.</p>
391 *
392 * @see CaptureResult#CONTROL_AE_STATE
393 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
394 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
395 */
396 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
397 new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
398
399 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800400 * <p>Current state of AE algorithm</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800401 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always
402 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
403 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
404 * the algorithm states to INACTIVE.</p>
405 * <p>The camera device can do several state transitions between two results, if it is
406 * allowed by the state transition table. For example: INACTIVE may never actually be
407 * seen in a result.</p>
408 * <p>The state in the result is the state for this image (in sync with this image): if
409 * AE state becomes CONVERGED, then the image data associated with this result should
410 * be good to use.</p>
411 * <p>Below are state transition tables for different AE modes.</p>
412 * <table>
413 * <thead>
414 * <tr>
415 * <th align="center">State</th>
416 * <th align="center">Transition Cause</th>
417 * <th align="center">New State</th>
418 * <th align="center">Notes</th>
419 * </tr>
420 * </thead>
421 * <tbody>
422 * <tr>
423 * <td align="center">INACTIVE</td>
424 * <td align="center"></td>
425 * <td align="center">INACTIVE</td>
426 * <td align="center">Camera device auto exposure algorithm is disabled</td>
427 * </tr>
428 * </tbody>
429 * </table>
430 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p>
431 * <table>
432 * <thead>
433 * <tr>
434 * <th align="center">State</th>
435 * <th align="center">Transition Cause</th>
436 * <th align="center">New State</th>
437 * <th align="center">Notes</th>
438 * </tr>
439 * </thead>
440 * <tbody>
441 * <tr>
442 * <td align="center">INACTIVE</td>
443 * <td align="center">Camera device initiates AE scan</td>
444 * <td align="center">SEARCHING</td>
445 * <td align="center">Values changing</td>
446 * </tr>
447 * <tr>
448 * <td align="center">INACTIVE</td>
449 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
450 * <td align="center">LOCKED</td>
451 * <td align="center">Values locked</td>
452 * </tr>
453 * <tr>
454 * <td align="center">SEARCHING</td>
455 * <td align="center">Camera device finishes AE scan</td>
456 * <td align="center">CONVERGED</td>
457 * <td align="center">Good values, not changing</td>
458 * </tr>
459 * <tr>
460 * <td align="center">SEARCHING</td>
461 * <td align="center">Camera device finishes AE scan</td>
462 * <td align="center">FLASH_REQUIRED</td>
463 * <td align="center">Converged but too dark w/o flash</td>
464 * </tr>
465 * <tr>
466 * <td align="center">SEARCHING</td>
467 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
468 * <td align="center">LOCKED</td>
469 * <td align="center">Values locked</td>
470 * </tr>
471 * <tr>
472 * <td align="center">CONVERGED</td>
473 * <td align="center">Camera device initiates AE scan</td>
474 * <td align="center">SEARCHING</td>
475 * <td align="center">Values changing</td>
476 * </tr>
477 * <tr>
478 * <td align="center">CONVERGED</td>
479 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
480 * <td align="center">LOCKED</td>
481 * <td align="center">Values locked</td>
482 * </tr>
483 * <tr>
484 * <td align="center">FLASH_REQUIRED</td>
485 * <td align="center">Camera device initiates AE scan</td>
486 * <td align="center">SEARCHING</td>
487 * <td align="center">Values changing</td>
488 * </tr>
489 * <tr>
490 * <td align="center">FLASH_REQUIRED</td>
491 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
492 * <td align="center">LOCKED</td>
493 * <td align="center">Values locked</td>
494 * </tr>
495 * <tr>
496 * <td align="center">LOCKED</td>
497 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
498 * <td align="center">SEARCHING</td>
499 * <td align="center">Values not good after unlock</td>
500 * </tr>
501 * <tr>
502 * <td align="center">LOCKED</td>
503 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
504 * <td align="center">CONVERGED</td>
505 * <td align="center">Values good after unlock</td>
506 * </tr>
507 * <tr>
508 * <td align="center">LOCKED</td>
509 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
510 * <td align="center">FLASH_REQUIRED</td>
511 * <td align="center">Exposure good, but too dark</td>
512 * </tr>
513 * <tr>
514 * <td align="center">PRECAPTURE</td>
515 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
516 * <td align="center">CONVERGED</td>
517 * <td align="center">Ready for high-quality capture</td>
518 * </tr>
519 * <tr>
520 * <td align="center">PRECAPTURE</td>
521 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
522 * <td align="center">LOCKED</td>
523 * <td align="center">Ready for high-quality capture</td>
524 * </tr>
525 * <tr>
526 * <td align="center">Any state</td>
527 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td>
528 * <td align="center">PRECAPTURE</td>
529 * <td align="center">Start AE precapture metering sequence</td>
530 * </tr>
531 * </tbody>
532 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800533 * <p>For the above table, the camera device may skip reporting any state changes that happen
534 * without application intervention (i.e. mode switch, trigger, locking). Any state that
535 * can be skipped in that manner is called a transient state.</p>
536 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
537 * listed in above table, it is also legal for the camera device to skip one or more
538 * transient states between two results. See below table for examples:</p>
539 * <table>
540 * <thead>
541 * <tr>
542 * <th align="center">State</th>
543 * <th align="center">Transition Cause</th>
544 * <th align="center">New State</th>
545 * <th align="center">Notes</th>
546 * </tr>
547 * </thead>
548 * <tbody>
549 * <tr>
550 * <td align="center">INACTIVE</td>
551 * <td align="center">Camera device finished AE scan</td>
552 * <td align="center">CONVERGED</td>
553 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
554 * </tr>
555 * <tr>
556 * <td align="center">Any state</td>
557 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
558 * <td align="center">FLASH_REQUIRED</td>
559 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
560 * </tr>
561 * <tr>
562 * <td align="center">Any state</td>
563 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
564 * <td align="center">CONVERGED</td>
565 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
566 * </tr>
567 * <tr>
568 * <td align="center">CONVERGED</td>
569 * <td align="center">Camera device finished AE scan</td>
570 * <td align="center">FLASH_REQUIRED</td>
571 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
572 * </tr>
573 * <tr>
574 * <td align="center">FLASH_REQUIRED</td>
575 * <td align="center">Camera device finished AE scan</td>
576 * <td align="center">CONVERGED</td>
577 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
578 * </tr>
579 * </tbody>
580 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -0800581 *
582 * @see CaptureRequest#CONTROL_AE_LOCK
583 * @see CaptureRequest#CONTROL_AE_MODE
584 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
585 * @see CaptureRequest#CONTROL_MODE
586 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700587 * @see #CONTROL_AE_STATE_INACTIVE
588 * @see #CONTROL_AE_STATE_SEARCHING
589 * @see #CONTROL_AE_STATE_CONVERGED
590 * @see #CONTROL_AE_STATE_LOCKED
591 * @see #CONTROL_AE_STATE_FLASH_REQUIRED
592 * @see #CONTROL_AE_STATE_PRECAPTURE
593 */
594 public static final Key<Integer> CONTROL_AE_STATE =
595 new Key<Integer>("android.control.aeState", int.class);
596
597 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800598 * <p>Whether AF is currently enabled, and what
599 * mode it is set to</p>
Zhijun Hecc28a412014-02-24 15:11:23 -0800600 * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus
601 * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>).</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800602 * <p>If the lens is controlled by the camera device auto-focus algorithm,
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800603 * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState}
Zhijun He78146ec2014-01-14 18:12:13 -0800604 * in result metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800605 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800606 * @see CaptureResult#CONTROL_AF_STATE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800607 * @see CaptureRequest#CONTROL_MODE
Zhijun Hecc28a412014-02-24 15:11:23 -0800608 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700609 * @see #CONTROL_AF_MODE_OFF
610 * @see #CONTROL_AF_MODE_AUTO
611 * @see #CONTROL_AF_MODE_MACRO
612 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
613 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
614 * @see #CONTROL_AF_MODE_EDOF
615 */
616 public static final Key<Integer> CONTROL_AF_MODE =
617 new Key<Integer>("android.control.afMode", int.class);
618
619 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800620 * <p>List of areas to use for focus
Ruben Brunkf59521d2014-02-03 17:14:33 -0800621 * estimation.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800622 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -0800623 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800624 * specified coordinates.</p>
625 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700626 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800627 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
628 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -0700629 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -0800630 * should be nonnegative.</p>
631 * <p>If all regions have 0 weight, then no specific focus area
Zhijun Hecc28a412014-02-24 15:11:23 -0800632 * needs to be used by the camera device. If the focusing region is
633 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
634 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -0800635 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800636 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800637 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800638 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700639 */
640 public static final Key<int[]> CONTROL_AF_REGIONS =
641 new Key<int[]>("android.control.afRegions", int[].class);
642
643 /**
Zhijun He379af012014-05-06 11:54:54 -0700644 * <p>Whether the camera device will trigger autofocus for this request.</p>
645 * <p>This entry is normally set to IDLE, or is not
646 * included at all in the request settings.</p>
647 * <p>When included and set to START, the camera device will trigger the
648 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
649 * <p>When set to CANCEL, the camera device will cancel any active trigger,
650 * and return to its initial AF state.</p>
651 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what that means for each AF mode.</p>
652 *
653 * @see CaptureResult#CONTROL_AF_STATE
654 * @see #CONTROL_AF_TRIGGER_IDLE
655 * @see #CONTROL_AF_TRIGGER_START
656 * @see #CONTROL_AF_TRIGGER_CANCEL
657 */
658 public static final Key<Integer> CONTROL_AF_TRIGGER =
659 new Key<Integer>("android.control.afTrigger", int.class);
660
661 /**
Zhijun He60b19dc2014-02-24 10:19:20 -0800662 * <p>Current state of AF algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800663 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
664 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
665 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
666 * the algorithm states to INACTIVE.</p>
667 * <p>The camera device can do several state transitions between two results, if it is
668 * allowed by the state transition table. For example: INACTIVE may never actually be
669 * seen in a result.</p>
670 * <p>The state in the result is the state for this image (in sync with this image): if
671 * AF state becomes FOCUSED, then the image data associated with this result should
672 * be sharp.</p>
673 * <p>Below are state transition tables for different AF modes.</p>
674 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p>
675 * <table>
676 * <thead>
677 * <tr>
678 * <th align="center">State</th>
679 * <th align="center">Transition Cause</th>
680 * <th align="center">New State</th>
681 * <th align="center">Notes</th>
682 * </tr>
683 * </thead>
684 * <tbody>
685 * <tr>
686 * <td align="center">INACTIVE</td>
687 * <td align="center"></td>
688 * <td align="center">INACTIVE</td>
689 * <td align="center">Never changes</td>
690 * </tr>
691 * </tbody>
692 * </table>
693 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p>
694 * <table>
695 * <thead>
696 * <tr>
697 * <th align="center">State</th>
698 * <th align="center">Transition Cause</th>
699 * <th align="center">New State</th>
700 * <th align="center">Notes</th>
701 * </tr>
702 * </thead>
703 * <tbody>
704 * <tr>
705 * <td align="center">INACTIVE</td>
706 * <td align="center">AF_TRIGGER</td>
707 * <td align="center">ACTIVE_SCAN</td>
708 * <td align="center">Start AF sweep, Lens now moving</td>
709 * </tr>
710 * <tr>
711 * <td align="center">ACTIVE_SCAN</td>
712 * <td align="center">AF sweep done</td>
713 * <td align="center">FOCUSED_LOCKED</td>
714 * <td align="center">Focused, Lens now locked</td>
715 * </tr>
716 * <tr>
717 * <td align="center">ACTIVE_SCAN</td>
718 * <td align="center">AF sweep done</td>
719 * <td align="center">NOT_FOCUSED_LOCKED</td>
720 * <td align="center">Not focused, Lens now locked</td>
721 * </tr>
722 * <tr>
723 * <td align="center">ACTIVE_SCAN</td>
724 * <td align="center">AF_CANCEL</td>
725 * <td align="center">INACTIVE</td>
726 * <td align="center">Cancel/reset AF, Lens now locked</td>
727 * </tr>
728 * <tr>
729 * <td align="center">FOCUSED_LOCKED</td>
730 * <td align="center">AF_CANCEL</td>
731 * <td align="center">INACTIVE</td>
732 * <td align="center">Cancel/reset AF</td>
733 * </tr>
734 * <tr>
735 * <td align="center">FOCUSED_LOCKED</td>
736 * <td align="center">AF_TRIGGER</td>
737 * <td align="center">ACTIVE_SCAN</td>
738 * <td align="center">Start new sweep, Lens now moving</td>
739 * </tr>
740 * <tr>
741 * <td align="center">NOT_FOCUSED_LOCKED</td>
742 * <td align="center">AF_CANCEL</td>
743 * <td align="center">INACTIVE</td>
744 * <td align="center">Cancel/reset AF</td>
745 * </tr>
746 * <tr>
747 * <td align="center">NOT_FOCUSED_LOCKED</td>
748 * <td align="center">AF_TRIGGER</td>
749 * <td align="center">ACTIVE_SCAN</td>
750 * <td align="center">Start new sweep, Lens now moving</td>
751 * </tr>
752 * <tr>
753 * <td align="center">Any state</td>
754 * <td align="center">Mode change</td>
755 * <td align="center">INACTIVE</td>
756 * <td align="center"></td>
757 * </tr>
758 * </tbody>
759 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800760 * <p>For the above table, the camera device may skip reporting any state changes that happen
761 * without application intervention (i.e. mode switch, trigger, locking). Any state that
762 * can be skipped in that manner is called a transient state.</p>
763 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
764 * state transitions listed in above table, it is also legal for the camera device to skip
765 * one or more transient states between two results. See below table for examples:</p>
766 * <table>
767 * <thead>
768 * <tr>
769 * <th align="center">State</th>
770 * <th align="center">Transition Cause</th>
771 * <th align="center">New State</th>
772 * <th align="center">Notes</th>
773 * </tr>
774 * </thead>
775 * <tbody>
776 * <tr>
777 * <td align="center">INACTIVE</td>
778 * <td align="center">AF_TRIGGER</td>
779 * <td align="center">FOCUSED_LOCKED</td>
780 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
781 * </tr>
782 * <tr>
783 * <td align="center">INACTIVE</td>
784 * <td align="center">AF_TRIGGER</td>
785 * <td align="center">NOT_FOCUSED_LOCKED</td>
786 * <td align="center">Focus failed after a scan, lens is now locked.</td>
787 * </tr>
788 * <tr>
789 * <td align="center">FOCUSED_LOCKED</td>
790 * <td align="center">AF_TRIGGER</td>
791 * <td align="center">FOCUSED_LOCKED</td>
792 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
793 * </tr>
794 * <tr>
795 * <td align="center">NOT_FOCUSED_LOCKED</td>
796 * <td align="center">AF_TRIGGER</td>
797 * <td align="center">FOCUSED_LOCKED</td>
798 * <td align="center">Focus is good after a scan, lens is not locked.</td>
799 * </tr>
800 * </tbody>
801 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -0800802 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
803 * <table>
804 * <thead>
805 * <tr>
806 * <th align="center">State</th>
807 * <th align="center">Transition Cause</th>
808 * <th align="center">New State</th>
809 * <th align="center">Notes</th>
810 * </tr>
811 * </thead>
812 * <tbody>
813 * <tr>
814 * <td align="center">INACTIVE</td>
815 * <td align="center">Camera device initiates new scan</td>
816 * <td align="center">PASSIVE_SCAN</td>
817 * <td align="center">Start AF scan, Lens now moving</td>
818 * </tr>
819 * <tr>
820 * <td align="center">INACTIVE</td>
821 * <td align="center">AF_TRIGGER</td>
822 * <td align="center">NOT_FOCUSED_LOCKED</td>
823 * <td align="center">AF state query, Lens now locked</td>
824 * </tr>
825 * <tr>
826 * <td align="center">PASSIVE_SCAN</td>
827 * <td align="center">Camera device completes current scan</td>
828 * <td align="center">PASSIVE_FOCUSED</td>
829 * <td align="center">End AF scan, Lens now locked</td>
830 * </tr>
831 * <tr>
832 * <td align="center">PASSIVE_SCAN</td>
833 * <td align="center">Camera device fails current scan</td>
834 * <td align="center">PASSIVE_UNFOCUSED</td>
835 * <td align="center">End AF scan, Lens now locked</td>
836 * </tr>
837 * <tr>
838 * <td align="center">PASSIVE_SCAN</td>
839 * <td align="center">AF_TRIGGER</td>
840 * <td align="center">FOCUSED_LOCKED</td>
841 * <td align="center">Immediate trans. If focus is good, Lens now locked</td>
842 * </tr>
843 * <tr>
844 * <td align="center">PASSIVE_SCAN</td>
845 * <td align="center">AF_TRIGGER</td>
846 * <td align="center">NOT_FOCUSED_LOCKED</td>
847 * <td align="center">Immediate trans. if focus is bad, Lens now locked</td>
848 * </tr>
849 * <tr>
850 * <td align="center">PASSIVE_SCAN</td>
851 * <td align="center">AF_CANCEL</td>
852 * <td align="center">INACTIVE</td>
853 * <td align="center">Reset lens position, Lens now locked</td>
854 * </tr>
855 * <tr>
856 * <td align="center">PASSIVE_FOCUSED</td>
857 * <td align="center">Camera device initiates new scan</td>
858 * <td align="center">PASSIVE_SCAN</td>
859 * <td align="center">Start AF scan, Lens now moving</td>
860 * </tr>
861 * <tr>
862 * <td align="center">PASSIVE_UNFOCUSED</td>
863 * <td align="center">Camera device initiates new scan</td>
864 * <td align="center">PASSIVE_SCAN</td>
865 * <td align="center">Start AF scan, Lens now moving</td>
866 * </tr>
867 * <tr>
868 * <td align="center">PASSIVE_FOCUSED</td>
869 * <td align="center">AF_TRIGGER</td>
870 * <td align="center">FOCUSED_LOCKED</td>
871 * <td align="center">Immediate trans. Lens now locked</td>
872 * </tr>
873 * <tr>
874 * <td align="center">PASSIVE_UNFOCUSED</td>
875 * <td align="center">AF_TRIGGER</td>
876 * <td align="center">NOT_FOCUSED_LOCKED</td>
877 * <td align="center">Immediate trans. Lens now locked</td>
878 * </tr>
879 * <tr>
880 * <td align="center">FOCUSED_LOCKED</td>
881 * <td align="center">AF_TRIGGER</td>
882 * <td align="center">FOCUSED_LOCKED</td>
883 * <td align="center">No effect</td>
884 * </tr>
885 * <tr>
886 * <td align="center">FOCUSED_LOCKED</td>
887 * <td align="center">AF_CANCEL</td>
888 * <td align="center">INACTIVE</td>
889 * <td align="center">Restart AF scan</td>
890 * </tr>
891 * <tr>
892 * <td align="center">NOT_FOCUSED_LOCKED</td>
893 * <td align="center">AF_TRIGGER</td>
894 * <td align="center">NOT_FOCUSED_LOCKED</td>
895 * <td align="center">No effect</td>
896 * </tr>
897 * <tr>
898 * <td align="center">NOT_FOCUSED_LOCKED</td>
899 * <td align="center">AF_CANCEL</td>
900 * <td align="center">INACTIVE</td>
901 * <td align="center">Restart AF scan</td>
902 * </tr>
903 * </tbody>
904 * </table>
905 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p>
906 * <table>
907 * <thead>
908 * <tr>
909 * <th align="center">State</th>
910 * <th align="center">Transition Cause</th>
911 * <th align="center">New State</th>
912 * <th align="center">Notes</th>
913 * </tr>
914 * </thead>
915 * <tbody>
916 * <tr>
917 * <td align="center">INACTIVE</td>
918 * <td align="center">Camera device initiates new scan</td>
919 * <td align="center">PASSIVE_SCAN</td>
920 * <td align="center">Start AF scan, Lens now moving</td>
921 * </tr>
922 * <tr>
923 * <td align="center">INACTIVE</td>
924 * <td align="center">AF_TRIGGER</td>
925 * <td align="center">NOT_FOCUSED_LOCKED</td>
926 * <td align="center">AF state query, Lens now locked</td>
927 * </tr>
928 * <tr>
929 * <td align="center">PASSIVE_SCAN</td>
930 * <td align="center">Camera device completes current scan</td>
931 * <td align="center">PASSIVE_FOCUSED</td>
932 * <td align="center">End AF scan, Lens now locked</td>
933 * </tr>
934 * <tr>
935 * <td align="center">PASSIVE_SCAN</td>
936 * <td align="center">Camera device fails current scan</td>
937 * <td align="center">PASSIVE_UNFOCUSED</td>
938 * <td align="center">End AF scan, Lens now locked</td>
939 * </tr>
940 * <tr>
941 * <td align="center">PASSIVE_SCAN</td>
942 * <td align="center">AF_TRIGGER</td>
943 * <td align="center">FOCUSED_LOCKED</td>
944 * <td align="center">Eventual trans. once focus good, Lens now locked</td>
945 * </tr>
946 * <tr>
947 * <td align="center">PASSIVE_SCAN</td>
948 * <td align="center">AF_TRIGGER</td>
949 * <td align="center">NOT_FOCUSED_LOCKED</td>
950 * <td align="center">Eventual trans. if cannot focus, Lens now locked</td>
951 * </tr>
952 * <tr>
953 * <td align="center">PASSIVE_SCAN</td>
954 * <td align="center">AF_CANCEL</td>
955 * <td align="center">INACTIVE</td>
956 * <td align="center">Reset lens position, Lens now locked</td>
957 * </tr>
958 * <tr>
959 * <td align="center">PASSIVE_FOCUSED</td>
960 * <td align="center">Camera device initiates new scan</td>
961 * <td align="center">PASSIVE_SCAN</td>
962 * <td align="center">Start AF scan, Lens now moving</td>
963 * </tr>
964 * <tr>
965 * <td align="center">PASSIVE_UNFOCUSED</td>
966 * <td align="center">Camera device initiates new scan</td>
967 * <td align="center">PASSIVE_SCAN</td>
968 * <td align="center">Start AF scan, Lens now moving</td>
969 * </tr>
970 * <tr>
971 * <td align="center">PASSIVE_FOCUSED</td>
972 * <td align="center">AF_TRIGGER</td>
973 * <td align="center">FOCUSED_LOCKED</td>
974 * <td align="center">Immediate trans. Lens now locked</td>
975 * </tr>
976 * <tr>
977 * <td align="center">PASSIVE_UNFOCUSED</td>
978 * <td align="center">AF_TRIGGER</td>
979 * <td align="center">NOT_FOCUSED_LOCKED</td>
980 * <td align="center">Immediate trans. Lens now locked</td>
981 * </tr>
982 * <tr>
983 * <td align="center">FOCUSED_LOCKED</td>
984 * <td align="center">AF_TRIGGER</td>
985 * <td align="center">FOCUSED_LOCKED</td>
986 * <td align="center">No effect</td>
987 * </tr>
988 * <tr>
989 * <td align="center">FOCUSED_LOCKED</td>
990 * <td align="center">AF_CANCEL</td>
991 * <td align="center">INACTIVE</td>
992 * <td align="center">Restart AF scan</td>
993 * </tr>
994 * <tr>
995 * <td align="center">NOT_FOCUSED_LOCKED</td>
996 * <td align="center">AF_TRIGGER</td>
997 * <td align="center">NOT_FOCUSED_LOCKED</td>
998 * <td align="center">No effect</td>
999 * </tr>
1000 * <tr>
1001 * <td align="center">NOT_FOCUSED_LOCKED</td>
1002 * <td align="center">AF_CANCEL</td>
1003 * <td align="center">INACTIVE</td>
1004 * <td align="center">Restart AF scan</td>
1005 * </tr>
1006 * </tbody>
1007 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001008 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1009 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1010 * camera device. When a trigger is included in a mode switch request, the trigger
1011 * will be evaluated in the context of the new mode in the request.
1012 * See below table for examples:</p>
1013 * <table>
1014 * <thead>
1015 * <tr>
1016 * <th align="center">State</th>
1017 * <th align="center">Transition Cause</th>
1018 * <th align="center">New State</th>
1019 * <th align="center">Notes</th>
1020 * </tr>
1021 * </thead>
1022 * <tbody>
1023 * <tr>
1024 * <td align="center">any state</td>
1025 * <td align="center">CAF--&gt;AUTO mode switch</td>
1026 * <td align="center">INACTIVE</td>
1027 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
1028 * </tr>
1029 * <tr>
1030 * <td align="center">any state</td>
1031 * <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
1032 * <td align="center">trigger-reachable states from INACTIVE</td>
1033 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
1034 * </tr>
1035 * <tr>
1036 * <td align="center">any state</td>
1037 * <td align="center">AUTO--&gt;CAF mode switch</td>
1038 * <td align="center">passively reachable states from INACTIVE</td>
1039 * <td align="center">Mode switch without trigger, passive transient state is skipped</td>
1040 * </tr>
1041 * </tbody>
1042 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -08001043 *
1044 * @see CaptureRequest#CONTROL_AF_MODE
1045 * @see CaptureRequest#CONTROL_MODE
1046 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001047 * @see #CONTROL_AF_STATE_INACTIVE
1048 * @see #CONTROL_AF_STATE_PASSIVE_SCAN
1049 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED
1050 * @see #CONTROL_AF_STATE_ACTIVE_SCAN
1051 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED
1052 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07001053 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001054 */
1055 public static final Key<Integer> CONTROL_AF_STATE =
1056 new Key<Integer>("android.control.afState", int.class);
1057
1058 /**
Zhijun He379af012014-05-06 11:54:54 -07001059 * <p>Whether AWB is currently locked to its
1060 * latest calculated values.</p>
1061 * <p>Note that AWB lock is only meaningful for AUTO
1062 * mode; in other modes, AWB is already fixed to a specific
1063 * setting.</p>
1064 */
1065 public static final Key<Boolean> CONTROL_AWB_LOCK =
1066 new Key<Boolean>("android.control.awbLock", boolean.class);
1067
1068 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001069 * <p>Whether AWB is currently setting the color
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001070 * transform fields, and what its illumination target
Zhijun Hecc28a412014-02-24 15:11:23 -08001071 * is.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001072 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p>
1073 * <p>When set to the ON mode, the camera device's auto white balance
1074 * routine is enabled, overriding the application's selected
1075 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
1076 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
1077 * <p>When set to the OFF mode, the camera device's auto white balance
Zhijun Hecc28a412014-02-24 15:11:23 -08001078 * routine is disabled. The application manually controls the white
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001079 * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}
Zhijun He399f05d2014-01-15 11:31:30 -08001080 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
1081 * <p>When set to any other modes, the camera device's auto white balance
1082 * routine is disabled. The camera device uses each particular illumination
1083 * target for white balance adjustment.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001084 *
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001085 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Zhijun He5f2a47f2014-01-16 15:44:41 -08001086 * @see CaptureRequest#COLOR_CORRECTION_MODE
1087 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001088 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001089 * @see #CONTROL_AWB_MODE_OFF
1090 * @see #CONTROL_AWB_MODE_AUTO
1091 * @see #CONTROL_AWB_MODE_INCANDESCENT
1092 * @see #CONTROL_AWB_MODE_FLUORESCENT
1093 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
1094 * @see #CONTROL_AWB_MODE_DAYLIGHT
1095 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
1096 * @see #CONTROL_AWB_MODE_TWILIGHT
1097 * @see #CONTROL_AWB_MODE_SHADE
1098 */
1099 public static final Key<Integer> CONTROL_AWB_MODE =
1100 new Key<Integer>("android.control.awbMode", int.class);
1101
1102 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001103 * <p>List of areas to use for illuminant
Ruben Brunkf59521d2014-02-03 17:14:33 -08001104 * estimation.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001105 * <p>Only used in AUTO mode.</p>
1106 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -08001107 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001108 * specified coordinates.</p>
1109 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001110 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001111 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1112 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -07001113 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -08001114 * should be nonnegative.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -08001115 * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area
1116 * needs to be used by the camera device. If the AWB region is
1117 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
1118 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -08001119 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001120 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001121 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001122 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001123 */
1124 public static final Key<int[]> CONTROL_AWB_REGIONS =
1125 new Key<int[]>("android.control.awbRegions", int[].class);
1126
1127 /**
Zhijun He379af012014-05-06 11:54:54 -07001128 * <p>Information to the camera device 3A (auto-exposure,
1129 * auto-focus, auto-white balance) routines about the purpose
1130 * of this capture, to help the camera device to decide optimal 3A
1131 * strategy.</p>
1132 * <p>This control (except for MANUAL) is only effective if
1133 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
1134 * <p>ZERO_SHUTTER_LAG must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1135 * contains ZSL. MANUAL must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1136 * contains MANUAL_SENSOR.</p>
1137 *
1138 * @see CaptureRequest#CONTROL_MODE
1139 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1140 * @see #CONTROL_CAPTURE_INTENT_CUSTOM
1141 * @see #CONTROL_CAPTURE_INTENT_PREVIEW
1142 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
1143 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
1144 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
1145 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
1146 * @see #CONTROL_CAPTURE_INTENT_MANUAL
1147 */
1148 public static final Key<Integer> CONTROL_CAPTURE_INTENT =
1149 new Key<Integer>("android.control.captureIntent", int.class);
1150
1151 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001152 * <p>Current state of AWB algorithm</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001153 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always
1154 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1155 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1156 * the algorithm states to INACTIVE.</p>
1157 * <p>The camera device can do several state transitions between two results, if it is
1158 * allowed by the state transition table. So INACTIVE may never actually be seen in
1159 * a result.</p>
1160 * <p>The state in the result is the state for this image (in sync with this image): if
1161 * AWB state becomes CONVERGED, then the image data associated with this result should
1162 * be good to use.</p>
1163 * <p>Below are state transition tables for different AWB modes.</p>
1164 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p>
1165 * <table>
1166 * <thead>
1167 * <tr>
1168 * <th align="center">State</th>
1169 * <th align="center">Transition Cause</th>
1170 * <th align="center">New State</th>
1171 * <th align="center">Notes</th>
1172 * </tr>
1173 * </thead>
1174 * <tbody>
1175 * <tr>
1176 * <td align="center">INACTIVE</td>
1177 * <td align="center"></td>
1178 * <td align="center">INACTIVE</td>
1179 * <td align="center">Camera device auto white balance algorithm is disabled</td>
1180 * </tr>
1181 * </tbody>
1182 * </table>
1183 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p>
1184 * <table>
1185 * <thead>
1186 * <tr>
1187 * <th align="center">State</th>
1188 * <th align="center">Transition Cause</th>
1189 * <th align="center">New State</th>
1190 * <th align="center">Notes</th>
1191 * </tr>
1192 * </thead>
1193 * <tbody>
1194 * <tr>
1195 * <td align="center">INACTIVE</td>
1196 * <td align="center">Camera device initiates AWB scan</td>
1197 * <td align="center">SEARCHING</td>
1198 * <td align="center">Values changing</td>
1199 * </tr>
1200 * <tr>
1201 * <td align="center">INACTIVE</td>
1202 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1203 * <td align="center">LOCKED</td>
1204 * <td align="center">Values locked</td>
1205 * </tr>
1206 * <tr>
1207 * <td align="center">SEARCHING</td>
1208 * <td align="center">Camera device finishes AWB scan</td>
1209 * <td align="center">CONVERGED</td>
1210 * <td align="center">Good values, not changing</td>
1211 * </tr>
1212 * <tr>
1213 * <td align="center">SEARCHING</td>
1214 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1215 * <td align="center">LOCKED</td>
1216 * <td align="center">Values locked</td>
1217 * </tr>
1218 * <tr>
1219 * <td align="center">CONVERGED</td>
1220 * <td align="center">Camera device initiates AWB scan</td>
1221 * <td align="center">SEARCHING</td>
1222 * <td align="center">Values changing</td>
1223 * </tr>
1224 * <tr>
1225 * <td align="center">CONVERGED</td>
1226 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1227 * <td align="center">LOCKED</td>
1228 * <td align="center">Values locked</td>
1229 * </tr>
1230 * <tr>
1231 * <td align="center">LOCKED</td>
1232 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1233 * <td align="center">SEARCHING</td>
1234 * <td align="center">Values not good after unlock</td>
1235 * </tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001236 * </tbody>
1237 * </table>
1238 * <p>For the above table, the camera device may skip reporting any state changes that happen
1239 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1240 * can be skipped in that manner is called a transient state.</p>
1241 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1242 * listed in above table, it is also legal for the camera device to skip one or more
1243 * transient states between two results. See below table for examples:</p>
1244 * <table>
1245 * <thead>
1246 * <tr>
1247 * <th align="center">State</th>
1248 * <th align="center">Transition Cause</th>
1249 * <th align="center">New State</th>
1250 * <th align="center">Notes</th>
1251 * </tr>
1252 * </thead>
1253 * <tbody>
1254 * <tr>
1255 * <td align="center">INACTIVE</td>
1256 * <td align="center">Camera device finished AWB scan</td>
1257 * <td align="center">CONVERGED</td>
1258 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1259 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001260 * <tr>
1261 * <td align="center">LOCKED</td>
1262 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1263 * <td align="center">CONVERGED</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001264 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001265 * </tr>
1266 * </tbody>
1267 * </table>
1268 *
1269 * @see CaptureRequest#CONTROL_AWB_LOCK
1270 * @see CaptureRequest#CONTROL_AWB_MODE
1271 * @see CaptureRequest#CONTROL_MODE
1272 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001273 * @see #CONTROL_AWB_STATE_INACTIVE
1274 * @see #CONTROL_AWB_STATE_SEARCHING
1275 * @see #CONTROL_AWB_STATE_CONVERGED
1276 * @see #CONTROL_AWB_STATE_LOCKED
1277 */
1278 public static final Key<Integer> CONTROL_AWB_STATE =
1279 new Key<Integer>("android.control.awbState", int.class);
1280
1281 /**
Zhijun He379af012014-05-06 11:54:54 -07001282 * <p>A special color effect to apply.</p>
1283 * <p>When this mode is set, a color effect will be applied
1284 * to images produced by the camera device. The interpretation
1285 * and implementation of these color effects is left to the
1286 * implementor of the camera device, and should not be
1287 * depended on to be consistent (or present) across all
1288 * devices.</p>
1289 * <p>A color effect will only be applied if
1290 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
1291 *
1292 * @see CaptureRequest#CONTROL_MODE
1293 * @see #CONTROL_EFFECT_MODE_OFF
1294 * @see #CONTROL_EFFECT_MODE_MONO
1295 * @see #CONTROL_EFFECT_MODE_NEGATIVE
1296 * @see #CONTROL_EFFECT_MODE_SOLARIZE
1297 * @see #CONTROL_EFFECT_MODE_SEPIA
1298 * @see #CONTROL_EFFECT_MODE_POSTERIZE
1299 * @see #CONTROL_EFFECT_MODE_WHITEBOARD
1300 * @see #CONTROL_EFFECT_MODE_BLACKBOARD
1301 * @see #CONTROL_EFFECT_MODE_AQUA
1302 */
1303 public static final Key<Integer> CONTROL_EFFECT_MODE =
1304 new Key<Integer>("android.control.effectMode", int.class);
1305
1306 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001307 * <p>Overall mode of 3A control
Zhijun Hecc28a412014-02-24 15:11:23 -08001308 * routines.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001309 * <p>High-level 3A control. When set to OFF, all 3A control
Zhijun He5f2a47f2014-01-16 15:44:41 -08001310 * by the camera device is disabled. The application must set the fields for
Zhijun Hef3537422013-12-16 16:56:35 -08001311 * capture parameters itself.</p>
1312 * <p>When set to AUTO, the individual algorithm controls in
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001313 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001314 * <p>When set to USE_SCENE_MODE, the individual controls in
Zhijun He5f2a47f2014-01-16 15:44:41 -08001315 * android.control.* are mostly disabled, and the camera device implements
Zhijun Hef3537422013-12-16 16:56:35 -08001316 * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
Zhijun He5f2a47f2014-01-16 15:44:41 -08001317 * as it wishes. The camera device scene mode 3A settings are provided by
Zhijun Hef3537422013-12-16 16:56:35 -08001318 * android.control.sceneModeOverrides.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001319 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1320 * is that this frame will not be used by camera device background 3A statistics
1321 * update, as if this frame is never captured. This mode can be used in the scenario
1322 * where the application doesn't want a 3A manual control capture to affect
1323 * the subsequent auto 3A capture results.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001324 *
1325 * @see CaptureRequest#CONTROL_AF_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001326 * @see #CONTROL_MODE_OFF
1327 * @see #CONTROL_MODE_AUTO
1328 * @see #CONTROL_MODE_USE_SCENE_MODE
Zhijun He2d5e8972014-02-07 16:13:46 -08001329 * @see #CONTROL_MODE_OFF_KEEP_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001330 */
1331 public static final Key<Integer> CONTROL_MODE =
1332 new Key<Integer>("android.control.mode", int.class);
1333
1334 /**
Zhijun He379af012014-05-06 11:54:54 -07001335 * <p>A camera mode optimized for conditions typical in a particular
1336 * capture setting.</p>
1337 * <p>This is the mode that that is active when
1338 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
1339 * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1340 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
1341 * <p>The interpretation and implementation of these scene modes is left
1342 * to the implementor of the camera device. Their behavior will not be
1343 * consistent across all devices, and any given device may only implement
1344 * a subset of these modes.</p>
1345 *
1346 * @see CaptureRequest#CONTROL_AE_MODE
1347 * @see CaptureRequest#CONTROL_AF_MODE
1348 * @see CaptureRequest#CONTROL_AWB_MODE
1349 * @see CaptureRequest#CONTROL_MODE
1350 * @see #CONTROL_SCENE_MODE_DISABLED
1351 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
1352 * @see #CONTROL_SCENE_MODE_ACTION
1353 * @see #CONTROL_SCENE_MODE_PORTRAIT
1354 * @see #CONTROL_SCENE_MODE_LANDSCAPE
1355 * @see #CONTROL_SCENE_MODE_NIGHT
1356 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
1357 * @see #CONTROL_SCENE_MODE_THEATRE
1358 * @see #CONTROL_SCENE_MODE_BEACH
1359 * @see #CONTROL_SCENE_MODE_SNOW
1360 * @see #CONTROL_SCENE_MODE_SUNSET
1361 * @see #CONTROL_SCENE_MODE_STEADYPHOTO
1362 * @see #CONTROL_SCENE_MODE_FIREWORKS
1363 * @see #CONTROL_SCENE_MODE_SPORTS
1364 * @see #CONTROL_SCENE_MODE_PARTY
1365 * @see #CONTROL_SCENE_MODE_CANDLELIGHT
1366 * @see #CONTROL_SCENE_MODE_BARCODE
1367 */
1368 public static final Key<Integer> CONTROL_SCENE_MODE =
1369 new Key<Integer>("android.control.sceneMode", int.class);
1370
1371 /**
1372 * <p>Whether video stabilization is
1373 * active</p>
1374 * <p>If enabled, video stabilization can modify the
1375 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream
1376 * stabilized</p>
1377 *
1378 * @see CaptureRequest#SCALER_CROP_REGION
1379 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF
1380 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON
1381 */
1382 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE =
1383 new Key<Integer>("android.control.videoStabilizationMode", int.class);
1384
1385 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001386 * <p>Operation mode for edge
Zhijun Hecc28a412014-02-24 15:11:23 -08001387 * enhancement.</p>
Zhijun He28079362013-12-17 10:35:40 -08001388 * <p>Edge/sharpness/detail enhancement. OFF means no
Zhijun Hecc28a412014-02-24 15:11:23 -08001389 * enhancement will be applied by the camera device.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001390 * <p>This must be set to one of the modes listed in {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001391 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun He28079362013-12-17 10:35:40 -08001392 * will be applied. HIGH_QUALITY mode indicates that the
Zhijun He5f2a47f2014-01-16 15:44:41 -08001393 * camera device will use the highest-quality enhancement algorithms,
1394 * even if it slows down capture rate. FAST means the camera device will
Zhijun He28079362013-12-17 10:35:40 -08001395 * not slow down capture rate when applying edge enhancement.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001396 *
1397 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001398 * @see #EDGE_MODE_OFF
1399 * @see #EDGE_MODE_FAST
1400 * @see #EDGE_MODE_HIGH_QUALITY
1401 */
1402 public static final Key<Integer> EDGE_MODE =
1403 new Key<Integer>("android.edge.mode", int.class);
1404
1405 /**
Zhijun He66d065a2014-01-16 18:18:50 -08001406 * <p>The desired mode for for the camera device's flash control.</p>
1407 * <p>This control is only effective when flash unit is available
Zhijun He153ac102014-02-03 12:25:12 -08001408 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
Zhijun He66d065a2014-01-16 18:18:50 -08001409 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
1410 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
1411 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
1412 * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
1413 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
1414 * device's auto-exposure routine's result. When used in still capture case, this
1415 * control should be used along with AE precapture metering sequence
1416 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
1417 * <p>When set to TORCH, the flash will be on continuously. This mode can be used
1418 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08001419 * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p>
Zhijun He66d065a2014-01-16 18:18:50 -08001420 *
1421 * @see CaptureRequest#CONTROL_AE_MODE
1422 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1423 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Zhijun Heca1b73a2014-02-03 12:39:53 -08001424 * @see CaptureResult#FLASH_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001425 * @see #FLASH_MODE_OFF
1426 * @see #FLASH_MODE_SINGLE
1427 * @see #FLASH_MODE_TORCH
1428 */
1429 public static final Key<Integer> FLASH_MODE =
1430 new Key<Integer>("android.flash.mode", int.class);
1431
1432 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001433 * <p>Current state of the flash
Zhijun Heca1b73a2014-02-03 12:39:53 -08001434 * unit.</p>
1435 * <p>When the camera device doesn't have flash unit
1436 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
1437 * Other states indicate the current flash status.</p>
1438 *
1439 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001440 * @see #FLASH_STATE_UNAVAILABLE
1441 * @see #FLASH_STATE_CHARGING
1442 * @see #FLASH_STATE_READY
1443 * @see #FLASH_STATE_FIRED
Zhijun He8dda7272014-03-25 13:49:30 -07001444 * @see #FLASH_STATE_PARTIAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001445 */
1446 public static final Key<Integer> FLASH_STATE =
1447 new Key<Integer>("android.flash.state", int.class);
1448
1449 /**
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001450 * <p>Set operational mode for hot pixel correction.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001451 * <p>Valid modes for this camera device are listed in
1452 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001453 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
1454 * that do not accurately encode the incoming light (i.e. pixels that
1455 * are stuck at an arbitrary value).</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001456 *
1457 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001458 * @see #HOT_PIXEL_MODE_OFF
1459 * @see #HOT_PIXEL_MODE_FAST
1460 * @see #HOT_PIXEL_MODE_HIGH_QUALITY
1461 */
1462 public static final Key<Integer> HOT_PIXEL_MODE =
1463 new Key<Integer>("android.hotPixel.mode", int.class);
1464
1465 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001466 * <p>GPS coordinates to include in output JPEG
1467 * EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001468 */
1469 public static final Key<double[]> JPEG_GPS_COORDINATES =
1470 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
1471
1472 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001473 * <p>32 characters describing GPS algorithm to
1474 * include in EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001475 */
1476 public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
1477 new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
1478
1479 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001480 * <p>Time GPS fix was made to include in
1481 * EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001482 */
1483 public static final Key<Long> JPEG_GPS_TIMESTAMP =
1484 new Key<Long>("android.jpeg.gpsTimestamp", long.class);
1485
1486 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001487 * <p>Orientation of JPEG image to
1488 * write</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001489 */
1490 public static final Key<Integer> JPEG_ORIENTATION =
1491 new Key<Integer>("android.jpeg.orientation", int.class);
1492
1493 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001494 * <p>Compression quality of the final JPEG
1495 * image</p>
1496 * <p>85-95 is typical usage range</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001497 */
1498 public static final Key<Byte> JPEG_QUALITY =
1499 new Key<Byte>("android.jpeg.quality", byte.class);
1500
1501 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001502 * <p>Compression quality of JPEG
1503 * thumbnail</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001504 */
1505 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
1506 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
1507
1508 /**
Zhijun He5a9ff372013-12-26 11:49:09 -08001509 * <p>Resolution of embedded JPEG thumbnail</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001510 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
1511 * but the captured JPEG will still be a valid image.</p>
Zhijun He5a9ff372013-12-26 11:49:09 -08001512 * <p>When a jpeg image capture is issued, the thumbnail size selected should have
1513 * the same aspect ratio as the jpeg image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001514 */
1515 public static final Key<android.hardware.camera2.Size> JPEG_THUMBNAIL_SIZE =
1516 new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
1517
1518 /**
Zhijun Hefb46c642014-01-14 17:57:23 -08001519 * <p>The ratio of lens focal length to the effective
1520 * aperture diameter.</p>
1521 * <p>This will only be supported on the camera devices that
1522 * have variable aperture lens. The aperture value can only be
1523 * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p>
1524 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
1525 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001526 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
Zhijun Hefb46c642014-01-14 17:57:23 -08001527 * to achieve manual exposure control.</p>
1528 * <p>The requested aperture value may take several frames to reach the
1529 * requested value; the camera device will report the current (intermediate)
Zhijun Heca1b73a2014-02-03 12:39:53 -08001530 * aperture size in capture result metadata while the aperture is changing.
1531 * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08001532 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
1533 * the ON modes, this will be overridden by the camera device
1534 * auto-exposure algorithm, the overridden values are then provided
1535 * back to the user in the corresponding result.</p>
1536 *
Zhijun He399f05d2014-01-15 11:31:30 -08001537 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001538 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
Zhijun Heca1b73a2014-02-03 12:39:53 -08001539 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001540 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001541 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001542 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001543 */
1544 public static final Key<Float> LENS_APERTURE =
1545 new Key<Float>("android.lens.aperture", float.class);
1546
1547 /**
Ruben Brunk855bae42014-01-17 10:30:32 -08001548 * <p>State of lens neutral density filter(s).</p>
1549 * <p>This will not be supported on most camera devices. On devices
1550 * where this is supported, this may only be set to one of the
1551 * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p>
1552 * <p>Lens filters are typically used to lower the amount of light the
1553 * sensor is exposed to (measured in steps of EV). As used here, an EV
1554 * step is the standard logarithmic representation, which are
1555 * non-negative, and inversely proportional to the amount of light
1556 * hitting the sensor. For example, setting this to 0 would result
1557 * in no reduction of the incoming light, and setting this to 2 would
1558 * mean that the filter is set to reduce incoming light by two stops
1559 * (allowing 1/4 of the prior amount of light to the sensor).</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08001560 * <p>It may take several frames before the lens filter density changes
1561 * to the requested value. While the filter density is still changing,
1562 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08001563 *
1564 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
Zhijun Heca1b73a2014-02-03 12:39:53 -08001565 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001566 */
1567 public static final Key<Float> LENS_FILTER_DENSITY =
1568 new Key<Float>("android.lens.filterDensity", float.class);
1569
1570 /**
Ruben Brunka20f4c22014-01-17 15:21:13 -08001571 * <p>The current lens focal length; used for optical zoom.</p>
1572 * <p>This setting controls the physical focal length of the camera
1573 * device's lens. Changing the focal length changes the field of
1574 * view of the camera device, and is usually used for optical zoom.</p>
1575 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
1576 * setting won't be applied instantaneously, and it may take several
Zhijun Heca1b73a2014-02-03 12:39:53 -08001577 * frames before the lens can change to the requested focal length.
Ruben Brunka20f4c22014-01-17 15:21:13 -08001578 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
1579 * be set to MOVING.</p>
1580 * <p>This is expected not to be supported on most devices.</p>
1581 *
1582 * @see CaptureRequest#LENS_APERTURE
1583 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1584 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001585 */
1586 public static final Key<Float> LENS_FOCAL_LENGTH =
1587 new Key<Float>("android.lens.focalLength", float.class);
1588
1589 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001590 * <p>Distance to plane of sharpest focus,
1591 * measured from frontmost surface of the lens</p>
1592 * <p>Should be zero for fixed-focus cameras</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001593 */
1594 public static final Key<Float> LENS_FOCUS_DISTANCE =
1595 new Key<Float>("android.lens.focusDistance", float.class);
1596
1597 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001598 * <p>The range of scene distances that are in
1599 * sharp focus (depth of field)</p>
1600 * <p>If variable focus not supported, can still report
1601 * fixed depth of field range</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001602 */
Zhijun Hec59b0782013-09-26 10:39:36 -07001603 public static final Key<float[]> LENS_FOCUS_RANGE =
1604 new Key<float[]>("android.lens.focusRange", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001605
1606 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08001607 * <p>Sets whether the camera device uses optical image stabilization (OIS)
1608 * when capturing images.</p>
1609 * <p>OIS is used to compensate for motion blur due to small movements of
1610 * the camera during capture. Unlike digital image stabilization, OIS makes
1611 * use of mechanical elements to stabilize the camera sensor, and thus
1612 * allows for longer exposure times before camera shake becomes
1613 * apparent.</p>
1614 * <p>This is not expected to be supported on most devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001615 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
1616 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
1617 */
1618 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
1619 new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
1620
1621 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08001622 * <p>Current lens status.</p>
1623 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1624 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested,
1625 * they may take several frames to reach the requested values. This state indicates
1626 * the current status of the lens parameters.</p>
1627 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
1628 * either because the parameters are all fixed, or because the lens has had enough
1629 * time to reach the most recently-requested values.
1630 * If all these lens parameters are not changable for a camera device, as listed below:</p>
1631 * <ul>
1632 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means
1633 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li>
1634 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value),
1635 * which means the optical zoom is not supported.</li>
1636 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li>
1637 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li>
1638 * </ul>
1639 * <p>Then this state will always be STATIONARY.</p>
1640 * <p>When the state is MOVING, it indicates that at least one of the lens parameters
1641 * is changing.</p>
1642 *
1643 * @see CaptureRequest#LENS_APERTURE
1644 * @see CaptureRequest#LENS_FILTER_DENSITY
1645 * @see CaptureRequest#LENS_FOCAL_LENGTH
1646 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1647 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
1648 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
1649 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
1650 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001651 * @see #LENS_STATE_STATIONARY
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07001652 * @see #LENS_STATE_MOVING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001653 */
1654 public static final Key<Integer> LENS_STATE =
1655 new Key<Integer>("android.lens.state", int.class);
1656
1657 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001658 * <p>Mode of operation for the noise reduction
1659 * algorithm</p>
Zhijun He28079362013-12-17 10:35:40 -08001660 * <p>Noise filtering control. OFF means no noise reduction
Zhijun Hecc28a412014-02-24 15:11:23 -08001661 * will be applied by the camera device.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001662 * <p>This must be set to a valid mode in
1663 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001664 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
1665 * will be applied. HIGH_QUALITY mode indicates that the camera device
1666 * will use the highest-quality noise filtering algorithms,
1667 * even if it slows down capture rate. FAST means the camera device should not
Zhijun He28079362013-12-17 10:35:40 -08001668 * slow down capture rate when applying noise filtering.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001669 *
1670 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001671 * @see #NOISE_REDUCTION_MODE_OFF
1672 * @see #NOISE_REDUCTION_MODE_FAST
1673 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
1674 */
1675 public static final Key<Integer> NOISE_REDUCTION_MODE =
1676 new Key<Integer>("android.noiseReduction.mode", int.class);
1677
1678 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001679 * <p>Whether a result given to the framework is the
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001680 * final one for the capture, or only a partial that contains a
1681 * subset of the full set of dynamic metadata
Igor Murashkinace5bf02013-12-10 17:36:40 -08001682 * values.</p>
1683 * <p>The entries in the result metadata buffers for a
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001684 * single capture may not overlap, except for this entry. The
1685 * FINAL buffers must retain FIFO ordering relative to the
1686 * requests that generate them, so the FINAL buffer for frame 3 must
1687 * always be sent to the framework after the FINAL buffer for frame 2, and
1688 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned
1689 * in any order relative to other frames, but all PARTIAL buffers for a given
1690 * capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun Hecc28a412014-02-24 15:11:23 -08001691 * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001692 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07001693 * @deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001694 * @hide
1695 */
Igor Murashkin9c595172014-05-12 13:56:20 -07001696 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001697 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
1698 new Key<Boolean>("android.quirks.partialResult", boolean.class);
1699
1700 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001701 * <p>A frame counter set by the framework. This value monotonically
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -07001702 * increases with every new result (that is, each new result has a unique
Igor Murashkinace5bf02013-12-10 17:36:40 -08001703 * frameCount value).</p>
1704 * <p>Reset on release()</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001705 */
1706 public static final Key<Integer> REQUEST_FRAME_COUNT =
1707 new Key<Integer>("android.request.frameCount", int.class);
1708
1709 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001710 * <p>An application-specified ID for the current
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001711 * request. Must be maintained unchanged in output
Igor Murashkinace5bf02013-12-10 17:36:40 -08001712 * frame</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001713 * @hide
1714 */
1715 public static final Key<Integer> REQUEST_ID =
1716 new Key<Integer>("android.request.id", int.class);
1717
1718 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001719 * <p>Specifies the number of pipeline stages the frame went
1720 * through from when it was exposed to when the final completed result
1721 * was available to the framework.</p>
1722 * <p>Depending on what settings are used in the request, and
1723 * what streams are configured, the data may undergo less processing,
1724 * and some pipeline stages skipped.</p>
1725 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
1726 *
1727 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
1728 */
1729 public static final Key<Byte> REQUEST_PIPELINE_DEPTH =
1730 new Key<Byte>("android.request.pipelineDepth", byte.class);
1731
1732 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001733 * <p>(x, y, width, height).</p>
1734 * <p>A rectangle with the top-level corner of (x,y) and size
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001735 * (width, height). The region of the sensor that is used for
1736 * output. Each stream must use this rectangle to produce its
1737 * output, cropping to a smaller region if necessary to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001738 * maintain the stream's aspect ratio.</p>
1739 * <p>HAL2.x uses only (x, y, width)</p>
1740 * <p>Any additional per-stream cropping must be done to
1741 * maximize the final pixel area of the stream.</p>
1742 * <p>For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001743 * ratio, then 4:3 streams should use the exact crop
1744 * region. 16:9 streams should further crop vertically
Igor Murashkinace5bf02013-12-10 17:36:40 -08001745 * (letterbox).</p>
1746 * <p>Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001747 * outputs should crop horizontally (pillarbox), and 16:9
1748 * streams should match exactly. These additional crops must
Igor Murashkinace5bf02013-12-10 17:36:40 -08001749 * be centered within the crop region.</p>
1750 * <p>The output streams must maintain square pixels at all
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001751 * times, no matter what the relative aspect ratios of the
1752 * crop region and the stream are. Negative values for
1753 * corner are allowed for raw output if full pixel array is
1754 * larger than active pixel array. Width and height may be
1755 * rounded to nearest larger supportable width, especially
1756 * for raw output, where only a few fixed scales may be
1757 * possible. The width and height of the crop region cannot
1758 * be set to be smaller than floor( activeArraySize.width /
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001759 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} ) and floor(
1760 * activeArraySize.height /
1761 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom}), respectively.</p>
1762 *
1763 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001764 */
1765 public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
1766 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
1767
1768 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001769 * <p>Duration each pixel is exposed to
1770 * light.</p>
1771 * <p>If the sensor can't expose this exact duration, it should shorten the
1772 * duration exposed to the nearest possible value (rather than expose longer).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001773 */
1774 public static final Key<Long> SENSOR_EXPOSURE_TIME =
1775 new Key<Long>("android.sensor.exposureTime", long.class);
1776
1777 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001778 * <p>Duration from start of frame exposure to
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001779 * start of next frame exposure.</p>
1780 * <p>The maximum frame rate that can be supported by a camera subsystem is
1781 * a function of many factors:</p>
1782 * <ul>
1783 * <li>Requested resolutions of output image streams</li>
1784 * <li>Availability of binning / skipping modes on the imager</li>
1785 * <li>The bandwidth of the imager interface</li>
1786 * <li>The bandwidth of the various ISP processing blocks</li>
1787 * </ul>
1788 * <p>Since these factors can vary greatly between different ISPs and
1789 * sensors, the camera abstraction tries to represent the bandwidth
1790 * restrictions with as simple a model as possible.</p>
1791 * <p>The model presented has the following characteristics:</p>
1792 * <ul>
1793 * <li>The image sensor is always configured to output the smallest
1794 * resolution possible given the application's requested output stream
1795 * sizes. The smallest resolution is defined as being at least as large
1796 * as the largest requested output stream size; the camera pipeline must
1797 * never digitally upsample sensor data when the crop region covers the
1798 * whole sensor. In general, this means that if only small output stream
1799 * resolutions are configured, the sensor can provide a higher frame
1800 * rate.</li>
1801 * <li>Since any request may use any or all the currently configured
1802 * output streams, the sensor and ISP must be configured to support
1803 * scaling a single capture to all the streams at the same time. This
1804 * means the camera pipeline must be ready to produce the largest
1805 * requested output size without any delay. Therefore, the overall
1806 * frame rate of a given configured stream set is governed only by the
1807 * largest requested stream resolution.</li>
1808 * <li>Using more than one output stream in a request does not affect the
1809 * frame duration.</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001810 * <li>Certain format-streams may need to do additional background processing
1811 * before data is consumed/produced by that stream. These processors
1812 * can run concurrently to the rest of the camera pipeline, but
1813 * cannot process more than 1 capture at a time.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001814 * </ul>
1815 * <p>The necessary information for the application, given the model above,
Igor Murashkin9c595172014-05-12 13:56:20 -07001816 * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field
1817 * using StreamConfigurationMap#getOutputMinFrameDuration(int, Size).
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001818 * These are used to determine the maximum frame rate / minimum frame
1819 * duration that is possible for a given stream configuration.</p>
1820 * <p>Specifically, the application can use the following rules to
Igor Murashkina23ffb52014-02-07 18:52:34 -08001821 * determine the minimum frame duration it can request from the camera
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001822 * device:</p>
1823 * <ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001824 * <li>Let the set of currently configured input/output streams
1825 * be called <code>S</code>.</li>
1826 * <li>Find the minimum frame durations for each stream in <code>S</code>, by
Igor Murashkin9c595172014-05-12 13:56:20 -07001827 * looking it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using
1828 * StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with
Igor Murashkina23ffb52014-02-07 18:52:34 -08001829 * its respective size/format). Let this set of frame durations be called
1830 * <code>F</code>.</li>
1831 * <li>For any given request <code>R</code>, the minimum frame duration allowed
1832 * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams
1833 * used in <code>R</code> be called <code>S_r</code>.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001834 * </ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001835 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in
Igor Murashkin9c595172014-05-12 13:56:20 -07001836 * StreamConfigurationMap#getOutputStallDuration(int,Size) using its
1837 * respective size/format), then the frame duration in
Igor Murashkina23ffb52014-02-07 18:52:34 -08001838 * <code>F</code> determines the steady state frame rate that the application will
1839 * get if it uses <code>R</code> as a repeating request. Let this special kind
1840 * of request be called <code>Rsimple</code>.</p>
1841 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved
1842 * by a single capture of a new request <code>Rstall</code> (which has at least
1843 * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the
1844 * same minimum frame duration this will not cause a frame rate loss
1845 * if all buffers from the previous <code>Rstall</code> have already been
1846 * delivered.</p>
1847 * <p>For more details about stalling, see
Igor Murashkin9c595172014-05-12 13:56:20 -07001848 * StreamConfigurationMap#getOutputStallDuration(int,Size).</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001849 *
Igor Murashkin9c595172014-05-12 13:56:20 -07001850 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001851 */
1852 public static final Key<Long> SENSOR_FRAME_DURATION =
1853 new Key<Long>("android.sensor.frameDuration", long.class);
1854
1855 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001856 * <p>Gain applied to image data. Must be
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001857 * implemented through analog gain only if set to values
Igor Murashkinace5bf02013-12-10 17:36:40 -08001858 * below 'maximum analog sensitivity'.</p>
1859 * <p>If the sensor can't apply this exact gain, it should lessen the
1860 * gain to the nearest possible value (rather than gain more).</p>
1861 * <p>ISO 12232:2006 REI method</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001862 */
1863 public static final Key<Integer> SENSOR_SENSITIVITY =
1864 new Key<Integer>("android.sensor.sensitivity", int.class);
1865
1866 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001867 * <p>Time at start of exposure of first
1868 * row</p>
1869 * <p>Monotonic, should be synced to other timestamps in
1870 * system</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001871 */
1872 public static final Key<Long> SENSOR_TIMESTAMP =
1873 new Key<Long>("android.sensor.timestamp", long.class);
1874
1875 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001876 * <p>The temperature of the sensor, sampled at the time
1877 * exposure began for this frame.</p>
1878 * <p>The thermal diode being queried should be inside the sensor PCB, or
1879 * somewhere close to it.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001880 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1881 * <p><b>Full capability</b> -
1882 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1883 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1884 *
1885 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkind5ff06a2013-08-20 15:15:06 -07001886 */
1887 public static final Key<Float> SENSOR_TEMPERATURE =
1888 new Key<Float>("android.sensor.temperature", float.class);
1889
1890 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07001891 * <p>The estimated camera neutral color in the native sensor colorspace at
1892 * the time of capture.</p>
1893 * <p>This value gives the neutral color point encoded as an RGB value in the
1894 * native sensor color space. The neutral color point indicates the
1895 * currently estimated white point of the scene illumination. It can be
1896 * used to interpolate between the provided color transforms when
1897 * processing raw sensor data.</p>
1898 * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
Ruben Brunk20c76f62014-02-07 15:47:10 -08001899 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1900 */
1901 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
1902 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
1903
1904 /**
Ruben Brunk987d9f72014-02-11 18:00:24 -08001905 * <p>The worst-case divergence between Bayer green channels.</p>
1906 * <p>This value is an estimate of the worst case split between the
1907 * Bayer green channels in the red and blue rows in the sensor color
1908 * filter array.</p>
1909 * <p>The green split is calculated as follows:</p>
1910 * <ol>
Ruben Brunke89b1202014-03-24 17:10:35 -07001911 * <li>A 5x5 pixel (or larger) window W within the active sensor array is
1912 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
1913 * mosaic channels (R, Gr, Gb, B). The location and size of the window
1914 * chosen is implementation defined, and should be chosen to provide a
1915 * green split estimate that is both representative of the entire image
1916 * for this camera sensor, and can be calculated quickly.</li>
Ruben Brunk987d9f72014-02-11 18:00:24 -08001917 * <li>The arithmetic mean of the green channels from the red
1918 * rows (mean_Gr) within W is computed.</li>
1919 * <li>The arithmetic mean of the green channels from the blue
1920 * rows (mean_Gb) within W is computed.</li>
1921 * <li>The maximum ratio R of the two means is computed as follows:
1922 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
1923 * </ol>
1924 * <p>The ratio R is the green split divergence reported for this property,
1925 * which represents how much the green channels differ in the mosaic
1926 * pattern. This value is typically used to determine the treatment of
1927 * the green mosaic channels when demosaicing.</p>
1928 * <p>The green split value can be roughly interpreted as follows:</p>
1929 * <ul>
1930 * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
1931 * <li>1.20 &lt;= R &gt;= 1.03 will require some software
1932 * correction to avoid demosaic errors (3-20% divergence).</li>
1933 * <li>R &gt; 1.20 will require strong software correction to produce
1934 * a usuable image (&gt;20% divergence).</li>
1935 * </ul>
1936 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1937 */
1938 public static final Key<Float> SENSOR_GREEN_SPLIT =
1939 new Key<Float>("android.sensor.greenSplit", float.class);
1940
1941 /**
Zhijun He379af012014-05-06 11:54:54 -07001942 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
1943 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
1944 * <p>Each color channel is treated as an unsigned 32-bit integer.
1945 * The camera device then uses the most significant X bits
1946 * that correspond to how many bits are in its Bayer raw sensor
1947 * output.</p>
1948 * <p>For example, a sensor with RAW10 Bayer output would use the
1949 * 10 most significant bits from each color channel.</p>
1950 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1951 *
1952 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1953 */
1954 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
1955 new Key<int[]>("android.sensor.testPatternData", int[].class);
1956
1957 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001958 * <p>When enabled, the sensor sends a test pattern instead of
1959 * doing a real exposure from the camera.</p>
1960 * <p>When a test pattern is enabled, all manual sensor controls specified
1961 * by android.sensor.* should be ignored. All other controls should
1962 * work as normal.</p>
1963 * <p>For example, if manual flash is enabled, flash firing should still
1964 * occur (and that the test pattern remain unmodified, since the flash
1965 * would not actually affect it).</p>
1966 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1967 * @see #SENSOR_TEST_PATTERN_MODE_OFF
1968 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
1969 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
1970 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
1971 * @see #SENSOR_TEST_PATTERN_MODE_PN9
1972 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
1973 */
1974 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
1975 new Key<Integer>("android.sensor.testPatternMode", int.class);
1976
1977 /**
Zhijun Heba93fe62014-01-17 16:43:05 -08001978 * <p>Quality of lens shading correction applied
1979 * to the image data.</p>
1980 * <p>When set to OFF mode, no lens shading correction will be applied by the
1981 * camera device, and an identity lens shading map data will be provided
1982 * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
1983 * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>,
1984 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map
1985 * shown below:</p>
1986 * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1987 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1988 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1989 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1990 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1991 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
1992 * </code></pre>
1993 * <p>When set to other modes, lens shading correction will be applied by the
1994 * camera device. Applications can request lens shading map data by setting
1995 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
1996 * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified
1997 * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
1998 *
1999 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
2000 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
2001 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2002 * @see #SHADING_MODE_OFF
2003 * @see #SHADING_MODE_FAST
2004 * @see #SHADING_MODE_HIGH_QUALITY
Zhijun Heba93fe62014-01-17 16:43:05 -08002005 */
2006 public static final Key<Integer> SHADING_MODE =
2007 new Key<Integer>("android.shading.mode", int.class);
2008
2009 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002010 * <p>State of the face detector
2011 * unit</p>
2012 * <p>Whether face detection is enabled, and whether it
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002013 * should output just the basic fields or the full set of
2014 * fields. Value must be one of the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002015 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
2016 *
2017 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002018 * @see #STATISTICS_FACE_DETECT_MODE_OFF
2019 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
2020 * @see #STATISTICS_FACE_DETECT_MODE_FULL
2021 */
2022 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
2023 new Key<Integer>("android.statistics.faceDetectMode", int.class);
2024
2025 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002026 * <p>List of unique IDs for detected
2027 * faces</p>
2028 * <p>Only available if faceDetectMode == FULL</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002029 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002030 */
2031 public static final Key<int[]> STATISTICS_FACE_IDS =
2032 new Key<int[]>("android.statistics.faceIds", int[].class);
2033
2034 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002035 * <p>List of landmarks for detected
2036 * faces</p>
2037 * <p>Only available if faceDetectMode == FULL</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002038 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002039 */
2040 public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
2041 new Key<int[]>("android.statistics.faceLandmarks", int[].class);
2042
2043 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002044 * <p>List of the bounding rectangles for detected
2045 * faces</p>
2046 * <p>Only available if faceDetectMode != OFF</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002047 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002048 */
2049 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
2050 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
2051
2052 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002053 * <p>List of the face confidence scores for
2054 * detected faces</p>
2055 * <p>Only available if faceDetectMode != OFF. The value should be
2056 * meaningful (for example, setting 100 at all times is illegal).</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002057 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002058 */
2059 public static final Key<byte[]> STATISTICS_FACE_SCORES =
2060 new Key<byte[]>("android.statistics.faceScores", byte[].class);
2061
2062 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002063 * <p>The shading map is a low-resolution floating-point map
2064 * that lists the coefficients used to correct for vignetting, for each
2065 * Bayer color channel.</p>
2066 * <p>The least shaded section of the image should have a gain factor
2067 * of 1; all other sections should have gains above 1.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002068 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Igor Murashkinace5bf02013-12-10 17:36:40 -08002069 * must take into account the colorCorrection settings.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002070 * <p>The shading map is for the entire active pixel array, and is not
2071 * affected by the crop region specified in the request. Each shading map
2072 * entry is the value of the shading compensation map over a specific
2073 * pixel on the sensor. Specifically, with a (N x M) resolution shading
2074 * map, and an active pixel array size (W x H), shading map entry
2075 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
2076 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
2077 * The map is assumed to be bilinearly interpolated between the sample points.</p>
2078 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
2079 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
2080 * The shading map is stored in a fully interleaved format, and its size
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002081 * is provided in the camera static metadata by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002082 * <p>The shading map should have on the order of 30-40 rows and columns,
2083 * and must be smaller than 64x64.</p>
2084 * <p>As an example, given a very small map defined as:</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002085 * <pre><code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]
2086 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} =
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002087 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002088 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
2089 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
2090 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
2091 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
2092 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002093 * </code></pre>
2094 * <p>The low-resolution scaling map images for each channel are
2095 * (displayed using nearest-neighbor interpolation):</p>
2096 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
2097 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
2098 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
2099 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
2100 * <p>As a visualization only, inverting the full-color map to recover an
2101 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
2102 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002103 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08002104 * @see CaptureRequest#COLOR_CORRECTION_MODE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002105 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002106 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002107 */
2108 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
2109 new Key<float[]>("android.statistics.lensShadingMap", float[].class);
2110
2111 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002112 * <p>The best-fit color channel gains calculated
Zhijun Hecc28a412014-02-24 15:11:23 -08002113 * by the camera device's statistics units for the current output frame.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002114 * <p>This may be different than the gains used for this frame,
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002115 * since statistics processing on data from a new frame
2116 * typically completes after the transform has already been
Igor Murashkinace5bf02013-12-10 17:36:40 -08002117 * applied to that frame.</p>
2118 * <p>The 4 channel gains are defined in Bayer domain,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002119 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002120 * <p>This value should always be calculated by the AWB block,
2121 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002122 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002123 *
2124 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Igor Murashkin9c595172014-05-12 13:56:20 -07002125 * @deprecated
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002126 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002127 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002128 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002129 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
2130 new Key<float[]>("android.statistics.predictedColorGains", float[].class);
2131
2132 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002133 * <p>The best-fit color transform matrix estimate
Zhijun Hecc28a412014-02-24 15:11:23 -08002134 * calculated by the camera device's statistics units for the current
2135 * output frame.</p>
2136 * <p>The camera device will provide the estimate from its
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002137 * statistics unit on the white balance transforms to use
Zhijun Hecc28a412014-02-24 15:11:23 -08002138 * for the next frame. These are the values the camera device believes
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002139 * are the best fit for the current output frame. This may
2140 * be different than the transform used for this frame, since
2141 * statistics processing on data from a new frame typically
2142 * completes after the transform has already been applied to
Igor Murashkinace5bf02013-12-10 17:36:40 -08002143 * that frame.</p>
2144 * <p>These estimates must be provided for all frames, even if
2145 * capture settings and color transforms are set by the application.</p>
2146 * <p>This value should always be calculated by the AWB block,
2147 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002148 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002149 * @deprecated
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002150 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002151 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002152 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002153 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
2154 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
2155
2156 /**
Zhijun He208fb6c2014-02-03 13:09:06 -08002157 * <p>The camera device estimated scene illumination lighting
2158 * frequency.</p>
2159 * <p>Many light sources, such as most fluorescent lights, flicker at a rate
2160 * that depends on the local utility power standards. This flicker must be
2161 * accounted for by auto-exposure routines to avoid artifacts in captured images.
2162 * The camera device uses this entry to tell the application what the scene
2163 * illuminant frequency is.</p>
2164 * <p>When manual exposure control is enabled
2165 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == OFF</code>),
2166 * the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't do the antibanding, and the
2167 * application can ensure it selects exposure times that do not cause banding
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002168 * issues by looking into this metadata field. See {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}
Zhijun He208fb6c2014-02-03 13:09:06 -08002169 * for more details.</p>
2170 * <p>Report NONE if there doesn't appear to be flickering illumination.</p>
2171 *
2172 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2173 * @see CaptureRequest#CONTROL_AE_MODE
2174 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002175 * @see #STATISTICS_SCENE_FLICKER_NONE
2176 * @see #STATISTICS_SCENE_FLICKER_50HZ
2177 * @see #STATISTICS_SCENE_FLICKER_60HZ
2178 */
2179 public static final Key<Integer> STATISTICS_SCENE_FLICKER =
2180 new Key<Integer>("android.statistics.sceneFlicker", int.class);
2181
2182 /**
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002183 * <p>Operating mode for hotpixel map generation.</p>
2184 * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
2185 * If set to OFF, no hotpixel map should be returned.</p>
2186 * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
2187 *
2188 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
2189 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
2190 */
2191 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
2192 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
2193
2194 /**
2195 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
2196 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
2197 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
2198 * bottom-right of the pixel array, respectively. The width and
2199 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
2200 * This may include hot pixels that lie outside of the active array
2201 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2202 *
2203 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2204 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
2205 */
2206 public static final Key<int[]> STATISTICS_HOT_PIXEL_MAP =
2207 new Key<int[]>("android.statistics.hotPixelMap", int[].class);
2208
2209 /**
Zhijun He379af012014-05-06 11:54:54 -07002210 * <p>Whether the camera device will output the lens
2211 * shading map in output result metadata.</p>
2212 * <p>When set to ON,
2213 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} must be provided in
2214 * the output result metadata.</p>
2215 *
2216 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
2217 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
2218 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
2219 */
2220 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
2221 new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
2222
2223 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002224 * <p>Tonemapping / contrast / gamma curve for the blue
Igor Murashkine0060932014-01-17 17:24:11 -08002225 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2226 * CONTRAST_CURVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002227 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
2228 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002229 * @see CaptureRequest#TONEMAP_CURVE_RED
Zhijun He5f2a47f2014-01-16 15:44:41 -08002230 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002231 */
Zhijun He3ffd7052013-08-19 15:45:08 -07002232 public static final Key<float[]> TONEMAP_CURVE_BLUE =
2233 new Key<float[]>("android.tonemap.curveBlue", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002234
2235 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002236 * <p>Tonemapping / contrast / gamma curve for the green
Igor Murashkine0060932014-01-17 17:24:11 -08002237 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2238 * CONTRAST_CURVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002239 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
2240 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002241 * @see CaptureRequest#TONEMAP_CURVE_RED
Zhijun He5f2a47f2014-01-16 15:44:41 -08002242 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002243 */
Zhijun He3ffd7052013-08-19 15:45:08 -07002244 public static final Key<float[]> TONEMAP_CURVE_GREEN =
2245 new Key<float[]>("android.tonemap.curveGreen", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002246
2247 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002248 * <p>Tonemapping / contrast / gamma curve for the red
Igor Murashkine0060932014-01-17 17:24:11 -08002249 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2250 * CONTRAST_CURVE.</p>
2251 * <p>Each channel's curve is defined by an array of control points:</p>
2252 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} =
2253 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He870922b2014-02-15 21:47:51 -08002254 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
Igor Murashkine0060932014-01-17 17:24:11 -08002255 * <p>These are sorted in order of increasing <code>Pin</code>; it is always
2256 * guaranteed that input values 0.0 and 1.0 are included in the list to
2257 * define a complete mapping. For input values between control points,
2258 * the camera device must linearly interpolate between the control
2259 * points.</p>
2260 * <p>Each curve can have an independent number of points, and the number
2261 * of points can be less than max (that is, the request doesn't have to
2262 * always provide a curve with number of points equivalent to
2263 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
2264 * <p>A few examples, and their corresponding graphical mappings; these
2265 * only specify the red channel and the precision is limited to 4
2266 * digits, for conciseness.</p>
2267 * <p>Linear mapping:</p>
2268 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 0, 1.0, 1.0 ]
2269 * </code></pre>
2270 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
2271 * <p>Invert mapping:</p>
2272 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 1.0, 1.0, 0 ]
2273 * </code></pre>
2274 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
2275 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
2276 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
2277 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
2278 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
2279 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
2280 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
2281 * </code></pre>
2282 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
2283 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
2284 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
2285 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
2286 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
2287 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
2288 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
2289 * </code></pre>
2290 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002291 *
Igor Murashkine0060932014-01-17 17:24:11 -08002292 * @see CaptureRequest#TONEMAP_CURVE_RED
2293 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002294 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002295 */
2296 public static final Key<float[]> TONEMAP_CURVE_RED =
2297 new Key<float[]>("android.tonemap.curveRed", float[].class);
2298
2299 /**
Igor Murashkine0060932014-01-17 17:24:11 -08002300 * <p>High-level global contrast/gamma/tonemapping control.</p>
2301 * <p>When switching to an application-defined contrast curve by setting
2302 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
2303 * per-channel with a set of <code>(in, out)</code> points that specify the
2304 * mapping from input high-bit-depth pixel value to the output
2305 * low-bit-depth value. Since the actual pixel ranges of both input
2306 * and output may change depending on the camera pipeline, the values
2307 * are specified by normalized floating-point numbers.</p>
2308 * <p>More-complex color mapping operations such as 3D color look-up
2309 * tables, selective chroma enhancement, or other non-linear color
2310 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2311 * CONTRAST_CURVE.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002312 * <p>This must be set to a valid mode in
2313 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002314 * <p>When using either FAST or HIGH_QUALITY, the camera device will
2315 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed},
2316 * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, and {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.
2317 * These values are always available, and as close as possible to the
2318 * actually used nonlinear/nonglobal transforms.</p>
2319 * <p>If a request is sent with TRANSFORM_MATRIX with the camera device's
2320 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
2321 * roughly the same.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002322 *
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002323 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
Igor Murashkine0060932014-01-17 17:24:11 -08002324 * @see CaptureRequest#TONEMAP_CURVE_BLUE
2325 * @see CaptureRequest#TONEMAP_CURVE_GREEN
2326 * @see CaptureRequest#TONEMAP_CURVE_RED
2327 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002328 * @see #TONEMAP_MODE_CONTRAST_CURVE
2329 * @see #TONEMAP_MODE_FAST
2330 * @see #TONEMAP_MODE_HIGH_QUALITY
2331 */
2332 public static final Key<Integer> TONEMAP_MODE =
2333 new Key<Integer>("android.tonemap.mode", int.class);
2334
2335 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002336 * <p>This LED is nominally used to indicate to the user
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002337 * that the camera is powered on and may be streaming images back to the
2338 * Application Processor. In certain rare circumstances, the OS may
2339 * disable this when video is processed locally and not transmitted to
Igor Murashkinace5bf02013-12-10 17:36:40 -08002340 * any untrusted applications.</p>
2341 * <p>In particular, the LED <em>must</em> always be on when the data could be
2342 * transmitted off the device. The LED <em>should</em> always be on whenever
2343 * data is stored locally on the device.</p>
2344 * <p>The LED <em>may</em> be off if a trusted application is using the data that
2345 * doesn't violate the above rules.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002346 * @hide
2347 */
2348 public static final Key<Boolean> LED_TRANSMIT =
2349 new Key<Boolean>("android.led.transmit", boolean.class);
2350
2351 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002352 * <p>Whether black-level compensation is locked
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08002353 * to its current values, or is free to vary.</p>
2354 * <p>Whether the black level offset was locked for this frame. Should be
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002355 * ON if {@link CaptureRequest#BLACK_LEVEL_LOCK android.blackLevel.lock} was ON in the capture request, unless
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08002356 * a change in other capture settings forced the camera device to
2357 * perform a black level reset.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002358 *
2359 * @see CaptureRequest#BLACK_LEVEL_LOCK
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002360 */
2361 public static final Key<Boolean> BLACK_LEVEL_LOCK =
2362 new Key<Boolean>("android.blackLevel.lock", boolean.class);
2363
Igor Murashkin3865a842014-01-17 18:18:39 -08002364 /**
2365 * <p>The frame number corresponding to the last request
2366 * with which the output result (metadata + buffers) has been fully
2367 * synchronized.</p>
2368 * <p>When a request is submitted to the camera device, there is usually a
2369 * delay of several frames before the controls get applied. A camera
2370 * device may either choose to account for this delay by implementing a
2371 * pipeline and carefully submit well-timed atomic control updates, or
2372 * it may start streaming control changes that span over several frame
2373 * boundaries.</p>
2374 * <p>In the latter case, whenever a request's settings change relative to
2375 * the previous submitted request, the full set of changes may take
2376 * multiple frame durations to fully take effect. Some settings may
2377 * take effect sooner (in less frame durations) than others.</p>
2378 * <p>While a set of control changes are being propagated, this value
2379 * will be CONVERGING.</p>
2380 * <p>Once it is fully known that a set of control changes have been
2381 * finished propagating, and the resulting updated control settings
2382 * have been read back by the camera device, this value will be set
2383 * to a non-negative frame number (corresponding to the request to
2384 * which the results have synchronized to).</p>
2385 * <p>Older camera device implementations may not have a way to detect
2386 * when all camera controls have been applied, and will always set this
2387 * value to UNKNOWN.</p>
2388 * <p>FULL capability devices will always have this value set to the
2389 * frame number of the request corresponding to this result.</p>
2390 * <p><em>Further details</em>:</p>
2391 * <ul>
2392 * <li>Whenever a request differs from the last request, any future
2393 * results not yet returned may have this value set to CONVERGING (this
2394 * could include any in-progress captures not yet returned by the camera
2395 * device, for more details see pipeline considerations below).</li>
2396 * <li>Submitting a series of multiple requests that differ from the
2397 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
2398 * moves the new synchronization frame to the last non-repeating
2399 * request (using the smallest frame number from the contiguous list of
2400 * repeating requests).</li>
2401 * <li>Submitting the same request repeatedly will not change this value
2402 * to CONVERGING, if it was already a non-negative value.</li>
2403 * <li>When this value changes to non-negative, that means that all of the
2404 * metadata controls from the request have been applied, all of the
2405 * metadata controls from the camera device have been read to the
2406 * updated values (into the result), and all of the graphics buffers
2407 * corresponding to this result are also synchronized to the request.</li>
2408 * </ul>
2409 * <p><em>Pipeline considerations</em>:</p>
2410 * <p>Submitting a request with updated controls relative to the previously
2411 * submitted requests may also invalidate the synchronization state
2412 * of all the results corresponding to currently in-flight requests.</p>
2413 * <p>In other words, results for this current request and up to
2414 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
2415 * android.sync.frameNumber change to CONVERGING.</p>
2416 *
2417 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
2418 * @see #SYNC_FRAME_NUMBER_CONVERGING
2419 * @see #SYNC_FRAME_NUMBER_UNKNOWN
2420 * @hide
2421 */
Zhijun He4f91e2a2014-04-17 13:20:21 -07002422 public static final Key<Long> SYNC_FRAME_NUMBER =
2423 new Key<Long>("android.sync.frameNumber", long.class);
Igor Murashkin3865a842014-01-17 18:18:39 -08002424
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002425 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2426 * End generated code
2427 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkinb779ac12013-09-05 12:40:19 -07002428
Igor Murashkin9c595172014-05-12 13:56:20 -07002429
2430
2431
2432
2433
2434
2435
2436
Igor Murashkinb779ac12013-09-05 12:40:19 -07002437 /**
2438 * <p>
2439 * List of the {@link Face Faces} detected through camera face detection
2440 * in this result.
2441 * </p>
2442 * <p>
2443 * Only available if {@link #STATISTICS_FACE_DETECT_MODE} {@code !=}
2444 * {@link CameraMetadata#STATISTICS_FACE_DETECT_MODE_OFF OFF}.
2445 * </p>
2446 *
2447 * @see Face
2448 */
2449 public static final Key<Face[]> STATISTICS_FACES =
2450 new Key<Face[]>("android.statistics.faces", Face[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002451}