blob: 9ac855f0ce9287bcac878d67f104004f5d249103 [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
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700278 * compensation of -1 EV. Note that this control will only be effective
279 * if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control will take effect even when
280 * {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p>
281 * <p>In the event of exposure compensation value being changed, camera device
282 * may take several frames to reach the newly requested exposure target.
283 * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING
284 * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
285 * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
286 * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
287 *
288 * @see CaptureRequest#CONTROL_AE_LOCK
289 * @see CaptureRequest#CONTROL_AE_MODE
290 * @see CaptureResult#CONTROL_AE_STATE
Zhijun He379af012014-05-06 11:54:54 -0700291 */
292 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION =
293 new Key<Integer>("android.control.aeExposureCompensation", int.class);
294
295 /**
296 * <p>Whether AE is currently locked to its latest
297 * calculated values.</p>
298 * <p>Note that even when AE is locked, the flash may be
299 * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
300 * ON_AUTO_FLASH_REDEYE.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700301 * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
302 * is ON, the camera device will still adjust its exposure value.</p>
Zhijun He379af012014-05-06 11:54:54 -0700303 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
304 * when AE is already locked, the camera device will not change the exposure time
305 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
306 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
307 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
308 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
309 * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
310 *
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700311 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Zhijun He379af012014-05-06 11:54:54 -0700312 * @see CaptureRequest#CONTROL_AE_MODE
313 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
314 * @see CaptureResult#CONTROL_AE_STATE
315 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
316 * @see CaptureRequest#SENSOR_SENSITIVITY
317 */
318 public static final Key<Boolean> CONTROL_AE_LOCK =
319 new Key<Boolean>("android.control.aeLock", boolean.class);
320
321 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800322 * <p>The desired mode for the camera device's
323 * auto-exposure routine.</p>
324 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
325 * AUTO.</p>
326 * <p>When set to any of the ON modes, the camera device's
327 * auto-exposure routine is enabled, overriding the
328 * application's selected exposure time, sensor sensitivity,
329 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
330 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
331 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
332 * is selected, the camera device's flash unit controls are
333 * also overridden.</p>
334 * <p>The FLASH modes are only available if the camera device
335 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
336 * <p>If flash TORCH mode is desired, this field must be set to
337 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
338 * <p>When set to any of the ON modes, the values chosen by the
339 * camera device auto-exposure routine for the overridden
340 * fields for a given capture will be available in its
341 * CaptureResult.</p>
342 *
Zhijun He5f2a47f2014-01-16 15:44:41 -0800343 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800344 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
345 * @see CaptureRequest#FLASH_MODE
Igor Murashkinaef3b7e2014-01-15 13:20:37 -0800346 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
347 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He399f05d2014-01-15 11:31:30 -0800348 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800349 * @see #CONTROL_AE_MODE_OFF
350 * @see #CONTROL_AE_MODE_ON
351 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
352 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
353 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
354 */
355 public static final Key<Integer> CONTROL_AE_MODE =
356 new Key<Integer>("android.control.aeMode", int.class);
357
358 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800359 * <p>List of areas to use for
Ruben Brunkf59521d2014-02-03 17:14:33 -0800360 * metering.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800361 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -0800362 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800363 * specified coordinates.</p>
364 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700365 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800366 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
367 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -0700368 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -0800369 * should be nonnegative.</p>
370 * <p>If all regions have 0 weight, then no specific metering area
Zhijun Hecc28a412014-02-24 15:11:23 -0800371 * needs to be used by the camera device. If the metering region is
372 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
373 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -0800374 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800375 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800376 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800377 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700378 */
379 public static final Key<int[]> CONTROL_AE_REGIONS =
380 new Key<int[]>("android.control.aeRegions", int[].class);
381
382 /**
Zhijun He379af012014-05-06 11:54:54 -0700383 * <p>Range over which fps can be adjusted to
384 * maintain exposure</p>
385 * <p>Only constrains AE algorithm, not manual control
386 * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
387 *
388 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
389 */
390 public static final Key<int[]> CONTROL_AE_TARGET_FPS_RANGE =
391 new Key<int[]>("android.control.aeTargetFpsRange", int[].class);
392
393 /**
394 * <p>Whether the camera device will trigger a precapture
395 * metering sequence when it processes this request.</p>
396 * <p>This entry is normally set to IDLE, or is not
397 * included at all in the request settings. When included and
398 * set to START, the camera device will trigger the autoexposure
399 * precapture metering sequence.</p>
400 * <p>The effect of AE precapture trigger depends on the current
401 * AE mode and state; see {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture
402 * state transition details.</p>
403 *
404 * @see CaptureResult#CONTROL_AE_STATE
405 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
406 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
407 */
408 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
409 new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
410
411 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800412 * <p>Current state of AE algorithm</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800413 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always
414 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
415 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
416 * the algorithm states to INACTIVE.</p>
417 * <p>The camera device can do several state transitions between two results, if it is
418 * allowed by the state transition table. For example: INACTIVE may never actually be
419 * seen in a result.</p>
420 * <p>The state in the result is the state for this image (in sync with this image): if
421 * AE state becomes CONVERGED, then the image data associated with this result should
422 * be good to use.</p>
423 * <p>Below are state transition tables for different AE modes.</p>
424 * <table>
425 * <thead>
426 * <tr>
427 * <th align="center">State</th>
428 * <th align="center">Transition Cause</th>
429 * <th align="center">New State</th>
430 * <th align="center">Notes</th>
431 * </tr>
432 * </thead>
433 * <tbody>
434 * <tr>
435 * <td align="center">INACTIVE</td>
436 * <td align="center"></td>
437 * <td align="center">INACTIVE</td>
438 * <td align="center">Camera device auto exposure algorithm is disabled</td>
439 * </tr>
440 * </tbody>
441 * </table>
442 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p>
443 * <table>
444 * <thead>
445 * <tr>
446 * <th align="center">State</th>
447 * <th align="center">Transition Cause</th>
448 * <th align="center">New State</th>
449 * <th align="center">Notes</th>
450 * </tr>
451 * </thead>
452 * <tbody>
453 * <tr>
454 * <td align="center">INACTIVE</td>
455 * <td align="center">Camera device initiates AE scan</td>
456 * <td align="center">SEARCHING</td>
457 * <td align="center">Values changing</td>
458 * </tr>
459 * <tr>
460 * <td align="center">INACTIVE</td>
461 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
462 * <td align="center">LOCKED</td>
463 * <td align="center">Values locked</td>
464 * </tr>
465 * <tr>
466 * <td align="center">SEARCHING</td>
467 * <td align="center">Camera device finishes AE scan</td>
468 * <td align="center">CONVERGED</td>
469 * <td align="center">Good values, not changing</td>
470 * </tr>
471 * <tr>
472 * <td align="center">SEARCHING</td>
473 * <td align="center">Camera device finishes AE scan</td>
474 * <td align="center">FLASH_REQUIRED</td>
475 * <td align="center">Converged but too dark w/o flash</td>
476 * </tr>
477 * <tr>
478 * <td align="center">SEARCHING</td>
479 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
480 * <td align="center">LOCKED</td>
481 * <td align="center">Values locked</td>
482 * </tr>
483 * <tr>
484 * <td align="center">CONVERGED</td>
485 * <td align="center">Camera device initiates AE scan</td>
486 * <td align="center">SEARCHING</td>
487 * <td align="center">Values changing</td>
488 * </tr>
489 * <tr>
490 * <td align="center">CONVERGED</td>
491 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
492 * <td align="center">LOCKED</td>
493 * <td align="center">Values locked</td>
494 * </tr>
495 * <tr>
496 * <td align="center">FLASH_REQUIRED</td>
497 * <td align="center">Camera device initiates AE scan</td>
498 * <td align="center">SEARCHING</td>
499 * <td align="center">Values changing</td>
500 * </tr>
501 * <tr>
502 * <td align="center">FLASH_REQUIRED</td>
503 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
504 * <td align="center">LOCKED</td>
505 * <td align="center">Values locked</td>
506 * </tr>
507 * <tr>
508 * <td align="center">LOCKED</td>
509 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
510 * <td align="center">SEARCHING</td>
511 * <td align="center">Values not good after unlock</td>
512 * </tr>
513 * <tr>
514 * <td align="center">LOCKED</td>
515 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
516 * <td align="center">CONVERGED</td>
517 * <td align="center">Values good after unlock</td>
518 * </tr>
519 * <tr>
520 * <td align="center">LOCKED</td>
521 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
522 * <td align="center">FLASH_REQUIRED</td>
523 * <td align="center">Exposure good, but too dark</td>
524 * </tr>
525 * <tr>
526 * <td align="center">PRECAPTURE</td>
527 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
528 * <td align="center">CONVERGED</td>
529 * <td align="center">Ready for high-quality capture</td>
530 * </tr>
531 * <tr>
532 * <td align="center">PRECAPTURE</td>
533 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
534 * <td align="center">LOCKED</td>
535 * <td align="center">Ready for high-quality capture</td>
536 * </tr>
537 * <tr>
538 * <td align="center">Any state</td>
539 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td>
540 * <td align="center">PRECAPTURE</td>
541 * <td align="center">Start AE precapture metering sequence</td>
542 * </tr>
543 * </tbody>
544 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800545 * <p>For the above table, the camera device may skip reporting any state changes that happen
546 * without application intervention (i.e. mode switch, trigger, locking). Any state that
547 * can be skipped in that manner is called a transient state.</p>
548 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
549 * listed in above table, it is also legal for the camera device to skip one or more
550 * transient states between two results. See below table for examples:</p>
551 * <table>
552 * <thead>
553 * <tr>
554 * <th align="center">State</th>
555 * <th align="center">Transition Cause</th>
556 * <th align="center">New State</th>
557 * <th align="center">Notes</th>
558 * </tr>
559 * </thead>
560 * <tbody>
561 * <tr>
562 * <td align="center">INACTIVE</td>
563 * <td align="center">Camera device finished AE scan</td>
564 * <td align="center">CONVERGED</td>
565 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
566 * </tr>
567 * <tr>
568 * <td align="center">Any state</td>
569 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
570 * <td align="center">FLASH_REQUIRED</td>
571 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
572 * </tr>
573 * <tr>
574 * <td align="center">Any state</td>
575 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
576 * <td align="center">CONVERGED</td>
577 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
578 * </tr>
579 * <tr>
580 * <td align="center">CONVERGED</td>
581 * <td align="center">Camera device finished AE scan</td>
582 * <td align="center">FLASH_REQUIRED</td>
583 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
584 * </tr>
585 * <tr>
586 * <td align="center">FLASH_REQUIRED</td>
587 * <td align="center">Camera device finished AE scan</td>
588 * <td align="center">CONVERGED</td>
589 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
590 * </tr>
591 * </tbody>
592 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -0800593 *
594 * @see CaptureRequest#CONTROL_AE_LOCK
595 * @see CaptureRequest#CONTROL_AE_MODE
596 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
597 * @see CaptureRequest#CONTROL_MODE
598 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700599 * @see #CONTROL_AE_STATE_INACTIVE
600 * @see #CONTROL_AE_STATE_SEARCHING
601 * @see #CONTROL_AE_STATE_CONVERGED
602 * @see #CONTROL_AE_STATE_LOCKED
603 * @see #CONTROL_AE_STATE_FLASH_REQUIRED
604 * @see #CONTROL_AE_STATE_PRECAPTURE
605 */
606 public static final Key<Integer> CONTROL_AE_STATE =
607 new Key<Integer>("android.control.aeState", int.class);
608
609 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800610 * <p>Whether AF is currently enabled, and what
611 * mode it is set to</p>
Zhijun Hecc28a412014-02-24 15:11:23 -0800612 * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus
613 * (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 -0800614 * <p>If the lens is controlled by the camera device auto-focus algorithm,
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800615 * 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 -0800616 * in result metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800617 *
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800618 * @see CaptureResult#CONTROL_AF_STATE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800619 * @see CaptureRequest#CONTROL_MODE
Zhijun Hecc28a412014-02-24 15:11:23 -0800620 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700621 * @see #CONTROL_AF_MODE_OFF
622 * @see #CONTROL_AF_MODE_AUTO
623 * @see #CONTROL_AF_MODE_MACRO
624 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
625 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
626 * @see #CONTROL_AF_MODE_EDOF
627 */
628 public static final Key<Integer> CONTROL_AF_MODE =
629 new Key<Integer>("android.control.afMode", int.class);
630
631 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800632 * <p>List of areas to use for focus
Ruben Brunkf59521d2014-02-03 17:14:33 -0800633 * estimation.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800634 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -0800635 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -0800636 * specified coordinates.</p>
637 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700638 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800639 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
640 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -0700641 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -0800642 * should be nonnegative.</p>
643 * <p>If all regions have 0 weight, then no specific focus area
Zhijun Hecc28a412014-02-24 15:11:23 -0800644 * needs to be used by the camera device. If the focusing region is
645 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
646 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -0800647 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800648 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800649 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800650 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700651 */
652 public static final Key<int[]> CONTROL_AF_REGIONS =
653 new Key<int[]>("android.control.afRegions", int[].class);
654
655 /**
Zhijun He379af012014-05-06 11:54:54 -0700656 * <p>Whether the camera device will trigger autofocus for this request.</p>
657 * <p>This entry is normally set to IDLE, or is not
658 * included at all in the request settings.</p>
659 * <p>When included and set to START, the camera device will trigger the
660 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
661 * <p>When set to CANCEL, the camera device will cancel any active trigger,
662 * and return to its initial AF state.</p>
663 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what that means for each AF mode.</p>
664 *
665 * @see CaptureResult#CONTROL_AF_STATE
666 * @see #CONTROL_AF_TRIGGER_IDLE
667 * @see #CONTROL_AF_TRIGGER_START
668 * @see #CONTROL_AF_TRIGGER_CANCEL
669 */
670 public static final Key<Integer> CONTROL_AF_TRIGGER =
671 new Key<Integer>("android.control.afTrigger", int.class);
672
673 /**
Zhijun He60b19dc2014-02-24 10:19:20 -0800674 * <p>Current state of AF algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800675 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
676 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
677 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
678 * the algorithm states to INACTIVE.</p>
679 * <p>The camera device can do several state transitions between two results, if it is
680 * allowed by the state transition table. For example: INACTIVE may never actually be
681 * seen in a result.</p>
682 * <p>The state in the result is the state for this image (in sync with this image): if
683 * AF state becomes FOCUSED, then the image data associated with this result should
684 * be sharp.</p>
685 * <p>Below are state transition tables for different AF modes.</p>
686 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p>
687 * <table>
688 * <thead>
689 * <tr>
690 * <th align="center">State</th>
691 * <th align="center">Transition Cause</th>
692 * <th align="center">New State</th>
693 * <th align="center">Notes</th>
694 * </tr>
695 * </thead>
696 * <tbody>
697 * <tr>
698 * <td align="center">INACTIVE</td>
699 * <td align="center"></td>
700 * <td align="center">INACTIVE</td>
701 * <td align="center">Never changes</td>
702 * </tr>
703 * </tbody>
704 * </table>
705 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p>
706 * <table>
707 * <thead>
708 * <tr>
709 * <th align="center">State</th>
710 * <th align="center">Transition Cause</th>
711 * <th align="center">New State</th>
712 * <th align="center">Notes</th>
713 * </tr>
714 * </thead>
715 * <tbody>
716 * <tr>
717 * <td align="center">INACTIVE</td>
718 * <td align="center">AF_TRIGGER</td>
719 * <td align="center">ACTIVE_SCAN</td>
720 * <td align="center">Start AF sweep, Lens now moving</td>
721 * </tr>
722 * <tr>
723 * <td align="center">ACTIVE_SCAN</td>
724 * <td align="center">AF sweep done</td>
725 * <td align="center">FOCUSED_LOCKED</td>
726 * <td align="center">Focused, Lens now locked</td>
727 * </tr>
728 * <tr>
729 * <td align="center">ACTIVE_SCAN</td>
730 * <td align="center">AF sweep done</td>
731 * <td align="center">NOT_FOCUSED_LOCKED</td>
732 * <td align="center">Not focused, Lens now locked</td>
733 * </tr>
734 * <tr>
735 * <td align="center">ACTIVE_SCAN</td>
736 * <td align="center">AF_CANCEL</td>
737 * <td align="center">INACTIVE</td>
738 * <td align="center">Cancel/reset AF, Lens now locked</td>
739 * </tr>
740 * <tr>
741 * <td align="center">FOCUSED_LOCKED</td>
742 * <td align="center">AF_CANCEL</td>
743 * <td align="center">INACTIVE</td>
744 * <td align="center">Cancel/reset AF</td>
745 * </tr>
746 * <tr>
747 * <td align="center">FOCUSED_LOCKED</td>
748 * <td align="center">AF_TRIGGER</td>
749 * <td align="center">ACTIVE_SCAN</td>
750 * <td align="center">Start new sweep, Lens now moving</td>
751 * </tr>
752 * <tr>
753 * <td align="center">NOT_FOCUSED_LOCKED</td>
754 * <td align="center">AF_CANCEL</td>
755 * <td align="center">INACTIVE</td>
756 * <td align="center">Cancel/reset AF</td>
757 * </tr>
758 * <tr>
759 * <td align="center">NOT_FOCUSED_LOCKED</td>
760 * <td align="center">AF_TRIGGER</td>
761 * <td align="center">ACTIVE_SCAN</td>
762 * <td align="center">Start new sweep, Lens now moving</td>
763 * </tr>
764 * <tr>
765 * <td align="center">Any state</td>
766 * <td align="center">Mode change</td>
767 * <td align="center">INACTIVE</td>
768 * <td align="center"></td>
769 * </tr>
770 * </tbody>
771 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800772 * <p>For the above table, the camera device may skip reporting any state changes that happen
773 * without application intervention (i.e. mode switch, trigger, locking). Any state that
774 * can be skipped in that manner is called a transient state.</p>
775 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
776 * state transitions listed in above table, it is also legal for the camera device to skip
777 * one or more transient states between two results. See below table for examples:</p>
778 * <table>
779 * <thead>
780 * <tr>
781 * <th align="center">State</th>
782 * <th align="center">Transition Cause</th>
783 * <th align="center">New State</th>
784 * <th align="center">Notes</th>
785 * </tr>
786 * </thead>
787 * <tbody>
788 * <tr>
789 * <td align="center">INACTIVE</td>
790 * <td align="center">AF_TRIGGER</td>
791 * <td align="center">FOCUSED_LOCKED</td>
792 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
793 * </tr>
794 * <tr>
795 * <td align="center">INACTIVE</td>
796 * <td align="center">AF_TRIGGER</td>
797 * <td align="center">NOT_FOCUSED_LOCKED</td>
798 * <td align="center">Focus failed after a scan, lens is now locked.</td>
799 * </tr>
800 * <tr>
801 * <td align="center">FOCUSED_LOCKED</td>
802 * <td align="center">AF_TRIGGER</td>
803 * <td align="center">FOCUSED_LOCKED</td>
804 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
805 * </tr>
806 * <tr>
807 * <td align="center">NOT_FOCUSED_LOCKED</td>
808 * <td align="center">AF_TRIGGER</td>
809 * <td align="center">FOCUSED_LOCKED</td>
810 * <td align="center">Focus is good after a scan, lens is not locked.</td>
811 * </tr>
812 * </tbody>
813 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -0800814 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
815 * <table>
816 * <thead>
817 * <tr>
818 * <th align="center">State</th>
819 * <th align="center">Transition Cause</th>
820 * <th align="center">New State</th>
821 * <th align="center">Notes</th>
822 * </tr>
823 * </thead>
824 * <tbody>
825 * <tr>
826 * <td align="center">INACTIVE</td>
827 * <td align="center">Camera device initiates new scan</td>
828 * <td align="center">PASSIVE_SCAN</td>
829 * <td align="center">Start AF scan, Lens now moving</td>
830 * </tr>
831 * <tr>
832 * <td align="center">INACTIVE</td>
833 * <td align="center">AF_TRIGGER</td>
834 * <td align="center">NOT_FOCUSED_LOCKED</td>
835 * <td align="center">AF state query, Lens now locked</td>
836 * </tr>
837 * <tr>
838 * <td align="center">PASSIVE_SCAN</td>
839 * <td align="center">Camera device completes current scan</td>
840 * <td align="center">PASSIVE_FOCUSED</td>
841 * <td align="center">End AF scan, Lens now locked</td>
842 * </tr>
843 * <tr>
844 * <td align="center">PASSIVE_SCAN</td>
845 * <td align="center">Camera device fails current scan</td>
846 * <td align="center">PASSIVE_UNFOCUSED</td>
847 * <td align="center">End AF scan, Lens now locked</td>
848 * </tr>
849 * <tr>
850 * <td align="center">PASSIVE_SCAN</td>
851 * <td align="center">AF_TRIGGER</td>
852 * <td align="center">FOCUSED_LOCKED</td>
853 * <td align="center">Immediate trans. If focus is good, Lens now locked</td>
854 * </tr>
855 * <tr>
856 * <td align="center">PASSIVE_SCAN</td>
857 * <td align="center">AF_TRIGGER</td>
858 * <td align="center">NOT_FOCUSED_LOCKED</td>
859 * <td align="center">Immediate trans. if focus is bad, Lens now locked</td>
860 * </tr>
861 * <tr>
862 * <td align="center">PASSIVE_SCAN</td>
863 * <td align="center">AF_CANCEL</td>
864 * <td align="center">INACTIVE</td>
865 * <td align="center">Reset lens position, Lens now locked</td>
866 * </tr>
867 * <tr>
868 * <td align="center">PASSIVE_FOCUSED</td>
869 * <td align="center">Camera device initiates new scan</td>
870 * <td align="center">PASSIVE_SCAN</td>
871 * <td align="center">Start AF scan, Lens now moving</td>
872 * </tr>
873 * <tr>
874 * <td align="center">PASSIVE_UNFOCUSED</td>
875 * <td align="center">Camera device initiates new scan</td>
876 * <td align="center">PASSIVE_SCAN</td>
877 * <td align="center">Start AF scan, Lens now moving</td>
878 * </tr>
879 * <tr>
880 * <td align="center">PASSIVE_FOCUSED</td>
881 * <td align="center">AF_TRIGGER</td>
882 * <td align="center">FOCUSED_LOCKED</td>
883 * <td align="center">Immediate trans. Lens now locked</td>
884 * </tr>
885 * <tr>
886 * <td align="center">PASSIVE_UNFOCUSED</td>
887 * <td align="center">AF_TRIGGER</td>
888 * <td align="center">NOT_FOCUSED_LOCKED</td>
889 * <td align="center">Immediate trans. Lens now locked</td>
890 * </tr>
891 * <tr>
892 * <td align="center">FOCUSED_LOCKED</td>
893 * <td align="center">AF_TRIGGER</td>
894 * <td align="center">FOCUSED_LOCKED</td>
895 * <td align="center">No effect</td>
896 * </tr>
897 * <tr>
898 * <td align="center">FOCUSED_LOCKED</td>
899 * <td align="center">AF_CANCEL</td>
900 * <td align="center">INACTIVE</td>
901 * <td align="center">Restart AF scan</td>
902 * </tr>
903 * <tr>
904 * <td align="center">NOT_FOCUSED_LOCKED</td>
905 * <td align="center">AF_TRIGGER</td>
906 * <td align="center">NOT_FOCUSED_LOCKED</td>
907 * <td align="center">No effect</td>
908 * </tr>
909 * <tr>
910 * <td align="center">NOT_FOCUSED_LOCKED</td>
911 * <td align="center">AF_CANCEL</td>
912 * <td align="center">INACTIVE</td>
913 * <td align="center">Restart AF scan</td>
914 * </tr>
915 * </tbody>
916 * </table>
917 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p>
918 * <table>
919 * <thead>
920 * <tr>
921 * <th align="center">State</th>
922 * <th align="center">Transition Cause</th>
923 * <th align="center">New State</th>
924 * <th align="center">Notes</th>
925 * </tr>
926 * </thead>
927 * <tbody>
928 * <tr>
929 * <td align="center">INACTIVE</td>
930 * <td align="center">Camera device initiates new scan</td>
931 * <td align="center">PASSIVE_SCAN</td>
932 * <td align="center">Start AF scan, Lens now moving</td>
933 * </tr>
934 * <tr>
935 * <td align="center">INACTIVE</td>
936 * <td align="center">AF_TRIGGER</td>
937 * <td align="center">NOT_FOCUSED_LOCKED</td>
938 * <td align="center">AF state query, Lens now locked</td>
939 * </tr>
940 * <tr>
941 * <td align="center">PASSIVE_SCAN</td>
942 * <td align="center">Camera device completes current scan</td>
943 * <td align="center">PASSIVE_FOCUSED</td>
944 * <td align="center">End AF scan, Lens now locked</td>
945 * </tr>
946 * <tr>
947 * <td align="center">PASSIVE_SCAN</td>
948 * <td align="center">Camera device fails current scan</td>
949 * <td align="center">PASSIVE_UNFOCUSED</td>
950 * <td align="center">End AF scan, Lens now locked</td>
951 * </tr>
952 * <tr>
953 * <td align="center">PASSIVE_SCAN</td>
954 * <td align="center">AF_TRIGGER</td>
955 * <td align="center">FOCUSED_LOCKED</td>
956 * <td align="center">Eventual trans. once focus good, Lens now locked</td>
957 * </tr>
958 * <tr>
959 * <td align="center">PASSIVE_SCAN</td>
960 * <td align="center">AF_TRIGGER</td>
961 * <td align="center">NOT_FOCUSED_LOCKED</td>
962 * <td align="center">Eventual trans. if cannot focus, Lens now locked</td>
963 * </tr>
964 * <tr>
965 * <td align="center">PASSIVE_SCAN</td>
966 * <td align="center">AF_CANCEL</td>
967 * <td align="center">INACTIVE</td>
968 * <td align="center">Reset lens position, Lens now locked</td>
969 * </tr>
970 * <tr>
971 * <td align="center">PASSIVE_FOCUSED</td>
972 * <td align="center">Camera device initiates new scan</td>
973 * <td align="center">PASSIVE_SCAN</td>
974 * <td align="center">Start AF scan, Lens now moving</td>
975 * </tr>
976 * <tr>
977 * <td align="center">PASSIVE_UNFOCUSED</td>
978 * <td align="center">Camera device initiates new scan</td>
979 * <td align="center">PASSIVE_SCAN</td>
980 * <td align="center">Start AF scan, Lens now moving</td>
981 * </tr>
982 * <tr>
983 * <td align="center">PASSIVE_FOCUSED</td>
984 * <td align="center">AF_TRIGGER</td>
985 * <td align="center">FOCUSED_LOCKED</td>
986 * <td align="center">Immediate trans. Lens now locked</td>
987 * </tr>
988 * <tr>
989 * <td align="center">PASSIVE_UNFOCUSED</td>
990 * <td align="center">AF_TRIGGER</td>
991 * <td align="center">NOT_FOCUSED_LOCKED</td>
992 * <td align="center">Immediate trans. Lens now locked</td>
993 * </tr>
994 * <tr>
995 * <td align="center">FOCUSED_LOCKED</td>
996 * <td align="center">AF_TRIGGER</td>
997 * <td align="center">FOCUSED_LOCKED</td>
998 * <td align="center">No effect</td>
999 * </tr>
1000 * <tr>
1001 * <td align="center">FOCUSED_LOCKED</td>
1002 * <td align="center">AF_CANCEL</td>
1003 * <td align="center">INACTIVE</td>
1004 * <td align="center">Restart AF scan</td>
1005 * </tr>
1006 * <tr>
1007 * <td align="center">NOT_FOCUSED_LOCKED</td>
1008 * <td align="center">AF_TRIGGER</td>
1009 * <td align="center">NOT_FOCUSED_LOCKED</td>
1010 * <td align="center">No effect</td>
1011 * </tr>
1012 * <tr>
1013 * <td align="center">NOT_FOCUSED_LOCKED</td>
1014 * <td align="center">AF_CANCEL</td>
1015 * <td align="center">INACTIVE</td>
1016 * <td align="center">Restart AF scan</td>
1017 * </tr>
1018 * </tbody>
1019 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001020 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1021 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1022 * camera device. When a trigger is included in a mode switch request, the trigger
1023 * will be evaluated in the context of the new mode in the request.
1024 * See below table for examples:</p>
1025 * <table>
1026 * <thead>
1027 * <tr>
1028 * <th align="center">State</th>
1029 * <th align="center">Transition Cause</th>
1030 * <th align="center">New State</th>
1031 * <th align="center">Notes</th>
1032 * </tr>
1033 * </thead>
1034 * <tbody>
1035 * <tr>
1036 * <td align="center">any state</td>
1037 * <td align="center">CAF--&gt;AUTO mode switch</td>
1038 * <td align="center">INACTIVE</td>
1039 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
1040 * </tr>
1041 * <tr>
1042 * <td align="center">any state</td>
1043 * <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
1044 * <td align="center">trigger-reachable states from INACTIVE</td>
1045 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
1046 * </tr>
1047 * <tr>
1048 * <td align="center">any state</td>
1049 * <td align="center">AUTO--&gt;CAF mode switch</td>
1050 * <td align="center">passively reachable states from INACTIVE</td>
1051 * <td align="center">Mode switch without trigger, passive transient state is skipped</td>
1052 * </tr>
1053 * </tbody>
1054 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -08001055 *
1056 * @see CaptureRequest#CONTROL_AF_MODE
1057 * @see CaptureRequest#CONTROL_MODE
1058 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001059 * @see #CONTROL_AF_STATE_INACTIVE
1060 * @see #CONTROL_AF_STATE_PASSIVE_SCAN
1061 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED
1062 * @see #CONTROL_AF_STATE_ACTIVE_SCAN
1063 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED
1064 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07001065 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001066 */
1067 public static final Key<Integer> CONTROL_AF_STATE =
1068 new Key<Integer>("android.control.afState", int.class);
1069
1070 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001071 * <p>The ID sent with the latest
1072 * CAMERA2_TRIGGER_AUTOFOCUS call</p>
1073 * <p>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001074 * received yet by HAL. Always updated even if AF algorithm
Igor Murashkinace5bf02013-12-10 17:36:40 -08001075 * ignores the trigger</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001076 * @hide
1077 */
1078 public static final Key<Integer> CONTROL_AF_TRIGGER_ID =
1079 new Key<Integer>("android.control.afTriggerId", int.class);
1080
1081 /**
Zhijun He379af012014-05-06 11:54:54 -07001082 * <p>Whether AWB is currently locked to its
1083 * latest calculated values.</p>
1084 * <p>Note that AWB lock is only meaningful for AUTO
1085 * mode; in other modes, AWB is already fixed to a specific
1086 * setting.</p>
1087 */
1088 public static final Key<Boolean> CONTROL_AWB_LOCK =
1089 new Key<Boolean>("android.control.awbLock", boolean.class);
1090
1091 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001092 * <p>Whether AWB is currently setting the color
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001093 * transform fields, and what its illumination target
Zhijun Hecc28a412014-02-24 15:11:23 -08001094 * is.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001095 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p>
1096 * <p>When set to the ON mode, the camera device's auto white balance
1097 * routine is enabled, overriding the application's selected
1098 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
1099 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
1100 * <p>When set to the OFF mode, the camera device's auto white balance
Zhijun Hecc28a412014-02-24 15:11:23 -08001101 * routine is disabled. The application manually controls the white
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001102 * 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 -08001103 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
1104 * <p>When set to any other modes, the camera device's auto white balance
1105 * routine is disabled. The camera device uses each particular illumination
1106 * target for white balance adjustment.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001107 *
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001108 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Zhijun He5f2a47f2014-01-16 15:44:41 -08001109 * @see CaptureRequest#COLOR_CORRECTION_MODE
1110 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001111 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001112 * @see #CONTROL_AWB_MODE_OFF
1113 * @see #CONTROL_AWB_MODE_AUTO
1114 * @see #CONTROL_AWB_MODE_INCANDESCENT
1115 * @see #CONTROL_AWB_MODE_FLUORESCENT
1116 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
1117 * @see #CONTROL_AWB_MODE_DAYLIGHT
1118 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
1119 * @see #CONTROL_AWB_MODE_TWILIGHT
1120 * @see #CONTROL_AWB_MODE_SHADE
1121 */
1122 public static final Key<Integer> CONTROL_AWB_MODE =
1123 new Key<Integer>("android.control.awbMode", int.class);
1124
1125 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001126 * <p>List of areas to use for illuminant
Ruben Brunkf59521d2014-02-03 17:14:33 -08001127 * estimation.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001128 * <p>Only used in AUTO mode.</p>
1129 * <p>Each area is a rectangle plus weight: xmin, ymin,
Ruben Brunkf59521d2014-02-03 17:14:33 -08001130 * xmax, ymax, weight. The rectangle is defined to be inclusive of the
Igor Murashkinace5bf02013-12-10 17:36:40 -08001131 * specified coordinates.</p>
1132 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001133 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001134 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1135 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Timothy Knight2629f272013-09-03 17:23:23 -07001136 * bottom-right pixel in the active pixel array. The weight
Igor Murashkinace5bf02013-12-10 17:36:40 -08001137 * should be nonnegative.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -08001138 * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area
1139 * needs to be used by the camera device. If the AWB region is
1140 * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
1141 * will ignore the sections outside the region and output the
Ruben Brunkf59521d2014-02-03 17:14:33 -08001142 * used sections in the frame metadata.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001143 *
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001144 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001145 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001146 */
1147 public static final Key<int[]> CONTROL_AWB_REGIONS =
1148 new Key<int[]>("android.control.awbRegions", int[].class);
1149
1150 /**
Zhijun He379af012014-05-06 11:54:54 -07001151 * <p>Information to the camera device 3A (auto-exposure,
1152 * auto-focus, auto-white balance) routines about the purpose
1153 * of this capture, to help the camera device to decide optimal 3A
1154 * strategy.</p>
1155 * <p>This control (except for MANUAL) is only effective if
1156 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
1157 * <p>ZERO_SHUTTER_LAG must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1158 * contains ZSL. MANUAL must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
1159 * contains MANUAL_SENSOR.</p>
1160 *
1161 * @see CaptureRequest#CONTROL_MODE
1162 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1163 * @see #CONTROL_CAPTURE_INTENT_CUSTOM
1164 * @see #CONTROL_CAPTURE_INTENT_PREVIEW
1165 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
1166 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
1167 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
1168 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
1169 * @see #CONTROL_CAPTURE_INTENT_MANUAL
1170 */
1171 public static final Key<Integer> CONTROL_CAPTURE_INTENT =
1172 new Key<Integer>("android.control.captureIntent", int.class);
1173
1174 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001175 * <p>Current state of AWB algorithm</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001176 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always
1177 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1178 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1179 * the algorithm states to INACTIVE.</p>
1180 * <p>The camera device can do several state transitions between two results, if it is
1181 * allowed by the state transition table. So INACTIVE may never actually be seen in
1182 * a result.</p>
1183 * <p>The state in the result is the state for this image (in sync with this image): if
1184 * AWB state becomes CONVERGED, then the image data associated with this result should
1185 * be good to use.</p>
1186 * <p>Below are state transition tables for different AWB modes.</p>
1187 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p>
1188 * <table>
1189 * <thead>
1190 * <tr>
1191 * <th align="center">State</th>
1192 * <th align="center">Transition Cause</th>
1193 * <th align="center">New State</th>
1194 * <th align="center">Notes</th>
1195 * </tr>
1196 * </thead>
1197 * <tbody>
1198 * <tr>
1199 * <td align="center">INACTIVE</td>
1200 * <td align="center"></td>
1201 * <td align="center">INACTIVE</td>
1202 * <td align="center">Camera device auto white balance algorithm is disabled</td>
1203 * </tr>
1204 * </tbody>
1205 * </table>
1206 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p>
1207 * <table>
1208 * <thead>
1209 * <tr>
1210 * <th align="center">State</th>
1211 * <th align="center">Transition Cause</th>
1212 * <th align="center">New State</th>
1213 * <th align="center">Notes</th>
1214 * </tr>
1215 * </thead>
1216 * <tbody>
1217 * <tr>
1218 * <td align="center">INACTIVE</td>
1219 * <td align="center">Camera device initiates AWB scan</td>
1220 * <td align="center">SEARCHING</td>
1221 * <td align="center">Values changing</td>
1222 * </tr>
1223 * <tr>
1224 * <td align="center">INACTIVE</td>
1225 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1226 * <td align="center">LOCKED</td>
1227 * <td align="center">Values locked</td>
1228 * </tr>
1229 * <tr>
1230 * <td align="center">SEARCHING</td>
1231 * <td align="center">Camera device finishes AWB scan</td>
1232 * <td align="center">CONVERGED</td>
1233 * <td align="center">Good values, not changing</td>
1234 * </tr>
1235 * <tr>
1236 * <td align="center">SEARCHING</td>
1237 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1238 * <td align="center">LOCKED</td>
1239 * <td align="center">Values locked</td>
1240 * </tr>
1241 * <tr>
1242 * <td align="center">CONVERGED</td>
1243 * <td align="center">Camera device initiates AWB scan</td>
1244 * <td align="center">SEARCHING</td>
1245 * <td align="center">Values changing</td>
1246 * </tr>
1247 * <tr>
1248 * <td align="center">CONVERGED</td>
1249 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1250 * <td align="center">LOCKED</td>
1251 * <td align="center">Values locked</td>
1252 * </tr>
1253 * <tr>
1254 * <td align="center">LOCKED</td>
1255 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1256 * <td align="center">SEARCHING</td>
1257 * <td align="center">Values not good after unlock</td>
1258 * </tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001259 * </tbody>
1260 * </table>
1261 * <p>For the above table, the camera device may skip reporting any state changes that happen
1262 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1263 * can be skipped in that manner is called a transient state.</p>
1264 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1265 * listed in above table, it is also legal for the camera device to skip one or more
1266 * transient states between two results. See below table for examples:</p>
1267 * <table>
1268 * <thead>
1269 * <tr>
1270 * <th align="center">State</th>
1271 * <th align="center">Transition Cause</th>
1272 * <th align="center">New State</th>
1273 * <th align="center">Notes</th>
1274 * </tr>
1275 * </thead>
1276 * <tbody>
1277 * <tr>
1278 * <td align="center">INACTIVE</td>
1279 * <td align="center">Camera device finished AWB scan</td>
1280 * <td align="center">CONVERGED</td>
1281 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1282 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001283 * <tr>
1284 * <td align="center">LOCKED</td>
1285 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1286 * <td align="center">CONVERGED</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001287 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001288 * </tr>
1289 * </tbody>
1290 * </table>
1291 *
1292 * @see CaptureRequest#CONTROL_AWB_LOCK
1293 * @see CaptureRequest#CONTROL_AWB_MODE
1294 * @see CaptureRequest#CONTROL_MODE
1295 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001296 * @see #CONTROL_AWB_STATE_INACTIVE
1297 * @see #CONTROL_AWB_STATE_SEARCHING
1298 * @see #CONTROL_AWB_STATE_CONVERGED
1299 * @see #CONTROL_AWB_STATE_LOCKED
1300 */
1301 public static final Key<Integer> CONTROL_AWB_STATE =
1302 new Key<Integer>("android.control.awbState", int.class);
1303
1304 /**
Zhijun He379af012014-05-06 11:54:54 -07001305 * <p>A special color effect to apply.</p>
1306 * <p>When this mode is set, a color effect will be applied
1307 * to images produced by the camera device. The interpretation
1308 * and implementation of these color effects is left to the
1309 * implementor of the camera device, and should not be
1310 * depended on to be consistent (or present) across all
1311 * devices.</p>
1312 * <p>A color effect will only be applied if
1313 * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
1314 *
1315 * @see CaptureRequest#CONTROL_MODE
1316 * @see #CONTROL_EFFECT_MODE_OFF
1317 * @see #CONTROL_EFFECT_MODE_MONO
1318 * @see #CONTROL_EFFECT_MODE_NEGATIVE
1319 * @see #CONTROL_EFFECT_MODE_SOLARIZE
1320 * @see #CONTROL_EFFECT_MODE_SEPIA
1321 * @see #CONTROL_EFFECT_MODE_POSTERIZE
1322 * @see #CONTROL_EFFECT_MODE_WHITEBOARD
1323 * @see #CONTROL_EFFECT_MODE_BLACKBOARD
1324 * @see #CONTROL_EFFECT_MODE_AQUA
1325 */
1326 public static final Key<Integer> CONTROL_EFFECT_MODE =
1327 new Key<Integer>("android.control.effectMode", int.class);
1328
1329 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001330 * <p>Overall mode of 3A control
Zhijun Hecc28a412014-02-24 15:11:23 -08001331 * routines.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001332 * <p>High-level 3A control. When set to OFF, all 3A control
Zhijun He5f2a47f2014-01-16 15:44:41 -08001333 * by the camera device is disabled. The application must set the fields for
Zhijun Hef3537422013-12-16 16:56:35 -08001334 * capture parameters itself.</p>
1335 * <p>When set to AUTO, the individual algorithm controls in
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001336 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001337 * <p>When set to USE_SCENE_MODE, the individual controls in
Zhijun He5f2a47f2014-01-16 15:44:41 -08001338 * android.control.* are mostly disabled, and the camera device implements
Zhijun Hef3537422013-12-16 16:56:35 -08001339 * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
Zhijun He5f2a47f2014-01-16 15:44:41 -08001340 * as it wishes. The camera device scene mode 3A settings are provided by
Zhijun Hef3537422013-12-16 16:56:35 -08001341 * android.control.sceneModeOverrides.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001342 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1343 * is that this frame will not be used by camera device background 3A statistics
1344 * update, as if this frame is never captured. This mode can be used in the scenario
1345 * where the application doesn't want a 3A manual control capture to affect
1346 * the subsequent auto 3A capture results.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001347 *
1348 * @see CaptureRequest#CONTROL_AF_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001349 * @see #CONTROL_MODE_OFF
1350 * @see #CONTROL_MODE_AUTO
1351 * @see #CONTROL_MODE_USE_SCENE_MODE
Zhijun He2d5e8972014-02-07 16:13:46 -08001352 * @see #CONTROL_MODE_OFF_KEEP_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001353 */
1354 public static final Key<Integer> CONTROL_MODE =
1355 new Key<Integer>("android.control.mode", int.class);
1356
1357 /**
Zhijun He379af012014-05-06 11:54:54 -07001358 * <p>A camera mode optimized for conditions typical in a particular
1359 * capture setting.</p>
1360 * <p>This is the mode that that is active when
1361 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
1362 * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
1363 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
1364 * <p>The interpretation and implementation of these scene modes is left
1365 * to the implementor of the camera device. Their behavior will not be
1366 * consistent across all devices, and any given device may only implement
1367 * a subset of these modes.</p>
1368 *
1369 * @see CaptureRequest#CONTROL_AE_MODE
1370 * @see CaptureRequest#CONTROL_AF_MODE
1371 * @see CaptureRequest#CONTROL_AWB_MODE
1372 * @see CaptureRequest#CONTROL_MODE
1373 * @see #CONTROL_SCENE_MODE_DISABLED
1374 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
1375 * @see #CONTROL_SCENE_MODE_ACTION
1376 * @see #CONTROL_SCENE_MODE_PORTRAIT
1377 * @see #CONTROL_SCENE_MODE_LANDSCAPE
1378 * @see #CONTROL_SCENE_MODE_NIGHT
1379 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
1380 * @see #CONTROL_SCENE_MODE_THEATRE
1381 * @see #CONTROL_SCENE_MODE_BEACH
1382 * @see #CONTROL_SCENE_MODE_SNOW
1383 * @see #CONTROL_SCENE_MODE_SUNSET
1384 * @see #CONTROL_SCENE_MODE_STEADYPHOTO
1385 * @see #CONTROL_SCENE_MODE_FIREWORKS
1386 * @see #CONTROL_SCENE_MODE_SPORTS
1387 * @see #CONTROL_SCENE_MODE_PARTY
1388 * @see #CONTROL_SCENE_MODE_CANDLELIGHT
1389 * @see #CONTROL_SCENE_MODE_BARCODE
1390 */
1391 public static final Key<Integer> CONTROL_SCENE_MODE =
1392 new Key<Integer>("android.control.sceneMode", int.class);
1393
1394 /**
1395 * <p>Whether video stabilization is
1396 * active</p>
1397 * <p>If enabled, video stabilization can modify the
1398 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream
1399 * stabilized</p>
1400 *
1401 * @see CaptureRequest#SCALER_CROP_REGION
1402 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF
1403 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON
1404 */
1405 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE =
1406 new Key<Integer>("android.control.videoStabilizationMode", int.class);
1407
1408 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001409 * <p>Operation mode for edge
Zhijun Hecc28a412014-02-24 15:11:23 -08001410 * enhancement.</p>
Zhijun He28079362013-12-17 10:35:40 -08001411 * <p>Edge/sharpness/detail enhancement. OFF means no
Zhijun Hecc28a412014-02-24 15:11:23 -08001412 * enhancement will be applied by the camera device.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001413 * <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 -08001414 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun He28079362013-12-17 10:35:40 -08001415 * will be applied. HIGH_QUALITY mode indicates that the
Zhijun He5f2a47f2014-01-16 15:44:41 -08001416 * camera device will use the highest-quality enhancement algorithms,
1417 * even if it slows down capture rate. FAST means the camera device will
Zhijun He28079362013-12-17 10:35:40 -08001418 * not slow down capture rate when applying edge enhancement.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001419 *
1420 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001421 * @see #EDGE_MODE_OFF
1422 * @see #EDGE_MODE_FAST
1423 * @see #EDGE_MODE_HIGH_QUALITY
1424 */
1425 public static final Key<Integer> EDGE_MODE =
1426 new Key<Integer>("android.edge.mode", int.class);
1427
1428 /**
Zhijun He66d065a2014-01-16 18:18:50 -08001429 * <p>The desired mode for for the camera device's flash control.</p>
1430 * <p>This control is only effective when flash unit is available
Zhijun He153ac102014-02-03 12:25:12 -08001431 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
Zhijun He66d065a2014-01-16 18:18:50 -08001432 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
1433 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
1434 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
1435 * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
1436 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
1437 * device's auto-exposure routine's result. When used in still capture case, this
1438 * control should be used along with AE precapture metering sequence
1439 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
1440 * <p>When set to TORCH, the flash will be on continuously. This mode can be used
1441 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08001442 * <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 -08001443 *
1444 * @see CaptureRequest#CONTROL_AE_MODE
1445 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1446 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Zhijun Heca1b73a2014-02-03 12:39:53 -08001447 * @see CaptureResult#FLASH_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001448 * @see #FLASH_MODE_OFF
1449 * @see #FLASH_MODE_SINGLE
1450 * @see #FLASH_MODE_TORCH
1451 */
1452 public static final Key<Integer> FLASH_MODE =
1453 new Key<Integer>("android.flash.mode", int.class);
1454
1455 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001456 * <p>Current state of the flash
Zhijun Heca1b73a2014-02-03 12:39:53 -08001457 * unit.</p>
1458 * <p>When the camera device doesn't have flash unit
1459 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
1460 * Other states indicate the current flash status.</p>
1461 *
1462 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001463 * @see #FLASH_STATE_UNAVAILABLE
1464 * @see #FLASH_STATE_CHARGING
1465 * @see #FLASH_STATE_READY
1466 * @see #FLASH_STATE_FIRED
Zhijun He8dda7272014-03-25 13:49:30 -07001467 * @see #FLASH_STATE_PARTIAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001468 */
1469 public static final Key<Integer> FLASH_STATE =
1470 new Key<Integer>("android.flash.state", int.class);
1471
1472 /**
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001473 * <p>Set operational mode for hot pixel correction.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001474 * <p>Valid modes for this camera device are listed in
1475 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001476 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
1477 * that do not accurately encode the incoming light (i.e. pixels that
1478 * are stuck at an arbitrary value).</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08001479 *
1480 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08001481 * @see #HOT_PIXEL_MODE_OFF
1482 * @see #HOT_PIXEL_MODE_FAST
1483 * @see #HOT_PIXEL_MODE_HIGH_QUALITY
1484 */
1485 public static final Key<Integer> HOT_PIXEL_MODE =
1486 new Key<Integer>("android.hotPixel.mode", int.class);
1487
1488 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001489 * <p>GPS coordinates to include in output JPEG
1490 * EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001491 */
1492 public static final Key<double[]> JPEG_GPS_COORDINATES =
1493 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
1494
1495 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001496 * <p>32 characters describing GPS algorithm to
1497 * include in EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001498 */
1499 public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
1500 new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
1501
1502 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001503 * <p>Time GPS fix was made to include in
1504 * EXIF</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001505 */
1506 public static final Key<Long> JPEG_GPS_TIMESTAMP =
1507 new Key<Long>("android.jpeg.gpsTimestamp", long.class);
1508
1509 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001510 * <p>Orientation of JPEG image to
1511 * write</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001512 */
1513 public static final Key<Integer> JPEG_ORIENTATION =
1514 new Key<Integer>("android.jpeg.orientation", int.class);
1515
1516 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001517 * <p>Compression quality of the final JPEG
1518 * image</p>
1519 * <p>85-95 is typical usage range</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001520 */
1521 public static final Key<Byte> JPEG_QUALITY =
1522 new Key<Byte>("android.jpeg.quality", byte.class);
1523
1524 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001525 * <p>Compression quality of JPEG
1526 * thumbnail</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001527 */
1528 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
1529 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
1530
1531 /**
Zhijun He5a9ff372013-12-26 11:49:09 -08001532 * <p>Resolution of embedded JPEG thumbnail</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001533 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
1534 * but the captured JPEG will still be a valid image.</p>
Zhijun He5a9ff372013-12-26 11:49:09 -08001535 * <p>When a jpeg image capture is issued, the thumbnail size selected should have
1536 * the same aspect ratio as the jpeg image.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001537 */
1538 public static final Key<android.hardware.camera2.Size> JPEG_THUMBNAIL_SIZE =
1539 new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
1540
1541 /**
Zhijun Hefb46c642014-01-14 17:57:23 -08001542 * <p>The ratio of lens focal length to the effective
1543 * aperture diameter.</p>
1544 * <p>This will only be supported on the camera devices that
1545 * have variable aperture lens. The aperture value can only be
1546 * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p>
1547 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
1548 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001549 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
Zhijun Hefb46c642014-01-14 17:57:23 -08001550 * to achieve manual exposure control.</p>
1551 * <p>The requested aperture value may take several frames to reach the
1552 * requested value; the camera device will report the current (intermediate)
Zhijun Heca1b73a2014-02-03 12:39:53 -08001553 * aperture size in capture result metadata while the aperture is changing.
1554 * 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 -08001555 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
1556 * the ON modes, this will be overridden by the camera device
1557 * auto-exposure algorithm, the overridden values are then provided
1558 * back to the user in the corresponding result.</p>
1559 *
Zhijun He399f05d2014-01-15 11:31:30 -08001560 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001561 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
Zhijun Heca1b73a2014-02-03 12:39:53 -08001562 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001563 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001564 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001565 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001566 */
1567 public static final Key<Float> LENS_APERTURE =
1568 new Key<Float>("android.lens.aperture", float.class);
1569
1570 /**
Ruben Brunk855bae42014-01-17 10:30:32 -08001571 * <p>State of lens neutral density filter(s).</p>
1572 * <p>This will not be supported on most camera devices. On devices
1573 * where this is supported, this may only be set to one of the
1574 * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p>
1575 * <p>Lens filters are typically used to lower the amount of light the
1576 * sensor is exposed to (measured in steps of EV). As used here, an EV
1577 * step is the standard logarithmic representation, which are
1578 * non-negative, and inversely proportional to the amount of light
1579 * hitting the sensor. For example, setting this to 0 would result
1580 * in no reduction of the incoming light, and setting this to 2 would
1581 * mean that the filter is set to reduce incoming light by two stops
1582 * (allowing 1/4 of the prior amount of light to the sensor).</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08001583 * <p>It may take several frames before the lens filter density changes
1584 * to the requested value. While the filter density is still changing,
1585 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08001586 *
1587 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
Zhijun Heca1b73a2014-02-03 12:39:53 -08001588 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001589 */
1590 public static final Key<Float> LENS_FILTER_DENSITY =
1591 new Key<Float>("android.lens.filterDensity", float.class);
1592
1593 /**
Ruben Brunka20f4c22014-01-17 15:21:13 -08001594 * <p>The current lens focal length; used for optical zoom.</p>
1595 * <p>This setting controls the physical focal length of the camera
1596 * device's lens. Changing the focal length changes the field of
1597 * view of the camera device, and is usually used for optical zoom.</p>
1598 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
1599 * setting won't be applied instantaneously, and it may take several
Zhijun Heca1b73a2014-02-03 12:39:53 -08001600 * frames before the lens can change to the requested focal length.
Ruben Brunka20f4c22014-01-17 15:21:13 -08001601 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
1602 * be set to MOVING.</p>
1603 * <p>This is expected not to be supported on most devices.</p>
1604 *
1605 * @see CaptureRequest#LENS_APERTURE
1606 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1607 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001608 */
1609 public static final Key<Float> LENS_FOCAL_LENGTH =
1610 new Key<Float>("android.lens.focalLength", float.class);
1611
1612 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001613 * <p>Distance to plane of sharpest focus,
1614 * measured from frontmost surface of the lens</p>
1615 * <p>Should be zero for fixed-focus cameras</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001616 */
1617 public static final Key<Float> LENS_FOCUS_DISTANCE =
1618 new Key<Float>("android.lens.focusDistance", float.class);
1619
1620 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001621 * <p>The range of scene distances that are in
1622 * sharp focus (depth of field)</p>
1623 * <p>If variable focus not supported, can still report
1624 * fixed depth of field range</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001625 */
Zhijun Hec59b0782013-09-26 10:39:36 -07001626 public static final Key<float[]> LENS_FOCUS_RANGE =
1627 new Key<float[]>("android.lens.focusRange", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001628
1629 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08001630 * <p>Sets whether the camera device uses optical image stabilization (OIS)
1631 * when capturing images.</p>
1632 * <p>OIS is used to compensate for motion blur due to small movements of
1633 * the camera during capture. Unlike digital image stabilization, OIS makes
1634 * use of mechanical elements to stabilize the camera sensor, and thus
1635 * allows for longer exposure times before camera shake becomes
1636 * apparent.</p>
1637 * <p>This is not expected to be supported on most devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001638 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
1639 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
1640 */
1641 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
1642 new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
1643
1644 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08001645 * <p>Current lens status.</p>
1646 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
1647 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested,
1648 * they may take several frames to reach the requested values. This state indicates
1649 * the current status of the lens parameters.</p>
1650 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
1651 * either because the parameters are all fixed, or because the lens has had enough
1652 * time to reach the most recently-requested values.
1653 * If all these lens parameters are not changable for a camera device, as listed below:</p>
1654 * <ul>
1655 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means
1656 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li>
1657 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value),
1658 * which means the optical zoom is not supported.</li>
1659 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li>
1660 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li>
1661 * </ul>
1662 * <p>Then this state will always be STATIONARY.</p>
1663 * <p>When the state is MOVING, it indicates that at least one of the lens parameters
1664 * is changing.</p>
1665 *
1666 * @see CaptureRequest#LENS_APERTURE
1667 * @see CaptureRequest#LENS_FILTER_DENSITY
1668 * @see CaptureRequest#LENS_FOCAL_LENGTH
1669 * @see CaptureRequest#LENS_FOCUS_DISTANCE
1670 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
1671 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
1672 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
1673 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001674 * @see #LENS_STATE_STATIONARY
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07001675 * @see #LENS_STATE_MOVING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001676 */
1677 public static final Key<Integer> LENS_STATE =
1678 new Key<Integer>("android.lens.state", int.class);
1679
1680 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001681 * <p>Mode of operation for the noise reduction
1682 * algorithm</p>
Zhijun He28079362013-12-17 10:35:40 -08001683 * <p>Noise filtering control. OFF means no noise reduction
Zhijun Hecc28a412014-02-24 15:11:23 -08001684 * will be applied by the camera device.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001685 * <p>This must be set to a valid mode in
1686 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001687 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
1688 * will be applied. HIGH_QUALITY mode indicates that the camera device
1689 * will use the highest-quality noise filtering algorithms,
1690 * even if it slows down capture rate. FAST means the camera device should not
Zhijun He28079362013-12-17 10:35:40 -08001691 * slow down capture rate when applying noise filtering.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08001692 *
1693 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001694 * @see #NOISE_REDUCTION_MODE_OFF
1695 * @see #NOISE_REDUCTION_MODE_FAST
1696 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
1697 */
1698 public static final Key<Integer> NOISE_REDUCTION_MODE =
1699 new Key<Integer>("android.noiseReduction.mode", int.class);
1700
1701 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001702 * <p>Whether a result given to the framework is the
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001703 * final one for the capture, or only a partial that contains a
1704 * subset of the full set of dynamic metadata
Igor Murashkinace5bf02013-12-10 17:36:40 -08001705 * values.</p>
1706 * <p>The entries in the result metadata buffers for a
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001707 * single capture may not overlap, except for this entry. The
1708 * FINAL buffers must retain FIFO ordering relative to the
1709 * requests that generate them, so the FINAL buffer for frame 3 must
1710 * always be sent to the framework after the FINAL buffer for frame 2, and
1711 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned
1712 * in any order relative to other frames, but all PARTIAL buffers for a given
1713 * capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun Hecc28a412014-02-24 15:11:23 -08001714 * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001715 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08001716 * @hide
1717 */
1718 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
1719 new Key<Boolean>("android.quirks.partialResult", boolean.class);
1720
1721 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001722 * <p>A frame counter set by the framework. This value monotonically
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -07001723 * increases with every new result (that is, each new result has a unique
Igor Murashkinace5bf02013-12-10 17:36:40 -08001724 * frameCount value).</p>
1725 * <p>Reset on release()</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001726 */
1727 public static final Key<Integer> REQUEST_FRAME_COUNT =
1728 new Key<Integer>("android.request.frameCount", int.class);
1729
1730 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001731 * <p>An application-specified ID for the current
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001732 * request. Must be maintained unchanged in output
Igor Murashkinace5bf02013-12-10 17:36:40 -08001733 * frame</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001734 * @hide
1735 */
1736 public static final Key<Integer> REQUEST_ID =
1737 new Key<Integer>("android.request.id", int.class);
1738
1739 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08001740 * <p>Specifies the number of pipeline stages the frame went
1741 * through from when it was exposed to when the final completed result
1742 * was available to the framework.</p>
1743 * <p>Depending on what settings are used in the request, and
1744 * what streams are configured, the data may undergo less processing,
1745 * and some pipeline stages skipped.</p>
1746 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
1747 *
1748 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
1749 */
1750 public static final Key<Byte> REQUEST_PIPELINE_DEPTH =
1751 new Key<Byte>("android.request.pipelineDepth", byte.class);
1752
1753 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001754 * <p>(x, y, width, height).</p>
1755 * <p>A rectangle with the top-level corner of (x,y) and size
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001756 * (width, height). The region of the sensor that is used for
1757 * output. Each stream must use this rectangle to produce its
1758 * output, cropping to a smaller region if necessary to
Igor Murashkinace5bf02013-12-10 17:36:40 -08001759 * maintain the stream's aspect ratio.</p>
1760 * <p>HAL2.x uses only (x, y, width)</p>
1761 * <p>Any additional per-stream cropping must be done to
1762 * maximize the final pixel area of the stream.</p>
1763 * <p>For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001764 * ratio, then 4:3 streams should use the exact crop
1765 * region. 16:9 streams should further crop vertically
Igor Murashkinace5bf02013-12-10 17:36:40 -08001766 * (letterbox).</p>
1767 * <p>Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001768 * outputs should crop horizontally (pillarbox), and 16:9
1769 * streams should match exactly. These additional crops must
Igor Murashkinace5bf02013-12-10 17:36:40 -08001770 * be centered within the crop region.</p>
1771 * <p>The output streams must maintain square pixels at all
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001772 * times, no matter what the relative aspect ratios of the
1773 * crop region and the stream are. Negative values for
1774 * corner are allowed for raw output if full pixel array is
1775 * larger than active pixel array. Width and height may be
1776 * rounded to nearest larger supportable width, especially
1777 * for raw output, where only a few fixed scales may be
1778 * possible. The width and height of the crop region cannot
1779 * be set to be smaller than floor( activeArraySize.width /
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001780 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} ) and floor(
1781 * activeArraySize.height /
1782 * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom}), respectively.</p>
1783 *
1784 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001785 */
1786 public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
1787 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
1788
1789 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001790 * <p>Duration each pixel is exposed to
1791 * light.</p>
1792 * <p>If the sensor can't expose this exact duration, it should shorten the
1793 * duration exposed to the nearest possible value (rather than expose longer).</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001794 */
1795 public static final Key<Long> SENSOR_EXPOSURE_TIME =
1796 new Key<Long>("android.sensor.exposureTime", long.class);
1797
1798 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001799 * <p>Duration from start of frame exposure to
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001800 * start of next frame exposure.</p>
1801 * <p>The maximum frame rate that can be supported by a camera subsystem is
1802 * a function of many factors:</p>
1803 * <ul>
1804 * <li>Requested resolutions of output image streams</li>
1805 * <li>Availability of binning / skipping modes on the imager</li>
1806 * <li>The bandwidth of the imager interface</li>
1807 * <li>The bandwidth of the various ISP processing blocks</li>
1808 * </ul>
1809 * <p>Since these factors can vary greatly between different ISPs and
1810 * sensors, the camera abstraction tries to represent the bandwidth
1811 * restrictions with as simple a model as possible.</p>
1812 * <p>The model presented has the following characteristics:</p>
1813 * <ul>
1814 * <li>The image sensor is always configured to output the smallest
1815 * resolution possible given the application's requested output stream
1816 * sizes. The smallest resolution is defined as being at least as large
1817 * as the largest requested output stream size; the camera pipeline must
1818 * never digitally upsample sensor data when the crop region covers the
1819 * whole sensor. In general, this means that if only small output stream
1820 * resolutions are configured, the sensor can provide a higher frame
1821 * rate.</li>
1822 * <li>Since any request may use any or all the currently configured
1823 * output streams, the sensor and ISP must be configured to support
1824 * scaling a single capture to all the streams at the same time. This
1825 * means the camera pipeline must be ready to produce the largest
1826 * requested output size without any delay. Therefore, the overall
1827 * frame rate of a given configured stream set is governed only by the
1828 * largest requested stream resolution.</li>
1829 * <li>Using more than one output stream in a request does not affect the
1830 * frame duration.</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001831 * <li>Certain format-streams may need to do additional background processing
1832 * before data is consumed/produced by that stream. These processors
1833 * can run concurrently to the rest of the camera pipeline, but
1834 * cannot process more than 1 capture at a time.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001835 * </ul>
1836 * <p>The necessary information for the application, given the model above,
Igor Murashkina23ffb52014-02-07 18:52:34 -08001837 * is provided via the {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} field.
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001838 * These are used to determine the maximum frame rate / minimum frame
1839 * duration that is possible for a given stream configuration.</p>
1840 * <p>Specifically, the application can use the following rules to
Igor Murashkina23ffb52014-02-07 18:52:34 -08001841 * determine the minimum frame duration it can request from the camera
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001842 * device:</p>
1843 * <ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001844 * <li>Let the set of currently configured input/output streams
1845 * be called <code>S</code>.</li>
1846 * <li>Find the minimum frame durations for each stream in <code>S</code>, by
1847 * looking it up in {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} (with
1848 * its respective size/format). Let this set of frame durations be called
1849 * <code>F</code>.</li>
1850 * <li>For any given request <code>R</code>, the minimum frame duration allowed
1851 * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams
1852 * used in <code>R</code> be called <code>S_r</code>.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001853 * </ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08001854 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in
1855 * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}), then the frame duration in
1856 * <code>F</code> determines the steady state frame rate that the application will
1857 * get if it uses <code>R</code> as a repeating request. Let this special kind
1858 * of request be called <code>Rsimple</code>.</p>
1859 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved
1860 * by a single capture of a new request <code>Rstall</code> (which has at least
1861 * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the
1862 * same minimum frame duration this will not cause a frame rate loss
1863 * if all buffers from the previous <code>Rstall</code> have already been
1864 * delivered.</p>
1865 * <p>For more details about stalling, see
1866 * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08001867 *
Igor Murashkina23ffb52014-02-07 18:52:34 -08001868 * @see CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS
1869 * @see CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001870 */
1871 public static final Key<Long> SENSOR_FRAME_DURATION =
1872 new Key<Long>("android.sensor.frameDuration", long.class);
1873
1874 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001875 * <p>Gain applied to image data. Must be
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001876 * implemented through analog gain only if set to values
Igor Murashkinace5bf02013-12-10 17:36:40 -08001877 * below 'maximum analog sensitivity'.</p>
1878 * <p>If the sensor can't apply this exact gain, it should lessen the
1879 * gain to the nearest possible value (rather than gain more).</p>
1880 * <p>ISO 12232:2006 REI method</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001881 */
1882 public static final Key<Integer> SENSOR_SENSITIVITY =
1883 new Key<Integer>("android.sensor.sensitivity", int.class);
1884
1885 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001886 * <p>Time at start of exposure of first
1887 * row</p>
1888 * <p>Monotonic, should be synced to other timestamps in
1889 * system</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001890 */
1891 public static final Key<Long> SENSOR_TIMESTAMP =
1892 new Key<Long>("android.sensor.timestamp", long.class);
1893
1894 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001895 * <p>The temperature of the sensor, sampled at the time
1896 * exposure began for this frame.</p>
1897 * <p>The thermal diode being queried should be inside the sensor PCB, or
1898 * somewhere close to it.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08001899 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1900 * <p><b>Full capability</b> -
1901 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
1902 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
1903 *
1904 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkind5ff06a2013-08-20 15:15:06 -07001905 */
1906 public static final Key<Float> SENSOR_TEMPERATURE =
1907 new Key<Float>("android.sensor.temperature", float.class);
1908
1909 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07001910 * <p>The estimated camera neutral color in the native sensor colorspace at
1911 * the time of capture.</p>
1912 * <p>This value gives the neutral color point encoded as an RGB value in the
1913 * native sensor color space. The neutral color point indicates the
1914 * currently estimated white point of the scene illumination. It can be
1915 * used to interpolate between the provided color transforms when
1916 * processing raw sensor data.</p>
1917 * <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 -08001918 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1919 */
1920 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
1921 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
1922
1923 /**
Ruben Brunka9bfdbb2014-02-07 16:58:09 -08001924 * <p>A mapping containing a hue shift, saturation scale, and value scale
1925 * for each pixel.</p>
1926 * <p>hue_samples, saturation_samples, and value_samples are given in
1927 * {@link CameraCharacteristics#SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS android.sensor.profileHueSatMapDimensions}.</p>
1928 * <p>Each entry of this map contains three floats corresponding to the
1929 * hue shift, saturation scale, and value scale, respectively; where the
1930 * hue shift has the lowest index. The map entries are stored in the tag
1931 * in nested loop order, with the value divisions in the outer loop, the
1932 * hue divisions in the middle loop, and the saturation divisions in the
1933 * inner loop. All zero input saturation entries are required to have a
1934 * value scale factor of 1.0.</p>
1935 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1936 *
1937 * @see CameraCharacteristics#SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS
1938 */
1939 public static final Key<float[]> SENSOR_PROFILE_HUE_SAT_MAP =
1940 new Key<float[]>("android.sensor.profileHueSatMap", float[].class);
1941
1942 /**
1943 * <p>A list of x,y samples defining a tone-mapping curve for gamma adjustment.</p>
1944 * <p>This tag contains a default tone curve that can be applied while
1945 * processing the image as a starting point for user adjustments.
1946 * The curve is specified as a list of value pairs in linear gamma.
1947 * The curve is interpolated using a cubic spline.</p>
1948 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1949 */
1950 public static final Key<float[]> SENSOR_PROFILE_TONE_CURVE =
1951 new Key<float[]>("android.sensor.profileToneCurve", float[].class);
1952
1953 /**
Ruben Brunk987d9f72014-02-11 18:00:24 -08001954 * <p>The worst-case divergence between Bayer green channels.</p>
1955 * <p>This value is an estimate of the worst case split between the
1956 * Bayer green channels in the red and blue rows in the sensor color
1957 * filter array.</p>
1958 * <p>The green split is calculated as follows:</p>
1959 * <ol>
Ruben Brunke89b1202014-03-24 17:10:35 -07001960 * <li>A 5x5 pixel (or larger) window W within the active sensor array is
1961 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
1962 * mosaic channels (R, Gr, Gb, B). The location and size of the window
1963 * chosen is implementation defined, and should be chosen to provide a
1964 * green split estimate that is both representative of the entire image
1965 * for this camera sensor, and can be calculated quickly.</li>
Ruben Brunk987d9f72014-02-11 18:00:24 -08001966 * <li>The arithmetic mean of the green channels from the red
1967 * rows (mean_Gr) within W is computed.</li>
1968 * <li>The arithmetic mean of the green channels from the blue
1969 * rows (mean_Gb) within W is computed.</li>
1970 * <li>The maximum ratio R of the two means is computed as follows:
1971 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
1972 * </ol>
1973 * <p>The ratio R is the green split divergence reported for this property,
1974 * which represents how much the green channels differ in the mosaic
1975 * pattern. This value is typically used to determine the treatment of
1976 * the green mosaic channels when demosaicing.</p>
1977 * <p>The green split value can be roughly interpreted as follows:</p>
1978 * <ul>
1979 * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
1980 * <li>1.20 &lt;= R &gt;= 1.03 will require some software
1981 * correction to avoid demosaic errors (3-20% divergence).</li>
1982 * <li>R &gt; 1.20 will require strong software correction to produce
1983 * a usuable image (&gt;20% divergence).</li>
1984 * </ul>
1985 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1986 */
1987 public static final Key<Float> SENSOR_GREEN_SPLIT =
1988 new Key<Float>("android.sensor.greenSplit", float.class);
1989
1990 /**
Zhijun He379af012014-05-06 11:54:54 -07001991 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
1992 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
1993 * <p>Each color channel is treated as an unsigned 32-bit integer.
1994 * The camera device then uses the most significant X bits
1995 * that correspond to how many bits are in its Bayer raw sensor
1996 * output.</p>
1997 * <p>For example, a sensor with RAW10 Bayer output would use the
1998 * 10 most significant bits from each color channel.</p>
1999 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2000 *
2001 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2002 */
2003 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
2004 new Key<int[]>("android.sensor.testPatternData", int[].class);
2005
2006 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08002007 * <p>When enabled, the sensor sends a test pattern instead of
2008 * doing a real exposure from the camera.</p>
2009 * <p>When a test pattern is enabled, all manual sensor controls specified
2010 * by android.sensor.* should be ignored. All other controls should
2011 * work as normal.</p>
2012 * <p>For example, if manual flash is enabled, flash firing should still
2013 * occur (and that the test pattern remain unmodified, since the flash
2014 * would not actually affect it).</p>
2015 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2016 * @see #SENSOR_TEST_PATTERN_MODE_OFF
2017 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
2018 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
2019 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
2020 * @see #SENSOR_TEST_PATTERN_MODE_PN9
2021 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
2022 */
2023 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
2024 new Key<Integer>("android.sensor.testPatternMode", int.class);
2025
2026 /**
Zhijun Heba93fe62014-01-17 16:43:05 -08002027 * <p>Quality of lens shading correction applied
2028 * to the image data.</p>
2029 * <p>When set to OFF mode, no lens shading correction will be applied by the
2030 * camera device, and an identity lens shading map data will be provided
2031 * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
2032 * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>,
2033 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map
2034 * shown below:</p>
2035 * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2036 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2037 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2038 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2039 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2040 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
2041 * </code></pre>
2042 * <p>When set to other modes, lens shading correction will be applied by the
2043 * camera device. Applications can request lens shading map data by setting
2044 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
2045 * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified
2046 * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
2047 *
2048 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
2049 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
2050 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
2051 * @see #SHADING_MODE_OFF
2052 * @see #SHADING_MODE_FAST
2053 * @see #SHADING_MODE_HIGH_QUALITY
Zhijun Heba93fe62014-01-17 16:43:05 -08002054 */
2055 public static final Key<Integer> SHADING_MODE =
2056 new Key<Integer>("android.shading.mode", int.class);
2057
2058 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002059 * <p>State of the face detector
2060 * unit</p>
2061 * <p>Whether face detection is enabled, and whether it
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002062 * should output just the basic fields or the full set of
2063 * fields. Value must be one of the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002064 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
2065 *
2066 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002067 * @see #STATISTICS_FACE_DETECT_MODE_OFF
2068 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
2069 * @see #STATISTICS_FACE_DETECT_MODE_FULL
2070 */
2071 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
2072 new Key<Integer>("android.statistics.faceDetectMode", int.class);
2073
2074 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002075 * <p>List of unique IDs for detected
2076 * faces</p>
2077 * <p>Only available if faceDetectMode == FULL</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002078 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002079 */
2080 public static final Key<int[]> STATISTICS_FACE_IDS =
2081 new Key<int[]>("android.statistics.faceIds", int[].class);
2082
2083 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002084 * <p>List of landmarks for detected
2085 * faces</p>
2086 * <p>Only available if faceDetectMode == FULL</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002087 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002088 */
2089 public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
2090 new Key<int[]>("android.statistics.faceLandmarks", int[].class);
2091
2092 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002093 * <p>List of the bounding rectangles for detected
2094 * faces</p>
2095 * <p>Only available if faceDetectMode != OFF</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002096 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002097 */
2098 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
2099 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
2100
2101 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002102 * <p>List of the face confidence scores for
2103 * detected faces</p>
2104 * <p>Only available if faceDetectMode != OFF. The value should be
2105 * meaningful (for example, setting 100 at all times is illegal).</p>
Zhijun He7f80d6f2013-11-04 10:18:05 -08002106 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002107 */
2108 public static final Key<byte[]> STATISTICS_FACE_SCORES =
2109 new Key<byte[]>("android.statistics.faceScores", byte[].class);
2110
2111 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002112 * <p>The shading map is a low-resolution floating-point map
2113 * that lists the coefficients used to correct for vignetting, for each
2114 * Bayer color channel.</p>
2115 * <p>The least shaded section of the image should have a gain factor
2116 * of 1; all other sections should have gains above 1.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002117 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Igor Murashkinace5bf02013-12-10 17:36:40 -08002118 * must take into account the colorCorrection settings.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002119 * <p>The shading map is for the entire active pixel array, and is not
2120 * affected by the crop region specified in the request. Each shading map
2121 * entry is the value of the shading compensation map over a specific
2122 * pixel on the sensor. Specifically, with a (N x M) resolution shading
2123 * map, and an active pixel array size (W x H), shading map entry
2124 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
2125 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
2126 * The map is assumed to be bilinearly interpolated between the sample points.</p>
2127 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
2128 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
2129 * The shading map is stored in a fully interleaved format, and its size
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002130 * 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 -08002131 * <p>The shading map should have on the order of 30-40 rows and columns,
2132 * and must be smaller than 64x64.</p>
2133 * <p>As an example, given a very small map defined as:</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002134 * <pre><code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]
2135 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} =
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002136 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002137 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
2138 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
2139 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
2140 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
2141 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08002142 * </code></pre>
2143 * <p>The low-resolution scaling map images for each channel are
2144 * (displayed using nearest-neighbor interpolation):</p>
2145 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
2146 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
2147 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
2148 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
2149 * <p>As a visualization only, inverting the full-color map to recover an
2150 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
2151 * <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 -08002152 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08002153 * @see CaptureRequest#COLOR_CORRECTION_MODE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002154 * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002155 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002156 */
2157 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
2158 new Key<float[]>("android.statistics.lensShadingMap", float[].class);
2159
2160 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002161 * <p>The best-fit color channel gains calculated
Zhijun Hecc28a412014-02-24 15:11:23 -08002162 * by the camera device's statistics units for the current output frame.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002163 * <p>This may be different than the gains used for this frame,
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002164 * since statistics processing on data from a new frame
2165 * typically completes after the transform has already been
Igor Murashkinace5bf02013-12-10 17:36:40 -08002166 * applied to that frame.</p>
2167 * <p>The 4 channel gains are defined in Bayer domain,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002168 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002169 * <p>This value should always be calculated by the AWB block,
2170 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002171 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002172 *
2173 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002174 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002175 */
2176 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
2177 new Key<float[]>("android.statistics.predictedColorGains", float[].class);
2178
2179 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002180 * <p>The best-fit color transform matrix estimate
Zhijun Hecc28a412014-02-24 15:11:23 -08002181 * calculated by the camera device's statistics units for the current
2182 * output frame.</p>
2183 * <p>The camera device will provide the estimate from its
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002184 * statistics unit on the white balance transforms to use
Zhijun Hecc28a412014-02-24 15:11:23 -08002185 * for the next frame. These are the values the camera device believes
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002186 * are the best fit for the current output frame. This may
2187 * be different than the transform used for this frame, since
2188 * statistics processing on data from a new frame typically
2189 * completes after the transform has already been applied to
Igor Murashkinace5bf02013-12-10 17:36:40 -08002190 * that frame.</p>
2191 * <p>These estimates must be provided for all frames, even if
2192 * capture settings and color transforms are set by the application.</p>
2193 * <p>This value should always be calculated by the AWB block,
2194 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08002195 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2196 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002197 */
2198 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
2199 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
2200
2201 /**
Zhijun He208fb6c2014-02-03 13:09:06 -08002202 * <p>The camera device estimated scene illumination lighting
2203 * frequency.</p>
2204 * <p>Many light sources, such as most fluorescent lights, flicker at a rate
2205 * that depends on the local utility power standards. This flicker must be
2206 * accounted for by auto-exposure routines to avoid artifacts in captured images.
2207 * The camera device uses this entry to tell the application what the scene
2208 * illuminant frequency is.</p>
2209 * <p>When manual exposure control is enabled
2210 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == OFF</code>),
2211 * the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't do the antibanding, and the
2212 * application can ensure it selects exposure times that do not cause banding
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002213 * issues by looking into this metadata field. See {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}
Zhijun He208fb6c2014-02-03 13:09:06 -08002214 * for more details.</p>
2215 * <p>Report NONE if there doesn't appear to be flickering illumination.</p>
2216 *
2217 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
2218 * @see CaptureRequest#CONTROL_AE_MODE
2219 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002220 * @see #STATISTICS_SCENE_FLICKER_NONE
2221 * @see #STATISTICS_SCENE_FLICKER_50HZ
2222 * @see #STATISTICS_SCENE_FLICKER_60HZ
2223 */
2224 public static final Key<Integer> STATISTICS_SCENE_FLICKER =
2225 new Key<Integer>("android.statistics.sceneFlicker", int.class);
2226
2227 /**
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002228 * <p>Operating mode for hotpixel map generation.</p>
2229 * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
2230 * If set to OFF, no hotpixel map should be returned.</p>
2231 * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
2232 *
2233 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
2234 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
2235 */
2236 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
2237 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
2238
2239 /**
2240 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
2241 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
2242 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
2243 * bottom-right of the pixel array, respectively. The width and
2244 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
2245 * This may include hot pixels that lie outside of the active array
2246 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
2247 *
2248 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2249 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
2250 */
2251 public static final Key<int[]> STATISTICS_HOT_PIXEL_MAP =
2252 new Key<int[]>("android.statistics.hotPixelMap", int[].class);
2253
2254 /**
Zhijun He379af012014-05-06 11:54:54 -07002255 * <p>Whether the camera device will output the lens
2256 * shading map in output result metadata.</p>
2257 * <p>When set to ON,
2258 * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} must be provided in
2259 * the output result metadata.</p>
2260 *
2261 * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
2262 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
2263 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
2264 */
2265 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
2266 new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
2267
2268 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002269 * <p>Tonemapping / contrast / gamma curve for the blue
Igor Murashkine0060932014-01-17 17:24:11 -08002270 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2271 * CONTRAST_CURVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002272 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
2273 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002274 * @see CaptureRequest#TONEMAP_CURVE_RED
Zhijun He5f2a47f2014-01-16 15:44:41 -08002275 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002276 */
Zhijun He3ffd7052013-08-19 15:45:08 -07002277 public static final Key<float[]> TONEMAP_CURVE_BLUE =
2278 new Key<float[]>("android.tonemap.curveBlue", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002279
2280 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002281 * <p>Tonemapping / contrast / gamma curve for the green
Igor Murashkine0060932014-01-17 17:24:11 -08002282 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2283 * CONTRAST_CURVE.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002284 * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
2285 *
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002286 * @see CaptureRequest#TONEMAP_CURVE_RED
Zhijun He5f2a47f2014-01-16 15:44:41 -08002287 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002288 */
Zhijun He3ffd7052013-08-19 15:45:08 -07002289 public static final Key<float[]> TONEMAP_CURVE_GREEN =
2290 new Key<float[]>("android.tonemap.curveGreen", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002291
2292 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002293 * <p>Tonemapping / contrast / gamma curve for the red
Igor Murashkine0060932014-01-17 17:24:11 -08002294 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2295 * CONTRAST_CURVE.</p>
2296 * <p>Each channel's curve is defined by an array of control points:</p>
2297 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} =
2298 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He870922b2014-02-15 21:47:51 -08002299 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
Igor Murashkine0060932014-01-17 17:24:11 -08002300 * <p>These are sorted in order of increasing <code>Pin</code>; it is always
2301 * guaranteed that input values 0.0 and 1.0 are included in the list to
2302 * define a complete mapping. For input values between control points,
2303 * the camera device must linearly interpolate between the control
2304 * points.</p>
2305 * <p>Each curve can have an independent number of points, and the number
2306 * of points can be less than max (that is, the request doesn't have to
2307 * always provide a curve with number of points equivalent to
2308 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
2309 * <p>A few examples, and their corresponding graphical mappings; these
2310 * only specify the red channel and the precision is limited to 4
2311 * digits, for conciseness.</p>
2312 * <p>Linear mapping:</p>
2313 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 0, 1.0, 1.0 ]
2314 * </code></pre>
2315 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
2316 * <p>Invert mapping:</p>
2317 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 1.0, 1.0, 0 ]
2318 * </code></pre>
2319 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
2320 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
2321 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
2322 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
2323 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
2324 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
2325 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
2326 * </code></pre>
2327 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
2328 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
2329 * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
2330 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
2331 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
2332 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
2333 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
2334 * </code></pre>
2335 * <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 -08002336 *
Igor Murashkine0060932014-01-17 17:24:11 -08002337 * @see CaptureRequest#TONEMAP_CURVE_RED
2338 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002339 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002340 */
2341 public static final Key<float[]> TONEMAP_CURVE_RED =
2342 new Key<float[]>("android.tonemap.curveRed", float[].class);
2343
2344 /**
Igor Murashkine0060932014-01-17 17:24:11 -08002345 * <p>High-level global contrast/gamma/tonemapping control.</p>
2346 * <p>When switching to an application-defined contrast curve by setting
2347 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
2348 * per-channel with a set of <code>(in, out)</code> points that specify the
2349 * mapping from input high-bit-depth pixel value to the output
2350 * low-bit-depth value. Since the actual pixel ranges of both input
2351 * and output may change depending on the camera pipeline, the values
2352 * are specified by normalized floating-point numbers.</p>
2353 * <p>More-complex color mapping operations such as 3D color look-up
2354 * tables, selective chroma enhancement, or other non-linear color
2355 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
2356 * CONTRAST_CURVE.</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002357 * <p>This must be set to a valid mode in
2358 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08002359 * <p>When using either FAST or HIGH_QUALITY, the camera device will
2360 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed},
2361 * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, and {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.
2362 * These values are always available, and as close as possible to the
2363 * actually used nonlinear/nonglobal transforms.</p>
2364 * <p>If a request is sent with TRANSFORM_MATRIX with the camera device's
2365 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
2366 * roughly the same.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002367 *
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002368 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
Igor Murashkine0060932014-01-17 17:24:11 -08002369 * @see CaptureRequest#TONEMAP_CURVE_BLUE
2370 * @see CaptureRequest#TONEMAP_CURVE_GREEN
2371 * @see CaptureRequest#TONEMAP_CURVE_RED
2372 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002373 * @see #TONEMAP_MODE_CONTRAST_CURVE
2374 * @see #TONEMAP_MODE_FAST
2375 * @see #TONEMAP_MODE_HIGH_QUALITY
2376 */
2377 public static final Key<Integer> TONEMAP_MODE =
2378 new Key<Integer>("android.tonemap.mode", int.class);
2379
2380 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002381 * <p>This LED is nominally used to indicate to the user
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002382 * that the camera is powered on and may be streaming images back to the
2383 * Application Processor. In certain rare circumstances, the OS may
2384 * disable this when video is processed locally and not transmitted to
Igor Murashkinace5bf02013-12-10 17:36:40 -08002385 * any untrusted applications.</p>
2386 * <p>In particular, the LED <em>must</em> always be on when the data could be
2387 * transmitted off the device. The LED <em>should</em> always be on whenever
2388 * data is stored locally on the device.</p>
2389 * <p>The LED <em>may</em> be off if a trusted application is using the data that
2390 * doesn't violate the above rules.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002391 * @hide
2392 */
2393 public static final Key<Boolean> LED_TRANSMIT =
2394 new Key<Boolean>("android.led.transmit", boolean.class);
2395
2396 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002397 * <p>Whether black-level compensation is locked
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08002398 * to its current values, or is free to vary.</p>
2399 * <p>Whether the black level offset was locked for this frame. Should be
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002400 * 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 -08002401 * a change in other capture settings forced the camera device to
2402 * perform a black level reset.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002403 *
2404 * @see CaptureRequest#BLACK_LEVEL_LOCK
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002405 */
2406 public static final Key<Boolean> BLACK_LEVEL_LOCK =
2407 new Key<Boolean>("android.blackLevel.lock", boolean.class);
2408
Igor Murashkin3865a842014-01-17 18:18:39 -08002409 /**
2410 * <p>The frame number corresponding to the last request
2411 * with which the output result (metadata + buffers) has been fully
2412 * synchronized.</p>
2413 * <p>When a request is submitted to the camera device, there is usually a
2414 * delay of several frames before the controls get applied. A camera
2415 * device may either choose to account for this delay by implementing a
2416 * pipeline and carefully submit well-timed atomic control updates, or
2417 * it may start streaming control changes that span over several frame
2418 * boundaries.</p>
2419 * <p>In the latter case, whenever a request's settings change relative to
2420 * the previous submitted request, the full set of changes may take
2421 * multiple frame durations to fully take effect. Some settings may
2422 * take effect sooner (in less frame durations) than others.</p>
2423 * <p>While a set of control changes are being propagated, this value
2424 * will be CONVERGING.</p>
2425 * <p>Once it is fully known that a set of control changes have been
2426 * finished propagating, and the resulting updated control settings
2427 * have been read back by the camera device, this value will be set
2428 * to a non-negative frame number (corresponding to the request to
2429 * which the results have synchronized to).</p>
2430 * <p>Older camera device implementations may not have a way to detect
2431 * when all camera controls have been applied, and will always set this
2432 * value to UNKNOWN.</p>
2433 * <p>FULL capability devices will always have this value set to the
2434 * frame number of the request corresponding to this result.</p>
2435 * <p><em>Further details</em>:</p>
2436 * <ul>
2437 * <li>Whenever a request differs from the last request, any future
2438 * results not yet returned may have this value set to CONVERGING (this
2439 * could include any in-progress captures not yet returned by the camera
2440 * device, for more details see pipeline considerations below).</li>
2441 * <li>Submitting a series of multiple requests that differ from the
2442 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
2443 * moves the new synchronization frame to the last non-repeating
2444 * request (using the smallest frame number from the contiguous list of
2445 * repeating requests).</li>
2446 * <li>Submitting the same request repeatedly will not change this value
2447 * to CONVERGING, if it was already a non-negative value.</li>
2448 * <li>When this value changes to non-negative, that means that all of the
2449 * metadata controls from the request have been applied, all of the
2450 * metadata controls from the camera device have been read to the
2451 * updated values (into the result), and all of the graphics buffers
2452 * corresponding to this result are also synchronized to the request.</li>
2453 * </ul>
2454 * <p><em>Pipeline considerations</em>:</p>
2455 * <p>Submitting a request with updated controls relative to the previously
2456 * submitted requests may also invalidate the synchronization state
2457 * of all the results corresponding to currently in-flight requests.</p>
2458 * <p>In other words, results for this current request and up to
2459 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
2460 * android.sync.frameNumber change to CONVERGING.</p>
2461 *
2462 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
2463 * @see #SYNC_FRAME_NUMBER_CONVERGING
2464 * @see #SYNC_FRAME_NUMBER_UNKNOWN
2465 * @hide
2466 */
Zhijun He4f91e2a2014-04-17 13:20:21 -07002467 public static final Key<Long> SYNC_FRAME_NUMBER =
2468 new Key<Long>("android.sync.frameNumber", long.class);
Igor Murashkin3865a842014-01-17 18:18:39 -08002469
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002470 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
2471 * End generated code
2472 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkinb779ac12013-09-05 12:40:19 -07002473
2474 /**
2475 * <p>
2476 * List of the {@link Face Faces} detected through camera face detection
2477 * in this result.
2478 * </p>
2479 * <p>
2480 * Only available if {@link #STATISTICS_FACE_DETECT_MODE} {@code !=}
2481 * {@link CameraMetadata#STATISTICS_FACE_DETECT_MODE_OFF OFF}.
2482 * </p>
2483 *
2484 * @see Face
2485 */
2486 public static final Key<Face[]> STATISTICS_FACES =
2487 new Key<Face[]>("android.statistics.faces", Face[].class);
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08002488}