blob: 00117353e544f0f8fd644d5551352ccdaa1bc179 [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;
Igor Murashkinbdf366c2014-07-25 16:54:20 -070020import android.hardware.camera2.impl.CaptureResultExtras;
Igor Murashkin6c76f582014-07-15 17:19:49 -070021import android.hardware.camera2.impl.PublicKey;
22import android.hardware.camera2.impl.SyntheticKey;
Igor Murashkind6d65152014-05-19 16:31:02 -070023import android.hardware.camera2.utils.TypeReference;
24import android.util.Log;
Igor Murashkin72f9f0a2014-05-14 15:46:10 -070025import android.util.Rational;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080026
Igor Murashkind6d65152014-05-19 16:31:02 -070027import java.util.List;
28
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080029/**
Igor Murashkindb075af2014-05-21 10:07:08 -070030 * <p>The subset of the results of a single image capture from the image sensor.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080031 *
Igor Murashkindb075af2014-05-21 10:07:08 -070032 * <p>Contains a subset of the final configuration for the capture hardware (sensor, lens,
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080033 * flash), the processing pipeline, the control algorithms, and the output
34 * buffers.</p>
35 *
36 * <p>CaptureResults are produced by a {@link CameraDevice} after processing a
37 * {@link CaptureRequest}. All properties listed for capture requests can also
38 * be queried on the capture result, to determine the final values used for
39 * capture. The result also includes additional metadata about the state of the
40 * camera device during the capture.</p>
41 *
Igor Murashkindb075af2014-05-21 10:07:08 -070042 * <p>Not all properties returned by {@link CameraCharacteristics#getAvailableCaptureResultKeys()}
43 * are necessarily available. Some results are {@link CaptureResult partial} and will
44 * not have every key set. Only {@link TotalCaptureResult total} results are guaranteed to have
45 * every key available that was enabled by the request.</p>
46 *
47 * <p>{@link CaptureResult} objects are immutable.</p>
Ruben Brunkf967a542014-04-28 16:31:11 -070048 *
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080049 */
Igor Murashkindb075af2014-05-21 10:07:08 -070050public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
Igor Murashkind6d65152014-05-19 16:31:02 -070051
52 private static final String TAG = "CaptureResult";
53 private static final boolean VERBOSE = false;
54
55 /**
56 * A {@code Key} is used to do capture result field lookups with
57 * {@link CaptureResult#get}.
58 *
59 * <p>For example, to get the timestamp corresponding to the exposure of the first row:
60 * <code><pre>
61 * long timestamp = captureResult.get(CaptureResult.SENSOR_TIMESTAMP);
62 * </pre></code>
63 * </p>
64 *
65 * <p>To enumerate over all possible keys for {@link CaptureResult}, see
66 * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p>
67 *
68 * @see CaptureResult#get
69 * @see CameraCharacteristics#getAvailableCaptureResultKeys
70 */
71 public final static class Key<T> {
72 private final CameraMetadataNative.Key<T> mKey;
73
74 /**
75 * Visible for testing and vendor extensions only.
76 *
77 * @hide
78 */
79 public Key(String name, Class<T> type) {
80 mKey = new CameraMetadataNative.Key<T>(name, type);
81 }
82
83 /**
84 * Visible for testing and vendor extensions only.
85 *
86 * @hide
87 */
88 public Key(String name, TypeReference<T> typeReference) {
89 mKey = new CameraMetadataNative.Key<T>(name, typeReference);
90 }
91
92 /**
93 * Return a camelCase, period separated name formatted like:
94 * {@code "root.section[.subsections].name"}.
95 *
96 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
97 * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
98 *
99 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
100 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
101 * specific key might look like {@code "com.google.nexus.data.private"}.</p>
102 *
103 * @return String representation of the key name
104 */
105 public String getName() {
106 return mKey.getName();
107 }
108
109 /**
110 * {@inheritDoc}
111 */
112 @Override
113 public final int hashCode() {
114 return mKey.hashCode();
115 }
116
117 /**
118 * {@inheritDoc}
119 */
120 @SuppressWarnings("unchecked")
121 @Override
122 public final boolean equals(Object o) {
123 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
124 }
125
126 /**
127 * Visible for CameraMetadataNative implementation only; do not use.
128 *
129 * TODO: Make this private or remove it altogether.
130 *
131 * @hide
132 */
133 public CameraMetadataNative.Key<T> getNativeKey() {
134 return mKey;
135 }
136
137 @SuppressWarnings({ "unchecked" })
138 /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) {
139 mKey = (CameraMetadataNative.Key<T>) nativeKey;
140 }
141 }
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700142
143 private final CameraMetadataNative mResults;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700144 private final CaptureRequest mRequest;
145 private final int mSequenceId;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700146 private final long mFrameNumber;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700147
Igor Murashkin70725502013-06-25 20:27:06 +0000148 /**
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700149 * Takes ownership of the passed-in properties object
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700150 *
151 * <p>For internal use only</p>
Igor Murashkin70725502013-06-25 20:27:06 +0000152 * @hide
153 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700154 public CaptureResult(CameraMetadataNative results, CaptureRequest parent,
155 CaptureResultExtras extras) {
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700156 if (results == null) {
157 throw new IllegalArgumentException("results was null");
158 }
159
160 if (parent == null) {
161 throw new IllegalArgumentException("parent was null");
162 }
163
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700164 if (extras == null) {
165 throw new IllegalArgumentException("extras was null");
166 }
167
Igor Murashkind6d65152014-05-19 16:31:02 -0700168 mResults = CameraMetadataNative.move(results);
169 if (mResults.isEmpty()) {
170 throw new AssertionError("Results must not be empty");
171 }
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700172 mRequest = parent;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700173 mSequenceId = extras.getRequestId();
174 mFrameNumber = extras.getFrameNumber();
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700175 }
176
Ruben Brunkf967a542014-04-28 16:31:11 -0700177 /**
178 * Returns a copy of the underlying {@link CameraMetadataNative}.
179 * @hide
180 */
181 public CameraMetadataNative getNativeCopy() {
182 return new CameraMetadataNative(mResults);
183 }
184
Igor Murashkind6d65152014-05-19 16:31:02 -0700185 /**
186 * Creates a request-less result.
187 *
188 * <p><strong>For testing only.</strong></p>
189 * @hide
190 */
191 public CaptureResult(CameraMetadataNative results, int sequenceId) {
192 if (results == null) {
193 throw new IllegalArgumentException("results was null");
194 }
195
196 mResults = CameraMetadataNative.move(results);
197 if (mResults.isEmpty()) {
198 throw new AssertionError("Results must not be empty");
199 }
200
201 mRequest = null;
202 mSequenceId = sequenceId;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700203 mFrameNumber = -1;
Igor Murashkind6d65152014-05-19 16:31:02 -0700204 }
205
206 /**
207 * Get a capture result field value.
208 *
209 * <p>The field definitions can be found in {@link CaptureResult}.</p>
210 *
211 * <p>Querying the value for the same key more than once will return a value
212 * which is equal to the previous queried value.</p>
213 *
214 * @throws IllegalArgumentException if the key was not valid
215 *
216 * @param key The result field to read.
217 * @return The value of that key, or {@code null} if the field is not set.
218 */
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700219 public <T> T get(Key<T> key) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700220 T value = mResults.get(key);
221 if (VERBOSE) Log.v(TAG, "#get for Key = " + key.getName() + ", returned value = " + value);
222 return value;
223 }
224
225 /**
226 * {@inheritDoc}
227 * @hide
228 */
229 @SuppressWarnings("unchecked")
230 @Override
231 protected <T> T getProtected(Key<?> key) {
232 return (T) mResults.get(key);
233 }
234
235 /**
236 * {@inheritDoc}
237 * @hide
238 */
239 @SuppressWarnings("unchecked")
240 @Override
241 protected Class<Key<?>> getKeyClass() {
242 Object thisClass = Key.class;
243 return (Class<Key<?>>)thisClass;
244 }
245
246 /**
247 * Dumps the native metadata contents to logcat.
248 *
249 * <p>Visibility for testing/debugging only. The results will not
250 * include any synthesized keys, as they are invisible to the native layer.</p>
251 *
252 * @hide
253 */
254 public void dumpToLog() {
255 mResults.dumpToLog();
256 }
257
258 /**
259 * {@inheritDoc}
260 */
261 @Override
262 public List<Key<?>> getKeys() {
263 // Force the javadoc for this function to show up on the CaptureResult page
264 return super.getKeys();
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800265 }
266
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700267 /**
268 * Get the request associated with this result.
269 *
Igor Murashkindb075af2014-05-21 10:07:08 -0700270 * <p>Whenever a request has been fully or partially captured, with
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700271 * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted} or
272 * {@link CameraCaptureSession.CaptureCallback#onCaptureProgressed}, the {@code result}'s
Igor Murashkindb075af2014-05-21 10:07:08 -0700273 * {@code getRequest()} will return that {@code request}.
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700274 * </p>
275 *
Igor Murashkindb075af2014-05-21 10:07:08 -0700276 * <p>For example,
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700277 * <code><pre>cameraDevice.capture(someRequest, new CaptureCallback() {
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700278 * {@literal @}Override
279 * void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) {
280 * assert(myResult.getRequest.equals(myRequest) == true);
281 * }
Igor Murashkindb075af2014-05-21 10:07:08 -0700282 * }, null);
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700283 * </code></pre>
284 * </p>
285 *
286 * @return The request associated with this result. Never {@code null}.
287 */
288 public CaptureRequest getRequest() {
289 return mRequest;
290 }
291
292 /**
293 * Get the frame number associated with this result.
294 *
295 * <p>Whenever a request has been processed, regardless of failure or success,
296 * it gets a unique frame number assigned to its future result/failure.</p>
297 *
298 * <p>This value monotonically increments, starting with 0,
299 * for every new result or failure; and the scope is the lifetime of the
300 * {@link CameraDevice}.</p>
301 *
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700302 * @return The frame number
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700303 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700304 public long getFrameNumber() {
305 return mFrameNumber;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700306 }
307
308 /**
309 * The sequence ID for this failure that was returned by the
Eino-Ville Talvala0a160ac2014-07-02 14:29:26 -0700310 * {@link CameraCaptureSession#capture} family of functions.
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700311 *
312 * <p>The sequence ID is a unique monotonically increasing value starting from 0,
313 * incremented every time a new group of requests is submitted to the CameraDevice.</p>
314 *
315 * @return int The ID for the sequence of requests that this capture result is a part of
316 *
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700317 * @see CameraDevice.CaptureCallback#onCaptureSequenceCompleted
318 * @see CameraDevice.CaptureCallback#onCaptureSequenceAborted
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700319 */
320 public int getSequenceId() {
321 return mSequenceId;
322 }
323
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700324 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
325 * The key entries below this point are generated from metadata
326 * definitions in /system/media/camera/docs. Do not modify by hand or
327 * modify the comment blocks at the start or end.
328 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
329
330 /**
Zhijun He379af012014-05-06 11:54:54 -0700331 * <p>The mode control selects how the image data is converted from the
332 * sensor's native color into linear sRGB color.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700333 * <p>When auto-white balance (AWB) is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this
Zhijun He379af012014-05-06 11:54:54 -0700334 * control is overridden by the AWB routine. When AWB is disabled, the
335 * application controls how the color mapping is performed.</p>
336 * <p>We define the expected processing pipeline below. For consistency
337 * across devices, this is always the case with TRANSFORM_MATRIX.</p>
338 * <p>When either FULL or HIGH_QUALITY is used, the camera device may
339 * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
340 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
341 * camera device (in the results) and be roughly correct.</p>
342 * <p>Switching to TRANSFORM_MATRIX and using the data provided from
343 * FAST or HIGH_QUALITY will yield a picture with the same white point
344 * as what was produced by the camera device in the earlier frame.</p>
345 * <p>The expected processing pipeline is as follows:</p>
346 * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
347 * <p>The white balance is encoded by two values, a 4-channel white-balance
348 * gain vector (applied in the Bayer domain), and a 3x3 color transform
349 * matrix (applied after demosaic).</p>
350 * <p>The 4-channel white-balance gains are defined as:</p>
351 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ]
352 * </code></pre>
353 * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
354 * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
355 * These may be identical for a given camera device implementation; if
356 * the camera device does not support a separate gain for even/odd green
357 * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
358 * <code>G_even</code> in the output result metadata.</p>
359 * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
360 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
361 * </code></pre>
362 * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
363 * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
364 * <p>with colors as follows:</p>
365 * <pre><code>r' = I0r + I1g + I2b
366 * g' = I3r + I4g + I5b
367 * b' = I6r + I7g + I8b
368 * </code></pre>
369 * <p>Both the input and output value ranges must match. Overflow/underflow
370 * values are clipped to fit within the range.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700371 * <p><b>Possible values:</b>
372 * <ul>
373 * <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li>
374 * <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li>
375 * <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
376 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700377 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
378 * <p><b>Full capability</b> -
379 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
380 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He379af012014-05-06 11:54:54 -0700381 *
382 * @see CaptureRequest#COLOR_CORRECTION_GAINS
383 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
384 * @see CaptureRequest#CONTROL_AWB_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700385 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -0700386 * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
387 * @see #COLOR_CORRECTION_MODE_FAST
388 * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
389 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700390 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700391 public static final Key<Integer> COLOR_CORRECTION_MODE =
392 new Key<Integer>("android.colorCorrection.mode", int.class);
393
394 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800395 * <p>A color transform matrix to use to transform
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700396 * from sensor RGB color space to output linear sRGB color space.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800397 * <p>This matrix is either set by the camera device when the request
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800398 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700399 * directly by the application in the request when the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800400 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800401 * <p>In the latter case, the camera device may round the matrix to account
402 * for precision issues; the final rounded matrix should be reported back
403 * in this matrix result metadata. The transform should keep the magnitude
404 * of the output color values within <code>[0, 1.0]</code> (assuming input color
405 * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -0800406 * <p>The valid range of each matrix element varies on different devices, but
407 * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700408 * <p><b>Units</b>: Unitless scale factors</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700409 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
410 * <p><b>Full capability</b> -
411 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
412 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800413 *
414 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700415 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700416 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700417 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700418 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM =
419 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700420
421 /**
Igor Murashkin7d2a5c52014-01-17 15:07:52 -0800422 * <p>Gains applying to Bayer raw color channels for
Zhijun Hecc28a412014-02-24 15:11:23 -0800423 * white-balance.</p>
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700424 * <p>These per-channel gains are either set by the camera device
425 * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not
426 * TRANSFORM_MATRIX, or directly by the application in the
427 * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is
428 * TRANSFORM_MATRIX.</p>
429 * <p>The gains in the result metadata are the gains actually
430 * applied by the camera device to the current frame.</p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -0800431 * <p>The valid range of gains varies on different devices, but gains
432 * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
433 * device allows gains below 1.0, this is usually not recommended because
434 * this can create color artifacts.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700435 * <p><b>Units</b>: Unitless gain factors</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700436 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
437 * <p><b>Full capability</b> -
438 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
439 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800440 *
441 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700442 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700443 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700444 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700445 public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS =
446 new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700447
448 /**
Zhijun Hea05e59d2014-07-08 18:27:47 -0700449 * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700450 * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
451 * can not focus on the same point after exiting from the lens. This metadata defines
452 * the high level control of chromatic aberration correction algorithm, which aims to
453 * minimize the chromatic artifacts that may occur along the object boundaries in an
454 * image.</p>
455 * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
456 * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
457 * use the highest-quality aberration correction algorithms, even if it slows down
458 * capture rate. FAST means the camera device will not slow down capture rate when
459 * applying aberration correction.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700460 * <p>LEGACY devices will always be in FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700461 * <p><b>Possible values:</b>
462 * <ul>
463 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li>
464 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li>
465 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
466 * </ul></p>
467 * <p><b>Available values for this device:</b><br>
468 * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700469 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700470 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700471 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
472 * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
473 * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST
474 * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY
Zhijun Hea05e59d2014-07-08 18:27:47 -0700475 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700476 @PublicKey
Zhijun He9e4e4392014-08-18 11:12:32 -0700477 public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE =
478 new Key<Integer>("android.colorCorrection.aberrationMode", int.class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700479
480 /**
Zhijun He379af012014-05-06 11:54:54 -0700481 * <p>The desired setting for the camera device's auto-exposure
482 * algorithm's antibanding compensation.</p>
483 * <p>Some kinds of lighting fixtures, such as some fluorescent
484 * lights, flicker at the rate of the power supply frequency
485 * (60Hz or 50Hz, depending on country). While this is
486 * typically not noticeable to a person, it can be visible to
487 * a camera device. If a camera sets its exposure time to the
488 * wrong value, the flicker may become visible in the
489 * viewfinder as flicker or in a final captured image, as a
490 * set of variable-brightness bands across the image.</p>
491 * <p>Therefore, the auto-exposure routines of camera devices
492 * include antibanding routines that ensure that the chosen
493 * exposure value will not cause such banding. The choice of
494 * exposure time depends on the rate of flicker, which the
495 * camera device can detect automatically, or the expected
496 * rate can be selected by the application using this
497 * control.</p>
498 * <p>A given camera device may not support all of the possible
499 * options for the antibanding mode. The
500 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
501 * the available modes for a given camera device.</p>
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800502 * <p>AUTO mode is the default if it is available on given
503 * camera device. When AUTO mode is not available, the
504 * default will be either 50HZ or 60HZ, and both 50HZ
505 * and 60HZ will be available.</p>
Zhijun He379af012014-05-06 11:54:54 -0700506 * <p>If manual exposure control is enabled (by setting
507 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
508 * then this setting has no effect, and the application must
509 * ensure it selects exposure times that do not cause banding
510 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
511 * the application in this.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700512 * <p><b>Possible values:</b>
513 * <ul>
514 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li>
515 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li>
516 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li>
517 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li>
518 * </ul></p>
519 * <p><b>Available values for this device:</b><br></p>
520 * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700521 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700522 *
523 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
524 * @see CaptureRequest#CONTROL_AE_MODE
525 * @see CaptureRequest#CONTROL_MODE
526 * @see CaptureResult#STATISTICS_SCENE_FLICKER
527 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
528 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
529 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
530 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO
531 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700532 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700533 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE =
534 new Key<Integer>("android.control.aeAntibandingMode", int.class);
535
536 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700537 * <p>Adjustment to auto-exposure (AE) target image
538 * brightness.</p>
539 * <p>The adjustment is measured as a count of steps, with the
540 * step size defined by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} and the
541 * allowed range by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}.</p>
542 * <p>For example, if the exposure value (EV) step is 0.333, '6'
543 * will mean an exposure compensation of +2 EV; -3 will mean an
544 * exposure compensation of -1 EV. One EV represents a doubling
545 * of image brightness. Note that this control will only be
546 * effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control
547 * will take effect even when {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700548 * <p>In the event of exposure compensation value being changed, camera device
549 * may take several frames to reach the newly requested exposure target.
550 * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING
551 * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
552 * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
553 * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700554 * <p><b>Units</b>: Compensation steps</p>
555 * <p><b>Range of valid values:</b><br>
556 * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700557 * <p>This key is available on all devices.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700558 *
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700559 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE
560 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700561 * @see CaptureRequest#CONTROL_AE_LOCK
562 * @see CaptureRequest#CONTROL_AE_MODE
563 * @see CaptureResult#CONTROL_AE_STATE
Zhijun He379af012014-05-06 11:54:54 -0700564 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700565 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700566 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION =
567 new Key<Integer>("android.control.aeExposureCompensation", int.class);
568
569 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700570 * <p>Whether auto-exposure (AE) is currently locked to its latest
Zhijun He379af012014-05-06 11:54:54 -0700571 * calculated values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700572 * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
573 * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
574 * <p>Note that even when AE is locked, the flash may be fired if
575 * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH /
576 * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700577 * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
578 * is ON, the camera device will still adjust its exposure value.</p>
Zhijun He379af012014-05-06 11:54:54 -0700579 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
580 * when AE is already locked, the camera device will not change the exposure time
581 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
582 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
583 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
584 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700585 * <p>Since the camera device has a pipeline of in-flight requests, the settings that
586 * get locked do not necessarily correspond to the settings that were present in the
587 * latest capture result received from the camera device, since additional captures
588 * and AE updates may have occurred even before the result was sent out. If an
589 * application is switching between automatic and manual control and wishes to eliminate
590 * any flicker during the switch, the following procedure is recommended:</p>
591 * <ol>
592 * <li>Starting in auto-AE mode:</li>
593 * <li>Lock AE</li>
594 * <li>Wait for the first result to be output that has the AE locked</li>
595 * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
596 * <li>Submit the capture request, proceed to run manual AE as desired.</li>
597 * </ol>
Zhijun He379af012014-05-06 11:54:54 -0700598 * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700599 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700600 *
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700601 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Zhijun He379af012014-05-06 11:54:54 -0700602 * @see CaptureRequest#CONTROL_AE_MODE
603 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
604 * @see CaptureResult#CONTROL_AE_STATE
605 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
606 * @see CaptureRequest#SENSOR_SENSITIVITY
607 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700608 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700609 public static final Key<Boolean> CONTROL_AE_LOCK =
610 new Key<Boolean>("android.control.aeLock", boolean.class);
611
612 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800613 * <p>The desired mode for the camera device's
614 * auto-exposure routine.</p>
615 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
616 * AUTO.</p>
617 * <p>When set to any of the ON modes, the camera device's
618 * auto-exposure routine is enabled, overriding the
619 * application's selected exposure time, sensor sensitivity,
620 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
621 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
622 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
623 * is selected, the camera device's flash unit controls are
624 * also overridden.</p>
625 * <p>The FLASH modes are only available if the camera device
626 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
627 * <p>If flash TORCH mode is desired, this field must be set to
628 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
629 * <p>When set to any of the ON modes, the values chosen by the
630 * camera device auto-exposure routine for the overridden
631 * fields for a given capture will be available in its
632 * CaptureResult.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700633 * <p><b>Possible values:</b>
634 * <ul>
635 * <li>{@link #CONTROL_AE_MODE_OFF OFF}</li>
636 * <li>{@link #CONTROL_AE_MODE_ON ON}</li>
637 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li>
638 * <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li>
639 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li>
640 * </ul></p>
641 * <p><b>Available values for this device:</b><br>
642 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700643 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800644 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700645 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES
Zhijun He5f2a47f2014-01-16 15:44:41 -0800646 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800647 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
648 * @see CaptureRequest#FLASH_MODE
Igor Murashkinaef3b7e2014-01-15 13:20:37 -0800649 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
650 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He399f05d2014-01-15 11:31:30 -0800651 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800652 * @see #CONTROL_AE_MODE_OFF
653 * @see #CONTROL_AE_MODE_ON
654 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
655 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
656 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
657 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700658 @PublicKey
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800659 public static final Key<Integer> CONTROL_AE_MODE =
660 new Key<Integer>("android.control.aeMode", int.class);
661
662 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700663 * <p>List of metering areas to use for auto-exposure adjustment.</p>
664 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700665 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700666 * <p>The maximum number of regions supported by the device is determined by the value
667 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800668 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700669 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800670 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
671 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -0700672 * bottom-right pixel in the active pixel array.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700673 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -0700674 * for every pixel in the area. This means that a large metering area
675 * with the same weight as a smaller area will have more effect in
676 * the metering result. Metering areas can partially overlap and the
677 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700678 * <p>The weights are relative to weights of other exposure metering regions, so if only one
679 * region is used, all non-zero weights will have the same effect. A region with 0
680 * weight is ignored.</p>
681 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
682 * camera device.</p>
683 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
684 * capture result metadata, the camera device will ignore the sections outside the crop
685 * region and output only the intersection rectangle as the metering region in the result
686 * metadata. If the region is entirely outside the crop region, it will be ignored and
687 * not reported in the result metadata.</p>
688 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
689 * <p><b>Range of valid values:</b><br>
690 * Coordinates must be between <code>[(0,0), (width, height))</code> of
691 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700692 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800693 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700694 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800695 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800696 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700697 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700698 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -0700699 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS =
700 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700701
702 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700703 * <p>Range over which the auto-exposure routine can
704 * adjust the capture frame rate to maintain good
705 * exposure.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700706 * <p>Only constrains auto-exposure (AE) algorithm, not
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700707 * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
708 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
709 * <p><b>Units</b>: Frames per second (FPS)</p>
710 * <p><b>Range of valid values:</b><br>
711 * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
712 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700713 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700714 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Zhijun He379af012014-05-06 11:54:54 -0700715 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700716 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He379af012014-05-06 11:54:54 -0700717 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700718 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700719 public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE =
720 new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Zhijun He379af012014-05-06 11:54:54 -0700721
722 /**
723 * <p>Whether the camera device will trigger a precapture
724 * metering sequence when it processes this request.</p>
725 * <p>This entry is normally set to IDLE, or is not
726 * included at all in the request settings. When included and
727 * set to START, the camera device will trigger the autoexposure
728 * precapture metering sequence.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700729 * <p>The precapture sequence should triggered before starting a
730 * high-quality still capture for final metering decisions to
731 * be made, and for firing pre-capture flash pulses to estimate
732 * scene brightness and required final capture flash power, when
733 * the flash is enabled.</p>
734 * <p>Normally, this entry should be set to START for only a
735 * single request, and the application should wait until the
736 * sequence completes before starting a new one.</p>
737 * <p>The exact effect of auto-exposure (AE) precapture trigger
738 * depends on the current AE mode and state; see
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700739 * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition
740 * details.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700741 * <p>On LEGACY-level devices, the precapture trigger is not supported;
742 * capturing a high-resolution JPEG image will automatically trigger a
743 * precapture sequence before the high-resolution capture, including
744 * potentially firing a pre-capture flash.</p>
745 * <p><b>Possible values:</b>
746 * <ul>
747 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li>
748 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li>
749 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700750 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
751 * <p><b>Limited capability</b> -
752 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
753 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He379af012014-05-06 11:54:54 -0700754 *
755 * @see CaptureResult#CONTROL_AE_STATE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700756 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -0700757 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
758 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
759 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700760 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700761 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
762 new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
763
764 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700765 * <p>Current state of the auto-exposure (AE) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800766 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always
767 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
768 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
769 * the algorithm states to INACTIVE.</p>
770 * <p>The camera device can do several state transitions between two results, if it is
771 * allowed by the state transition table. For example: INACTIVE may never actually be
772 * seen in a result.</p>
773 * <p>The state in the result is the state for this image (in sync with this image): if
774 * AE state becomes CONVERGED, then the image data associated with this result should
775 * be good to use.</p>
776 * <p>Below are state transition tables for different AE modes.</p>
777 * <table>
778 * <thead>
779 * <tr>
780 * <th align="center">State</th>
781 * <th align="center">Transition Cause</th>
782 * <th align="center">New State</th>
783 * <th align="center">Notes</th>
784 * </tr>
785 * </thead>
786 * <tbody>
787 * <tr>
788 * <td align="center">INACTIVE</td>
789 * <td align="center"></td>
790 * <td align="center">INACTIVE</td>
791 * <td align="center">Camera device auto exposure algorithm is disabled</td>
792 * </tr>
793 * </tbody>
794 * </table>
795 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p>
796 * <table>
797 * <thead>
798 * <tr>
799 * <th align="center">State</th>
800 * <th align="center">Transition Cause</th>
801 * <th align="center">New State</th>
802 * <th align="center">Notes</th>
803 * </tr>
804 * </thead>
805 * <tbody>
806 * <tr>
807 * <td align="center">INACTIVE</td>
808 * <td align="center">Camera device initiates AE scan</td>
809 * <td align="center">SEARCHING</td>
810 * <td align="center">Values changing</td>
811 * </tr>
812 * <tr>
813 * <td align="center">INACTIVE</td>
814 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
815 * <td align="center">LOCKED</td>
816 * <td align="center">Values locked</td>
817 * </tr>
818 * <tr>
819 * <td align="center">SEARCHING</td>
820 * <td align="center">Camera device finishes AE scan</td>
821 * <td align="center">CONVERGED</td>
822 * <td align="center">Good values, not changing</td>
823 * </tr>
824 * <tr>
825 * <td align="center">SEARCHING</td>
826 * <td align="center">Camera device finishes AE scan</td>
827 * <td align="center">FLASH_REQUIRED</td>
828 * <td align="center">Converged but too dark w/o flash</td>
829 * </tr>
830 * <tr>
831 * <td align="center">SEARCHING</td>
832 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
833 * <td align="center">LOCKED</td>
834 * <td align="center">Values locked</td>
835 * </tr>
836 * <tr>
837 * <td align="center">CONVERGED</td>
838 * <td align="center">Camera device initiates AE scan</td>
839 * <td align="center">SEARCHING</td>
840 * <td align="center">Values changing</td>
841 * </tr>
842 * <tr>
843 * <td align="center">CONVERGED</td>
844 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
845 * <td align="center">LOCKED</td>
846 * <td align="center">Values locked</td>
847 * </tr>
848 * <tr>
849 * <td align="center">FLASH_REQUIRED</td>
850 * <td align="center">Camera device initiates AE scan</td>
851 * <td align="center">SEARCHING</td>
852 * <td align="center">Values changing</td>
853 * </tr>
854 * <tr>
855 * <td align="center">FLASH_REQUIRED</td>
856 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
857 * <td align="center">LOCKED</td>
858 * <td align="center">Values locked</td>
859 * </tr>
860 * <tr>
861 * <td align="center">LOCKED</td>
862 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
863 * <td align="center">SEARCHING</td>
864 * <td align="center">Values not good after unlock</td>
865 * </tr>
866 * <tr>
867 * <td align="center">LOCKED</td>
868 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
869 * <td align="center">CONVERGED</td>
870 * <td align="center">Values good after unlock</td>
871 * </tr>
872 * <tr>
873 * <td align="center">LOCKED</td>
874 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
875 * <td align="center">FLASH_REQUIRED</td>
876 * <td align="center">Exposure good, but too dark</td>
877 * </tr>
878 * <tr>
879 * <td align="center">PRECAPTURE</td>
880 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
881 * <td align="center">CONVERGED</td>
882 * <td align="center">Ready for high-quality capture</td>
883 * </tr>
884 * <tr>
885 * <td align="center">PRECAPTURE</td>
886 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
887 * <td align="center">LOCKED</td>
888 * <td align="center">Ready for high-quality capture</td>
889 * </tr>
890 * <tr>
891 * <td align="center">Any state</td>
892 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td>
893 * <td align="center">PRECAPTURE</td>
894 * <td align="center">Start AE precapture metering sequence</td>
895 * </tr>
896 * </tbody>
897 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -0800898 * <p>For the above table, the camera device may skip reporting any state changes that happen
899 * without application intervention (i.e. mode switch, trigger, locking). Any state that
900 * can be skipped in that manner is called a transient state.</p>
901 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
902 * listed in above table, it is also legal for the camera device to skip one or more
903 * transient states between two results. See below table for examples:</p>
904 * <table>
905 * <thead>
906 * <tr>
907 * <th align="center">State</th>
908 * <th align="center">Transition Cause</th>
909 * <th align="center">New State</th>
910 * <th align="center">Notes</th>
911 * </tr>
912 * </thead>
913 * <tbody>
914 * <tr>
915 * <td align="center">INACTIVE</td>
916 * <td align="center">Camera device finished AE scan</td>
917 * <td align="center">CONVERGED</td>
918 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
919 * </tr>
920 * <tr>
921 * <td align="center">Any state</td>
922 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
923 * <td align="center">FLASH_REQUIRED</td>
924 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
925 * </tr>
926 * <tr>
927 * <td align="center">Any state</td>
928 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
929 * <td align="center">CONVERGED</td>
930 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
931 * </tr>
932 * <tr>
933 * <td align="center">CONVERGED</td>
934 * <td align="center">Camera device finished AE scan</td>
935 * <td align="center">FLASH_REQUIRED</td>
936 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
937 * </tr>
938 * <tr>
939 * <td align="center">FLASH_REQUIRED</td>
940 * <td align="center">Camera device finished AE scan</td>
941 * <td align="center">CONVERGED</td>
942 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
943 * </tr>
944 * </tbody>
945 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700946 * <p><b>Possible values:</b>
947 * <ul>
948 * <li>{@link #CONTROL_AE_STATE_INACTIVE INACTIVE}</li>
949 * <li>{@link #CONTROL_AE_STATE_SEARCHING SEARCHING}</li>
950 * <li>{@link #CONTROL_AE_STATE_CONVERGED CONVERGED}</li>
951 * <li>{@link #CONTROL_AE_STATE_LOCKED LOCKED}</li>
952 * <li>{@link #CONTROL_AE_STATE_FLASH_REQUIRED FLASH_REQUIRED}</li>
953 * <li>{@link #CONTROL_AE_STATE_PRECAPTURE PRECAPTURE}</li>
954 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700955 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
956 * <p><b>Limited capability</b> -
957 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
958 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800959 *
960 * @see CaptureRequest#CONTROL_AE_LOCK
961 * @see CaptureRequest#CONTROL_AE_MODE
962 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
963 * @see CaptureRequest#CONTROL_MODE
964 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700965 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700966 * @see #CONTROL_AE_STATE_INACTIVE
967 * @see #CONTROL_AE_STATE_SEARCHING
968 * @see #CONTROL_AE_STATE_CONVERGED
969 * @see #CONTROL_AE_STATE_LOCKED
970 * @see #CONTROL_AE_STATE_FLASH_REQUIRED
971 * @see #CONTROL_AE_STATE_PRECAPTURE
972 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700973 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700974 public static final Key<Integer> CONTROL_AE_STATE =
975 new Key<Integer>("android.control.aeState", int.class);
976
977 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700978 * <p>Whether auto-focus (AF) is currently enabled, and what
979 * mode it is set to.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -0800980 * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -0800981 * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>). Also note that
982 * when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, the behavior of AF is device
983 * dependent. It is recommended to lock AF by using {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} before
984 * setting {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} to OFF, or set AF mode to OFF when AE is OFF.</p>
Zhijun He78146ec2014-01-14 18:12:13 -0800985 * <p>If the lens is controlled by the camera device auto-focus algorithm,
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -0800986 * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState}
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700987 * in result metadata.</p>
988 * <p><b>Possible values:</b>
989 * <ul>
990 * <li>{@link #CONTROL_AF_MODE_OFF OFF}</li>
991 * <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li>
992 * <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li>
993 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li>
994 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li>
995 * <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li>
996 * </ul></p>
997 * <p><b>Available values for this device:</b><br>
998 * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p>
999 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001000 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001001 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001002 * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001003 * @see CaptureResult#CONTROL_AF_STATE
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001004 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001005 * @see CaptureRequest#CONTROL_MODE
Zhijun Hecc28a412014-02-24 15:11:23 -08001006 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001007 * @see #CONTROL_AF_MODE_OFF
1008 * @see #CONTROL_AF_MODE_AUTO
1009 * @see #CONTROL_AF_MODE_MACRO
1010 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
1011 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
1012 * @see #CONTROL_AF_MODE_EDOF
1013 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001014 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001015 public static final Key<Integer> CONTROL_AF_MODE =
1016 new Key<Integer>("android.control.afMode", int.class);
1017
1018 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001019 * <p>List of metering areas to use for auto-focus.</p>
1020 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001021 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001022 * <p>The maximum number of focus areas supported by the device is determined by the value
1023 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001024 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001025 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001026 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1027 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001028 * bottom-right pixel in the active pixel array.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001029 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001030 * for every pixel in the area. This means that a large metering area
1031 * with the same weight as a smaller area will have more effect in
1032 * the metering result. Metering areas can partially overlap and the
1033 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001034 * <p>The weights are relative to weights of other metering regions, so if only one region
1035 * is used, all non-zero weights will have the same effect. A region with 0 weight is
1036 * ignored.</p>
1037 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
1038 * camera device.</p>
1039 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
1040 * capture result metadata, the camera device will ignore the sections outside the crop
1041 * region and output only the intersection rectangle as the metering region in the result
1042 * metadata. If the region is entirely outside the crop region, it will be ignored and
1043 * not reported in the result metadata.</p>
1044 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
1045 * <p><b>Range of valid values:</b><br>
1046 * Coordinates must be between <code>[(0,0), (width, height))</code> of
1047 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001048 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001049 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001050 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001051 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001052 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001053 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001054 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -07001055 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS =
1056 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001057
1058 /**
Zhijun He379af012014-05-06 11:54:54 -07001059 * <p>Whether the camera device will trigger autofocus for this request.</p>
1060 * <p>This entry is normally set to IDLE, or is not
1061 * included at all in the request settings.</p>
1062 * <p>When included and set to START, the camera device will trigger the
1063 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
1064 * <p>When set to CANCEL, the camera device will cancel any active trigger,
1065 * and return to its initial AF state.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001066 * <p>Generally, applications should set this entry to START or CANCEL for only a
1067 * single capture, and then return it to IDLE (or not set at all). Specifying
1068 * START for multiple captures in a row means restarting the AF operation over
1069 * and over again.</p>
1070 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001071 * <p><b>Possible values:</b>
1072 * <ul>
1073 * <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li>
1074 * <li>{@link #CONTROL_AF_TRIGGER_START START}</li>
1075 * <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li>
1076 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001077 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001078 *
1079 * @see CaptureResult#CONTROL_AF_STATE
1080 * @see #CONTROL_AF_TRIGGER_IDLE
1081 * @see #CONTROL_AF_TRIGGER_START
1082 * @see #CONTROL_AF_TRIGGER_CANCEL
1083 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001084 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001085 public static final Key<Integer> CONTROL_AF_TRIGGER =
1086 new Key<Integer>("android.control.afTrigger", int.class);
1087
1088 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001089 * <p>Current state of auto-focus (AF) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001090 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
1091 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1092 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1093 * the algorithm states to INACTIVE.</p>
1094 * <p>The camera device can do several state transitions between two results, if it is
1095 * allowed by the state transition table. For example: INACTIVE may never actually be
1096 * seen in a result.</p>
1097 * <p>The state in the result is the state for this image (in sync with this image): if
1098 * AF state becomes FOCUSED, then the image data associated with this result should
1099 * be sharp.</p>
1100 * <p>Below are state transition tables for different AF modes.</p>
1101 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p>
1102 * <table>
1103 * <thead>
1104 * <tr>
1105 * <th align="center">State</th>
1106 * <th align="center">Transition Cause</th>
1107 * <th align="center">New State</th>
1108 * <th align="center">Notes</th>
1109 * </tr>
1110 * </thead>
1111 * <tbody>
1112 * <tr>
1113 * <td align="center">INACTIVE</td>
1114 * <td align="center"></td>
1115 * <td align="center">INACTIVE</td>
1116 * <td align="center">Never changes</td>
1117 * </tr>
1118 * </tbody>
1119 * </table>
1120 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1121 * <table>
1122 * <thead>
1123 * <tr>
1124 * <th align="center">State</th>
1125 * <th align="center">Transition Cause</th>
1126 * <th align="center">New State</th>
1127 * <th align="center">Notes</th>
1128 * </tr>
1129 * </thead>
1130 * <tbody>
1131 * <tr>
1132 * <td align="center">INACTIVE</td>
1133 * <td align="center">AF_TRIGGER</td>
1134 * <td align="center">ACTIVE_SCAN</td>
1135 * <td align="center">Start AF sweep, Lens now moving</td>
1136 * </tr>
1137 * <tr>
1138 * <td align="center">ACTIVE_SCAN</td>
1139 * <td align="center">AF sweep done</td>
1140 * <td align="center">FOCUSED_LOCKED</td>
1141 * <td align="center">Focused, Lens now locked</td>
1142 * </tr>
1143 * <tr>
1144 * <td align="center">ACTIVE_SCAN</td>
1145 * <td align="center">AF sweep done</td>
1146 * <td align="center">NOT_FOCUSED_LOCKED</td>
1147 * <td align="center">Not focused, Lens now locked</td>
1148 * </tr>
1149 * <tr>
1150 * <td align="center">ACTIVE_SCAN</td>
1151 * <td align="center">AF_CANCEL</td>
1152 * <td align="center">INACTIVE</td>
1153 * <td align="center">Cancel/reset AF, Lens now locked</td>
1154 * </tr>
1155 * <tr>
1156 * <td align="center">FOCUSED_LOCKED</td>
1157 * <td align="center">AF_CANCEL</td>
1158 * <td align="center">INACTIVE</td>
1159 * <td align="center">Cancel/reset AF</td>
1160 * </tr>
1161 * <tr>
1162 * <td align="center">FOCUSED_LOCKED</td>
1163 * <td align="center">AF_TRIGGER</td>
1164 * <td align="center">ACTIVE_SCAN</td>
1165 * <td align="center">Start new sweep, Lens now moving</td>
1166 * </tr>
1167 * <tr>
1168 * <td align="center">NOT_FOCUSED_LOCKED</td>
1169 * <td align="center">AF_CANCEL</td>
1170 * <td align="center">INACTIVE</td>
1171 * <td align="center">Cancel/reset AF</td>
1172 * </tr>
1173 * <tr>
1174 * <td align="center">NOT_FOCUSED_LOCKED</td>
1175 * <td align="center">AF_TRIGGER</td>
1176 * <td align="center">ACTIVE_SCAN</td>
1177 * <td align="center">Start new sweep, Lens now moving</td>
1178 * </tr>
1179 * <tr>
1180 * <td align="center">Any state</td>
1181 * <td align="center">Mode change</td>
1182 * <td align="center">INACTIVE</td>
1183 * <td align="center"></td>
1184 * </tr>
1185 * </tbody>
1186 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001187 * <p>For the above table, the camera device may skip reporting any state changes that happen
1188 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1189 * can be skipped in that manner is called a transient state.</p>
1190 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1191 * state transitions listed in above table, it is also legal for the camera device to skip
1192 * one or more transient states between two results. See below table for examples:</p>
1193 * <table>
1194 * <thead>
1195 * <tr>
1196 * <th align="center">State</th>
1197 * <th align="center">Transition Cause</th>
1198 * <th align="center">New State</th>
1199 * <th align="center">Notes</th>
1200 * </tr>
1201 * </thead>
1202 * <tbody>
1203 * <tr>
1204 * <td align="center">INACTIVE</td>
1205 * <td align="center">AF_TRIGGER</td>
1206 * <td align="center">FOCUSED_LOCKED</td>
1207 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
1208 * </tr>
1209 * <tr>
1210 * <td align="center">INACTIVE</td>
1211 * <td align="center">AF_TRIGGER</td>
1212 * <td align="center">NOT_FOCUSED_LOCKED</td>
1213 * <td align="center">Focus failed after a scan, lens is now locked.</td>
1214 * </tr>
1215 * <tr>
1216 * <td align="center">FOCUSED_LOCKED</td>
1217 * <td align="center">AF_TRIGGER</td>
1218 * <td align="center">FOCUSED_LOCKED</td>
1219 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
1220 * </tr>
1221 * <tr>
1222 * <td align="center">NOT_FOCUSED_LOCKED</td>
1223 * <td align="center">AF_TRIGGER</td>
1224 * <td align="center">FOCUSED_LOCKED</td>
1225 * <td align="center">Focus is good after a scan, lens is not locked.</td>
1226 * </tr>
1227 * </tbody>
1228 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -08001229 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
1230 * <table>
1231 * <thead>
1232 * <tr>
1233 * <th align="center">State</th>
1234 * <th align="center">Transition Cause</th>
1235 * <th align="center">New State</th>
1236 * <th align="center">Notes</th>
1237 * </tr>
1238 * </thead>
1239 * <tbody>
1240 * <tr>
1241 * <td align="center">INACTIVE</td>
1242 * <td align="center">Camera device initiates new scan</td>
1243 * <td align="center">PASSIVE_SCAN</td>
1244 * <td align="center">Start AF scan, Lens now moving</td>
1245 * </tr>
1246 * <tr>
1247 * <td align="center">INACTIVE</td>
1248 * <td align="center">AF_TRIGGER</td>
1249 * <td align="center">NOT_FOCUSED_LOCKED</td>
1250 * <td align="center">AF state query, Lens now locked</td>
1251 * </tr>
1252 * <tr>
1253 * <td align="center">PASSIVE_SCAN</td>
1254 * <td align="center">Camera device completes current scan</td>
1255 * <td align="center">PASSIVE_FOCUSED</td>
1256 * <td align="center">End AF scan, Lens now locked</td>
1257 * </tr>
1258 * <tr>
1259 * <td align="center">PASSIVE_SCAN</td>
1260 * <td align="center">Camera device fails current scan</td>
1261 * <td align="center">PASSIVE_UNFOCUSED</td>
1262 * <td align="center">End AF scan, Lens now locked</td>
1263 * </tr>
1264 * <tr>
1265 * <td align="center">PASSIVE_SCAN</td>
1266 * <td align="center">AF_TRIGGER</td>
1267 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001268 * <td align="center">Immediate transition, if focus is good. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001269 * </tr>
1270 * <tr>
1271 * <td align="center">PASSIVE_SCAN</td>
1272 * <td align="center">AF_TRIGGER</td>
1273 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001274 * <td align="center">Immediate transition, if focus is bad. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001275 * </tr>
1276 * <tr>
1277 * <td align="center">PASSIVE_SCAN</td>
1278 * <td align="center">AF_CANCEL</td>
1279 * <td align="center">INACTIVE</td>
1280 * <td align="center">Reset lens position, Lens now locked</td>
1281 * </tr>
1282 * <tr>
1283 * <td align="center">PASSIVE_FOCUSED</td>
1284 * <td align="center">Camera device initiates new scan</td>
1285 * <td align="center">PASSIVE_SCAN</td>
1286 * <td align="center">Start AF scan, Lens now moving</td>
1287 * </tr>
1288 * <tr>
1289 * <td align="center">PASSIVE_UNFOCUSED</td>
1290 * <td align="center">Camera device initiates new scan</td>
1291 * <td align="center">PASSIVE_SCAN</td>
1292 * <td align="center">Start AF scan, Lens now moving</td>
1293 * </tr>
1294 * <tr>
1295 * <td align="center">PASSIVE_FOCUSED</td>
1296 * <td align="center">AF_TRIGGER</td>
1297 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001298 * <td align="center">Immediate transition, lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001299 * </tr>
1300 * <tr>
1301 * <td align="center">PASSIVE_UNFOCUSED</td>
1302 * <td align="center">AF_TRIGGER</td>
1303 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001304 * <td align="center">Immediate transition, lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001305 * </tr>
1306 * <tr>
1307 * <td align="center">FOCUSED_LOCKED</td>
1308 * <td align="center">AF_TRIGGER</td>
1309 * <td align="center">FOCUSED_LOCKED</td>
1310 * <td align="center">No effect</td>
1311 * </tr>
1312 * <tr>
1313 * <td align="center">FOCUSED_LOCKED</td>
1314 * <td align="center">AF_CANCEL</td>
1315 * <td align="center">INACTIVE</td>
1316 * <td align="center">Restart AF scan</td>
1317 * </tr>
1318 * <tr>
1319 * <td align="center">NOT_FOCUSED_LOCKED</td>
1320 * <td align="center">AF_TRIGGER</td>
1321 * <td align="center">NOT_FOCUSED_LOCKED</td>
1322 * <td align="center">No effect</td>
1323 * </tr>
1324 * <tr>
1325 * <td align="center">NOT_FOCUSED_LOCKED</td>
1326 * <td align="center">AF_CANCEL</td>
1327 * <td align="center">INACTIVE</td>
1328 * <td align="center">Restart AF scan</td>
1329 * </tr>
1330 * </tbody>
1331 * </table>
1332 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p>
1333 * <table>
1334 * <thead>
1335 * <tr>
1336 * <th align="center">State</th>
1337 * <th align="center">Transition Cause</th>
1338 * <th align="center">New State</th>
1339 * <th align="center">Notes</th>
1340 * </tr>
1341 * </thead>
1342 * <tbody>
1343 * <tr>
1344 * <td align="center">INACTIVE</td>
1345 * <td align="center">Camera device initiates new scan</td>
1346 * <td align="center">PASSIVE_SCAN</td>
1347 * <td align="center">Start AF scan, Lens now moving</td>
1348 * </tr>
1349 * <tr>
1350 * <td align="center">INACTIVE</td>
1351 * <td align="center">AF_TRIGGER</td>
1352 * <td align="center">NOT_FOCUSED_LOCKED</td>
1353 * <td align="center">AF state query, Lens now locked</td>
1354 * </tr>
1355 * <tr>
1356 * <td align="center">PASSIVE_SCAN</td>
1357 * <td align="center">Camera device completes current scan</td>
1358 * <td align="center">PASSIVE_FOCUSED</td>
1359 * <td align="center">End AF scan, Lens now locked</td>
1360 * </tr>
1361 * <tr>
1362 * <td align="center">PASSIVE_SCAN</td>
1363 * <td align="center">Camera device fails current scan</td>
1364 * <td align="center">PASSIVE_UNFOCUSED</td>
1365 * <td align="center">End AF scan, Lens now locked</td>
1366 * </tr>
1367 * <tr>
1368 * <td align="center">PASSIVE_SCAN</td>
1369 * <td align="center">AF_TRIGGER</td>
1370 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001371 * <td align="center">Eventual transition once the focus is good. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001372 * </tr>
1373 * <tr>
1374 * <td align="center">PASSIVE_SCAN</td>
1375 * <td align="center">AF_TRIGGER</td>
1376 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001377 * <td align="center">Eventual transition if cannot find focus. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001378 * </tr>
1379 * <tr>
1380 * <td align="center">PASSIVE_SCAN</td>
1381 * <td align="center">AF_CANCEL</td>
1382 * <td align="center">INACTIVE</td>
1383 * <td align="center">Reset lens position, Lens now locked</td>
1384 * </tr>
1385 * <tr>
1386 * <td align="center">PASSIVE_FOCUSED</td>
1387 * <td align="center">Camera device initiates new scan</td>
1388 * <td align="center">PASSIVE_SCAN</td>
1389 * <td align="center">Start AF scan, Lens now moving</td>
1390 * </tr>
1391 * <tr>
1392 * <td align="center">PASSIVE_UNFOCUSED</td>
1393 * <td align="center">Camera device initiates new scan</td>
1394 * <td align="center">PASSIVE_SCAN</td>
1395 * <td align="center">Start AF scan, Lens now moving</td>
1396 * </tr>
1397 * <tr>
1398 * <td align="center">PASSIVE_FOCUSED</td>
1399 * <td align="center">AF_TRIGGER</td>
1400 * <td align="center">FOCUSED_LOCKED</td>
1401 * <td align="center">Immediate trans. Lens now locked</td>
1402 * </tr>
1403 * <tr>
1404 * <td align="center">PASSIVE_UNFOCUSED</td>
1405 * <td align="center">AF_TRIGGER</td>
1406 * <td align="center">NOT_FOCUSED_LOCKED</td>
1407 * <td align="center">Immediate trans. Lens now locked</td>
1408 * </tr>
1409 * <tr>
1410 * <td align="center">FOCUSED_LOCKED</td>
1411 * <td align="center">AF_TRIGGER</td>
1412 * <td align="center">FOCUSED_LOCKED</td>
1413 * <td align="center">No effect</td>
1414 * </tr>
1415 * <tr>
1416 * <td align="center">FOCUSED_LOCKED</td>
1417 * <td align="center">AF_CANCEL</td>
1418 * <td align="center">INACTIVE</td>
1419 * <td align="center">Restart AF scan</td>
1420 * </tr>
1421 * <tr>
1422 * <td align="center">NOT_FOCUSED_LOCKED</td>
1423 * <td align="center">AF_TRIGGER</td>
1424 * <td align="center">NOT_FOCUSED_LOCKED</td>
1425 * <td align="center">No effect</td>
1426 * </tr>
1427 * <tr>
1428 * <td align="center">NOT_FOCUSED_LOCKED</td>
1429 * <td align="center">AF_CANCEL</td>
1430 * <td align="center">INACTIVE</td>
1431 * <td align="center">Restart AF scan</td>
1432 * </tr>
1433 * </tbody>
1434 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001435 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1436 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1437 * camera device. When a trigger is included in a mode switch request, the trigger
1438 * will be evaluated in the context of the new mode in the request.
1439 * See below table for examples:</p>
1440 * <table>
1441 * <thead>
1442 * <tr>
1443 * <th align="center">State</th>
1444 * <th align="center">Transition Cause</th>
1445 * <th align="center">New State</th>
1446 * <th align="center">Notes</th>
1447 * </tr>
1448 * </thead>
1449 * <tbody>
1450 * <tr>
1451 * <td align="center">any state</td>
1452 * <td align="center">CAF--&gt;AUTO mode switch</td>
1453 * <td align="center">INACTIVE</td>
1454 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
1455 * </tr>
1456 * <tr>
1457 * <td align="center">any state</td>
1458 * <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
1459 * <td align="center">trigger-reachable states from INACTIVE</td>
1460 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
1461 * </tr>
1462 * <tr>
1463 * <td align="center">any state</td>
1464 * <td align="center">AUTO--&gt;CAF mode switch</td>
1465 * <td align="center">passively reachable states from INACTIVE</td>
1466 * <td align="center">Mode switch without trigger, passive transient state is skipped</td>
1467 * </tr>
1468 * </tbody>
1469 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001470 * <p><b>Possible values:</b>
1471 * <ul>
1472 * <li>{@link #CONTROL_AF_STATE_INACTIVE INACTIVE}</li>
1473 * <li>{@link #CONTROL_AF_STATE_PASSIVE_SCAN PASSIVE_SCAN}</li>
1474 * <li>{@link #CONTROL_AF_STATE_PASSIVE_FOCUSED PASSIVE_FOCUSED}</li>
1475 * <li>{@link #CONTROL_AF_STATE_ACTIVE_SCAN ACTIVE_SCAN}</li>
1476 * <li>{@link #CONTROL_AF_STATE_FOCUSED_LOCKED FOCUSED_LOCKED}</li>
1477 * <li>{@link #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED NOT_FOCUSED_LOCKED}</li>
1478 * <li>{@link #CONTROL_AF_STATE_PASSIVE_UNFOCUSED PASSIVE_UNFOCUSED}</li>
1479 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001480 * <p>This key is available on all devices.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001481 *
1482 * @see CaptureRequest#CONTROL_AF_MODE
1483 * @see CaptureRequest#CONTROL_MODE
1484 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001485 * @see #CONTROL_AF_STATE_INACTIVE
1486 * @see #CONTROL_AF_STATE_PASSIVE_SCAN
1487 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED
1488 * @see #CONTROL_AF_STATE_ACTIVE_SCAN
1489 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED
1490 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07001491 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001492 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001493 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001494 public static final Key<Integer> CONTROL_AF_STATE =
1495 new Key<Integer>("android.control.afState", int.class);
1496
1497 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001498 * <p>Whether auto-white balance (AWB) is currently locked to its
Zhijun He379af012014-05-06 11:54:54 -07001499 * latest calculated values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001500 * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
1501 * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
1502 * <p>Since the camera device has a pipeline of in-flight requests, the settings that
1503 * get locked do not necessarily correspond to the settings that were present in the
1504 * latest capture result received from the camera device, since additional captures
1505 * and AWB updates may have occurred even before the result was sent out. If an
1506 * application is switching between automatic and manual control and wishes to eliminate
1507 * any flicker during the switch, the following procedure is recommended:</p>
1508 * <ol>
1509 * <li>Starting in auto-AWB mode:</li>
1510 * <li>Lock AWB</li>
1511 * <li>Wait for the first result to be output that has the AWB locked</li>
1512 * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
1513 * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
1514 * </ol>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001515 * <p>Note that AWB lock is only meaningful when
1516 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes,
1517 * AWB is already fixed to a specific setting.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001518 * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
1519 * <p>This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001520 *
1521 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He379af012014-05-06 11:54:54 -07001522 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001523 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001524 public static final Key<Boolean> CONTROL_AWB_LOCK =
1525 new Key<Boolean>("android.control.awbLock", boolean.class);
1526
1527 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001528 * <p>Whether auto-white balance (AWB) is currently setting the color
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001529 * transform fields, and what its illumination target
Zhijun Hecc28a412014-02-24 15:11:23 -08001530 * is.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001531 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001532 * <p>When set to the ON mode, the camera device's auto-white balance
Zhijun He399f05d2014-01-15 11:31:30 -08001533 * routine is enabled, overriding the application's selected
1534 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001535 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}. Note that when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
1536 * is OFF, the behavior of AWB is device dependent. It is recommened to
1537 * also set AWB mode to OFF or lock AWB by using {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} before
1538 * setting AE mode to OFF.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001539 * <p>When set to the OFF mode, the camera device's auto-white balance
Zhijun Hecc28a412014-02-24 15:11:23 -08001540 * routine is disabled. The application manually controls the white
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001541 * 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 -08001542 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001543 * <p>When set to any other modes, the camera device's auto-white
1544 * balance routine is disabled. The camera device uses each
1545 * particular illumination target for white balance
1546 * adjustment. The application's values for
1547 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform},
1548 * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
1549 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001550 * <p><b>Possible values:</b>
1551 * <ul>
1552 * <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li>
1553 * <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li>
1554 * <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li>
1555 * <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li>
1556 * <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li>
1557 * <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li>
1558 * <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li>
1559 * <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li>
1560 * <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li>
1561 * </ul></p>
1562 * <p><b>Available values for this device:</b><br>
1563 * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001564 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001565 *
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001566 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Zhijun He5f2a47f2014-01-16 15:44:41 -08001567 * @see CaptureRequest#COLOR_CORRECTION_MODE
1568 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001569 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001570 * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001571 * @see CaptureRequest#CONTROL_AWB_LOCK
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001572 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001573 * @see #CONTROL_AWB_MODE_OFF
1574 * @see #CONTROL_AWB_MODE_AUTO
1575 * @see #CONTROL_AWB_MODE_INCANDESCENT
1576 * @see #CONTROL_AWB_MODE_FLUORESCENT
1577 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
1578 * @see #CONTROL_AWB_MODE_DAYLIGHT
1579 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
1580 * @see #CONTROL_AWB_MODE_TWILIGHT
1581 * @see #CONTROL_AWB_MODE_SHADE
1582 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001583 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001584 public static final Key<Integer> CONTROL_AWB_MODE =
1585 new Key<Integer>("android.control.awbMode", int.class);
1586
1587 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001588 * <p>List of metering areas to use for auto-white-balance illuminant
Ruben Brunkf59521d2014-02-03 17:14:33 -08001589 * estimation.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001590 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001591 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001592 * <p>The maximum number of regions supported by the device is determined by the value
1593 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001594 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001595 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001596 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1597 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001598 * bottom-right pixel in the active pixel array.</p>
1599 * <p>The weight must range from 0 to 1000, and represents a weight
1600 * for every pixel in the area. This means that a large metering area
1601 * with the same weight as a smaller area will have more effect in
1602 * the metering result. Metering areas can partially overlap and the
1603 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001604 * <p>The weights are relative to weights of other white balance metering regions, so if
1605 * only one region is used, all non-zero weights will have the same effect. A region with
1606 * 0 weight is ignored.</p>
1607 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
1608 * camera device.</p>
1609 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
1610 * capture result metadata, the camera device will ignore the sections outside the crop
1611 * region and output only the intersection rectangle as the metering region in the result
1612 * metadata. If the region is entirely outside the crop region, it will be ignored and
1613 * not reported in the result metadata.</p>
1614 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
1615 * <p><b>Range of valid values:</b><br>
1616 * Coordinates must be between <code>[(0,0), (width, height))</code> of
1617 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001618 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001619 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001620 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001621 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001622 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001623 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001624 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -07001625 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS =
1626 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001627
1628 /**
Zhijun He379af012014-05-06 11:54:54 -07001629 * <p>Information to the camera device 3A (auto-exposure,
1630 * auto-focus, auto-white balance) routines about the purpose
1631 * of this capture, to help the camera device to decide optimal 3A
1632 * strategy.</p>
1633 * <p>This control (except for MANUAL) is only effective if
1634 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001635 * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Zhijun He0e99c222015-01-29 15:26:05 -08001636 * contains OPAQUE_REPROCESSING. MANUAL will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001637 * contains MANUAL_SENSOR. Other intent values are always supported.</p>
1638 * <p><b>Possible values:</b>
1639 * <ul>
1640 * <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li>
1641 * <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li>
1642 * <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li>
1643 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li>
1644 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li>
1645 * <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
1646 * <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li>
1647 * </ul></p>
1648 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001649 *
1650 * @see CaptureRequest#CONTROL_MODE
1651 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1652 * @see #CONTROL_CAPTURE_INTENT_CUSTOM
1653 * @see #CONTROL_CAPTURE_INTENT_PREVIEW
1654 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
1655 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
1656 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
1657 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
1658 * @see #CONTROL_CAPTURE_INTENT_MANUAL
1659 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001660 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001661 public static final Key<Integer> CONTROL_CAPTURE_INTENT =
1662 new Key<Integer>("android.control.captureIntent", int.class);
1663
1664 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001665 * <p>Current state of auto-white balance (AWB) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001666 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always
1667 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1668 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1669 * the algorithm states to INACTIVE.</p>
1670 * <p>The camera device can do several state transitions between two results, if it is
1671 * allowed by the state transition table. So INACTIVE may never actually be seen in
1672 * a result.</p>
1673 * <p>The state in the result is the state for this image (in sync with this image): if
1674 * AWB state becomes CONVERGED, then the image data associated with this result should
1675 * be good to use.</p>
1676 * <p>Below are state transition tables for different AWB modes.</p>
1677 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p>
1678 * <table>
1679 * <thead>
1680 * <tr>
1681 * <th align="center">State</th>
1682 * <th align="center">Transition Cause</th>
1683 * <th align="center">New State</th>
1684 * <th align="center">Notes</th>
1685 * </tr>
1686 * </thead>
1687 * <tbody>
1688 * <tr>
1689 * <td align="center">INACTIVE</td>
1690 * <td align="center"></td>
1691 * <td align="center">INACTIVE</td>
1692 * <td align="center">Camera device auto white balance algorithm is disabled</td>
1693 * </tr>
1694 * </tbody>
1695 * </table>
1696 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p>
1697 * <table>
1698 * <thead>
1699 * <tr>
1700 * <th align="center">State</th>
1701 * <th align="center">Transition Cause</th>
1702 * <th align="center">New State</th>
1703 * <th align="center">Notes</th>
1704 * </tr>
1705 * </thead>
1706 * <tbody>
1707 * <tr>
1708 * <td align="center">INACTIVE</td>
1709 * <td align="center">Camera device initiates AWB scan</td>
1710 * <td align="center">SEARCHING</td>
1711 * <td align="center">Values changing</td>
1712 * </tr>
1713 * <tr>
1714 * <td align="center">INACTIVE</td>
1715 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1716 * <td align="center">LOCKED</td>
1717 * <td align="center">Values locked</td>
1718 * </tr>
1719 * <tr>
1720 * <td align="center">SEARCHING</td>
1721 * <td align="center">Camera device finishes AWB scan</td>
1722 * <td align="center">CONVERGED</td>
1723 * <td align="center">Good values, not changing</td>
1724 * </tr>
1725 * <tr>
1726 * <td align="center">SEARCHING</td>
1727 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1728 * <td align="center">LOCKED</td>
1729 * <td align="center">Values locked</td>
1730 * </tr>
1731 * <tr>
1732 * <td align="center">CONVERGED</td>
1733 * <td align="center">Camera device initiates AWB scan</td>
1734 * <td align="center">SEARCHING</td>
1735 * <td align="center">Values changing</td>
1736 * </tr>
1737 * <tr>
1738 * <td align="center">CONVERGED</td>
1739 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1740 * <td align="center">LOCKED</td>
1741 * <td align="center">Values locked</td>
1742 * </tr>
1743 * <tr>
1744 * <td align="center">LOCKED</td>
1745 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1746 * <td align="center">SEARCHING</td>
1747 * <td align="center">Values not good after unlock</td>
1748 * </tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001749 * </tbody>
1750 * </table>
1751 * <p>For the above table, the camera device may skip reporting any state changes that happen
1752 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1753 * can be skipped in that manner is called a transient state.</p>
1754 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1755 * listed in above table, it is also legal for the camera device to skip one or more
1756 * transient states between two results. See below table for examples:</p>
1757 * <table>
1758 * <thead>
1759 * <tr>
1760 * <th align="center">State</th>
1761 * <th align="center">Transition Cause</th>
1762 * <th align="center">New State</th>
1763 * <th align="center">Notes</th>
1764 * </tr>
1765 * </thead>
1766 * <tbody>
1767 * <tr>
1768 * <td align="center">INACTIVE</td>
1769 * <td align="center">Camera device finished AWB scan</td>
1770 * <td align="center">CONVERGED</td>
1771 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1772 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001773 * <tr>
1774 * <td align="center">LOCKED</td>
1775 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1776 * <td align="center">CONVERGED</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001777 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001778 * </tr>
1779 * </tbody>
1780 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001781 * <p><b>Possible values:</b>
1782 * <ul>
1783 * <li>{@link #CONTROL_AWB_STATE_INACTIVE INACTIVE}</li>
1784 * <li>{@link #CONTROL_AWB_STATE_SEARCHING SEARCHING}</li>
1785 * <li>{@link #CONTROL_AWB_STATE_CONVERGED CONVERGED}</li>
1786 * <li>{@link #CONTROL_AWB_STATE_LOCKED LOCKED}</li>
1787 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001788 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1789 * <p><b>Limited capability</b> -
1790 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1791 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001792 *
1793 * @see CaptureRequest#CONTROL_AWB_LOCK
1794 * @see CaptureRequest#CONTROL_AWB_MODE
1795 * @see CaptureRequest#CONTROL_MODE
1796 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001797 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001798 * @see #CONTROL_AWB_STATE_INACTIVE
1799 * @see #CONTROL_AWB_STATE_SEARCHING
1800 * @see #CONTROL_AWB_STATE_CONVERGED
1801 * @see #CONTROL_AWB_STATE_LOCKED
1802 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001803 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001804 public static final Key<Integer> CONTROL_AWB_STATE =
1805 new Key<Integer>("android.control.awbState", int.class);
1806
1807 /**
Zhijun He379af012014-05-06 11:54:54 -07001808 * <p>A special color effect to apply.</p>
1809 * <p>When this mode is set, a color effect will be applied
1810 * to images produced by the camera device. The interpretation
1811 * and implementation of these color effects is left to the
1812 * implementor of the camera device, and should not be
1813 * depended on to be consistent (or present) across all
1814 * devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001815 * <p><b>Possible values:</b>
1816 * <ul>
1817 * <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li>
1818 * <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li>
1819 * <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li>
1820 * <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li>
1821 * <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li>
1822 * <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li>
1823 * <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li>
1824 * <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li>
1825 * <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li>
1826 * </ul></p>
1827 * <p><b>Available values for this device:</b><br>
1828 * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001829 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001830 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001831 * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
Zhijun He379af012014-05-06 11:54:54 -07001832 * @see #CONTROL_EFFECT_MODE_OFF
1833 * @see #CONTROL_EFFECT_MODE_MONO
1834 * @see #CONTROL_EFFECT_MODE_NEGATIVE
1835 * @see #CONTROL_EFFECT_MODE_SOLARIZE
1836 * @see #CONTROL_EFFECT_MODE_SEPIA
1837 * @see #CONTROL_EFFECT_MODE_POSTERIZE
1838 * @see #CONTROL_EFFECT_MODE_WHITEBOARD
1839 * @see #CONTROL_EFFECT_MODE_BLACKBOARD
1840 * @see #CONTROL_EFFECT_MODE_AQUA
1841 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001842 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001843 public static final Key<Integer> CONTROL_EFFECT_MODE =
1844 new Key<Integer>("android.control.effectMode", int.class);
1845
1846 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001847 * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
Zhijun Hecc28a412014-02-24 15:11:23 -08001848 * routines.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001849 * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
Zhijun He5f2a47f2014-01-16 15:44:41 -08001850 * by the camera device is disabled. The application must set the fields for
Zhijun Hef3537422013-12-16 16:56:35 -08001851 * capture parameters itself.</p>
1852 * <p>When set to AUTO, the individual algorithm controls in
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001853 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001854 * <p>When set to USE_SCENE_MODE, the individual controls in
Zhijun He5f2a47f2014-01-16 15:44:41 -08001855 * android.control.* are mostly disabled, and the camera device implements
Zhijun Hef3537422013-12-16 16:56:35 -08001856 * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
Zhijun He5f2a47f2014-01-16 15:44:41 -08001857 * as it wishes. The camera device scene mode 3A settings are provided by
Zhijun Hef3537422013-12-16 16:56:35 -08001858 * android.control.sceneModeOverrides.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001859 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1860 * is that this frame will not be used by camera device background 3A statistics
1861 * update, as if this frame is never captured. This mode can be used in the scenario
1862 * where the application doesn't want a 3A manual control capture to affect
1863 * the subsequent auto 3A capture results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001864 * <p><b>Possible values:</b>
1865 * <ul>
1866 * <li>{@link #CONTROL_MODE_OFF OFF}</li>
1867 * <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
1868 * <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
1869 * <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
1870 * </ul></p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -08001871 * <p><b>Available values for this device:</b><br>
1872 * {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001873 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001874 *
1875 * @see CaptureRequest#CONTROL_AF_MODE
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -08001876 * @see CameraCharacteristics#CONTROL_AVAILABLE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001877 * @see #CONTROL_MODE_OFF
1878 * @see #CONTROL_MODE_AUTO
1879 * @see #CONTROL_MODE_USE_SCENE_MODE
Zhijun He2d5e8972014-02-07 16:13:46 -08001880 * @see #CONTROL_MODE_OFF_KEEP_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001881 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001882 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001883 public static final Key<Integer> CONTROL_MODE =
1884 new Key<Integer>("android.control.mode", int.class);
1885
1886 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001887 * <p>Control for which scene mode is currently active.</p>
1888 * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
1889 * capture settings.</p>
Zhijun He379af012014-05-06 11:54:54 -07001890 * <p>This is the mode that that is active when
1891 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
1892 * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001893 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
Zhijun He379af012014-05-06 11:54:54 -07001894 * <p>The interpretation and implementation of these scene modes is left
1895 * to the implementor of the camera device. Their behavior will not be
1896 * consistent across all devices, and any given device may only implement
1897 * a subset of these modes.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001898 * <p><b>Possible values:</b>
1899 * <ul>
1900 * <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li>
1901 * <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li>
1902 * <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li>
1903 * <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li>
1904 * <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li>
1905 * <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li>
1906 * <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li>
1907 * <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li>
1908 * <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li>
1909 * <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li>
1910 * <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li>
1911 * <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li>
1912 * <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li>
1913 * <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li>
1914 * <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li>
1915 * <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
1916 * <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
1917 * <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08001918 * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001919 * </ul></p>
1920 * <p><b>Available values for this device:</b><br>
1921 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001922 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001923 *
1924 * @see CaptureRequest#CONTROL_AE_MODE
1925 * @see CaptureRequest#CONTROL_AF_MODE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001926 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Zhijun He379af012014-05-06 11:54:54 -07001927 * @see CaptureRequest#CONTROL_AWB_MODE
1928 * @see CaptureRequest#CONTROL_MODE
1929 * @see #CONTROL_SCENE_MODE_DISABLED
1930 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
1931 * @see #CONTROL_SCENE_MODE_ACTION
1932 * @see #CONTROL_SCENE_MODE_PORTRAIT
1933 * @see #CONTROL_SCENE_MODE_LANDSCAPE
1934 * @see #CONTROL_SCENE_MODE_NIGHT
1935 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
1936 * @see #CONTROL_SCENE_MODE_THEATRE
1937 * @see #CONTROL_SCENE_MODE_BEACH
1938 * @see #CONTROL_SCENE_MODE_SNOW
1939 * @see #CONTROL_SCENE_MODE_SUNSET
1940 * @see #CONTROL_SCENE_MODE_STEADYPHOTO
1941 * @see #CONTROL_SCENE_MODE_FIREWORKS
1942 * @see #CONTROL_SCENE_MODE_SPORTS
1943 * @see #CONTROL_SCENE_MODE_PARTY
1944 * @see #CONTROL_SCENE_MODE_CANDLELIGHT
1945 * @see #CONTROL_SCENE_MODE_BARCODE
Zhijun Hee0404182014-06-26 13:17:09 -07001946 * @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08001947 * @see #CONTROL_SCENE_MODE_HDR
Zhijun He379af012014-05-06 11:54:54 -07001948 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001949 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001950 public static final Key<Integer> CONTROL_SCENE_MODE =
1951 new Key<Integer>("android.control.sceneMode", int.class);
1952
1953 /**
1954 * <p>Whether video stabilization is
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001955 * active.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001956 * <p>Video stabilization automatically translates and scales images from
1957 * the camera in order to stabilize motion between consecutive frames.</p>
Zhijun He379af012014-05-06 11:54:54 -07001958 * <p>If enabled, video stabilization can modify the
Zhijun He45fa43a12014-06-13 18:29:37 -07001959 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001960 * <p>Switching between different video stabilization modes may take several
1961 * frames to initialize, the camera device will report the current mode
1962 * in capture result metadata. For example, When "ON" mode is requested,
1963 * the video stabilization modes in the first several capture results may
1964 * still be "OFF", and it will become "ON" when the initialization is
1965 * done.</p>
1966 * <p>If a camera device supports both this mode and OIS
1967 * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
1968 * produce undesirable interaction, so it is recommended not to enable
1969 * both at the same time.</p>
1970 * <p><b>Possible values:</b>
1971 * <ul>
1972 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li>
1973 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li>
1974 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001975 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001976 *
Zhijun He45fa43a12014-06-13 18:29:37 -07001977 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Zhijun He379af012014-05-06 11:54:54 -07001978 * @see CaptureRequest#SCALER_CROP_REGION
1979 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF
1980 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON
1981 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001982 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001983 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE =
1984 new Key<Integer>("android.control.videoStabilizationMode", int.class);
1985
1986 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08001987 * <p>Operation mode for edge
Zhijun Hecc28a412014-02-24 15:11:23 -08001988 * enhancement.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001989 * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
1990 * no enhancement will be applied by the camera device.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08001991 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun He28079362013-12-17 10:35:40 -08001992 * will be applied. HIGH_QUALITY mode indicates that the
Zhijun He5f2a47f2014-01-16 15:44:41 -08001993 * camera device will use the highest-quality enhancement algorithms,
1994 * even if it slows down capture rate. FAST means the camera device will
Zhijun He28079362013-12-17 10:35:40 -08001995 * not slow down capture rate when applying edge enhancement.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08001996 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
1997 * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
1998 * The camera device may adjust its internal noise reduction parameters for best
1999 * image quality based on the {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}, if it is set.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002000 * <p><b>Possible values:</b>
2001 * <ul>
2002 * <li>{@link #EDGE_MODE_OFF OFF}</li>
2003 * <li>{@link #EDGE_MODE_FAST FAST}</li>
2004 * <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
2005 * </ul></p>
2006 * <p><b>Available values for this device:</b><br>
2007 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002008 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2009 * <p><b>Full capability</b> -
2010 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2011 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002012 *
2013 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002014 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0e99c222015-01-29 15:26:05 -08002015 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002016 * @see #EDGE_MODE_OFF
2017 * @see #EDGE_MODE_FAST
2018 * @see #EDGE_MODE_HIGH_QUALITY
2019 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002020 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002021 public static final Key<Integer> EDGE_MODE =
2022 new Key<Integer>("android.edge.mode", int.class);
2023
2024 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002025 * <p>The desired mode for for the camera device's flash control.</p>
2026 * <p>This control is only effective when flash unit is available
Zhijun He153ac102014-02-03 12:25:12 -08002027 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
Zhijun He66d065a2014-01-16 18:18:50 -08002028 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
2029 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2030 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2031 * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2032 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2033 * device's auto-exposure routine's result. When used in still capture case, this
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002034 * control should be used along with auto-exposure (AE) precapture metering sequence
Zhijun He66d065a2014-01-16 18:18:50 -08002035 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
2036 * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2037 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002038 * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002039 * <p><b>Possible values:</b>
2040 * <ul>
2041 * <li>{@link #FLASH_MODE_OFF OFF}</li>
2042 * <li>{@link #FLASH_MODE_SINGLE SINGLE}</li>
2043 * <li>{@link #FLASH_MODE_TORCH TORCH}</li>
2044 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002045 * <p>This key is available on all devices.</p>
Zhijun He66d065a2014-01-16 18:18:50 -08002046 *
2047 * @see CaptureRequest#CONTROL_AE_MODE
2048 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2049 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Zhijun Heca1b73a2014-02-03 12:39:53 -08002050 * @see CaptureResult#FLASH_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002051 * @see #FLASH_MODE_OFF
2052 * @see #FLASH_MODE_SINGLE
2053 * @see #FLASH_MODE_TORCH
2054 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002055 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002056 public static final Key<Integer> FLASH_MODE =
2057 new Key<Integer>("android.flash.mode", int.class);
2058
2059 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002060 * <p>Current state of the flash
Zhijun Heca1b73a2014-02-03 12:39:53 -08002061 * unit.</p>
2062 * <p>When the camera device doesn't have flash unit
2063 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
2064 * Other states indicate the current flash status.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002065 * <p>In certain conditions, this will be available on LEGACY devices:</p>
2066 * <ul>
2067 * <li>Flash-less cameras always return UNAVAILABLE.</li>
2068 * <li>Using {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>==</code> ON_ALWAYS_FLASH
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002069 * will always return FIRED.</li>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002070 * <li>Using {@link CaptureRequest#FLASH_MODE android.flash.mode} <code>==</code> TORCH
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002071 * will always return FIRED.</li>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002072 * </ul>
2073 * <p>In all other conditions the state will not be available on
2074 * LEGACY devices (i.e. it will be <code>null</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002075 * <p><b>Possible values:</b>
2076 * <ul>
2077 * <li>{@link #FLASH_STATE_UNAVAILABLE UNAVAILABLE}</li>
2078 * <li>{@link #FLASH_STATE_CHARGING CHARGING}</li>
2079 * <li>{@link #FLASH_STATE_READY READY}</li>
2080 * <li>{@link #FLASH_STATE_FIRED FIRED}</li>
2081 * <li>{@link #FLASH_STATE_PARTIAL PARTIAL}</li>
2082 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002083 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2084 * <p><b>Limited capability</b> -
2085 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2086 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002087 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002088 * @see CaptureRequest#CONTROL_AE_MODE
Zhijun Heca1b73a2014-02-03 12:39:53 -08002089 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002090 * @see CaptureRequest#FLASH_MODE
2091 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002092 * @see #FLASH_STATE_UNAVAILABLE
2093 * @see #FLASH_STATE_CHARGING
2094 * @see #FLASH_STATE_READY
2095 * @see #FLASH_STATE_FIRED
Zhijun He8dda7272014-03-25 13:49:30 -07002096 * @see #FLASH_STATE_PARTIAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002097 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002098 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002099 public static final Key<Integer> FLASH_STATE =
2100 new Key<Integer>("android.flash.state", int.class);
2101
2102 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002103 * <p>Operational mode for hot pixel correction.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002104 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002105 * that do not accurately measure the incoming light (i.e. pixels that
2106 * are stuck at an arbitrary value or are oversensitive).</p>
2107 * <p><b>Possible values:</b>
2108 * <ul>
2109 * <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li>
2110 * <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li>
2111 * <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
2112 * </ul></p>
2113 * <p><b>Available values for this device:</b><br>
2114 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002115 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002116 *
2117 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002118 * @see #HOT_PIXEL_MODE_OFF
2119 * @see #HOT_PIXEL_MODE_FAST
2120 * @see #HOT_PIXEL_MODE_HIGH_QUALITY
2121 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002122 @PublicKey
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002123 public static final Key<Integer> HOT_PIXEL_MODE =
2124 new Key<Integer>("android.hotPixel.mode", int.class);
2125
2126 /**
Ruben Brunk57493682014-05-27 18:58:08 -07002127 * <p>A location object to use when generating image GPS metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002128 * <p>Setting a location object in a request will include the GPS coordinates of the location
2129 * into any JPEG images captured based on the request. These coordinates can then be
2130 * viewed by anyone who receives the JPEG image.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002131 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002132 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002133 @PublicKey
2134 @SyntheticKey
Ruben Brunk57493682014-05-27 18:58:08 -07002135 public static final Key<android.location.Location> JPEG_GPS_LOCATION =
2136 new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class);
2137
2138 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002139 * <p>GPS coordinates to include in output JPEG
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002140 * EXIF.</p>
2141 * <p><b>Range of valid values:</b><br>
2142 * (-180 - 180], [-90,90], [-inf, inf]</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002143 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002144 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002145 */
2146 public static final Key<double[]> JPEG_GPS_COORDINATES =
2147 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
2148
2149 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002150 * <p>32 characters describing GPS algorithm to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002151 * include in EXIF.</p>
2152 * <p><b>Units</b>: UTF-8 null-terminated string</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002153 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002154 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002155 */
2156 public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
2157 new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
2158
2159 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002160 * <p>Time GPS fix was made to include in
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002161 * EXIF.</p>
2162 * <p><b>Units</b>: UTC in seconds since January 1, 1970</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002163 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002164 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002165 */
2166 public static final Key<Long> JPEG_GPS_TIMESTAMP =
2167 new Key<Long>("android.jpeg.gpsTimestamp", long.class);
2168
2169 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002170 * <p>The orientation for a JPEG image.</p>
2171 * <p>The clockwise rotation angle in degrees, relative to the orientation
2172 * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2173 * upright.</p>
2174 * <p>Camera devices may either encode this value into the JPEG EXIF header, or
2175 * rotate the image data to match this orientation.</p>
2176 * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2177 * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
2178 * <p>To translate from the device orientation given by the Android sensor APIs, the following
2179 * sample code may be used:</p>
2180 * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2181 * if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2182 * int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2183 *
2184 * // Round device orientation to a multiple of 90
2185 * deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2186 *
2187 * // Reverse device orientation for front-facing cameras
2188 * boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2189 * if (facingFront) deviceOrientation = -deviceOrientation;
2190 *
2191 * // Calculate desired JPEG orientation relative to camera orientation to make
2192 * // the image upright relative to the device orientation
2193 * int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2194 *
2195 * return jpegOrientation;
2196 * }
2197 * </code></pre>
2198 * <p><b>Units</b>: Degrees in multiples of 90</p>
2199 * <p><b>Range of valid values:</b><br>
2200 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002201 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002202 *
2203 * @see CameraCharacteristics#SENSOR_ORIENTATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002204 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002205 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002206 public static final Key<Integer> JPEG_ORIENTATION =
2207 new Key<Integer>("android.jpeg.orientation", int.class);
2208
2209 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002210 * <p>Compression quality of the final JPEG
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002211 * image.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002212 * <p>85-95 is typical usage range.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002213 * <p><b>Range of valid values:</b><br>
2214 * 1-100; larger is higher quality</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002215 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002216 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002217 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002218 public static final Key<Byte> JPEG_QUALITY =
2219 new Key<Byte>("android.jpeg.quality", byte.class);
2220
2221 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002222 * <p>Compression quality of JPEG
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002223 * thumbnail.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002224 * <p><b>Range of valid values:</b><br>
2225 * 1-100; larger is higher quality</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002226 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002227 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002228 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002229 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
2230 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
2231
2232 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002233 * <p>Resolution of embedded JPEG thumbnail.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002234 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2235 * but the captured JPEG will still be a valid image.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002236 * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2237 * should have the same aspect ratio as the main JPEG output.</p>
Zhijun He50f72432014-05-28 13:52:04 -07002238 * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2239 * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2240 * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2241 * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2242 * generate the thumbnail image. The thumbnail image will always have a smaller Field
2243 * Of View (FOV) than the primary image when aspect ratios differ.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002244 * <p><b>Range of valid values:</b><br>
2245 * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002246 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002247 *
2248 * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002249 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002250 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002251 public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE =
2252 new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002253
2254 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002255 * <p>The desired lens aperture size, as a ratio of lens focal length to the
2256 * effective aperture diameter.</p>
2257 * <p>Setting this value is only supported on the camera devices that have a variable
2258 * aperture lens.</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08002259 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
2260 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002261 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
Zhijun Hefb46c642014-01-14 17:57:23 -08002262 * to achieve manual exposure control.</p>
2263 * <p>The requested aperture value may take several frames to reach the
2264 * requested value; the camera device will report the current (intermediate)
Zhijun Heca1b73a2014-02-03 12:39:53 -08002265 * aperture size in capture result metadata while the aperture is changing.
2266 * 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 -08002267 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
2268 * the ON modes, this will be overridden by the camera device
2269 * auto-exposure algorithm, the overridden values are then provided
2270 * back to the user in the corresponding result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002271 * <p><b>Units</b>: The f-number (f/N)</p>
2272 * <p><b>Range of valid values:</b><br>
2273 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002274 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2275 * <p><b>Full capability</b> -
2276 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2277 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08002278 *
Zhijun He399f05d2014-01-15 11:31:30 -08002279 * @see CaptureRequest#CONTROL_AE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002280 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002281 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
Zhijun Heca1b73a2014-02-03 12:39:53 -08002282 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002283 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002284 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002285 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002286 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002287 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002288 public static final Key<Float> LENS_APERTURE =
2289 new Key<Float>("android.lens.aperture", float.class);
2290
2291 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002292 * <p>The desired setting for the lens neutral density filter(s).</p>
2293 * <p>This control will not be supported on most camera devices.</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08002294 * <p>Lens filters are typically used to lower the amount of light the
2295 * sensor is exposed to (measured in steps of EV). As used here, an EV
2296 * step is the standard logarithmic representation, which are
2297 * non-negative, and inversely proportional to the amount of light
2298 * hitting the sensor. For example, setting this to 0 would result
2299 * in no reduction of the incoming light, and setting this to 2 would
2300 * mean that the filter is set to reduce incoming light by two stops
2301 * (allowing 1/4 of the prior amount of light to the sensor).</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002302 * <p>It may take several frames before the lens filter density changes
2303 * to the requested value. While the filter density is still changing,
2304 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002305 * <p><b>Units</b>: Exposure Value (EV)</p>
2306 * <p><b>Range of valid values:</b><br>
2307 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002308 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2309 * <p><b>Full capability</b> -
2310 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2311 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08002312 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002313 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -08002314 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
Zhijun Heca1b73a2014-02-03 12:39:53 -08002315 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002316 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002317 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002318 public static final Key<Float> LENS_FILTER_DENSITY =
2319 new Key<Float>("android.lens.filterDensity", float.class);
2320
2321 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002322 * <p>The desired lens focal length; used for optical zoom.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08002323 * <p>This setting controls the physical focal length of the camera
2324 * device's lens. Changing the focal length changes the field of
2325 * view of the camera device, and is usually used for optical zoom.</p>
2326 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
2327 * setting won't be applied instantaneously, and it may take several
Zhijun Heca1b73a2014-02-03 12:39:53 -08002328 * frames before the lens can change to the requested focal length.
Ruben Brunka20f4c22014-01-17 15:21:13 -08002329 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
2330 * be set to MOVING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002331 * <p>Optical zoom will not be supported on most devices.</p>
2332 * <p><b>Units</b>: Millimeters</p>
2333 * <p><b>Range of valid values:</b><br>
2334 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002335 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08002336 *
2337 * @see CaptureRequest#LENS_APERTURE
2338 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002339 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
Ruben Brunka20f4c22014-01-17 15:21:13 -08002340 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002341 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002342 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002343 public static final Key<Float> LENS_FOCAL_LENGTH =
2344 new Key<Float>("android.lens.focalLength", float.class);
2345
2346 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002347 * <p>Desired distance to plane of sharpest focus,
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002348 * measured from frontmost surface of the lens.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002349 * <p>Should be zero for fixed-focus cameras</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002350 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
2351 * <p><b>Range of valid values:</b><br>
2352 * &gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002353 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2354 * <p><b>Full capability</b> -
2355 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2356 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2357 *
2358 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002359 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002360 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002361 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002362 public static final Key<Float> LENS_FOCUS_DISTANCE =
2363 new Key<Float>("android.lens.focusDistance", float.class);
2364
2365 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002366 * <p>The range of scene distances that are in
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002367 * sharp focus (depth of field).</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002368 * <p>If variable focus not supported, can still report
2369 * fixed depth of field range</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002370 * <p><b>Units</b>: A pair of focus distances in diopters: (near,
2371 * far); see {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details.</p>
2372 * <p><b>Range of valid values:</b><br>
2373 * &gt;=0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002374 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2375 * <p><b>Limited capability</b> -
2376 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2377 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2378 *
2379 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002380 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002381 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002382 @PublicKey
Igor Murashkin57438682014-05-30 10:49:00 -07002383 public static final Key<android.util.Pair<Float,Float>> LENS_FOCUS_RANGE =
2384 new Key<android.util.Pair<Float,Float>>("android.lens.focusRange", new TypeReference<android.util.Pair<Float,Float>>() {{ }});
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002385
2386 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002387 * <p>Sets whether the camera device uses optical image stabilization (OIS)
2388 * when capturing images.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002389 * <p>OIS is used to compensate for motion blur due to small
2390 * movements of the camera during capture. Unlike digital image
2391 * stabilization ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), OIS
2392 * makes use of mechanical elements to stabilize the camera
2393 * sensor, and thus allows for longer exposure times before
2394 * camera shake becomes apparent.</p>
Zhijun He45fa43a12014-06-13 18:29:37 -07002395 * <p>Switching between different optical stabilization modes may take several
2396 * frames to initialize, the camera device will report the current mode in
2397 * capture result metadata. For example, When "ON" mode is requested, the
2398 * optical stabilization modes in the first several capture results may still
2399 * be "OFF", and it will become "ON" when the initialization is done.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002400 * <p>If a camera device supports both OIS and digital image stabilization
2401 * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable
2402 * interaction, so it is recommended not to enable both at the same time.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002403 * <p>Not all devices will support OIS; see
2404 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for
2405 * available controls.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002406 * <p><b>Possible values:</b>
2407 * <ul>
2408 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li>
2409 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li>
2410 * </ul></p>
2411 * <p><b>Available values for this device:</b><br>
2412 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002413 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2414 * <p><b>Limited capability</b> -
2415 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2416 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002417 *
2418 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002419 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002420 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002421 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
2422 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
2423 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002424 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002425 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
2426 new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
2427
2428 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08002429 * <p>Current lens status.</p>
2430 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2431 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested,
2432 * they may take several frames to reach the requested values. This state indicates
2433 * the current status of the lens parameters.</p>
2434 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2435 * either because the parameters are all fixed, or because the lens has had enough
2436 * time to reach the most recently-requested values.
2437 * If all these lens parameters are not changable for a camera device, as listed below:</p>
2438 * <ul>
2439 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means
2440 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li>
2441 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value),
2442 * which means the optical zoom is not supported.</li>
2443 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li>
2444 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li>
2445 * </ul>
2446 * <p>Then this state will always be STATIONARY.</p>
2447 * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2448 * is changing.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002449 * <p><b>Possible values:</b>
2450 * <ul>
2451 * <li>{@link #LENS_STATE_STATIONARY STATIONARY}</li>
2452 * <li>{@link #LENS_STATE_MOVING MOVING}</li>
2453 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002454 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2455 * <p><b>Limited capability</b> -
2456 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2457 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002458 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002459 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heca1b73a2014-02-03 12:39:53 -08002460 * @see CaptureRequest#LENS_APERTURE
2461 * @see CaptureRequest#LENS_FILTER_DENSITY
2462 * @see CaptureRequest#LENS_FOCAL_LENGTH
2463 * @see CaptureRequest#LENS_FOCUS_DISTANCE
2464 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
2465 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
2466 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2467 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002468 * @see #LENS_STATE_STATIONARY
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002469 * @see #LENS_STATE_MOVING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002470 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002471 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002472 public static final Key<Integer> LENS_STATE =
2473 new Key<Integer>("android.lens.state", int.class);
2474
2475 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002476 * <p>Mode of operation for the noise reduction algorithm.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002477 * <p>The noise reduction algorithm attempts to improve image quality by removing
Zhijun He0e99c222015-01-29 15:26:05 -08002478 * excessive noise added by the capture process, especially in dark conditions.</p>
2479 * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
2480 * YUV domain.</p>
2481 * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
2482 * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
2483 * This mode is optional, may not be support by all devices. The application should check
2484 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} before using it.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002485 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
2486 * will be applied. HIGH_QUALITY mode indicates that the camera device
2487 * will use the highest-quality noise filtering algorithms,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002488 * even if it slows down capture rate. FAST means the camera device will not
Zhijun He28079362013-12-17 10:35:40 -08002489 * slow down capture rate when applying noise filtering.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08002490 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
2491 * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
2492 * may adjust the noise reduction parameters for best image quality based on the
2493 * {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor} if it is set.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002494 * <p><b>Possible values:</b>
2495 * <ul>
2496 * <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li>
2497 * <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li>
2498 * <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08002499 * <li>{@link #NOISE_REDUCTION_MODE_MINIMAL MINIMAL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002500 * </ul></p>
2501 * <p><b>Available values for this device:</b><br>
2502 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002503 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2504 * <p><b>Full capability</b> -
2505 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2506 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002507 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002508 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002509 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -08002510 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002511 * @see #NOISE_REDUCTION_MODE_OFF
2512 * @see #NOISE_REDUCTION_MODE_FAST
2513 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
Zhijun He0e99c222015-01-29 15:26:05 -08002514 * @see #NOISE_REDUCTION_MODE_MINIMAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002515 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002516 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002517 public static final Key<Integer> NOISE_REDUCTION_MODE =
2518 new Key<Integer>("android.noiseReduction.mode", int.class);
2519
2520 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002521 * <p>Whether a result given to the framework is the
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002522 * final one for the capture, or only a partial that contains a
2523 * subset of the full set of dynamic metadata
Igor Murashkinace5bf02013-12-10 17:36:40 -08002524 * values.</p>
2525 * <p>The entries in the result metadata buffers for a
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002526 * single capture may not overlap, except for this entry. The
2527 * FINAL buffers must retain FIFO ordering relative to the
2528 * requests that generate them, so the FINAL buffer for frame 3 must
2529 * always be sent to the framework after the FINAL buffer for frame 2, and
2530 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned
2531 * in any order relative to other frames, but all PARTIAL buffers for a given
2532 * capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun Hecc28a412014-02-24 15:11:23 -08002533 * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002534 * <p><b>Range of valid values:</b><br>
2535 * Optional. Default value is FINAL.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002536 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002537 * @deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002538 * @hide
2539 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002540 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002541 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
2542 new Key<Boolean>("android.quirks.partialResult", boolean.class);
2543
2544 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002545 * <p>A frame counter set by the framework. This value monotonically
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -07002546 * increases with every new result (that is, each new result has a unique
Igor Murashkinace5bf02013-12-10 17:36:40 -08002547 * frameCount value).</p>
2548 * <p>Reset on release()</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002549 * <p><b>Units</b>: count of frames</p>
2550 * <p><b>Range of valid values:</b><br>
2551 * &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002552 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07002553 * @deprecated
2554 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002555 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -07002556 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002557 public static final Key<Integer> REQUEST_FRAME_COUNT =
2558 new Key<Integer>("android.request.frameCount", int.class);
2559
2560 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002561 * <p>An application-specified ID for the current
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002562 * request. Must be maintained unchanged in output
Igor Murashkinace5bf02013-12-10 17:36:40 -08002563 * frame</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002564 * <p><b>Units</b>: arbitrary integer assigned by application</p>
2565 * <p><b>Range of valid values:</b><br>
2566 * Any int</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002567 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002568 * @hide
2569 */
2570 public static final Key<Integer> REQUEST_ID =
2571 new Key<Integer>("android.request.id", int.class);
2572
2573 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08002574 * <p>Specifies the number of pipeline stages the frame went
2575 * through from when it was exposed to when the final completed result
2576 * was available to the framework.</p>
2577 * <p>Depending on what settings are used in the request, and
2578 * what streams are configured, the data may undergo less processing,
2579 * and some pipeline stages skipped.</p>
2580 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002581 * <p><b>Range of valid values:</b><br>
2582 * &lt;= {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002583 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002584 *
2585 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
2586 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002587 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08002588 public static final Key<Byte> REQUEST_PIPELINE_DEPTH =
2589 new Key<Byte>("android.request.pipelineDepth", byte.class);
2590
2591 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002592 * <p>The desired region of the sensor to read out for this capture.</p>
2593 * <p>This control can be used to implement digital zoom.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002594 * <p>The crop region coordinate system is based off
2595 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the
2596 * top-left corner of the sensor active array.</p>
2597 * <p>Output streams use this rectangle to produce their output,
2598 * cropping to a smaller region if necessary to maintain the
2599 * stream's aspect ratio, then scaling the sensor input to
2600 * match the output's configured resolution.</p>
2601 * <p>The crop region is applied after the RAW to other color
2602 * space (e.g. YUV) conversion. Since raw streams
2603 * (e.g. RAW16) don't have the conversion stage, they are not
2604 * croppable. The crop region will be ignored by raw streams.</p>
Zhijun He9e6d1882014-05-22 16:47:35 -07002605 * <p>For non-raw streams, any additional per-stream cropping will
2606 * be done to maximize the final pixel area of the stream.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002607 * <p>For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002608 * ratio, then 4:3 streams will use the exact crop
2609 * region. 16:9 streams will further crop vertically
Igor Murashkinace5bf02013-12-10 17:36:40 -08002610 * (letterbox).</p>
2611 * <p>Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002612 * outputs will crop horizontally (pillarbox), and 16:9
2613 * streams will match exactly. These additional crops will
Igor Murashkinace5bf02013-12-10 17:36:40 -08002614 * be centered within the crop region.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002615 * <p>The width and height of the crop region cannot
2616 * be set to be smaller than
2617 * <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
2618 * <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p>
2619 * <p>The camera device may adjust the crop region to account
2620 * for rounding and other hardware requirements; the final
2621 * crop region used will be included in the output capture
2622 * result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002623 * <p><b>Units</b>: Pixel coordinates relative to
2624 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002625 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002626 *
2627 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002628 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002629 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002630 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002631 public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
2632 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
2633
2634 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002635 * <p>Duration each pixel is exposed to
2636 * light.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002637 * <p>If the sensor can't expose this exact duration, it will shorten the
2638 * duration exposed to the nearest possible value (rather than expose longer).
2639 * The final exposure time used will be available in the output capture result.</p>
2640 * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to
2641 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
2642 * <p><b>Units</b>: Nanoseconds</p>
2643 * <p><b>Range of valid values:</b><br>
2644 * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002645 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2646 * <p><b>Full capability</b> -
2647 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2648 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2649 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002650 * @see CaptureRequest#CONTROL_AE_MODE
2651 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002652 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002653 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002654 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002655 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002656 public static final Key<Long> SENSOR_EXPOSURE_TIME =
2657 new Key<Long>("android.sensor.exposureTime", long.class);
2658
2659 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002660 * <p>Duration from start of frame exposure to
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002661 * start of next frame exposure.</p>
2662 * <p>The maximum frame rate that can be supported by a camera subsystem is
2663 * a function of many factors:</p>
2664 * <ul>
2665 * <li>Requested resolutions of output image streams</li>
2666 * <li>Availability of binning / skipping modes on the imager</li>
2667 * <li>The bandwidth of the imager interface</li>
2668 * <li>The bandwidth of the various ISP processing blocks</li>
2669 * </ul>
2670 * <p>Since these factors can vary greatly between different ISPs and
2671 * sensors, the camera abstraction tries to represent the bandwidth
2672 * restrictions with as simple a model as possible.</p>
2673 * <p>The model presented has the following characteristics:</p>
2674 * <ul>
2675 * <li>The image sensor is always configured to output the smallest
2676 * resolution possible given the application's requested output stream
2677 * sizes. The smallest resolution is defined as being at least as large
2678 * as the largest requested output stream size; the camera pipeline must
2679 * never digitally upsample sensor data when the crop region covers the
2680 * whole sensor. In general, this means that if only small output stream
2681 * resolutions are configured, the sensor can provide a higher frame
2682 * rate.</li>
2683 * <li>Since any request may use any or all the currently configured
2684 * output streams, the sensor and ISP must be configured to support
2685 * scaling a single capture to all the streams at the same time. This
2686 * means the camera pipeline must be ready to produce the largest
2687 * requested output size without any delay. Therefore, the overall
2688 * frame rate of a given configured stream set is governed only by the
2689 * largest requested stream resolution.</li>
2690 * <li>Using more than one output stream in a request does not affect the
2691 * frame duration.</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002692 * <li>Certain format-streams may need to do additional background processing
2693 * before data is consumed/produced by that stream. These processors
2694 * can run concurrently to the rest of the camera pipeline, but
2695 * cannot process more than 1 capture at a time.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002696 * </ul>
2697 * <p>The necessary information for the application, given the model above,
Igor Murashkin9c595172014-05-12 13:56:20 -07002698 * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field
2699 * using StreamConfigurationMap#getOutputMinFrameDuration(int, Size).
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002700 * These are used to determine the maximum frame rate / minimum frame
2701 * duration that is possible for a given stream configuration.</p>
2702 * <p>Specifically, the application can use the following rules to
Igor Murashkina23ffb52014-02-07 18:52:34 -08002703 * determine the minimum frame duration it can request from the camera
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002704 * device:</p>
2705 * <ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002706 * <li>Let the set of currently configured input/output streams
2707 * be called <code>S</code>.</li>
2708 * <li>Find the minimum frame durations for each stream in <code>S</code>, by
Igor Murashkin9c595172014-05-12 13:56:20 -07002709 * looking it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using
2710 * StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with
Igor Murashkina23ffb52014-02-07 18:52:34 -08002711 * its respective size/format). Let this set of frame durations be called
2712 * <code>F</code>.</li>
2713 * <li>For any given request <code>R</code>, the minimum frame duration allowed
2714 * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams
2715 * used in <code>R</code> be called <code>S_r</code>.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002716 * </ol>
Igor Murashkina23ffb52014-02-07 18:52:34 -08002717 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in
Igor Murashkin9c595172014-05-12 13:56:20 -07002718 * StreamConfigurationMap#getOutputStallDuration(int,Size) using its
2719 * respective size/format), then the frame duration in
Igor Murashkina23ffb52014-02-07 18:52:34 -08002720 * <code>F</code> determines the steady state frame rate that the application will
2721 * get if it uses <code>R</code> as a repeating request. Let this special kind
2722 * of request be called <code>Rsimple</code>.</p>
2723 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved
2724 * by a single capture of a new request <code>Rstall</code> (which has at least
2725 * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the
2726 * same minimum frame duration this will not cause a frame rate loss
2727 * if all buffers from the previous <code>Rstall</code> have already been
2728 * delivered.</p>
2729 * <p>For more details about stalling, see
Igor Murashkin9c595172014-05-12 13:56:20 -07002730 * StreamConfigurationMap#getOutputStallDuration(int,Size).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002731 * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to
2732 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
2733 * <p><b>Units</b>: Nanoseconds</p>
2734 * <p><b>Range of valid values:</b><br>
2735 * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration},
2736 * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. The duration
2737 * is capped to <code>max(duration, exposureTime + overhead)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002738 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2739 * <p><b>Full capability</b> -
2740 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2741 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08002742 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002743 * @see CaptureRequest#CONTROL_AE_MODE
2744 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002745 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkin9c595172014-05-12 13:56:20 -07002746 * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002747 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002748 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002749 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002750 public static final Key<Long> SENSOR_FRAME_DURATION =
2751 new Key<Long>("android.sensor.frameDuration", long.class);
2752
2753 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002754 * <p>The amount of gain applied to sensor data
2755 * before processing.</p>
2756 * <p>The sensitivity is the standard ISO sensitivity value,
2757 * as defined in ISO 12232:2006.</p>
2758 * <p>The sensitivity must be within {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}, and
2759 * if if it less than {@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}, the camera device
2760 * is guaranteed to use only analog amplification for applying the gain.</p>
2761 * <p>If the camera device cannot apply the exact sensitivity
2762 * requested, it will reduce the gain to the nearest supported
2763 * value. The final sensitivity used will be available in the
2764 * output capture result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002765 * <p><b>Units</b>: ISO arithmetic units</p>
2766 * <p><b>Range of valid values:</b><br>
2767 * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002768 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2769 * <p><b>Full capability</b> -
2770 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2771 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002772 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002773 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002774 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
2775 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002776 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002777 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002778 public static final Key<Integer> SENSOR_SENSITIVITY =
2779 new Key<Integer>("android.sensor.sensitivity", int.class);
2780
2781 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002782 * <p>Time at start of exposure of first
Zhijun He0bda31a2014-06-13 14:38:39 -07002783 * row of the image sensor active array, in nanoseconds.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002784 * <p>The timestamps are also included in all image
2785 * buffers produced for the same capture, and will be identical
Zhijun He45fa43a12014-06-13 18:29:37 -07002786 * on all the outputs.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002787 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> UNKNOWN,
Zhijun He45fa43a12014-06-13 18:29:37 -07002788 * the timestamps measure time since an unspecified starting point,
2789 * and are monotonically increasing. They can be compared with the
2790 * timestamps for other captures from the same camera device, but are
2791 * not guaranteed to be comparable to any other time source.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002792 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME,
Zhijun He45fa43a12014-06-13 18:29:37 -07002793 * the timestamps measure time in the same timebase as
2794 * android.os.SystemClock#elapsedRealtimeNanos(), and they can be
2795 * compared to other timestamps from other subsystems that are using
2796 * that base.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002797 * <p><b>Units</b>: Nanoseconds</p>
2798 * <p><b>Range of valid values:</b><br>
2799 * &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002800 * <p>This key is available on all devices.</p>
Zhijun He45fa43a12014-06-13 18:29:37 -07002801 *
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07002802 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002803 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002804 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002805 public static final Key<Long> SENSOR_TIMESTAMP =
2806 new Key<Long>("android.sensor.timestamp", long.class);
2807
2808 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07002809 * <p>The estimated camera neutral color in the native sensor colorspace at
2810 * the time of capture.</p>
2811 * <p>This value gives the neutral color point encoded as an RGB value in the
2812 * native sensor color space. The neutral color point indicates the
2813 * currently estimated white point of the scene illumination. It can be
2814 * used to interpolate between the provided color transforms when
2815 * processing raw sensor data.</p>
2816 * <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 -08002817 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2818 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002819 @PublicKey
Ruben Brunk20c76f62014-02-07 15:47:10 -08002820 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
2821 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
2822
2823 /**
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07002824 * <p>Noise model coefficients for each CFA mosaic channel.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002825 * <p>This key contains two noise model coefficients for each CFA channel
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07002826 * corresponding to the sensor amplification (S) and sensor readout
2827 * noise (O). These are given as pairs of coefficients for each channel
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002828 * in the same order as channels listed for the CFA layout key
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07002829 * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is
2830 * represented as an array of Pair&lt;Double, Double&gt;, where
2831 * the first member of the Pair at index n is the S coefficient and the
2832 * second member is the O coefficient for the nth color channel in the CFA.</p>
2833 * <p>These coefficients are used in a two parameter noise model to describe
2834 * the amount of noise present in the image for each CFA channel. The
2835 * noise model used here is:</p>
2836 * <p>N(x) = sqrt(Sx + O)</p>
2837 * <p>Where x represents the recorded signal of a CFA channel normalized to
2838 * the range [0, 1], and S and O are the noise model coeffiecients for
2839 * that channel.</p>
2840 * <p>A more detailed description of the noise model can be found in the
2841 * Adobe DNG specification for the NoiseProfile tag.</p>
2842 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2843 *
2844 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
2845 */
2846 @PublicKey
2847 public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
2848 new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
2849
2850 /**
Ruben Brunk987d9f72014-02-11 18:00:24 -08002851 * <p>The worst-case divergence between Bayer green channels.</p>
2852 * <p>This value is an estimate of the worst case split between the
2853 * Bayer green channels in the red and blue rows in the sensor color
2854 * filter array.</p>
2855 * <p>The green split is calculated as follows:</p>
2856 * <ol>
Ruben Brunke89b1202014-03-24 17:10:35 -07002857 * <li>A 5x5 pixel (or larger) window W within the active sensor array is
2858 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
2859 * mosaic channels (R, Gr, Gb, B). The location and size of the window
2860 * chosen is implementation defined, and should be chosen to provide a
2861 * green split estimate that is both representative of the entire image
2862 * for this camera sensor, and can be calculated quickly.</li>
Ruben Brunk987d9f72014-02-11 18:00:24 -08002863 * <li>The arithmetic mean of the green channels from the red
2864 * rows (mean_Gr) within W is computed.</li>
2865 * <li>The arithmetic mean of the green channels from the blue
2866 * rows (mean_Gb) within W is computed.</li>
2867 * <li>The maximum ratio R of the two means is computed as follows:
2868 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
2869 * </ol>
2870 * <p>The ratio R is the green split divergence reported for this property,
2871 * which represents how much the green channels differ in the mosaic
2872 * pattern. This value is typically used to determine the treatment of
2873 * the green mosaic channels when demosaicing.</p>
2874 * <p>The green split value can be roughly interpreted as follows:</p>
2875 * <ul>
2876 * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
2877 * <li>1.20 &lt;= R &gt;= 1.03 will require some software
2878 * correction to avoid demosaic errors (3-20% divergence).</li>
2879 * <li>R &gt; 1.20 will require strong software correction to produce
2880 * a usuable image (&gt;20% divergence).</li>
2881 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002882 * <p><b>Range of valid values:</b><br></p>
2883 * <p>&gt;= 0</p>
Ruben Brunk987d9f72014-02-11 18:00:24 -08002884 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2885 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002886 @PublicKey
Ruben Brunk987d9f72014-02-11 18:00:24 -08002887 public static final Key<Float> SENSOR_GREEN_SPLIT =
2888 new Key<Float>("android.sensor.greenSplit", float.class);
2889
2890 /**
Zhijun He379af012014-05-06 11:54:54 -07002891 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
2892 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
2893 * <p>Each color channel is treated as an unsigned 32-bit integer.
2894 * The camera device then uses the most significant X bits
2895 * that correspond to how many bits are in its Bayer raw sensor
2896 * output.</p>
2897 * <p>For example, a sensor with RAW10 Bayer output would use the
2898 * 10 most significant bits from each color channel.</p>
2899 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2900 *
2901 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
2902 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002903 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07002904 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
2905 new Key<int[]>("android.sensor.testPatternData", int[].class);
2906
2907 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08002908 * <p>When enabled, the sensor sends a test pattern instead of
2909 * doing a real exposure from the camera.</p>
2910 * <p>When a test pattern is enabled, all manual sensor controls specified
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002911 * by android.sensor.* will be ignored. All other controls should
Igor Murashkinc127f052014-01-17 18:06:02 -08002912 * work as normal.</p>
2913 * <p>For example, if manual flash is enabled, flash firing should still
2914 * occur (and that the test pattern remain unmodified, since the flash
2915 * would not actually affect it).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002916 * <p>Defaults to OFF.</p>
2917 * <p><b>Possible values:</b>
2918 * <ul>
2919 * <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li>
2920 * <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li>
2921 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li>
2922 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li>
2923 * <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li>
2924 * <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li>
2925 * </ul></p>
2926 * <p><b>Available values for this device:</b><br>
2927 * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08002928 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002929 *
2930 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
Igor Murashkinc127f052014-01-17 18:06:02 -08002931 * @see #SENSOR_TEST_PATTERN_MODE_OFF
2932 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
2933 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
2934 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
2935 * @see #SENSOR_TEST_PATTERN_MODE_PN9
2936 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
2937 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002938 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08002939 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
2940 new Key<Integer>("android.sensor.testPatternMode", int.class);
2941
2942 /**
Zhijun He0bda31a2014-06-13 14:38:39 -07002943 * <p>Duration between the start of first row exposure
2944 * and the start of last row exposure.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002945 * <p>This is the exposure time skew between the first and last
2946 * row exposure start times. The first row and the last row are
2947 * the first and last rows inside of the
2948 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Zhijun He0bda31a2014-06-13 14:38:39 -07002949 * <p>For typical camera sensors that use rolling shutters, this is also equivalent
2950 * to the frame readout time.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002951 * <p><b>Units</b>: Nanoseconds</p>
2952 * <p><b>Range of valid values:</b><br>
2953 * &gt;= 0 and &lt;
2954 * StreamConfigurationMap#getOutputMinFrameDuration(int, Size).</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002955 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2956 * <p><b>Limited capability</b> -
2957 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2958 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He0bda31a2014-06-13 14:38:39 -07002959 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002960 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0bda31a2014-06-13 14:38:39 -07002961 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
2962 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002963 @PublicKey
Zhijun He0bda31a2014-06-13 14:38:39 -07002964 public static final Key<Long> SENSOR_ROLLING_SHUTTER_SKEW =
2965 new Key<Long>("android.sensor.rollingShutterSkew", long.class);
2966
2967 /**
Zhijun Heba93fe62014-01-17 16:43:05 -08002968 * <p>Quality of lens shading correction applied
2969 * to the image data.</p>
2970 * <p>When set to OFF mode, no lens shading correction will be applied by the
2971 * camera device, and an identity lens shading map data will be provided
2972 * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002973 * shading map with size of <code>[ 4, 3 ]</code>,
2974 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity
2975 * map shown below:</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08002976 * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002977 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2978 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2979 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2980 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
2981 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
Zhijun Heba93fe62014-01-17 16:43:05 -08002982 * </code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002983 * <p>When set to other modes, lens shading correction will be applied by the camera
2984 * device. Applications can request lens shading map data by setting
2985 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens
2986 * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map
2987 * data will be the one applied by the camera device for this capture request.</p>
2988 * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
2989 * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
2990 * AWB are in AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code>
2991 * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
2992 * to be converged before using the returned shading map data.</p>
2993 * <p><b>Possible values:</b>
2994 * <ul>
2995 * <li>{@link #SHADING_MODE_OFF OFF}</li>
2996 * <li>{@link #SHADING_MODE_FAST FAST}</li>
2997 * <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
2998 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002999 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3000 * <p><b>Full capability</b> -
3001 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3002 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08003003 *
Zhijun Hefa7c7552014-05-22 16:36:02 -07003004 * @see CaptureRequest#CONTROL_AE_MODE
3005 * @see CaptureRequest#CONTROL_AWB_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003006 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003007 * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
Zhijun Heba93fe62014-01-17 16:43:05 -08003008 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3009 * @see #SHADING_MODE_OFF
3010 * @see #SHADING_MODE_FAST
3011 * @see #SHADING_MODE_HIGH_QUALITY
Zhijun Heba93fe62014-01-17 16:43:05 -08003012 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003013 @PublicKey
Zhijun Heba93fe62014-01-17 16:43:05 -08003014 public static final Key<Integer> SHADING_MODE =
3015 new Key<Integer>("android.shading.mode", int.class);
3016
3017 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003018 * <p>Operating mode for the face detector
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003019 * unit.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003020 * <p>Whether face detection is enabled, and whether it
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003021 * should output just the basic fields or the full set of
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003022 * fields.</p>
3023 * <p><b>Possible values:</b>
3024 * <ul>
3025 * <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li>
3026 * <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li>
3027 * <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li>
3028 * </ul></p>
3029 * <p><b>Available values for this device:</b><br>
3030 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p>
3031 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003032 *
3033 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003034 * @see #STATISTICS_FACE_DETECT_MODE_OFF
3035 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
3036 * @see #STATISTICS_FACE_DETECT_MODE_FULL
3037 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003038 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003039 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
3040 new Key<Integer>("android.statistics.faceDetectMode", int.class);
3041
3042 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003043 * <p>List of unique IDs for detected faces.</p>
3044 * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
3045 * to the camera device. A face that leaves the field of view and later returns may be
3046 * assigned a new ID.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003047 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
3048 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003049 *
3050 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003051 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003052 */
3053 public static final Key<int[]> STATISTICS_FACE_IDS =
3054 new Key<int[]>("android.statistics.faceIds", int[].class);
3055
3056 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003057 * <p>List of landmarks for detected
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003058 * faces.</p>
3059 * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
3060 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003061 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
3062 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003063 *
3064 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3065 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003066 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003067 */
3068 public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
3069 new Key<int[]>("android.statistics.faceLandmarks", int[].class);
3070
3071 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003072 * <p>List of the bounding rectangles for detected
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003073 * faces.</p>
3074 * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
3075 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003076 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF
3077 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003078 *
3079 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3080 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003081 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003082 */
3083 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
3084 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
3085
3086 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003087 * <p>List of the face confidence scores for
3088 * detected faces</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003089 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003090 * <p><b>Range of valid values:</b><br>
3091 * 1-100</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003092 * <p>This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003093 *
3094 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003095 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003096 */
3097 public static final Key<byte[]> STATISTICS_FACE_SCORES =
3098 new Key<byte[]>("android.statistics.faceScores", byte[].class);
3099
3100 /**
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003101 * <p>List of the faces detected through camera face detection
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003102 * in this capture.</p>
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003103 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} <code>!=</code> OFF.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003104 * <p>This key is available on all devices.</p>
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003105 *
3106 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3107 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003108 @PublicKey
3109 @SyntheticKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003110 public static final Key<android.hardware.camera2.params.Face[]> STATISTICS_FACES =
3111 new Key<android.hardware.camera2.params.Face[]>("android.statistics.faces", android.hardware.camera2.params.Face[].class);
3112
3113 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003114 * <p>The shading map is a low-resolution floating-point map
3115 * that lists the coefficients used to correct for vignetting, for each
3116 * Bayer color channel.</p>
3117 * <p>The least shaded section of the image should have a gain factor
3118 * of 1; all other sections should have gains above 1.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003119 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Igor Murashkinace5bf02013-12-10 17:36:40 -08003120 * must take into account the colorCorrection settings.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003121 * <p>The shading map is for the entire active pixel array, and is not
3122 * affected by the crop region specified in the request. Each shading map
3123 * entry is the value of the shading compensation map over a specific
3124 * pixel on the sensor. Specifically, with a (N x M) resolution shading
3125 * map, and an active pixel array size (W x H), shading map entry
3126 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
3127 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
3128 * The map is assumed to be bilinearly interpolated between the sample points.</p>
3129 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
3130 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
Ruben Brunk57493682014-05-27 18:58:08 -07003131 * The shading map is stored in a fully interleaved format.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003132 * <p>The shading map should have on the order of 30-40 rows and columns,
3133 * and must be smaller than 64x64.</p>
3134 * <p>As an example, given a very small map defined as:</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003135 * <pre><code>width,height = [ 4, 3 ]
3136 * values =
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003137 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003138 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
3139 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
3140 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
3141 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
3142 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003143 * </code></pre>
3144 * <p>The low-resolution scaling map images for each channel are
3145 * (displayed using nearest-neighbor interpolation):</p>
3146 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
3147 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
3148 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
3149 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
3150 * <p>As a visualization only, inverting the full-color map to recover an
3151 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
3152 * <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 Talvalafd3e2892014-10-06 10:23:55 -07003153 * <p><b>Range of valid values:</b><br>
3154 * Each gain factor is &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003155 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3156 * <p><b>Full capability</b> -
3157 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3158 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003159 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08003160 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003161 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk57493682014-05-27 18:58:08 -07003162 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003163 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07003164 public static final Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP =
3165 new Key<android.hardware.camera2.params.LensShadingMap>("android.statistics.lensShadingCorrectionMap", android.hardware.camera2.params.LensShadingMap.class);
3166
3167 /**
3168 * <p>The shading map is a low-resolution floating-point map
3169 * that lists the coefficients used to correct for vignetting, for each
3170 * Bayer color channel.</p>
3171 * <p>The least shaded section of the image should have a gain factor
3172 * of 1; all other sections should have gains above 1.</p>
3173 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
3174 * must take into account the colorCorrection settings.</p>
3175 * <p>The shading map is for the entire active pixel array, and is not
3176 * affected by the crop region specified in the request. Each shading map
3177 * entry is the value of the shading compensation map over a specific
3178 * pixel on the sensor. Specifically, with a (N x M) resolution shading
3179 * map, and an active pixel array size (W x H), shading map entry
3180 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
3181 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
3182 * The map is assumed to be bilinearly interpolated between the sample points.</p>
3183 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
3184 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
3185 * The shading map is stored in a fully interleaved format, and its size
3186 * is provided in the camera static metadata by android.lens.info.shadingMapSize.</p>
3187 * <p>The shading map should have on the order of 30-40 rows and columns,
3188 * and must be smaller than 64x64.</p>
3189 * <p>As an example, given a very small map defined as:</p>
3190 * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
3191 * android.statistics.lensShadingMap =
3192 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003193 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
3194 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
3195 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
3196 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
3197 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Ruben Brunk57493682014-05-27 18:58:08 -07003198 * </code></pre>
3199 * <p>The low-resolution scaling map images for each channel are
3200 * (displayed using nearest-neighbor interpolation):</p>
3201 * <p><img alt="Red lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
3202 * <img alt="Green (even rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
3203 * <img alt="Green (odd rows) lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
3204 * <img alt="Blue lens shading map" src="../../../../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
3205 * <p>As a visualization only, inverting the full-color map to recover an
3206 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
3207 * <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 Talvalafd3e2892014-10-06 10:23:55 -07003208 * <p><b>Range of valid values:</b><br>
3209 * Each gain factor is &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003210 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3211 * <p><b>Full capability</b> -
3212 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3213 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003214 *
3215 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003216 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk57493682014-05-27 18:58:08 -07003217 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003218 */
3219 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
3220 new Key<float[]>("android.statistics.lensShadingMap", float[].class);
3221
3222 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003223 * <p>The best-fit color channel gains calculated
Zhijun Hecc28a412014-02-24 15:11:23 -08003224 * by the camera device's statistics units for the current output frame.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003225 * <p>This may be different than the gains used for this frame,
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003226 * since statistics processing on data from a new frame
3227 * typically completes after the transform has already been
Igor Murashkinace5bf02013-12-10 17:36:40 -08003228 * applied to that frame.</p>
3229 * <p>The 4 channel gains are defined in Bayer domain,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003230 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003231 * <p>This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkinace5bf02013-12-10 17:36:40 -08003232 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003233 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003234 *
3235 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Igor Murashkin9c595172014-05-12 13:56:20 -07003236 * @deprecated
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003237 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003238 */
Igor Murashkin9c595172014-05-12 13:56:20 -07003239 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003240 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
3241 new Key<float[]>("android.statistics.predictedColorGains", float[].class);
3242
3243 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003244 * <p>The best-fit color transform matrix estimate
Zhijun Hecc28a412014-02-24 15:11:23 -08003245 * calculated by the camera device's statistics units for the current
3246 * output frame.</p>
3247 * <p>The camera device will provide the estimate from its
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003248 * statistics unit on the white balance transforms to use
Zhijun Hecc28a412014-02-24 15:11:23 -08003249 * for the next frame. These are the values the camera device believes
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003250 * are the best fit for the current output frame. This may
3251 * be different than the transform used for this frame, since
3252 * statistics processing on data from a new frame typically
3253 * completes after the transform has already been applied to
Igor Murashkinace5bf02013-12-10 17:36:40 -08003254 * that frame.</p>
3255 * <p>These estimates must be provided for all frames, even if
3256 * capture settings and color transforms are set by the application.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003257 * <p>This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkinace5bf02013-12-10 17:36:40 -08003258 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003259 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07003260 * @deprecated
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003261 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003262 */
Igor Murashkin9c595172014-05-12 13:56:20 -07003263 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003264 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
3265 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
3266
3267 /**
Zhijun He208fb6c2014-02-03 13:09:06 -08003268 * <p>The camera device estimated scene illumination lighting
3269 * frequency.</p>
3270 * <p>Many light sources, such as most fluorescent lights, flicker at a rate
3271 * that depends on the local utility power standards. This flicker must be
3272 * accounted for by auto-exposure routines to avoid artifacts in captured images.
3273 * The camera device uses this entry to tell the application what the scene
3274 * illuminant frequency is.</p>
3275 * <p>When manual exposure control is enabled
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003276 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} ==
3277 * OFF</code>), the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't perform
3278 * antibanding, and the application can ensure it selects
3279 * exposure times that do not cause banding issues by looking
3280 * into this metadata field. See
3281 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} for more details.</p>
3282 * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003283 * <p><b>Possible values:</b>
3284 * <ul>
3285 * <li>{@link #STATISTICS_SCENE_FLICKER_NONE NONE}</li>
3286 * <li>{@link #STATISTICS_SCENE_FLICKER_50HZ 50HZ}</li>
3287 * <li>{@link #STATISTICS_SCENE_FLICKER_60HZ 60HZ}</li>
3288 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003289 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3290 * <p><b>Full capability</b> -
3291 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3292 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He208fb6c2014-02-03 13:09:06 -08003293 *
3294 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
3295 * @see CaptureRequest#CONTROL_AE_MODE
3296 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003297 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003298 * @see #STATISTICS_SCENE_FLICKER_NONE
3299 * @see #STATISTICS_SCENE_FLICKER_50HZ
3300 * @see #STATISTICS_SCENE_FLICKER_60HZ
3301 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003302 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003303 public static final Key<Integer> STATISTICS_SCENE_FLICKER =
3304 new Key<Integer>("android.statistics.sceneFlicker", int.class);
3305
3306 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003307 * <p>Operating mode for hot pixel map generation.</p>
3308 * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
3309 * If set to <code>false</code>, no hot pixel map will be returned.</p>
3310 * <p><b>Range of valid values:</b><br>
3311 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003312 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003313 *
3314 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
3315 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
3316 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003317 @PublicKey
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003318 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
3319 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
3320
3321 /**
3322 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
3323 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
3324 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
3325 * bottom-right of the pixel array, respectively. The width and
3326 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
3327 * This may include hot pixels that lie outside of the active array
3328 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003329 * <p><b>Range of valid values:</b><br></p>
3330 * <p>n &lt;= number of pixels on the sensor.
3331 * The <code>(x, y)</code> coordinates must be bounded by
3332 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003333 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003334 *
3335 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3336 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
3337 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003338 @PublicKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003339 public static final Key<android.graphics.Point[]> STATISTICS_HOT_PIXEL_MAP =
3340 new Key<android.graphics.Point[]>("android.statistics.hotPixelMap", android.graphics.Point[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003341
3342 /**
Zhijun He379af012014-05-06 11:54:54 -07003343 * <p>Whether the camera device will output the lens
3344 * shading map in output result metadata.</p>
3345 * <p>When set to ON,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003346 * android.statistics.lensShadingMap will be provided in
Zhijun He379af012014-05-06 11:54:54 -07003347 * the output result metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003348 * <p>ON is always supported on devices with the RAW capability.</p>
3349 * <p><b>Possible values:</b>
3350 * <ul>
3351 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li>
3352 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li>
3353 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003354 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3355 * <p><b>Full capability</b> -
3356 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3357 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3358 *
3359 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -07003360 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
3361 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
3362 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003363 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07003364 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
3365 new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
3366
3367 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003368 * <p>Tonemapping / contrast / gamma curve for the blue
Igor Murashkine0060932014-01-17 17:24:11 -08003369 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3370 * CONTRAST_CURVE.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003371 * <p>See android.tonemap.curveRed for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003372 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3373 * <p><b>Full capability</b> -
3374 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3375 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003376 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003377 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He5f2a47f2014-01-16 15:44:41 -08003378 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003379 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003380 */
Zhijun He3ffd7052013-08-19 15:45:08 -07003381 public static final Key<float[]> TONEMAP_CURVE_BLUE =
3382 new Key<float[]>("android.tonemap.curveBlue", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003383
3384 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003385 * <p>Tonemapping / contrast / gamma curve for the green
Igor Murashkine0060932014-01-17 17:24:11 -08003386 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3387 * CONTRAST_CURVE.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003388 * <p>See android.tonemap.curveRed for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003389 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3390 * <p><b>Full capability</b> -
3391 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3392 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003393 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003394 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He5f2a47f2014-01-16 15:44:41 -08003395 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003396 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003397 */
Zhijun He3ffd7052013-08-19 15:45:08 -07003398 public static final Key<float[]> TONEMAP_CURVE_GREEN =
3399 new Key<float[]>("android.tonemap.curveGreen", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003400
3401 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003402 * <p>Tonemapping / contrast / gamma curve for the red
Igor Murashkine0060932014-01-17 17:24:11 -08003403 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3404 * CONTRAST_CURVE.</p>
3405 * <p>Each channel's curve is defined by an array of control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003406 * <pre><code>android.tonemap.curveRed =
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003407 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He870922b2014-02-15 21:47:51 -08003408 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003409 * <p>These are sorted in order of increasing <code>Pin</code>; it is
3410 * required that input values 0.0 and 1.0 are included in the list to
Igor Murashkine0060932014-01-17 17:24:11 -08003411 * define a complete mapping. For input values between control points,
3412 * the camera device must linearly interpolate between the control
3413 * points.</p>
3414 * <p>Each curve can have an independent number of points, and the number
3415 * of points can be less than max (that is, the request doesn't have to
3416 * always provide a curve with number of points equivalent to
3417 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
3418 * <p>A few examples, and their corresponding graphical mappings; these
3419 * only specify the red channel and the precision is limited to 4
3420 * digits, for conciseness.</p>
3421 * <p>Linear mapping:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003422 * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003423 * </code></pre>
3424 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
3425 * <p>Invert mapping:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003426 * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003427 * </code></pre>
3428 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
3429 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003430 * <pre><code>android.tonemap.curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003431 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
3432 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
3433 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
3434 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003435 * </code></pre>
3436 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
3437 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003438 * <pre><code>android.tonemap.curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003439 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
3440 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
3441 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
3442 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003443 * </code></pre>
3444 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003445 * <p><b>Range of valid values:</b><br>
3446 * 0-1 on both input and output coordinates, normalized
3447 * as a floating-point value such that 0 == black and 1 == white.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003448 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3449 * <p><b>Full capability</b> -
3450 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3451 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003452 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003453 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkine0060932014-01-17 17:24:11 -08003454 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003455 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003456 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003457 */
3458 public static final Key<float[]> TONEMAP_CURVE_RED =
3459 new Key<float[]>("android.tonemap.curveRed", float[].class);
3460
3461 /**
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003462 * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}
3463 * is CONTRAST_CURVE.</p>
3464 * <p>The tonemapCurve consist of three curves for each of red, green, and blue
3465 * channels respectively. The following example uses the red channel as an
3466 * example. The same logic applies to green and blue channel.
3467 * Each channel's curve is defined by an array of control points:</p>
3468 * <pre><code>curveRed =
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003469 * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003470 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
3471 * <p>These are sorted in order of increasing <code>Pin</code>; it is always
3472 * guaranteed that input values 0.0 and 1.0 are included in the list to
3473 * define a complete mapping. For input values between control points,
3474 * the camera device must linearly interpolate between the control
3475 * points.</p>
3476 * <p>Each curve can have an independent number of points, and the number
3477 * of points can be less than max (that is, the request doesn't have to
3478 * always provide a curve with number of points equivalent to
3479 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
3480 * <p>A few examples, and their corresponding graphical mappings; these
3481 * only specify the red channel and the precision is limited to 4
3482 * digits, for conciseness.</p>
3483 * <p>Linear mapping:</p>
3484 * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ]
3485 * </code></pre>
3486 * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
3487 * <p>Invert mapping:</p>
3488 * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ]
3489 * </code></pre>
3490 * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
3491 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
3492 * <pre><code>curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003493 * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
3494 * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
3495 * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
3496 * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003497 * </code></pre>
3498 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
3499 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
3500 * <pre><code>curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003501 * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
3502 * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
3503 * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
3504 * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003505 * </code></pre>
3506 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003507 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3508 * <p><b>Full capability</b> -
3509 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3510 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003511 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003512 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003513 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
3514 * @see CaptureRequest#TONEMAP_MODE
3515 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003516 @PublicKey
3517 @SyntheticKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003518 public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE =
3519 new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class);
3520
3521 /**
Igor Murashkine0060932014-01-17 17:24:11 -08003522 * <p>High-level global contrast/gamma/tonemapping control.</p>
3523 * <p>When switching to an application-defined contrast curve by setting
3524 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
3525 * per-channel with a set of <code>(in, out)</code> points that specify the
3526 * mapping from input high-bit-depth pixel value to the output
3527 * low-bit-depth value. Since the actual pixel ranges of both input
3528 * and output may change depending on the camera pipeline, the values
3529 * are specified by normalized floating-point numbers.</p>
3530 * <p>More-complex color mapping operations such as 3D color look-up
3531 * tables, selective chroma enhancement, or other non-linear color
3532 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3533 * CONTRAST_CURVE.</p>
3534 * <p>When using either FAST or HIGH_QUALITY, the camera device will
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003535 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.
Igor Murashkine0060932014-01-17 17:24:11 -08003536 * These values are always available, and as close as possible to the
3537 * actually used nonlinear/nonglobal transforms.</p>
Zhijun Hefa7c7552014-05-22 16:36:02 -07003538 * <p>If a request is sent with CONTRAST_CURVE with the camera device's
Igor Murashkine0060932014-01-17 17:24:11 -08003539 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
3540 * roughly the same.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003541 * <p><b>Possible values:</b>
3542 * <ul>
3543 * <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li>
3544 * <li>{@link #TONEMAP_MODE_FAST FAST}</li>
3545 * <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003546 * <li>{@link #TONEMAP_MODE_GAMMA_VALUE GAMMA_VALUE}</li>
3547 * <li>{@link #TONEMAP_MODE_PRESET_CURVE PRESET_CURVE}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003548 * </ul></p>
3549 * <p><b>Available values for this device:</b><br>
3550 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003551 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3552 * <p><b>Full capability</b> -
3553 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3554 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08003555 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003556 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003557 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003558 * @see CaptureRequest#TONEMAP_CURVE
Igor Murashkine0060932014-01-17 17:24:11 -08003559 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003560 * @see #TONEMAP_MODE_CONTRAST_CURVE
3561 * @see #TONEMAP_MODE_FAST
3562 * @see #TONEMAP_MODE_HIGH_QUALITY
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003563 * @see #TONEMAP_MODE_GAMMA_VALUE
3564 * @see #TONEMAP_MODE_PRESET_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003565 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003566 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003567 public static final Key<Integer> TONEMAP_MODE =
3568 new Key<Integer>("android.tonemap.mode", int.class);
3569
3570 /**
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08003571 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3572 * GAMMA_VALUE</p>
3573 * <p>The tonemap curve will be defined the following formula:
3574 * * OUT = pow(IN, 1.0 / gamma)
3575 * where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
3576 * pow is the power function and gamma is the gamma value specified by this
3577 * key.</p>
3578 * <p>The same curve will be applied to all color channels. The camera device
3579 * may clip the input gamma value to its supported range. The actual applied
3580 * value will be returned in capture result.</p>
3581 * <p>The valid range of gamma value varies on different devices, but values
3582 * within [1.0, 5.0] are guaranteed not to be clipped.</p>
3583 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3584 *
3585 * @see CaptureRequest#TONEMAP_MODE
3586 */
3587 @PublicKey
3588 public static final Key<Float> TONEMAP_GAMMA =
3589 new Key<Float>("android.tonemap.gamma", float.class);
3590
3591 /**
3592 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3593 * PRESET_CURVE</p>
3594 * <p>The tonemap curve will be defined by specified standard.</p>
3595 * <p>sRGB (approximated by 16 control points):</p>
3596 * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
3597 * <p>Rec. 709 (approximated by 16 control points):</p>
3598 * <p><img alt="Rec. 709 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
3599 * <p>Note that above figures show a 16 control points approximation of preset
3600 * curves. Camera devices may apply a different approximation to the curve.</p>
3601 * <p><b>Possible values:</b>
3602 * <ul>
3603 * <li>{@link #TONEMAP_PRESET_CURVE_SRGB SRGB}</li>
3604 * <li>{@link #TONEMAP_PRESET_CURVE_REC709 REC709}</li>
3605 * </ul></p>
3606 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3607 *
3608 * @see CaptureRequest#TONEMAP_MODE
3609 * @see #TONEMAP_PRESET_CURVE_SRGB
3610 * @see #TONEMAP_PRESET_CURVE_REC709
3611 */
3612 @PublicKey
3613 public static final Key<Integer> TONEMAP_PRESET_CURVE =
3614 new Key<Integer>("android.tonemap.presetCurve", int.class);
3615
3616 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003617 * <p>This LED is nominally used to indicate to the user
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003618 * that the camera is powered on and may be streaming images back to the
3619 * Application Processor. In certain rare circumstances, the OS may
3620 * disable this when video is processed locally and not transmitted to
Igor Murashkinace5bf02013-12-10 17:36:40 -08003621 * any untrusted applications.</p>
3622 * <p>In particular, the LED <em>must</em> always be on when the data could be
3623 * transmitted off the device. The LED <em>should</em> always be on whenever
3624 * data is stored locally on the device.</p>
3625 * <p>The LED <em>may</em> be off if a trusted application is using the data that
3626 * doesn't violate the above rules.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003627 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003628 * @hide
3629 */
3630 public static final Key<Boolean> LED_TRANSMIT =
3631 new Key<Boolean>("android.led.transmit", boolean.class);
3632
3633 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003634 * <p>Whether black-level compensation is locked
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08003635 * to its current values, or is free to vary.</p>
3636 * <p>Whether the black level offset was locked for this frame. Should be
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003637 * 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 -08003638 * a change in other capture settings forced the camera device to
3639 * perform a black level reset.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003640 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3641 * <p><b>Full capability</b> -
3642 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3643 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003644 *
3645 * @see CaptureRequest#BLACK_LEVEL_LOCK
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003646 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003647 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003648 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003649 public static final Key<Boolean> BLACK_LEVEL_LOCK =
3650 new Key<Boolean>("android.blackLevel.lock", boolean.class);
3651
Igor Murashkin3865a842014-01-17 18:18:39 -08003652 /**
3653 * <p>The frame number corresponding to the last request
3654 * with which the output result (metadata + buffers) has been fully
3655 * synchronized.</p>
3656 * <p>When a request is submitted to the camera device, there is usually a
3657 * delay of several frames before the controls get applied. A camera
3658 * device may either choose to account for this delay by implementing a
3659 * pipeline and carefully submit well-timed atomic control updates, or
3660 * it may start streaming control changes that span over several frame
3661 * boundaries.</p>
3662 * <p>In the latter case, whenever a request's settings change relative to
3663 * the previous submitted request, the full set of changes may take
3664 * multiple frame durations to fully take effect. Some settings may
3665 * take effect sooner (in less frame durations) than others.</p>
3666 * <p>While a set of control changes are being propagated, this value
3667 * will be CONVERGING.</p>
3668 * <p>Once it is fully known that a set of control changes have been
3669 * finished propagating, and the resulting updated control settings
3670 * have been read back by the camera device, this value will be set
3671 * to a non-negative frame number (corresponding to the request to
3672 * which the results have synchronized to).</p>
3673 * <p>Older camera device implementations may not have a way to detect
3674 * when all camera controls have been applied, and will always set this
3675 * value to UNKNOWN.</p>
3676 * <p>FULL capability devices will always have this value set to the
3677 * frame number of the request corresponding to this result.</p>
3678 * <p><em>Further details</em>:</p>
3679 * <ul>
3680 * <li>Whenever a request differs from the last request, any future
3681 * results not yet returned may have this value set to CONVERGING (this
3682 * could include any in-progress captures not yet returned by the camera
3683 * device, for more details see pipeline considerations below).</li>
3684 * <li>Submitting a series of multiple requests that differ from the
3685 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
3686 * moves the new synchronization frame to the last non-repeating
3687 * request (using the smallest frame number from the contiguous list of
3688 * repeating requests).</li>
3689 * <li>Submitting the same request repeatedly will not change this value
3690 * to CONVERGING, if it was already a non-negative value.</li>
3691 * <li>When this value changes to non-negative, that means that all of the
3692 * metadata controls from the request have been applied, all of the
3693 * metadata controls from the camera device have been read to the
3694 * updated values (into the result), and all of the graphics buffers
3695 * corresponding to this result are also synchronized to the request.</li>
3696 * </ul>
3697 * <p><em>Pipeline considerations</em>:</p>
3698 * <p>Submitting a request with updated controls relative to the previously
3699 * submitted requests may also invalidate the synchronization state
3700 * of all the results corresponding to currently in-flight requests.</p>
3701 * <p>In other words, results for this current request and up to
3702 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
3703 * android.sync.frameNumber change to CONVERGING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003704 * <p><b>Possible values:</b>
3705 * <ul>
3706 * <li>{@link #SYNC_FRAME_NUMBER_CONVERGING CONVERGING}</li>
3707 * <li>{@link #SYNC_FRAME_NUMBER_UNKNOWN UNKNOWN}</li>
3708 * </ul></p>
3709 * <p><b>Available values for this device:</b><br>
3710 * Either a non-negative value corresponding to a
3711 * <code>frame_number</code>, or one of the two enums (CONVERGING / UNKNOWN).</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003712 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08003713 *
3714 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
3715 * @see #SYNC_FRAME_NUMBER_CONVERGING
3716 * @see #SYNC_FRAME_NUMBER_UNKNOWN
3717 * @hide
3718 */
Zhijun He4f91e2a2014-04-17 13:20:21 -07003719 public static final Key<Long> SYNC_FRAME_NUMBER =
3720 new Key<Long>("android.sync.frameNumber", long.class);
Igor Murashkin3865a842014-01-17 18:18:39 -08003721
Zhijun He0e99c222015-01-29 15:26:05 -08003722 /**
3723 * <p>The amount of exposure time increase factor applied to the original output
3724 * frame by the application processing before sending for reprocessing.</p>
3725 * <p>This is optional, and will be supported if the camera device supports YUV_REPROCESSING
3726 * capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains YUV_REPROCESSING).</p>
3727 * <p>For some YUV reprocessing use cases, the application may choose to filter the original
3728 * output frames to effectively reduce the noise to the same level as a frame that was
3729 * captured with longer exposure time. To be more specific, assuming the original captured
3730 * images were captured with a sensitivity of S and an exposure time of T, the model in
3731 * the camera device is that the amount of noise in the image would be approximately what
3732 * would be expected if the original capture parameters had been a sensitivity of
3733 * S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather
3734 * than S and T respectively. If the captured images were processed by the application
3735 * before being sent for reprocessing, then the application may have used image processing
3736 * algorithms and/or multi-frame image fusion to reduce the noise in the
3737 * application-processed images (input images). By using the effectiveExposureFactor
3738 * control, the application can communicate to the camera device the actual noise level
3739 * improvement in the application-processed image. With this information, the camera
3740 * device can select appropriate noise reduction and edge enhancement parameters to avoid
3741 * excessive noise reduction ({@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}) and insufficient edge
3742 * enhancement ({@link CaptureRequest#EDGE_MODE android.edge.mode}) being applied to the reprocessed frames.</p>
3743 * <p>For example, for multi-frame image fusion use case, the application may fuse
3744 * multiple output frames together to a final frame for reprocessing. When N image are
3745 * fused into 1 image for reprocessing, the exposure time increase factor could be up to
3746 * square root of N (based on a simple photon shot noise model). The camera device will
3747 * adjust the reprocessing noise reduction and edge enhancement parameters accordingly to
3748 * produce the best quality images.</p>
3749 * <p>This is relative factor, 1.0 indicates the application hasn't processed the input
3750 * buffer in a way that affects its effective exposure time.</p>
3751 * <p>This control is only effective for YUV reprocessing capture request. For noise
3752 * reduction reprocessing, it is only effective when <code>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} != OFF</code>.
3753 * Similarly, for edge enhancement reprocessing, it is only effective when
3754 * <code>{@link CaptureRequest#EDGE_MODE android.edge.mode} != OFF</code>.</p>
3755 * <p><b>Units</b>: Relative exposure time increase factor.</p>
3756 * <p><b>Range of valid values:</b><br>
3757 * &gt;= 1.0</p>
3758 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3759 *
3760 * @see CaptureRequest#EDGE_MODE
3761 * @see CaptureRequest#NOISE_REDUCTION_MODE
3762 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
3763 */
3764 @PublicKey
3765 public static final Key<Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR =
3766 new Key<Float>("android.reprocess.effectiveExposureFactor", float.class);
3767
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003768 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3769 * End generated code
3770 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07003771
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003772
3773
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08003774}