blob: 13ad092f6efd489d8ca4c66eb1ae3efecd43f808 [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 Talvala8b905572015-05-14 15:43:01 -070019import android.annotation.NonNull;
20import android.annotation.Nullable;
Mathew Inwoodbcbe4402018-08-08 15:42:59 +010021import android.annotation.UnsupportedAppUsage;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070022import android.hardware.camera2.impl.CameraMetadataNative;
Igor Murashkinbdf366c2014-07-25 16:54:20 -070023import android.hardware.camera2.impl.CaptureResultExtras;
Igor Murashkin6c76f582014-07-15 17:19:49 -070024import android.hardware.camera2.impl.PublicKey;
25import android.hardware.camera2.impl.SyntheticKey;
Igor Murashkind6d65152014-05-19 16:31:02 -070026import android.hardware.camera2.utils.TypeReference;
27import android.util.Log;
Igor Murashkin72f9f0a2014-05-14 15:46:10 -070028import android.util.Rational;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080029
Igor Murashkind6d65152014-05-19 16:31:02 -070030import java.util.List;
31
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080032/**
Igor Murashkindb075af2014-05-21 10:07:08 -070033 * <p>The subset of the results of a single image capture from the image sensor.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080034 *
Igor Murashkindb075af2014-05-21 10:07:08 -070035 * <p>Contains a subset of the final configuration for the capture hardware (sensor, lens,
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080036 * flash), the processing pipeline, the control algorithms, and the output
37 * buffers.</p>
38 *
39 * <p>CaptureResults are produced by a {@link CameraDevice} after processing a
40 * {@link CaptureRequest}. All properties listed for capture requests can also
41 * be queried on the capture result, to determine the final values used for
42 * capture. The result also includes additional metadata about the state of the
43 * camera device during the capture.</p>
44 *
Igor Murashkindb075af2014-05-21 10:07:08 -070045 * <p>Not all properties returned by {@link CameraCharacteristics#getAvailableCaptureResultKeys()}
46 * are necessarily available. Some results are {@link CaptureResult partial} and will
47 * not have every key set. Only {@link TotalCaptureResult total} results are guaranteed to have
48 * every key available that was enabled by the request.</p>
49 *
50 * <p>{@link CaptureResult} objects are immutable.</p>
Ruben Brunkf967a542014-04-28 16:31:11 -070051 *
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080052 */
Igor Murashkindb075af2014-05-21 10:07:08 -070053public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
Igor Murashkind6d65152014-05-19 16:31:02 -070054
55 private static final String TAG = "CaptureResult";
56 private static final boolean VERBOSE = false;
57
58 /**
59 * A {@code Key} is used to do capture result field lookups with
60 * {@link CaptureResult#get}.
61 *
62 * <p>For example, to get the timestamp corresponding to the exposure of the first row:
63 * <code><pre>
64 * long timestamp = captureResult.get(CaptureResult.SENSOR_TIMESTAMP);
65 * </pre></code>
66 * </p>
67 *
68 * <p>To enumerate over all possible keys for {@link CaptureResult}, see
69 * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p>
70 *
71 * @see CaptureResult#get
72 * @see CameraCharacteristics#getAvailableCaptureResultKeys
73 */
74 public final static class Key<T> {
75 private final CameraMetadataNative.Key<T> mKey;
76
77 /**
78 * Visible for testing and vendor extensions only.
79 *
80 * @hide
81 */
Mathew Inwoodbcbe4402018-08-08 15:42:59 +010082 @UnsupportedAppUsage
Emilian Peevde62d842017-03-23 19:20:40 +000083 public Key(String name, Class<T> type, long vendorId) {
84 mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
85 }
86
87 /**
88 * Visible for testing and vendor extensions only.
89 *
90 * @hide
91 */
Justin Yunf01e40c2018-05-18 20:39:45 +090092 public Key(String name, String fallbackName, Class<T> type) {
93 mKey = new CameraMetadataNative.Key<T>(name, fallbackName, type);
94 }
95
96 /**
Eino-Ville Talvala1cf59fd2019-01-25 17:33:05 -080097 * Construct a new Key with a given name and type.
Justin Yunf01e40c2018-05-18 20:39:45 +090098 *
Eino-Ville Talvala1cf59fd2019-01-25 17:33:05 -080099 * <p>Normally, applications should use the existing Key definitions in
100 * {@link CaptureResult}, and not need to construct their own Key objects. However, they may
101 * be useful for testing purposes and for defining custom capture result fields.</p>
Justin Yunf01e40c2018-05-18 20:39:45 +0900102 */
Igor Murashkind6d65152014-05-19 16:31:02 -0700103 public Key(String name, Class<T> type) {
104 mKey = new CameraMetadataNative.Key<T>(name, type);
105 }
106
107 /**
108 * Visible for testing and vendor extensions only.
109 *
110 * @hide
111 */
Mathew Inwoodbcbe4402018-08-08 15:42:59 +0100112 @UnsupportedAppUsage
Igor Murashkind6d65152014-05-19 16:31:02 -0700113 public Key(String name, TypeReference<T> typeReference) {
114 mKey = new CameraMetadataNative.Key<T>(name, typeReference);
115 }
116
117 /**
118 * Return a camelCase, period separated name formatted like:
119 * {@code "root.section[.subsections].name"}.
120 *
121 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
122 * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
123 *
124 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
125 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
126 * specific key might look like {@code "com.google.nexus.data.private"}.</p>
127 *
128 * @return String representation of the key name
129 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700130 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700131 public String getName() {
132 return mKey.getName();
133 }
134
135 /**
Emilian Peevde62d842017-03-23 19:20:40 +0000136 * Return vendor tag id.
137 *
138 * @hide
139 */
140 public long getVendorId() {
141 return mKey.getVendorId();
142 }
143
144 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700145 * {@inheritDoc}
146 */
147 @Override
148 public final int hashCode() {
149 return mKey.hashCode();
150 }
151
152 /**
153 * {@inheritDoc}
154 */
155 @SuppressWarnings("unchecked")
156 @Override
157 public final boolean equals(Object o) {
158 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
159 }
160
161 /**
Chien-Yu Chen12a83852015-07-07 12:17:22 -0700162 * Return this {@link Key} as a string representation.
163 *
164 * <p>{@code "CaptureResult.Key(%s)"}, where {@code %s} represents
165 * the name of this key as returned by {@link #getName}.</p>
166 *
167 * @return string representation of {@link Key}
168 */
169 @NonNull
170 @Override
171 public String toString() {
172 return String.format("CaptureResult.Key(%s)", mKey.getName());
173 }
174
175 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700176 * Visible for CameraMetadataNative implementation only; do not use.
177 *
178 * TODO: Make this private or remove it altogether.
179 *
180 * @hide
181 */
Mathew Inwoodbcbe4402018-08-08 15:42:59 +0100182 @UnsupportedAppUsage
Igor Murashkind6d65152014-05-19 16:31:02 -0700183 public CameraMetadataNative.Key<T> getNativeKey() {
184 return mKey;
185 }
186
187 @SuppressWarnings({ "unchecked" })
188 /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) {
189 mKey = (CameraMetadataNative.Key<T>) nativeKey;
190 }
191 }
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700192
Mathew Inwoodbcbe4402018-08-08 15:42:59 +0100193 @UnsupportedAppUsage
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700194 private final CameraMetadataNative mResults;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700195 private final CaptureRequest mRequest;
196 private final int mSequenceId;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700197 private final long mFrameNumber;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700198
Igor Murashkin70725502013-06-25 20:27:06 +0000199 /**
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700200 * Takes ownership of the passed-in properties object
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700201 *
202 * <p>For internal use only</p>
Igor Murashkin70725502013-06-25 20:27:06 +0000203 * @hide
204 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700205 public CaptureResult(CameraMetadataNative results, CaptureRequest parent,
206 CaptureResultExtras extras) {
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700207 if (results == null) {
208 throw new IllegalArgumentException("results was null");
209 }
210
211 if (parent == null) {
212 throw new IllegalArgumentException("parent was null");
213 }
214
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700215 if (extras == null) {
216 throw new IllegalArgumentException("extras was null");
217 }
218
Igor Murashkind6d65152014-05-19 16:31:02 -0700219 mResults = CameraMetadataNative.move(results);
220 if (mResults.isEmpty()) {
221 throw new AssertionError("Results must not be empty");
222 }
Emilian Peevde62d842017-03-23 19:20:40 +0000223 setNativeInstance(mResults);
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700224 mRequest = parent;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700225 mSequenceId = extras.getRequestId();
226 mFrameNumber = extras.getFrameNumber();
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700227 }
228
Ruben Brunkf967a542014-04-28 16:31:11 -0700229 /**
230 * Returns a copy of the underlying {@link CameraMetadataNative}.
231 * @hide
232 */
233 public CameraMetadataNative getNativeCopy() {
234 return new CameraMetadataNative(mResults);
235 }
236
Igor Murashkind6d65152014-05-19 16:31:02 -0700237 /**
238 * Creates a request-less result.
239 *
240 * <p><strong>For testing only.</strong></p>
241 * @hide
242 */
243 public CaptureResult(CameraMetadataNative results, int sequenceId) {
244 if (results == null) {
245 throw new IllegalArgumentException("results was null");
246 }
247
248 mResults = CameraMetadataNative.move(results);
249 if (mResults.isEmpty()) {
250 throw new AssertionError("Results must not be empty");
251 }
252
Emilian Peevde62d842017-03-23 19:20:40 +0000253 setNativeInstance(mResults);
Igor Murashkind6d65152014-05-19 16:31:02 -0700254 mRequest = null;
255 mSequenceId = sequenceId;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700256 mFrameNumber = -1;
Igor Murashkind6d65152014-05-19 16:31:02 -0700257 }
258
259 /**
260 * Get a capture result field value.
261 *
262 * <p>The field definitions can be found in {@link CaptureResult}.</p>
263 *
264 * <p>Querying the value for the same key more than once will return a value
265 * which is equal to the previous queried value.</p>
266 *
267 * @throws IllegalArgumentException if the key was not valid
268 *
269 * @param key The result field to read.
270 * @return The value of that key, or {@code null} if the field is not set.
271 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700272 @Nullable
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700273 public <T> T get(Key<T> key) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700274 T value = mResults.get(key);
275 if (VERBOSE) Log.v(TAG, "#get for Key = " + key.getName() + ", returned value = " + value);
276 return value;
277 }
278
279 /**
280 * {@inheritDoc}
281 * @hide
282 */
283 @SuppressWarnings("unchecked")
284 @Override
285 protected <T> T getProtected(Key<?> key) {
286 return (T) mResults.get(key);
287 }
288
289 /**
290 * {@inheritDoc}
291 * @hide
292 */
293 @SuppressWarnings("unchecked")
294 @Override
295 protected Class<Key<?>> getKeyClass() {
296 Object thisClass = Key.class;
297 return (Class<Key<?>>)thisClass;
298 }
299
300 /**
301 * Dumps the native metadata contents to logcat.
302 *
303 * <p>Visibility for testing/debugging only. The results will not
304 * include any synthesized keys, as they are invisible to the native layer.</p>
305 *
306 * @hide
307 */
308 public void dumpToLog() {
309 mResults.dumpToLog();
310 }
311
312 /**
313 * {@inheritDoc}
314 */
315 @Override
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700316 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700317 public List<Key<?>> getKeys() {
318 // Force the javadoc for this function to show up on the CaptureResult page
319 return super.getKeys();
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800320 }
321
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700322 /**
323 * Get the request associated with this result.
324 *
Igor Murashkindb075af2014-05-21 10:07:08 -0700325 * <p>Whenever a request has been fully or partially captured, with
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700326 * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted} or
327 * {@link CameraCaptureSession.CaptureCallback#onCaptureProgressed}, the {@code result}'s
Igor Murashkindb075af2014-05-21 10:07:08 -0700328 * {@code getRequest()} will return that {@code request}.
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700329 * </p>
330 *
Igor Murashkindb075af2014-05-21 10:07:08 -0700331 * <p>For example,
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700332 * <code><pre>cameraDevice.capture(someRequest, new CaptureCallback() {
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700333 * {@literal @}Override
334 * void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) {
335 * assert(myResult.getRequest.equals(myRequest) == true);
336 * }
Igor Murashkindb075af2014-05-21 10:07:08 -0700337 * }, null);
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700338 * </code></pre>
339 * </p>
340 *
341 * @return The request associated with this result. Never {@code null}.
342 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700343 @NonNull
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700344 public CaptureRequest getRequest() {
345 return mRequest;
346 }
347
348 /**
349 * Get the frame number associated with this result.
350 *
351 * <p>Whenever a request has been processed, regardless of failure or success,
352 * it gets a unique frame number assigned to its future result/failure.</p>
353 *
Chien-Yu Chen5398a672015-03-19 14:48:43 -0700354 * <p>For the same type of request (capturing from the camera device or reprocessing), this
355 * value monotonically increments, starting with 0, for every new result or failure and the
356 * scope is the lifetime of the {@link CameraDevice}. Between different types of requests,
357 * the frame number may not monotonically increment. For example, the frame number of a newer
358 * reprocess result may be smaller than the frame number of an older result of capturing new
359 * images from the camera device, but the frame number of a newer reprocess result will never be
360 * smaller than the frame number of an older reprocess result.</p>
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700361 *
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700362 * @return The frame number
Chien-Yu Chen5398a672015-03-19 14:48:43 -0700363 *
364 * @see CameraDevice#createCaptureRequest
365 * @see CameraDevice#createReprocessCaptureRequest
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700366 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700367 public long getFrameNumber() {
368 return mFrameNumber;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700369 }
370
371 /**
372 * The sequence ID for this failure that was returned by the
Eino-Ville Talvala0a160ac2014-07-02 14:29:26 -0700373 * {@link CameraCaptureSession#capture} family of functions.
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700374 *
375 * <p>The sequence ID is a unique monotonically increasing value starting from 0,
376 * incremented every time a new group of requests is submitted to the CameraDevice.</p>
377 *
378 * @return int The ID for the sequence of requests that this capture result is a part of
379 *
Aurimas Liutikasdc309f22018-06-04 15:35:31 -0700380 * @see CameraCaptureSession.CaptureCallback#onCaptureSequenceCompleted
381 * @see CameraCaptureSession.CaptureCallback#onCaptureSequenceAborted
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700382 */
383 public int getSequenceId() {
384 return mSequenceId;
385 }
386
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700387 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
388 * The key entries below this point are generated from metadata
389 * definitions in /system/media/camera/docs. Do not modify by hand or
390 * modify the comment blocks at the start or end.
391 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
392
393 /**
Zhijun He379af012014-05-06 11:54:54 -0700394 * <p>The mode control selects how the image data is converted from the
395 * sensor's native color into linear sRGB color.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700396 * <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 -0700397 * control is overridden by the AWB routine. When AWB is disabled, the
398 * application controls how the color mapping is performed.</p>
399 * <p>We define the expected processing pipeline below. For consistency
400 * across devices, this is always the case with TRANSFORM_MATRIX.</p>
401 * <p>When either FULL or HIGH_QUALITY is used, the camera device may
402 * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
403 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
404 * camera device (in the results) and be roughly correct.</p>
405 * <p>Switching to TRANSFORM_MATRIX and using the data provided from
406 * FAST or HIGH_QUALITY will yield a picture with the same white point
407 * as what was produced by the camera device in the earlier frame.</p>
408 * <p>The expected processing pipeline is as follows:</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800409 * <p><img alt="White balance processing pipeline" src="/reference/images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
Zhijun He379af012014-05-06 11:54:54 -0700410 * <p>The white balance is encoded by two values, a 4-channel white-balance
411 * gain vector (applied in the Bayer domain), and a 3x3 color transform
412 * matrix (applied after demosaic).</p>
413 * <p>The 4-channel white-balance gains are defined as:</p>
414 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ]
415 * </code></pre>
416 * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
417 * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
418 * These may be identical for a given camera device implementation; if
419 * the camera device does not support a separate gain for even/odd green
420 * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
421 * <code>G_even</code> in the output result metadata.</p>
422 * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
423 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
424 * </code></pre>
425 * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
426 * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
427 * <p>with colors as follows:</p>
428 * <pre><code>r' = I0r + I1g + I2b
429 * g' = I3r + I4g + I5b
430 * b' = I6r + I7g + I8b
431 * </code></pre>
432 * <p>Both the input and output value ranges must match. Overflow/underflow
433 * values are clipped to fit within the range.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700434 * <p><b>Possible values:</b>
435 * <ul>
436 * <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li>
437 * <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li>
438 * <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
439 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700440 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
441 * <p><b>Full capability</b> -
442 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
443 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He379af012014-05-06 11:54:54 -0700444 *
445 * @see CaptureRequest#COLOR_CORRECTION_GAINS
446 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
447 * @see CaptureRequest#CONTROL_AWB_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700448 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -0700449 * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
450 * @see #COLOR_CORRECTION_MODE_FAST
451 * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
452 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700453 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700454 public static final Key<Integer> COLOR_CORRECTION_MODE =
455 new Key<Integer>("android.colorCorrection.mode", int.class);
456
457 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800458 * <p>A color transform matrix to use to transform
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700459 * from sensor RGB color space to output linear sRGB color space.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800460 * <p>This matrix is either set by the camera device when the request
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800461 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700462 * directly by the application in the request when the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800463 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800464 * <p>In the latter case, the camera device may round the matrix to account
465 * for precision issues; the final rounded matrix should be reported back
466 * in this matrix result metadata. The transform should keep the magnitude
467 * of the output color values within <code>[0, 1.0]</code> (assuming input color
468 * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -0800469 * <p>The valid range of each matrix element varies on different devices, but
470 * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700471 * <p><b>Units</b>: Unitless scale factors</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700472 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
473 * <p><b>Full capability</b> -
474 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
475 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800476 *
477 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700478 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700479 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700480 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700481 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM =
482 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700483
484 /**
Igor Murashkin7d2a5c52014-01-17 15:07:52 -0800485 * <p>Gains applying to Bayer raw color channels for
Zhijun Hecc28a412014-02-24 15:11:23 -0800486 * white-balance.</p>
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700487 * <p>These per-channel gains are either set by the camera device
488 * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not
489 * TRANSFORM_MATRIX, or directly by the application in the
490 * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is
491 * TRANSFORM_MATRIX.</p>
492 * <p>The gains in the result metadata are the gains actually
493 * applied by the camera device to the current frame.</p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -0800494 * <p>The valid range of gains varies on different devices, but gains
495 * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
496 * device allows gains below 1.0, this is usually not recommended because
497 * this can create color artifacts.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700498 * <p><b>Units</b>: Unitless gain factors</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700499 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
500 * <p><b>Full capability</b> -
501 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
502 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800503 *
504 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700505 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700506 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700507 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700508 public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS =
509 new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700510
511 /**
Zhijun Hea05e59d2014-07-08 18:27:47 -0700512 * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700513 * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
514 * can not focus on the same point after exiting from the lens. This metadata defines
515 * the high level control of chromatic aberration correction algorithm, which aims to
516 * minimize the chromatic artifacts that may occur along the object boundaries in an
517 * image.</p>
518 * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
519 * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
520 * use the highest-quality aberration correction algorithms, even if it slows down
521 * capture rate. FAST means the camera device will not slow down capture rate when
522 * applying aberration correction.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700523 * <p>LEGACY devices will always be in FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700524 * <p><b>Possible values:</b>
525 * <ul>
526 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li>
527 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li>
528 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
529 * </ul></p>
530 * <p><b>Available values for this device:</b><br>
531 * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700532 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700533 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700534 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
535 * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
536 * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST
537 * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY
Zhijun Hea05e59d2014-07-08 18:27:47 -0700538 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700539 @PublicKey
Zhijun He9e4e4392014-08-18 11:12:32 -0700540 public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE =
541 new Key<Integer>("android.colorCorrection.aberrationMode", int.class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700542
543 /**
Zhijun He379af012014-05-06 11:54:54 -0700544 * <p>The desired setting for the camera device's auto-exposure
545 * algorithm's antibanding compensation.</p>
546 * <p>Some kinds of lighting fixtures, such as some fluorescent
547 * lights, flicker at the rate of the power supply frequency
548 * (60Hz or 50Hz, depending on country). While this is
549 * typically not noticeable to a person, it can be visible to
550 * a camera device. If a camera sets its exposure time to the
551 * wrong value, the flicker may become visible in the
552 * viewfinder as flicker or in a final captured image, as a
553 * set of variable-brightness bands across the image.</p>
554 * <p>Therefore, the auto-exposure routines of camera devices
555 * include antibanding routines that ensure that the chosen
556 * exposure value will not cause such banding. The choice of
557 * exposure time depends on the rate of flicker, which the
558 * camera device can detect automatically, or the expected
559 * rate can be selected by the application using this
560 * control.</p>
561 * <p>A given camera device may not support all of the possible
562 * options for the antibanding mode. The
563 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
564 * the available modes for a given camera device.</p>
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800565 * <p>AUTO mode is the default if it is available on given
566 * camera device. When AUTO mode is not available, the
567 * default will be either 50HZ or 60HZ, and both 50HZ
568 * and 60HZ will be available.</p>
Zhijun He379af012014-05-06 11:54:54 -0700569 * <p>If manual exposure control is enabled (by setting
570 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
571 * then this setting has no effect, and the application must
572 * ensure it selects exposure times that do not cause banding
573 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
574 * the application in this.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700575 * <p><b>Possible values:</b>
576 * <ul>
577 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li>
578 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li>
579 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li>
580 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li>
581 * </ul></p>
582 * <p><b>Available values for this device:</b><br></p>
583 * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700584 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700585 *
586 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
587 * @see CaptureRequest#CONTROL_AE_MODE
588 * @see CaptureRequest#CONTROL_MODE
589 * @see CaptureResult#STATISTICS_SCENE_FLICKER
590 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
591 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
592 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
593 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO
594 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700595 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700596 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE =
597 new Key<Integer>("android.control.aeAntibandingMode", int.class);
598
599 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700600 * <p>Adjustment to auto-exposure (AE) target image
601 * brightness.</p>
602 * <p>The adjustment is measured as a count of steps, with the
603 * step size defined by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} and the
604 * allowed range by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}.</p>
605 * <p>For example, if the exposure value (EV) step is 0.333, '6'
606 * will mean an exposure compensation of +2 EV; -3 will mean an
607 * exposure compensation of -1 EV. One EV represents a doubling
608 * of image brightness. Note that this control will only be
609 * effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control
610 * 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 -0700611 * <p>In the event of exposure compensation value being changed, camera device
612 * may take several frames to reach the newly requested exposure target.
613 * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING
614 * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
615 * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
616 * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700617 * <p><b>Units</b>: Compensation steps</p>
618 * <p><b>Range of valid values:</b><br>
619 * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700620 * <p>This key is available on all devices.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700621 *
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700622 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE
623 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700624 * @see CaptureRequest#CONTROL_AE_LOCK
625 * @see CaptureRequest#CONTROL_AE_MODE
626 * @see CaptureResult#CONTROL_AE_STATE
Zhijun He379af012014-05-06 11:54:54 -0700627 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700628 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700629 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION =
630 new Key<Integer>("android.control.aeExposureCompensation", int.class);
631
632 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700633 * <p>Whether auto-exposure (AE) is currently locked to its latest
Zhijun He379af012014-05-06 11:54:54 -0700634 * calculated values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700635 * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
636 * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
637 * <p>Note that even when AE is locked, the flash may be fired if
638 * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH /
639 * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700640 * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
641 * is ON, the camera device will still adjust its exposure value.</p>
Zhijun He379af012014-05-06 11:54:54 -0700642 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
643 * when AE is already locked, the camera device will not change the exposure time
644 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
645 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
646 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
Zhijun Hefa95b042015-02-09 10:40:49 -0800647 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.
648 * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
649 * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
650 * the AE if AE is locked by the camera device internally during precapture metering
651 * sequence In other words, submitting requests with AE unlock has no effect for an
652 * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
653 * will never succeed in a sequence of preview requests where AE lock is always set
654 * to <code>false</code>.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700655 * <p>Since the camera device has a pipeline of in-flight requests, the settings that
656 * get locked do not necessarily correspond to the settings that were present in the
657 * latest capture result received from the camera device, since additional captures
658 * and AE updates may have occurred even before the result was sent out. If an
659 * application is switching between automatic and manual control and wishes to eliminate
660 * any flicker during the switch, the following procedure is recommended:</p>
661 * <ol>
662 * <li>Starting in auto-AE mode:</li>
663 * <li>Lock AE</li>
664 * <li>Wait for the first result to be output that has the AE locked</li>
665 * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
666 * <li>Submit the capture request, proceed to run manual AE as desired.</li>
667 * </ol>
Zhijun He379af012014-05-06 11:54:54 -0700668 * <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 -0700669 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700670 *
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700671 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Zhijun He379af012014-05-06 11:54:54 -0700672 * @see CaptureRequest#CONTROL_AE_MODE
673 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
674 * @see CaptureResult#CONTROL_AE_STATE
675 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
676 * @see CaptureRequest#SENSOR_SENSITIVITY
677 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700678 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700679 public static final Key<Boolean> CONTROL_AE_LOCK =
680 new Key<Boolean>("android.control.aeLock", boolean.class);
681
682 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800683 * <p>The desired mode for the camera device's
684 * auto-exposure routine.</p>
685 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
686 * AUTO.</p>
687 * <p>When set to any of the ON modes, the camera device's
688 * auto-exposure routine is enabled, overriding the
689 * application's selected exposure time, sensor sensitivity,
690 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
691 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
692 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
693 * is selected, the camera device's flash unit controls are
694 * also overridden.</p>
695 * <p>The FLASH modes are only available if the camera device
696 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
697 * <p>If flash TORCH mode is desired, this field must be set to
698 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
699 * <p>When set to any of the ON modes, the values chosen by the
700 * camera device auto-exposure routine for the overridden
701 * fields for a given capture will be available in its
702 * CaptureResult.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700703 * <p><b>Possible values:</b>
704 * <ul>
705 * <li>{@link #CONTROL_AE_MODE_OFF OFF}</li>
706 * <li>{@link #CONTROL_AE_MODE_ON ON}</li>
707 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li>
708 * <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li>
709 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li>
Chien-Yu Chen2cf33572018-01-11 11:35:41 -0800710 * <li>{@link #CONTROL_AE_MODE_ON_EXTERNAL_FLASH ON_EXTERNAL_FLASH}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700711 * </ul></p>
712 * <p><b>Available values for this device:</b><br>
713 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700714 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800715 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700716 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES
Zhijun He5f2a47f2014-01-16 15:44:41 -0800717 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800718 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
719 * @see CaptureRequest#FLASH_MODE
Igor Murashkinaef3b7e2014-01-15 13:20:37 -0800720 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
721 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He399f05d2014-01-15 11:31:30 -0800722 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800723 * @see #CONTROL_AE_MODE_OFF
724 * @see #CONTROL_AE_MODE_ON
725 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
726 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
727 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
Chien-Yu Chen2cf33572018-01-11 11:35:41 -0800728 * @see #CONTROL_AE_MODE_ON_EXTERNAL_FLASH
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800729 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700730 @PublicKey
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800731 public static final Key<Integer> CONTROL_AE_MODE =
732 new Key<Integer>("android.control.aeMode", int.class);
733
734 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700735 * <p>List of metering areas to use for auto-exposure adjustment.</p>
736 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700737 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700738 * <p>The maximum number of regions supported by the device is determined by the value
739 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -0700740 * <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
741 * system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with (0,0) being
742 * the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800743 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -0700744 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the bottom-right pixel in the
745 * active pixel array.</p>
746 * <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
747 * system depends on the mode being set.
748 * When the distortion correction mode is OFF, the coordinate system follows
749 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
750 * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
751 * ({@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.width - 1,
752 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.height - 1) being the bottom-right
753 * pixel in the pre-correction active pixel array.
754 * When the distortion correction mode is not OFF, the coordinate system follows
755 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
756 * <code>(0, 0)</code> being the top-left pixel of the active array, and
757 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
758 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the bottom-right pixel in the
759 * active pixel array.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700760 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -0700761 * for every pixel in the area. This means that a large metering area
762 * with the same weight as a smaller area will have more effect in
763 * the metering result. Metering areas can partially overlap and the
764 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700765 * <p>The weights are relative to weights of other exposure metering regions, so if only one
766 * region is used, all non-zero weights will have the same effect. A region with 0
767 * weight is ignored.</p>
768 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
769 * camera device.</p>
770 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
771 * capture result metadata, the camera device will ignore the sections outside the crop
772 * region and output only the intersection rectangle as the metering region in the result
773 * metadata. If the region is entirely outside the crop region, it will be ignored and
774 * not reported in the result metadata.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -0700775 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or
776 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} depending on
777 * distortion correction capability and mode</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700778 * <p><b>Range of valid values:</b><br>
779 * Coordinates must be between <code>[(0,0), (width, height))</code> of
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -0700780 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
781 * depending on distortion correction capability and mode</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700782 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800783 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700784 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -0700785 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800786 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800787 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -0700788 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700789 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700790 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -0700791 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS =
792 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700793
794 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700795 * <p>Range over which the auto-exposure routine can
796 * adjust the capture frame rate to maintain good
797 * exposure.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700798 * <p>Only constrains auto-exposure (AE) algorithm, not
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700799 * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
800 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
801 * <p><b>Units</b>: Frames per second (FPS)</p>
802 * <p><b>Range of valid values:</b><br>
803 * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
804 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700805 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700806 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Zhijun He379af012014-05-06 11:54:54 -0700807 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700808 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He379af012014-05-06 11:54:54 -0700809 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700810 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700811 public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE =
812 new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Zhijun He379af012014-05-06 11:54:54 -0700813
814 /**
815 * <p>Whether the camera device will trigger a precapture
816 * metering sequence when it processes this request.</p>
817 * <p>This entry is normally set to IDLE, or is not
818 * included at all in the request settings. When included and
Zhijun Hedd72be52015-02-06 13:49:51 -0800819 * set to START, the camera device will trigger the auto-exposure (AE)
Zhijun He379af012014-05-06 11:54:54 -0700820 * precapture metering sequence.</p>
Zhijun Hefa95b042015-02-09 10:40:49 -0800821 * <p>When set to CANCEL, the camera device will cancel any active
822 * precapture metering trigger, and return to its initial AE state.
823 * If a precapture metering sequence is already completed, and the camera
824 * device has implicitly locked the AE for subsequent still capture, the
825 * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
Zhijun Hedd72be52015-02-06 13:49:51 -0800826 * <p>The precapture sequence should be triggered before starting a
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700827 * high-quality still capture for final metering decisions to
828 * be made, and for firing pre-capture flash pulses to estimate
829 * scene brightness and required final capture flash power, when
830 * the flash is enabled.</p>
831 * <p>Normally, this entry should be set to START for only a
832 * single request, and the application should wait until the
833 * sequence completes before starting a new one.</p>
Zhijun Hedd72be52015-02-06 13:49:51 -0800834 * <p>When a precapture metering sequence is finished, the camera device
835 * may lock the auto-exposure routine internally to be able to accurately expose the
836 * subsequent still capture image (<code>{@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE</code>).
837 * For this case, the AE may not resume normal scan if no subsequent still capture is
838 * submitted. To ensure that the AE routine restarts normal scan, the application should
839 * submit a request with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == true</code>, followed by a request
840 * with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == false</code>, if the application decides not to submit a
Zhijun Hefa95b042015-02-09 10:40:49 -0800841 * still capture request after the precapture sequence completes. Alternatively, for
842 * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
843 * internally locked AE if the application doesn't submit a still capture request after
844 * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
845 * be used in devices that have earlier API levels.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700846 * <p>The exact effect of auto-exposure (AE) precapture trigger
847 * depends on the current AE mode and state; see
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700848 * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition
849 * details.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700850 * <p>On LEGACY-level devices, the precapture trigger is not supported;
851 * capturing a high-resolution JPEG image will automatically trigger a
852 * precapture sequence before the high-resolution capture, including
853 * potentially firing a pre-capture flash.</p>
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -0700854 * <p>Using the precapture trigger and the auto-focus trigger {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
855 * simultaneously is allowed. However, since these triggers often require cooperation between
856 * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
857 * focus sweep), the camera device may delay acting on a later trigger until the previous
858 * trigger has been fully handled. This may lead to longer intervals between the trigger and
859 * changes to {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} indicating the start of the precapture sequence, for
860 * example.</p>
861 * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
862 * the camera device will complete them in the optimal order for that device.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700863 * <p><b>Possible values:</b>
864 * <ul>
865 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li>
866 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li>
Zhijun Hefa95b042015-02-09 10:40:49 -0800867 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL CANCEL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700868 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700869 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
870 * <p><b>Limited capability</b> -
871 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
872 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He379af012014-05-06 11:54:54 -0700873 *
Zhijun Hedd72be52015-02-06 13:49:51 -0800874 * @see CaptureRequest#CONTROL_AE_LOCK
Zhijun He379af012014-05-06 11:54:54 -0700875 * @see CaptureResult#CONTROL_AE_STATE
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -0700876 * @see CaptureRequest#CONTROL_AF_TRIGGER
Zhijun Hedd72be52015-02-06 13:49:51 -0800877 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700878 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -0700879 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
880 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
Zhijun Hefa95b042015-02-09 10:40:49 -0800881 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL
Zhijun He379af012014-05-06 11:54:54 -0700882 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700883 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700884 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
885 new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
886
887 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700888 * <p>Current state of the auto-exposure (AE) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800889 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always
890 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
891 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
892 * the algorithm states to INACTIVE.</p>
893 * <p>The camera device can do several state transitions between two results, if it is
894 * allowed by the state transition table. For example: INACTIVE may never actually be
895 * seen in a result.</p>
896 * <p>The state in the result is the state for this image (in sync with this image): if
897 * AE state becomes CONVERGED, then the image data associated with this result should
898 * be good to use.</p>
899 * <p>Below are state transition tables for different AE modes.</p>
900 * <table>
901 * <thead>
902 * <tr>
903 * <th align="center">State</th>
904 * <th align="center">Transition Cause</th>
905 * <th align="center">New State</th>
906 * <th align="center">Notes</th>
907 * </tr>
908 * </thead>
909 * <tbody>
910 * <tr>
911 * <td align="center">INACTIVE</td>
912 * <td align="center"></td>
913 * <td align="center">INACTIVE</td>
914 * <td align="center">Camera device auto exposure algorithm is disabled</td>
915 * </tr>
916 * </tbody>
917 * </table>
Chien-Yu Chen2cf33572018-01-11 11:35:41 -0800918 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON*:</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800919 * <table>
920 * <thead>
921 * <tr>
922 * <th align="center">State</th>
923 * <th align="center">Transition Cause</th>
924 * <th align="center">New State</th>
925 * <th align="center">Notes</th>
926 * </tr>
927 * </thead>
928 * <tbody>
929 * <tr>
930 * <td align="center">INACTIVE</td>
931 * <td align="center">Camera device initiates AE scan</td>
932 * <td align="center">SEARCHING</td>
933 * <td align="center">Values changing</td>
934 * </tr>
935 * <tr>
936 * <td align="center">INACTIVE</td>
937 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
938 * <td align="center">LOCKED</td>
939 * <td align="center">Values locked</td>
940 * </tr>
941 * <tr>
942 * <td align="center">SEARCHING</td>
943 * <td align="center">Camera device finishes AE scan</td>
944 * <td align="center">CONVERGED</td>
945 * <td align="center">Good values, not changing</td>
946 * </tr>
947 * <tr>
948 * <td align="center">SEARCHING</td>
949 * <td align="center">Camera device finishes AE scan</td>
950 * <td align="center">FLASH_REQUIRED</td>
951 * <td align="center">Converged but too dark w/o flash</td>
952 * </tr>
953 * <tr>
954 * <td align="center">SEARCHING</td>
955 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
956 * <td align="center">LOCKED</td>
957 * <td align="center">Values locked</td>
958 * </tr>
959 * <tr>
960 * <td align="center">CONVERGED</td>
961 * <td align="center">Camera device initiates AE scan</td>
962 * <td align="center">SEARCHING</td>
963 * <td align="center">Values changing</td>
964 * </tr>
965 * <tr>
966 * <td align="center">CONVERGED</td>
967 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
968 * <td align="center">LOCKED</td>
969 * <td align="center">Values locked</td>
970 * </tr>
971 * <tr>
972 * <td align="center">FLASH_REQUIRED</td>
973 * <td align="center">Camera device initiates AE scan</td>
974 * <td align="center">SEARCHING</td>
975 * <td align="center">Values changing</td>
976 * </tr>
977 * <tr>
978 * <td align="center">FLASH_REQUIRED</td>
979 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
980 * <td align="center">LOCKED</td>
981 * <td align="center">Values locked</td>
982 * </tr>
983 * <tr>
984 * <td align="center">LOCKED</td>
985 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
986 * <td align="center">SEARCHING</td>
987 * <td align="center">Values not good after unlock</td>
988 * </tr>
989 * <tr>
990 * <td align="center">LOCKED</td>
991 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
992 * <td align="center">CONVERGED</td>
993 * <td align="center">Values good after unlock</td>
994 * </tr>
995 * <tr>
996 * <td align="center">LOCKED</td>
997 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
998 * <td align="center">FLASH_REQUIRED</td>
999 * <td align="center">Exposure good, but too dark</td>
1000 * </tr>
1001 * <tr>
1002 * <td align="center">PRECAPTURE</td>
1003 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
1004 * <td align="center">CONVERGED</td>
1005 * <td align="center">Ready for high-quality capture</td>
1006 * </tr>
1007 * <tr>
1008 * <td align="center">PRECAPTURE</td>
1009 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
1010 * <td align="center">LOCKED</td>
1011 * <td align="center">Ready for high-quality capture</td>
1012 * </tr>
1013 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001014 * <td align="center">LOCKED</td>
1015 * <td align="center">aeLock is ON and aePrecaptureTrigger is START</td>
1016 * <td align="center">LOCKED</td>
1017 * <td align="center">Precapture trigger is ignored when AE is already locked</td>
1018 * </tr>
1019 * <tr>
1020 * <td align="center">LOCKED</td>
1021 * <td align="center">aeLock is ON and aePrecaptureTrigger is CANCEL</td>
1022 * <td align="center">LOCKED</td>
1023 * <td align="center">Precapture trigger is ignored when AE is already locked</td>
1024 * </tr>
1025 * <tr>
1026 * <td align="center">Any state (excluding LOCKED)</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001027 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td>
1028 * <td align="center">PRECAPTURE</td>
1029 * <td align="center">Start AE precapture metering sequence</td>
1030 * </tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001031 * <tr>
1032 * <td align="center">Any state (excluding LOCKED)</td>
1033 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL</td>
1034 * <td align="center">INACTIVE</td>
1035 * <td align="center">Currently active precapture metering sequence is canceled</td>
1036 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001037 * </tbody>
1038 * </table>
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001039 * <p>If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
Chien-Yu Chenc9ca7222018-03-15 11:14:29 -07001040 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}), {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} must be FLASH_REQUIRED after
1041 * the camera device finishes AE scan and it's too dark without flash.</p>
Zhijun He60b19dc2014-02-24 10:19:20 -08001042 * <p>For the above table, the camera device may skip reporting any state changes that happen
1043 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1044 * can be skipped in that manner is called a transient state.</p>
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001045 * <p>For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
Zhijun He60b19dc2014-02-24 10:19:20 -08001046 * listed in above table, it is also legal for the camera device to skip one or more
1047 * transient states between two results. See below table for examples:</p>
1048 * <table>
1049 * <thead>
1050 * <tr>
1051 * <th align="center">State</th>
1052 * <th align="center">Transition Cause</th>
1053 * <th align="center">New State</th>
1054 * <th align="center">Notes</th>
1055 * </tr>
1056 * </thead>
1057 * <tbody>
1058 * <tr>
1059 * <td align="center">INACTIVE</td>
1060 * <td align="center">Camera device finished AE scan</td>
1061 * <td align="center">CONVERGED</td>
1062 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1063 * </tr>
1064 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001065 * <td align="center">Any state (excluding LOCKED)</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001066 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
1067 * <td align="center">FLASH_REQUIRED</td>
1068 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
1069 * </tr>
1070 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001071 * <td align="center">Any state (excluding LOCKED)</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001072 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
1073 * <td align="center">CONVERGED</td>
1074 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
1075 * </tr>
1076 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001077 * <td align="center">Any state (excluding LOCKED)</td>
1078 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL, converged</td>
1079 * <td align="center">FLASH_REQUIRED</td>
1080 * <td align="center">Converged but too dark w/o flash after a precapture sequence is canceled, transient states are skipped by camera device.</td>
1081 * </tr>
1082 * <tr>
1083 * <td align="center">Any state (excluding LOCKED)</td>
1084 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL, converged</td>
1085 * <td align="center">CONVERGED</td>
1086 * <td align="center">Converged after a precapture sequenceis canceled, transient states are skipped by camera device.</td>
1087 * </tr>
1088 * <tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001089 * <td align="center">CONVERGED</td>
1090 * <td align="center">Camera device finished AE scan</td>
1091 * <td align="center">FLASH_REQUIRED</td>
1092 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
1093 * </tr>
1094 * <tr>
1095 * <td align="center">FLASH_REQUIRED</td>
1096 * <td align="center">Camera device finished AE scan</td>
1097 * <td align="center">CONVERGED</td>
1098 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
1099 * </tr>
1100 * </tbody>
1101 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001102 * <p><b>Possible values:</b>
1103 * <ul>
1104 * <li>{@link #CONTROL_AE_STATE_INACTIVE INACTIVE}</li>
1105 * <li>{@link #CONTROL_AE_STATE_SEARCHING SEARCHING}</li>
1106 * <li>{@link #CONTROL_AE_STATE_CONVERGED CONVERGED}</li>
1107 * <li>{@link #CONTROL_AE_STATE_LOCKED LOCKED}</li>
1108 * <li>{@link #CONTROL_AE_STATE_FLASH_REQUIRED FLASH_REQUIRED}</li>
1109 * <li>{@link #CONTROL_AE_STATE_PRECAPTURE PRECAPTURE}</li>
1110 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001111 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1112 * <p><b>Limited capability</b> -
1113 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1114 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001115 *
Chien-Yu Chen2cf33572018-01-11 11:35:41 -08001116 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES
Zhijun He228f4f92014-01-16 17:22:05 -08001117 * @see CaptureRequest#CONTROL_AE_LOCK
1118 * @see CaptureRequest#CONTROL_AE_MODE
1119 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Chien-Yu Chenc9ca7222018-03-15 11:14:29 -07001120 * @see CaptureResult#CONTROL_AE_STATE
Zhijun He228f4f92014-01-16 17:22:05 -08001121 * @see CaptureRequest#CONTROL_MODE
1122 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001123 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001124 * @see #CONTROL_AE_STATE_INACTIVE
1125 * @see #CONTROL_AE_STATE_SEARCHING
1126 * @see #CONTROL_AE_STATE_CONVERGED
1127 * @see #CONTROL_AE_STATE_LOCKED
1128 * @see #CONTROL_AE_STATE_FLASH_REQUIRED
1129 * @see #CONTROL_AE_STATE_PRECAPTURE
1130 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001131 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001132 public static final Key<Integer> CONTROL_AE_STATE =
1133 new Key<Integer>("android.control.aeState", int.class);
1134
1135 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001136 * <p>Whether auto-focus (AF) is currently enabled, and what
1137 * mode it is set to.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -08001138 * <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 -08001139 * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>). Also note that
1140 * when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, the behavior of AF is device
1141 * dependent. It is recommended to lock AF by using {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} before
1142 * 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 -08001143 * <p>If the lens is controlled by the camera device auto-focus algorithm,
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001144 * 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 -07001145 * in result metadata.</p>
1146 * <p><b>Possible values:</b>
1147 * <ul>
1148 * <li>{@link #CONTROL_AF_MODE_OFF OFF}</li>
1149 * <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li>
1150 * <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li>
1151 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li>
1152 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li>
1153 * <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li>
1154 * </ul></p>
1155 * <p><b>Available values for this device:</b><br>
1156 * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p>
1157 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001158 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001159 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001160 * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001161 * @see CaptureResult#CONTROL_AF_STATE
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001162 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001163 * @see CaptureRequest#CONTROL_MODE
Zhijun Hecc28a412014-02-24 15:11:23 -08001164 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001165 * @see #CONTROL_AF_MODE_OFF
1166 * @see #CONTROL_AF_MODE_AUTO
1167 * @see #CONTROL_AF_MODE_MACRO
1168 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
1169 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
1170 * @see #CONTROL_AF_MODE_EDOF
1171 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001172 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001173 public static final Key<Integer> CONTROL_AF_MODE =
1174 new Key<Integer>("android.control.afMode", int.class);
1175
1176 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001177 * <p>List of metering areas to use for auto-focus.</p>
1178 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001179 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001180 * <p>The maximum number of focus areas supported by the device is determined by the value
1181 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001182 * <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
1183 * system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with (0,0) being
1184 * the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001185 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001186 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the bottom-right pixel in the
1187 * active pixel array.</p>
1188 * <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
1189 * system depends on the mode being set.
1190 * When the distortion correction mode is OFF, the coordinate system follows
1191 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
1192 * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
1193 * ({@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.width - 1,
1194 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.height - 1) being the bottom-right
1195 * pixel in the pre-correction active pixel array.
1196 * When the distortion correction mode is not OFF, the coordinate system follows
1197 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
1198 * <code>(0, 0)</code> being the top-left pixel of the active array, and
1199 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1200 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the bottom-right pixel in the
1201 * active pixel array.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001202 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001203 * for every pixel in the area. This means that a large metering area
1204 * with the same weight as a smaller area will have more effect in
1205 * the metering result. Metering areas can partially overlap and the
1206 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001207 * <p>The weights are relative to weights of other metering regions, so if only one region
1208 * is used, all non-zero weights will have the same effect. A region with 0 weight is
1209 * ignored.</p>
1210 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
Shuzhen Wanga31d58f2018-02-08 12:44:47 -08001211 * camera device. The capture result will either be a zero weight region as well, or
1212 * the region selected by the camera device as the focus area of interest.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001213 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
1214 * capture result metadata, the camera device will ignore the sections outside the crop
1215 * region and output only the intersection rectangle as the metering region in the result
1216 * metadata. If the region is entirely outside the crop region, it will be ignored and
1217 * not reported in the result metadata.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001218 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or
1219 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} depending on
1220 * distortion correction capability and mode</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001221 * <p><b>Range of valid values:</b><br>
1222 * Coordinates must be between <code>[(0,0), (width, height))</code> of
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001223 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
1224 * depending on distortion correction capability and mode</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001225 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001226 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001227 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001228 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001229 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001230 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001231 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001232 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001233 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -07001234 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS =
1235 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001236
1237 /**
Zhijun He379af012014-05-06 11:54:54 -07001238 * <p>Whether the camera device will trigger autofocus for this request.</p>
1239 * <p>This entry is normally set to IDLE, or is not
1240 * included at all in the request settings.</p>
1241 * <p>When included and set to START, the camera device will trigger the
1242 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
1243 * <p>When set to CANCEL, the camera device will cancel any active trigger,
1244 * and return to its initial AF state.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001245 * <p>Generally, applications should set this entry to START or CANCEL for only a
1246 * single capture, and then return it to IDLE (or not set at all). Specifying
1247 * START for multiple captures in a row means restarting the AF operation over
1248 * and over again.</p>
1249 * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p>
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -07001250 * <p>Using the autofocus trigger and the precapture trigger {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
1251 * simultaneously is allowed. However, since these triggers often require cooperation between
1252 * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
1253 * focus sweep), the camera device may delay acting on a later trigger until the previous
1254 * trigger has been fully handled. This may lead to longer intervals between the trigger and
1255 * changes to {@link CaptureResult#CONTROL_AF_STATE android.control.afState}, for example.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001256 * <p><b>Possible values:</b>
1257 * <ul>
1258 * <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li>
1259 * <li>{@link #CONTROL_AF_TRIGGER_START START}</li>
1260 * <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li>
1261 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001262 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001263 *
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -07001264 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He379af012014-05-06 11:54:54 -07001265 * @see CaptureResult#CONTROL_AF_STATE
1266 * @see #CONTROL_AF_TRIGGER_IDLE
1267 * @see #CONTROL_AF_TRIGGER_START
1268 * @see #CONTROL_AF_TRIGGER_CANCEL
1269 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001270 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001271 public static final Key<Integer> CONTROL_AF_TRIGGER =
1272 new Key<Integer>("android.control.afTrigger", int.class);
1273
1274 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001275 * <p>Current state of auto-focus (AF) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001276 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
1277 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1278 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1279 * the algorithm states to INACTIVE.</p>
1280 * <p>The camera device can do several state transitions between two results, if it is
1281 * allowed by the state transition table. For example: INACTIVE may never actually be
1282 * seen in a result.</p>
1283 * <p>The state in the result is the state for this image (in sync with this image): if
1284 * AF state becomes FOCUSED, then the image data associated with this result should
1285 * be sharp.</p>
1286 * <p>Below are state transition tables for different AF modes.</p>
1287 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p>
1288 * <table>
1289 * <thead>
1290 * <tr>
1291 * <th align="center">State</th>
1292 * <th align="center">Transition Cause</th>
1293 * <th align="center">New State</th>
1294 * <th align="center">Notes</th>
1295 * </tr>
1296 * </thead>
1297 * <tbody>
1298 * <tr>
1299 * <td align="center">INACTIVE</td>
1300 * <td align="center"></td>
1301 * <td align="center">INACTIVE</td>
1302 * <td align="center">Never changes</td>
1303 * </tr>
1304 * </tbody>
1305 * </table>
1306 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1307 * <table>
1308 * <thead>
1309 * <tr>
1310 * <th align="center">State</th>
1311 * <th align="center">Transition Cause</th>
1312 * <th align="center">New State</th>
1313 * <th align="center">Notes</th>
1314 * </tr>
1315 * </thead>
1316 * <tbody>
1317 * <tr>
1318 * <td align="center">INACTIVE</td>
1319 * <td align="center">AF_TRIGGER</td>
1320 * <td align="center">ACTIVE_SCAN</td>
1321 * <td align="center">Start AF sweep, Lens now moving</td>
1322 * </tr>
1323 * <tr>
1324 * <td align="center">ACTIVE_SCAN</td>
1325 * <td align="center">AF sweep done</td>
1326 * <td align="center">FOCUSED_LOCKED</td>
1327 * <td align="center">Focused, Lens now locked</td>
1328 * </tr>
1329 * <tr>
1330 * <td align="center">ACTIVE_SCAN</td>
1331 * <td align="center">AF sweep done</td>
1332 * <td align="center">NOT_FOCUSED_LOCKED</td>
1333 * <td align="center">Not focused, Lens now locked</td>
1334 * </tr>
1335 * <tr>
1336 * <td align="center">ACTIVE_SCAN</td>
1337 * <td align="center">AF_CANCEL</td>
1338 * <td align="center">INACTIVE</td>
1339 * <td align="center">Cancel/reset AF, Lens now locked</td>
1340 * </tr>
1341 * <tr>
1342 * <td align="center">FOCUSED_LOCKED</td>
1343 * <td align="center">AF_CANCEL</td>
1344 * <td align="center">INACTIVE</td>
1345 * <td align="center">Cancel/reset AF</td>
1346 * </tr>
1347 * <tr>
1348 * <td align="center">FOCUSED_LOCKED</td>
1349 * <td align="center">AF_TRIGGER</td>
1350 * <td align="center">ACTIVE_SCAN</td>
1351 * <td align="center">Start new sweep, Lens now moving</td>
1352 * </tr>
1353 * <tr>
1354 * <td align="center">NOT_FOCUSED_LOCKED</td>
1355 * <td align="center">AF_CANCEL</td>
1356 * <td align="center">INACTIVE</td>
1357 * <td align="center">Cancel/reset AF</td>
1358 * </tr>
1359 * <tr>
1360 * <td align="center">NOT_FOCUSED_LOCKED</td>
1361 * <td align="center">AF_TRIGGER</td>
1362 * <td align="center">ACTIVE_SCAN</td>
1363 * <td align="center">Start new sweep, Lens now moving</td>
1364 * </tr>
1365 * <tr>
1366 * <td align="center">Any state</td>
1367 * <td align="center">Mode change</td>
1368 * <td align="center">INACTIVE</td>
1369 * <td align="center"></td>
1370 * </tr>
1371 * </tbody>
1372 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001373 * <p>For the above table, the camera device may skip reporting any state changes that happen
1374 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1375 * can be skipped in that manner is called a transient state.</p>
1376 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1377 * state transitions listed in above table, it is also legal for the camera device to skip
1378 * one or more transient states between two results. See below table for examples:</p>
1379 * <table>
1380 * <thead>
1381 * <tr>
1382 * <th align="center">State</th>
1383 * <th align="center">Transition Cause</th>
1384 * <th align="center">New State</th>
1385 * <th align="center">Notes</th>
1386 * </tr>
1387 * </thead>
1388 * <tbody>
1389 * <tr>
1390 * <td align="center">INACTIVE</td>
1391 * <td align="center">AF_TRIGGER</td>
1392 * <td align="center">FOCUSED_LOCKED</td>
1393 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
1394 * </tr>
1395 * <tr>
1396 * <td align="center">INACTIVE</td>
1397 * <td align="center">AF_TRIGGER</td>
1398 * <td align="center">NOT_FOCUSED_LOCKED</td>
1399 * <td align="center">Focus failed after a scan, lens is now locked.</td>
1400 * </tr>
1401 * <tr>
1402 * <td align="center">FOCUSED_LOCKED</td>
1403 * <td align="center">AF_TRIGGER</td>
1404 * <td align="center">FOCUSED_LOCKED</td>
1405 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
1406 * </tr>
1407 * <tr>
1408 * <td align="center">NOT_FOCUSED_LOCKED</td>
1409 * <td align="center">AF_TRIGGER</td>
1410 * <td align="center">FOCUSED_LOCKED</td>
1411 * <td align="center">Focus is good after a scan, lens is not locked.</td>
1412 * </tr>
1413 * </tbody>
1414 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -08001415 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
1416 * <table>
1417 * <thead>
1418 * <tr>
1419 * <th align="center">State</th>
1420 * <th align="center">Transition Cause</th>
1421 * <th align="center">New State</th>
1422 * <th align="center">Notes</th>
1423 * </tr>
1424 * </thead>
1425 * <tbody>
1426 * <tr>
1427 * <td align="center">INACTIVE</td>
1428 * <td align="center">Camera device initiates new scan</td>
1429 * <td align="center">PASSIVE_SCAN</td>
1430 * <td align="center">Start AF scan, Lens now moving</td>
1431 * </tr>
1432 * <tr>
1433 * <td align="center">INACTIVE</td>
1434 * <td align="center">AF_TRIGGER</td>
1435 * <td align="center">NOT_FOCUSED_LOCKED</td>
1436 * <td align="center">AF state query, Lens now locked</td>
1437 * </tr>
1438 * <tr>
1439 * <td align="center">PASSIVE_SCAN</td>
1440 * <td align="center">Camera device completes current scan</td>
1441 * <td align="center">PASSIVE_FOCUSED</td>
1442 * <td align="center">End AF scan, Lens now locked</td>
1443 * </tr>
1444 * <tr>
1445 * <td align="center">PASSIVE_SCAN</td>
1446 * <td align="center">Camera device fails current scan</td>
1447 * <td align="center">PASSIVE_UNFOCUSED</td>
1448 * <td align="center">End AF scan, Lens now locked</td>
1449 * </tr>
1450 * <tr>
1451 * <td align="center">PASSIVE_SCAN</td>
1452 * <td align="center">AF_TRIGGER</td>
1453 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001454 * <td align="center">Immediate transition, if focus is good. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001455 * </tr>
1456 * <tr>
1457 * <td align="center">PASSIVE_SCAN</td>
1458 * <td align="center">AF_TRIGGER</td>
1459 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001460 * <td align="center">Immediate transition, if focus is bad. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001461 * </tr>
1462 * <tr>
1463 * <td align="center">PASSIVE_SCAN</td>
1464 * <td align="center">AF_CANCEL</td>
1465 * <td align="center">INACTIVE</td>
1466 * <td align="center">Reset lens position, Lens now locked</td>
1467 * </tr>
1468 * <tr>
1469 * <td align="center">PASSIVE_FOCUSED</td>
1470 * <td align="center">Camera device initiates new scan</td>
1471 * <td align="center">PASSIVE_SCAN</td>
1472 * <td align="center">Start AF scan, Lens now moving</td>
1473 * </tr>
1474 * <tr>
1475 * <td align="center">PASSIVE_UNFOCUSED</td>
1476 * <td align="center">Camera device initiates new scan</td>
1477 * <td align="center">PASSIVE_SCAN</td>
1478 * <td align="center">Start AF scan, Lens now moving</td>
1479 * </tr>
1480 * <tr>
1481 * <td align="center">PASSIVE_FOCUSED</td>
1482 * <td align="center">AF_TRIGGER</td>
1483 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001484 * <td align="center">Immediate transition, lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001485 * </tr>
1486 * <tr>
1487 * <td align="center">PASSIVE_UNFOCUSED</td>
1488 * <td align="center">AF_TRIGGER</td>
1489 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001490 * <td align="center">Immediate transition, lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001491 * </tr>
1492 * <tr>
1493 * <td align="center">FOCUSED_LOCKED</td>
1494 * <td align="center">AF_TRIGGER</td>
1495 * <td align="center">FOCUSED_LOCKED</td>
1496 * <td align="center">No effect</td>
1497 * </tr>
1498 * <tr>
1499 * <td align="center">FOCUSED_LOCKED</td>
1500 * <td align="center">AF_CANCEL</td>
1501 * <td align="center">INACTIVE</td>
1502 * <td align="center">Restart AF scan</td>
1503 * </tr>
1504 * <tr>
1505 * <td align="center">NOT_FOCUSED_LOCKED</td>
1506 * <td align="center">AF_TRIGGER</td>
1507 * <td align="center">NOT_FOCUSED_LOCKED</td>
1508 * <td align="center">No effect</td>
1509 * </tr>
1510 * <tr>
1511 * <td align="center">NOT_FOCUSED_LOCKED</td>
1512 * <td align="center">AF_CANCEL</td>
1513 * <td align="center">INACTIVE</td>
1514 * <td align="center">Restart AF scan</td>
1515 * </tr>
1516 * </tbody>
1517 * </table>
1518 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p>
1519 * <table>
1520 * <thead>
1521 * <tr>
1522 * <th align="center">State</th>
1523 * <th align="center">Transition Cause</th>
1524 * <th align="center">New State</th>
1525 * <th align="center">Notes</th>
1526 * </tr>
1527 * </thead>
1528 * <tbody>
1529 * <tr>
1530 * <td align="center">INACTIVE</td>
1531 * <td align="center">Camera device initiates new scan</td>
1532 * <td align="center">PASSIVE_SCAN</td>
1533 * <td align="center">Start AF scan, Lens now moving</td>
1534 * </tr>
1535 * <tr>
1536 * <td align="center">INACTIVE</td>
1537 * <td align="center">AF_TRIGGER</td>
1538 * <td align="center">NOT_FOCUSED_LOCKED</td>
1539 * <td align="center">AF state query, Lens now locked</td>
1540 * </tr>
1541 * <tr>
1542 * <td align="center">PASSIVE_SCAN</td>
1543 * <td align="center">Camera device completes current scan</td>
1544 * <td align="center">PASSIVE_FOCUSED</td>
1545 * <td align="center">End AF scan, Lens now locked</td>
1546 * </tr>
1547 * <tr>
1548 * <td align="center">PASSIVE_SCAN</td>
1549 * <td align="center">Camera device fails current scan</td>
1550 * <td align="center">PASSIVE_UNFOCUSED</td>
1551 * <td align="center">End AF scan, Lens now locked</td>
1552 * </tr>
1553 * <tr>
1554 * <td align="center">PASSIVE_SCAN</td>
1555 * <td align="center">AF_TRIGGER</td>
1556 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001557 * <td align="center">Eventual transition once the focus is good. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001558 * </tr>
1559 * <tr>
1560 * <td align="center">PASSIVE_SCAN</td>
1561 * <td align="center">AF_TRIGGER</td>
1562 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001563 * <td align="center">Eventual transition if cannot find focus. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001564 * </tr>
1565 * <tr>
1566 * <td align="center">PASSIVE_SCAN</td>
1567 * <td align="center">AF_CANCEL</td>
1568 * <td align="center">INACTIVE</td>
1569 * <td align="center">Reset lens position, Lens now locked</td>
1570 * </tr>
1571 * <tr>
1572 * <td align="center">PASSIVE_FOCUSED</td>
1573 * <td align="center">Camera device initiates new scan</td>
1574 * <td align="center">PASSIVE_SCAN</td>
1575 * <td align="center">Start AF scan, Lens now moving</td>
1576 * </tr>
1577 * <tr>
1578 * <td align="center">PASSIVE_UNFOCUSED</td>
1579 * <td align="center">Camera device initiates new scan</td>
1580 * <td align="center">PASSIVE_SCAN</td>
1581 * <td align="center">Start AF scan, Lens now moving</td>
1582 * </tr>
1583 * <tr>
1584 * <td align="center">PASSIVE_FOCUSED</td>
1585 * <td align="center">AF_TRIGGER</td>
1586 * <td align="center">FOCUSED_LOCKED</td>
1587 * <td align="center">Immediate trans. Lens now locked</td>
1588 * </tr>
1589 * <tr>
1590 * <td align="center">PASSIVE_UNFOCUSED</td>
1591 * <td align="center">AF_TRIGGER</td>
1592 * <td align="center">NOT_FOCUSED_LOCKED</td>
1593 * <td align="center">Immediate trans. Lens now locked</td>
1594 * </tr>
1595 * <tr>
1596 * <td align="center">FOCUSED_LOCKED</td>
1597 * <td align="center">AF_TRIGGER</td>
1598 * <td align="center">FOCUSED_LOCKED</td>
1599 * <td align="center">No effect</td>
1600 * </tr>
1601 * <tr>
1602 * <td align="center">FOCUSED_LOCKED</td>
1603 * <td align="center">AF_CANCEL</td>
1604 * <td align="center">INACTIVE</td>
1605 * <td align="center">Restart AF scan</td>
1606 * </tr>
1607 * <tr>
1608 * <td align="center">NOT_FOCUSED_LOCKED</td>
1609 * <td align="center">AF_TRIGGER</td>
1610 * <td align="center">NOT_FOCUSED_LOCKED</td>
1611 * <td align="center">No effect</td>
1612 * </tr>
1613 * <tr>
1614 * <td align="center">NOT_FOCUSED_LOCKED</td>
1615 * <td align="center">AF_CANCEL</td>
1616 * <td align="center">INACTIVE</td>
1617 * <td align="center">Restart AF scan</td>
1618 * </tr>
1619 * </tbody>
1620 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001621 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1622 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1623 * camera device. When a trigger is included in a mode switch request, the trigger
1624 * will be evaluated in the context of the new mode in the request.
1625 * See below table for examples:</p>
1626 * <table>
1627 * <thead>
1628 * <tr>
1629 * <th align="center">State</th>
1630 * <th align="center">Transition Cause</th>
1631 * <th align="center">New State</th>
1632 * <th align="center">Notes</th>
1633 * </tr>
1634 * </thead>
1635 * <tbody>
1636 * <tr>
1637 * <td align="center">any state</td>
1638 * <td align="center">CAF--&gt;AUTO mode switch</td>
1639 * <td align="center">INACTIVE</td>
1640 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
1641 * </tr>
1642 * <tr>
1643 * <td align="center">any state</td>
1644 * <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
1645 * <td align="center">trigger-reachable states from INACTIVE</td>
1646 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
1647 * </tr>
1648 * <tr>
1649 * <td align="center">any state</td>
1650 * <td align="center">AUTO--&gt;CAF mode switch</td>
1651 * <td align="center">passively reachable states from INACTIVE</td>
1652 * <td align="center">Mode switch without trigger, passive transient state is skipped</td>
1653 * </tr>
1654 * </tbody>
1655 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001656 * <p><b>Possible values:</b>
1657 * <ul>
1658 * <li>{@link #CONTROL_AF_STATE_INACTIVE INACTIVE}</li>
1659 * <li>{@link #CONTROL_AF_STATE_PASSIVE_SCAN PASSIVE_SCAN}</li>
1660 * <li>{@link #CONTROL_AF_STATE_PASSIVE_FOCUSED PASSIVE_FOCUSED}</li>
1661 * <li>{@link #CONTROL_AF_STATE_ACTIVE_SCAN ACTIVE_SCAN}</li>
1662 * <li>{@link #CONTROL_AF_STATE_FOCUSED_LOCKED FOCUSED_LOCKED}</li>
1663 * <li>{@link #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED NOT_FOCUSED_LOCKED}</li>
1664 * <li>{@link #CONTROL_AF_STATE_PASSIVE_UNFOCUSED PASSIVE_UNFOCUSED}</li>
1665 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001666 * <p>This key is available on all devices.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001667 *
1668 * @see CaptureRequest#CONTROL_AF_MODE
1669 * @see CaptureRequest#CONTROL_MODE
1670 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001671 * @see #CONTROL_AF_STATE_INACTIVE
1672 * @see #CONTROL_AF_STATE_PASSIVE_SCAN
1673 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED
1674 * @see #CONTROL_AF_STATE_ACTIVE_SCAN
1675 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED
1676 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07001677 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001678 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001679 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001680 public static final Key<Integer> CONTROL_AF_STATE =
1681 new Key<Integer>("android.control.afState", int.class);
1682
1683 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001684 * <p>Whether auto-white balance (AWB) is currently locked to its
Zhijun He379af012014-05-06 11:54:54 -07001685 * latest calculated values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001686 * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
1687 * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
1688 * <p>Since the camera device has a pipeline of in-flight requests, the settings that
1689 * get locked do not necessarily correspond to the settings that were present in the
1690 * latest capture result received from the camera device, since additional captures
1691 * and AWB updates may have occurred even before the result was sent out. If an
1692 * application is switching between automatic and manual control and wishes to eliminate
1693 * any flicker during the switch, the following procedure is recommended:</p>
1694 * <ol>
1695 * <li>Starting in auto-AWB mode:</li>
1696 * <li>Lock AWB</li>
1697 * <li>Wait for the first result to be output that has the AWB locked</li>
1698 * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
1699 * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
1700 * </ol>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001701 * <p>Note that AWB lock is only meaningful when
1702 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes,
1703 * AWB is already fixed to a specific setting.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001704 * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
1705 * <p>This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001706 *
1707 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He379af012014-05-06 11:54:54 -07001708 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001709 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001710 public static final Key<Boolean> CONTROL_AWB_LOCK =
1711 new Key<Boolean>("android.control.awbLock", boolean.class);
1712
1713 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001714 * <p>Whether auto-white balance (AWB) is currently setting the color
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001715 * transform fields, and what its illumination target
Zhijun Hecc28a412014-02-24 15:11:23 -08001716 * is.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001717 * <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 -07001718 * <p>When set to the ON mode, the camera device's auto-white balance
Zhijun He399f05d2014-01-15 11:31:30 -08001719 * routine is enabled, overriding the application's selected
1720 * {@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 -08001721 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}. Note that when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
1722 * is OFF, the behavior of AWB is device dependent. It is recommened to
1723 * also set AWB mode to OFF or lock AWB by using {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} before
1724 * setting AE mode to OFF.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001725 * <p>When set to the OFF mode, the camera device's auto-white balance
Zhijun Hecc28a412014-02-24 15:11:23 -08001726 * routine is disabled. The application manually controls the white
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001727 * 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 -08001728 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001729 * <p>When set to any other modes, the camera device's auto-white
1730 * balance routine is disabled. The camera device uses each
1731 * particular illumination target for white balance
1732 * adjustment. The application's values for
1733 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform},
1734 * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
1735 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001736 * <p><b>Possible values:</b>
1737 * <ul>
1738 * <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li>
1739 * <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li>
1740 * <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li>
1741 * <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li>
1742 * <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li>
1743 * <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li>
1744 * <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li>
1745 * <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li>
1746 * <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li>
1747 * </ul></p>
1748 * <p><b>Available values for this device:</b><br>
1749 * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001750 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001751 *
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001752 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Zhijun He5f2a47f2014-01-16 15:44:41 -08001753 * @see CaptureRequest#COLOR_CORRECTION_MODE
1754 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001755 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001756 * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001757 * @see CaptureRequest#CONTROL_AWB_LOCK
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001758 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001759 * @see #CONTROL_AWB_MODE_OFF
1760 * @see #CONTROL_AWB_MODE_AUTO
1761 * @see #CONTROL_AWB_MODE_INCANDESCENT
1762 * @see #CONTROL_AWB_MODE_FLUORESCENT
1763 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
1764 * @see #CONTROL_AWB_MODE_DAYLIGHT
1765 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
1766 * @see #CONTROL_AWB_MODE_TWILIGHT
1767 * @see #CONTROL_AWB_MODE_SHADE
1768 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001769 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001770 public static final Key<Integer> CONTROL_AWB_MODE =
1771 new Key<Integer>("android.control.awbMode", int.class);
1772
1773 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001774 * <p>List of metering areas to use for auto-white-balance illuminant
Ruben Brunkf59521d2014-02-03 17:14:33 -08001775 * estimation.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001776 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001777 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001778 * <p>The maximum number of regions supported by the device is determined by the value
1779 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001780 * <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
1781 * system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with (0,0) being
1782 * the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001783 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001784 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the bottom-right pixel in the
1785 * active pixel array.</p>
1786 * <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
1787 * system depends on the mode being set.
1788 * When the distortion correction mode is OFF, the coordinate system follows
1789 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
1790 * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
1791 * ({@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.width - 1,
1792 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.height - 1) being the bottom-right
1793 * pixel in the pre-correction active pixel array.
1794 * When the distortion correction mode is not OFF, the coordinate system follows
1795 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
1796 * <code>(0, 0)</code> being the top-left pixel of the active array, and
1797 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1798 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the bottom-right pixel in the
1799 * active pixel array.</p>
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001800 * <p>The weight must range from 0 to 1000, and represents a weight
1801 * for every pixel in the area. This means that a large metering area
1802 * with the same weight as a smaller area will have more effect in
1803 * the metering result. Metering areas can partially overlap and the
1804 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001805 * <p>The weights are relative to weights of other white balance metering regions, so if
1806 * only one region is used, all non-zero weights will have the same effect. A region with
1807 * 0 weight is ignored.</p>
1808 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
1809 * camera device.</p>
1810 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
1811 * capture result metadata, the camera device will ignore the sections outside the crop
1812 * region and output only the intersection rectangle as the metering region in the result
1813 * metadata. If the region is entirely outside the crop region, it will be ignored and
1814 * not reported in the result metadata.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001815 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or
1816 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} depending on
1817 * distortion correction capability and mode</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001818 * <p><b>Range of valid values:</b><br>
1819 * Coordinates must be between <code>[(0,0), (width, height))</code> of
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001820 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
1821 * depending on distortion correction capability and mode</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001822 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001823 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001824 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001825 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001826 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001827 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07001828 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001829 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001830 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -07001831 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS =
1832 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001833
1834 /**
Zhijun He379af012014-05-06 11:54:54 -07001835 * <p>Information to the camera device 3A (auto-exposure,
1836 * auto-focus, auto-white balance) routines about the purpose
1837 * of this capture, to help the camera device to decide optimal 3A
1838 * strategy.</p>
1839 * <p>This control (except for MANUAL) is only effective if
1840 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001841 * <p>All intents are supported by all devices, except that:
1842 * * ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1843 * PRIVATE_REPROCESSING or YUV_REPROCESSING.
1844 * * MANUAL will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1845 * MANUAL_SENSOR.
1846 * * MOTION_TRACKING will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
1847 * MOTION_TRACKING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001848 * <p><b>Possible values:</b>
1849 * <ul>
1850 * <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li>
1851 * <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li>
1852 * <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li>
1853 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li>
1854 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li>
1855 * <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
1856 * <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001857 * <li>{@link #CONTROL_CAPTURE_INTENT_MOTION_TRACKING MOTION_TRACKING}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001858 * </ul></p>
1859 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001860 *
1861 * @see CaptureRequest#CONTROL_MODE
1862 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1863 * @see #CONTROL_CAPTURE_INTENT_CUSTOM
1864 * @see #CONTROL_CAPTURE_INTENT_PREVIEW
1865 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
1866 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
1867 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
1868 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
1869 * @see #CONTROL_CAPTURE_INTENT_MANUAL
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08001870 * @see #CONTROL_CAPTURE_INTENT_MOTION_TRACKING
Zhijun He379af012014-05-06 11:54:54 -07001871 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001872 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001873 public static final Key<Integer> CONTROL_CAPTURE_INTENT =
1874 new Key<Integer>("android.control.captureIntent", int.class);
1875
1876 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001877 * <p>Current state of auto-white balance (AWB) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001878 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always
1879 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1880 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1881 * the algorithm states to INACTIVE.</p>
1882 * <p>The camera device can do several state transitions between two results, if it is
1883 * allowed by the state transition table. So INACTIVE may never actually be seen in
1884 * a result.</p>
1885 * <p>The state in the result is the state for this image (in sync with this image): if
1886 * AWB state becomes CONVERGED, then the image data associated with this result should
1887 * be good to use.</p>
1888 * <p>Below are state transition tables for different AWB modes.</p>
1889 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p>
1890 * <table>
1891 * <thead>
1892 * <tr>
1893 * <th align="center">State</th>
1894 * <th align="center">Transition Cause</th>
1895 * <th align="center">New State</th>
1896 * <th align="center">Notes</th>
1897 * </tr>
1898 * </thead>
1899 * <tbody>
1900 * <tr>
1901 * <td align="center">INACTIVE</td>
1902 * <td align="center"></td>
1903 * <td align="center">INACTIVE</td>
1904 * <td align="center">Camera device auto white balance algorithm is disabled</td>
1905 * </tr>
1906 * </tbody>
1907 * </table>
1908 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p>
1909 * <table>
1910 * <thead>
1911 * <tr>
1912 * <th align="center">State</th>
1913 * <th align="center">Transition Cause</th>
1914 * <th align="center">New State</th>
1915 * <th align="center">Notes</th>
1916 * </tr>
1917 * </thead>
1918 * <tbody>
1919 * <tr>
1920 * <td align="center">INACTIVE</td>
1921 * <td align="center">Camera device initiates AWB scan</td>
1922 * <td align="center">SEARCHING</td>
1923 * <td align="center">Values changing</td>
1924 * </tr>
1925 * <tr>
1926 * <td align="center">INACTIVE</td>
1927 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1928 * <td align="center">LOCKED</td>
1929 * <td align="center">Values locked</td>
1930 * </tr>
1931 * <tr>
1932 * <td align="center">SEARCHING</td>
1933 * <td align="center">Camera device finishes AWB scan</td>
1934 * <td align="center">CONVERGED</td>
1935 * <td align="center">Good values, not changing</td>
1936 * </tr>
1937 * <tr>
1938 * <td align="center">SEARCHING</td>
1939 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1940 * <td align="center">LOCKED</td>
1941 * <td align="center">Values locked</td>
1942 * </tr>
1943 * <tr>
1944 * <td align="center">CONVERGED</td>
1945 * <td align="center">Camera device initiates AWB scan</td>
1946 * <td align="center">SEARCHING</td>
1947 * <td align="center">Values changing</td>
1948 * </tr>
1949 * <tr>
1950 * <td align="center">CONVERGED</td>
1951 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1952 * <td align="center">LOCKED</td>
1953 * <td align="center">Values locked</td>
1954 * </tr>
1955 * <tr>
1956 * <td align="center">LOCKED</td>
1957 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1958 * <td align="center">SEARCHING</td>
1959 * <td align="center">Values not good after unlock</td>
1960 * </tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001961 * </tbody>
1962 * </table>
1963 * <p>For the above table, the camera device may skip reporting any state changes that happen
1964 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1965 * can be skipped in that manner is called a transient state.</p>
1966 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1967 * listed in above table, it is also legal for the camera device to skip one or more
1968 * transient states between two results. See below table for examples:</p>
1969 * <table>
1970 * <thead>
1971 * <tr>
1972 * <th align="center">State</th>
1973 * <th align="center">Transition Cause</th>
1974 * <th align="center">New State</th>
1975 * <th align="center">Notes</th>
1976 * </tr>
1977 * </thead>
1978 * <tbody>
1979 * <tr>
1980 * <td align="center">INACTIVE</td>
1981 * <td align="center">Camera device finished AWB scan</td>
1982 * <td align="center">CONVERGED</td>
1983 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1984 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001985 * <tr>
1986 * <td align="center">LOCKED</td>
1987 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1988 * <td align="center">CONVERGED</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001989 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001990 * </tr>
1991 * </tbody>
1992 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001993 * <p><b>Possible values:</b>
1994 * <ul>
1995 * <li>{@link #CONTROL_AWB_STATE_INACTIVE INACTIVE}</li>
1996 * <li>{@link #CONTROL_AWB_STATE_SEARCHING SEARCHING}</li>
1997 * <li>{@link #CONTROL_AWB_STATE_CONVERGED CONVERGED}</li>
1998 * <li>{@link #CONTROL_AWB_STATE_LOCKED LOCKED}</li>
1999 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002000 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2001 * <p><b>Limited capability</b> -
2002 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2003 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He228f4f92014-01-16 17:22:05 -08002004 *
2005 * @see CaptureRequest#CONTROL_AWB_LOCK
2006 * @see CaptureRequest#CONTROL_AWB_MODE
2007 * @see CaptureRequest#CONTROL_MODE
2008 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002009 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002010 * @see #CONTROL_AWB_STATE_INACTIVE
2011 * @see #CONTROL_AWB_STATE_SEARCHING
2012 * @see #CONTROL_AWB_STATE_CONVERGED
2013 * @see #CONTROL_AWB_STATE_LOCKED
2014 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002015 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002016 public static final Key<Integer> CONTROL_AWB_STATE =
2017 new Key<Integer>("android.control.awbState", int.class);
2018
2019 /**
Zhijun He379af012014-05-06 11:54:54 -07002020 * <p>A special color effect to apply.</p>
2021 * <p>When this mode is set, a color effect will be applied
2022 * to images produced by the camera device. The interpretation
2023 * and implementation of these color effects is left to the
2024 * implementor of the camera device, and should not be
2025 * depended on to be consistent (or present) across all
2026 * devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002027 * <p><b>Possible values:</b>
2028 * <ul>
2029 * <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li>
2030 * <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li>
2031 * <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li>
2032 * <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li>
2033 * <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li>
2034 * <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li>
2035 * <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li>
2036 * <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li>
2037 * <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li>
2038 * </ul></p>
2039 * <p><b>Available values for this device:</b><br>
2040 * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002041 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07002042 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002043 * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
Zhijun He379af012014-05-06 11:54:54 -07002044 * @see #CONTROL_EFFECT_MODE_OFF
2045 * @see #CONTROL_EFFECT_MODE_MONO
2046 * @see #CONTROL_EFFECT_MODE_NEGATIVE
2047 * @see #CONTROL_EFFECT_MODE_SOLARIZE
2048 * @see #CONTROL_EFFECT_MODE_SEPIA
2049 * @see #CONTROL_EFFECT_MODE_POSTERIZE
2050 * @see #CONTROL_EFFECT_MODE_WHITEBOARD
2051 * @see #CONTROL_EFFECT_MODE_BLACKBOARD
2052 * @see #CONTROL_EFFECT_MODE_AQUA
2053 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002054 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07002055 public static final Key<Integer> CONTROL_EFFECT_MODE =
2056 new Key<Integer>("android.control.effectMode", int.class);
2057
2058 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002059 * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
Zhijun Hecc28a412014-02-24 15:11:23 -08002060 * routines.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002061 * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
Zhijun He5f2a47f2014-01-16 15:44:41 -08002062 * by the camera device is disabled. The application must set the fields for
Zhijun Hef3537422013-12-16 16:56:35 -08002063 * capture parameters itself.</p>
2064 * <p>When set to AUTO, the individual algorithm controls in
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002065 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08002066 * <p>When set to USE_SCENE_MODE, the individual controls in
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08002067 * android.control.* are mostly disabled, and the camera device
2068 * implements one of the scene mode settings (such as ACTION,
2069 * SUNSET, or PARTY) as it wishes. The camera device scene mode
2070 * 3A settings are provided by {@link android.hardware.camera2.CaptureResult capture results}.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08002071 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
2072 * is that this frame will not be used by camera device background 3A statistics
2073 * update, as if this frame is never captured. This mode can be used in the scenario
2074 * where the application doesn't want a 3A manual control capture to affect
2075 * the subsequent auto 3A capture results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002076 * <p><b>Possible values:</b>
2077 * <ul>
2078 * <li>{@link #CONTROL_MODE_OFF OFF}</li>
2079 * <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
2080 * <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
2081 * <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
2082 * </ul></p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -08002083 * <p><b>Available values for this device:</b><br>
2084 * {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002085 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08002086 *
2087 * @see CaptureRequest#CONTROL_AF_MODE
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -08002088 * @see CameraCharacteristics#CONTROL_AVAILABLE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002089 * @see #CONTROL_MODE_OFF
2090 * @see #CONTROL_MODE_AUTO
2091 * @see #CONTROL_MODE_USE_SCENE_MODE
Zhijun He2d5e8972014-02-07 16:13:46 -08002092 * @see #CONTROL_MODE_OFF_KEEP_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002093 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002094 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002095 public static final Key<Integer> CONTROL_MODE =
2096 new Key<Integer>("android.control.mode", int.class);
2097
2098 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002099 * <p>Control for which scene mode is currently active.</p>
2100 * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
2101 * capture settings.</p>
Zhijun He379af012014-05-06 11:54:54 -07002102 * <p>This is the mode that that is active when
Zhijun Heee2ebde2015-06-16 19:58:11 -07002103 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
2104 * disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}
2105 * while in use.</p>
Zhijun He379af012014-05-06 11:54:54 -07002106 * <p>The interpretation and implementation of these scene modes is left
2107 * to the implementor of the camera device. Their behavior will not be
2108 * consistent across all devices, and any given device may only implement
2109 * a subset of these modes.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002110 * <p><b>Possible values:</b>
2111 * <ul>
2112 * <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li>
2113 * <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li>
2114 * <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li>
2115 * <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li>
2116 * <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li>
2117 * <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li>
2118 * <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li>
2119 * <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li>
2120 * <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li>
2121 * <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li>
2122 * <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li>
2123 * <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li>
2124 * <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li>
2125 * <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li>
2126 * <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li>
2127 * <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
2128 * <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
2129 * <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002130 * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002131 * </ul></p>
2132 * <p><b>Available values for this device:</b><br>
2133 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002134 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07002135 *
2136 * @see CaptureRequest#CONTROL_AE_MODE
2137 * @see CaptureRequest#CONTROL_AF_MODE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002138 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Zhijun He379af012014-05-06 11:54:54 -07002139 * @see CaptureRequest#CONTROL_AWB_MODE
2140 * @see CaptureRequest#CONTROL_MODE
2141 * @see #CONTROL_SCENE_MODE_DISABLED
2142 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
2143 * @see #CONTROL_SCENE_MODE_ACTION
2144 * @see #CONTROL_SCENE_MODE_PORTRAIT
2145 * @see #CONTROL_SCENE_MODE_LANDSCAPE
2146 * @see #CONTROL_SCENE_MODE_NIGHT
2147 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
2148 * @see #CONTROL_SCENE_MODE_THEATRE
2149 * @see #CONTROL_SCENE_MODE_BEACH
2150 * @see #CONTROL_SCENE_MODE_SNOW
2151 * @see #CONTROL_SCENE_MODE_SUNSET
2152 * @see #CONTROL_SCENE_MODE_STEADYPHOTO
2153 * @see #CONTROL_SCENE_MODE_FIREWORKS
2154 * @see #CONTROL_SCENE_MODE_SPORTS
2155 * @see #CONTROL_SCENE_MODE_PARTY
2156 * @see #CONTROL_SCENE_MODE_CANDLELIGHT
2157 * @see #CONTROL_SCENE_MODE_BARCODE
Zhijun Hee0404182014-06-26 13:17:09 -07002158 * @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002159 * @see #CONTROL_SCENE_MODE_HDR
Zhijun He379af012014-05-06 11:54:54 -07002160 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002161 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07002162 public static final Key<Integer> CONTROL_SCENE_MODE =
2163 new Key<Integer>("android.control.sceneMode", int.class);
2164
2165 /**
2166 * <p>Whether video stabilization is
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002167 * active.</p>
Jianing Wei2813b0f2015-09-29 14:24:36 -07002168 * <p>Video stabilization automatically warps images from
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002169 * the camera in order to stabilize motion between consecutive frames.</p>
Zhijun He379af012014-05-06 11:54:54 -07002170 * <p>If enabled, video stabilization can modify the
Zhijun He45fa43a12014-06-13 18:29:37 -07002171 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002172 * <p>Switching between different video stabilization modes may take several
2173 * frames to initialize, the camera device will report the current mode
2174 * in capture result metadata. For example, When "ON" mode is requested,
2175 * the video stabilization modes in the first several capture results may
2176 * still be "OFF", and it will become "ON" when the initialization is
2177 * done.</p>
Jianing Wei2813b0f2015-09-29 14:24:36 -07002178 * <p>In addition, not all recording sizes or frame rates may be supported for
2179 * stabilization by a device that reports stabilization support. It is guaranteed
2180 * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
2181 * the recording resolution is less than or equal to 1920 x 1080 (width less than
2182 * or equal to 1920, height less than or equal to 1080), and the recording
2183 * frame rate is less than or equal to 30fps. At other sizes, the CaptureResult
2184 * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return
2185 * OFF if the recording output is not stabilized, or if there are no output
2186 * Surface types that can be stabilized.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002187 * <p>If a camera device supports both this mode and OIS
2188 * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
2189 * produce undesirable interaction, so it is recommended not to enable
2190 * both at the same time.</p>
2191 * <p><b>Possible values:</b>
2192 * <ul>
2193 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li>
2194 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li>
2195 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002196 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07002197 *
Jianing Wei2813b0f2015-09-29 14:24:36 -07002198 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Zhijun He45fa43a12014-06-13 18:29:37 -07002199 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Zhijun He379af012014-05-06 11:54:54 -07002200 * @see CaptureRequest#SCALER_CROP_REGION
2201 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF
2202 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON
2203 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002204 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07002205 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE =
2206 new Key<Integer>("android.control.videoStabilizationMode", int.class);
2207
2208 /**
Yin-Chia Yeh33052d32016-04-11 16:39:02 -07002209 * <p>The amount of additional sensitivity boost applied to output images
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08002210 * after RAW sensor data is captured.</p>
2211 * <p>Some camera devices support additional digital sensitivity boosting in the
2212 * camera processing pipeline after sensor RAW image is captured.
2213 * Such a boost will be applied to YUV/JPEG format output images but will not
2214 * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
Yin-Chia Yeh33052d32016-04-11 16:39:02 -07002215 * <p>This key will be <code>null</code> for devices that do not support any RAW format
2216 * outputs. For devices that do support RAW format outputs, this key will always
2217 * present, and if a device does not support post RAW sensitivity boost, it will
2218 * list <code>100</code> in this key.</p>
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08002219 * <p>If the camera device cannot apply the exact boost requested, it will reduce the
2220 * boost to the nearest supported value.
2221 * The final boost value used will be available in the output capture result.</p>
2222 * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
2223 * of such device will have the total sensitivity of
Yin-Chia Yeh67e61b62016-01-26 13:27:35 -08002224 * <code>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} / 100</code>
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08002225 * The sensitivity of RAW format images will always be <code>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</code></p>
2226 * <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
2227 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
2228 * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p>
2229 * <p><b>Range of valid values:</b><br>
2230 * {@link CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE android.control.postRawSensitivityBoostRange}</p>
2231 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2232 *
2233 * @see CaptureRequest#CONTROL_AE_MODE
2234 * @see CaptureRequest#CONTROL_MODE
2235 * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
2236 * @see CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE
2237 * @see CaptureRequest#SENSOR_SENSITIVITY
2238 */
2239 @PublicKey
2240 public static final Key<Integer> CONTROL_POST_RAW_SENSITIVITY_BOOST =
2241 new Key<Integer>("android.control.postRawSensitivityBoost", int.class);
2242
2243 /**
Chien-Yu Chene4491712017-01-11 11:14:06 -08002244 * <p>Allow camera device to enable zero-shutter-lag mode for requests with
2245 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE.</p>
2246 * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
2247 * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
2248 * produce output images for a zero-shutter-lag request. The result metadata including the
2249 * {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} reflects the source frames used to produce output images.
2250 * Therefore, the contents of the output images and the result metadata may be out of order
2251 * compared to previous regular requests. enableZsl does not affect requests with other
2252 * capture intents.</p>
2253 * <p>For example, when requests are submitted in the following order:
2254 * Request A: enableZsl is ON, {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} is PREVIEW
2255 * Request B: enableZsl is ON, {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} is STILL_CAPTURE</p>
2256 * <p>The output images for request B may have contents captured before the output images for
2257 * request A, and the result metadata for request B may be older than the result metadata for
2258 * request A.</p>
Chien-Yu Chen1d72ee32017-04-18 15:23:06 -07002259 * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in
2260 * the past for requests with STILL_CAPTURE capture intent.</p>
2261 * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
2262 * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
2263 * <code>false</code> if present.</p>
2264 * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
2265 * capture templates is always <code>false</code> if present.</p>
Chien-Yu Chen81026382017-05-03 12:30:58 -07002266 * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Chien-Yu Chene4491712017-01-11 11:14:06 -08002267 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2268 *
2269 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2270 * @see CaptureResult#SENSOR_TIMESTAMP
2271 */
2272 @PublicKey
2273 public static final Key<Boolean> CONTROL_ENABLE_ZSL =
2274 new Key<Boolean>("android.control.enableZsl", boolean.class);
2275
2276 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08002277 * <p>Whether a significant scene change is detected within the currently-set AF
2278 * region(s).</p>
2279 * <p>When the camera focus routine detects a change in the scene it is looking at,
2280 * such as a large shift in camera viewpoint, significant motion in the scene, or a
2281 * significant illumination change, this value will be set to DETECTED for a single capture
2282 * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
2283 * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.</p>
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08002284 * <p>This key will be available if the camera device advertises this key via {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys }.</p>
Chien-Yu Chene8d86eb2017-11-27 15:42:44 -08002285 * <p><b>Possible values:</b>
2286 * <ul>
2287 * <li>{@link #CONTROL_AF_SCENE_CHANGE_NOT_DETECTED NOT_DETECTED}</li>
2288 * <li>{@link #CONTROL_AF_SCENE_CHANGE_DETECTED DETECTED}</li>
2289 * </ul></p>
2290 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2291 * @see #CONTROL_AF_SCENE_CHANGE_NOT_DETECTED
2292 * @see #CONTROL_AF_SCENE_CHANGE_DETECTED
2293 */
2294 @PublicKey
2295 public static final Key<Integer> CONTROL_AF_SCENE_CHANGE =
2296 new Key<Integer>("android.control.afSceneChange", int.class);
2297
2298 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002299 * <p>Operation mode for edge
Zhijun Hecc28a412014-02-24 15:11:23 -08002300 * enhancement.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002301 * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
2302 * no enhancement will be applied by the camera device.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002303 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun He28079362013-12-17 10:35:40 -08002304 * will be applied. HIGH_QUALITY mode indicates that the
Zhijun He5f2a47f2014-01-16 15:44:41 -08002305 * camera device will use the highest-quality enhancement algorithms,
2306 * even if it slows down capture rate. FAST means the camera device will
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002307 * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
2308 * edge enhancement will slow down capture rate. Every output stream will have a similar
2309 * amount of enhancement applied.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002310 * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2311 * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2312 * into a final capture when triggered by the user. In this mode, the camera device applies
2313 * edge enhancement to low-resolution streams (below maximum recording resolution) to
2314 * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
2315 * since those will be reprocessed later if necessary.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08002316 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
2317 * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002318 * The camera device may adjust its internal edge enhancement parameters for best
Zhijun He0e99c222015-01-29 15:26:05 -08002319 * 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 -07002320 * <p><b>Possible values:</b>
2321 * <ul>
2322 * <li>{@link #EDGE_MODE_OFF OFF}</li>
2323 * <li>{@link #EDGE_MODE_FAST FAST}</li>
2324 * <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002325 * <li>{@link #EDGE_MODE_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002326 * </ul></p>
2327 * <p><b>Available values for this device:</b><br>
2328 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002329 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2330 * <p><b>Full capability</b> -
2331 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2332 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002333 *
2334 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002335 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0e99c222015-01-29 15:26:05 -08002336 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002337 * @see #EDGE_MODE_OFF
2338 * @see #EDGE_MODE_FAST
2339 * @see #EDGE_MODE_HIGH_QUALITY
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002340 * @see #EDGE_MODE_ZERO_SHUTTER_LAG
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<Integer> EDGE_MODE =
2344 new Key<Integer>("android.edge.mode", int.class);
2345
2346 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002347 * <p>The desired mode for for the camera device's flash control.</p>
2348 * <p>This control is only effective when flash unit is available
Zhijun He153ac102014-02-03 12:25:12 -08002349 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
Zhijun He66d065a2014-01-16 18:18:50 -08002350 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
2351 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2352 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2353 * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2354 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2355 * device's auto-exposure routine's result. When used in still capture case, this
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002356 * control should be used along with auto-exposure (AE) precapture metering sequence
Zhijun He66d065a2014-01-16 18:18:50 -08002357 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
2358 * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2359 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002360 * <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 -07002361 * <p><b>Possible values:</b>
2362 * <ul>
2363 * <li>{@link #FLASH_MODE_OFF OFF}</li>
2364 * <li>{@link #FLASH_MODE_SINGLE SINGLE}</li>
2365 * <li>{@link #FLASH_MODE_TORCH TORCH}</li>
2366 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002367 * <p>This key is available on all devices.</p>
Zhijun He66d065a2014-01-16 18:18:50 -08002368 *
2369 * @see CaptureRequest#CONTROL_AE_MODE
2370 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2371 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Zhijun Heca1b73a2014-02-03 12:39:53 -08002372 * @see CaptureResult#FLASH_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002373 * @see #FLASH_MODE_OFF
2374 * @see #FLASH_MODE_SINGLE
2375 * @see #FLASH_MODE_TORCH
2376 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002377 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002378 public static final Key<Integer> FLASH_MODE =
2379 new Key<Integer>("android.flash.mode", int.class);
2380
2381 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002382 * <p>Current state of the flash
Zhijun Heca1b73a2014-02-03 12:39:53 -08002383 * unit.</p>
2384 * <p>When the camera device doesn't have flash unit
2385 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
2386 * Other states indicate the current flash status.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002387 * <p>In certain conditions, this will be available on LEGACY devices:</p>
2388 * <ul>
2389 * <li>Flash-less cameras always return UNAVAILABLE.</li>
2390 * <li>Using {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>==</code> ON_ALWAYS_FLASH
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002391 * will always return FIRED.</li>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002392 * <li>Using {@link CaptureRequest#FLASH_MODE android.flash.mode} <code>==</code> TORCH
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002393 * will always return FIRED.</li>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002394 * </ul>
2395 * <p>In all other conditions the state will not be available on
2396 * LEGACY devices (i.e. it will be <code>null</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002397 * <p><b>Possible values:</b>
2398 * <ul>
2399 * <li>{@link #FLASH_STATE_UNAVAILABLE UNAVAILABLE}</li>
2400 * <li>{@link #FLASH_STATE_CHARGING CHARGING}</li>
2401 * <li>{@link #FLASH_STATE_READY READY}</li>
2402 * <li>{@link #FLASH_STATE_FIRED FIRED}</li>
2403 * <li>{@link #FLASH_STATE_PARTIAL PARTIAL}</li>
2404 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002405 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2406 * <p><b>Limited capability</b> -
2407 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2408 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002409 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002410 * @see CaptureRequest#CONTROL_AE_MODE
Zhijun Heca1b73a2014-02-03 12:39:53 -08002411 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002412 * @see CaptureRequest#FLASH_MODE
2413 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002414 * @see #FLASH_STATE_UNAVAILABLE
2415 * @see #FLASH_STATE_CHARGING
2416 * @see #FLASH_STATE_READY
2417 * @see #FLASH_STATE_FIRED
Zhijun He8dda7272014-03-25 13:49:30 -07002418 * @see #FLASH_STATE_PARTIAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002419 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002420 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002421 public static final Key<Integer> FLASH_STATE =
2422 new Key<Integer>("android.flash.state", int.class);
2423
2424 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002425 * <p>Operational mode for hot pixel correction.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002426 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002427 * that do not accurately measure the incoming light (i.e. pixels that
2428 * are stuck at an arbitrary value or are oversensitive).</p>
2429 * <p><b>Possible values:</b>
2430 * <ul>
2431 * <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li>
2432 * <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li>
2433 * <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
2434 * </ul></p>
2435 * <p><b>Available values for this device:</b><br>
2436 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002437 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002438 *
2439 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002440 * @see #HOT_PIXEL_MODE_OFF
2441 * @see #HOT_PIXEL_MODE_FAST
2442 * @see #HOT_PIXEL_MODE_HIGH_QUALITY
2443 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002444 @PublicKey
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002445 public static final Key<Integer> HOT_PIXEL_MODE =
2446 new Key<Integer>("android.hotPixel.mode", int.class);
2447
2448 /**
Ruben Brunk57493682014-05-27 18:58:08 -07002449 * <p>A location object to use when generating image GPS metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002450 * <p>Setting a location object in a request will include the GPS coordinates of the location
2451 * into any JPEG images captured based on the request. These coordinates can then be
2452 * viewed by anyone who receives the JPEG image.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002453 * <p>This tag is also used for HEIC image capture.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002454 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002455 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002456 @PublicKey
2457 @SyntheticKey
Ruben Brunk57493682014-05-27 18:58:08 -07002458 public static final Key<android.location.Location> JPEG_GPS_LOCATION =
2459 new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class);
2460
2461 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002462 * <p>GPS coordinates to include in output JPEG
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002463 * EXIF.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002464 * <p>This tag is also used for HEIC image capture.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002465 * <p><b>Range of valid values:</b><br>
2466 * (-180 - 180], [-90,90], [-inf, inf]</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002467 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002468 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002469 */
2470 public static final Key<double[]> JPEG_GPS_COORDINATES =
2471 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
2472
2473 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002474 * <p>32 characters describing GPS algorithm to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002475 * include in EXIF.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002476 * <p>This tag is also used for HEIC image capture.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002477 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002478 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002479 */
2480 public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
2481 new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
2482
2483 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002484 * <p>Time GPS fix was made to include in
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002485 * EXIF.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002486 * <p>This tag is also used for HEIC image capture.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002487 * <p><b>Units</b>: UTC in seconds since January 1, 1970</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002488 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002489 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002490 */
2491 public static final Key<Long> JPEG_GPS_TIMESTAMP =
2492 new Key<Long>("android.jpeg.gpsTimestamp", long.class);
2493
2494 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002495 * <p>The orientation for a JPEG image.</p>
2496 * <p>The clockwise rotation angle in degrees, relative to the orientation
2497 * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2498 * upright.</p>
2499 * <p>Camera devices may either encode this value into the JPEG EXIF header, or
Yin-Chia Yehd49ebcc2015-03-27 13:54:04 -07002500 * rotate the image data to match this orientation. When the image data is rotated,
2501 * the thumbnail data will also be rotated.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002502 * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2503 * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
Emilian Peev3abc7512018-03-28 11:22:26 +01002504 * <p>To translate from the device orientation given by the Android sensor APIs for camera
2505 * sensors which are not EXTERNAL, the following sample code may be used:</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002506 * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2507 * if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2508 * int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2509 *
2510 * // Round device orientation to a multiple of 90
2511 * deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2512 *
2513 * // Reverse device orientation for front-facing cameras
2514 * boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2515 * if (facingFront) deviceOrientation = -deviceOrientation;
2516 *
2517 * // Calculate desired JPEG orientation relative to camera orientation to make
2518 * // the image upright relative to the device orientation
2519 * int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2520 *
2521 * return jpegOrientation;
2522 * }
2523 * </code></pre>
Emilian Peev3abc7512018-03-28 11:22:26 +01002524 * <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
2525 * also be set to EXTERNAL. The above code is not relevant in such case.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002526 * <p>This tag is also used to describe the orientation of the HEIC image capture, in which
2527 * case the rotation is reflected by
2528 * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}, and not by
2529 * rotating the image data itself.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002530 * <p><b>Units</b>: Degrees in multiples of 90</p>
2531 * <p><b>Range of valid values:</b><br>
2532 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002533 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002534 *
2535 * @see CameraCharacteristics#SENSOR_ORIENTATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002536 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002537 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002538 public static final Key<Integer> JPEG_ORIENTATION =
2539 new Key<Integer>("android.jpeg.orientation", int.class);
2540
2541 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002542 * <p>Compression quality of the final JPEG
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002543 * image.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002544 * <p>85-95 is typical usage range. This tag is also used to describe the quality
2545 * of the HEIC image capture.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002546 * <p><b>Range of valid values:</b><br>
2547 * 1-100; larger is higher quality</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002548 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002549 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002550 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002551 public static final Key<Byte> JPEG_QUALITY =
2552 new Key<Byte>("android.jpeg.quality", byte.class);
2553
2554 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002555 * <p>Compression quality of JPEG
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002556 * thumbnail.</p>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002557 * <p>This tag is also used to describe the quality of the HEIC image capture.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002558 * <p><b>Range of valid values:</b><br>
2559 * 1-100; larger is higher quality</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002560 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002561 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002562 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002563 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
2564 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
2565
2566 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002567 * <p>Resolution of embedded JPEG thumbnail.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002568 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2569 * but the captured JPEG will still be a valid image.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002570 * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2571 * should have the same aspect ratio as the main JPEG output.</p>
Zhijun He50f72432014-05-28 13:52:04 -07002572 * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2573 * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2574 * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2575 * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2576 * generate the thumbnail image. The thumbnail image will always have a smaller Field
2577 * Of View (FOV) than the primary image when aspect ratios differ.</p>
Yin-Chia Yeh59883112015-06-22 15:51:40 -07002578 * <p>When an {@link CaptureRequest#JPEG_ORIENTATION android.jpeg.orientation} of non-zero degree is requested,
2579 * the camera device will handle thumbnail rotation in one of the following ways:</p>
2580 * <ul>
2581 * <li>Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}
2582 * and keep jpeg and thumbnail image data unrotated.</li>
2583 * <li>Rotate the jpeg and thumbnail image data and not set
2584 * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this
2585 * case, LIMITED or FULL hardware level devices will report rotated thumnail size in
2586 * capture result, so the width and height will be interchanged if 90 or 270 degree
2587 * orientation is requested. LEGACY device will always report unrotated thumbnail
2588 * size.</li>
2589 * </ul>
Shuzhen Wangf655b1c2018-12-28 15:40:36 -08002590 * <p>The tag is also used as thumbnail size for HEIC image format capture, in which case the
2591 * the thumbnail rotation is reflected by
2592 * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}, and not by
2593 * rotating the thumbnail data itself.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002594 * <p><b>Range of valid values:</b><br>
2595 * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002596 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002597 *
2598 * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES
Yin-Chia Yeh59883112015-06-22 15:51:40 -07002599 * @see CaptureRequest#JPEG_ORIENTATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002600 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002601 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002602 public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE =
2603 new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002604
2605 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002606 * <p>The desired lens aperture size, as a ratio of lens focal length to the
2607 * effective aperture diameter.</p>
2608 * <p>Setting this value is only supported on the camera devices that have a variable
2609 * aperture lens.</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08002610 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
2611 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002612 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
Zhijun Hefb46c642014-01-14 17:57:23 -08002613 * to achieve manual exposure control.</p>
2614 * <p>The requested aperture value may take several frames to reach the
2615 * requested value; the camera device will report the current (intermediate)
Zhijun Heca1b73a2014-02-03 12:39:53 -08002616 * aperture size in capture result metadata while the aperture is changing.
2617 * 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 -08002618 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
2619 * the ON modes, this will be overridden by the camera device
2620 * auto-exposure algorithm, the overridden values are then provided
2621 * back to the user in the corresponding result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002622 * <p><b>Units</b>: The f-number (f/N)</p>
2623 * <p><b>Range of valid values:</b><br>
2624 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002625 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2626 * <p><b>Full capability</b> -
2627 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2628 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08002629 *
Zhijun He399f05d2014-01-15 11:31:30 -08002630 * @see CaptureRequest#CONTROL_AE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002631 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002632 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
Zhijun Heca1b73a2014-02-03 12:39:53 -08002633 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002634 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002635 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002636 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002637 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002638 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002639 public static final Key<Float> LENS_APERTURE =
2640 new Key<Float>("android.lens.aperture", float.class);
2641
2642 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002643 * <p>The desired setting for the lens neutral density filter(s).</p>
2644 * <p>This control will not be supported on most camera devices.</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08002645 * <p>Lens filters are typically used to lower the amount of light the
2646 * sensor is exposed to (measured in steps of EV). As used here, an EV
2647 * step is the standard logarithmic representation, which are
2648 * non-negative, and inversely proportional to the amount of light
2649 * hitting the sensor. For example, setting this to 0 would result
2650 * in no reduction of the incoming light, and setting this to 2 would
2651 * mean that the filter is set to reduce incoming light by two stops
2652 * (allowing 1/4 of the prior amount of light to the sensor).</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002653 * <p>It may take several frames before the lens filter density changes
2654 * to the requested value. While the filter density is still changing,
2655 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002656 * <p><b>Units</b>: Exposure Value (EV)</p>
2657 * <p><b>Range of valid values:</b><br>
2658 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002659 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2660 * <p><b>Full capability</b> -
2661 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2662 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08002663 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002664 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -08002665 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
Zhijun Heca1b73a2014-02-03 12:39:53 -08002666 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002667 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002668 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002669 public static final Key<Float> LENS_FILTER_DENSITY =
2670 new Key<Float>("android.lens.filterDensity", float.class);
2671
2672 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002673 * <p>The desired lens focal length; used for optical zoom.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08002674 * <p>This setting controls the physical focal length of the camera
2675 * device's lens. Changing the focal length changes the field of
2676 * view of the camera device, and is usually used for optical zoom.</p>
2677 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
2678 * setting won't be applied instantaneously, and it may take several
Zhijun Heca1b73a2014-02-03 12:39:53 -08002679 * frames before the lens can change to the requested focal length.
Ruben Brunka20f4c22014-01-17 15:21:13 -08002680 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
2681 * be set to MOVING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002682 * <p>Optical zoom will not be supported on most devices.</p>
2683 * <p><b>Units</b>: Millimeters</p>
2684 * <p><b>Range of valid values:</b><br>
2685 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002686 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08002687 *
2688 * @see CaptureRequest#LENS_APERTURE
2689 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002690 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
Ruben Brunka20f4c22014-01-17 15:21:13 -08002691 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002692 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002693 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002694 public static final Key<Float> LENS_FOCAL_LENGTH =
2695 new Key<Float>("android.lens.focalLength", float.class);
2696
2697 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002698 * <p>Desired distance to plane of sharpest focus,
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002699 * measured from frontmost surface of the lens.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002700 * <p>Should be zero for fixed-focus cameras</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002701 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
2702 * <p><b>Range of valid values:</b><br>
2703 * &gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002704 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2705 * <p><b>Full capability</b> -
2706 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2707 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2708 *
2709 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002710 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002711 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002712 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002713 public static final Key<Float> LENS_FOCUS_DISTANCE =
2714 new Key<Float>("android.lens.focusDistance", float.class);
2715
2716 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002717 * <p>The range of scene distances that are in
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002718 * sharp focus (depth of field).</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002719 * <p>If variable focus not supported, can still report
2720 * fixed depth of field range</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002721 * <p><b>Units</b>: A pair of focus distances in diopters: (near,
2722 * far); see {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details.</p>
2723 * <p><b>Range of valid values:</b><br>
2724 * &gt;=0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002725 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2726 * <p><b>Limited capability</b> -
2727 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2728 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2729 *
2730 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002731 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002732 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002733 @PublicKey
Igor Murashkin57438682014-05-30 10:49:00 -07002734 public static final Key<android.util.Pair<Float,Float>> LENS_FOCUS_RANGE =
2735 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 -07002736
2737 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002738 * <p>Sets whether the camera device uses optical image stabilization (OIS)
2739 * when capturing images.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002740 * <p>OIS is used to compensate for motion blur due to small
2741 * movements of the camera during capture. Unlike digital image
2742 * stabilization ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), OIS
2743 * makes use of mechanical elements to stabilize the camera
2744 * sensor, and thus allows for longer exposure times before
2745 * camera shake becomes apparent.</p>
Zhijun He45fa43a12014-06-13 18:29:37 -07002746 * <p>Switching between different optical stabilization modes may take several
2747 * frames to initialize, the camera device will report the current mode in
2748 * capture result metadata. For example, When "ON" mode is requested, the
2749 * optical stabilization modes in the first several capture results may still
2750 * be "OFF", and it will become "ON" when the initialization is done.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002751 * <p>If a camera device supports both OIS and digital image stabilization
2752 * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable
2753 * interaction, so it is recommended not to enable both at the same time.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002754 * <p>Not all devices will support OIS; see
2755 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for
2756 * available controls.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002757 * <p><b>Possible values:</b>
2758 * <ul>
2759 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li>
2760 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li>
2761 * </ul></p>
2762 * <p><b>Available values for this device:</b><br>
2763 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002764 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2765 * <p><b>Limited capability</b> -
2766 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2767 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002768 *
2769 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002770 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002771 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002772 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
2773 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
2774 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002775 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002776 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
2777 new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
2778
2779 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08002780 * <p>Current lens status.</p>
2781 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2782 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested,
2783 * they may take several frames to reach the requested values. This state indicates
2784 * the current status of the lens parameters.</p>
2785 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2786 * either because the parameters are all fixed, or because the lens has had enough
2787 * time to reach the most recently-requested values.
2788 * If all these lens parameters are not changable for a camera device, as listed below:</p>
2789 * <ul>
2790 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means
2791 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li>
2792 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value),
2793 * which means the optical zoom is not supported.</li>
2794 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li>
2795 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li>
2796 * </ul>
2797 * <p>Then this state will always be STATIONARY.</p>
2798 * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2799 * is changing.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002800 * <p><b>Possible values:</b>
2801 * <ul>
2802 * <li>{@link #LENS_STATE_STATIONARY STATIONARY}</li>
2803 * <li>{@link #LENS_STATE_MOVING MOVING}</li>
2804 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002805 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2806 * <p><b>Limited capability</b> -
2807 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2808 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002809 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002810 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heca1b73a2014-02-03 12:39:53 -08002811 * @see CaptureRequest#LENS_APERTURE
2812 * @see CaptureRequest#LENS_FILTER_DENSITY
2813 * @see CaptureRequest#LENS_FOCAL_LENGTH
2814 * @see CaptureRequest#LENS_FOCUS_DISTANCE
2815 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
2816 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
2817 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2818 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002819 * @see #LENS_STATE_STATIONARY
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002820 * @see #LENS_STATE_MOVING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002821 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002822 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002823 public static final Key<Integer> LENS_STATE =
2824 new Key<Integer>("android.lens.state", int.class);
2825
2826 /**
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002827 * <p>The orientation of the camera relative to the sensor
2828 * coordinate system.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002829 * <p>The four coefficients that describe the quaternion
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002830 * rotation from the Android sensor coordinate system to a
2831 * camera-aligned coordinate system where the X-axis is
2832 * aligned with the long side of the image sensor, the Y-axis
2833 * is aligned with the short side of the image sensor, and
2834 * the Z-axis is aligned with the optical axis of the sensor.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002835 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002836 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
2837 * amount <code>theta</code>, the following formulas can be used:</p>
2838 * <pre><code> theta = 2 * acos(w)
2839 * a_x = x / sin(theta/2)
2840 * a_y = y / sin(theta/2)
2841 * a_z = z / sin(theta/2)
2842 * </code></pre>
2843 * <p>To create a 3x3 rotation matrix that applies the rotation
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002844 * defined by this quaternion, the following matrix can be
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002845 * used:</p>
2846 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
2847 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
2848 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
2849 * </code></pre>
2850 * <p>This matrix can then be used to apply the rotation to a
2851 * column vector point with</p>
2852 * <p><code>p' = Rp</code></p>
2853 * <p>where <code>p</code> is in the device sensor coordinate system, and
2854 * <code>p'</code> is in the camera-oriented coordinate system.</p>
2855 * <p><b>Units</b>:
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002856 * Quaternion coefficients</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002857 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01002858 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002859 */
2860 @PublicKey
2861 public static final Key<float[]> LENS_POSE_ROTATION =
2862 new Key<float[]>("android.lens.poseRotation", float[].class);
2863
2864 /**
2865 * <p>Position of the camera optical center.</p>
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07002866 * <p>The position of the camera device's lens optical center,
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002867 * as a three-dimensional vector <code>(x,y,z)</code>.</p>
2868 * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position
2869 * is relative to the optical center of the largest camera device facing in the same
2870 * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor
2871 * coordinate axes}. Note that only the axis definitions are shared with the sensor
2872 * coordinate system, but not the origin.</p>
2873 * <p>If this device is the largest or only camera device with a given facing, then this
2874 * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
2875 * from the main sensor along the +X axis (to the right from the user's perspective) will
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07002876 * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision
2877 * applications, the position needs to be negated to convert it to a translation from the
2878 * camera to the origin.</p>
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002879 * <p>To transform a pixel coordinates between two cameras facing the same direction, first
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002880 * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002881 * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the
2882 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera
2883 * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination
2884 * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination
2885 * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
2886 * coordinates.</p>
2887 * <p>To compare this against a real image from the destination camera, the destination camera
2888 * image then needs to be corrected for radial distortion before comparison or sampling.</p>
2889 * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07002890 * the center of the primary gyroscope on the device. The axis definitions are the same as
2891 * with PRIMARY_CAMERA.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002892 * <p><b>Units</b>: Meters</p>
2893 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01002894 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002895 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002896 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002897 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvalaec99efa2017-11-29 15:35:42 -08002898 * @see CameraCharacteristics#LENS_POSE_REFERENCE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002899 * @see CameraCharacteristics#LENS_POSE_ROTATION
2900 */
2901 @PublicKey
2902 public static final Key<float[]> LENS_POSE_TRANSLATION =
2903 new Key<float[]>("android.lens.poseTranslation", float[].class);
2904
2905 /**
2906 * <p>The parameters for this camera device's intrinsic
2907 * calibration.</p>
2908 * <p>The five calibration parameters that describe the
2909 * transform from camera-centric 3D coordinates to sensor
2910 * pixel coordinates:</p>
2911 * <pre><code>[f_x, f_y, c_x, c_y, s]
2912 * </code></pre>
2913 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
2914 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
2915 * axis, and <code>s</code> is a skew parameter for the sensor plane not
2916 * being aligned with the lens plane.</p>
2917 * <p>These are typically used within a transformation matrix K:</p>
2918 * <pre><code>K = [ f_x, s, c_x,
2919 * 0, f_y, c_y,
2920 * 0 0, 1 ]
2921 * </code></pre>
2922 * <p>which can then be combined with the camera pose rotation
2923 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07002924 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002925 * complete transform from world coordinates to pixel
2926 * coordinates:</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07002927 * <pre><code>P = [ K 0 * [ R -Rt
2928 * 0 1 ] 0 1 ]
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002929 * </code></pre>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07002930 * <p>(Note the negation of poseTranslation when mapping from camera
2931 * to world coordinates, and multiplication by the rotation).</p>
2932 * <p>With <code>p_w</code> being a point in the world coordinate system
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002933 * and <code>p_s</code> being a point in the camera active pixel array
2934 * coordinate system, and with the mapping including the
2935 * homogeneous division by z:</p>
2936 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
2937 * p_s = p_h / z_h
2938 * </code></pre>
2939 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
2940 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
2941 * (depth) in pixel coordinates.</p>
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002942 * <p>Note that the coordinate system for this transform is the
2943 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
2944 * where <code>(0,0)</code> is the top-left of the
2945 * preCorrectionActiveArraySize rectangle. Once the pose and
2946 * intrinsic calibration transforms have been applied to a
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002947 * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002948 * transform needs to be applied, and the result adjusted to
2949 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
2950 * system (where <code>(0, 0)</code> is the top-left of the
2951 * activeArraySize rectangle), to determine the final pixel
2952 * coordinate of the world point for processed (non-RAW)
2953 * output buffers.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07002954 * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
2955 * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a
2956 * precorrection active array of size <code>(10,10)</code>, the valid pixel
2957 * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
2958 * have an optical center at the exact center of the pixel grid, at
2959 * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
2960 * <code>(5,5)</code>.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002961 * <p><b>Units</b>:
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002962 * Pixels in the
2963 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
2964 * coordinate system.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002965 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01002966 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002967 *
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07002968 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002969 * @see CameraCharacteristics#LENS_POSE_ROTATION
2970 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07002971 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002972 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002973 */
2974 @PublicKey
2975 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
2976 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
2977
2978 /**
2979 * <p>The correction coefficients to correct for this camera device's
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002980 * radial and tangential lens distortion.</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07002981 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002982 * kappa_3]</code> and two tangential distortion coefficients
2983 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
2984 * lens's geometric distortion with the mapping equations:</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07002985 * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002986 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07002987 * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002988 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002989 * </code></pre>
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002990 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
2991 * input image that correspond to the pixel values in the
2992 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
2993 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
2994 * </code></pre>
2995 * <p>The pixel coordinates are defined in a normalized
2996 * coordinate system related to the
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002997 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002998 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
2999 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
3000 * of both x and y coordinates are normalized to be 1 at the
3001 * edge further from the optical center, so the range
3002 * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
3003 * <p>Finally, <code>r</code> represents the radial distance from the
3004 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
3005 * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
3006 * <p>The distortion model used is the Brown-Conrady model.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00003007 * <p><b>Units</b>:
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07003008 * Unitless coefficients.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00003009 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003010 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07003011 *
3012 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003013 * @deprecated
3014 * <p>This field was inconsistently defined in terms of its
3015 * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p>
3016 *
3017 * @see CameraCharacteristics#LENS_DISTORTION
3018
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00003019 */
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003020 @Deprecated
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00003021 @PublicKey
3022 public static final Key<float[]> LENS_RADIAL_DISTORTION =
3023 new Key<float[]>("android.lens.radialDistortion", float[].class);
3024
3025 /**
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003026 * <p>The correction coefficients to correct for this camera device's
3027 * radial and tangential lens distortion.</p>
3028 * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was
3029 * inconsistently defined.</p>
3030 * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
3031 * kappa_3]</code> and two tangential distortion coefficients
3032 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
3033 * lens's geometric distortion with the mapping equations:</p>
3034 * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
3035 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
3036 * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
3037 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
3038 * </code></pre>
3039 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
3040 * input image that correspond to the pixel values in the
3041 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
3042 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
3043 * </code></pre>
3044 * <p>The pixel coordinates are defined in a coordinate system
3045 * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
3046 * calibration fields; see that entry for details of the mapping stages.
3047 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
3048 * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
3049 * the range of the coordinates depends on the focal length
3050 * terms of the intrinsic calibration.</p>
3051 * <p>Finally, <code>r</code> represents the radial distance from the
3052 * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
3053 * <p>The distortion model used is the Brown-Conrady model.</p>
3054 * <p><b>Units</b>:
3055 * Unitless coefficients.</p>
3056 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Emilian Peeva7fea4c2018-09-03 16:37:06 +01003057 * <p><b>Permission {@link android.Manifest.permission#CAMERA } is needed to access this property</b></p>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003058 *
3059 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
3060 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
3061 */
3062 @PublicKey
3063 public static final Key<float[]> LENS_DISTORTION =
3064 new Key<float[]>("android.lens.distortion", float[].class);
3065
3066 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003067 * <p>Mode of operation for the noise reduction algorithm.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003068 * <p>The noise reduction algorithm attempts to improve image quality by removing
Zhijun He0e99c222015-01-29 15:26:05 -08003069 * excessive noise added by the capture process, especially in dark conditions.</p>
3070 * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
3071 * YUV domain.</p>
3072 * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
3073 * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
3074 * This mode is optional, may not be support by all devices. The application should check
3075 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} before using it.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08003076 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
3077 * will be applied. HIGH_QUALITY mode indicates that the camera device
3078 * will use the highest-quality noise filtering algorithms,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003079 * even if it slows down capture rate. FAST means the camera device will not
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07003080 * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
3081 * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
3082 * Every output stream will have a similar amount of enhancement applied.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07003083 * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
3084 * buffer of high-resolution images during preview and reprocess image(s) from that buffer
3085 * into a final capture when triggered by the user. In this mode, the camera device applies
3086 * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
3087 * preview quality, but does not apply noise reduction to high-resolution streams, since
3088 * those will be reprocessed later if necessary.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08003089 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
3090 * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
3091 * may adjust the noise reduction parameters for best image quality based on the
3092 * {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor} if it is set.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003093 * <p><b>Possible values:</b>
3094 * <ul>
3095 * <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li>
3096 * <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li>
3097 * <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08003098 * <li>{@link #NOISE_REDUCTION_MODE_MINIMAL MINIMAL}</li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07003099 * <li>{@link #NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003100 * </ul></p>
3101 * <p><b>Available values for this device:</b><br>
3102 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003103 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3104 * <p><b>Full capability</b> -
3105 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3106 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003107 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003108 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08003109 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -08003110 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003111 * @see #NOISE_REDUCTION_MODE_OFF
3112 * @see #NOISE_REDUCTION_MODE_FAST
3113 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
Zhijun He0e99c222015-01-29 15:26:05 -08003114 * @see #NOISE_REDUCTION_MODE_MINIMAL
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07003115 * @see #NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003116 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003117 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003118 public static final Key<Integer> NOISE_REDUCTION_MODE =
3119 new Key<Integer>("android.noiseReduction.mode", int.class);
3120
3121 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003122 * <p>Whether a result given to the framework is the
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08003123 * final one for the capture, or only a partial that contains a
3124 * subset of the full set of dynamic metadata
Igor Murashkinace5bf02013-12-10 17:36:40 -08003125 * values.</p>
3126 * <p>The entries in the result metadata buffers for a
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08003127 * single capture may not overlap, except for this entry. The
3128 * FINAL buffers must retain FIFO ordering relative to the
3129 * requests that generate them, so the FINAL buffer for frame 3 must
3130 * always be sent to the framework after the FINAL buffer for frame 2, and
3131 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned
3132 * in any order relative to other frames, but all PARTIAL buffers for a given
3133 * capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun Hecc28a412014-02-24 15:11:23 -08003134 * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003135 * <p><b>Range of valid values:</b><br>
3136 * Optional. Default value is FINAL.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08003137 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07003138 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003139 * <p>Not used in HALv3 or newer</p>
3140
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08003141 * @hide
3142 */
Igor Murashkin9c595172014-05-12 13:56:20 -07003143 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08003144 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
3145 new Key<Boolean>("android.quirks.partialResult", boolean.class);
3146
3147 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003148 * <p>A frame counter set by the framework. This value monotonically
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -07003149 * increases with every new result (that is, each new result has a unique
Igor Murashkinace5bf02013-12-10 17:36:40 -08003150 * frameCount value).</p>
3151 * <p>Reset on release()</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003152 * <p><b>Units</b>: count of frames</p>
3153 * <p><b>Range of valid values:</b><br>
3154 * &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003155 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07003156 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07003157 * <p>Not used in HALv3 or newer</p>
3158
Igor Murashkinbdf366c2014-07-25 16:54:20 -07003159 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003160 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -07003161 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003162 public static final Key<Integer> REQUEST_FRAME_COUNT =
3163 new Key<Integer>("android.request.frameCount", int.class);
3164
3165 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003166 * <p>An application-specified ID for the current
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003167 * request. Must be maintained unchanged in output
Igor Murashkinace5bf02013-12-10 17:36:40 -08003168 * frame</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003169 * <p><b>Units</b>: arbitrary integer assigned by application</p>
3170 * <p><b>Range of valid values:</b><br>
3171 * Any int</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003172 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003173 * @hide
3174 */
3175 public static final Key<Integer> REQUEST_ID =
3176 new Key<Integer>("android.request.id", int.class);
3177
3178 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08003179 * <p>Specifies the number of pipeline stages the frame went
3180 * through from when it was exposed to when the final completed result
3181 * was available to the framework.</p>
3182 * <p>Depending on what settings are used in the request, and
3183 * what streams are configured, the data may undergo less processing,
3184 * and some pipeline stages skipped.</p>
3185 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003186 * <p><b>Range of valid values:</b><br>
3187 * &lt;= {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003188 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08003189 *
3190 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
3191 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003192 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08003193 public static final Key<Byte> REQUEST_PIPELINE_DEPTH =
3194 new Key<Byte>("android.request.pipelineDepth", byte.class);
3195
3196 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003197 * <p>The desired region of the sensor to read out for this capture.</p>
3198 * <p>This control can be used to implement digital zoom.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003199 * <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
3200 * system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being
3201 * the top-left pixel of the active array.</p>
3202 * <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
3203 * system depends on the mode being set.
3204 * When the distortion correction mode is OFF, the coordinate system follows
3205 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
3206 * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
3207 * When the distortion correction mode is not OFF, the coordinate system follows
3208 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
3209 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003210 * <p>Output streams use this rectangle to produce their output,
3211 * cropping to a smaller region if necessary to maintain the
3212 * stream's aspect ratio, then scaling the sensor input to
3213 * match the output's configured resolution.</p>
3214 * <p>The crop region is applied after the RAW to other color
3215 * space (e.g. YUV) conversion. Since raw streams
3216 * (e.g. RAW16) don't have the conversion stage, they are not
3217 * croppable. The crop region will be ignored by raw streams.</p>
Zhijun He9e6d1882014-05-22 16:47:35 -07003218 * <p>For non-raw streams, any additional per-stream cropping will
3219 * be done to maximize the final pixel area of the stream.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003220 * <p>For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003221 * ratio, then 4:3 streams will use the exact crop
3222 * region. 16:9 streams will further crop vertically
Igor Murashkinace5bf02013-12-10 17:36:40 -08003223 * (letterbox).</p>
3224 * <p>Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003225 * outputs will crop horizontally (pillarbox), and 16:9
3226 * streams will match exactly. These additional crops will
Igor Murashkinace5bf02013-12-10 17:36:40 -08003227 * be centered within the crop region.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07003228 * <p>If the coordinate system is {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, the width and height
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003229 * of the crop region cannot be set to be smaller than
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003230 * <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
3231 * <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003232 * <p>If the coordinate system is {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, the width
3233 * and height of the crop region cannot be set to be smaller than
3234 * <code>floor( preCorrectionActiveArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>
3235 * and
3236 * <code>floor( preCorrectionActiveArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>,
3237 * respectively.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003238 * <p>The camera device may adjust the crop region to account
3239 * for rounding and other hardware requirements; the final
3240 * crop region used will be included in the output capture
3241 * result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003242 * <p><b>Units</b>: Pixel coordinates relative to
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003243 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} or
3244 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} depending on distortion correction
3245 * capability and mode</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003246 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003247 *
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003248 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003249 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003250 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003251 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003252 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003253 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003254 public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
3255 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
3256
3257 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003258 * <p>Duration each pixel is exposed to
3259 * light.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003260 * <p>If the sensor can't expose this exact duration, it will shorten the
3261 * duration exposed to the nearest possible value (rather than expose longer).
3262 * The final exposure time used will be available in the output capture result.</p>
3263 * <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
3264 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3265 * <p><b>Units</b>: Nanoseconds</p>
3266 * <p><b>Range of valid values:</b><br>
3267 * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003268 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3269 * <p><b>Full capability</b> -
3270 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3271 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3272 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003273 * @see CaptureRequest#CONTROL_AE_MODE
3274 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003275 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003276 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003277 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003278 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003279 public static final Key<Long> SENSOR_EXPOSURE_TIME =
3280 new Key<Long>("android.sensor.exposureTime", long.class);
3281
3282 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003283 * <p>Duration from start of frame exposure to
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003284 * start of next frame exposure.</p>
3285 * <p>The maximum frame rate that can be supported by a camera subsystem is
3286 * a function of many factors:</p>
3287 * <ul>
3288 * <li>Requested resolutions of output image streams</li>
3289 * <li>Availability of binning / skipping modes on the imager</li>
3290 * <li>The bandwidth of the imager interface</li>
3291 * <li>The bandwidth of the various ISP processing blocks</li>
3292 * </ul>
3293 * <p>Since these factors can vary greatly between different ISPs and
3294 * sensors, the camera abstraction tries to represent the bandwidth
3295 * restrictions with as simple a model as possible.</p>
3296 * <p>The model presented has the following characteristics:</p>
3297 * <ul>
3298 * <li>The image sensor is always configured to output the smallest
3299 * resolution possible given the application's requested output stream
3300 * sizes. The smallest resolution is defined as being at least as large
3301 * as the largest requested output stream size; the camera pipeline must
3302 * never digitally upsample sensor data when the crop region covers the
3303 * whole sensor. In general, this means that if only small output stream
3304 * resolutions are configured, the sensor can provide a higher frame
3305 * rate.</li>
3306 * <li>Since any request may use any or all the currently configured
3307 * output streams, the sensor and ISP must be configured to support
3308 * scaling a single capture to all the streams at the same time. This
3309 * means the camera pipeline must be ready to produce the largest
3310 * requested output size without any delay. Therefore, the overall
3311 * frame rate of a given configured stream set is governed only by the
3312 * largest requested stream resolution.</li>
3313 * <li>Using more than one output stream in a request does not affect the
3314 * frame duration.</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08003315 * <li>Certain format-streams may need to do additional background processing
3316 * before data is consumed/produced by that stream. These processors
3317 * can run concurrently to the rest of the camera pipeline, but
3318 * cannot process more than 1 capture at a time.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003319 * </ul>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003320 * <p>The necessary information for the application, given the model above, is provided via
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003321 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }.
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003322 * These are used to determine the maximum frame rate / minimum frame duration that is
3323 * possible for a given stream configuration.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003324 * <p>Specifically, the application can use the following rules to
Igor Murashkina23ffb52014-02-07 18:52:34 -08003325 * determine the minimum frame duration it can request from the camera
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003326 * device:</p>
3327 * <ol>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003328 * <li>Let the set of currently configured input/output streams be called <code>S</code>.</li>
3329 * <li>Find the minimum frame durations for each stream in <code>S</code>, by looking it up in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }
3330 * (with its respective size/format). Let this set of frame durations be called <code>F</code>.</li>
3331 * <li>For any given request <code>R</code>, the minimum frame duration allowed for <code>R</code> is the maximum
3332 * out of all values in <code>F</code>. Let the streams used in <code>R</code> be called <code>S_r</code>.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003333 * </ol>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003334 * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003335 * using its respective size/format), then the frame duration in <code>F</code> determines the steady
3336 * state frame rate that the application will get if it uses <code>R</code> as a repeating request. Let
3337 * this special kind of request be called <code>Rsimple</code>.</p>
3338 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved by a single capture of a
3339 * new request <code>Rstall</code> (which has at least one in-use stream with a non-0 stall time) and if
3340 * <code>Rstall</code> has the same minimum frame duration this will not cause a frame rate loss if all
3341 * buffers from the previous <code>Rstall</code> have already been delivered.</p>
3342 * <p>For more details about stalling, see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003343 * <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
3344 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3345 * <p><b>Units</b>: Nanoseconds</p>
3346 * <p><b>Range of valid values:</b><br>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003347 * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}, {@link android.hardware.camera2.params.StreamConfigurationMap }.
3348 * The duration is capped to <code>max(duration, exposureTime + overhead)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003349 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3350 * <p><b>Full capability</b> -
3351 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3352 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003353 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003354 * @see CaptureRequest#CONTROL_AE_MODE
3355 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003356 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003357 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003358 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003359 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003360 public static final Key<Long> SENSOR_FRAME_DURATION =
3361 new Key<Long>("android.sensor.frameDuration", long.class);
3362
3363 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003364 * <p>The amount of gain applied to sensor data
3365 * before processing.</p>
3366 * <p>The sensitivity is the standard ISO sensitivity value,
3367 * as defined in ISO 12232:2006.</p>
3368 * <p>The sensitivity must be within {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}, and
3369 * if if it less than {@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}, the camera device
3370 * is guaranteed to use only analog amplification for applying the gain.</p>
3371 * <p>If the camera device cannot apply the exact sensitivity
3372 * requested, it will reduce the gain to the nearest supported
3373 * value. The final sensitivity used will be available in the
3374 * output capture result.</p>
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08003375 * <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
3376 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003377 * <p><b>Units</b>: ISO arithmetic units</p>
3378 * <p><b>Range of valid values:</b><br>
3379 * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003380 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3381 * <p><b>Full capability</b> -
3382 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3383 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003384 *
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08003385 * @see CaptureRequest#CONTROL_AE_MODE
3386 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003387 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003388 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
3389 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003390 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003391 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003392 public static final Key<Integer> SENSOR_SENSITIVITY =
3393 new Key<Integer>("android.sensor.sensitivity", int.class);
3394
3395 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003396 * <p>Time at start of exposure of first
Zhijun He0bda31a2014-06-13 14:38:39 -07003397 * row of the image sensor active array, in nanoseconds.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003398 * <p>The timestamps are also included in all image
3399 * buffers produced for the same capture, and will be identical
Zhijun He45fa43a12014-06-13 18:29:37 -07003400 * on all the outputs.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003401 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> UNKNOWN,
Zhijun He45fa43a12014-06-13 18:29:37 -07003402 * the timestamps measure time since an unspecified starting point,
3403 * and are monotonically increasing. They can be compared with the
3404 * timestamps for other captures from the same camera device, but are
3405 * not guaranteed to be comparable to any other time source.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003406 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME, the
3407 * timestamps measure time in the same timebase as {@link android.os.SystemClock#elapsedRealtimeNanos }, and they can
3408 * be compared to other timestamps from other subsystems that
3409 * are using that base.</p>
Chien-Yu Chen6216e4e2015-05-29 11:49:54 -07003410 * <p>For reprocessing, the timestamp will match the start of exposure of
3411 * the input image, i.e. {@link CaptureResult#SENSOR_TIMESTAMP the
3412 * timestamp} in the TotalCaptureResult that was used to create the
3413 * reprocess capture request.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003414 * <p><b>Units</b>: Nanoseconds</p>
3415 * <p><b>Range of valid values:</b><br>
3416 * &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003417 * <p>This key is available on all devices.</p>
Zhijun He45fa43a12014-06-13 18:29:37 -07003418 *
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003419 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003420 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003421 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003422 public static final Key<Long> SENSOR_TIMESTAMP =
3423 new Key<Long>("android.sensor.timestamp", long.class);
3424
3425 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07003426 * <p>The estimated camera neutral color in the native sensor colorspace at
3427 * the time of capture.</p>
3428 * <p>This value gives the neutral color point encoded as an RGB value in the
3429 * native sensor color space. The neutral color point indicates the
3430 * currently estimated white point of the scene illumination. It can be
3431 * used to interpolate between the provided color transforms when
3432 * processing raw sensor data.</p>
3433 * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003434 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3435 * the camera device has RAW capability.</p>
Ruben Brunk20c76f62014-02-07 15:47:10 -08003436 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3437 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003438 @PublicKey
Ruben Brunk20c76f62014-02-07 15:47:10 -08003439 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
3440 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
3441
3442 /**
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003443 * <p>Noise model coefficients for each CFA mosaic channel.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003444 * <p>This key contains two noise model coefficients for each CFA channel
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003445 * corresponding to the sensor amplification (S) and sensor readout
3446 * noise (O). These are given as pairs of coefficients for each channel
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003447 * in the same order as channels listed for the CFA layout key
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003448 * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is
3449 * represented as an array of Pair&lt;Double, Double&gt;, where
3450 * the first member of the Pair at index n is the S coefficient and the
3451 * second member is the O coefficient for the nth color channel in the CFA.</p>
3452 * <p>These coefficients are used in a two parameter noise model to describe
3453 * the amount of noise present in the image for each CFA channel. The
3454 * noise model used here is:</p>
3455 * <p>N(x) = sqrt(Sx + O)</p>
3456 * <p>Where x represents the recorded signal of a CFA channel normalized to
3457 * the range [0, 1], and S and O are the noise model coeffiecients for
3458 * that channel.</p>
3459 * <p>A more detailed description of the noise model can be found in the
3460 * Adobe DNG specification for the NoiseProfile tag.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003461 * <p>For a MONOCHROME camera, there is only one color channel. So the noise model coefficients
3462 * will only contain one S and one O.</p>
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003463 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3464 *
3465 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3466 */
3467 @PublicKey
3468 public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
3469 new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
3470
3471 /**
Ruben Brunk987d9f72014-02-11 18:00:24 -08003472 * <p>The worst-case divergence between Bayer green channels.</p>
3473 * <p>This value is an estimate of the worst case split between the
3474 * Bayer green channels in the red and blue rows in the sensor color
3475 * filter array.</p>
3476 * <p>The green split is calculated as follows:</p>
3477 * <ol>
Ruben Brunke89b1202014-03-24 17:10:35 -07003478 * <li>A 5x5 pixel (or larger) window W within the active sensor array is
3479 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
3480 * mosaic channels (R, Gr, Gb, B). The location and size of the window
3481 * chosen is implementation defined, and should be chosen to provide a
3482 * green split estimate that is both representative of the entire image
3483 * for this camera sensor, and can be calculated quickly.</li>
Ruben Brunk987d9f72014-02-11 18:00:24 -08003484 * <li>The arithmetic mean of the green channels from the red
3485 * rows (mean_Gr) within W is computed.</li>
3486 * <li>The arithmetic mean of the green channels from the blue
3487 * rows (mean_Gb) within W is computed.</li>
3488 * <li>The maximum ratio R of the two means is computed as follows:
3489 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
3490 * </ol>
3491 * <p>The ratio R is the green split divergence reported for this property,
3492 * which represents how much the green channels differ in the mosaic
3493 * pattern. This value is typically used to determine the treatment of
3494 * the green mosaic channels when demosaicing.</p>
3495 * <p>The green split value can be roughly interpreted as follows:</p>
3496 * <ul>
3497 * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
3498 * <li>1.20 &lt;= R &gt;= 1.03 will require some software
3499 * correction to avoid demosaic errors (3-20% divergence).</li>
3500 * <li>R &gt; 1.20 will require strong software correction to produce
3501 * a usuable image (&gt;20% divergence).</li>
3502 * </ul>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003503 * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3504 * the camera device has RAW capability.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003505 * <p><b>Range of valid values:</b><br></p>
3506 * <p>&gt;= 0</p>
Ruben Brunk987d9f72014-02-11 18:00:24 -08003507 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3508 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003509 @PublicKey
Ruben Brunk987d9f72014-02-11 18:00:24 -08003510 public static final Key<Float> SENSOR_GREEN_SPLIT =
3511 new Key<Float>("android.sensor.greenSplit", float.class);
3512
3513 /**
Zhijun He379af012014-05-06 11:54:54 -07003514 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
3515 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
3516 * <p>Each color channel is treated as an unsigned 32-bit integer.
3517 * The camera device then uses the most significant X bits
3518 * that correspond to how many bits are in its Bayer raw sensor
3519 * output.</p>
3520 * <p>For example, a sensor with RAW10 Bayer output would use the
3521 * 10 most significant bits from each color channel.</p>
3522 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3523 *
3524 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3525 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003526 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07003527 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
3528 new Key<int[]>("android.sensor.testPatternData", int[].class);
3529
3530 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08003531 * <p>When enabled, the sensor sends a test pattern instead of
3532 * doing a real exposure from the camera.</p>
3533 * <p>When a test pattern is enabled, all manual sensor controls specified
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003534 * by android.sensor.* will be ignored. All other controls should
Igor Murashkinc127f052014-01-17 18:06:02 -08003535 * work as normal.</p>
3536 * <p>For example, if manual flash is enabled, flash firing should still
3537 * occur (and that the test pattern remain unmodified, since the flash
3538 * would not actually affect it).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003539 * <p>Defaults to OFF.</p>
3540 * <p><b>Possible values:</b>
3541 * <ul>
3542 * <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li>
3543 * <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li>
3544 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li>
3545 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li>
3546 * <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li>
3547 * <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li>
3548 * </ul></p>
3549 * <p><b>Available values for this device:</b><br>
3550 * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08003551 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003552 *
3553 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
Igor Murashkinc127f052014-01-17 18:06:02 -08003554 * @see #SENSOR_TEST_PATTERN_MODE_OFF
3555 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
3556 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
3557 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
3558 * @see #SENSOR_TEST_PATTERN_MODE_PN9
3559 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
3560 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003561 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08003562 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
3563 new Key<Integer>("android.sensor.testPatternMode", int.class);
3564
3565 /**
Zhijun He0bda31a2014-06-13 14:38:39 -07003566 * <p>Duration between the start of first row exposure
3567 * and the start of last row exposure.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003568 * <p>This is the exposure time skew between the first and last
3569 * row exposure start times. The first row and the last row are
3570 * the first and last rows inside of the
3571 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Zhijun He0bda31a2014-06-13 14:38:39 -07003572 * <p>For typical camera sensors that use rolling shutters, this is also equivalent
3573 * to the frame readout time.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003574 * <p><b>Units</b>: Nanoseconds</p>
3575 * <p><b>Range of valid values:</b><br>
3576 * &gt;= 0 and &lt;
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003577 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003578 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3579 * <p><b>Limited capability</b> -
3580 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3581 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He0bda31a2014-06-13 14:38:39 -07003582 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003583 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0bda31a2014-06-13 14:38:39 -07003584 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3585 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003586 @PublicKey
Zhijun He0bda31a2014-06-13 14:38:39 -07003587 public static final Key<Long> SENSOR_ROLLING_SHUTTER_SKEW =
3588 new Key<Long>("android.sensor.rollingShutterSkew", long.class);
3589
3590 /**
Zhijun Hecd950b62015-11-12 17:47:52 -08003591 * <p>A per-frame dynamic black level offset for each of the color filter
3592 * arrangement (CFA) mosaic channels.</p>
3593 * <p>Camera sensor black levels may vary dramatically for different
3594 * capture settings (e.g. {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). The fixed black
3595 * level reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} may be too
3596 * inaccurate to represent the actual value on a per-frame basis. The
3597 * camera device internal pipeline relies on reliable black level values
3598 * to process the raw images appropriately. To get the best image
3599 * quality, the camera device may choose to estimate the per frame black
3600 * level values either based on optically shielded black regions
3601 * ({@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}) or its internal model.</p>
3602 * <p>This key reports the camera device estimated per-frame zero light
3603 * value for each of the CFA mosaic channels in the camera sensor. The
3604 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} may only represent a coarse
3605 * approximation of the actual black level values. This value is the
3606 * black level used in camera device internal image processing pipeline
3607 * and generally more accurate than the fixed black level values.
3608 * However, since they are estimated values by the camera device, they
3609 * may not be as accurate as the black level values calculated from the
3610 * optical black pixels reported by {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}.</p>
3611 * <p>The values are given in the same order as channels listed for the CFA
3612 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
3613 * nth value given corresponds to the black level offset for the nth
3614 * color channel listed in the CFA.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003615 * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values.</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003616 * <p>This key will be available if {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} is available or the
3617 * camera device advertises this key via {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys }.</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08003618 * <p><b>Range of valid values:</b><br>
3619 * &gt;= 0 for each.</p>
3620 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3621 *
3622 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
3623 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3624 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
3625 * @see CaptureRequest#SENSOR_SENSITIVITY
3626 */
3627 @PublicKey
Zhijun He8998ad92015-11-24 14:31:04 -08003628 public static final Key<float[]> SENSOR_DYNAMIC_BLACK_LEVEL =
3629 new Key<float[]>("android.sensor.dynamicBlackLevel", float[].class);
Zhijun Hecd950b62015-11-12 17:47:52 -08003630
3631 /**
3632 * <p>Maximum raw value output by sensor for this frame.</p>
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07003633 * <p>Since the {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} may change for different
Zhijun Hecd950b62015-11-12 17:47:52 -08003634 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}), the white
3635 * level will change accordingly. This key is similar to
3636 * {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}, but specifies the camera device
3637 * estimated white level for each frame.</p>
3638 * <p>This key will be available if {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} is
3639 * available or the camera device advertises this key via
3640 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys }.</p>
3641 * <p><b>Range of valid values:</b><br>
3642 * &gt;= 0</p>
3643 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3644 *
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07003645 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
Zhijun Hecd950b62015-11-12 17:47:52 -08003646 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
3647 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
3648 * @see CaptureRequest#SENSOR_SENSITIVITY
3649 */
3650 @PublicKey
3651 public static final Key<Integer> SENSOR_DYNAMIC_WHITE_LEVEL =
3652 new Key<Integer>("android.sensor.dynamicWhiteLevel", int.class);
3653
3654 /**
Zhijun Heba93fe62014-01-17 16:43:05 -08003655 * <p>Quality of lens shading correction applied
3656 * to the image data.</p>
3657 * <p>When set to OFF mode, no lens shading correction will be applied by the
3658 * camera device, and an identity lens shading map data will be provided
3659 * 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 -07003660 * shading map with size of <code>[ 4, 3 ]</code>,
3661 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity
3662 * map shown below:</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08003663 * <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 -07003664 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3665 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3666 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3667 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3668 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
Zhijun Heba93fe62014-01-17 16:43:05 -08003669 * </code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003670 * <p>When set to other modes, lens shading correction will be applied by the camera
3671 * device. Applications can request lens shading map data by setting
3672 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens
3673 * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map
3674 * data will be the one applied by the camera device for this capture request.</p>
3675 * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
3676 * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
3677 * 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>
3678 * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
3679 * to be converged before using the returned shading map data.</p>
3680 * <p><b>Possible values:</b>
3681 * <ul>
3682 * <li>{@link #SHADING_MODE_OFF OFF}</li>
3683 * <li>{@link #SHADING_MODE_FAST FAST}</li>
3684 * <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
3685 * </ul></p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003686 * <p><b>Available values for this device:</b><br>
3687 * {@link CameraCharacteristics#SHADING_AVAILABLE_MODES android.shading.availableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003688 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3689 * <p><b>Full capability</b> -
3690 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3691 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08003692 *
Zhijun Hefa7c7552014-05-22 16:36:02 -07003693 * @see CaptureRequest#CONTROL_AE_MODE
3694 * @see CaptureRequest#CONTROL_AWB_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003695 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003696 * @see CameraCharacteristics#SHADING_AVAILABLE_MODES
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003697 * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
Zhijun Heba93fe62014-01-17 16:43:05 -08003698 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3699 * @see #SHADING_MODE_OFF
3700 * @see #SHADING_MODE_FAST
3701 * @see #SHADING_MODE_HIGH_QUALITY
Zhijun Heba93fe62014-01-17 16:43:05 -08003702 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003703 @PublicKey
Zhijun Heba93fe62014-01-17 16:43:05 -08003704 public static final Key<Integer> SHADING_MODE =
3705 new Key<Integer>("android.shading.mode", int.class);
3706
3707 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003708 * <p>Operating mode for the face detector
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003709 * unit.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003710 * <p>Whether face detection is enabled, and whether it
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003711 * should output just the basic fields or the full set of
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003712 * fields.</p>
3713 * <p><b>Possible values:</b>
3714 * <ul>
3715 * <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li>
3716 * <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li>
3717 * <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li>
3718 * </ul></p>
3719 * <p><b>Available values for this device:</b><br>
3720 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p>
3721 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003722 *
3723 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003724 * @see #STATISTICS_FACE_DETECT_MODE_OFF
3725 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
3726 * @see #STATISTICS_FACE_DETECT_MODE_FULL
3727 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003728 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003729 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
3730 new Key<Integer>("android.statistics.faceDetectMode", int.class);
3731
3732 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003733 * <p>List of unique IDs for detected faces.</p>
3734 * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
3735 * to the camera device. A face that leaves the field of view and later returns may be
3736 * assigned a new ID.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003737 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
3738 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003739 *
3740 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003741 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003742 */
3743 public static final Key<int[]> STATISTICS_FACE_IDS =
3744 new Key<int[]>("android.statistics.faceIds", int[].class);
3745
3746 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003747 * <p>List of landmarks for detected
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003748 * faces.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003749 * <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
3750 * system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being
3751 * the top-left pixel of the active array.</p>
3752 * <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
3753 * system depends on the mode being set.
3754 * When the distortion correction mode is OFF, the coordinate system follows
3755 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
3756 * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
3757 * When the distortion correction mode is not OFF, the coordinate system follows
3758 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003759 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003760 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
3761 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003762 *
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003763 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003764 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003765 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003766 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003767 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003768 */
3769 public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
3770 new Key<int[]>("android.statistics.faceLandmarks", int[].class);
3771
3772 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003773 * <p>List of the bounding rectangles for detected
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003774 * faces.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003775 * <p>For devices not supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
3776 * system always follows that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being
3777 * the top-left pixel of the active array.</p>
3778 * <p>For devices supporting {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the coordinate
3779 * system depends on the mode being set.
3780 * When the distortion correction mode is OFF, the coordinate system follows
3781 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, with
3782 * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
3783 * When the distortion correction mode is not OFF, the coordinate system follows
3784 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003785 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003786 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF
3787 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003788 *
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003789 * @see CaptureRequest#DISTORTION_CORRECTION_MODE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003790 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07003791 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003792 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003793 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003794 */
3795 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
3796 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
3797
3798 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003799 * <p>List of the face confidence scores for
3800 * detected faces</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003801 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003802 * <p><b>Range of valid values:</b><br>
3803 * 1-100</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003804 * <p>This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003805 *
3806 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003807 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003808 */
3809 public static final Key<byte[]> STATISTICS_FACE_SCORES =
3810 new Key<byte[]>("android.statistics.faceScores", byte[].class);
3811
3812 /**
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003813 * <p>List of the faces detected through camera face detection
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003814 * in this capture.</p>
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003815 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} <code>!=</code> OFF.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003816 * <p>This key is available on all devices.</p>
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003817 *
3818 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3819 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003820 @PublicKey
3821 @SyntheticKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003822 public static final Key<android.hardware.camera2.params.Face[]> STATISTICS_FACES =
3823 new Key<android.hardware.camera2.params.Face[]>("android.statistics.faces", android.hardware.camera2.params.Face[].class);
3824
3825 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003826 * <p>The shading map is a low-resolution floating-point map
3827 * that lists the coefficients used to correct for vignetting, for each
3828 * Bayer color channel.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003829 * <p>The map provided here is the same map that is used by the camera device to
3830 * correct both color shading and vignetting for output non-RAW images.</p>
3831 * <p>When there is no lens shading correction applied to RAW
3832 * output images ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} <code>==</code>
3833 * false), this map is the complete lens shading correction
3834 * map; when there is some lens shading correction applied to
3835 * the RAW output image ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}<code>==</code> true), this map reports the remaining lens shading
3836 * correction map that needs to be applied to get shading
3837 * corrected images that match the camera device's output for
3838 * non-RAW formats.</p>
3839 * <p>For a complete shading correction map, the least shaded
3840 * section of the image will have a gain factor of 1; all
3841 * other sections will have gains above 1.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003842 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003843 * will take into account the colorCorrection settings.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003844 * <p>The shading map is for the entire active pixel array, and is not
3845 * affected by the crop region specified in the request. Each shading map
3846 * entry is the value of the shading compensation map over a specific
3847 * pixel on the sensor. Specifically, with a (N x M) resolution shading
3848 * map, and an active pixel array size (W x H), shading map entry
3849 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
3850 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
3851 * The map is assumed to be bilinearly interpolated between the sample points.</p>
3852 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
3853 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
Ruben Brunk57493682014-05-27 18:58:08 -07003854 * The shading map is stored in a fully interleaved format.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003855 * <p>The shading map will generally have on the order of 30-40 rows and columns,
3856 * and will be smaller than 64x64.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003857 * <p>As an example, given a very small map defined as:</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003858 * <pre><code>width,height = [ 4, 3 ]
3859 * values =
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003860 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003861 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
3862 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
3863 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
3864 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
3865 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003866 * </code></pre>
3867 * <p>The low-resolution scaling map images for each channel are
3868 * (displayed using nearest-neighbor interpolation):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003869 * <p><img alt="Red lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
3870 * <img alt="Green (even rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
3871 * <img alt="Green (odd rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
3872 * <img alt="Blue lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003873 * <p>As a visualization only, inverting the full-color map to recover an
3874 * image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003875 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003876 * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
3877 * shading map for such a camera is defined as:</p>
3878 * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
3879 * android.statistics.lensShadingMap =
3880 * [ 1.3, 1.3, 1.3, 1.3, 1.2, 1.2, 1.2, 1.2,
3881 * 1.1, 1.1, 1.1, 1.1, 1.3, 1.3, 1.3, 1.3,
3882 * 1.2, 1.2, 1.2, 1.2, 1.1, 1.1, 1.1, 1.1,
3883 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.2, 1.2, 1.2,
3884 * 1.3, 1.3, 1.3, 1.3, 1.2, 1.2, 1.2, 1.2,
3885 * 1.2, 1.2, 1.2, 1.2, 1.3, 1.3, 1.3, 1.3 ]
3886 * </code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003887 * <p><b>Range of valid values:</b><br>
3888 * Each gain factor is &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003889 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3890 * <p><b>Full capability</b> -
3891 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3892 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003893 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08003894 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003895 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003896 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
Ruben Brunk57493682014-05-27 18:58:08 -07003897 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003898 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07003899 public static final Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP =
3900 new Key<android.hardware.camera2.params.LensShadingMap>("android.statistics.lensShadingCorrectionMap", android.hardware.camera2.params.LensShadingMap.class);
3901
3902 /**
3903 * <p>The shading map is a low-resolution floating-point map
Zhijun He43210fe2016-04-12 23:15:23 -07003904 * that lists the coefficients used to correct for vignetting and color shading,
3905 * for each Bayer color channel of RAW image data.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003906 * <p>The map provided here is the same map that is used by the camera device to
3907 * correct both color shading and vignetting for output non-RAW images.</p>
3908 * <p>When there is no lens shading correction applied to RAW
3909 * output images ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} <code>==</code>
3910 * false), this map is the complete lens shading correction
3911 * map; when there is some lens shading correction applied to
3912 * the RAW output image ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}<code>==</code> true), this map reports the remaining lens shading
3913 * correction map that needs to be applied to get shading
3914 * corrected images that match the camera device's output for
3915 * non-RAW formats.</p>
3916 * <p>For a complete shading correction map, the least shaded
3917 * section of the image will have a gain factor of 1; all
3918 * other sections will have gains above 1.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003919 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003920 * will take into account the colorCorrection settings.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003921 * <p>The shading map is for the entire active pixel array, and is not
3922 * affected by the crop region specified in the request. Each shading map
3923 * entry is the value of the shading compensation map over a specific
3924 * pixel on the sensor. Specifically, with a (N x M) resolution shading
3925 * map, and an active pixel array size (W x H), shading map entry
3926 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
3927 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
3928 * The map is assumed to be bilinearly interpolated between the sample points.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003929 * <p>For a Bayer camera, the channel order is [R, Geven, Godd, B], where Geven is
3930 * the green channel for the even rows of a Bayer pattern, and Godd is the odd rows.
Ruben Brunk57493682014-05-27 18:58:08 -07003931 * The shading map is stored in a fully interleaved format, and its size
3932 * is provided in the camera static metadata by android.lens.info.shadingMapSize.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003933 * <p>The shading map will generally have on the order of 30-40 rows and columns,
3934 * and will be smaller than 64x64.</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003935 * <p>As an example, given a very small map for a Bayer camera defined as:</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003936 * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
3937 * android.statistics.lensShadingMap =
3938 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003939 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
3940 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
3941 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
3942 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
3943 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Ruben Brunk57493682014-05-27 18:58:08 -07003944 * </code></pre>
3945 * <p>The low-resolution scaling map images for each channel are
3946 * (displayed using nearest-neighbor interpolation):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003947 * <p><img alt="Red lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
3948 * <img alt="Green (even rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
3949 * <img alt="Green (odd rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
3950 * <img alt="Blue lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
Ruben Brunk57493682014-05-27 18:58:08 -07003951 * <p>As a visualization only, inverting the full-color map to recover an
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003952 * image of a gray wall (using bicubic interpolation for visual quality)
3953 * as captured by the sensor gives:</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003954 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07003955 * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
3956 * shading map for such a camera is defined as:</p>
3957 * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
3958 * android.statistics.lensShadingMap =
3959 * [ 1.3, 1.3, 1.3, 1.3, 1.2, 1.2, 1.2, 1.2,
3960 * 1.1, 1.1, 1.1, 1.1, 1.3, 1.3, 1.3, 1.3,
3961 * 1.2, 1.2, 1.2, 1.2, 1.1, 1.1, 1.1, 1.1,
3962 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.2, 1.2, 1.2,
3963 * 1.3, 1.3, 1.3, 1.3, 1.2, 1.2, 1.2, 1.2,
3964 * 1.2, 1.2, 1.2, 1.2, 1.3, 1.3, 1.3, 1.3 ]
3965 * </code></pre>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003966 * <p>Note that the RAW image data might be subject to lens shading
3967 * correction not reported on this map. Query
3968 * {@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} to see if RAW image data has subject
3969 * to lens shading correction. If {@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}
3970 * is TRUE, the RAW image data is subject to partial or full lens shading
3971 * correction. In the case full lens shading correction is applied to RAW
3972 * images, the gain factor map reported in this key will contain all 1.0 gains.
3973 * In other words, the map reported in this key is the remaining lens shading
3974 * that needs to be applied on the RAW image to get images without lens shading
3975 * artifacts. See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image
3976 * formats.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003977 * <p><b>Range of valid values:</b><br>
3978 * Each gain factor is &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003979 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3980 * <p><b>Full capability</b> -
3981 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3982 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003983 *
3984 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003985 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003986 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
3987 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
Ruben Brunk57493682014-05-27 18:58:08 -07003988 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003989 */
3990 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
3991 new Key<float[]>("android.statistics.lensShadingMap", float[].class);
3992
3993 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003994 * <p>The best-fit color channel gains calculated
Zhijun Hecc28a412014-02-24 15:11:23 -08003995 * by the camera device's statistics units for the current output frame.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003996 * <p>This may be different than the gains used for this frame,
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003997 * since statistics processing on data from a new frame
3998 * typically completes after the transform has already been
Igor Murashkinace5bf02013-12-10 17:36:40 -08003999 * applied to that frame.</p>
4000 * <p>The 4 channel gains are defined in Bayer domain,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004001 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07004002 * <p>This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkinace5bf02013-12-10 17:36:40 -08004003 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08004004 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004005 *
4006 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Igor Murashkin9c595172014-05-12 13:56:20 -07004007 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07004008 * <p>Never fully implemented or specified; do not use</p>
4009
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08004010 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004011 */
Igor Murashkin9c595172014-05-12 13:56:20 -07004012 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004013 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
4014 new Key<float[]>("android.statistics.predictedColorGains", float[].class);
4015
4016 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004017 * <p>The best-fit color transform matrix estimate
Zhijun Hecc28a412014-02-24 15:11:23 -08004018 * calculated by the camera device's statistics units for the current
4019 * output frame.</p>
4020 * <p>The camera device will provide the estimate from its
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004021 * statistics unit on the white balance transforms to use
Zhijun Hecc28a412014-02-24 15:11:23 -08004022 * for the next frame. These are the values the camera device believes
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004023 * are the best fit for the current output frame. This may
4024 * be different than the transform used for this frame, since
4025 * statistics processing on data from a new frame typically
4026 * completes after the transform has already been applied to
Igor Murashkinace5bf02013-12-10 17:36:40 -08004027 * that frame.</p>
4028 * <p>These estimates must be provided for all frames, even if
4029 * capture settings and color transforms are set by the application.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07004030 * <p>This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkinace5bf02013-12-10 17:36:40 -08004031 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08004032 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07004033 * @deprecated
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07004034 * <p>Never fully implemented or specified; do not use</p>
4035
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08004036 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004037 */
Igor Murashkin9c595172014-05-12 13:56:20 -07004038 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004039 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
4040 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
4041
4042 /**
Zhijun He208fb6c2014-02-03 13:09:06 -08004043 * <p>The camera device estimated scene illumination lighting
4044 * frequency.</p>
4045 * <p>Many light sources, such as most fluorescent lights, flicker at a rate
4046 * that depends on the local utility power standards. This flicker must be
4047 * accounted for by auto-exposure routines to avoid artifacts in captured images.
4048 * The camera device uses this entry to tell the application what the scene
4049 * illuminant frequency is.</p>
4050 * <p>When manual exposure control is enabled
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07004051 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} ==
4052 * OFF</code>), the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't perform
4053 * antibanding, and the application can ensure it selects
4054 * exposure times that do not cause banding issues by looking
4055 * into this metadata field. See
4056 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} for more details.</p>
4057 * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004058 * <p><b>Possible values:</b>
4059 * <ul>
4060 * <li>{@link #STATISTICS_SCENE_FLICKER_NONE NONE}</li>
4061 * <li>{@link #STATISTICS_SCENE_FLICKER_50HZ 50HZ}</li>
4062 * <li>{@link #STATISTICS_SCENE_FLICKER_60HZ 60HZ}</li>
4063 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004064 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4065 * <p><b>Full capability</b> -
4066 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4067 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He208fb6c2014-02-03 13:09:06 -08004068 *
4069 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
4070 * @see CaptureRequest#CONTROL_AE_MODE
4071 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004072 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004073 * @see #STATISTICS_SCENE_FLICKER_NONE
4074 * @see #STATISTICS_SCENE_FLICKER_50HZ
4075 * @see #STATISTICS_SCENE_FLICKER_60HZ
4076 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004077 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004078 public static final Key<Integer> STATISTICS_SCENE_FLICKER =
4079 new Key<Integer>("android.statistics.sceneFlicker", int.class);
4080
4081 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004082 * <p>Operating mode for hot pixel map generation.</p>
4083 * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
4084 * If set to <code>false</code>, no hot pixel map will be returned.</p>
4085 * <p><b>Range of valid values:</b><br>
4086 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004087 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08004088 *
4089 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
4090 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
4091 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004092 @PublicKey
Ruben Brunk9d454fd2014-03-04 14:11:52 -08004093 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
4094 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
4095
4096 /**
4097 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
4098 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
4099 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
4100 * bottom-right of the pixel array, respectively. The width and
4101 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
4102 * This may include hot pixels that lie outside of the active array
4103 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004104 * <p><b>Range of valid values:</b><br></p>
4105 * <p>n &lt;= number of pixels on the sensor.
4106 * The <code>(x, y)</code> coordinates must be bounded by
4107 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004108 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08004109 *
4110 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
4111 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
4112 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004113 @PublicKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004114 public static final Key<android.graphics.Point[]> STATISTICS_HOT_PIXEL_MAP =
4115 new Key<android.graphics.Point[]>("android.statistics.hotPixelMap", android.graphics.Point[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -08004116
4117 /**
Zhijun He379af012014-05-06 11:54:54 -07004118 * <p>Whether the camera device will output the lens
4119 * shading map in output result metadata.</p>
4120 * <p>When set to ON,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07004121 * android.statistics.lensShadingMap will be provided in
Zhijun He379af012014-05-06 11:54:54 -07004122 * the output result metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004123 * <p>ON is always supported on devices with the RAW capability.</p>
4124 * <p><b>Possible values:</b>
4125 * <ul>
4126 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li>
4127 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li>
4128 * </ul></p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08004129 * <p><b>Available values for this device:</b><br>
4130 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES android.statistics.info.availableLensShadingMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004131 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4132 * <p><b>Full capability</b> -
4133 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4134 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
4135 *
4136 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08004137 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES
Zhijun He379af012014-05-06 11:54:54 -07004138 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
4139 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
4140 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004141 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07004142 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
4143 new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
4144
4145 /**
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004146 * <p>A control for selecting whether optical stabilization (OIS) position
4147 * information is included in output result metadata.</p>
4148 * <p>Since optical image stabilization generally involves motion much faster than the duration
4149 * of individualq image exposure, multiple OIS samples can be included for a single capture
4150 * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
4151 * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
4152 * with the rolling shutter skew to account for lens motion during image exposure in
4153 * post-processing algorithms.</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004154 * <p><b>Possible values:</b>
4155 * <ul>
4156 * <li>{@link #STATISTICS_OIS_DATA_MODE_OFF OFF}</li>
4157 * <li>{@link #STATISTICS_OIS_DATA_MODE_ON ON}</li>
4158 * </ul></p>
4159 * <p><b>Available values for this device:</b><br>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07004160 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES android.statistics.info.availableOisDataModes}</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004161 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala915f5042018-03-13 19:08:01 -07004162 *
4163 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004164 * @see #STATISTICS_OIS_DATA_MODE_OFF
4165 * @see #STATISTICS_OIS_DATA_MODE_ON
4166 */
4167 @PublicKey
4168 public static final Key<Integer> STATISTICS_OIS_DATA_MODE =
4169 new Key<Integer>("android.statistics.oisDataMode", int.class);
4170
4171 /**
4172 * <p>An array of timestamps of OIS samples, in nanoseconds.</p>
4173 * <p>The array contains the timestamps of OIS samples. The timestamps are in the same
4174 * timebase as and comparable to {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp}.</p>
4175 * <p><b>Units</b>: nanoseconds</p>
4176 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4177 *
4178 * @see CaptureResult#SENSOR_TIMESTAMP
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004179 * @hide
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004180 */
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004181 public static final Key<long[]> STATISTICS_OIS_TIMESTAMPS =
4182 new Key<long[]>("android.statistics.oisTimestamps", long[].class);
4183
4184 /**
4185 * <p>An array of shifts of OIS samples, in x direction.</p>
4186 * <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004187 * A positive value is a shift from left to right in the pre-correction active array
4188 * coordinate system. For example, if the optical center is (1000, 500) in pre-correction
4189 * active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004190 * <p>The number of shifts must match the number of timestamps in
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004191 * android.statistics.oisTimestamps.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004192 * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
4193 * supporting devices). They are always reported in pre-correction active array coordinates,
4194 * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
4195 * is needed.</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004196 * <p><b>Units</b>: Pixels in active array.</p>
4197 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004198 * @hide
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004199 */
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004200 public static final Key<float[]> STATISTICS_OIS_X_SHIFTS =
4201 new Key<float[]>("android.statistics.oisXShifts", float[].class);
4202
4203 /**
4204 * <p>An array of shifts of OIS samples, in y direction.</p>
4205 * <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004206 * A positive value is a shift from top to bottom in pre-correction active array coordinate
4207 * system. For example, if the optical center is (1000, 500) in active array coordinates, a
4208 * shift of (0, 5) puts the new optical center at (1000, 505).</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004209 * <p>The number of shifts must match the number of timestamps in
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004210 * android.statistics.oisTimestamps.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004211 * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
4212 * supporting devices). They are always reported in pre-correction active array coordinates,
4213 * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
4214 * is needed.</p>
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004215 * <p><b>Units</b>: Pixels in active array.</p>
4216 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004217 * @hide
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004218 */
Chien-Yu Chenc9cf5b92018-01-18 12:24:40 -08004219 public static final Key<float[]> STATISTICS_OIS_Y_SHIFTS =
4220 new Key<float[]>("android.statistics.oisYShifts", float[].class);
4221
4222 /**
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004223 * <p>An array of optical stabilization (OIS) position samples.</p>
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004224 * <p>Each OIS sample contains the timestamp and the amount of shifts in x and y direction,
4225 * in pixels, of the OIS sample.</p>
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004226 * <p>A positive value for a shift in x direction is a shift from left to right in the
4227 * pre-correction active array coordinate system. For example, if the optical center is
4228 * (1000, 500) in pre-correction active array coordinates, a shift of (3, 0) puts the new
4229 * optical center at (1003, 500).</p>
4230 * <p>A positive value for a shift in y direction is a shift from top to bottom in
4231 * pre-correction active array coordinate system. For example, if the optical center is
4232 * (1000, 500) in active array coordinates, a shift of (0, 5) puts the new optical center at
4233 * (1000, 505).</p>
4234 * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
4235 * supporting devices). They are always reported in pre-correction active array coordinates,
4236 * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
4237 * is needed.</p>
Chien-Yu Chenc804d1c2018-02-15 12:44:19 -08004238 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4239 */
4240 @PublicKey
4241 @SyntheticKey
4242 public static final Key<android.hardware.camera2.params.OisSample[]> STATISTICS_OIS_SAMPLES =
4243 new Key<android.hardware.camera2.params.OisSample[]>("android.statistics.oisSamples", android.hardware.camera2.params.OisSample[].class);
4244
4245 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004246 * <p>Tonemapping / contrast / gamma curve for the blue
Igor Murashkine0060932014-01-17 17:24:11 -08004247 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4248 * CONTRAST_CURVE.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004249 * <p>See android.tonemap.curveRed for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004250 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4251 * <p><b>Full capability</b> -
4252 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4253 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004254 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004255 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He5f2a47f2014-01-16 15:44:41 -08004256 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004257 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004258 */
Zhijun He3ffd7052013-08-19 15:45:08 -07004259 public static final Key<float[]> TONEMAP_CURVE_BLUE =
4260 new Key<float[]>("android.tonemap.curveBlue", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004261
4262 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004263 * <p>Tonemapping / contrast / gamma curve for the green
Igor Murashkine0060932014-01-17 17:24:11 -08004264 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4265 * CONTRAST_CURVE.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004266 * <p>See android.tonemap.curveRed for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004267 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4268 * <p><b>Full capability</b> -
4269 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4270 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004271 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004272 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He5f2a47f2014-01-16 15:44:41 -08004273 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004274 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004275 */
Zhijun He3ffd7052013-08-19 15:45:08 -07004276 public static final Key<float[]> TONEMAP_CURVE_GREEN =
4277 new Key<float[]>("android.tonemap.curveGreen", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004278
4279 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004280 * <p>Tonemapping / contrast / gamma curve for the red
Igor Murashkine0060932014-01-17 17:24:11 -08004281 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4282 * CONTRAST_CURVE.</p>
4283 * <p>Each channel's curve is defined by an array of control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004284 * <pre><code>android.tonemap.curveRed =
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004285 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He870922b2014-02-15 21:47:51 -08004286 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004287 * <p>These are sorted in order of increasing <code>Pin</code>; it is
4288 * required that input values 0.0 and 1.0 are included in the list to
Igor Murashkine0060932014-01-17 17:24:11 -08004289 * define a complete mapping. For input values between control points,
4290 * the camera device must linearly interpolate between the control
4291 * points.</p>
4292 * <p>Each curve can have an independent number of points, and the number
4293 * of points can be less than max (that is, the request doesn't have to
4294 * always provide a curve with number of points equivalent to
4295 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07004296 * <p>For devices with MONOCHROME capability, all three channels must have the same set of
4297 * control points.</p>
Igor Murashkine0060932014-01-17 17:24:11 -08004298 * <p>A few examples, and their corresponding graphical mappings; these
4299 * only specify the red channel and the precision is limited to 4
4300 * digits, for conciseness.</p>
4301 * <p>Linear mapping:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004302 * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ]
Igor Murashkine0060932014-01-17 17:24:11 -08004303 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004304 * <p><img alt="Linear mapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
Igor Murashkine0060932014-01-17 17:24:11 -08004305 * <p>Invert mapping:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004306 * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ]
Igor Murashkine0060932014-01-17 17:24:11 -08004307 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004308 * <p><img alt="Inverting mapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
Igor Murashkine0060932014-01-17 17:24:11 -08004309 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004310 * <pre><code>android.tonemap.curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004311 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
4312 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
4313 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
4314 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
Igor Murashkine0060932014-01-17 17:24:11 -08004315 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004316 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
Igor Murashkine0060932014-01-17 17:24:11 -08004317 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004318 * <pre><code>android.tonemap.curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004319 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
4320 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
4321 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
4322 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
Igor Murashkine0060932014-01-17 17:24:11 -08004323 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004324 * <p><img alt="sRGB tonemapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004325 * <p><b>Range of valid values:</b><br>
4326 * 0-1 on both input and output coordinates, normalized
4327 * as a floating-point value such that 0 == black and 1 == white.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004328 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4329 * <p><b>Full capability</b> -
4330 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4331 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004332 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004333 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkine0060932014-01-17 17:24:11 -08004334 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004335 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004336 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004337 */
4338 public static final Key<float[]> TONEMAP_CURVE_RED =
4339 new Key<float[]>("android.tonemap.curveRed", float[].class);
4340
4341 /**
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004342 * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}
4343 * is CONTRAST_CURVE.</p>
4344 * <p>The tonemapCurve consist of three curves for each of red, green, and blue
4345 * channels respectively. The following example uses the red channel as an
4346 * example. The same logic applies to green and blue channel.
4347 * Each channel's curve is defined by an array of control points:</p>
4348 * <pre><code>curveRed =
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004349 * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004350 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
4351 * <p>These are sorted in order of increasing <code>Pin</code>; it is always
4352 * guaranteed that input values 0.0 and 1.0 are included in the list to
4353 * define a complete mapping. For input values between control points,
4354 * the camera device must linearly interpolate between the control
4355 * points.</p>
4356 * <p>Each curve can have an independent number of points, and the number
4357 * of points can be less than max (that is, the request doesn't have to
4358 * always provide a curve with number of points equivalent to
4359 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
Shuzhen Wanga8d36032018-10-15 12:01:53 -07004360 * <p>For devices with MONOCHROME capability, all three channels must have the same set of
4361 * control points.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004362 * <p>A few examples, and their corresponding graphical mappings; these
4363 * only specify the red channel and the precision is limited to 4
4364 * digits, for conciseness.</p>
4365 * <p>Linear mapping:</p>
4366 * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ]
4367 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004368 * <p><img alt="Linear mapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004369 * <p>Invert mapping:</p>
4370 * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ]
4371 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004372 * <p><img alt="Inverting mapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004373 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
4374 * <pre><code>curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004375 * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
4376 * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
4377 * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
4378 * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004379 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004380 * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004381 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
4382 * <pre><code>curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004383 * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
4384 * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
4385 * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
4386 * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004387 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004388 * <p><img alt="sRGB tonemapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004389 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4390 * <p><b>Full capability</b> -
4391 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4392 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004393 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004394 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004395 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
4396 * @see CaptureRequest#TONEMAP_MODE
4397 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004398 @PublicKey
4399 @SyntheticKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004400 public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE =
4401 new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class);
4402
4403 /**
Igor Murashkine0060932014-01-17 17:24:11 -08004404 * <p>High-level global contrast/gamma/tonemapping control.</p>
4405 * <p>When switching to an application-defined contrast curve by setting
4406 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
4407 * per-channel with a set of <code>(in, out)</code> points that specify the
4408 * mapping from input high-bit-depth pixel value to the output
4409 * low-bit-depth value. Since the actual pixel ranges of both input
4410 * and output may change depending on the camera pipeline, the values
4411 * are specified by normalized floating-point numbers.</p>
4412 * <p>More-complex color mapping operations such as 3D color look-up
4413 * tables, selective chroma enhancement, or other non-linear color
4414 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4415 * CONTRAST_CURVE.</p>
4416 * <p>When using either FAST or HIGH_QUALITY, the camera device will
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004417 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.
Igor Murashkine0060932014-01-17 17:24:11 -08004418 * These values are always available, and as close as possible to the
4419 * actually used nonlinear/nonglobal transforms.</p>
Zhijun Hefa7c7552014-05-22 16:36:02 -07004420 * <p>If a request is sent with CONTRAST_CURVE with the camera device's
Igor Murashkine0060932014-01-17 17:24:11 -08004421 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
4422 * roughly the same.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004423 * <p><b>Possible values:</b>
4424 * <ul>
4425 * <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li>
4426 * <li>{@link #TONEMAP_MODE_FAST FAST}</li>
4427 * <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004428 * <li>{@link #TONEMAP_MODE_GAMMA_VALUE GAMMA_VALUE}</li>
4429 * <li>{@link #TONEMAP_MODE_PRESET_CURVE PRESET_CURVE}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004430 * </ul></p>
4431 * <p><b>Available values for this device:</b><br>
4432 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004433 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4434 * <p><b>Full capability</b> -
4435 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4436 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08004437 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004438 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08004439 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004440 * @see CaptureRequest#TONEMAP_CURVE
Igor Murashkine0060932014-01-17 17:24:11 -08004441 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004442 * @see #TONEMAP_MODE_CONTRAST_CURVE
4443 * @see #TONEMAP_MODE_FAST
4444 * @see #TONEMAP_MODE_HIGH_QUALITY
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004445 * @see #TONEMAP_MODE_GAMMA_VALUE
4446 * @see #TONEMAP_MODE_PRESET_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004447 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004448 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004449 public static final Key<Integer> TONEMAP_MODE =
4450 new Key<Integer>("android.tonemap.mode", int.class);
4451
4452 /**
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004453 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4454 * GAMMA_VALUE</p>
4455 * <p>The tonemap curve will be defined the following formula:
4456 * * OUT = pow(IN, 1.0 / gamma)
4457 * where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
4458 * pow is the power function and gamma is the gamma value specified by this
4459 * key.</p>
4460 * <p>The same curve will be applied to all color channels. The camera device
4461 * may clip the input gamma value to its supported range. The actual applied
4462 * value will be returned in capture result.</p>
4463 * <p>The valid range of gamma value varies on different devices, but values
4464 * within [1.0, 5.0] are guaranteed not to be clipped.</p>
4465 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4466 *
4467 * @see CaptureRequest#TONEMAP_MODE
4468 */
4469 @PublicKey
4470 public static final Key<Float> TONEMAP_GAMMA =
4471 new Key<Float>("android.tonemap.gamma", float.class);
4472
4473 /**
4474 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4475 * PRESET_CURVE</p>
4476 * <p>The tonemap curve will be defined by specified standard.</p>
4477 * <p>sRGB (approximated by 16 control points):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004478 * <p><img alt="sRGB tonemapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004479 * <p>Rec. 709 (approximated by 16 control points):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004480 * <p><img alt="Rec. 709 tonemapping curve" src="/reference/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004481 * <p>Note that above figures show a 16 control points approximation of preset
4482 * curves. Camera devices may apply a different approximation to the curve.</p>
4483 * <p><b>Possible values:</b>
4484 * <ul>
4485 * <li>{@link #TONEMAP_PRESET_CURVE_SRGB SRGB}</li>
4486 * <li>{@link #TONEMAP_PRESET_CURVE_REC709 REC709}</li>
4487 * </ul></p>
4488 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4489 *
4490 * @see CaptureRequest#TONEMAP_MODE
4491 * @see #TONEMAP_PRESET_CURVE_SRGB
4492 * @see #TONEMAP_PRESET_CURVE_REC709
4493 */
4494 @PublicKey
4495 public static final Key<Integer> TONEMAP_PRESET_CURVE =
4496 new Key<Integer>("android.tonemap.presetCurve", int.class);
4497
4498 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004499 * <p>This LED is nominally used to indicate to the user
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004500 * that the camera is powered on and may be streaming images back to the
4501 * Application Processor. In certain rare circumstances, the OS may
4502 * disable this when video is processed locally and not transmitted to
Igor Murashkinace5bf02013-12-10 17:36:40 -08004503 * any untrusted applications.</p>
4504 * <p>In particular, the LED <em>must</em> always be on when the data could be
4505 * transmitted off the device. The LED <em>should</em> always be on whenever
4506 * data is stored locally on the device.</p>
4507 * <p>The LED <em>may</em> be off if a trusted application is using the data that
4508 * doesn't violate the above rules.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004509 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004510 * @hide
4511 */
4512 public static final Key<Boolean> LED_TRANSMIT =
4513 new Key<Boolean>("android.led.transmit", boolean.class);
4514
4515 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004516 * <p>Whether black-level compensation is locked
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08004517 * to its current values, or is free to vary.</p>
4518 * <p>Whether the black level offset was locked for this frame. Should be
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004519 * 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 -08004520 * a change in other capture settings forced the camera device to
4521 * perform a black level reset.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004522 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4523 * <p><b>Full capability</b> -
4524 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4525 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004526 *
4527 * @see CaptureRequest#BLACK_LEVEL_LOCK
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004528 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004529 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004530 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004531 public static final Key<Boolean> BLACK_LEVEL_LOCK =
4532 new Key<Boolean>("android.blackLevel.lock", boolean.class);
4533
Igor Murashkin3865a842014-01-17 18:18:39 -08004534 /**
4535 * <p>The frame number corresponding to the last request
4536 * with which the output result (metadata + buffers) has been fully
4537 * synchronized.</p>
4538 * <p>When a request is submitted to the camera device, there is usually a
4539 * delay of several frames before the controls get applied. A camera
4540 * device may either choose to account for this delay by implementing a
4541 * pipeline and carefully submit well-timed atomic control updates, or
4542 * it may start streaming control changes that span over several frame
4543 * boundaries.</p>
4544 * <p>In the latter case, whenever a request's settings change relative to
4545 * the previous submitted request, the full set of changes may take
4546 * multiple frame durations to fully take effect. Some settings may
4547 * take effect sooner (in less frame durations) than others.</p>
4548 * <p>While a set of control changes are being propagated, this value
4549 * will be CONVERGING.</p>
4550 * <p>Once it is fully known that a set of control changes have been
4551 * finished propagating, and the resulting updated control settings
4552 * have been read back by the camera device, this value will be set
4553 * to a non-negative frame number (corresponding to the request to
4554 * which the results have synchronized to).</p>
4555 * <p>Older camera device implementations may not have a way to detect
4556 * when all camera controls have been applied, and will always set this
4557 * value to UNKNOWN.</p>
4558 * <p>FULL capability devices will always have this value set to the
4559 * frame number of the request corresponding to this result.</p>
4560 * <p><em>Further details</em>:</p>
4561 * <ul>
4562 * <li>Whenever a request differs from the last request, any future
4563 * results not yet returned may have this value set to CONVERGING (this
4564 * could include any in-progress captures not yet returned by the camera
4565 * device, for more details see pipeline considerations below).</li>
4566 * <li>Submitting a series of multiple requests that differ from the
4567 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
4568 * moves the new synchronization frame to the last non-repeating
4569 * request (using the smallest frame number from the contiguous list of
4570 * repeating requests).</li>
4571 * <li>Submitting the same request repeatedly will not change this value
4572 * to CONVERGING, if it was already a non-negative value.</li>
4573 * <li>When this value changes to non-negative, that means that all of the
4574 * metadata controls from the request have been applied, all of the
4575 * metadata controls from the camera device have been read to the
4576 * updated values (into the result), and all of the graphics buffers
4577 * corresponding to this result are also synchronized to the request.</li>
4578 * </ul>
4579 * <p><em>Pipeline considerations</em>:</p>
4580 * <p>Submitting a request with updated controls relative to the previously
4581 * submitted requests may also invalidate the synchronization state
4582 * of all the results corresponding to currently in-flight requests.</p>
4583 * <p>In other words, results for this current request and up to
4584 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
4585 * android.sync.frameNumber change to CONVERGING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004586 * <p><b>Possible values:</b>
4587 * <ul>
4588 * <li>{@link #SYNC_FRAME_NUMBER_CONVERGING CONVERGING}</li>
4589 * <li>{@link #SYNC_FRAME_NUMBER_UNKNOWN UNKNOWN}</li>
4590 * </ul></p>
4591 * <p><b>Available values for this device:</b><br>
4592 * Either a non-negative value corresponding to a
4593 * <code>frame_number</code>, or one of the two enums (CONVERGING / UNKNOWN).</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004594 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08004595 *
4596 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
4597 * @see #SYNC_FRAME_NUMBER_CONVERGING
4598 * @see #SYNC_FRAME_NUMBER_UNKNOWN
4599 * @hide
4600 */
Zhijun He4f91e2a2014-04-17 13:20:21 -07004601 public static final Key<Long> SYNC_FRAME_NUMBER =
4602 new Key<Long>("android.sync.frameNumber", long.class);
Igor Murashkin3865a842014-01-17 18:18:39 -08004603
Zhijun He0e99c222015-01-29 15:26:05 -08004604 /**
4605 * <p>The amount of exposure time increase factor applied to the original output
4606 * frame by the application processing before sending for reprocessing.</p>
4607 * <p>This is optional, and will be supported if the camera device supports YUV_REPROCESSING
4608 * capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains YUV_REPROCESSING).</p>
4609 * <p>For some YUV reprocessing use cases, the application may choose to filter the original
4610 * output frames to effectively reduce the noise to the same level as a frame that was
4611 * captured with longer exposure time. To be more specific, assuming the original captured
4612 * images were captured with a sensitivity of S and an exposure time of T, the model in
4613 * the camera device is that the amount of noise in the image would be approximately what
4614 * would be expected if the original capture parameters had been a sensitivity of
4615 * S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather
4616 * than S and T respectively. If the captured images were processed by the application
4617 * before being sent for reprocessing, then the application may have used image processing
4618 * algorithms and/or multi-frame image fusion to reduce the noise in the
4619 * application-processed images (input images). By using the effectiveExposureFactor
4620 * control, the application can communicate to the camera device the actual noise level
4621 * improvement in the application-processed image. With this information, the camera
4622 * device can select appropriate noise reduction and edge enhancement parameters to avoid
4623 * excessive noise reduction ({@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}) and insufficient edge
4624 * enhancement ({@link CaptureRequest#EDGE_MODE android.edge.mode}) being applied to the reprocessed frames.</p>
4625 * <p>For example, for multi-frame image fusion use case, the application may fuse
4626 * multiple output frames together to a final frame for reprocessing. When N image are
4627 * fused into 1 image for reprocessing, the exposure time increase factor could be up to
4628 * square root of N (based on a simple photon shot noise model). The camera device will
4629 * adjust the reprocessing noise reduction and edge enhancement parameters accordingly to
4630 * produce the best quality images.</p>
4631 * <p>This is relative factor, 1.0 indicates the application hasn't processed the input
4632 * buffer in a way that affects its effective exposure time.</p>
4633 * <p>This control is only effective for YUV reprocessing capture request. For noise
4634 * reduction reprocessing, it is only effective when <code>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} != OFF</code>.
4635 * Similarly, for edge enhancement reprocessing, it is only effective when
4636 * <code>{@link CaptureRequest#EDGE_MODE android.edge.mode} != OFF</code>.</p>
4637 * <p><b>Units</b>: Relative exposure time increase factor.</p>
4638 * <p><b>Range of valid values:</b><br>
4639 * &gt;= 1.0</p>
4640 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Zhijun He513f7c32015-04-24 18:23:54 -07004641 * <p><b>Limited capability</b> -
4642 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4643 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He0e99c222015-01-29 15:26:05 -08004644 *
4645 * @see CaptureRequest#EDGE_MODE
Zhijun He513f7c32015-04-24 18:23:54 -07004646 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0e99c222015-01-29 15:26:05 -08004647 * @see CaptureRequest#NOISE_REDUCTION_MODE
4648 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
4649 */
4650 @PublicKey
4651 public static final Key<Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR =
4652 new Key<Float>("android.reprocess.effectiveExposureFactor", float.class);
4653
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004654 /**
Shuzhen Wang61aaa322018-11-19 16:04:57 -08004655 * <p>String containing the ID of the underlying active physical camera.</p>
4656 * <p>The ID of the active physical camera that's backing the logical camera. All camera
4657 * streams and metadata that are not physical camera specific will be originating from this
4658 * physical camera. This must be one of valid physical IDs advertised in the physicalIds
4659 * static tag.</p>
4660 * <p>For a logical camera made up of physical cameras where each camera's lenses have
4661 * different characteristics, the camera device may choose to switch between the physical
4662 * cameras when application changes FOCAL_LENGTH or SCALER_CROP_REGION.
4663 * At the time of lens switch, this result metadata reflects the new active physical camera
4664 * ID.</p>
4665 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4666 */
4667 @PublicKey
4668 public static final Key<String> LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID =
4669 new Key<String>("android.logicalMultiCamera.activePhysicalId", String.class);
4670
4671 /**
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004672 * <p>Mode of operation for the lens distortion correction block.</p>
4673 * <p>The lens distortion correction block attempts to improve image quality by fixing
4674 * radial, tangential, or other geometric aberrations in the camera device's optics. If
4675 * available, the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} field documents the lens's distortion parameters.</p>
4676 * <p>OFF means no distortion correction is done.</p>
4677 * <p>FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
4678 * applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
4679 * correction algorithms, even if it slows down capture rate. FAST means the camera device
4680 * will not slow down capture rate when applying correction. FAST may be the same as OFF if
4681 * any correction at all would slow down capture rate. Every output stream will have a
4682 * similar amount of enhancement applied.</p>
Shuzhen Wangec5e8d22018-09-28 09:28:48 -07004683 * <p>The correction only applies to processed outputs such as YUV, Y8, JPEG, or DEPTH16; it is
4684 * not applied to any RAW output.</p>
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07004685 * <p>This control will be on by default on devices that support this control. Applications
4686 * disabling distortion correction need to pay extra attention with the coordinate system of
4687 * metering regions, crop region, and face rectangles. When distortion correction is OFF,
4688 * metadata coordinates follow the coordinate system of
4689 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. When distortion is not OFF, metadata
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004690 * coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. The
4691 * camera device will map these metadata fields to match the corrected image produced by the
4692 * camera device, for both capture requests and results. However, this mapping is not very
4693 * precise, since rectangles do not generally map to rectangles when corrected. Only linear
4694 * scaling between the active array and precorrection active array coordinates is
4695 * performed. Applications that require precise correction of metadata need to undo that
4696 * linear scaling, and apply a more complete correction that takes into the account the app's
4697 * own requirements.</p>
4698 * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
4699 * <ul>
4700 * <li>{@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}</li>
4701 * <li>{@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}</li>
4702 * <li>{@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}</li>
4703 * <li>{@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}</li>
4704 * <li>{@link CaptureResult#STATISTICS_FACES android.statistics.faces}</li>
4705 * </ul>
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004706 * <p><b>Possible values:</b>
4707 * <ul>
4708 * <li>{@link #DISTORTION_CORRECTION_MODE_OFF OFF}</li>
4709 * <li>{@link #DISTORTION_CORRECTION_MODE_FAST FAST}</li>
4710 * <li>{@link #DISTORTION_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
4711 * </ul></p>
4712 * <p><b>Available values for this device:</b><br>
4713 * {@link CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES android.distortionCorrection.availableModes}</p>
4714 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4715 *
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004716 * @see CaptureRequest#CONTROL_AE_REGIONS
4717 * @see CaptureRequest#CONTROL_AF_REGIONS
4718 * @see CaptureRequest#CONTROL_AWB_REGIONS
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004719 * @see CameraCharacteristics#DISTORTION_CORRECTION_AVAILABLE_MODES
4720 * @see CameraCharacteristics#LENS_DISTORTION
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004721 * @see CaptureRequest#SCALER_CROP_REGION
Yin-Chia Yeh6c73e402018-06-15 15:37:08 -07004722 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
4723 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala08bd1632018-08-01 17:23:09 -07004724 * @see CaptureResult#STATISTICS_FACES
Eino-Ville Talvala41670722018-03-13 19:43:07 -07004725 * @see #DISTORTION_CORRECTION_MODE_OFF
4726 * @see #DISTORTION_CORRECTION_MODE_FAST
4727 * @see #DISTORTION_CORRECTION_MODE_HIGH_QUALITY
4728 */
4729 @PublicKey
4730 public static final Key<Integer> DISTORTION_CORRECTION_MODE =
4731 new Key<Integer>("android.distortionCorrection.mode", int.class);
4732
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004733 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
4734 * End generated code
4735 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07004736
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004737
4738
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08004739}