blob: 1d2d0e999b8bff063ef2be99c30bb93cbaf4fd99 [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 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800219 * <p>The ID sent with the latest
220 * CAMERA2_TRIGGER_PRECAPTURE_METERING call</p>
221 * <p>Must be 0 if no
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700222 * CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
223 * by HAL. Always updated even if AE algorithm ignores the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800224 * trigger</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700225 * @hide
226 */
227 public static final Key<Integer> CONTROL_AE_PRECAPTURE_ID =
228 new Key<Integer>("android.control.aePrecaptureId", int.class);
229
230 /**
Zhijun He379af012014-05-06 11:54:54 -0700231 * <p>The desired setting for the camera device's auto-exposure
232 * algorithm's antibanding compensation.</p>
233 * <p>Some kinds of lighting fixtures, such as some fluorescent
234 * lights, flicker at the rate of the power supply frequency
235 * (60Hz or 50Hz, depending on country). While this is
236 * typically not noticeable to a person, it can be visible to
237 * a camera device. If a camera sets its exposure time to the
238 * wrong value, the flicker may become visible in the
239 * viewfinder as flicker or in a final captured image, as a
240 * set of variable-brightness bands across the image.</p>
241 * <p>Therefore, the auto-exposure routines of camera devices
242 * include antibanding routines that ensure that the chosen
243 * exposure value will not cause such banding. The choice of
244 * exposure time depends on the rate of flicker, which the
245 * camera device can detect automatically, or the expected
246 * rate can be selected by the application using this
247 * control.</p>
248 * <p>A given camera device may not support all of the possible
249 * options for the antibanding mode. The
250 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
251 * the available modes for a given camera device.</p>
252 * <p>The default mode is AUTO, which must be supported by all
253 * camera devices.</p>
254 * <p>If manual exposure control is enabled (by setting
255 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
256 * then this setting has no effect, and the application must
257 * ensure it selects exposure times that do not cause banding
258 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
259 * the application in this.</p>
260 *
261 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
262 * @see CaptureRequest#CONTROL_AE_MODE
263 * @see CaptureRequest#CONTROL_MODE
264 * @see CaptureResult#STATISTICS_SCENE_FLICKER
265 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
266 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
267 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
268 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO
269 */
270 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE =
271 new Key<Integer>("android.control.aeAntibandingMode", int.class);
272
273 /**
274 * <p>Adjustment to AE target image
275 * brightness</p>
276 * <p>For example, if EV step is 0.333, '6' will mean an
277 * exposure compensation of +2 EV; -3 will mean an exposure
278 * compensation of -1</p>
279 */
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>
289 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
290 * when AE is already locked, the camera device will not change the exposure time
291 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
292 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
293 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
294 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
295 * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
296 *
297 * @see CaptureRequest#CONTROL_AE_MODE
298 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
299 * @see CaptureResult#CONTROL_AE_STATE
300 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
301 * @see CaptureRequest#SENSOR_SENSITIVITY
302 */
303 public static final Key<Boolean> CONTROL_AE_LOCK =
304 new Key<Boolean>("android.control.aeLock", boolean.class);
305
306 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800307 * <p>The desired mode for the camera device's
308 * auto-exposure routine.</p>
309 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
310 * AUTO.</p>
311 * <p>When set to any of the ON modes, the camera device's
312 * auto-exposure routine is enabled, overriding the
313 * application's selected exposure time, sensor sensitivity,
314 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
315 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
316 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
317 * is selected, the camera device's flash unit controls are
318 * also overridden.</p>
319 * <p>The FLASH modes are only available if the camera device
320 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
321 * <p>If flash TORCH mode is desired, this field must be set to
322 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
323 * <p>When set to any of the ON modes, the values chosen by the
324 * camera device auto-exposure routine for the overridden
325 * fields for a given capture will be available in its
326 * CaptureResult.</p>
327 *
Zhijun He5f2a47f2014-01-16 15:44:41 -0800328 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800329 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
330 * @see CaptureRequest#FLASH_MODE
Igor Murashkinaef3b7e2014-01-15 13:20:37 -0800331 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
332 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He399f05d2014-01-15 11:31:30 -0800333 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800334 * @see #CONTROL_AE_MODE_OFF
335 * @see #CONTROL_AE_MODE_ON
336 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
337 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
338 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
339 */
340 public static final Key<Integer> CONTROL_AE_MODE =
341 new Key<Integer>("android.control.aeMode", int.class);
342
343 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800344 * <p>List of areas to use for
Ruben Brunkf59521d2014-02-03 17:14:33 -0800345 * metering.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800346 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -0800347 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800348 * specified coordinates.</p>
349 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700350 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800351 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
352 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -0700353 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -0800354 * should be nonnegative.</p>
355 * <p>If all regions have 0 weight, then no specific metering area
Zhijun Hecc28a412014-02-24 15:11:23 -0800356 * needs to be used by the camera device. If the metering region is
357 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
358 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -0800359 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800360 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800361 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800362 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700363 */
364 public static final Key<int[]> CONTROL_AE_REGIONS =
365 new Key<int[]>("android.control.aeRegions", int[].class);
366
367 /**
Zhijun He379af012014-05-06 11:54:54 -0700368 * <p>Range over which fps can be adjusted to
369 * maintain exposure</p>
370 * <p>Only constrains AE algorithm, not manual control
371 * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
372 *
373 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
374 */
375 public static final Key<int[]> CONTROL_AE_TARGET_FPS_RANGE =
376 new Key<int[]>("android.control.aeTargetFpsRange", int[].class);
377
378 /**
379 * <p>Whether the camera device will trigger a precapture
380 * metering sequence when it processes this request.</p>
381 * <p>This entry is normally set to IDLE, or is not
382 * included at all in the request settings. When included and
383 * set to START, the camera device will trigger the autoexposure
384 * precapture metering sequence.</p>
385 * <p>The effect of AE precapture trigger depends on the current
386 * AE mode and state; see {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture
387 * state transition details.</p>
388 *
389 * @see CaptureResult#CONTROL_AE_STATE
390 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
391 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
392 */
393 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
394 new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
395
396 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800397 * <p>Current state of AE algorithm</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800398 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always
399 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
400 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
401 * the algorithm states to INACTIVE.</p>
402 * <p>The camera device can do several state transitions between two results, if it is
403 * allowed by the state transition table. For example: INACTIVE may never actually be
404 * seen in a result.</p>
405 * <p>The state in the result is the state for this image (in sync with this image): if
406 * AE state becomes CONVERGED, then the image data associated with this result should
407 * be good to use.</p>
408 * <p>Below are state transition tables for different AE modes.</p>
409 * <table>
410 * <thead>
411 * <tr>
412 * <th align="center">State</th>
413 * <th align="center">Transition Cause</th>
414 * <th align="center">New State</th>
415 * <th align="center">Notes</th>
416 * </tr>
417 * </thead>
418 * <tbody>
419 * <tr>
420 * <td align="center">INACTIVE</td>
421 * <td align="center"></td>
422 * <td align="center">INACTIVE</td>
423 * <td align="center">Camera device auto exposure algorithm is disabled</td>
424 * </tr>
425 * </tbody>
426 * </table>
427 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p>
428 * <table>
429 * <thead>
430 * <tr>
431 * <th align="center">State</th>
432 * <th align="center">Transition Cause</th>
433 * <th align="center">New State</th>
434 * <th align="center">Notes</th>
435 * </tr>
436 * </thead>
437 * <tbody>
438 * <tr>
439 * <td align="center">INACTIVE</td>
440 * <td align="center">Camera device initiates AE scan</td>
441 * <td align="center">SEARCHING</td>
442 * <td align="center">Values changing</td>
443 * </tr>
444 * <tr>
445 * <td align="center">INACTIVE</td>
446 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
447 * <td align="center">LOCKED</td>
448 * <td align="center">Values locked</td>
449 * </tr>
450 * <tr>
451 * <td align="center">SEARCHING</td>
452 * <td align="center">Camera device finishes AE scan</td>
453 * <td align="center">CONVERGED</td>
454 * <td align="center">Good values, not changing</td>
455 * </tr>
456 * <tr>
457 * <td align="center">SEARCHING</td>
458 * <td align="center">Camera device finishes AE scan</td>
459 * <td align="center">FLASH_REQUIRED</td>
460 * <td align="center">Converged but too dark w/o flash</td>
461 * </tr>
462 * <tr>
463 * <td align="center">SEARCHING</td>
464 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
465 * <td align="center">LOCKED</td>
466 * <td align="center">Values locked</td>
467 * </tr>
468 * <tr>
469 * <td align="center">CONVERGED</td>
470 * <td align="center">Camera device initiates AE scan</td>
471 * <td align="center">SEARCHING</td>
472 * <td align="center">Values changing</td>
473 * </tr>
474 * <tr>
475 * <td align="center">CONVERGED</td>
476 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
477 * <td align="center">LOCKED</td>
478 * <td align="center">Values locked</td>
479 * </tr>
480 * <tr>
481 * <td align="center">FLASH_REQUIRED</td>
482 * <td align="center">Camera device initiates AE scan</td>
483 * <td align="center">SEARCHING</td>
484 * <td align="center">Values changing</td>
485 * </tr>
486 * <tr>
487 * <td align="center">FLASH_REQUIRED</td>
488 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
489 * <td align="center">LOCKED</td>
490 * <td align="center">Values locked</td>
491 * </tr>
492 * <tr>
493 * <td align="center">LOCKED</td>
494 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
495 * <td align="center">SEARCHING</td>
496 * <td align="center">Values not good after unlock</td>
497 * </tr>
498 * <tr>
499 * <td align="center">LOCKED</td>
500 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
501 * <td align="center">CONVERGED</td>
502 * <td align="center">Values good after unlock</td>
503 * </tr>
504 * <tr>
505 * <td align="center">LOCKED</td>
506 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
507 * <td align="center">FLASH_REQUIRED</td>
508 * <td align="center">Exposure good, but too dark</td>
509 * </tr>
510 * <tr>
511 * <td align="center">PRECAPTURE</td>
512 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
513 * <td align="center">CONVERGED</td>
514 * <td align="center">Ready for high-quality capture</td>
515 * </tr>
516 * <tr>
517 * <td align="center">PRECAPTURE</td>
518 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
519 * <td align="center">LOCKED</td>
520 * <td align="center">Ready for high-quality capture</td>
521 * </tr>
522 * <tr>
523 * <td align="center">Any state</td>
524 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td>
525 * <td align="center">PRECAPTURE</td>
526 * <td align="center">Start AE precapture metering sequence</td>
527 * </tr>
528 * </tbody>
529 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800530 * <p>For the above table, the camera device may skip reporting any state changes that happen
531 * without application intervention (i.e. mode switch, trigger, locking). Any state that
532 * can be skipped in that manner is called a transient state.</p>
533 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
534 * listed in above table, it is also legal for the camera device to skip one or more
535 * transient states between two results. See below table for examples:</p>
536 * <table>
537 * <thead>
538 * <tr>
539 * <th align="center">State</th>
540 * <th align="center">Transition Cause</th>
541 * <th align="center">New State</th>
542 * <th align="center">Notes</th>
543 * </tr>
544 * </thead>
545 * <tbody>
546 * <tr>
547 * <td align="center">INACTIVE</td>
548 * <td align="center">Camera device finished AE scan</td>
549 * <td align="center">CONVERGED</td>
550 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
551 * </tr>
552 * <tr>
553 * <td align="center">Any state</td>
554 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
555 * <td align="center">FLASH_REQUIRED</td>
556 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
557 * </tr>
558 * <tr>
559 * <td align="center">Any state</td>
560 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
561 * <td align="center">CONVERGED</td>
562 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
563 * </tr>
564 * <tr>
565 * <td align="center">CONVERGED</td>
566 * <td align="center">Camera device finished AE scan</td>
567 * <td align="center">FLASH_REQUIRED</td>
568 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
569 * </tr>
570 * <tr>
571 * <td align="center">FLASH_REQUIRED</td>
572 * <td align="center">Camera device finished AE scan</td>
573 * <td align="center">CONVERGED</td>
574 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
575 * </tr>
576 * </tbody>
577 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -0800578 *
579 * @see CaptureRequest#CONTROL_AE_LOCK
580 * @see CaptureRequest#CONTROL_AE_MODE
581 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
582 * @see CaptureRequest#CONTROL_MODE
583 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700584 * @see #CONTROL_AE_STATE_INACTIVE
585 * @see #CONTROL_AE_STATE_SEARCHING
586 * @see #CONTROL_AE_STATE_CONVERGED
587 * @see #CONTROL_AE_STATE_LOCKED
588 * @see #CONTROL_AE_STATE_FLASH_REQUIRED
589 * @see #CONTROL_AE_STATE_PRECAPTURE
590 */
591 public static final Key<Integer> CONTROL_AE_STATE =
592 new Key<Integer>("android.control.aeState", int.class);
593
594 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800595 * <p>Whether AF is currently enabled, and what
596 * mode it is set to</p>
Zhijun Hecc28a412014-02-24 15:11:23 -0800597 * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus
598 * (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 -0800599 * <p>If the lens is controlled by the camera device auto-focus algorithm,
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800600 * 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 -0800601 * in result metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800602 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800603 * @see CaptureResult#CONTROL_AF_STATE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800604 * @see CaptureRequest#CONTROL_MODE
Zhijun Hecc28a412014-02-24 15:11:23 -0800605 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700606 * @see #CONTROL_AF_MODE_OFF
607 * @see #CONTROL_AF_MODE_AUTO
608 * @see #CONTROL_AF_MODE_MACRO
609 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
610 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
611 * @see #CONTROL_AF_MODE_EDOF
612 */
613 public static final Key<Integer> CONTROL_AF_MODE =
614 new Key<Integer>("android.control.afMode", int.class);
615
616 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800617 * <p>List of areas to use for focus
Ruben Brunkf59521d2014-02-03 17:14:33 -0800618 * estimation.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800619 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -0800620 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800621 * specified coordinates.</p>
622 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700623 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800624 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
625 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -0700626 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -0800627 * should be nonnegative.</p>
628 * <p>If all regions have 0 weight, then no specific focus area
Zhijun Hecc28a412014-02-24 15:11:23 -0800629 * needs to be used by the camera device. If the focusing region is
630 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
631 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -0800632 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800633 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800634 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800635 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700636 */
637 public static final Key<int[]> CONTROL_AF_REGIONS =
638 new Key<int[]>("android.control.afRegions", int[].class);
639
640 /**
Zhijun He379af012014-05-06 11:54:54 -0700641 * <p>Whether the camera device will trigger autofocus for this request.</p>
642 * <p>This entry is normally set to IDLE, or is not
643 * included at all in the request settings.</p>
644 * <p>When included and set to START, the camera device will trigger the
645 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
646 * <p>When set to CANCEL, the camera device will cancel any active trigger,
647 * and return to its initial AF state.</p>
648 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what that means for each AF mode.</p>
649 *
650 * @see CaptureResult#CONTROL_AF_STATE
651 * @see #CONTROL_AF_TRIGGER_IDLE
652 * @see #CONTROL_AF_TRIGGER_START
653 * @see #CONTROL_AF_TRIGGER_CANCEL
654 */
655 public static final Key<Integer> CONTROL_AF_TRIGGER =
656 new Key<Integer>("android.control.afTrigger", int.class);
657
658 /**
Zhijun He60b19dc2014-02-24 10:19:20 -0800659 * <p>Current state of AF algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800660 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
661 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
662 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
663 * the algorithm states to INACTIVE.</p>
664 * <p>The camera device can do several state transitions between two results, if it is
665 * allowed by the state transition table. For example: INACTIVE may never actually be
666 * seen in a result.</p>
667 * <p>The state in the result is the state for this image (in sync with this image): if
668 * AF state becomes FOCUSED, then the image data associated with this result should
669 * be sharp.</p>
670 * <p>Below are state transition tables for different AF modes.</p>
671 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p>
672 * <table>
673 * <thead>
674 * <tr>
675 * <th align="center">State</th>
676 * <th align="center">Transition Cause</th>
677 * <th align="center">New State</th>
678 * <th align="center">Notes</th>
679 * </tr>
680 * </thead>
681 * <tbody>
682 * <tr>
683 * <td align="center">INACTIVE</td>
684 * <td align="center"></td>
685 * <td align="center">INACTIVE</td>
686 * <td align="center">Never changes</td>
687 * </tr>
688 * </tbody>
689 * </table>
690 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p>
691 * <table>
692 * <thead>
693 * <tr>
694 * <th align="center">State</th>
695 * <th align="center">Transition Cause</th>
696 * <th align="center">New State</th>
697 * <th align="center">Notes</th>
698 * </tr>
699 * </thead>
700 * <tbody>
701 * <tr>
702 * <td align="center">INACTIVE</td>
703 * <td align="center">AF_TRIGGER</td>
704 * <td align="center">ACTIVE_SCAN</td>
705 * <td align="center">Start AF sweep, Lens now moving</td>
706 * </tr>
707 * <tr>
708 * <td align="center">ACTIVE_SCAN</td>
709 * <td align="center">AF sweep done</td>
710 * <td align="center">FOCUSED_LOCKED</td>
711 * <td align="center">Focused, Lens now locked</td>
712 * </tr>
713 * <tr>
714 * <td align="center">ACTIVE_SCAN</td>
715 * <td align="center">AF sweep done</td>
716 * <td align="center">NOT_FOCUSED_LOCKED</td>
717 * <td align="center">Not focused, Lens now locked</td>
718 * </tr>
719 * <tr>
720 * <td align="center">ACTIVE_SCAN</td>
721 * <td align="center">AF_CANCEL</td>
722 * <td align="center">INACTIVE</td>
723 * <td align="center">Cancel/reset AF, Lens now locked</td>
724 * </tr>
725 * <tr>
726 * <td align="center">FOCUSED_LOCKED</td>
727 * <td align="center">AF_CANCEL</td>
728 * <td align="center">INACTIVE</td>
729 * <td align="center">Cancel/reset AF</td>
730 * </tr>
731 * <tr>
732 * <td align="center">FOCUSED_LOCKED</td>
733 * <td align="center">AF_TRIGGER</td>
734 * <td align="center">ACTIVE_SCAN</td>
735 * <td align="center">Start new sweep, Lens now moving</td>
736 * </tr>
737 * <tr>
738 * <td align="center">NOT_FOCUSED_LOCKED</td>
739 * <td align="center">AF_CANCEL</td>
740 * <td align="center">INACTIVE</td>
741 * <td align="center">Cancel/reset AF</td>
742 * </tr>
743 * <tr>
744 * <td align="center">NOT_FOCUSED_LOCKED</td>
745 * <td align="center">AF_TRIGGER</td>
746 * <td align="center">ACTIVE_SCAN</td>
747 * <td align="center">Start new sweep, Lens now moving</td>
748 * </tr>
749 * <tr>
750 * <td align="center">Any state</td>
751 * <td align="center">Mode change</td>
752 * <td align="center">INACTIVE</td>
753 * <td align="center"></td>
754 * </tr>
755 * </tbody>
756 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800757 * <p>For the above table, the camera device may skip reporting any state changes that happen
758 * without application intervention (i.e. mode switch, trigger, locking). Any state that
759 * can be skipped in that manner is called a transient state.</p>
760 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
761 * state transitions listed in above table, it is also legal for the camera device to skip
762 * one or more transient states between two results. See below table for examples:</p>
763 * <table>
764 * <thead>
765 * <tr>
766 * <th align="center">State</th>
767 * <th align="center">Transition Cause</th>
768 * <th align="center">New State</th>
769 * <th align="center">Notes</th>
770 * </tr>
771 * </thead>
772 * <tbody>
773 * <tr>
774 * <td align="center">INACTIVE</td>
775 * <td align="center">AF_TRIGGER</td>
776 * <td align="center">FOCUSED_LOCKED</td>
777 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
778 * </tr>
779 * <tr>
780 * <td align="center">INACTIVE</td>
781 * <td align="center">AF_TRIGGER</td>
782 * <td align="center">NOT_FOCUSED_LOCKED</td>
783 * <td align="center">Focus failed after a scan, lens is now locked.</td>
784 * </tr>
785 * <tr>
786 * <td align="center">FOCUSED_LOCKED</td>
787 * <td align="center">AF_TRIGGER</td>
788 * <td align="center">FOCUSED_LOCKED</td>
789 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
790 * </tr>
791 * <tr>
792 * <td align="center">NOT_FOCUSED_LOCKED</td>
793 * <td align="center">AF_TRIGGER</td>
794 * <td align="center">FOCUSED_LOCKED</td>
795 * <td align="center">Focus is good after a scan, lens is not locked.</td>
796 * </tr>
797 * </tbody>
798 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -0800799 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
800 * <table>
801 * <thead>
802 * <tr>
803 * <th align="center">State</th>
804 * <th align="center">Transition Cause</th>
805 * <th align="center">New State</th>
806 * <th align="center">Notes</th>
807 * </tr>
808 * </thead>
809 * <tbody>
810 * <tr>
811 * <td align="center">INACTIVE</td>
812 * <td align="center">Camera device initiates new scan</td>
813 * <td align="center">PASSIVE_SCAN</td>
814 * <td align="center">Start AF scan, Lens now moving</td>
815 * </tr>
816 * <tr>
817 * <td align="center">INACTIVE</td>
818 * <td align="center">AF_TRIGGER</td>
819 * <td align="center">NOT_FOCUSED_LOCKED</td>
820 * <td align="center">AF state query, Lens now locked</td>
821 * </tr>
822 * <tr>
823 * <td align="center">PASSIVE_SCAN</td>
824 * <td align="center">Camera device completes current scan</td>
825 * <td align="center">PASSIVE_FOCUSED</td>
826 * <td align="center">End AF scan, Lens now locked</td>
827 * </tr>
828 * <tr>
829 * <td align="center">PASSIVE_SCAN</td>
830 * <td align="center">Camera device fails current scan</td>
831 * <td align="center">PASSIVE_UNFOCUSED</td>
832 * <td align="center">End AF scan, Lens now locked</td>
833 * </tr>
834 * <tr>
835 * <td align="center">PASSIVE_SCAN</td>
836 * <td align="center">AF_TRIGGER</td>
837 * <td align="center">FOCUSED_LOCKED</td>
838 * <td align="center">Immediate trans. If focus is good, Lens now locked</td>
839 * </tr>
840 * <tr>
841 * <td align="center">PASSIVE_SCAN</td>
842 * <td align="center">AF_TRIGGER</td>
843 * <td align="center">NOT_FOCUSED_LOCKED</td>
844 * <td align="center">Immediate trans. if focus is bad, Lens now locked</td>
845 * </tr>
846 * <tr>
847 * <td align="center">PASSIVE_SCAN</td>
848 * <td align="center">AF_CANCEL</td>
849 * <td align="center">INACTIVE</td>
850 * <td align="center">Reset lens position, Lens now locked</td>
851 * </tr>
852 * <tr>
853 * <td align="center">PASSIVE_FOCUSED</td>
854 * <td align="center">Camera device initiates new scan</td>
855 * <td align="center">PASSIVE_SCAN</td>
856 * <td align="center">Start AF scan, Lens now moving</td>
857 * </tr>
858 * <tr>
859 * <td align="center">PASSIVE_UNFOCUSED</td>
860 * <td align="center">Camera device initiates new scan</td>
861 * <td align="center">PASSIVE_SCAN</td>
862 * <td align="center">Start AF scan, Lens now moving</td>
863 * </tr>
864 * <tr>
865 * <td align="center">PASSIVE_FOCUSED</td>
866 * <td align="center">AF_TRIGGER</td>
867 * <td align="center">FOCUSED_LOCKED</td>
868 * <td align="center">Immediate trans. Lens now locked</td>
869 * </tr>
870 * <tr>
871 * <td align="center">PASSIVE_UNFOCUSED</td>
872 * <td align="center">AF_TRIGGER</td>
873 * <td align="center">NOT_FOCUSED_LOCKED</td>
874 * <td align="center">Immediate trans. Lens now locked</td>
875 * </tr>
876 * <tr>
877 * <td align="center">FOCUSED_LOCKED</td>
878 * <td align="center">AF_TRIGGER</td>
879 * <td align="center">FOCUSED_LOCKED</td>
880 * <td align="center">No effect</td>
881 * </tr>
882 * <tr>
883 * <td align="center">FOCUSED_LOCKED</td>
884 * <td align="center">AF_CANCEL</td>
885 * <td align="center">INACTIVE</td>
886 * <td align="center">Restart AF scan</td>
887 * </tr>
888 * <tr>
889 * <td align="center">NOT_FOCUSED_LOCKED</td>
890 * <td align="center">AF_TRIGGER</td>
891 * <td align="center">NOT_FOCUSED_LOCKED</td>
892 * <td align="center">No effect</td>
893 * </tr>
894 * <tr>
895 * <td align="center">NOT_FOCUSED_LOCKED</td>
896 * <td align="center">AF_CANCEL</td>
897 * <td align="center">INACTIVE</td>
898 * <td align="center">Restart AF scan</td>
899 * </tr>
900 * </tbody>
901 * </table>
902 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p>
903 * <table>
904 * <thead>
905 * <tr>
906 * <th align="center">State</th>
907 * <th align="center">Transition Cause</th>
908 * <th align="center">New State</th>
909 * <th align="center">Notes</th>
910 * </tr>
911 * </thead>
912 * <tbody>
913 * <tr>
914 * <td align="center">INACTIVE</td>
915 * <td align="center">Camera device initiates new scan</td>
916 * <td align="center">PASSIVE_SCAN</td>
917 * <td align="center">Start AF scan, Lens now moving</td>
918 * </tr>
919 * <tr>
920 * <td align="center">INACTIVE</td>
921 * <td align="center">AF_TRIGGER</td>
922 * <td align="center">NOT_FOCUSED_LOCKED</td>
923 * <td align="center">AF state query, Lens now locked</td>
924 * </tr>
925 * <tr>
926 * <td align="center">PASSIVE_SCAN</td>
927 * <td align="center">Camera device completes current scan</td>
928 * <td align="center">PASSIVE_FOCUSED</td>
929 * <td align="center">End AF scan, Lens now locked</td>
930 * </tr>
931 * <tr>
932 * <td align="center">PASSIVE_SCAN</td>
933 * <td align="center">Camera device fails current scan</td>
934 * <td align="center">PASSIVE_UNFOCUSED</td>
935 * <td align="center">End AF scan, Lens now locked</td>
936 * </tr>
937 * <tr>
938 * <td align="center">PASSIVE_SCAN</td>
939 * <td align="center">AF_TRIGGER</td>
940 * <td align="center">FOCUSED_LOCKED</td>
941 * <td align="center">Eventual trans. once focus good, Lens now locked</td>
942 * </tr>
943 * <tr>
944 * <td align="center">PASSIVE_SCAN</td>
945 * <td align="center">AF_TRIGGER</td>
946 * <td align="center">NOT_FOCUSED_LOCKED</td>
947 * <td align="center">Eventual trans. if cannot focus, Lens now locked</td>
948 * </tr>
949 * <tr>
950 * <td align="center">PASSIVE_SCAN</td>
951 * <td align="center">AF_CANCEL</td>
952 * <td align="center">INACTIVE</td>
953 * <td align="center">Reset lens position, Lens now locked</td>
954 * </tr>
955 * <tr>
956 * <td align="center">PASSIVE_FOCUSED</td>
957 * <td align="center">Camera device initiates new scan</td>
958 * <td align="center">PASSIVE_SCAN</td>
959 * <td align="center">Start AF scan, Lens now moving</td>
960 * </tr>
961 * <tr>
962 * <td align="center">PASSIVE_UNFOCUSED</td>
963 * <td align="center">Camera device initiates new scan</td>
964 * <td align="center">PASSIVE_SCAN</td>
965 * <td align="center">Start AF scan, Lens now moving</td>
966 * </tr>
967 * <tr>
968 * <td align="center">PASSIVE_FOCUSED</td>
969 * <td align="center">AF_TRIGGER</td>
970 * <td align="center">FOCUSED_LOCKED</td>
971 * <td align="center">Immediate trans. Lens now locked</td>
972 * </tr>
973 * <tr>
974 * <td align="center">PASSIVE_UNFOCUSED</td>
975 * <td align="center">AF_TRIGGER</td>
976 * <td align="center">NOT_FOCUSED_LOCKED</td>
977 * <td align="center">Immediate trans. Lens now locked</td>
978 * </tr>
979 * <tr>
980 * <td align="center">FOCUSED_LOCKED</td>
981 * <td align="center">AF_TRIGGER</td>
982 * <td align="center">FOCUSED_LOCKED</td>
983 * <td align="center">No effect</td>
984 * </tr>
985 * <tr>
986 * <td align="center">FOCUSED_LOCKED</td>
987 * <td align="center">AF_CANCEL</td>
988 * <td align="center">INACTIVE</td>
989 * <td align="center">Restart AF scan</td>
990 * </tr>
991 * <tr>
992 * <td align="center">NOT_FOCUSED_LOCKED</td>
993 * <td align="center">AF_TRIGGER</td>
994 * <td align="center">NOT_FOCUSED_LOCKED</td>
995 * <td align="center">No effect</td>
996 * </tr>
997 * <tr>
998 * <td align="center">NOT_FOCUSED_LOCKED</td>
999 * <td align="center">AF_CANCEL</td>
1000 * <td align="center">INACTIVE</td>
1001 * <td align="center">Restart AF scan</td>
1002 * </tr>
1003 * </tbody>
1004 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001005 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1006 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1007 * camera device. When a trigger is included in a mode switch request, the trigger
1008 * will be evaluated in the context of the new mode in the request.
1009 * See below table for examples:</p>
1010 * <table>
1011 * <thead>
1012 * <tr>
1013 * <th align="center">State</th>
1014 * <th align="center">Transition Cause</th>
1015 * <th align="center">New State</th>
1016 * <th align="center">Notes</th>
1017 * </tr>
1018 * </thead>
1019 * <tbody>
1020 * <tr>
1021 * <td align="center">any state</td>
1022 * <td align="center">CAF--&gt;AUTO mode switch</td>
1023 * <td align="center">INACTIVE</td>
1024 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
1025 * </tr>
1026 * <tr>
1027 * <td align="center">any state</td>
1028 * <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
1029 * <td align="center">trigger-reachable states from INACTIVE</td>
1030 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
1031 * </tr>
1032 * <tr>
1033 * <td align="center">any state</td>
1034 * <td align="center">AUTO--&gt;CAF mode switch</td>
1035 * <td align="center">passively reachable states from INACTIVE</td>
1036 * <td align="center">Mode switch without trigger, passive transient state is skipped</td>
1037 * </tr>
1038 * </tbody>
1039 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -08001040 *
1041 * @see CaptureRequest#CONTROL_AF_MODE
1042 * @see CaptureRequest#CONTROL_MODE
1043 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001044 * @see #CONTROL_AF_STATE_INACTIVE
1045 * @see #CONTROL_AF_STATE_PASSIVE_SCAN
1046 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED
1047 * @see #CONTROL_AF_STATE_ACTIVE_SCAN
1048 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED
1049 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07001050 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001051 */
1052 public static final Key<Integer> CONTROL_AF_STATE =
1053 new Key<Integer>("android.control.afState", int.class);
1054
1055 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001056 * <p>The ID sent with the latest
1057 * CAMERA2_TRIGGER_AUTOFOCUS call</p>
1058 * <p>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001059 * received yet by HAL. Always updated even if AF algorithm
Igor Murashkinace5bf02013-12-10 17:36:40 -08001060 * ignores the trigger</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001061 * @hide
1062 */
1063 public static final Key<Integer> CONTROL_AF_TRIGGER_ID =
1064 new Key<Integer>("android.control.afTriggerId", int.class);
1065
1066 /**
Zhijun He379af012014-05-06 11:54:54 -07001067 * <p>Whether AWB is currently locked to its
1068 * latest calculated values.</p>
1069 * <p>Note that AWB lock is only meaningful for AUTO
1070 * mode; in other modes, AWB is already fixed to a specific
1071 * setting.</p>
1072 */
1073 public static final Key<Boolean> CONTROL_AWB_LOCK =
1074 new Key<Boolean>("android.control.awbLock", boolean.class);
1075
1076 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001077 * <p>Whether AWB is currently setting the color
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001078 * transform fields, and what its illumination target
Zhijun Hecc28a412014-02-24 15:11:23 -08001079 * is.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001080 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p>
1081 * <p>When set to the ON mode, the camera device's auto white balance
1082 * routine is enabled, overriding the application's selected
1083 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
1084 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
1085 * <p>When set to the OFF mode, the camera device's auto white balance
Zhijun Hecc28a412014-02-24 15:11:23 -08001086 * routine is disabled. The application manually controls the white
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001087 * 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 -08001088 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
1089 * <p>When set to any other modes, the camera device's auto white balance
1090 * routine is disabled. The camera device uses each particular illumination
1091 * target for white balance adjustment.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001092 *
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001093 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Zhijun He5f2a47f2014-01-16 15:44:41 -08001094 * @see CaptureRequest#COLOR_CORRECTION_MODE
1095 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001096 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001097 * @see #CONTROL_AWB_MODE_OFF
1098 * @see #CONTROL_AWB_MODE_AUTO
1099 * @see #CONTROL_AWB_MODE_INCANDESCENT
1100 * @see #CONTROL_AWB_MODE_FLUORESCENT
1101 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
1102 * @see #CONTROL_AWB_MODE_DAYLIGHT
1103 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
1104 * @see #CONTROL_AWB_MODE_TWILIGHT
1105 * @see #CONTROL_AWB_MODE_SHADE
1106 */
1107 public static final Key<Integer> CONTROL_AWB_MODE =
1108 new Key<Integer>("android.control.awbMode", int.class);
1109
1110 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001111 * <p>List of areas to use for illuminant
Ruben Brunkf59521d2014-02-03 17:14:33 -08001112 * estimation.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001113 * <p>Only used in AUTO mode.</p>
1114 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -08001115 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001116 * specified coordinates.</p>
1117 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001118 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001119 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1120 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -07001121 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -08001122 * should be nonnegative.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -08001123 * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area
1124 * needs to be used by the camera device. If the AWB region is
1125 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
1126 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -08001127 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001128 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001129 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001130 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001131 */
1132 public static final Key<int[]> CONTROL_AWB_REGIONS =
1133 new Key<int[]>("android.control.awbRegions", int[].class);
1134
1135 /**
Zhijun He379af012014-05-06 11:54:54 -07001136 * <p>Information to the camera device 3A (auto-exposure,
1137 * auto-focus, auto-white balance) routines about the purpose
1138 * of this capture, to help the camera device to decide optimal 3A
1139 * strategy.</p>
1140 * <p>This control (except for MANUAL) is only effective if
1141 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
1142 * <p>ZERO_SHUTTER_LAG must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1143 * contains ZSL. MANUAL must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1144 * contains MANUAL_SENSOR.</p>
1145 *
1146 * @see CaptureRequest#CONTROL_MODE
1147 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1148 * @see #CONTROL_CAPTURE_INTENT_CUSTOM
1149 * @see #CONTROL_CAPTURE_INTENT_PREVIEW
1150 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
1151 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
1152 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
1153 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
1154 * @see #CONTROL_CAPTURE_INTENT_MANUAL
1155 */
1156 public static final Key<Integer> CONTROL_CAPTURE_INTENT =
1157 new Key<Integer>("android.control.captureIntent", int.class);
1158
1159 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001160 * <p>Current state of AWB algorithm</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001161 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always
1162 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1163 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1164 * the algorithm states to INACTIVE.</p>
1165 * <p>The camera device can do several state transitions between two results, if it is
1166 * allowed by the state transition table. So INACTIVE may never actually be seen in
1167 * a result.</p>
1168 * <p>The state in the result is the state for this image (in sync with this image): if
1169 * AWB state becomes CONVERGED, then the image data associated with this result should
1170 * be good to use.</p>
1171 * <p>Below are state transition tables for different AWB modes.</p>
1172 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p>
1173 * <table>
1174 * <thead>
1175 * <tr>
1176 * <th align="center">State</th>
1177 * <th align="center">Transition Cause</th>
1178 * <th align="center">New State</th>
1179 * <th align="center">Notes</th>
1180 * </tr>
1181 * </thead>
1182 * <tbody>
1183 * <tr>
1184 * <td align="center">INACTIVE</td>
1185 * <td align="center"></td>
1186 * <td align="center">INACTIVE</td>
1187 * <td align="center">Camera device auto white balance algorithm is disabled</td>
1188 * </tr>
1189 * </tbody>
1190 * </table>
1191 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p>
1192 * <table>
1193 * <thead>
1194 * <tr>
1195 * <th align="center">State</th>
1196 * <th align="center">Transition Cause</th>
1197 * <th align="center">New State</th>
1198 * <th align="center">Notes</th>
1199 * </tr>
1200 * </thead>
1201 * <tbody>
1202 * <tr>
1203 * <td align="center">INACTIVE</td>
1204 * <td align="center">Camera device initiates AWB scan</td>
1205 * <td align="center">SEARCHING</td>
1206 * <td align="center">Values changing</td>
1207 * </tr>
1208 * <tr>
1209 * <td align="center">INACTIVE</td>
1210 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1211 * <td align="center">LOCKED</td>
1212 * <td align="center">Values locked</td>
1213 * </tr>
1214 * <tr>
1215 * <td align="center">SEARCHING</td>
1216 * <td align="center">Camera device finishes AWB scan</td>
1217 * <td align="center">CONVERGED</td>
1218 * <td align="center">Good values, not changing</td>
1219 * </tr>
1220 * <tr>
1221 * <td align="center">SEARCHING</td>
1222 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1223 * <td align="center">LOCKED</td>
1224 * <td align="center">Values locked</td>
1225 * </tr>
1226 * <tr>
1227 * <td align="center">CONVERGED</td>
1228 * <td align="center">Camera device initiates AWB scan</td>
1229 * <td align="center">SEARCHING</td>
1230 * <td align="center">Values changing</td>
1231 * </tr>
1232 * <tr>
1233 * <td align="center">CONVERGED</td>
1234 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1235 * <td align="center">LOCKED</td>
1236 * <td align="center">Values locked</td>
1237 * </tr>
1238 * <tr>
1239 * <td align="center">LOCKED</td>
1240 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1241 * <td align="center">SEARCHING</td>
1242 * <td align="center">Values not good after unlock</td>
1243 * </tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001244 * </tbody>
1245 * </table>
1246 * <p>For the above table, the camera device may skip reporting any state changes that happen
1247 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1248 * can be skipped in that manner is called a transient state.</p>
1249 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1250 * listed in above table, it is also legal for the camera device to skip one or more
1251 * transient states between two results. See below table for examples:</p>
1252 * <table>
1253 * <thead>
1254 * <tr>
1255 * <th align="center">State</th>
1256 * <th align="center">Transition Cause</th>
1257 * <th align="center">New State</th>
1258 * <th align="center">Notes</th>
1259 * </tr>
1260 * </thead>
1261 * <tbody>
1262 * <tr>
1263 * <td align="center">INACTIVE</td>
1264 * <td align="center">Camera device finished AWB scan</td>
1265 * <td align="center">CONVERGED</td>
1266 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1267 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001268 * <tr>
1269 * <td align="center">LOCKED</td>
1270 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1271 * <td align="center">CONVERGED</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001272 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001273 * </tr>
1274 * </tbody>
1275 * </table>
1276 *
1277 * @see CaptureRequest#CONTROL_AWB_LOCK
1278 * @see CaptureRequest#CONTROL_AWB_MODE
1279 * @see CaptureRequest#CONTROL_MODE
1280 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001281 * @see #CONTROL_AWB_STATE_INACTIVE
1282 * @see #CONTROL_AWB_STATE_SEARCHING
1283 * @see #CONTROL_AWB_STATE_CONVERGED
1284 * @see #CONTROL_AWB_STATE_LOCKED
1285 */
1286 public static final Key<Integer> CONTROL_AWB_STATE =
1287 new Key<Integer>("android.control.awbState", int.class);
1288
1289 /**
Zhijun He379af012014-05-06 11:54:54 -07001290 * <p>A special color effect to apply.</p>
1291 * <p>When this mode is set, a color effect will be applied
1292 * to images produced by the camera device. The interpretation
1293 * and implementation of these color effects is left to the
1294 * implementor of the camera device, and should not be
1295 * depended on to be consistent (or present) across all
1296 * devices.</p>
1297 * <p>A color effect will only be applied if
1298 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
1299 *
1300 * @see CaptureRequest#CONTROL_MODE
1301 * @see #CONTROL_EFFECT_MODE_OFF
1302 * @see #CONTROL_EFFECT_MODE_MONO
1303 * @see #CONTROL_EFFECT_MODE_NEGATIVE
1304 * @see #CONTROL_EFFECT_MODE_SOLARIZE
1305 * @see #CONTROL_EFFECT_MODE_SEPIA
1306 * @see #CONTROL_EFFECT_MODE_POSTERIZE
1307 * @see #CONTROL_EFFECT_MODE_WHITEBOARD
1308 * @see #CONTROL_EFFECT_MODE_BLACKBOARD
1309 * @see #CONTROL_EFFECT_MODE_AQUA
1310 */
1311 public static final Key<Integer> CONTROL_EFFECT_MODE =
1312 new Key<Integer>("android.control.effectMode", int.class);
1313
1314 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001315 * <p>Overall mode of 3A control
Zhijun Hecc28a412014-02-24 15:11:23 -08001316 * routines.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001317 * <p>High-level 3A control. When set to OFF, all 3A control
Zhijun He5f2a47f2014-01-16 15:44:41 -08001318 * by the camera device is disabled. The application must set the fields for
Zhijun Hef3537422013-12-16 16:56:35 -08001319 * capture parameters itself.</p>
1320 * <p>When set to AUTO, the individual algorithm controls in
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001321 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001322 * <p>When set to USE_SCENE_MODE, the individual controls in
Zhijun He5f2a47f2014-01-16 15:44:41 -08001323 * android.control.* are mostly disabled, and the camera device implements
Zhijun Hef3537422013-12-16 16:56:35 -08001324 * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
Zhijun He5f2a47f2014-01-16 15:44:41 -08001325 * as it wishes. The camera device scene mode 3A settings are provided by
Zhijun Hef3537422013-12-16 16:56:35 -08001326 * android.control.sceneModeOverrides.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001327 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1328 * is that this frame will not be used by camera device background 3A statistics
1329 * update, as if this frame is never captured. This mode can be used in the scenario
1330 * where the application doesn't want a 3A manual control capture to affect
1331 * the subsequent auto 3A capture results.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001332 *
1333 * @see CaptureRequest#CONTROL_AF_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001334 * @see #CONTROL_MODE_OFF
1335 * @see #CONTROL_MODE_AUTO
1336 * @see #CONTROL_MODE_USE_SCENE_MODE
Zhijun He2d5e8972014-02-07 16:13:46 -08001337 * @see #CONTROL_MODE_OFF_KEEP_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001338 */
1339 public static final Key<Integer> CONTROL_MODE =
1340 new Key<Integer>("android.control.mode", int.class);
1341
1342 /**
Zhijun He379af012014-05-06 11:54:54 -07001343 * <p>A camera mode optimized for conditions typical in a particular
1344 * capture setting.</p>
1345 * <p>This is the mode that that is active when
1346 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
1347 * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1348 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
1349 * <p>The interpretation and implementation of these scene modes is left
1350 * to the implementor of the camera device. Their behavior will not be
1351 * consistent across all devices, and any given device may only implement
1352 * a subset of these modes.</p>
1353 *
1354 * @see CaptureRequest#CONTROL_AE_MODE
1355 * @see CaptureRequest#CONTROL_AF_MODE
1356 * @see CaptureRequest#CONTROL_AWB_MODE
1357 * @see CaptureRequest#CONTROL_MODE
1358 * @see #CONTROL_SCENE_MODE_DISABLED
1359 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
1360 * @see #CONTROL_SCENE_MODE_ACTION
1361 * @see #CONTROL_SCENE_MODE_PORTRAIT
1362 * @see #CONTROL_SCENE_MODE_LANDSCAPE
1363 * @see #CONTROL_SCENE_MODE_NIGHT
1364 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
1365 * @see #CONTROL_SCENE_MODE_THEATRE
1366 * @see #CONTROL_SCENE_MODE_BEACH
1367 * @see #CONTROL_SCENE_MODE_SNOW
1368 * @see #CONTROL_SCENE_MODE_SUNSET
1369 * @see #CONTROL_SCENE_MODE_STEADYPHOTO
1370 * @see #CONTROL_SCENE_MODE_FIREWORKS
1371 * @see #CONTROL_SCENE_MODE_SPORTS
1372 * @see #CONTROL_SCENE_MODE_PARTY
1373 * @see #CONTROL_SCENE_MODE_CANDLELIGHT
1374 * @see #CONTROL_SCENE_MODE_BARCODE
1375 */
1376 public static final Key<Integer> CONTROL_SCENE_MODE =
1377 new Key<Integer>("android.control.sceneMode", int.class);
1378
1379 /**
1380 * <p>Whether video stabilization is
1381 * active</p>
1382 * <p>If enabled, video stabilization can modify the
1383 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream
1384 * stabilized</p>
1385 *
1386 * @see CaptureRequest#SCALER_CROP_REGION
1387 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF
1388 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON
1389 */
1390 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE =
1391 new Key<Integer>("android.control.videoStabilizationMode", int.class);
1392
1393 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001394 * <p>Operation mode for edge
Zhijun Hecc28a412014-02-24 15:11:23 -08001395 * enhancement.</p>
Zhijun He28079362013-12-17 10:35:40 -08001396 * <p>Edge/sharpness/detail enhancement. OFF means no
Zhijun Hecc28a412014-02-24 15:11:23 -08001397 * enhancement will be applied by the camera device.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001398 * <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 -08001399 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun He28079362013-12-17 10:35:40 -08001400 * will be applied. HIGH_QUALITY mode indicates that the
Zhijun He5f2a47f2014-01-16 15:44:41 -08001401 * camera device will use the highest-quality enhancement algorithms,
1402 * even if it slows down capture rate. FAST means the camera device will
Zhijun He28079362013-12-17 10:35:40 -08001403 * not slow down capture rate when applying edge enhancement.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001404 *
1405 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001406 * @see #EDGE_MODE_OFF
1407 * @see #EDGE_MODE_FAST
1408 * @see #EDGE_MODE_HIGH_QUALITY
1409 */
1410 public static final Key<Integer> EDGE_MODE =
1411 new Key<Integer>("android.edge.mode", int.class);
1412
1413 /**
Zhijun He66d065a2014-01-16 18:18:50 -08001414 * <p>The desired mode for for the camera device's flash control.</p>
1415 * <p>This control is only effective when flash unit is available
Zhijun He153ac102014-02-03 12:25:12 -08001416 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
Zhijun He66d065a2014-01-16 18:18:50 -08001417 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
1418 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
1419 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
1420 * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
1421 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
1422 * device's auto-exposure routine's result. When used in still capture case, this
1423 * control should be used along with AE precapture metering sequence
1424 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
1425 * <p>When set to TORCH, the flash will be on continuously. This mode can be used
1426 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08001427 * <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 -08001428 *
1429 * @see CaptureRequest#CONTROL_AE_MODE
1430 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1431 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Zhijun Heca1b73a2014-02-03 12:39:53 -08001432 * @see CaptureResult#FLASH_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001433 * @see #FLASH_MODE_OFF
1434 * @see #FLASH_MODE_SINGLE
1435 * @see #FLASH_MODE_TORCH
1436 */
1437 public static final Key<Integer> FLASH_MODE =
1438 new Key<Integer>("android.flash.mode", int.class);
1439
1440 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001441 * <p>Current state of the flash
Zhijun Heca1b73a2014-02-03 12:39:53 -08001442 * unit.</p>
1443 * <p>When the camera device doesn't have flash unit
1444 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
1445 * Other states indicate the current flash status.</p>
1446 *
1447 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001448 * @see #FLASH_STATE_UNAVAILABLE
1449 * @see #FLASH_STATE_CHARGING
1450 * @see #FLASH_STATE_READY
1451 * @see #FLASH_STATE_FIRED
Zhijun He8dda7272014-03-25 13:49:30 -07001452 * @see #FLASH_STATE_PARTIAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001453 */
1454 public static final Key<Integer> FLASH_STATE =
1455 new Key<Integer>("android.flash.state", int.class);
1456
1457 /**
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001458 * <p>Set operational mode for hot pixel correction.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001459 * <p>Valid modes for this camera device are listed in
1460 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001461 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
1462 * that do not accurately encode the incoming light (i.e. pixels that
1463 * are stuck at an arbitrary value).</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001464 *
1465 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001466 * @see #HOT_PIXEL_MODE_OFF
1467 * @see #HOT_PIXEL_MODE_FAST
1468 * @see #HOT_PIXEL_MODE_HIGH_QUALITY
1469 */
1470 public static final Key<Integer> HOT_PIXEL_MODE =
1471 new Key<Integer>("android.hotPixel.mode", int.class);
1472
1473 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001474 * <p>GPS coordinates to include in output JPEG
1475 * EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001476 */
1477 public static final Key<double[]> JPEG_GPS_COORDINATES =
1478 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
1479
1480 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001481 * <p>32 characters describing GPS algorithm to
1482 * include in EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001483 */
1484 public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
1485 new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
1486
1487 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001488 * <p>Time GPS fix was made to include in
1489 * EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001490 */
1491 public static final Key<Long> JPEG_GPS_TIMESTAMP =
1492 new Key<Long>("android.jpeg.gpsTimestamp", long.class);
1493
1494 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001495 * <p>Orientation of JPEG image to
1496 * write</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001497 */
1498 public static final Key<Integer> JPEG_ORIENTATION =
1499 new Key<Integer>("android.jpeg.orientation", int.class);
1500
1501 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001502 * <p>Compression quality of the final JPEG
1503 * image</p>
1504 * <p>85-95 is typical usage range</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001505 */
1506 public static final Key<Byte> JPEG_QUALITY =
1507 new Key<Byte>("android.jpeg.quality", byte.class);
1508
1509 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001510 * <p>Compression quality of JPEG
1511 * thumbnail</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001512 */
1513 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
1514 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
1515
1516 /**
Zhijun He5a9ff372013-12-26 11:49:09 -08001517 * <p>Resolution of embedded JPEG thumbnail</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001518 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
1519 * but the captured JPEG will still be a valid image.</p>
Zhijun He5a9ff372013-12-26 11:49:09 -08001520 * <p>When a jpeg image capture is issued, the thumbnail size selected should have
1521 * the same aspect ratio as the jpeg image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001522 */
1523 public static final Key<android.hardware.camera2.Size> JPEG_THUMBNAIL_SIZE =
1524 new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
1525
1526 /**
Zhijun Hefb46c642014-01-14 17:57:23 -08001527 * <p>The ratio of lens focal length to the effective
1528 * aperture diameter.</p>
1529 * <p>This will only be supported on the camera devices that
1530 * have variable aperture lens. The aperture value can only be
1531 * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p>
1532 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
1533 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001534 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
Zhijun Hefb46c642014-01-14 17:57:23 -08001535 * to achieve manual exposure control.</p>
1536 * <p>The requested aperture value may take several frames to reach the
1537 * requested value; the camera device will report the current (intermediate)
Zhijun Heca1b73a2014-02-03 12:39:53 -08001538 * aperture size in capture result metadata while the aperture is changing.
1539 * 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 -08001540 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
1541 * the ON modes, this will be overridden by the camera device
1542 * auto-exposure algorithm, the overridden values are then provided
1543 * back to the user in the corresponding result.</p>
1544 *
Zhijun He399f05d2014-01-15 11:31:30 -08001545 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001546 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
Zhijun Heca1b73a2014-02-03 12:39:53 -08001547 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001548 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001549 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001550 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001551 */
1552 public static final Key<Float> LENS_APERTURE =
1553 new Key<Float>("android.lens.aperture", float.class);
1554
1555 /**
Ruben Brunk855bae42014-01-17 10:30:32 -08001556 * <p>State of lens neutral density filter(s).</p>
1557 * <p>This will not be supported on most camera devices. On devices
1558 * where this is supported, this may only be set to one of the
1559 * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p>
1560 * <p>Lens filters are typically used to lower the amount of light the
1561 * sensor is exposed to (measured in steps of EV). As used here, an EV
1562 * step is the standard logarithmic representation, which are
1563 * non-negative, and inversely proportional to the amount of light
1564 * hitting the sensor. For example, setting this to 0 would result
1565 * in no reduction of the incoming light, and setting this to 2 would
1566 * mean that the filter is set to reduce incoming light by two stops
1567 * (allowing 1/4 of the prior amount of light to the sensor).</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08001568 * <p>It may take several frames before the lens filter density changes
1569 * to the requested value. While the filter density is still changing,
1570 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08001571 *
1572 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
Zhijun Heca1b73a2014-02-03 12:39:53 -08001573 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001574 */
1575 public static final Key<Float> LENS_FILTER_DENSITY =
1576 new Key<Float>("android.lens.filterDensity", float.class);
1577
1578 /**
Ruben Brunka20f4c22014-01-17 15:21:13 -08001579 * <p>The current lens focal length; used for optical zoom.</p>
1580 * <p>This setting controls the physical focal length of the camera
1581 * device's lens. Changing the focal length changes the field of
1582 * view of the camera device, and is usually used for optical zoom.</p>
1583 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
1584 * setting won't be applied instantaneously, and it may take several
Zhijun Heca1b73a2014-02-03 12:39:53 -08001585 * frames before the lens can change to the requested focal length.
Ruben Brunka20f4c22014-01-17 15:21:13 -08001586 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
1587 * be set to MOVING.</p>
1588 * <p>This is expected not to be supported on most devices.</p>
1589 *
1590 * @see CaptureRequest#LENS_APERTURE
1591 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1592 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001593 */
1594 public static final Key<Float> LENS_FOCAL_LENGTH =
1595 new Key<Float>("android.lens.focalLength", float.class);
1596
1597 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001598 * <p>Distance to plane of sharpest focus,
1599 * measured from frontmost surface of the lens</p>
1600 * <p>Should be zero for fixed-focus cameras</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001601 */
1602 public static final Key<Float> LENS_FOCUS_DISTANCE =
1603 new Key<Float>("android.lens.focusDistance", float.class);
1604
1605 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001606 * <p>The range of scene distances that are in
1607 * sharp focus (depth of field)</p>
1608 * <p>If variable focus not supported, can still report
1609 * fixed depth of field range</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001610 */
Zhijun Hec59b0782013-09-26 10:39:36 -07001611 public static final Key<float[]> LENS_FOCUS_RANGE =
1612 new Key<float[]>("android.lens.focusRange", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001613
1614 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08001615 * <p>Sets whether the camera device uses optical image stabilization (OIS)
1616 * when capturing images.</p>
1617 * <p>OIS is used to compensate for motion blur due to small movements of
1618 * the camera during capture. Unlike digital image stabilization, OIS makes
1619 * use of mechanical elements to stabilize the camera sensor, and thus
1620 * allows for longer exposure times before camera shake becomes
1621 * apparent.</p>
1622 * <p>This is not expected to be supported on most devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001623 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
1624 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
1625 */
1626 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
1627 new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
1628
1629 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08001630 * <p>Current lens status.</p>
1631 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1632 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested,
1633 * they may take several frames to reach the requested values. This state indicates
1634 * the current status of the lens parameters.</p>
1635 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
1636 * either because the parameters are all fixed, or because the lens has had enough
1637 * time to reach the most recently-requested values.
1638 * If all these lens parameters are not changable for a camera device, as listed below:</p>
1639 * <ul>
1640 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means
1641 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li>
1642 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value),
1643 * which means the optical zoom is not supported.</li>
1644 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li>
1645 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li>
1646 * </ul>
1647 * <p>Then this state will always be STATIONARY.</p>
1648 * <p>When the state is MOVING, it indicates that at least one of the lens parameters
1649 * is changing.</p>
1650 *
1651 * @see CaptureRequest#LENS_APERTURE
1652 * @see CaptureRequest#LENS_FILTER_DENSITY
1653 * @see CaptureRequest#LENS_FOCAL_LENGTH
1654 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1655 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
1656 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
1657 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
1658 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001659 * @see #LENS_STATE_STATIONARY
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07001660 * @see #LENS_STATE_MOVING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001661 */
1662 public static final Key<Integer> LENS_STATE =
1663 new Key<Integer>("android.lens.state", int.class);
1664
1665 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001666 * <p>Mode of operation for the noise reduction
1667 * algorithm</p>
Zhijun He28079362013-12-17 10:35:40 -08001668 * <p>Noise filtering control. OFF means no noise reduction
Zhijun Hecc28a412014-02-24 15:11:23 -08001669 * will be applied by the camera device.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001670 * <p>This must be set to a valid mode in
1671 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001672 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
1673 * will be applied. HIGH_QUALITY mode indicates that the camera device
1674 * will use the highest-quality noise filtering algorithms,
1675 * even if it slows down capture rate. FAST means the camera device should not
Zhijun He28079362013-12-17 10:35:40 -08001676 * slow down capture rate when applying noise filtering.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001677 *
1678 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001679 * @see #NOISE_REDUCTION_MODE_OFF
1680 * @see #NOISE_REDUCTION_MODE_FAST
1681 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
1682 */
1683 public static final Key<Integer> NOISE_REDUCTION_MODE =
1684 new Key<Integer>("android.noiseReduction.mode", int.class);
1685
1686 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001687 * <p>Whether a result given to the framework is the
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001688 * final one for the capture, or only a partial that contains a
1689 * subset of the full set of dynamic metadata
Igor Murashkinace5bf02013-12-10 17:36:40 -08001690 * values.</p>
1691 * <p>The entries in the result metadata buffers for a
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001692 * single capture may not overlap, except for this entry. The
1693 * FINAL buffers must retain FIFO ordering relative to the
1694 * requests that generate them, so the FINAL buffer for frame 3 must
1695 * always be sent to the framework after the FINAL buffer for frame 2, and
1696 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned
1697 * in any order relative to other frames, but all PARTIAL buffers for a given
1698 * capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun Hecc28a412014-02-24 15:11:23 -08001699 * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001700 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001701 * @hide
1702 */
1703 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
1704 new Key<Boolean>("android.quirks.partialResult", boolean.class);
1705
1706 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001707 * <p>A frame counter set by the framework. This value monotonically
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -07001708 * increases with every new result (that is, each new result has a unique
Igor Murashkinace5bf02013-12-10 17:36:40 -08001709 * frameCount value).</p>
1710 * <p>Reset on release()</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001711 */
1712 public static final Key<Integer> REQUEST_FRAME_COUNT =
1713 new Key<Integer>("android.request.frameCount", int.class);
1714
1715 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001716 * <p>An application-specified ID for the current
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001717 * request. Must be maintained unchanged in output
Igor Murashkinace5bf02013-12-10 17:36:40 -08001718 * frame</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001719 * @hide
1720 */
1721 public static final Key<Integer> REQUEST_ID =
1722 new Key<Integer>("android.request.id", int.class);
1723
1724 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001725 * <p>Specifies the number of pipeline stages the frame went
1726 * through from when it was exposed to when the final completed result
1727 * was available to the framework.</p>
1728 * <p>Depending on what settings are used in the request, and
1729 * what streams are configured, the data may undergo less processing,
1730 * and some pipeline stages skipped.</p>
1731 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
1732 *
1733 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
1734 */
1735 public static final Key<Byte> REQUEST_PIPELINE_DEPTH =
1736 new Key<Byte>("android.request.pipelineDepth", byte.class);
1737
1738 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001739 * <p>(x, y, width, height).</p>
1740 * <p>A rectangle with the top-level corner of (x,y) and size
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001741 * (width, height). The region of the sensor that is used for
1742 * output. Each stream must use this rectangle to produce its
1743 * output, cropping to a smaller region if necessary to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001744 * maintain the stream's aspect ratio.</p>
1745 * <p>HAL2.x uses only (x, y, width)</p>
1746 * <p>Any additional per-stream cropping must be done to
1747 * maximize the final pixel area of the stream.</p>
1748 * <p>For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001749 * ratio, then 4:3 streams should use the exact crop
1750 * region. 16:9 streams should further crop vertically
Igor Murashkinace5bf02013-12-10 17:36:40 -08001751 * (letterbox).</p>
1752 * <p>Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001753 * outputs should crop horizontally (pillarbox), and 16:9
1754 * streams should match exactly. These additional crops must
Igor Murashkinace5bf02013-12-10 17:36:40 -08001755 * be centered within the crop region.</p>
1756 * <p>The output streams must maintain square pixels at all
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001757 * times, no matter what the relative aspect ratios of the
1758 * crop region and the stream are. Negative values for
1759 * corner are allowed for raw output if full pixel array is
1760 * larger than active pixel array. Width and height may be
1761 * rounded to nearest larger supportable width, especially
1762 * for raw output, where only a few fixed scales may be
1763 * possible. The width and height of the crop region cannot
1764 * be set to be smaller than floor( activeArraySize.width /
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001765 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} ) and floor(
1766 * activeArraySize.height /
1767 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom}), respectively.</p>
1768 *
1769 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001770 */
1771 public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
1772 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
1773
1774 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001775 * <p>Duration each pixel is exposed to
1776 * light.</p>
1777 * <p>If the sensor can't expose this exact duration, it should shorten the
1778 * duration exposed to the nearest possible value (rather than expose longer).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001779 */
1780 public static final Key<Long> SENSOR_EXPOSURE_TIME =
1781 new Key<Long>("android.sensor.exposureTime", long.class);
1782
1783 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001784 * <p>Duration from start of frame exposure to
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001785 * start of next frame exposure.</p>
1786 * <p>The maximum frame rate that can be supported by a camera subsystem is
1787 * a function of many factors:</p>
1788 * <ul>
1789 * <li>Requested resolutions of output image streams</li>
1790 * <li>Availability of binning / skipping modes on the imager</li>
1791 * <li>The bandwidth of the imager interface</li>
1792 * <li>The bandwidth of the various ISP processing blocks</li>
1793 * </ul>
1794 * <p>Since these factors can vary greatly between different ISPs and
1795 * sensors, the camera abstraction tries to represent the bandwidth
1796 * restrictions with as simple a model as possible.</p>
1797 * <p>The model presented has the following characteristics:</p>
1798 * <ul>
1799 * <li>The image sensor is always configured to output the smallest
1800 * resolution possible given the application's requested output stream
1801 * sizes. The smallest resolution is defined as being at least as large
1802 * as the largest requested output stream size; the camera pipeline must
1803 * never digitally upsample sensor data when the crop region covers the
1804 * whole sensor. In general, this means that if only small output stream
1805 * resolutions are configured, the sensor can provide a higher frame
1806 * rate.</li>
1807 * <li>Since any request may use any or all the currently configured
1808 * output streams, the sensor and ISP must be configured to support
1809 * scaling a single capture to all the streams at the same time. This
1810 * means the camera pipeline must be ready to produce the largest
1811 * requested output size without any delay. Therefore, the overall
1812 * frame rate of a given configured stream set is governed only by the
1813 * largest requested stream resolution.</li>
1814 * <li>Using more than one output stream in a request does not affect the
1815 * frame duration.</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001816 * <li>Certain format-streams may need to do additional background processing
1817 * before data is consumed/produced by that stream. These processors
1818 * can run concurrently to the rest of the camera pipeline, but
1819 * cannot process more than 1 capture at a time.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001820 * </ul>
1821 * <p>The necessary information for the application, given the model above,
Igor Murashkina23ffb52014-02-07 18:52:34 -08001822 * is provided via the {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} field.
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001823 * These are used to determine the maximum frame rate / minimum frame
1824 * duration that is possible for a given stream configuration.</p>
1825 * <p>Specifically, the application can use the following rules to
Igor Murashkina23ffb52014-02-07 18:52:34 -08001826 * determine the minimum frame duration it can request from the camera
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001827 * device:</p>
1828 * <ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001829 * <li>Let the set of currently configured input/output streams
1830 * be called <code>S</code>.</li>
1831 * <li>Find the minimum frame durations for each stream in <code>S</code>, by
1832 * looking it up in {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} (with
1833 * its respective size/format). Let this set of frame durations be called
1834 * <code>F</code>.</li>
1835 * <li>For any given request <code>R</code>, the minimum frame duration allowed
1836 * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams
1837 * used in <code>R</code> be called <code>S_r</code>.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001838 * </ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001839 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in
1840 * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}), then the frame duration in
1841 * <code>F</code> determines the steady state frame rate that the application will
1842 * get if it uses <code>R</code> as a repeating request. Let this special kind
1843 * of request be called <code>Rsimple</code>.</p>
1844 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved
1845 * by a single capture of a new request <code>Rstall</code> (which has at least
1846 * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the
1847 * same minimum frame duration this will not cause a frame rate loss
1848 * if all buffers from the previous <code>Rstall</code> have already been
1849 * delivered.</p>
1850 * <p>For more details about stalling, see
1851 * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001852 *
Igor Murashkina23ffb52014-02-07 18:52:34 -08001853 * @see CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS
1854 * @see CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001855 */
1856 public static final Key<Long> SENSOR_FRAME_DURATION =
1857 new Key<Long>("android.sensor.frameDuration", long.class);
1858
1859 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001860 * <p>Gain applied to image data. Must be
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001861 * implemented through analog gain only if set to values
Igor Murashkinace5bf02013-12-10 17:36:40 -08001862 * below 'maximum analog sensitivity'.</p>
1863 * <p>If the sensor can't apply this exact gain, it should lessen the
1864 * gain to the nearest possible value (rather than gain more).</p>
1865 * <p>ISO 12232:2006 REI method</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001866 */
1867 public static final Key<Integer> SENSOR_SENSITIVITY =
1868 new Key<Integer>("android.sensor.sensitivity", int.class);
1869
1870 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001871 * <p>Time at start of exposure of first
1872 * row</p>
1873 * <p>Monotonic, should be synced to other timestamps in
1874 * system</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001875 */
1876 public static final Key<Long> SENSOR_TIMESTAMP =
1877 new Key<Long>("android.sensor.timestamp", long.class);
1878
1879 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001880 * <p>The temperature of the sensor, sampled at the time
1881 * exposure began for this frame.</p>
1882 * <p>The thermal diode being queried should be inside the sensor PCB, or
1883 * somewhere close to it.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001884 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1885 * <p><b>Full capability</b> -
1886 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1887 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1888 *
1889 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkind5ff06a2013-08-20 15:15:06 -07001890 */
1891 public static final Key<Float> SENSOR_TEMPERATURE =
1892 new Key<Float>("android.sensor.temperature", float.class);
1893
1894 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07001895 * <p>The estimated camera neutral color in the native sensor colorspace at
1896 * the time of capture.</p>
1897 * <p>This value gives the neutral color point encoded as an RGB value in the
1898 * native sensor color space. The neutral color point indicates the
1899 * currently estimated white point of the scene illumination. It can be
1900 * used to interpolate between the provided color transforms when
1901 * processing raw sensor data.</p>
1902 * <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 -08001903 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1904 */
1905 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
1906 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
1907
1908 /**
Ruben Brunka9bfdbb2014-02-07 16:58:09 -08001909 * <p>A mapping containing a hue shift, saturation scale, and value scale
1910 * for each pixel.</p>
1911 * <p>hue_samples, saturation_samples, and value_samples are given in
1912 * {@link CameraCharacteristics#SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS android.sensor.profileHueSatMapDimensions}.</p>
1913 * <p>Each entry of this map contains three floats corresponding to the
1914 * hue shift, saturation scale, and value scale, respectively; where the
1915 * hue shift has the lowest index. The map entries are stored in the tag
1916 * in nested loop order, with the value divisions in the outer loop, the
1917 * hue divisions in the middle loop, and the saturation divisions in the
1918 * inner loop. All zero input saturation entries are required to have a
1919 * value scale factor of 1.0.</p>
1920 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1921 *
1922 * @see CameraCharacteristics#SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS
1923 */
1924 public static final Key<float[]> SENSOR_PROFILE_HUE_SAT_MAP =
1925 new Key<float[]>("android.sensor.profileHueSatMap", float[].class);
1926
1927 /**
1928 * <p>A list of x,y samples defining a tone-mapping curve for gamma adjustment.</p>
1929 * <p>This tag contains a default tone curve that can be applied while
1930 * processing the image as a starting point for user adjustments.
1931 * The curve is specified as a list of value pairs in linear gamma.
1932 * The curve is interpolated using a cubic spline.</p>
1933 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1934 */
1935 public static final Key<float[]> SENSOR_PROFILE_TONE_CURVE =
1936 new Key<float[]>("android.sensor.profileToneCurve", float[].class);
1937
1938 /**
Ruben Brunk987d9f72014-02-11 18:00:24 -08001939 * <p>The worst-case divergence between Bayer green channels.</p>
1940 * <p>This value is an estimate of the worst case split between the
1941 * Bayer green channels in the red and blue rows in the sensor color
1942 * filter array.</p>
1943 * <p>The green split is calculated as follows:</p>
1944 * <ol>
Ruben Brunke89b1202014-03-24 17:10:35 -07001945 * <li>A 5x5 pixel (or larger) window W within the active sensor array is
1946 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
1947 * mosaic channels (R, Gr, Gb, B). The location and size of the window
1948 * chosen is implementation defined, and should be chosen to provide a
1949 * green split estimate that is both representative of the entire image
1950 * for this camera sensor, and can be calculated quickly.</li>
Ruben Brunk987d9f72014-02-11 18:00:24 -08001951 * <li>The arithmetic mean of the green channels from the red
1952 * rows (mean_Gr) within W is computed.</li>
1953 * <li>The arithmetic mean of the green channels from the blue
1954 * rows (mean_Gb) within W is computed.</li>
1955 * <li>The maximum ratio R of the two means is computed as follows:
1956 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
1957 * </ol>
1958 * <p>The ratio R is the green split divergence reported for this property,
1959 * which represents how much the green channels differ in the mosaic
1960 * pattern. This value is typically used to determine the treatment of
1961 * the green mosaic channels when demosaicing.</p>
1962 * <p>The green split value can be roughly interpreted as follows:</p>
1963 * <ul>
1964 * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
1965 * <li>1.20 &lt;= R &gt;= 1.03 will require some software
1966 * correction to avoid demosaic errors (3-20% divergence).</li>
1967 * <li>R &gt; 1.20 will require strong software correction to produce
1968 * a usuable image (&gt;20% divergence).</li>
1969 * </ul>
1970 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1971 */
1972 public static final Key<Float> SENSOR_GREEN_SPLIT =
1973 new Key<Float>("android.sensor.greenSplit", float.class);
1974
1975 /**
Zhijun He379af012014-05-06 11:54:54 -07001976 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
1977 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
1978 * <p>Each color channel is treated as an unsigned 32-bit integer.
1979 * The camera device then uses the most significant X bits
1980 * that correspond to how many bits are in its Bayer raw sensor
1981 * output.</p>
1982 * <p>For example, a sensor with RAW10 Bayer output would use the
1983 * 10 most significant bits from each color channel.</p>
1984 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1985 *
1986 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1987 */
1988 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
1989 new Key<int[]>("android.sensor.testPatternData", int[].class);
1990
1991 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001992 * <p>When enabled, the sensor sends a test pattern instead of
1993 * doing a real exposure from the camera.</p>
1994 * <p>When a test pattern is enabled, all manual sensor controls specified
1995 * by android.sensor.* should be ignored. All other controls should
1996 * work as normal.</p>
1997 * <p>For example, if manual flash is enabled, flash firing should still
1998 * occur (and that the test pattern remain unmodified, since the flash
1999 * would not actually affect it).</p>
2000 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2001 * @see #SENSOR_TEST_PATTERN_MODE_OFF
2002 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
2003 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
2004 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
2005 * @see #SENSOR_TEST_PATTERN_MODE_PN9
2006 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
2007 */
2008 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
2009 new Key<Integer>("android.sensor.testPatternMode", int.class);
2010
2011 /**
Zhijun Heba93fe62014-01-17 16:43:05 -08002012 * <p>Quality of lens shading correction applied
2013 * to the image data.</p>
2014 * <p>When set to OFF mode, no lens shading correction will be applied by the
2015 * camera device, and an identity lens shading map data will be provided
2016 * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
2017 * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>,
2018 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map
2019 * shown below:</p>
2020 * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2021 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2022 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2023 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2024 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2025 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
2026 * </code></pre>
2027 * <p>When set to other modes, lens shading correction will be applied by the
2028 * camera device. Applications can request lens shading map data by setting
2029 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
2030 * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified
2031 * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
2032 *
2033 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
2034 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
2035 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2036 * @see #SHADING_MODE_OFF
2037 * @see #SHADING_MODE_FAST
2038 * @see #SHADING_MODE_HIGH_QUALITY
Zhijun Heba93fe62014-01-17 16:43:05 -08002039 */
2040 public static final Key<Integer> SHADING_MODE =
2041 new Key<Integer>("android.shading.mode", int.class);
2042
2043 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002044 * <p>State of the face detector
2045 * unit</p>
2046 * <p>Whether face detection is enabled, and whether it
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002047 * should output just the basic fields or the full set of
2048 * fields. Value must be one of the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002049 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
2050 *
2051 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002052 * @see #STATISTICS_FACE_DETECT_MODE_OFF
2053 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
2054 * @see #STATISTICS_FACE_DETECT_MODE_FULL
2055 */
2056 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
2057 new Key<Integer>("android.statistics.faceDetectMode", int.class);
2058
2059 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002060 * <p>List of unique IDs for detected
2061 * faces</p>
2062 * <p>Only available if faceDetectMode == FULL</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002063 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002064 */
2065 public static final Key<int[]> STATISTICS_FACE_IDS =
2066 new Key<int[]>("android.statistics.faceIds", int[].class);
2067
2068 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002069 * <p>List of landmarks for detected
2070 * faces</p>
2071 * <p>Only available if faceDetectMode == FULL</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002072 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002073 */
2074 public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
2075 new Key<int[]>("android.statistics.faceLandmarks", int[].class);
2076
2077 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002078 * <p>List of the bounding rectangles for detected
2079 * faces</p>
2080 * <p>Only available if faceDetectMode != OFF</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002081 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002082 */
2083 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
2084 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
2085
2086 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002087 * <p>List of the face confidence scores for
2088 * detected faces</p>
2089 * <p>Only available if faceDetectMode != OFF. The value should be
2090 * meaningful (for example, setting 100 at all times is illegal).</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002091 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002092 */
2093 public static final Key<byte[]> STATISTICS_FACE_SCORES =
2094 new Key<byte[]>("android.statistics.faceScores", byte[].class);
2095
2096 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002097 * <p>The shading map is a low-resolution floating-point map
2098 * that lists the coefficients used to correct for vignetting, for each
2099 * Bayer color channel.</p>
2100 * <p>The least shaded section of the image should have a gain factor
2101 * of 1; all other sections should have gains above 1.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002102 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Igor Murashkinace5bf02013-12-10 17:36:40 -08002103 * must take into account the colorCorrection settings.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002104 * <p>The shading map is for the entire active pixel array, and is not
2105 * affected by the crop region specified in the request. Each shading map
2106 * entry is the value of the shading compensation map over a specific
2107 * pixel on the sensor. Specifically, with a (N x M) resolution shading
2108 * map, and an active pixel array size (W x H), shading map entry
2109 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
2110 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
2111 * The map is assumed to be bilinearly interpolated between the sample points.</p>
2112 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
2113 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
2114 * The shading map is stored in a fully interleaved format, and its size
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002115 * 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 -08002116 * <p>The shading map should have on the order of 30-40 rows and columns,
2117 * and must be smaller than 64x64.</p>
2118 * <p>As an example, given a very small map defined as:</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002119 * <pre><code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]
2120 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} =
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002121 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002122 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
2123 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
2124 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
2125 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
2126 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002127 * </code></pre>
2128 * <p>The low-resolution scaling map images for each channel are
2129 * (displayed using nearest-neighbor interpolation):</p>
2130 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
2131 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
2132 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
2133 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
2134 * <p>As a visualization only, inverting the full-color map to recover an
2135 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
2136 * <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 -08002137 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08002138 * @see CaptureRequest#COLOR_CORRECTION_MODE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002139 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002140 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002141 */
2142 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
2143 new Key<float[]>("android.statistics.lensShadingMap", float[].class);
2144
2145 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002146 * <p>The best-fit color channel gains calculated
Zhijun Hecc28a412014-02-24 15:11:23 -08002147 * by the camera device's statistics units for the current output frame.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002148 * <p>This may be different than the gains used for this frame,
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002149 * since statistics processing on data from a new frame
2150 * typically completes after the transform has already been
Igor Murashkinace5bf02013-12-10 17:36:40 -08002151 * applied to that frame.</p>
2152 * <p>The 4 channel gains are defined in Bayer domain,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002153 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002154 * <p>This value should always be calculated by the AWB block,
2155 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002156 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002157 *
2158 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002159 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002160 */
2161 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
2162 new Key<float[]>("android.statistics.predictedColorGains", float[].class);
2163
2164 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002165 * <p>The best-fit color transform matrix estimate
Zhijun Hecc28a412014-02-24 15:11:23 -08002166 * calculated by the camera device's statistics units for the current
2167 * output frame.</p>
2168 * <p>The camera device will provide the estimate from its
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002169 * statistics unit on the white balance transforms to use
Zhijun Hecc28a412014-02-24 15:11:23 -08002170 * for the next frame. These are the values the camera device believes
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002171 * are the best fit for the current output frame. This may
2172 * be different than the transform used for this frame, since
2173 * statistics processing on data from a new frame typically
2174 * completes after the transform has already been applied to
Igor Murashkinace5bf02013-12-10 17:36:40 -08002175 * that frame.</p>
2176 * <p>These estimates must be provided for all frames, even if
2177 * capture settings and color transforms are set by the application.</p>
2178 * <p>This value should always be calculated by the AWB block,
2179 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002180 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2181 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002182 */
2183 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
2184 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
2185
2186 /**
Zhijun He208fb6c2014-02-03 13:09:06 -08002187 * <p>The camera device estimated scene illumination lighting
2188 * frequency.</p>
2189 * <p>Many light sources, such as most fluorescent lights, flicker at a rate
2190 * that depends on the local utility power standards. This flicker must be
2191 * accounted for by auto-exposure routines to avoid artifacts in captured images.
2192 * The camera device uses this entry to tell the application what the scene
2193 * illuminant frequency is.</p>
2194 * <p>When manual exposure control is enabled
2195 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == OFF</code>),
2196 * the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't do the antibanding, and the
2197 * application can ensure it selects exposure times that do not cause banding
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002198 * issues by looking into this metadata field. See {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}
Zhijun He208fb6c2014-02-03 13:09:06 -08002199 * for more details.</p>
2200 * <p>Report NONE if there doesn't appear to be flickering illumination.</p>
2201 *
2202 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2203 * @see CaptureRequest#CONTROL_AE_MODE
2204 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002205 * @see #STATISTICS_SCENE_FLICKER_NONE
2206 * @see #STATISTICS_SCENE_FLICKER_50HZ
2207 * @see #STATISTICS_SCENE_FLICKER_60HZ
2208 */
2209 public static final Key<Integer> STATISTICS_SCENE_FLICKER =
2210 new Key<Integer>("android.statistics.sceneFlicker", int.class);
2211
2212 /**
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002213 * <p>Operating mode for hotpixel map generation.</p>
2214 * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
2215 * If set to OFF, no hotpixel map should be returned.</p>
2216 * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
2217 *
2218 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
2219 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
2220 */
2221 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
2222 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
2223
2224 /**
2225 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
2226 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
2227 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
2228 * bottom-right of the pixel array, respectively. The width and
2229 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
2230 * This may include hot pixels that lie outside of the active array
2231 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2232 *
2233 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2234 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
2235 */
2236 public static final Key<int[]> STATISTICS_HOT_PIXEL_MAP =
2237 new Key<int[]>("android.statistics.hotPixelMap", int[].class);
2238
2239 /**
Zhijun He379af012014-05-06 11:54:54 -07002240 * <p>Whether the camera device will output the lens
2241 * shading map in output result metadata.</p>
2242 * <p>When set to ON,
2243 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} must be provided in
2244 * the output result metadata.</p>
2245 *
2246 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
2247 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
2248 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
2249 */
2250 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
2251 new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
2252
2253 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002254 * <p>Tonemapping / contrast / gamma curve for the blue
Igor Murashkine0060932014-01-17 17:24:11 -08002255 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2256 * CONTRAST_CURVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002257 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
2258 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002259 * @see CaptureRequest#TONEMAP_CURVE_RED
Zhijun He5f2a47f2014-01-16 15:44:41 -08002260 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002261 */
Zhijun He3ffd7052013-08-19 15:45:08 -07002262 public static final Key<float[]> TONEMAP_CURVE_BLUE =
2263 new Key<float[]>("android.tonemap.curveBlue", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002264
2265 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002266 * <p>Tonemapping / contrast / gamma curve for the green
Igor Murashkine0060932014-01-17 17:24:11 -08002267 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2268 * CONTRAST_CURVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002269 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
2270 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002271 * @see CaptureRequest#TONEMAP_CURVE_RED
Zhijun He5f2a47f2014-01-16 15:44:41 -08002272 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002273 */
Zhijun He3ffd7052013-08-19 15:45:08 -07002274 public static final Key<float[]> TONEMAP_CURVE_GREEN =
2275 new Key<float[]>("android.tonemap.curveGreen", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002276
2277 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002278 * <p>Tonemapping / contrast / gamma curve for the red
Igor Murashkine0060932014-01-17 17:24:11 -08002279 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2280 * CONTRAST_CURVE.</p>
2281 * <p>Each channel's curve is defined by an array of control points:</p>
2282 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} =
2283 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He870922b2014-02-15 21:47:51 -08002284 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
Igor Murashkine0060932014-01-17 17:24:11 -08002285 * <p>These are sorted in order of increasing <code>Pin</code>; it is always
2286 * guaranteed that input values 0.0 and 1.0 are included in the list to
2287 * define a complete mapping. For input values between control points,
2288 * the camera device must linearly interpolate between the control
2289 * points.</p>
2290 * <p>Each curve can have an independent number of points, and the number
2291 * of points can be less than max (that is, the request doesn't have to
2292 * always provide a curve with number of points equivalent to
2293 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
2294 * <p>A few examples, and their corresponding graphical mappings; these
2295 * only specify the red channel and the precision is limited to 4
2296 * digits, for conciseness.</p>
2297 * <p>Linear mapping:</p>
2298 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 0, 1.0, 1.0 ]
2299 * </code></pre>
2300 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
2301 * <p>Invert mapping:</p>
2302 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 1.0, 1.0, 0 ]
2303 * </code></pre>
2304 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
2305 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
2306 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
2307 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
2308 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
2309 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
2310 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
2311 * </code></pre>
2312 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
2313 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
2314 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
2315 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
2316 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
2317 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
2318 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
2319 * </code></pre>
2320 * <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 -08002321 *
Igor Murashkine0060932014-01-17 17:24:11 -08002322 * @see CaptureRequest#TONEMAP_CURVE_RED
2323 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002324 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002325 */
2326 public static final Key<float[]> TONEMAP_CURVE_RED =
2327 new Key<float[]>("android.tonemap.curveRed", float[].class);
2328
2329 /**
Igor Murashkine0060932014-01-17 17:24:11 -08002330 * <p>High-level global contrast/gamma/tonemapping control.</p>
2331 * <p>When switching to an application-defined contrast curve by setting
2332 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
2333 * per-channel with a set of <code>(in, out)</code> points that specify the
2334 * mapping from input high-bit-depth pixel value to the output
2335 * low-bit-depth value. Since the actual pixel ranges of both input
2336 * and output may change depending on the camera pipeline, the values
2337 * are specified by normalized floating-point numbers.</p>
2338 * <p>More-complex color mapping operations such as 3D color look-up
2339 * tables, selective chroma enhancement, or other non-linear color
2340 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2341 * CONTRAST_CURVE.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002342 * <p>This must be set to a valid mode in
2343 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002344 * <p>When using either FAST or HIGH_QUALITY, the camera device will
2345 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed},
2346 * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, and {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.
2347 * These values are always available, and as close as possible to the
2348 * actually used nonlinear/nonglobal transforms.</p>
2349 * <p>If a request is sent with TRANSFORM_MATRIX with the camera device's
2350 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
2351 * roughly the same.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002352 *
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002353 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
Igor Murashkine0060932014-01-17 17:24:11 -08002354 * @see CaptureRequest#TONEMAP_CURVE_BLUE
2355 * @see CaptureRequest#TONEMAP_CURVE_GREEN
2356 * @see CaptureRequest#TONEMAP_CURVE_RED
2357 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002358 * @see #TONEMAP_MODE_CONTRAST_CURVE
2359 * @see #TONEMAP_MODE_FAST
2360 * @see #TONEMAP_MODE_HIGH_QUALITY
2361 */
2362 public static final Key<Integer> TONEMAP_MODE =
2363 new Key<Integer>("android.tonemap.mode", int.class);
2364
2365 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002366 * <p>This LED is nominally used to indicate to the user
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002367 * that the camera is powered on and may be streaming images back to the
2368 * Application Processor. In certain rare circumstances, the OS may
2369 * disable this when video is processed locally and not transmitted to
Igor Murashkinace5bf02013-12-10 17:36:40 -08002370 * any untrusted applications.</p>
2371 * <p>In particular, the LED <em>must</em> always be on when the data could be
2372 * transmitted off the device. The LED <em>should</em> always be on whenever
2373 * data is stored locally on the device.</p>
2374 * <p>The LED <em>may</em> be off if a trusted application is using the data that
2375 * doesn't violate the above rules.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002376 * @hide
2377 */
2378 public static final Key<Boolean> LED_TRANSMIT =
2379 new Key<Boolean>("android.led.transmit", boolean.class);
2380
2381 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002382 * <p>Whether black-level compensation is locked
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08002383 * to its current values, or is free to vary.</p>
2384 * <p>Whether the black level offset was locked for this frame. Should be
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002385 * 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 -08002386 * a change in other capture settings forced the camera device to
2387 * perform a black level reset.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002388 *
2389 * @see CaptureRequest#BLACK_LEVEL_LOCK
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002390 */
2391 public static final Key<Boolean> BLACK_LEVEL_LOCK =
2392 new Key<Boolean>("android.blackLevel.lock", boolean.class);
2393
Igor Murashkin3865a842014-01-17 18:18:39 -08002394 /**
2395 * <p>The frame number corresponding to the last request
2396 * with which the output result (metadata + buffers) has been fully
2397 * synchronized.</p>
2398 * <p>When a request is submitted to the camera device, there is usually a
2399 * delay of several frames before the controls get applied. A camera
2400 * device may either choose to account for this delay by implementing a
2401 * pipeline and carefully submit well-timed atomic control updates, or
2402 * it may start streaming control changes that span over several frame
2403 * boundaries.</p>
2404 * <p>In the latter case, whenever a request's settings change relative to
2405 * the previous submitted request, the full set of changes may take
2406 * multiple frame durations to fully take effect. Some settings may
2407 * take effect sooner (in less frame durations) than others.</p>
2408 * <p>While a set of control changes are being propagated, this value
2409 * will be CONVERGING.</p>
2410 * <p>Once it is fully known that a set of control changes have been
2411 * finished propagating, and the resulting updated control settings
2412 * have been read back by the camera device, this value will be set
2413 * to a non-negative frame number (corresponding to the request to
2414 * which the results have synchronized to).</p>
2415 * <p>Older camera device implementations may not have a way to detect
2416 * when all camera controls have been applied, and will always set this
2417 * value to UNKNOWN.</p>
2418 * <p>FULL capability devices will always have this value set to the
2419 * frame number of the request corresponding to this result.</p>
2420 * <p><em>Further details</em>:</p>
2421 * <ul>
2422 * <li>Whenever a request differs from the last request, any future
2423 * results not yet returned may have this value set to CONVERGING (this
2424 * could include any in-progress captures not yet returned by the camera
2425 * device, for more details see pipeline considerations below).</li>
2426 * <li>Submitting a series of multiple requests that differ from the
2427 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
2428 * moves the new synchronization frame to the last non-repeating
2429 * request (using the smallest frame number from the contiguous list of
2430 * repeating requests).</li>
2431 * <li>Submitting the same request repeatedly will not change this value
2432 * to CONVERGING, if it was already a non-negative value.</li>
2433 * <li>When this value changes to non-negative, that means that all of the
2434 * metadata controls from the request have been applied, all of the
2435 * metadata controls from the camera device have been read to the
2436 * updated values (into the result), and all of the graphics buffers
2437 * corresponding to this result are also synchronized to the request.</li>
2438 * </ul>
2439 * <p><em>Pipeline considerations</em>:</p>
2440 * <p>Submitting a request with updated controls relative to the previously
2441 * submitted requests may also invalidate the synchronization state
2442 * of all the results corresponding to currently in-flight requests.</p>
2443 * <p>In other words, results for this current request and up to
2444 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
2445 * android.sync.frameNumber change to CONVERGING.</p>
2446 *
2447 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
2448 * @see #SYNC_FRAME_NUMBER_CONVERGING
2449 * @see #SYNC_FRAME_NUMBER_UNKNOWN
2450 * @hide
2451 */
Zhijun He4f91e2a2014-04-17 13:20:21 -07002452 public static final Key<Long> SYNC_FRAME_NUMBER =
2453 new Key<Long>("android.sync.frameNumber", long.class);
Igor Murashkin3865a842014-01-17 18:18:39 -08002454
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002455 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2456 * End generated code
2457 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkinb779ac12013-09-05 12:40:19 -07002458
2459 /**
2460 * <p>
2461 * List of the {@link Face Faces} detected through camera face detection
2462 * in this result.
2463 * </p>
2464 * <p>
2465 * Only available if {@link #STATISTICS_FACE_DETECT_MODE} {@code !=}
2466 * {@link CameraMetadata#STATISTICS_FACE_DETECT_MODE_OFF OFF}.
2467 * </p>
2468 *
2469 * @see Face
2470 */
2471 public static final Key<Face[]> STATISTICS_FACES =
2472 new Key<Face[]>("android.statistics.faces", Face[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002473}