blob: 6d7b06fc609fe137d289320b61c5c46c97683b69 [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;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -070021import android.hardware.camera2.impl.CameraMetadataNative;
Igor Murashkinbdf366c2014-07-25 16:54:20 -070022import android.hardware.camera2.impl.CaptureResultExtras;
Igor Murashkin6c76f582014-07-15 17:19:49 -070023import android.hardware.camera2.impl.PublicKey;
24import android.hardware.camera2.impl.SyntheticKey;
Igor Murashkind6d65152014-05-19 16:31:02 -070025import android.hardware.camera2.utils.TypeReference;
26import android.util.Log;
Igor Murashkin72f9f0a2014-05-14 15:46:10 -070027import android.util.Rational;
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080028
Igor Murashkind6d65152014-05-19 16:31:02 -070029import java.util.List;
30
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080031/**
Igor Murashkindb075af2014-05-21 10:07:08 -070032 * <p>The subset of the results of a single image capture from the image sensor.</p>
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080033 *
Igor Murashkindb075af2014-05-21 10:07:08 -070034 * <p>Contains a subset of the final configuration for the capture hardware (sensor, lens,
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080035 * flash), the processing pipeline, the control algorithms, and the output
36 * buffers.</p>
37 *
38 * <p>CaptureResults are produced by a {@link CameraDevice} after processing a
39 * {@link CaptureRequest}. All properties listed for capture requests can also
40 * be queried on the capture result, to determine the final values used for
41 * capture. The result also includes additional metadata about the state of the
42 * camera device during the capture.</p>
43 *
Igor Murashkindb075af2014-05-21 10:07:08 -070044 * <p>Not all properties returned by {@link CameraCharacteristics#getAvailableCaptureResultKeys()}
45 * are necessarily available. Some results are {@link CaptureResult partial} and will
46 * not have every key set. Only {@link TotalCaptureResult total} results are guaranteed to have
47 * every key available that was enabled by the request.</p>
48 *
49 * <p>{@link CaptureResult} objects are immutable.</p>
Ruben Brunkf967a542014-04-28 16:31:11 -070050 *
Eino-Ville Talvalab2675542012-12-12 13:29:45 -080051 */
Igor Murashkindb075af2014-05-21 10:07:08 -070052public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
Igor Murashkind6d65152014-05-19 16:31:02 -070053
54 private static final String TAG = "CaptureResult";
55 private static final boolean VERBOSE = false;
56
57 /**
58 * A {@code Key} is used to do capture result field lookups with
59 * {@link CaptureResult#get}.
60 *
61 * <p>For example, to get the timestamp corresponding to the exposure of the first row:
62 * <code><pre>
63 * long timestamp = captureResult.get(CaptureResult.SENSOR_TIMESTAMP);
64 * </pre></code>
65 * </p>
66 *
67 * <p>To enumerate over all possible keys for {@link CaptureResult}, see
68 * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p>
69 *
70 * @see CaptureResult#get
71 * @see CameraCharacteristics#getAvailableCaptureResultKeys
72 */
73 public final static class Key<T> {
74 private final CameraMetadataNative.Key<T> mKey;
75
76 /**
77 * Visible for testing and vendor extensions only.
78 *
79 * @hide
80 */
Emilian Peevde62d842017-03-23 19:20:40 +000081 public Key(String name, Class<T> type, long vendorId) {
82 mKey = new CameraMetadataNative.Key<T>(name, type, vendorId);
83 }
84
85 /**
86 * Visible for testing and vendor extensions only.
87 *
88 * @hide
89 */
Igor Murashkind6d65152014-05-19 16:31:02 -070090 public Key(String name, Class<T> type) {
91 mKey = new CameraMetadataNative.Key<T>(name, type);
92 }
93
94 /**
95 * Visible for testing and vendor extensions only.
96 *
97 * @hide
98 */
99 public Key(String name, TypeReference<T> typeReference) {
100 mKey = new CameraMetadataNative.Key<T>(name, typeReference);
101 }
102
103 /**
104 * Return a camelCase, period separated name formatted like:
105 * {@code "root.section[.subsections].name"}.
106 *
107 * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."};
108 * keys that are device/platform-specific are prefixed with {@code "com."}.</p>
109 *
110 * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would
111 * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device
112 * specific key might look like {@code "com.google.nexus.data.private"}.</p>
113 *
114 * @return String representation of the key name
115 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700116 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700117 public String getName() {
118 return mKey.getName();
119 }
120
121 /**
Emilian Peevde62d842017-03-23 19:20:40 +0000122 * Return vendor tag id.
123 *
124 * @hide
125 */
126 public long getVendorId() {
127 return mKey.getVendorId();
128 }
129
130 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700131 * {@inheritDoc}
132 */
133 @Override
134 public final int hashCode() {
135 return mKey.hashCode();
136 }
137
138 /**
139 * {@inheritDoc}
140 */
141 @SuppressWarnings("unchecked")
142 @Override
143 public final boolean equals(Object o) {
144 return o instanceof Key && ((Key<T>)o).mKey.equals(mKey);
145 }
146
147 /**
Chien-Yu Chen12a83852015-07-07 12:17:22 -0700148 * Return this {@link Key} as a string representation.
149 *
150 * <p>{@code "CaptureResult.Key(%s)"}, where {@code %s} represents
151 * the name of this key as returned by {@link #getName}.</p>
152 *
153 * @return string representation of {@link Key}
154 */
155 @NonNull
156 @Override
157 public String toString() {
158 return String.format("CaptureResult.Key(%s)", mKey.getName());
159 }
160
161 /**
Igor Murashkind6d65152014-05-19 16:31:02 -0700162 * Visible for CameraMetadataNative implementation only; do not use.
163 *
164 * TODO: Make this private or remove it altogether.
165 *
166 * @hide
167 */
168 public CameraMetadataNative.Key<T> getNativeKey() {
169 return mKey;
170 }
171
172 @SuppressWarnings({ "unchecked" })
173 /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) {
174 mKey = (CameraMetadataNative.Key<T>) nativeKey;
175 }
176 }
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700177
178 private final CameraMetadataNative mResults;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700179 private final CaptureRequest mRequest;
180 private final int mSequenceId;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700181 private final long mFrameNumber;
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700182
Igor Murashkin70725502013-06-25 20:27:06 +0000183 /**
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700184 * Takes ownership of the passed-in properties object
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700185 *
186 * <p>For internal use only</p>
Igor Murashkin70725502013-06-25 20:27:06 +0000187 * @hide
188 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700189 public CaptureResult(CameraMetadataNative results, CaptureRequest parent,
190 CaptureResultExtras extras) {
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700191 if (results == null) {
192 throw new IllegalArgumentException("results was null");
193 }
194
195 if (parent == null) {
196 throw new IllegalArgumentException("parent was null");
197 }
198
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700199 if (extras == null) {
200 throw new IllegalArgumentException("extras was null");
201 }
202
Igor Murashkind6d65152014-05-19 16:31:02 -0700203 mResults = CameraMetadataNative.move(results);
204 if (mResults.isEmpty()) {
205 throw new AssertionError("Results must not be empty");
206 }
Emilian Peevde62d842017-03-23 19:20:40 +0000207 setNativeInstance(mResults);
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700208 mRequest = parent;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700209 mSequenceId = extras.getRequestId();
210 mFrameNumber = extras.getFrameNumber();
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700211 }
212
Ruben Brunkf967a542014-04-28 16:31:11 -0700213 /**
214 * Returns a copy of the underlying {@link CameraMetadataNative}.
215 * @hide
216 */
217 public CameraMetadataNative getNativeCopy() {
218 return new CameraMetadataNative(mResults);
219 }
220
Igor Murashkind6d65152014-05-19 16:31:02 -0700221 /**
222 * Creates a request-less result.
223 *
224 * <p><strong>For testing only.</strong></p>
225 * @hide
226 */
227 public CaptureResult(CameraMetadataNative results, int sequenceId) {
228 if (results == null) {
229 throw new IllegalArgumentException("results was null");
230 }
231
232 mResults = CameraMetadataNative.move(results);
233 if (mResults.isEmpty()) {
234 throw new AssertionError("Results must not be empty");
235 }
236
Emilian Peevde62d842017-03-23 19:20:40 +0000237 setNativeInstance(mResults);
Igor Murashkind6d65152014-05-19 16:31:02 -0700238 mRequest = null;
239 mSequenceId = sequenceId;
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700240 mFrameNumber = -1;
Igor Murashkind6d65152014-05-19 16:31:02 -0700241 }
242
243 /**
244 * Get a capture result field value.
245 *
246 * <p>The field definitions can be found in {@link CaptureResult}.</p>
247 *
248 * <p>Querying the value for the same key more than once will return a value
249 * which is equal to the previous queried value.</p>
250 *
251 * @throws IllegalArgumentException if the key was not valid
252 *
253 * @param key The result field to read.
254 * @return The value of that key, or {@code null} if the field is not set.
255 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700256 @Nullable
Eino-Ville Talvala70c22072013-08-27 12:09:04 -0700257 public <T> T get(Key<T> key) {
Igor Murashkind6d65152014-05-19 16:31:02 -0700258 T value = mResults.get(key);
259 if (VERBOSE) Log.v(TAG, "#get for Key = " + key.getName() + ", returned value = " + value);
260 return value;
261 }
262
263 /**
264 * {@inheritDoc}
265 * @hide
266 */
267 @SuppressWarnings("unchecked")
268 @Override
269 protected <T> T getProtected(Key<?> key) {
270 return (T) mResults.get(key);
271 }
272
273 /**
274 * {@inheritDoc}
275 * @hide
276 */
277 @SuppressWarnings("unchecked")
278 @Override
279 protected Class<Key<?>> getKeyClass() {
280 Object thisClass = Key.class;
281 return (Class<Key<?>>)thisClass;
282 }
283
284 /**
285 * Dumps the native metadata contents to logcat.
286 *
287 * <p>Visibility for testing/debugging only. The results will not
288 * include any synthesized keys, as they are invisible to the native layer.</p>
289 *
290 * @hide
291 */
292 public void dumpToLog() {
293 mResults.dumpToLog();
294 }
295
296 /**
297 * {@inheritDoc}
298 */
299 @Override
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700300 @NonNull
Igor Murashkind6d65152014-05-19 16:31:02 -0700301 public List<Key<?>> getKeys() {
302 // Force the javadoc for this function to show up on the CaptureResult page
303 return super.getKeys();
Eino-Ville Talvalab2675542012-12-12 13:29:45 -0800304 }
305
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700306 /**
307 * Get the request associated with this result.
308 *
Igor Murashkindb075af2014-05-21 10:07:08 -0700309 * <p>Whenever a request has been fully or partially captured, with
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700310 * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted} or
311 * {@link CameraCaptureSession.CaptureCallback#onCaptureProgressed}, the {@code result}'s
Igor Murashkindb075af2014-05-21 10:07:08 -0700312 * {@code getRequest()} will return that {@code request}.
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700313 * </p>
314 *
Igor Murashkindb075af2014-05-21 10:07:08 -0700315 * <p>For example,
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700316 * <code><pre>cameraDevice.capture(someRequest, new CaptureCallback() {
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700317 * {@literal @}Override
318 * void onCaptureCompleted(CaptureRequest myRequest, CaptureResult myResult) {
319 * assert(myResult.getRequest.equals(myRequest) == true);
320 * }
Igor Murashkindb075af2014-05-21 10:07:08 -0700321 * }, null);
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700322 * </code></pre>
323 * </p>
324 *
325 * @return The request associated with this result. Never {@code null}.
326 */
Eino-Ville Talvala8b905572015-05-14 15:43:01 -0700327 @NonNull
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700328 public CaptureRequest getRequest() {
329 return mRequest;
330 }
331
332 /**
333 * Get the frame number associated with this result.
334 *
335 * <p>Whenever a request has been processed, regardless of failure or success,
336 * it gets a unique frame number assigned to its future result/failure.</p>
337 *
Chien-Yu Chen5398a672015-03-19 14:48:43 -0700338 * <p>For the same type of request (capturing from the camera device or reprocessing), this
339 * value monotonically increments, starting with 0, for every new result or failure and the
340 * scope is the lifetime of the {@link CameraDevice}. Between different types of requests,
341 * the frame number may not monotonically increment. For example, the frame number of a newer
342 * reprocess result may be smaller than the frame number of an older result of capturing new
343 * images from the camera device, but the frame number of a newer reprocess result will never be
344 * smaller than the frame number of an older reprocess result.</p>
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700345 *
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700346 * @return The frame number
Chien-Yu Chen5398a672015-03-19 14:48:43 -0700347 *
348 * @see CameraDevice#createCaptureRequest
349 * @see CameraDevice#createReprocessCaptureRequest
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700350 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -0700351 public long getFrameNumber() {
352 return mFrameNumber;
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700353 }
354
355 /**
356 * The sequence ID for this failure that was returned by the
Eino-Ville Talvala0a160ac2014-07-02 14:29:26 -0700357 * {@link CameraCaptureSession#capture} family of functions.
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700358 *
359 * <p>The sequence ID is a unique monotonically increasing value starting from 0,
360 * incremented every time a new group of requests is submitted to the CameraDevice.</p>
361 *
362 * @return int The ID for the sequence of requests that this capture result is a part of
363 *
Eino-Ville Talvalafd887432014-09-04 13:07:40 -0700364 * @see CameraDevice.CaptureCallback#onCaptureSequenceCompleted
365 * @see CameraDevice.CaptureCallback#onCaptureSequenceAborted
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -0700366 */
367 public int getSequenceId() {
368 return mSequenceId;
369 }
370
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700371 /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
372 * The key entries below this point are generated from metadata
373 * definitions in /system/media/camera/docs. Do not modify by hand or
374 * modify the comment blocks at the start or end.
375 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
376
377 /**
Zhijun He379af012014-05-06 11:54:54 -0700378 * <p>The mode control selects how the image data is converted from the
379 * sensor's native color into linear sRGB color.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700380 * <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 -0700381 * control is overridden by the AWB routine. When AWB is disabled, the
382 * application controls how the color mapping is performed.</p>
383 * <p>We define the expected processing pipeline below. For consistency
384 * across devices, this is always the case with TRANSFORM_MATRIX.</p>
385 * <p>When either FULL or HIGH_QUALITY is used, the camera device may
386 * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
387 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
388 * camera device (in the results) and be roughly correct.</p>
389 * <p>Switching to TRANSFORM_MATRIX and using the data provided from
390 * FAST or HIGH_QUALITY will yield a picture with the same white point
391 * as what was produced by the camera device in the earlier frame.</p>
392 * <p>The expected processing pipeline is as follows:</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -0800393 * <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 -0700394 * <p>The white balance is encoded by two values, a 4-channel white-balance
395 * gain vector (applied in the Bayer domain), and a 3x3 color transform
396 * matrix (applied after demosaic).</p>
397 * <p>The 4-channel white-balance gains are defined as:</p>
398 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ]
399 * </code></pre>
400 * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
401 * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
402 * These may be identical for a given camera device implementation; if
403 * the camera device does not support a separate gain for even/odd green
404 * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
405 * <code>G_even</code> in the output result metadata.</p>
406 * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
407 * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
408 * </code></pre>
409 * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
410 * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
411 * <p>with colors as follows:</p>
412 * <pre><code>r' = I0r + I1g + I2b
413 * g' = I3r + I4g + I5b
414 * b' = I6r + I7g + I8b
415 * </code></pre>
416 * <p>Both the input and output value ranges must match. Overflow/underflow
417 * values are clipped to fit within the range.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700418 * <p><b>Possible values:</b>
419 * <ul>
420 * <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li>
421 * <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li>
422 * <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
423 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700424 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
425 * <p><b>Full capability</b> -
426 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
427 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He379af012014-05-06 11:54:54 -0700428 *
429 * @see CaptureRequest#COLOR_CORRECTION_GAINS
430 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
431 * @see CaptureRequest#CONTROL_AWB_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700432 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -0700433 * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
434 * @see #COLOR_CORRECTION_MODE_FAST
435 * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
436 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700437 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700438 public static final Key<Integer> COLOR_CORRECTION_MODE =
439 new Key<Integer>("android.colorCorrection.mode", int.class);
440
441 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -0800442 * <p>A color transform matrix to use to transform
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700443 * from sensor RGB color space to output linear sRGB color space.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800444 * <p>This matrix is either set by the camera device when the request
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800445 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700446 * directly by the application in the request when the
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800447 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
Zhijun He49a3ca92014-02-05 13:48:09 -0800448 * <p>In the latter case, the camera device may round the matrix to account
449 * for precision issues; the final rounded matrix should be reported back
450 * in this matrix result metadata. The transform should keep the magnitude
451 * of the output color values within <code>[0, 1.0]</code> (assuming input color
452 * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -0800453 * <p>The valid range of each matrix element varies on different devices, but
454 * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700455 * <p><b>Units</b>: Unitless scale factors</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700456 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
457 * <p><b>Full capability</b> -
458 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
459 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800460 *
461 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700462 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700463 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700464 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700465 public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM =
466 new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700467
468 /**
Igor Murashkin7d2a5c52014-01-17 15:07:52 -0800469 * <p>Gains applying to Bayer raw color channels for
Zhijun Hecc28a412014-02-24 15:11:23 -0800470 * white-balance.</p>
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700471 * <p>These per-channel gains are either set by the camera device
472 * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not
473 * TRANSFORM_MATRIX, or directly by the application in the
474 * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is
475 * TRANSFORM_MATRIX.</p>
476 * <p>The gains in the result metadata are the gains actually
477 * applied by the camera device to the current frame.</p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -0800478 * <p>The valid range of gains varies on different devices, but gains
479 * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
480 * device allows gains below 1.0, this is usually not recommended because
481 * this can create color artifacts.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700482 * <p><b>Units</b>: Unitless gain factors</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700483 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
484 * <p><b>Full capability</b> -
485 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
486 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800487 *
488 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700489 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700490 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700491 @PublicKey
Eino-Ville Talvala2bb91a72014-05-27 18:16:53 -0700492 public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS =
493 new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700494
495 /**
Zhijun Hea05e59d2014-07-08 18:27:47 -0700496 * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700497 * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
498 * can not focus on the same point after exiting from the lens. This metadata defines
499 * the high level control of chromatic aberration correction algorithm, which aims to
500 * minimize the chromatic artifacts that may occur along the object boundaries in an
501 * image.</p>
502 * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
503 * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
504 * use the highest-quality aberration correction algorithms, even if it slows down
505 * capture rate. FAST means the camera device will not slow down capture rate when
506 * applying aberration correction.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700507 * <p>LEGACY devices will always be in FAST mode.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700508 * <p><b>Possible values:</b>
509 * <ul>
510 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li>
511 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li>
512 * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
513 * </ul></p>
514 * <p><b>Available values for this device:</b><br>
515 * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700516 * <p>This key is available on all devices.</p>
Zhijun Hea05e59d2014-07-08 18:27:47 -0700517 *
Zhijun He9e4e4392014-08-18 11:12:32 -0700518 * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
519 * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF
520 * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST
521 * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY
Zhijun Hea05e59d2014-07-08 18:27:47 -0700522 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700523 @PublicKey
Zhijun He9e4e4392014-08-18 11:12:32 -0700524 public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE =
525 new Key<Integer>("android.colorCorrection.aberrationMode", int.class);
Zhijun Hea05e59d2014-07-08 18:27:47 -0700526
527 /**
Zhijun He379af012014-05-06 11:54:54 -0700528 * <p>The desired setting for the camera device's auto-exposure
529 * algorithm's antibanding compensation.</p>
530 * <p>Some kinds of lighting fixtures, such as some fluorescent
531 * lights, flicker at the rate of the power supply frequency
532 * (60Hz or 50Hz, depending on country). While this is
533 * typically not noticeable to a person, it can be visible to
534 * a camera device. If a camera sets its exposure time to the
535 * wrong value, the flicker may become visible in the
536 * viewfinder as flicker or in a final captured image, as a
537 * set of variable-brightness bands across the image.</p>
538 * <p>Therefore, the auto-exposure routines of camera devices
539 * include antibanding routines that ensure that the chosen
540 * exposure value will not cause such banding. The choice of
541 * exposure time depends on the rate of flicker, which the
542 * camera device can detect automatically, or the expected
543 * rate can be selected by the application using this
544 * control.</p>
545 * <p>A given camera device may not support all of the possible
546 * options for the antibanding mode. The
547 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
548 * the available modes for a given camera device.</p>
Yin-Chia Yeh7b2cae62014-11-25 11:54:18 -0800549 * <p>AUTO mode is the default if it is available on given
550 * camera device. When AUTO mode is not available, the
551 * default will be either 50HZ or 60HZ, and both 50HZ
552 * and 60HZ will be available.</p>
Zhijun He379af012014-05-06 11:54:54 -0700553 * <p>If manual exposure control is enabled (by setting
554 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
555 * then this setting has no effect, and the application must
556 * ensure it selects exposure times that do not cause banding
557 * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
558 * the application in this.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700559 * <p><b>Possible values:</b>
560 * <ul>
561 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li>
562 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li>
563 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li>
564 * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li>
565 * </ul></p>
566 * <p><b>Available values for this device:</b><br></p>
567 * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700568 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700569 *
570 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
571 * @see CaptureRequest#CONTROL_AE_MODE
572 * @see CaptureRequest#CONTROL_MODE
573 * @see CaptureResult#STATISTICS_SCENE_FLICKER
574 * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
575 * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
576 * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
577 * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO
578 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700579 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700580 public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE =
581 new Key<Integer>("android.control.aeAntibandingMode", int.class);
582
583 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700584 * <p>Adjustment to auto-exposure (AE) target image
585 * brightness.</p>
586 * <p>The adjustment is measured as a count of steps, with the
587 * step size defined by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} and the
588 * allowed range by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}.</p>
589 * <p>For example, if the exposure value (EV) step is 0.333, '6'
590 * will mean an exposure compensation of +2 EV; -3 will mean an
591 * exposure compensation of -1 EV. One EV represents a doubling
592 * of image brightness. Note that this control will only be
593 * effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control
594 * 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 -0700595 * <p>In the event of exposure compensation value being changed, camera device
596 * may take several frames to reach the newly requested exposure target.
597 * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING
598 * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will
599 * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
600 * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700601 * <p><b>Units</b>: Compensation steps</p>
602 * <p><b>Range of valid values:</b><br>
603 * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700604 * <p>This key is available on all devices.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700605 *
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700606 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE
607 * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700608 * @see CaptureRequest#CONTROL_AE_LOCK
609 * @see CaptureRequest#CONTROL_AE_MODE
610 * @see CaptureResult#CONTROL_AE_STATE
Zhijun He379af012014-05-06 11:54:54 -0700611 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700612 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700613 public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION =
614 new Key<Integer>("android.control.aeExposureCompensation", int.class);
615
616 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700617 * <p>Whether auto-exposure (AE) is currently locked to its latest
Zhijun He379af012014-05-06 11:54:54 -0700618 * calculated values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700619 * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
620 * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
621 * <p>Note that even when AE is locked, the flash may be fired if
622 * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH /
623 * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700624 * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock
625 * is ON, the camera device will still adjust its exposure value.</p>
Zhijun He379af012014-05-06 11:54:54 -0700626 * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
627 * when AE is already locked, the camera device will not change the exposure time
628 * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
629 * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
630 * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
Zhijun Hefa95b042015-02-09 10:40:49 -0800631 * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.
632 * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
633 * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
634 * the AE if AE is locked by the camera device internally during precapture metering
635 * sequence In other words, submitting requests with AE unlock has no effect for an
636 * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
637 * will never succeed in a sequence of preview requests where AE lock is always set
638 * to <code>false</code>.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700639 * <p>Since the camera device has a pipeline of in-flight requests, the settings that
640 * get locked do not necessarily correspond to the settings that were present in the
641 * latest capture result received from the camera device, since additional captures
642 * and AE updates may have occurred even before the result was sent out. If an
643 * application is switching between automatic and manual control and wishes to eliminate
644 * any flicker during the switch, the following procedure is recommended:</p>
645 * <ol>
646 * <li>Starting in auto-AE mode:</li>
647 * <li>Lock AE</li>
648 * <li>Wait for the first result to be output that has the AE locked</li>
649 * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
650 * <li>Submit the capture request, proceed to run manual AE as desired.</li>
651 * </ol>
Zhijun He379af012014-05-06 11:54:54 -0700652 * <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 -0700653 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700654 *
Yin-Chia Yeha4227df2014-05-05 14:27:39 -0700655 * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
Zhijun He379af012014-05-06 11:54:54 -0700656 * @see CaptureRequest#CONTROL_AE_MODE
657 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
658 * @see CaptureResult#CONTROL_AE_STATE
659 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
660 * @see CaptureRequest#SENSOR_SENSITIVITY
661 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700662 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700663 public static final Key<Boolean> CONTROL_AE_LOCK =
664 new Key<Boolean>("android.control.aeLock", boolean.class);
665
666 /**
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800667 * <p>The desired mode for the camera device's
668 * auto-exposure routine.</p>
669 * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
670 * AUTO.</p>
671 * <p>When set to any of the ON modes, the camera device's
672 * auto-exposure routine is enabled, overriding the
673 * application's selected exposure time, sensor sensitivity,
674 * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
675 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
676 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
677 * is selected, the camera device's flash unit controls are
678 * also overridden.</p>
679 * <p>The FLASH modes are only available if the camera device
680 * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
681 * <p>If flash TORCH mode is desired, this field must be set to
682 * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
683 * <p>When set to any of the ON modes, the values chosen by the
684 * camera device auto-exposure routine for the overridden
685 * fields for a given capture will be available in its
686 * CaptureResult.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700687 * <p><b>Possible values:</b>
688 * <ul>
689 * <li>{@link #CONTROL_AE_MODE_OFF OFF}</li>
690 * <li>{@link #CONTROL_AE_MODE_ON ON}</li>
691 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li>
692 * <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li>
693 * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li>
694 * </ul></p>
695 * <p><b>Available values for this device:</b><br>
696 * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700697 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800698 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700699 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES
Zhijun He5f2a47f2014-01-16 15:44:41 -0800700 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800701 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
702 * @see CaptureRequest#FLASH_MODE
Igor Murashkinaef3b7e2014-01-15 13:20:37 -0800703 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
704 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He399f05d2014-01-15 11:31:30 -0800705 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800706 * @see #CONTROL_AE_MODE_OFF
707 * @see #CONTROL_AE_MODE_ON
708 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
709 * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
710 * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
711 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700712 @PublicKey
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800713 public static final Key<Integer> CONTROL_AE_MODE =
714 new Key<Integer>("android.control.aeMode", int.class);
715
716 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700717 * <p>List of metering areas to use for auto-exposure adjustment.</p>
718 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700719 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700720 * <p>The maximum number of regions supported by the device is determined by the value
721 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -0800722 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -0700723 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800724 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
725 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -0700726 * bottom-right pixel in the active pixel array.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700727 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -0700728 * for every pixel in the area. This means that a large metering area
729 * with the same weight as a smaller area will have more effect in
730 * the metering result. Metering areas can partially overlap and the
731 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700732 * <p>The weights are relative to weights of other exposure metering regions, so if only one
733 * region is used, all non-zero weights will have the same effect. A region with 0
734 * weight is ignored.</p>
735 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
736 * camera device.</p>
737 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
738 * capture result metadata, the camera device will ignore the sections outside the crop
739 * region and output only the intersection rectangle as the metering region in the result
740 * metadata. If the region is entirely outside the crop region, it will be ignored and
741 * not reported in the result metadata.</p>
742 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
743 * <p><b>Range of valid values:</b><br>
744 * Coordinates must be between <code>[(0,0), (width, height))</code> of
745 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700746 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800747 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -0700748 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -0800749 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -0800750 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700751 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700752 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -0700753 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS =
754 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -0700755
756 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700757 * <p>Range over which the auto-exposure routine can
758 * adjust the capture frame rate to maintain good
759 * exposure.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700760 * <p>Only constrains auto-exposure (AE) algorithm, not
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700761 * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and
762 * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p>
763 * <p><b>Units</b>: Frames per second (FPS)</p>
764 * <p><b>Range of valid values:</b><br>
765 * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p>
766 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -0700767 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700768 * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
Zhijun He379af012014-05-06 11:54:54 -0700769 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700770 * @see CaptureRequest#SENSOR_FRAME_DURATION
Zhijun He379af012014-05-06 11:54:54 -0700771 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700772 @PublicKey
Igor Murashkin78712a82014-05-27 18:32:18 -0700773 public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE =
774 new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }});
Zhijun He379af012014-05-06 11:54:54 -0700775
776 /**
777 * <p>Whether the camera device will trigger a precapture
778 * metering sequence when it processes this request.</p>
779 * <p>This entry is normally set to IDLE, or is not
780 * included at all in the request settings. When included and
Zhijun Hedd72be52015-02-06 13:49:51 -0800781 * set to START, the camera device will trigger the auto-exposure (AE)
Zhijun He379af012014-05-06 11:54:54 -0700782 * precapture metering sequence.</p>
Zhijun Hefa95b042015-02-09 10:40:49 -0800783 * <p>When set to CANCEL, the camera device will cancel any active
784 * precapture metering trigger, and return to its initial AE state.
785 * If a precapture metering sequence is already completed, and the camera
786 * device has implicitly locked the AE for subsequent still capture, the
787 * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
Zhijun Hedd72be52015-02-06 13:49:51 -0800788 * <p>The precapture sequence should be triggered before starting a
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700789 * high-quality still capture for final metering decisions to
790 * be made, and for firing pre-capture flash pulses to estimate
791 * scene brightness and required final capture flash power, when
792 * the flash is enabled.</p>
793 * <p>Normally, this entry should be set to START for only a
794 * single request, and the application should wait until the
795 * sequence completes before starting a new one.</p>
Zhijun Hedd72be52015-02-06 13:49:51 -0800796 * <p>When a precapture metering sequence is finished, the camera device
797 * may lock the auto-exposure routine internally to be able to accurately expose the
798 * subsequent still capture image (<code>{@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE</code>).
799 * For this case, the AE may not resume normal scan if no subsequent still capture is
800 * submitted. To ensure that the AE routine restarts normal scan, the application should
801 * submit a request with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == true</code>, followed by a request
802 * 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 -0800803 * still capture request after the precapture sequence completes. Alternatively, for
804 * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
805 * internally locked AE if the application doesn't submit a still capture request after
806 * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
807 * be used in devices that have earlier API levels.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700808 * <p>The exact effect of auto-exposure (AE) precapture trigger
809 * depends on the current AE mode and state; see
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -0700810 * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition
811 * details.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700812 * <p>On LEGACY-level devices, the precapture trigger is not supported;
813 * capturing a high-resolution JPEG image will automatically trigger a
814 * precapture sequence before the high-resolution capture, including
815 * potentially firing a pre-capture flash.</p>
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -0700816 * <p>Using the precapture trigger and the auto-focus trigger {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger}
817 * simultaneously is allowed. However, since these triggers often require cooperation between
818 * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
819 * focus sweep), the camera device may delay acting on a later trigger until the previous
820 * trigger has been fully handled. This may lead to longer intervals between the trigger and
821 * changes to {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} indicating the start of the precapture sequence, for
822 * example.</p>
823 * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
824 * the camera device will complete them in the optimal order for that device.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700825 * <p><b>Possible values:</b>
826 * <ul>
827 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li>
828 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li>
Zhijun Hefa95b042015-02-09 10:40:49 -0800829 * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL CANCEL}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -0700830 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700831 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
832 * <p><b>Limited capability</b> -
833 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
834 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He379af012014-05-06 11:54:54 -0700835 *
Zhijun Hedd72be52015-02-06 13:49:51 -0800836 * @see CaptureRequest#CONTROL_AE_LOCK
Zhijun He379af012014-05-06 11:54:54 -0700837 * @see CaptureResult#CONTROL_AE_STATE
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -0700838 * @see CaptureRequest#CONTROL_AF_TRIGGER
Zhijun Hedd72be52015-02-06 13:49:51 -0800839 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -0700840 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He379af012014-05-06 11:54:54 -0700841 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
842 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
Zhijun Hefa95b042015-02-09 10:40:49 -0800843 * @see #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL
Zhijun He379af012014-05-06 11:54:54 -0700844 */
Igor Murashkin6c76f582014-07-15 17:19:49 -0700845 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -0700846 public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
847 new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
848
849 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -0700850 * <p>Current state of the auto-exposure (AE) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -0800851 * <p>Switching between or enabling AE modes ({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}) always
852 * resets the AE state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
853 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
854 * the algorithm states to INACTIVE.</p>
855 * <p>The camera device can do several state transitions between two results, if it is
856 * allowed by the state transition table. For example: INACTIVE may never actually be
857 * seen in a result.</p>
858 * <p>The state in the result is the state for this image (in sync with this image): if
859 * AE state becomes CONVERGED, then the image data associated with this result should
860 * be good to use.</p>
861 * <p>Below are state transition tables for different AE modes.</p>
862 * <table>
863 * <thead>
864 * <tr>
865 * <th align="center">State</th>
866 * <th align="center">Transition Cause</th>
867 * <th align="center">New State</th>
868 * <th align="center">Notes</th>
869 * </tr>
870 * </thead>
871 * <tbody>
872 * <tr>
873 * <td align="center">INACTIVE</td>
874 * <td align="center"></td>
875 * <td align="center">INACTIVE</td>
876 * <td align="center">Camera device auto exposure algorithm is disabled</td>
877 * </tr>
878 * </tbody>
879 * </table>
880 * <p>When {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is AE_MODE_ON_*:</p>
881 * <table>
882 * <thead>
883 * <tr>
884 * <th align="center">State</th>
885 * <th align="center">Transition Cause</th>
886 * <th align="center">New State</th>
887 * <th align="center">Notes</th>
888 * </tr>
889 * </thead>
890 * <tbody>
891 * <tr>
892 * <td align="center">INACTIVE</td>
893 * <td align="center">Camera device initiates AE scan</td>
894 * <td align="center">SEARCHING</td>
895 * <td align="center">Values changing</td>
896 * </tr>
897 * <tr>
898 * <td align="center">INACTIVE</td>
899 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
900 * <td align="center">LOCKED</td>
901 * <td align="center">Values locked</td>
902 * </tr>
903 * <tr>
904 * <td align="center">SEARCHING</td>
905 * <td align="center">Camera device finishes AE scan</td>
906 * <td align="center">CONVERGED</td>
907 * <td align="center">Good values, not changing</td>
908 * </tr>
909 * <tr>
910 * <td align="center">SEARCHING</td>
911 * <td align="center">Camera device finishes AE scan</td>
912 * <td align="center">FLASH_REQUIRED</td>
913 * <td align="center">Converged but too dark w/o flash</td>
914 * </tr>
915 * <tr>
916 * <td align="center">SEARCHING</td>
917 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
918 * <td align="center">LOCKED</td>
919 * <td align="center">Values locked</td>
920 * </tr>
921 * <tr>
922 * <td align="center">CONVERGED</td>
923 * <td align="center">Camera device initiates AE scan</td>
924 * <td align="center">SEARCHING</td>
925 * <td align="center">Values changing</td>
926 * </tr>
927 * <tr>
928 * <td align="center">CONVERGED</td>
929 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
930 * <td align="center">LOCKED</td>
931 * <td align="center">Values locked</td>
932 * </tr>
933 * <tr>
934 * <td align="center">FLASH_REQUIRED</td>
935 * <td align="center">Camera device initiates AE scan</td>
936 * <td align="center">SEARCHING</td>
937 * <td align="center">Values changing</td>
938 * </tr>
939 * <tr>
940 * <td align="center">FLASH_REQUIRED</td>
941 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
942 * <td align="center">LOCKED</td>
943 * <td align="center">Values locked</td>
944 * </tr>
945 * <tr>
946 * <td align="center">LOCKED</td>
947 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
948 * <td align="center">SEARCHING</td>
949 * <td align="center">Values not good after unlock</td>
950 * </tr>
951 * <tr>
952 * <td align="center">LOCKED</td>
953 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
954 * <td align="center">CONVERGED</td>
955 * <td align="center">Values good after unlock</td>
956 * </tr>
957 * <tr>
958 * <td align="center">LOCKED</td>
959 * <td align="center">{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
960 * <td align="center">FLASH_REQUIRED</td>
961 * <td align="center">Exposure good, but too dark</td>
962 * </tr>
963 * <tr>
964 * <td align="center">PRECAPTURE</td>
965 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is OFF</td>
966 * <td align="center">CONVERGED</td>
967 * <td align="center">Ready for high-quality capture</td>
968 * </tr>
969 * <tr>
970 * <td align="center">PRECAPTURE</td>
971 * <td align="center">Sequence done. {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} is ON</td>
972 * <td align="center">LOCKED</td>
973 * <td align="center">Ready for high-quality capture</td>
974 * </tr>
975 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -0800976 * <td align="center">LOCKED</td>
977 * <td align="center">aeLock is ON and aePrecaptureTrigger is START</td>
978 * <td align="center">LOCKED</td>
979 * <td align="center">Precapture trigger is ignored when AE is already locked</td>
980 * </tr>
981 * <tr>
982 * <td align="center">LOCKED</td>
983 * <td align="center">aeLock is ON and aePrecaptureTrigger is CANCEL</td>
984 * <td align="center">LOCKED</td>
985 * <td align="center">Precapture trigger is ignored when AE is already locked</td>
986 * </tr>
987 * <tr>
988 * <td align="center">Any state (excluding LOCKED)</td>
Zhijun He228f4f92014-01-16 17:22:05 -0800989 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START</td>
990 * <td align="center">PRECAPTURE</td>
991 * <td align="center">Start AE precapture metering sequence</td>
992 * </tr>
Zhijun Hefa95b042015-02-09 10:40:49 -0800993 * <tr>
994 * <td align="center">Any state (excluding LOCKED)</td>
995 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL</td>
996 * <td align="center">INACTIVE</td>
997 * <td align="center">Currently active precapture metering sequence is canceled</td>
998 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -0800999 * </tbody>
1000 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001001 * <p>For the above table, the camera device may skip reporting any state changes that happen
1002 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1003 * can be skipped in that manner is called a transient state.</p>
1004 * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
1005 * listed in above table, it is also legal for the camera device to skip one or more
1006 * transient states between two results. See below table for examples:</p>
1007 * <table>
1008 * <thead>
1009 * <tr>
1010 * <th align="center">State</th>
1011 * <th align="center">Transition Cause</th>
1012 * <th align="center">New State</th>
1013 * <th align="center">Notes</th>
1014 * </tr>
1015 * </thead>
1016 * <tbody>
1017 * <tr>
1018 * <td align="center">INACTIVE</td>
1019 * <td align="center">Camera device finished AE scan</td>
1020 * <td align="center">CONVERGED</td>
1021 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1022 * </tr>
1023 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001024 * <td align="center">Any state (excluding LOCKED)</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001025 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
1026 * <td align="center">FLASH_REQUIRED</td>
1027 * <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
1028 * </tr>
1029 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001030 * <td align="center">Any state (excluding LOCKED)</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001031 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
1032 * <td align="center">CONVERGED</td>
1033 * <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
1034 * </tr>
1035 * <tr>
Zhijun Hefa95b042015-02-09 10:40:49 -08001036 * <td align="center">Any state (excluding LOCKED)</td>
1037 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL, converged</td>
1038 * <td align="center">FLASH_REQUIRED</td>
1039 * <td align="center">Converged but too dark w/o flash after a precapture sequence is canceled, transient states are skipped by camera device.</td>
1040 * </tr>
1041 * <tr>
1042 * <td align="center">Any state (excluding LOCKED)</td>
1043 * <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is CANCEL, converged</td>
1044 * <td align="center">CONVERGED</td>
1045 * <td align="center">Converged after a precapture sequenceis canceled, transient states are skipped by camera device.</td>
1046 * </tr>
1047 * <tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001048 * <td align="center">CONVERGED</td>
1049 * <td align="center">Camera device finished AE scan</td>
1050 * <td align="center">FLASH_REQUIRED</td>
1051 * <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
1052 * </tr>
1053 * <tr>
1054 * <td align="center">FLASH_REQUIRED</td>
1055 * <td align="center">Camera device finished AE scan</td>
1056 * <td align="center">CONVERGED</td>
1057 * <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
1058 * </tr>
1059 * </tbody>
1060 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001061 * <p><b>Possible values:</b>
1062 * <ul>
1063 * <li>{@link #CONTROL_AE_STATE_INACTIVE INACTIVE}</li>
1064 * <li>{@link #CONTROL_AE_STATE_SEARCHING SEARCHING}</li>
1065 * <li>{@link #CONTROL_AE_STATE_CONVERGED CONVERGED}</li>
1066 * <li>{@link #CONTROL_AE_STATE_LOCKED LOCKED}</li>
1067 * <li>{@link #CONTROL_AE_STATE_FLASH_REQUIRED FLASH_REQUIRED}</li>
1068 * <li>{@link #CONTROL_AE_STATE_PRECAPTURE PRECAPTURE}</li>
1069 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001070 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1071 * <p><b>Limited capability</b> -
1072 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1073 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001074 *
1075 * @see CaptureRequest#CONTROL_AE_LOCK
1076 * @see CaptureRequest#CONTROL_AE_MODE
1077 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
1078 * @see CaptureRequest#CONTROL_MODE
1079 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001080 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001081 * @see #CONTROL_AE_STATE_INACTIVE
1082 * @see #CONTROL_AE_STATE_SEARCHING
1083 * @see #CONTROL_AE_STATE_CONVERGED
1084 * @see #CONTROL_AE_STATE_LOCKED
1085 * @see #CONTROL_AE_STATE_FLASH_REQUIRED
1086 * @see #CONTROL_AE_STATE_PRECAPTURE
1087 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001088 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001089 public static final Key<Integer> CONTROL_AE_STATE =
1090 new Key<Integer>("android.control.aeState", int.class);
1091
1092 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001093 * <p>Whether auto-focus (AF) is currently enabled, and what
1094 * mode it is set to.</p>
Zhijun Hecc28a412014-02-24 15:11:23 -08001095 * <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 -08001096 * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>). Also note that
1097 * when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, the behavior of AF is device
1098 * dependent. It is recommended to lock AF by using {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} before
1099 * 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 -08001100 * <p>If the lens is controlled by the camera device auto-focus algorithm,
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001101 * 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 -07001102 * in result metadata.</p>
1103 * <p><b>Possible values:</b>
1104 * <ul>
1105 * <li>{@link #CONTROL_AF_MODE_OFF OFF}</li>
1106 * <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li>
1107 * <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li>
1108 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li>
1109 * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li>
1110 * <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li>
1111 * </ul></p>
1112 * <p><b>Available values for this device:</b><br>
1113 * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p>
1114 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001115 *
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001116 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001117 * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001118 * @see CaptureResult#CONTROL_AF_STATE
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001119 * @see CaptureRequest#CONTROL_AF_TRIGGER
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001120 * @see CaptureRequest#CONTROL_MODE
Zhijun Hecc28a412014-02-24 15:11:23 -08001121 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001122 * @see #CONTROL_AF_MODE_OFF
1123 * @see #CONTROL_AF_MODE_AUTO
1124 * @see #CONTROL_AF_MODE_MACRO
1125 * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
1126 * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
1127 * @see #CONTROL_AF_MODE_EDOF
1128 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001129 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001130 public static final Key<Integer> CONTROL_AF_MODE =
1131 new Key<Integer>("android.control.afMode", int.class);
1132
1133 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001134 * <p>List of metering areas to use for auto-focus.</p>
1135 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001136 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001137 * <p>The maximum number of focus areas supported by the device is determined by the value
1138 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001139 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001140 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001141 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1142 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001143 * bottom-right pixel in the active pixel array.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001144 * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001145 * for every pixel in the area. This means that a large metering area
1146 * with the same weight as a smaller area will have more effect in
1147 * the metering result. Metering areas can partially overlap and the
1148 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001149 * <p>The weights are relative to weights of other metering regions, so if only one region
1150 * is used, all non-zero weights will have the same effect. A region with 0 weight is
1151 * ignored.</p>
1152 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
1153 * camera device.</p>
1154 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
1155 * capture result metadata, the camera device will ignore the sections outside the crop
1156 * region and output only the intersection rectangle as the metering region in the result
1157 * metadata. If the region is entirely outside the crop region, it will be ignored and
1158 * not reported in the result metadata.</p>
1159 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
1160 * <p><b>Range of valid values:</b><br>
1161 * Coordinates must be between <code>[(0,0), (width, height))</code> of
1162 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001163 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001164 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001165 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001166 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001167 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001168 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001169 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -07001170 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS =
1171 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001172
1173 /**
Zhijun He379af012014-05-06 11:54:54 -07001174 * <p>Whether the camera device will trigger autofocus for this request.</p>
1175 * <p>This entry is normally set to IDLE, or is not
1176 * included at all in the request settings.</p>
1177 * <p>When included and set to START, the camera device will trigger the
1178 * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
1179 * <p>When set to CANCEL, the camera device will cancel any active trigger,
1180 * and return to its initial AF state.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001181 * <p>Generally, applications should set this entry to START or CANCEL for only a
1182 * single capture, and then return it to IDLE (or not set at all). Specifying
1183 * START for multiple captures in a row means restarting the AF operation over
1184 * and over again.</p>
1185 * <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 -07001186 * <p>Using the autofocus trigger and the precapture trigger {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}
1187 * simultaneously is allowed. However, since these triggers often require cooperation between
1188 * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
1189 * focus sweep), the camera device may delay acting on a later trigger until the previous
1190 * trigger has been fully handled. This may lead to longer intervals between the trigger and
1191 * changes to {@link CaptureResult#CONTROL_AF_STATE android.control.afState}, for example.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001192 * <p><b>Possible values:</b>
1193 * <ul>
1194 * <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li>
1195 * <li>{@link #CONTROL_AF_TRIGGER_START START}</li>
1196 * <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li>
1197 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001198 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001199 *
Eino-Ville Talvalaf8a2f572015-06-24 15:36:38 -07001200 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
Zhijun He379af012014-05-06 11:54:54 -07001201 * @see CaptureResult#CONTROL_AF_STATE
1202 * @see #CONTROL_AF_TRIGGER_IDLE
1203 * @see #CONTROL_AF_TRIGGER_START
1204 * @see #CONTROL_AF_TRIGGER_CANCEL
1205 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001206 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001207 public static final Key<Integer> CONTROL_AF_TRIGGER =
1208 new Key<Integer>("android.control.afTrigger", int.class);
1209
1210 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001211 * <p>Current state of auto-focus (AF) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001212 * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
1213 * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1214 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1215 * the algorithm states to INACTIVE.</p>
1216 * <p>The camera device can do several state transitions between two results, if it is
1217 * allowed by the state transition table. For example: INACTIVE may never actually be
1218 * seen in a result.</p>
1219 * <p>The state in the result is the state for this image (in sync with this image): if
1220 * AF state becomes FOCUSED, then the image data associated with this result should
1221 * be sharp.</p>
1222 * <p>Below are state transition tables for different AF modes.</p>
1223 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_OFF or AF_MODE_EDOF:</p>
1224 * <table>
1225 * <thead>
1226 * <tr>
1227 * <th align="center">State</th>
1228 * <th align="center">Transition Cause</th>
1229 * <th align="center">New State</th>
1230 * <th align="center">Notes</th>
1231 * </tr>
1232 * </thead>
1233 * <tbody>
1234 * <tr>
1235 * <td align="center">INACTIVE</td>
1236 * <td align="center"></td>
1237 * <td align="center">INACTIVE</td>
1238 * <td align="center">Never changes</td>
1239 * </tr>
1240 * </tbody>
1241 * </table>
1242 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1243 * <table>
1244 * <thead>
1245 * <tr>
1246 * <th align="center">State</th>
1247 * <th align="center">Transition Cause</th>
1248 * <th align="center">New State</th>
1249 * <th align="center">Notes</th>
1250 * </tr>
1251 * </thead>
1252 * <tbody>
1253 * <tr>
1254 * <td align="center">INACTIVE</td>
1255 * <td align="center">AF_TRIGGER</td>
1256 * <td align="center">ACTIVE_SCAN</td>
1257 * <td align="center">Start AF sweep, Lens now moving</td>
1258 * </tr>
1259 * <tr>
1260 * <td align="center">ACTIVE_SCAN</td>
1261 * <td align="center">AF sweep done</td>
1262 * <td align="center">FOCUSED_LOCKED</td>
1263 * <td align="center">Focused, Lens now locked</td>
1264 * </tr>
1265 * <tr>
1266 * <td align="center">ACTIVE_SCAN</td>
1267 * <td align="center">AF sweep done</td>
1268 * <td align="center">NOT_FOCUSED_LOCKED</td>
1269 * <td align="center">Not focused, Lens now locked</td>
1270 * </tr>
1271 * <tr>
1272 * <td align="center">ACTIVE_SCAN</td>
1273 * <td align="center">AF_CANCEL</td>
1274 * <td align="center">INACTIVE</td>
1275 * <td align="center">Cancel/reset AF, Lens now locked</td>
1276 * </tr>
1277 * <tr>
1278 * <td align="center">FOCUSED_LOCKED</td>
1279 * <td align="center">AF_CANCEL</td>
1280 * <td align="center">INACTIVE</td>
1281 * <td align="center">Cancel/reset AF</td>
1282 * </tr>
1283 * <tr>
1284 * <td align="center">FOCUSED_LOCKED</td>
1285 * <td align="center">AF_TRIGGER</td>
1286 * <td align="center">ACTIVE_SCAN</td>
1287 * <td align="center">Start new sweep, Lens now moving</td>
1288 * </tr>
1289 * <tr>
1290 * <td align="center">NOT_FOCUSED_LOCKED</td>
1291 * <td align="center">AF_CANCEL</td>
1292 * <td align="center">INACTIVE</td>
1293 * <td align="center">Cancel/reset AF</td>
1294 * </tr>
1295 * <tr>
1296 * <td align="center">NOT_FOCUSED_LOCKED</td>
1297 * <td align="center">AF_TRIGGER</td>
1298 * <td align="center">ACTIVE_SCAN</td>
1299 * <td align="center">Start new sweep, Lens now moving</td>
1300 * </tr>
1301 * <tr>
1302 * <td align="center">Any state</td>
1303 * <td align="center">Mode change</td>
1304 * <td align="center">INACTIVE</td>
1305 * <td align="center"></td>
1306 * </tr>
1307 * </tbody>
1308 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001309 * <p>For the above table, the camera device may skip reporting any state changes that happen
1310 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1311 * can be skipped in that manner is called a transient state.</p>
1312 * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1313 * state transitions listed in above table, it is also legal for the camera device to skip
1314 * one or more transient states between two results. See below table for examples:</p>
1315 * <table>
1316 * <thead>
1317 * <tr>
1318 * <th align="center">State</th>
1319 * <th align="center">Transition Cause</th>
1320 * <th align="center">New State</th>
1321 * <th align="center">Notes</th>
1322 * </tr>
1323 * </thead>
1324 * <tbody>
1325 * <tr>
1326 * <td align="center">INACTIVE</td>
1327 * <td align="center">AF_TRIGGER</td>
1328 * <td align="center">FOCUSED_LOCKED</td>
1329 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
1330 * </tr>
1331 * <tr>
1332 * <td align="center">INACTIVE</td>
1333 * <td align="center">AF_TRIGGER</td>
1334 * <td align="center">NOT_FOCUSED_LOCKED</td>
1335 * <td align="center">Focus failed after a scan, lens is now locked.</td>
1336 * </tr>
1337 * <tr>
1338 * <td align="center">FOCUSED_LOCKED</td>
1339 * <td align="center">AF_TRIGGER</td>
1340 * <td align="center">FOCUSED_LOCKED</td>
1341 * <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
1342 * </tr>
1343 * <tr>
1344 * <td align="center">NOT_FOCUSED_LOCKED</td>
1345 * <td align="center">AF_TRIGGER</td>
1346 * <td align="center">FOCUSED_LOCKED</td>
1347 * <td align="center">Focus is good after a scan, lens is not locked.</td>
1348 * </tr>
1349 * </tbody>
1350 * </table>
Zhijun He228f4f92014-01-16 17:22:05 -08001351 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
1352 * <table>
1353 * <thead>
1354 * <tr>
1355 * <th align="center">State</th>
1356 * <th align="center">Transition Cause</th>
1357 * <th align="center">New State</th>
1358 * <th align="center">Notes</th>
1359 * </tr>
1360 * </thead>
1361 * <tbody>
1362 * <tr>
1363 * <td align="center">INACTIVE</td>
1364 * <td align="center">Camera device initiates new scan</td>
1365 * <td align="center">PASSIVE_SCAN</td>
1366 * <td align="center">Start AF scan, Lens now moving</td>
1367 * </tr>
1368 * <tr>
1369 * <td align="center">INACTIVE</td>
1370 * <td align="center">AF_TRIGGER</td>
1371 * <td align="center">NOT_FOCUSED_LOCKED</td>
1372 * <td align="center">AF state query, Lens now locked</td>
1373 * </tr>
1374 * <tr>
1375 * <td align="center">PASSIVE_SCAN</td>
1376 * <td align="center">Camera device completes current scan</td>
1377 * <td align="center">PASSIVE_FOCUSED</td>
1378 * <td align="center">End AF scan, Lens now locked</td>
1379 * </tr>
1380 * <tr>
1381 * <td align="center">PASSIVE_SCAN</td>
1382 * <td align="center">Camera device fails current scan</td>
1383 * <td align="center">PASSIVE_UNFOCUSED</td>
1384 * <td align="center">End AF scan, Lens now locked</td>
1385 * </tr>
1386 * <tr>
1387 * <td align="center">PASSIVE_SCAN</td>
1388 * <td align="center">AF_TRIGGER</td>
1389 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001390 * <td align="center">Immediate transition, if focus is good. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001391 * </tr>
1392 * <tr>
1393 * <td align="center">PASSIVE_SCAN</td>
1394 * <td align="center">AF_TRIGGER</td>
1395 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001396 * <td align="center">Immediate transition, if focus is bad. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001397 * </tr>
1398 * <tr>
1399 * <td align="center">PASSIVE_SCAN</td>
1400 * <td align="center">AF_CANCEL</td>
1401 * <td align="center">INACTIVE</td>
1402 * <td align="center">Reset lens position, Lens now locked</td>
1403 * </tr>
1404 * <tr>
1405 * <td align="center">PASSIVE_FOCUSED</td>
1406 * <td align="center">Camera device initiates new scan</td>
1407 * <td align="center">PASSIVE_SCAN</td>
1408 * <td align="center">Start AF scan, Lens now moving</td>
1409 * </tr>
1410 * <tr>
1411 * <td align="center">PASSIVE_UNFOCUSED</td>
1412 * <td align="center">Camera device initiates new scan</td>
1413 * <td align="center">PASSIVE_SCAN</td>
1414 * <td align="center">Start AF scan, Lens now moving</td>
1415 * </tr>
1416 * <tr>
1417 * <td align="center">PASSIVE_FOCUSED</td>
1418 * <td align="center">AF_TRIGGER</td>
1419 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001420 * <td align="center">Immediate transition, lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001421 * </tr>
1422 * <tr>
1423 * <td align="center">PASSIVE_UNFOCUSED</td>
1424 * <td align="center">AF_TRIGGER</td>
1425 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001426 * <td align="center">Immediate transition, lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001427 * </tr>
1428 * <tr>
1429 * <td align="center">FOCUSED_LOCKED</td>
1430 * <td align="center">AF_TRIGGER</td>
1431 * <td align="center">FOCUSED_LOCKED</td>
1432 * <td align="center">No effect</td>
1433 * </tr>
1434 * <tr>
1435 * <td align="center">FOCUSED_LOCKED</td>
1436 * <td align="center">AF_CANCEL</td>
1437 * <td align="center">INACTIVE</td>
1438 * <td align="center">Restart AF scan</td>
1439 * </tr>
1440 * <tr>
1441 * <td align="center">NOT_FOCUSED_LOCKED</td>
1442 * <td align="center">AF_TRIGGER</td>
1443 * <td align="center">NOT_FOCUSED_LOCKED</td>
1444 * <td align="center">No effect</td>
1445 * </tr>
1446 * <tr>
1447 * <td align="center">NOT_FOCUSED_LOCKED</td>
1448 * <td align="center">AF_CANCEL</td>
1449 * <td align="center">INACTIVE</td>
1450 * <td align="center">Restart AF scan</td>
1451 * </tr>
1452 * </tbody>
1453 * </table>
1454 * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_PICTURE:</p>
1455 * <table>
1456 * <thead>
1457 * <tr>
1458 * <th align="center">State</th>
1459 * <th align="center">Transition Cause</th>
1460 * <th align="center">New State</th>
1461 * <th align="center">Notes</th>
1462 * </tr>
1463 * </thead>
1464 * <tbody>
1465 * <tr>
1466 * <td align="center">INACTIVE</td>
1467 * <td align="center">Camera device initiates new scan</td>
1468 * <td align="center">PASSIVE_SCAN</td>
1469 * <td align="center">Start AF scan, Lens now moving</td>
1470 * </tr>
1471 * <tr>
1472 * <td align="center">INACTIVE</td>
1473 * <td align="center">AF_TRIGGER</td>
1474 * <td align="center">NOT_FOCUSED_LOCKED</td>
1475 * <td align="center">AF state query, Lens now locked</td>
1476 * </tr>
1477 * <tr>
1478 * <td align="center">PASSIVE_SCAN</td>
1479 * <td align="center">Camera device completes current scan</td>
1480 * <td align="center">PASSIVE_FOCUSED</td>
1481 * <td align="center">End AF scan, Lens now locked</td>
1482 * </tr>
1483 * <tr>
1484 * <td align="center">PASSIVE_SCAN</td>
1485 * <td align="center">Camera device fails current scan</td>
1486 * <td align="center">PASSIVE_UNFOCUSED</td>
1487 * <td align="center">End AF scan, Lens now locked</td>
1488 * </tr>
1489 * <tr>
1490 * <td align="center">PASSIVE_SCAN</td>
1491 * <td align="center">AF_TRIGGER</td>
1492 * <td align="center">FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001493 * <td align="center">Eventual transition once the focus is good. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001494 * </tr>
1495 * <tr>
1496 * <td align="center">PASSIVE_SCAN</td>
1497 * <td align="center">AF_TRIGGER</td>
1498 * <td align="center">NOT_FOCUSED_LOCKED</td>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001499 * <td align="center">Eventual transition if cannot find focus. Lens now locked</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001500 * </tr>
1501 * <tr>
1502 * <td align="center">PASSIVE_SCAN</td>
1503 * <td align="center">AF_CANCEL</td>
1504 * <td align="center">INACTIVE</td>
1505 * <td align="center">Reset lens position, Lens now locked</td>
1506 * </tr>
1507 * <tr>
1508 * <td align="center">PASSIVE_FOCUSED</td>
1509 * <td align="center">Camera device initiates new scan</td>
1510 * <td align="center">PASSIVE_SCAN</td>
1511 * <td align="center">Start AF scan, Lens now moving</td>
1512 * </tr>
1513 * <tr>
1514 * <td align="center">PASSIVE_UNFOCUSED</td>
1515 * <td align="center">Camera device initiates new scan</td>
1516 * <td align="center">PASSIVE_SCAN</td>
1517 * <td align="center">Start AF scan, Lens now moving</td>
1518 * </tr>
1519 * <tr>
1520 * <td align="center">PASSIVE_FOCUSED</td>
1521 * <td align="center">AF_TRIGGER</td>
1522 * <td align="center">FOCUSED_LOCKED</td>
1523 * <td align="center">Immediate trans. Lens now locked</td>
1524 * </tr>
1525 * <tr>
1526 * <td align="center">PASSIVE_UNFOCUSED</td>
1527 * <td align="center">AF_TRIGGER</td>
1528 * <td align="center">NOT_FOCUSED_LOCKED</td>
1529 * <td align="center">Immediate trans. Lens now locked</td>
1530 * </tr>
1531 * <tr>
1532 * <td align="center">FOCUSED_LOCKED</td>
1533 * <td align="center">AF_TRIGGER</td>
1534 * <td align="center">FOCUSED_LOCKED</td>
1535 * <td align="center">No effect</td>
1536 * </tr>
1537 * <tr>
1538 * <td align="center">FOCUSED_LOCKED</td>
1539 * <td align="center">AF_CANCEL</td>
1540 * <td align="center">INACTIVE</td>
1541 * <td align="center">Restart AF scan</td>
1542 * </tr>
1543 * <tr>
1544 * <td align="center">NOT_FOCUSED_LOCKED</td>
1545 * <td align="center">AF_TRIGGER</td>
1546 * <td align="center">NOT_FOCUSED_LOCKED</td>
1547 * <td align="center">No effect</td>
1548 * </tr>
1549 * <tr>
1550 * <td align="center">NOT_FOCUSED_LOCKED</td>
1551 * <td align="center">AF_CANCEL</td>
1552 * <td align="center">INACTIVE</td>
1553 * <td align="center">Restart AF scan</td>
1554 * </tr>
1555 * </tbody>
1556 * </table>
Zhijun He60b19dc2014-02-24 10:19:20 -08001557 * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1558 * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1559 * camera device. When a trigger is included in a mode switch request, the trigger
1560 * will be evaluated in the context of the new mode in the request.
1561 * See below table for examples:</p>
1562 * <table>
1563 * <thead>
1564 * <tr>
1565 * <th align="center">State</th>
1566 * <th align="center">Transition Cause</th>
1567 * <th align="center">New State</th>
1568 * <th align="center">Notes</th>
1569 * </tr>
1570 * </thead>
1571 * <tbody>
1572 * <tr>
1573 * <td align="center">any state</td>
1574 * <td align="center">CAF--&gt;AUTO mode switch</td>
1575 * <td align="center">INACTIVE</td>
1576 * <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
1577 * </tr>
1578 * <tr>
1579 * <td align="center">any state</td>
1580 * <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
1581 * <td align="center">trigger-reachable states from INACTIVE</td>
1582 * <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
1583 * </tr>
1584 * <tr>
1585 * <td align="center">any state</td>
1586 * <td align="center">AUTO--&gt;CAF mode switch</td>
1587 * <td align="center">passively reachable states from INACTIVE</td>
1588 * <td align="center">Mode switch without trigger, passive transient state is skipped</td>
1589 * </tr>
1590 * </tbody>
1591 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001592 * <p><b>Possible values:</b>
1593 * <ul>
1594 * <li>{@link #CONTROL_AF_STATE_INACTIVE INACTIVE}</li>
1595 * <li>{@link #CONTROL_AF_STATE_PASSIVE_SCAN PASSIVE_SCAN}</li>
1596 * <li>{@link #CONTROL_AF_STATE_PASSIVE_FOCUSED PASSIVE_FOCUSED}</li>
1597 * <li>{@link #CONTROL_AF_STATE_ACTIVE_SCAN ACTIVE_SCAN}</li>
1598 * <li>{@link #CONTROL_AF_STATE_FOCUSED_LOCKED FOCUSED_LOCKED}</li>
1599 * <li>{@link #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED NOT_FOCUSED_LOCKED}</li>
1600 * <li>{@link #CONTROL_AF_STATE_PASSIVE_UNFOCUSED PASSIVE_UNFOCUSED}</li>
1601 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001602 * <p>This key is available on all devices.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001603 *
1604 * @see CaptureRequest#CONTROL_AF_MODE
1605 * @see CaptureRequest#CONTROL_MODE
1606 * @see CaptureRequest#CONTROL_SCENE_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001607 * @see #CONTROL_AF_STATE_INACTIVE
1608 * @see #CONTROL_AF_STATE_PASSIVE_SCAN
1609 * @see #CONTROL_AF_STATE_PASSIVE_FOCUSED
1610 * @see #CONTROL_AF_STATE_ACTIVE_SCAN
1611 * @see #CONTROL_AF_STATE_FOCUSED_LOCKED
1612 * @see #CONTROL_AF_STATE_NOT_FOCUSED_LOCKED
Eino-Ville Talvala9f880f72013-09-20 17:50:41 -07001613 * @see #CONTROL_AF_STATE_PASSIVE_UNFOCUSED
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001614 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001615 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001616 public static final Key<Integer> CONTROL_AF_STATE =
1617 new Key<Integer>("android.control.afState", int.class);
1618
1619 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001620 * <p>Whether auto-white balance (AWB) is currently locked to its
Zhijun He379af012014-05-06 11:54:54 -07001621 * latest calculated values.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001622 * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
1623 * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
1624 * <p>Since the camera device has a pipeline of in-flight requests, the settings that
1625 * get locked do not necessarily correspond to the settings that were present in the
1626 * latest capture result received from the camera device, since additional captures
1627 * and AWB updates may have occurred even before the result was sent out. If an
1628 * application is switching between automatic and manual control and wishes to eliminate
1629 * any flicker during the switch, the following procedure is recommended:</p>
1630 * <ol>
1631 * <li>Starting in auto-AWB mode:</li>
1632 * <li>Lock AWB</li>
1633 * <li>Wait for the first result to be output that has the AWB locked</li>
1634 * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
1635 * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
1636 * </ol>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001637 * <p>Note that AWB lock is only meaningful when
1638 * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes,
1639 * AWB is already fixed to a specific setting.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001640 * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
1641 * <p>This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001642 *
1643 * @see CaptureRequest#CONTROL_AWB_MODE
Zhijun He379af012014-05-06 11:54:54 -07001644 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001645 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001646 public static final Key<Boolean> CONTROL_AWB_LOCK =
1647 new Key<Boolean>("android.control.awbLock", boolean.class);
1648
1649 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001650 * <p>Whether auto-white balance (AWB) is currently setting the color
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001651 * transform fields, and what its illumination target
Zhijun Hecc28a412014-02-24 15:11:23 -08001652 * is.</p>
Zhijun He399f05d2014-01-15 11:31:30 -08001653 * <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 -07001654 * <p>When set to the ON mode, the camera device's auto-white balance
Zhijun He399f05d2014-01-15 11:31:30 -08001655 * routine is enabled, overriding the application's selected
1656 * {@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 -08001657 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}. Note that when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
1658 * is OFF, the behavior of AWB is device dependent. It is recommened to
1659 * also set AWB mode to OFF or lock AWB by using {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} before
1660 * setting AE mode to OFF.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001661 * <p>When set to the OFF mode, the camera device's auto-white balance
Zhijun Hecc28a412014-02-24 15:11:23 -08001662 * routine is disabled. The application manually controls the white
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08001663 * 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 -08001664 * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001665 * <p>When set to any other modes, the camera device's auto-white
1666 * balance routine is disabled. The camera device uses each
1667 * particular illumination target for white balance
1668 * adjustment. The application's values for
1669 * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform},
1670 * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
1671 * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001672 * <p><b>Possible values:</b>
1673 * <ul>
1674 * <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li>
1675 * <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li>
1676 * <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li>
1677 * <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li>
1678 * <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li>
1679 * <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li>
1680 * <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li>
1681 * <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li>
1682 * <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li>
1683 * </ul></p>
1684 * <p><b>Available values for this device:</b><br>
1685 * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001686 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001687 *
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001688 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Zhijun He5f2a47f2014-01-16 15:44:41 -08001689 * @see CaptureRequest#COLOR_CORRECTION_MODE
1690 * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001691 * @see CaptureRequest#CONTROL_AE_MODE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001692 * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES
Yin-Chia Yeh7144b5d2014-11-12 11:42:49 -08001693 * @see CaptureRequest#CONTROL_AWB_LOCK
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001694 * @see CaptureRequest#CONTROL_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001695 * @see #CONTROL_AWB_MODE_OFF
1696 * @see #CONTROL_AWB_MODE_AUTO
1697 * @see #CONTROL_AWB_MODE_INCANDESCENT
1698 * @see #CONTROL_AWB_MODE_FLUORESCENT
1699 * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
1700 * @see #CONTROL_AWB_MODE_DAYLIGHT
1701 * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
1702 * @see #CONTROL_AWB_MODE_TWILIGHT
1703 * @see #CONTROL_AWB_MODE_SHADE
1704 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001705 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001706 public static final Key<Integer> CONTROL_AWB_MODE =
1707 new Key<Integer>("android.control.awbMode", int.class);
1708
1709 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001710 * <p>List of metering areas to use for auto-white-balance illuminant
Ruben Brunkf59521d2014-02-03 17:14:33 -08001711 * estimation.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001712 * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0.
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001713 * Otherwise will always be present.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001714 * <p>The maximum number of regions supported by the device is determined by the value
1715 * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08001716 * <p>The coordinate system is based on the active pixel array,
Timothy Knight2629f272013-09-03 17:23:23 -07001717 * with (0,0) being the top-left pixel in the active pixel array, and
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001718 * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
1719 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
Yin-Chia Yeh97f1c852014-05-28 16:36:05 -07001720 * bottom-right pixel in the active pixel array.</p>
1721 * <p>The weight must range from 0 to 1000, and represents a weight
1722 * for every pixel in the area. This means that a large metering area
1723 * with the same weight as a smaller area will have more effect in
1724 * the metering result. Metering areas can partially overlap and the
1725 * camera device will add the weights in the overlap region.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001726 * <p>The weights are relative to weights of other white balance metering regions, so if
1727 * only one region is used, all non-zero weights will have the same effect. A region with
1728 * 0 weight is ignored.</p>
1729 * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
1730 * camera device.</p>
1731 * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in
1732 * capture result metadata, the camera device will ignore the sections outside the crop
1733 * region and output only the intersection rectangle as the metering region in the result
1734 * metadata. If the region is entirely outside the crop region, it will be ignored and
1735 * not reported in the result metadata.</p>
1736 * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
1737 * <p><b>Range of valid values:</b><br>
1738 * Coordinates must be between <code>[(0,0), (width, height))</code> of
1739 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001740 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001741 *
Yin-Chia Yeh808150f2014-09-08 15:48:47 -07001742 * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001743 * @see CaptureRequest#SCALER_CROP_REGION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08001744 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001745 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001746 @PublicKey
Yin-Chia Yeh817f8932014-05-19 10:23:27 -07001747 public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS =
1748 new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001749
1750 /**
Zhijun He379af012014-05-06 11:54:54 -07001751 * <p>Information to the camera device 3A (auto-exposure,
1752 * auto-focus, auto-white balance) routines about the purpose
1753 * of this capture, to help the camera device to decide optimal 3A
1754 * strategy.</p>
1755 * <p>This control (except for MANUAL) is only effective if
1756 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07001757 * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
Chien-Yu Chen8062d312015-05-12 14:24:10 -07001758 * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if
Zhijun He513f7c32015-04-24 18:23:54 -07001759 * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are
1760 * always supported.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001761 * <p><b>Possible values:</b>
1762 * <ul>
1763 * <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li>
1764 * <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li>
1765 * <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li>
1766 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li>
1767 * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li>
1768 * <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
1769 * <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li>
1770 * </ul></p>
1771 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001772 *
1773 * @see CaptureRequest#CONTROL_MODE
1774 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
1775 * @see #CONTROL_CAPTURE_INTENT_CUSTOM
1776 * @see #CONTROL_CAPTURE_INTENT_PREVIEW
1777 * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
1778 * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
1779 * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
1780 * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
1781 * @see #CONTROL_CAPTURE_INTENT_MANUAL
1782 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001783 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001784 public static final Key<Integer> CONTROL_CAPTURE_INTENT =
1785 new Key<Integer>("android.control.captureIntent", int.class);
1786
1787 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07001788 * <p>Current state of auto-white balance (AWB) algorithm.</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001789 * <p>Switching between or enabling AWB modes ({@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}) always
1790 * resets the AWB state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
1791 * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
1792 * the algorithm states to INACTIVE.</p>
1793 * <p>The camera device can do several state transitions between two results, if it is
1794 * allowed by the state transition table. So INACTIVE may never actually be seen in
1795 * a result.</p>
1796 * <p>The state in the result is the state for this image (in sync with this image): if
1797 * AWB state becomes CONVERGED, then the image data associated with this result should
1798 * be good to use.</p>
1799 * <p>Below are state transition tables for different AWB modes.</p>
1800 * <p>When <code>{@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} != AWB_MODE_AUTO</code>:</p>
1801 * <table>
1802 * <thead>
1803 * <tr>
1804 * <th align="center">State</th>
1805 * <th align="center">Transition Cause</th>
1806 * <th align="center">New State</th>
1807 * <th align="center">Notes</th>
1808 * </tr>
1809 * </thead>
1810 * <tbody>
1811 * <tr>
1812 * <td align="center">INACTIVE</td>
1813 * <td align="center"></td>
1814 * <td align="center">INACTIVE</td>
1815 * <td align="center">Camera device auto white balance algorithm is disabled</td>
1816 * </tr>
1817 * </tbody>
1818 * </table>
1819 * <p>When {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is AWB_MODE_AUTO:</p>
1820 * <table>
1821 * <thead>
1822 * <tr>
1823 * <th align="center">State</th>
1824 * <th align="center">Transition Cause</th>
1825 * <th align="center">New State</th>
1826 * <th align="center">Notes</th>
1827 * </tr>
1828 * </thead>
1829 * <tbody>
1830 * <tr>
1831 * <td align="center">INACTIVE</td>
1832 * <td align="center">Camera device initiates AWB scan</td>
1833 * <td align="center">SEARCHING</td>
1834 * <td align="center">Values changing</td>
1835 * </tr>
1836 * <tr>
1837 * <td align="center">INACTIVE</td>
1838 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1839 * <td align="center">LOCKED</td>
1840 * <td align="center">Values locked</td>
1841 * </tr>
1842 * <tr>
1843 * <td align="center">SEARCHING</td>
1844 * <td align="center">Camera device finishes AWB scan</td>
1845 * <td align="center">CONVERGED</td>
1846 * <td align="center">Good values, not changing</td>
1847 * </tr>
1848 * <tr>
1849 * <td align="center">SEARCHING</td>
1850 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1851 * <td align="center">LOCKED</td>
1852 * <td align="center">Values locked</td>
1853 * </tr>
1854 * <tr>
1855 * <td align="center">CONVERGED</td>
1856 * <td align="center">Camera device initiates AWB scan</td>
1857 * <td align="center">SEARCHING</td>
1858 * <td align="center">Values changing</td>
1859 * </tr>
1860 * <tr>
1861 * <td align="center">CONVERGED</td>
1862 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is ON</td>
1863 * <td align="center">LOCKED</td>
1864 * <td align="center">Values locked</td>
1865 * </tr>
1866 * <tr>
1867 * <td align="center">LOCKED</td>
1868 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1869 * <td align="center">SEARCHING</td>
1870 * <td align="center">Values not good after unlock</td>
1871 * </tr>
Zhijun He60b19dc2014-02-24 10:19:20 -08001872 * </tbody>
1873 * </table>
1874 * <p>For the above table, the camera device may skip reporting any state changes that happen
1875 * without application intervention (i.e. mode switch, trigger, locking). Any state that
1876 * can be skipped in that manner is called a transient state.</p>
1877 * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1878 * listed in above table, it is also legal for the camera device to skip one or more
1879 * transient states between two results. See below table for examples:</p>
1880 * <table>
1881 * <thead>
1882 * <tr>
1883 * <th align="center">State</th>
1884 * <th align="center">Transition Cause</th>
1885 * <th align="center">New State</th>
1886 * <th align="center">Notes</th>
1887 * </tr>
1888 * </thead>
1889 * <tbody>
1890 * <tr>
1891 * <td align="center">INACTIVE</td>
1892 * <td align="center">Camera device finished AWB scan</td>
1893 * <td align="center">CONVERGED</td>
1894 * <td align="center">Values are already good, transient states are skipped by camera device.</td>
1895 * </tr>
Zhijun He228f4f92014-01-16 17:22:05 -08001896 * <tr>
1897 * <td align="center">LOCKED</td>
1898 * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
1899 * <td align="center">CONVERGED</td>
Zhijun He60b19dc2014-02-24 10:19:20 -08001900 * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
Zhijun He228f4f92014-01-16 17:22:05 -08001901 * </tr>
1902 * </tbody>
1903 * </table>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001904 * <p><b>Possible values:</b>
1905 * <ul>
1906 * <li>{@link #CONTROL_AWB_STATE_INACTIVE INACTIVE}</li>
1907 * <li>{@link #CONTROL_AWB_STATE_SEARCHING SEARCHING}</li>
1908 * <li>{@link #CONTROL_AWB_STATE_CONVERGED CONVERGED}</li>
1909 * <li>{@link #CONTROL_AWB_STATE_LOCKED LOCKED}</li>
1910 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001911 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1912 * <p><b>Limited capability</b> -
1913 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
1914 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He228f4f92014-01-16 17:22:05 -08001915 *
1916 * @see CaptureRequest#CONTROL_AWB_LOCK
1917 * @see CaptureRequest#CONTROL_AWB_MODE
1918 * @see CaptureRequest#CONTROL_MODE
1919 * @see CaptureRequest#CONTROL_SCENE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001920 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001921 * @see #CONTROL_AWB_STATE_INACTIVE
1922 * @see #CONTROL_AWB_STATE_SEARCHING
1923 * @see #CONTROL_AWB_STATE_CONVERGED
1924 * @see #CONTROL_AWB_STATE_LOCKED
1925 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001926 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07001927 public static final Key<Integer> CONTROL_AWB_STATE =
1928 new Key<Integer>("android.control.awbState", int.class);
1929
1930 /**
Zhijun He379af012014-05-06 11:54:54 -07001931 * <p>A special color effect to apply.</p>
1932 * <p>When this mode is set, a color effect will be applied
1933 * to images produced by the camera device. The interpretation
1934 * and implementation of these color effects is left to the
1935 * implementor of the camera device, and should not be
1936 * depended on to be consistent (or present) across all
1937 * devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001938 * <p><b>Possible values:</b>
1939 * <ul>
1940 * <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li>
1941 * <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li>
1942 * <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li>
1943 * <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li>
1944 * <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li>
1945 * <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li>
1946 * <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li>
1947 * <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li>
1948 * <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li>
1949 * </ul></p>
1950 * <p><b>Available values for this device:</b><br>
1951 * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001952 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07001953 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001954 * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
Zhijun He379af012014-05-06 11:54:54 -07001955 * @see #CONTROL_EFFECT_MODE_OFF
1956 * @see #CONTROL_EFFECT_MODE_MONO
1957 * @see #CONTROL_EFFECT_MODE_NEGATIVE
1958 * @see #CONTROL_EFFECT_MODE_SOLARIZE
1959 * @see #CONTROL_EFFECT_MODE_SEPIA
1960 * @see #CONTROL_EFFECT_MODE_POSTERIZE
1961 * @see #CONTROL_EFFECT_MODE_WHITEBOARD
1962 * @see #CONTROL_EFFECT_MODE_BLACKBOARD
1963 * @see #CONTROL_EFFECT_MODE_AQUA
1964 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07001965 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07001966 public static final Key<Integer> CONTROL_EFFECT_MODE =
1967 new Key<Integer>("android.control.effectMode", int.class);
1968
1969 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001970 * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
Zhijun Hecc28a412014-02-24 15:11:23 -08001971 * routines.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001972 * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
Zhijun He5f2a47f2014-01-16 15:44:41 -08001973 * by the camera device is disabled. The application must set the fields for
Zhijun Hef3537422013-12-16 16:56:35 -08001974 * capture parameters itself.</p>
1975 * <p>When set to AUTO, the individual algorithm controls in
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001976 * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
Zhijun Hef3537422013-12-16 16:56:35 -08001977 * <p>When set to USE_SCENE_MODE, the individual controls in
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08001978 * android.control.* are mostly disabled, and the camera device
1979 * implements one of the scene mode settings (such as ACTION,
1980 * SUNSET, or PARTY) as it wishes. The camera device scene mode
1981 * 3A settings are provided by {@link android.hardware.camera2.CaptureResult capture results}.</p>
Zhijun He2d5e8972014-02-07 16:13:46 -08001982 * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1983 * is that this frame will not be used by camera device background 3A statistics
1984 * update, as if this frame is never captured. This mode can be used in the scenario
1985 * where the application doesn't want a 3A manual control capture to affect
1986 * the subsequent auto 3A capture results.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07001987 * <p><b>Possible values:</b>
1988 * <ul>
1989 * <li>{@link #CONTROL_MODE_OFF OFF}</li>
1990 * <li>{@link #CONTROL_MODE_AUTO AUTO}</li>
1991 * <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li>
1992 * <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li>
1993 * </ul></p>
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -08001994 * <p><b>Available values for this device:</b><br>
1995 * {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07001996 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08001997 *
1998 * @see CaptureRequest#CONTROL_AF_MODE
Yin-Chia Yehd9fc67c2015-01-30 10:47:22 -08001999 * @see CameraCharacteristics#CONTROL_AVAILABLE_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002000 * @see #CONTROL_MODE_OFF
2001 * @see #CONTROL_MODE_AUTO
2002 * @see #CONTROL_MODE_USE_SCENE_MODE
Zhijun He2d5e8972014-02-07 16:13:46 -08002003 * @see #CONTROL_MODE_OFF_KEEP_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002004 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002005 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002006 public static final Key<Integer> CONTROL_MODE =
2007 new Key<Integer>("android.control.mode", int.class);
2008
2009 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002010 * <p>Control for which scene mode is currently active.</p>
2011 * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
2012 * capture settings.</p>
Zhijun He379af012014-05-06 11:54:54 -07002013 * <p>This is the mode that that is active when
Zhijun Heee2ebde2015-06-16 19:58:11 -07002014 * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
2015 * 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}
2016 * while in use.</p>
Zhijun He379af012014-05-06 11:54:54 -07002017 * <p>The interpretation and implementation of these scene modes is left
2018 * to the implementor of the camera device. Their behavior will not be
2019 * consistent across all devices, and any given device may only implement
2020 * a subset of these modes.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002021 * <p><b>Possible values:</b>
2022 * <ul>
2023 * <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li>
2024 * <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li>
2025 * <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li>
2026 * <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li>
2027 * <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li>
2028 * <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li>
2029 * <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li>
2030 * <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li>
2031 * <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li>
2032 * <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li>
2033 * <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li>
2034 * <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li>
2035 * <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li>
2036 * <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li>
2037 * <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li>
2038 * <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li>
2039 * <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li>
2040 * <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li>
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002041 * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002042 * </ul></p>
2043 * <p><b>Available values for this device:</b><br>
2044 * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002045 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07002046 *
2047 * @see CaptureRequest#CONTROL_AE_MODE
2048 * @see CaptureRequest#CONTROL_AF_MODE
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002049 * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES
Zhijun He379af012014-05-06 11:54:54 -07002050 * @see CaptureRequest#CONTROL_AWB_MODE
2051 * @see CaptureRequest#CONTROL_MODE
2052 * @see #CONTROL_SCENE_MODE_DISABLED
2053 * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
2054 * @see #CONTROL_SCENE_MODE_ACTION
2055 * @see #CONTROL_SCENE_MODE_PORTRAIT
2056 * @see #CONTROL_SCENE_MODE_LANDSCAPE
2057 * @see #CONTROL_SCENE_MODE_NIGHT
2058 * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
2059 * @see #CONTROL_SCENE_MODE_THEATRE
2060 * @see #CONTROL_SCENE_MODE_BEACH
2061 * @see #CONTROL_SCENE_MODE_SNOW
2062 * @see #CONTROL_SCENE_MODE_SUNSET
2063 * @see #CONTROL_SCENE_MODE_STEADYPHOTO
2064 * @see #CONTROL_SCENE_MODE_FIREWORKS
2065 * @see #CONTROL_SCENE_MODE_SPORTS
2066 * @see #CONTROL_SCENE_MODE_PARTY
2067 * @see #CONTROL_SCENE_MODE_CANDLELIGHT
2068 * @see #CONTROL_SCENE_MODE_BARCODE
Zhijun Hee0404182014-06-26 13:17:09 -07002069 * @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO
Eino-Ville Talvalaf4eac122014-12-05 11:10:15 -08002070 * @see #CONTROL_SCENE_MODE_HDR
Zhijun He379af012014-05-06 11:54:54 -07002071 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002072 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07002073 public static final Key<Integer> CONTROL_SCENE_MODE =
2074 new Key<Integer>("android.control.sceneMode", int.class);
2075
2076 /**
2077 * <p>Whether video stabilization is
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002078 * active.</p>
Jianing Wei2813b0f2015-09-29 14:24:36 -07002079 * <p>Video stabilization automatically warps images from
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002080 * the camera in order to stabilize motion between consecutive frames.</p>
Zhijun He379af012014-05-06 11:54:54 -07002081 * <p>If enabled, video stabilization can modify the
Zhijun He45fa43a12014-06-13 18:29:37 -07002082 * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002083 * <p>Switching between different video stabilization modes may take several
2084 * frames to initialize, the camera device will report the current mode
2085 * in capture result metadata. For example, When "ON" mode is requested,
2086 * the video stabilization modes in the first several capture results may
2087 * still be "OFF", and it will become "ON" when the initialization is
2088 * done.</p>
Jianing Wei2813b0f2015-09-29 14:24:36 -07002089 * <p>In addition, not all recording sizes or frame rates may be supported for
2090 * stabilization by a device that reports stabilization support. It is guaranteed
2091 * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
2092 * the recording resolution is less than or equal to 1920 x 1080 (width less than
2093 * or equal to 1920, height less than or equal to 1080), and the recording
2094 * frame rate is less than or equal to 30fps. At other sizes, the CaptureResult
2095 * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return
2096 * OFF if the recording output is not stabilized, or if there are no output
2097 * Surface types that can be stabilized.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002098 * <p>If a camera device supports both this mode and OIS
2099 * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may
2100 * produce undesirable interaction, so it is recommended not to enable
2101 * both at the same time.</p>
2102 * <p><b>Possible values:</b>
2103 * <ul>
2104 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li>
2105 * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li>
2106 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002107 * <p>This key is available on all devices.</p>
Zhijun He379af012014-05-06 11:54:54 -07002108 *
Jianing Wei2813b0f2015-09-29 14:24:36 -07002109 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Zhijun He45fa43a12014-06-13 18:29:37 -07002110 * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE
Zhijun He379af012014-05-06 11:54:54 -07002111 * @see CaptureRequest#SCALER_CROP_REGION
2112 * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF
2113 * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON
2114 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002115 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07002116 public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE =
2117 new Key<Integer>("android.control.videoStabilizationMode", int.class);
2118
2119 /**
Yin-Chia Yeh33052d32016-04-11 16:39:02 -07002120 * <p>The amount of additional sensitivity boost applied to output images
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08002121 * after RAW sensor data is captured.</p>
2122 * <p>Some camera devices support additional digital sensitivity boosting in the
2123 * camera processing pipeline after sensor RAW image is captured.
2124 * Such a boost will be applied to YUV/JPEG format output images but will not
2125 * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
Yin-Chia Yeh33052d32016-04-11 16:39:02 -07002126 * <p>This key will be <code>null</code> for devices that do not support any RAW format
2127 * outputs. For devices that do support RAW format outputs, this key will always
2128 * present, and if a device does not support post RAW sensitivity boost, it will
2129 * list <code>100</code> in this key.</p>
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08002130 * <p>If the camera device cannot apply the exact boost requested, it will reduce the
2131 * boost to the nearest supported value.
2132 * The final boost value used will be available in the output capture result.</p>
2133 * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
2134 * of such device will have the total sensitivity of
Yin-Chia Yeh67e61b62016-01-26 13:27:35 -08002135 * <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 -08002136 * The sensitivity of RAW format images will always be <code>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</code></p>
2137 * <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
2138 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
2139 * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p>
2140 * <p><b>Range of valid values:</b><br>
2141 * {@link CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE android.control.postRawSensitivityBoostRange}</p>
2142 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2143 *
2144 * @see CaptureRequest#CONTROL_AE_MODE
2145 * @see CaptureRequest#CONTROL_MODE
2146 * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
2147 * @see CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE
2148 * @see CaptureRequest#SENSOR_SENSITIVITY
2149 */
2150 @PublicKey
2151 public static final Key<Integer> CONTROL_POST_RAW_SENSITIVITY_BOOST =
2152 new Key<Integer>("android.control.postRawSensitivityBoost", int.class);
2153
2154 /**
Chien-Yu Chene4491712017-01-11 11:14:06 -08002155 * <p>Allow camera device to enable zero-shutter-lag mode for requests with
2156 * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE.</p>
2157 * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
2158 * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
2159 * produce output images for a zero-shutter-lag request. The result metadata including the
2160 * {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} reflects the source frames used to produce output images.
2161 * Therefore, the contents of the output images and the result metadata may be out of order
2162 * compared to previous regular requests. enableZsl does not affect requests with other
2163 * capture intents.</p>
2164 * <p>For example, when requests are submitted in the following order:
2165 * Request A: enableZsl is ON, {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} is PREVIEW
2166 * Request B: enableZsl is ON, {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} is STILL_CAPTURE</p>
2167 * <p>The output images for request B may have contents captured before the output images for
2168 * request A, and the result metadata for request B may be older than the result metadata for
2169 * request A.</p>
Chien-Yu Chen1d72ee32017-04-18 15:23:06 -07002170 * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in
2171 * the past for requests with STILL_CAPTURE capture intent.</p>
2172 * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
2173 * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
2174 * <code>false</code> if present.</p>
2175 * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
2176 * capture templates is always <code>false</code> if present.</p>
Chien-Yu Chen81026382017-05-03 12:30:58 -07002177 * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
Chien-Yu Chene4491712017-01-11 11:14:06 -08002178 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2179 *
2180 * @see CaptureRequest#CONTROL_CAPTURE_INTENT
2181 * @see CaptureResult#SENSOR_TIMESTAMP
2182 */
2183 @PublicKey
2184 public static final Key<Boolean> CONTROL_ENABLE_ZSL =
2185 new Key<Boolean>("android.control.enableZsl", boolean.class);
2186
2187 /**
Chien-Yu Chen2adc8ec2017-12-07 14:45:50 -08002188 * <p>Whether a significant scene change is detected within the currently-set AF
2189 * region(s).</p>
2190 * <p>When the camera focus routine detects a change in the scene it is looking at,
2191 * such as a large shift in camera viewpoint, significant motion in the scene, or a
2192 * significant illumination change, this value will be set to DETECTED for a single capture
2193 * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
2194 * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.</p>
2195 * <p>afSceneChange may be DETECTED only if afMode is AF_MODE_CONTINUOUS_VIDEO or
2196 * AF_MODE_CONTINUOUS_PICTURE. In other AF modes, afSceneChange must be NOT_DETECTED.</p>
2197 * <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 -08002198 * <p><b>Possible values:</b>
2199 * <ul>
2200 * <li>{@link #CONTROL_AF_SCENE_CHANGE_NOT_DETECTED NOT_DETECTED}</li>
2201 * <li>{@link #CONTROL_AF_SCENE_CHANGE_DETECTED DETECTED}</li>
2202 * </ul></p>
2203 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2204 * @see #CONTROL_AF_SCENE_CHANGE_NOT_DETECTED
2205 * @see #CONTROL_AF_SCENE_CHANGE_DETECTED
2206 */
2207 @PublicKey
2208 public static final Key<Integer> CONTROL_AF_SCENE_CHANGE =
2209 new Key<Integer>("android.control.afSceneChange", int.class);
2210
2211 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002212 * <p>Operation mode for edge
Zhijun Hecc28a412014-02-24 15:11:23 -08002213 * enhancement.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002214 * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
2215 * no enhancement will be applied by the camera device.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002216 * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun He28079362013-12-17 10:35:40 -08002217 * will be applied. HIGH_QUALITY mode indicates that the
Zhijun He5f2a47f2014-01-16 15:44:41 -08002218 * camera device will use the highest-quality enhancement algorithms,
2219 * even if it slows down capture rate. FAST means the camera device will
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002220 * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
2221 * edge enhancement will slow down capture rate. Every output stream will have a similar
2222 * amount of enhancement applied.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002223 * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2224 * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2225 * into a final capture when triggered by the user. In this mode, the camera device applies
2226 * edge enhancement to low-resolution streams (below maximum recording resolution) to
2227 * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
2228 * since those will be reprocessed later if necessary.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08002229 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
2230 * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002231 * The camera device may adjust its internal edge enhancement parameters for best
Zhijun He0e99c222015-01-29 15:26:05 -08002232 * 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 -07002233 * <p><b>Possible values:</b>
2234 * <ul>
2235 * <li>{@link #EDGE_MODE_OFF OFF}</li>
2236 * <li>{@link #EDGE_MODE_FAST FAST}</li>
2237 * <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002238 * <li>{@link #EDGE_MODE_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002239 * </ul></p>
2240 * <p><b>Available values for this device:</b><br>
2241 * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002242 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2243 * <p><b>Full capability</b> -
2244 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2245 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002246 *
2247 * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002248 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0e99c222015-01-29 15:26:05 -08002249 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002250 * @see #EDGE_MODE_OFF
2251 * @see #EDGE_MODE_FAST
2252 * @see #EDGE_MODE_HIGH_QUALITY
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002253 * @see #EDGE_MODE_ZERO_SHUTTER_LAG
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002254 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002255 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002256 public static final Key<Integer> EDGE_MODE =
2257 new Key<Integer>("android.edge.mode", int.class);
2258
2259 /**
Zhijun He66d065a2014-01-16 18:18:50 -08002260 * <p>The desired mode for for the camera device's flash control.</p>
2261 * <p>This control is only effective when flash unit is available
Zhijun He153ac102014-02-03 12:25:12 -08002262 * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
Zhijun He66d065a2014-01-16 18:18:50 -08002263 * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
2264 * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2265 * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2266 * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2267 * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2268 * device's auto-exposure routine's result. When used in still capture case, this
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002269 * control should be used along with auto-exposure (AE) precapture metering sequence
Zhijun He66d065a2014-01-16 18:18:50 -08002270 * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
2271 * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2272 * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002273 * <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 -07002274 * <p><b>Possible values:</b>
2275 * <ul>
2276 * <li>{@link #FLASH_MODE_OFF OFF}</li>
2277 * <li>{@link #FLASH_MODE_SINGLE SINGLE}</li>
2278 * <li>{@link #FLASH_MODE_TORCH TORCH}</li>
2279 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002280 * <p>This key is available on all devices.</p>
Zhijun He66d065a2014-01-16 18:18:50 -08002281 *
2282 * @see CaptureRequest#CONTROL_AE_MODE
2283 * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
2284 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Zhijun Heca1b73a2014-02-03 12:39:53 -08002285 * @see CaptureResult#FLASH_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002286 * @see #FLASH_MODE_OFF
2287 * @see #FLASH_MODE_SINGLE
2288 * @see #FLASH_MODE_TORCH
2289 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002290 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002291 public static final Key<Integer> FLASH_MODE =
2292 new Key<Integer>("android.flash.mode", int.class);
2293
2294 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002295 * <p>Current state of the flash
Zhijun Heca1b73a2014-02-03 12:39:53 -08002296 * unit.</p>
2297 * <p>When the camera device doesn't have flash unit
2298 * (i.e. <code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == false</code>), this state will always be UNAVAILABLE.
2299 * Other states indicate the current flash status.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002300 * <p>In certain conditions, this will be available on LEGACY devices:</p>
2301 * <ul>
2302 * <li>Flash-less cameras always return UNAVAILABLE.</li>
2303 * <li>Using {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>==</code> ON_ALWAYS_FLASH
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002304 * will always return FIRED.</li>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002305 * <li>Using {@link CaptureRequest#FLASH_MODE android.flash.mode} <code>==</code> TORCH
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002306 * will always return FIRED.</li>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002307 * </ul>
2308 * <p>In all other conditions the state will not be available on
2309 * LEGACY devices (i.e. it will be <code>null</code>).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002310 * <p><b>Possible values:</b>
2311 * <ul>
2312 * <li>{@link #FLASH_STATE_UNAVAILABLE UNAVAILABLE}</li>
2313 * <li>{@link #FLASH_STATE_CHARGING CHARGING}</li>
2314 * <li>{@link #FLASH_STATE_READY READY}</li>
2315 * <li>{@link #FLASH_STATE_FIRED FIRED}</li>
2316 * <li>{@link #FLASH_STATE_PARTIAL PARTIAL}</li>
2317 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002318 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2319 * <p><b>Limited capability</b> -
2320 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2321 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002322 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002323 * @see CaptureRequest#CONTROL_AE_MODE
Zhijun Heca1b73a2014-02-03 12:39:53 -08002324 * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002325 * @see CaptureRequest#FLASH_MODE
2326 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002327 * @see #FLASH_STATE_UNAVAILABLE
2328 * @see #FLASH_STATE_CHARGING
2329 * @see #FLASH_STATE_READY
2330 * @see #FLASH_STATE_FIRED
Zhijun He8dda7272014-03-25 13:49:30 -07002331 * @see #FLASH_STATE_PARTIAL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002332 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002333 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002334 public static final Key<Integer> FLASH_STATE =
2335 new Key<Integer>("android.flash.state", int.class);
2336
2337 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002338 * <p>Operational mode for hot pixel correction.</p>
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002339 * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002340 * that do not accurately measure the incoming light (i.e. pixels that
2341 * are stuck at an arbitrary value or are oversensitive).</p>
2342 * <p><b>Possible values:</b>
2343 * <ul>
2344 * <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li>
2345 * <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li>
2346 * <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
2347 * </ul></p>
2348 * <p><b>Available values for this device:</b><br>
2349 * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002350 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08002351 *
2352 * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002353 * @see #HOT_PIXEL_MODE_OFF
2354 * @see #HOT_PIXEL_MODE_FAST
2355 * @see #HOT_PIXEL_MODE_HIGH_QUALITY
2356 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002357 @PublicKey
Ruben Brunkeba1b3a2014-02-07 18:23:50 -08002358 public static final Key<Integer> HOT_PIXEL_MODE =
2359 new Key<Integer>("android.hotPixel.mode", int.class);
2360
2361 /**
Ruben Brunk57493682014-05-27 18:58:08 -07002362 * <p>A location object to use when generating image GPS metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002363 * <p>Setting a location object in a request will include the GPS coordinates of the location
2364 * into any JPEG images captured based on the request. These coordinates can then be
2365 * viewed by anyone who receives the JPEG image.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002366 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002367 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002368 @PublicKey
2369 @SyntheticKey
Ruben Brunk57493682014-05-27 18:58:08 -07002370 public static final Key<android.location.Location> JPEG_GPS_LOCATION =
2371 new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class);
2372
2373 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002374 * <p>GPS coordinates to include in output JPEG
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002375 * EXIF.</p>
2376 * <p><b>Range of valid values:</b><br>
2377 * (-180 - 180], [-90,90], [-inf, inf]</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002378 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002379 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002380 */
2381 public static final Key<double[]> JPEG_GPS_COORDINATES =
2382 new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
2383
2384 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002385 * <p>32 characters describing GPS algorithm to
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002386 * include in EXIF.</p>
2387 * <p><b>Units</b>: UTF-8 null-terminated string</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002388 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002389 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002390 */
2391 public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
2392 new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
2393
2394 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002395 * <p>Time GPS fix was made to include in
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002396 * EXIF.</p>
2397 * <p><b>Units</b>: UTC in seconds since January 1, 1970</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002398 * <p>This key is available on all devices.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07002399 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002400 */
2401 public static final Key<Long> JPEG_GPS_TIMESTAMP =
2402 new Key<Long>("android.jpeg.gpsTimestamp", long.class);
2403
2404 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002405 * <p>The orientation for a JPEG image.</p>
2406 * <p>The clockwise rotation angle in degrees, relative to the orientation
2407 * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2408 * upright.</p>
2409 * <p>Camera devices may either encode this value into the JPEG EXIF header, or
Yin-Chia Yehd49ebcc2015-03-27 13:54:04 -07002410 * rotate the image data to match this orientation. When the image data is rotated,
2411 * the thumbnail data will also be rotated.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002412 * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2413 * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p>
2414 * <p>To translate from the device orientation given by the Android sensor APIs, the following
2415 * sample code may be used:</p>
2416 * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2417 * if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2418 * int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2419 *
2420 * // Round device orientation to a multiple of 90
2421 * deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2422 *
2423 * // Reverse device orientation for front-facing cameras
2424 * boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2425 * if (facingFront) deviceOrientation = -deviceOrientation;
2426 *
2427 * // Calculate desired JPEG orientation relative to camera orientation to make
2428 * // the image upright relative to the device orientation
2429 * int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2430 *
2431 * return jpegOrientation;
2432 * }
2433 * </code></pre>
2434 * <p><b>Units</b>: Degrees in multiples of 90</p>
2435 * <p><b>Range of valid values:</b><br>
2436 * 0, 90, 180, 270</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002437 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002438 *
2439 * @see CameraCharacteristics#SENSOR_ORIENTATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002440 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002441 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002442 public static final Key<Integer> JPEG_ORIENTATION =
2443 new Key<Integer>("android.jpeg.orientation", int.class);
2444
2445 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002446 * <p>Compression quality of the final JPEG
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002447 * image.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002448 * <p>85-95 is typical usage range.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002449 * <p><b>Range of valid values:</b><br>
2450 * 1-100; larger is higher quality</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002451 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002452 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002453 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002454 public static final Key<Byte> JPEG_QUALITY =
2455 new Key<Byte>("android.jpeg.quality", byte.class);
2456
2457 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002458 * <p>Compression quality of JPEG
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002459 * thumbnail.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002460 * <p><b>Range of valid values:</b><br>
2461 * 1-100; larger is higher quality</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002462 * <p>This key is available on all devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002463 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002464 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002465 public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
2466 new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
2467
2468 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002469 * <p>Resolution of embedded JPEG thumbnail.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002470 * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2471 * but the captured JPEG will still be a valid image.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002472 * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2473 * should have the same aspect ratio as the main JPEG output.</p>
Zhijun He50f72432014-05-28 13:52:04 -07002474 * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2475 * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2476 * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2477 * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2478 * generate the thumbnail image. The thumbnail image will always have a smaller Field
2479 * Of View (FOV) than the primary image when aspect ratios differ.</p>
Yin-Chia Yeh59883112015-06-22 15:51:40 -07002480 * <p>When an {@link CaptureRequest#JPEG_ORIENTATION android.jpeg.orientation} of non-zero degree is requested,
2481 * the camera device will handle thumbnail rotation in one of the following ways:</p>
2482 * <ul>
2483 * <li>Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}
2484 * and keep jpeg and thumbnail image data unrotated.</li>
2485 * <li>Rotate the jpeg and thumbnail image data and not set
2486 * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this
2487 * case, LIMITED or FULL hardware level devices will report rotated thumnail size in
2488 * capture result, so the width and height will be interchanged if 90 or 270 degree
2489 * orientation is requested. LEGACY device will always report unrotated thumbnail
2490 * size.</li>
2491 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002492 * <p><b>Range of valid values:</b><br>
2493 * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002494 * <p>This key is available on all devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002495 *
2496 * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES
Yin-Chia Yeh59883112015-06-22 15:51:40 -07002497 * @see CaptureRequest#JPEG_ORIENTATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002498 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002499 @PublicKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07002500 public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE =
2501 new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002502
2503 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002504 * <p>The desired lens aperture size, as a ratio of lens focal length to the
2505 * effective aperture diameter.</p>
2506 * <p>Setting this value is only supported on the camera devices that have a variable
2507 * aperture lens.</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08002508 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
2509 * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002510 * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
Zhijun Hefb46c642014-01-14 17:57:23 -08002511 * to achieve manual exposure control.</p>
2512 * <p>The requested aperture value may take several frames to reach the
2513 * requested value; the camera device will report the current (intermediate)
Zhijun Heca1b73a2014-02-03 12:39:53 -08002514 * aperture size in capture result metadata while the aperture is changing.
2515 * 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 -08002516 * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
2517 * the ON modes, this will be overridden by the camera device
2518 * auto-exposure algorithm, the overridden values are then provided
2519 * back to the user in the corresponding result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002520 * <p><b>Units</b>: The f-number (f/N)</p>
2521 * <p><b>Range of valid values:</b><br>
2522 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002523 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2524 * <p><b>Full capability</b> -
2525 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2526 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Hefb46c642014-01-14 17:57:23 -08002527 *
Zhijun He399f05d2014-01-15 11:31:30 -08002528 * @see CaptureRequest#CONTROL_AE_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002529 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002530 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
Zhijun Heca1b73a2014-02-03 12:39:53 -08002531 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002532 * @see CaptureRequest#SENSOR_EXPOSURE_TIME
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08002533 * @see CaptureRequest#SENSOR_FRAME_DURATION
Eino-Ville Talvala265b34c2014-01-16 16:18:52 -08002534 * @see CaptureRequest#SENSOR_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002535 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002536 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002537 public static final Key<Float> LENS_APERTURE =
2538 new Key<Float>("android.lens.aperture", float.class);
2539
2540 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002541 * <p>The desired setting for the lens neutral density filter(s).</p>
2542 * <p>This control will not be supported on most camera devices.</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08002543 * <p>Lens filters are typically used to lower the amount of light the
2544 * sensor is exposed to (measured in steps of EV). As used here, an EV
2545 * step is the standard logarithmic representation, which are
2546 * non-negative, and inversely proportional to the amount of light
2547 * hitting the sensor. For example, setting this to 0 would result
2548 * in no reduction of the incoming light, and setting this to 2 would
2549 * mean that the filter is set to reduce incoming light by two stops
2550 * (allowing 1/4 of the prior amount of light to the sensor).</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002551 * <p>It may take several frames before the lens filter density changes
2552 * to the requested value. While the filter density is still changing,
2553 * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002554 * <p><b>Units</b>: Exposure Value (EV)</p>
2555 * <p><b>Range of valid values:</b><br>
2556 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002557 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2558 * <p><b>Full capability</b> -
2559 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2560 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk855bae42014-01-17 10:30:32 -08002561 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002562 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk855bae42014-01-17 10:30:32 -08002563 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
Zhijun Heca1b73a2014-02-03 12:39:53 -08002564 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002565 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002566 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002567 public static final Key<Float> LENS_FILTER_DENSITY =
2568 new Key<Float>("android.lens.filterDensity", float.class);
2569
2570 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002571 * <p>The desired lens focal length; used for optical zoom.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08002572 * <p>This setting controls the physical focal length of the camera
2573 * device's lens. Changing the focal length changes the field of
2574 * view of the camera device, and is usually used for optical zoom.</p>
2575 * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
2576 * setting won't be applied instantaneously, and it may take several
Zhijun Heca1b73a2014-02-03 12:39:53 -08002577 * frames before the lens can change to the requested focal length.
Ruben Brunka20f4c22014-01-17 15:21:13 -08002578 * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
2579 * be set to MOVING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002580 * <p>Optical zoom will not be supported on most devices.</p>
2581 * <p><b>Units</b>: Millimeters</p>
2582 * <p><b>Range of valid values:</b><br>
2583 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002584 * <p>This key is available on all devices.</p>
Ruben Brunka20f4c22014-01-17 15:21:13 -08002585 *
2586 * @see CaptureRequest#LENS_APERTURE
2587 * @see CaptureRequest#LENS_FOCUS_DISTANCE
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002588 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
Ruben Brunka20f4c22014-01-17 15:21:13 -08002589 * @see CaptureResult#LENS_STATE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002590 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002591 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002592 public static final Key<Float> LENS_FOCAL_LENGTH =
2593 new Key<Float>("android.lens.focalLength", float.class);
2594
2595 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002596 * <p>Desired distance to plane of sharpest focus,
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002597 * measured from frontmost surface of the lens.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002598 * <p>Should be zero for fixed-focus cameras</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002599 * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p>
2600 * <p><b>Range of valid values:</b><br>
2601 * &gt;= 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002602 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2603 * <p><b>Full capability</b> -
2604 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2605 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2606 *
2607 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002608 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002609 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002610 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002611 public static final Key<Float> LENS_FOCUS_DISTANCE =
2612 new Key<Float>("android.lens.focusDistance", float.class);
2613
2614 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002615 * <p>The range of scene distances that are in
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07002616 * sharp focus (depth of field).</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08002617 * <p>If variable focus not supported, can still report
2618 * fixed depth of field range</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002619 * <p><b>Units</b>: A pair of focus distances in diopters: (near,
2620 * far); see {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details.</p>
2621 * <p><b>Range of valid values:</b><br>
2622 * &gt;=0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002623 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2624 * <p><b>Limited capability</b> -
2625 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2626 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
2627 *
2628 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002629 * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002630 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002631 @PublicKey
Igor Murashkin57438682014-05-30 10:49:00 -07002632 public static final Key<android.util.Pair<Float,Float>> LENS_FOCUS_RANGE =
2633 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 -07002634
2635 /**
Ruben Brunk00849b32014-01-17 18:30:23 -08002636 * <p>Sets whether the camera device uses optical image stabilization (OIS)
2637 * when capturing images.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002638 * <p>OIS is used to compensate for motion blur due to small
2639 * movements of the camera during capture. Unlike digital image
2640 * stabilization ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), OIS
2641 * makes use of mechanical elements to stabilize the camera
2642 * sensor, and thus allows for longer exposure times before
2643 * camera shake becomes apparent.</p>
Zhijun He45fa43a12014-06-13 18:29:37 -07002644 * <p>Switching between different optical stabilization modes may take several
2645 * frames to initialize, the camera device will report the current mode in
2646 * capture result metadata. For example, When "ON" mode is requested, the
2647 * optical stabilization modes in the first several capture results may still
2648 * be "OFF", and it will become "ON" when the initialization is done.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002649 * <p>If a camera device supports both OIS and digital image stabilization
2650 * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable
2651 * interaction, so it is recommended not to enable both at the same time.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002652 * <p>Not all devices will support OIS; see
2653 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for
2654 * available controls.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002655 * <p><b>Possible values:</b>
2656 * <ul>
2657 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li>
2658 * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li>
2659 * </ul></p>
2660 * <p><b>Available values for this device:</b><br>
2661 * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002662 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2663 * <p><b>Limited capability</b> -
2664 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2665 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002666 *
2667 * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002668 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002669 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002670 * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
2671 * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
2672 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002673 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002674 public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
2675 new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
2676
2677 /**
Zhijun Heca1b73a2014-02-03 12:39:53 -08002678 * <p>Current lens status.</p>
2679 * <p>For lens parameters {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance},
2680 * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, when changes are requested,
2681 * they may take several frames to reach the requested values. This state indicates
2682 * the current status of the lens parameters.</p>
2683 * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2684 * either because the parameters are all fixed, or because the lens has had enough
2685 * time to reach the most recently-requested values.
2686 * If all these lens parameters are not changable for a camera device, as listed below:</p>
2687 * <ul>
2688 * <li>Fixed focus (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} == 0</code>), which means
2689 * {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} parameter will always be 0.</li>
2690 * <li>Fixed focal length ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths} contains single value),
2691 * which means the optical zoom is not supported.</li>
2692 * <li>No ND filter ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities} contains only 0).</li>
2693 * <li>Fixed aperture ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures} contains single value).</li>
2694 * </ul>
2695 * <p>Then this state will always be STATIONARY.</p>
2696 * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2697 * is changing.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002698 * <p><b>Possible values:</b>
2699 * <ul>
2700 * <li>{@link #LENS_STATE_STATIONARY STATIONARY}</li>
2701 * <li>{@link #LENS_STATE_MOVING MOVING}</li>
2702 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002703 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2704 * <p><b>Limited capability</b> -
2705 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
2706 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heca1b73a2014-02-03 12:39:53 -08002707 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002708 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun Heca1b73a2014-02-03 12:39:53 -08002709 * @see CaptureRequest#LENS_APERTURE
2710 * @see CaptureRequest#LENS_FILTER_DENSITY
2711 * @see CaptureRequest#LENS_FOCAL_LENGTH
2712 * @see CaptureRequest#LENS_FOCUS_DISTANCE
2713 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
2714 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
2715 * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2716 * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002717 * @see #LENS_STATE_STATIONARY
Igor Murashkin9ea4ae62013-09-11 21:40:11 -07002718 * @see #LENS_STATE_MOVING
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002719 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002720 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002721 public static final Key<Integer> LENS_STATE =
2722 new Key<Integer>("android.lens.state", int.class);
2723
2724 /**
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002725 * <p>The orientation of the camera relative to the sensor
2726 * coordinate system.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002727 * <p>The four coefficients that describe the quaternion
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002728 * rotation from the Android sensor coordinate system to a
2729 * camera-aligned coordinate system where the X-axis is
2730 * aligned with the long side of the image sensor, the Y-axis
2731 * is aligned with the short side of the image sensor, and
2732 * the Z-axis is aligned with the optical axis of the sensor.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002733 * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002734 * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
2735 * amount <code>theta</code>, the following formulas can be used:</p>
2736 * <pre><code> theta = 2 * acos(w)
2737 * a_x = x / sin(theta/2)
2738 * a_y = y / sin(theta/2)
2739 * a_z = z / sin(theta/2)
2740 * </code></pre>
2741 * <p>To create a 3x3 rotation matrix that applies the rotation
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002742 * defined by this quaternion, the following matrix can be
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002743 * used:</p>
2744 * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw,
2745 * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw,
2746 * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ]
2747 * </code></pre>
2748 * <p>This matrix can then be used to apply the rotation to a
2749 * column vector point with</p>
2750 * <p><code>p' = Rp</code></p>
2751 * <p>where <code>p</code> is in the device sensor coordinate system, and
2752 * <code>p'</code> is in the camera-oriented coordinate system.</p>
2753 * <p><b>Units</b>:
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002754 * Quaternion coefficients</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002755 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2756 */
2757 @PublicKey
2758 public static final Key<float[]> LENS_POSE_ROTATION =
2759 new Key<float[]>("android.lens.poseRotation", float[].class);
2760
2761 /**
2762 * <p>Position of the camera optical center.</p>
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07002763 * <p>The position of the camera device's lens optical center,
2764 * as a three-dimensional vector <code>(x,y,z)</code>, relative to the
2765 * optical center of the largest camera device facing in the
2766 * same direction as this camera, in the {@link android.hardware.SensorEvent Android sensor coordinate
2767 * axes}. Note that only the axis definitions are shared with
2768 * the sensor coordinate system, but not the origin.</p>
2769 * <p>If this device is the largest or only camera device with a
2770 * given facing, then this position will be <code>(0, 0, 0)</code>; a
2771 * camera device with a lens optical center located 3 cm from
2772 * the main sensor along the +X axis (to the right from the
2773 * user's perspective) will report <code>(0.03, 0, 0)</code>.</p>
2774 * <p>To transform a pixel coordinates between two cameras
2775 * facing the same direction, first the source camera
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002776 * {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} must be corrected for. Then
2777 * the source camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07002778 * to be applied, followed by the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation}
2779 * of the source camera, the translation of the source camera
2780 * relative to the destination camera, the
2781 * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination camera, and
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002782 * finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration}
Eino-Ville Talvalad3dbfb32015-05-29 17:17:04 -07002783 * of the destination camera. This obtains a
2784 * radial-distortion-free coordinate in the destination
2785 * camera pixel coordinates.</p>
2786 * <p>To compare this against a real image from the destination
2787 * camera, the destination camera image then needs to be
2788 * corrected for radial distortion before comparison or
2789 * sampling.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002790 * <p><b>Units</b>: Meters</p>
2791 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2792 *
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002793 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002794 * @see CameraCharacteristics#LENS_POSE_ROTATION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002795 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002796 */
2797 @PublicKey
2798 public static final Key<float[]> LENS_POSE_TRANSLATION =
2799 new Key<float[]>("android.lens.poseTranslation", float[].class);
2800
2801 /**
2802 * <p>The parameters for this camera device's intrinsic
2803 * calibration.</p>
2804 * <p>The five calibration parameters that describe the
2805 * transform from camera-centric 3D coordinates to sensor
2806 * pixel coordinates:</p>
2807 * <pre><code>[f_x, f_y, c_x, c_y, s]
2808 * </code></pre>
2809 * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
2810 * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
2811 * axis, and <code>s</code> is a skew parameter for the sensor plane not
2812 * being aligned with the lens plane.</p>
2813 * <p>These are typically used within a transformation matrix K:</p>
2814 * <pre><code>K = [ f_x, s, c_x,
2815 * 0, f_y, c_y,
2816 * 0 0, 1 ]
2817 * </code></pre>
2818 * <p>which can then be combined with the camera pose rotation
2819 * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and
2820 * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respective) to calculate the
2821 * complete transform from world coordinates to pixel
2822 * coordinates:</p>
2823 * <pre><code>P = [ K 0 * [ R t
2824 * 0 1 ] 0 1 ]
2825 * </code></pre>
2826 * <p>and with <code>p_w</code> being a point in the world coordinate system
2827 * and <code>p_s</code> being a point in the camera active pixel array
2828 * coordinate system, and with the mapping including the
2829 * homogeneous division by z:</p>
2830 * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
2831 * p_s = p_h / z_h
2832 * </code></pre>
2833 * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
2834 * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
2835 * (depth) in pixel coordinates.</p>
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002836 * <p>Note that the coordinate system for this transform is the
2837 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system,
2838 * where <code>(0,0)</code> is the top-left of the
2839 * preCorrectionActiveArraySize rectangle. Once the pose and
2840 * intrinsic calibration transforms have been applied to a
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002841 * world point, then the {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion}
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002842 * transform needs to be applied, and the result adjusted to
2843 * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate
2844 * system (where <code>(0, 0)</code> is the top-left of the
2845 * activeArraySize rectangle), to determine the final pixel
2846 * coordinate of the world point for processed (non-RAW)
2847 * output buffers.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002848 * <p><b>Units</b>:
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002849 * Pixels in the
2850 * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}
2851 * coordinate system.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002852 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2853 *
2854 * @see CameraCharacteristics#LENS_POSE_ROTATION
2855 * @see CameraCharacteristics#LENS_POSE_TRANSLATION
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002856 * @see CameraCharacteristics#LENS_RADIAL_DISTORTION
Eino-Ville Talvala0b7b03b2015-04-13 17:29:52 -07002857 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvalab8bd8ab2015-06-16 11:44:10 -07002858 * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002859 */
2860 @PublicKey
2861 public static final Key<float[]> LENS_INTRINSIC_CALIBRATION =
2862 new Key<float[]>("android.lens.intrinsicCalibration", float[].class);
2863
2864 /**
2865 * <p>The correction coefficients to correct for this camera device's
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002866 * radial and tangential lens distortion.</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07002867 * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002868 * kappa_3]</code> and two tangential distortion coefficients
2869 * <code>[kappa_4, kappa_5]</code> that can be used to correct the
2870 * lens's geometric distortion with the mapping equations:</p>
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07002871 * <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 -07002872 * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
Ruben Brunk02cd8cb2015-06-15 15:33:09 -07002873 * 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 -07002874 * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002875 * </code></pre>
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002876 * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
2877 * input image that correspond to the pixel values in the
2878 * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
2879 * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
2880 * </code></pre>
2881 * <p>The pixel coordinates are defined in a normalized
2882 * coordinate system related to the
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002883 * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields.
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002884 * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
2885 * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
2886 * of both x and y coordinates are normalized to be 1 at the
2887 * edge further from the optical center, so the range
2888 * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
2889 * <p>Finally, <code>r</code> represents the radial distance from the
2890 * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
2891 * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
2892 * <p>The distortion model used is the Brown-Conrady model.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002893 * <p><b>Units</b>:
Eino-Ville Talvala66c73ba2015-05-29 16:11:56 -07002894 * Unitless coefficients.</p>
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002895 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalaabf0b8b2015-08-19 16:21:15 -07002896 *
2897 * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
Eino-Ville Talvala046a9782015-04-08 20:05:56 +00002898 */
2899 @PublicKey
2900 public static final Key<float[]> LENS_RADIAL_DISTORTION =
2901 new Key<float[]>("android.lens.radialDistortion", float[].class);
2902
2903 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002904 * <p>Mode of operation for the noise reduction algorithm.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002905 * <p>The noise reduction algorithm attempts to improve image quality by removing
Zhijun He0e99c222015-01-29 15:26:05 -08002906 * excessive noise added by the capture process, especially in dark conditions.</p>
2907 * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
2908 * YUV domain.</p>
2909 * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
2910 * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
2911 * This mode is optional, may not be support by all devices. The application should check
2912 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} before using it.</p>
Zhijun He5f2a47f2014-01-16 15:44:41 -08002913 * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
2914 * will be applied. HIGH_QUALITY mode indicates that the camera device
2915 * will use the highest-quality noise filtering algorithms,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07002916 * even if it slows down capture rate. FAST means the camera device will not
Chien-Yu Chen9c9167e2015-07-14 16:38:25 -07002917 * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
2918 * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
2919 * Every output stream will have a similar amount of enhancement applied.</p>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002920 * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2921 * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2922 * into a final capture when triggered by the user. In this mode, the camera device applies
2923 * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
2924 * preview quality, but does not apply noise reduction to high-resolution streams, since
2925 * those will be reprocessed later if necessary.</p>
Zhijun He0e99c222015-01-29 15:26:05 -08002926 * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
2927 * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
2928 * may adjust the noise reduction parameters for best image quality based on the
2929 * {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor} if it is set.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002930 * <p><b>Possible values:</b>
2931 * <ul>
2932 * <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li>
2933 * <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li>
2934 * <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Zhijun He0e99c222015-01-29 15:26:05 -08002935 * <li>{@link #NOISE_REDUCTION_MODE_MINIMAL MINIMAL}</li>
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002936 * <li>{@link #NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002937 * </ul></p>
2938 * <p><b>Available values for this device:</b><br>
2939 * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002940 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
2941 * <p><b>Full capability</b> -
2942 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
2943 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002944 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002945 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08002946 * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
Zhijun He0e99c222015-01-29 15:26:05 -08002947 * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002948 * @see #NOISE_REDUCTION_MODE_OFF
2949 * @see #NOISE_REDUCTION_MODE_FAST
2950 * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
Zhijun He0e99c222015-01-29 15:26:05 -08002951 * @see #NOISE_REDUCTION_MODE_MINIMAL
Eino-Ville Talvala0dd17502015-07-07 10:43:07 -07002952 * @see #NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002953 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07002954 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002955 public static final Key<Integer> NOISE_REDUCTION_MODE =
2956 new Key<Integer>("android.noiseReduction.mode", int.class);
2957
2958 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002959 * <p>Whether a result given to the framework is the
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002960 * final one for the capture, or only a partial that contains a
2961 * subset of the full set of dynamic metadata
Igor Murashkinace5bf02013-12-10 17:36:40 -08002962 * values.</p>
2963 * <p>The entries in the result metadata buffers for a
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002964 * single capture may not overlap, except for this entry. The
2965 * FINAL buffers must retain FIFO ordering relative to the
2966 * requests that generate them, so the FINAL buffer for frame 3 must
2967 * always be sent to the framework after the FINAL buffer for frame 2, and
2968 * before the FINAL buffer for frame 4. PARTIAL buffers may be returned
2969 * in any order relative to other frames, but all PARTIAL buffers for a given
2970 * capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun Hecc28a412014-02-24 15:11:23 -08002971 * only be used by the camera device if quirks.usePartialResult is set to 1.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002972 * <p><b>Range of valid values:</b><br>
2973 * Optional. Default value is FINAL.</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08002974 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07002975 * @deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002976 * @hide
2977 */
Igor Murashkin9c595172014-05-12 13:56:20 -07002978 @Deprecated
Eino-Ville Talvala7a313102013-11-07 14:45:06 -08002979 public static final Key<Boolean> QUIRKS_PARTIAL_RESULT =
2980 new Key<Boolean>("android.quirks.partialResult", boolean.class);
2981
2982 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002983 * <p>A frame counter set by the framework. This value monotonically
Igor Murashkin6bbf9dc2013-09-05 12:22:00 -07002984 * increases with every new result (that is, each new result has a unique
Igor Murashkinace5bf02013-12-10 17:36:40 -08002985 * frameCount value).</p>
2986 * <p>Reset on release()</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07002987 * <p><b>Units</b>: count of frames</p>
2988 * <p><b>Range of valid values:</b><br>
2989 * &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07002990 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkinbdf366c2014-07-25 16:54:20 -07002991 * @deprecated
2992 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002993 */
Igor Murashkinbdf366c2014-07-25 16:54:20 -07002994 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07002995 public static final Key<Integer> REQUEST_FRAME_COUNT =
2996 new Key<Integer>("android.request.frameCount", int.class);
2997
2998 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08002999 * <p>An application-specified ID for the current
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003000 * request. Must be maintained unchanged in output
Igor Murashkinace5bf02013-12-10 17:36:40 -08003001 * frame</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003002 * <p><b>Units</b>: arbitrary integer assigned by application</p>
3003 * <p><b>Range of valid values:</b><br>
3004 * Any int</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003005 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003006 * @hide
3007 */
3008 public static final Key<Integer> REQUEST_ID =
3009 new Key<Integer>("android.request.id", int.class);
3010
3011 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08003012 * <p>Specifies the number of pipeline stages the frame went
3013 * through from when it was exposed to when the final completed result
3014 * was available to the framework.</p>
3015 * <p>Depending on what settings are used in the request, and
3016 * what streams are configured, the data may undergo less processing,
3017 * and some pipeline stages skipped.</p>
3018 * <p>See {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} for more details.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003019 * <p><b>Range of valid values:</b><br>
3020 * &lt;= {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003021 * <p>This key is available on all devices.</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08003022 *
3023 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
3024 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003025 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08003026 public static final Key<Byte> REQUEST_PIPELINE_DEPTH =
3027 new Key<Byte>("android.request.pipelineDepth", byte.class);
3028
3029 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003030 * <p>The desired region of the sensor to read out for this capture.</p>
3031 * <p>This control can be used to implement digital zoom.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003032 * <p>The crop region coordinate system is based off
3033 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the
3034 * top-left corner of the sensor active array.</p>
3035 * <p>Output streams use this rectangle to produce their output,
3036 * cropping to a smaller region if necessary to maintain the
3037 * stream's aspect ratio, then scaling the sensor input to
3038 * match the output's configured resolution.</p>
3039 * <p>The crop region is applied after the RAW to other color
3040 * space (e.g. YUV) conversion. Since raw streams
3041 * (e.g. RAW16) don't have the conversion stage, they are not
3042 * croppable. The crop region will be ignored by raw streams.</p>
Zhijun He9e6d1882014-05-22 16:47:35 -07003043 * <p>For non-raw streams, any additional per-stream cropping will
3044 * be done to maximize the final pixel area of the stream.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003045 * <p>For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003046 * ratio, then 4:3 streams will use the exact crop
3047 * region. 16:9 streams will further crop vertically
Igor Murashkinace5bf02013-12-10 17:36:40 -08003048 * (letterbox).</p>
3049 * <p>Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003050 * outputs will crop horizontally (pillarbox), and 16:9
3051 * streams will match exactly. These additional crops will
Igor Murashkinace5bf02013-12-10 17:36:40 -08003052 * be centered within the crop region.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003053 * <p>The width and height of the crop region cannot
3054 * be set to be smaller than
3055 * <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and
3056 * <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p>
3057 * <p>The camera device may adjust the crop region to account
3058 * for rounding and other hardware requirements; the final
3059 * crop region used will be included in the output capture
3060 * result.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003061 * <p><b>Units</b>: Pixel coordinates relative to
3062 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003063 * <p>This key is available on all devices.</p>
Eino-Ville Talvalad8fd6792014-02-10 12:41:04 -08003064 *
3065 * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003066 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003067 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003068 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003069 public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
3070 new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
3071
3072 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003073 * <p>Duration each pixel is exposed to
3074 * light.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003075 * <p>If the sensor can't expose this exact duration, it will shorten the
3076 * duration exposed to the nearest possible value (rather than expose longer).
3077 * The final exposure time used will be available in the output capture result.</p>
3078 * <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
3079 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3080 * <p><b>Units</b>: Nanoseconds</p>
3081 * <p><b>Range of valid values:</b><br>
3082 * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003083 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3084 * <p><b>Full capability</b> -
3085 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3086 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3087 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003088 * @see CaptureRequest#CONTROL_AE_MODE
3089 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003090 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003091 * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003092 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003093 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003094 public static final Key<Long> SENSOR_EXPOSURE_TIME =
3095 new Key<Long>("android.sensor.exposureTime", long.class);
3096
3097 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003098 * <p>Duration from start of frame exposure to
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003099 * start of next frame exposure.</p>
3100 * <p>The maximum frame rate that can be supported by a camera subsystem is
3101 * a function of many factors:</p>
3102 * <ul>
3103 * <li>Requested resolutions of output image streams</li>
3104 * <li>Availability of binning / skipping modes on the imager</li>
3105 * <li>The bandwidth of the imager interface</li>
3106 * <li>The bandwidth of the various ISP processing blocks</li>
3107 * </ul>
3108 * <p>Since these factors can vary greatly between different ISPs and
3109 * sensors, the camera abstraction tries to represent the bandwidth
3110 * restrictions with as simple a model as possible.</p>
3111 * <p>The model presented has the following characteristics:</p>
3112 * <ul>
3113 * <li>The image sensor is always configured to output the smallest
3114 * resolution possible given the application's requested output stream
3115 * sizes. The smallest resolution is defined as being at least as large
3116 * as the largest requested output stream size; the camera pipeline must
3117 * never digitally upsample sensor data when the crop region covers the
3118 * whole sensor. In general, this means that if only small output stream
3119 * resolutions are configured, the sensor can provide a higher frame
3120 * rate.</li>
3121 * <li>Since any request may use any or all the currently configured
3122 * output streams, the sensor and ISP must be configured to support
3123 * scaling a single capture to all the streams at the same time. This
3124 * means the camera pipeline must be ready to produce the largest
3125 * requested output size without any delay. Therefore, the overall
3126 * frame rate of a given configured stream set is governed only by the
3127 * largest requested stream resolution.</li>
3128 * <li>Using more than one output stream in a request does not affect the
3129 * frame duration.</li>
Igor Murashkina23ffb52014-02-07 18:52:34 -08003130 * <li>Certain format-streams may need to do additional background processing
3131 * before data is consumed/produced by that stream. These processors
3132 * can run concurrently to the rest of the camera pipeline, but
3133 * cannot process more than 1 capture at a time.</li>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003134 * </ul>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003135 * <p>The necessary information for the application, given the model above, is provided via
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003136 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }.
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003137 * These are used to determine the maximum frame rate / minimum frame duration that is
3138 * possible for a given stream configuration.</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003139 * <p>Specifically, the application can use the following rules to
Igor Murashkina23ffb52014-02-07 18:52:34 -08003140 * determine the minimum frame duration it can request from the camera
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003141 * device:</p>
3142 * <ol>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003143 * <li>Let the set of currently configured input/output streams be called <code>S</code>.</li>
3144 * <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 }
3145 * (with its respective size/format). Let this set of frame durations be called <code>F</code>.</li>
3146 * <li>For any given request <code>R</code>, the minimum frame duration allowed for <code>R</code> is the maximum
3147 * 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 -08003148 * </ol>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003149 * <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 -08003150 * using its respective size/format), then the frame duration in <code>F</code> determines the steady
3151 * state frame rate that the application will get if it uses <code>R</code> as a repeating request. Let
3152 * this special kind of request be called <code>Rsimple</code>.</p>
3153 * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved by a single capture of a
3154 * new request <code>Rstall</code> (which has at least one in-use stream with a non-0 stall time) and if
3155 * <code>Rstall</code> has the same minimum frame duration this will not cause a frame rate loss if all
3156 * buffers from the previous <code>Rstall</code> have already been delivered.</p>
3157 * <p>For more details about stalling, see {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003158 * <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
3159 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3160 * <p><b>Units</b>: Nanoseconds</p>
3161 * <p><b>Range of valid values:</b><br>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003162 * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}, {@link android.hardware.camera2.params.StreamConfigurationMap }.
3163 * The duration is capped to <code>max(duration, exposureTime + overhead)</code>.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003164 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3165 * <p><b>Full capability</b> -
3166 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3167 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin143aa0b2014-01-17 15:02:34 -08003168 *
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003169 * @see CaptureRequest#CONTROL_AE_MODE
3170 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003171 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003172 * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003173 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003174 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003175 public static final Key<Long> SENSOR_FRAME_DURATION =
3176 new Key<Long>("android.sensor.frameDuration", long.class);
3177
3178 /**
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003179 * <p>The amount of gain applied to sensor data
3180 * before processing.</p>
3181 * <p>The sensitivity is the standard ISO sensitivity value,
3182 * as defined in ISO 12232:2006.</p>
3183 * <p>The sensitivity must be within {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}, and
3184 * if if it less than {@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}, the camera device
3185 * is guaranteed to use only analog amplification for applying the gain.</p>
3186 * <p>If the camera device cannot apply the exact sensitivity
3187 * requested, it will reduce the gain to the nearest supported
3188 * value. The final sensitivity used will be available in the
3189 * output capture result.</p>
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08003190 * <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
3191 * OFF; otherwise the auto-exposure algorithm will override this value.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003192 * <p><b>Units</b>: ISO arithmetic units</p>
3193 * <p><b>Range of valid values:</b><br>
3194 * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003195 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3196 * <p><b>Full capability</b> -
3197 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3198 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003199 *
Yin-Chia Yeh1ee1a0a2016-01-18 19:13:47 -08003200 * @see CaptureRequest#CONTROL_AE_MODE
3201 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003202 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003203 * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
3204 * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003205 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003206 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003207 public static final Key<Integer> SENSOR_SENSITIVITY =
3208 new Key<Integer>("android.sensor.sensitivity", int.class);
3209
3210 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003211 * <p>Time at start of exposure of first
Zhijun He0bda31a2014-06-13 14:38:39 -07003212 * row of the image sensor active array, in nanoseconds.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003213 * <p>The timestamps are also included in all image
3214 * buffers produced for the same capture, and will be identical
Zhijun He45fa43a12014-06-13 18:29:37 -07003215 * on all the outputs.</p>
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003216 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> UNKNOWN,
Zhijun He45fa43a12014-06-13 18:29:37 -07003217 * the timestamps measure time since an unspecified starting point,
3218 * and are monotonically increasing. They can be compared with the
3219 * timestamps for other captures from the same camera device, but are
3220 * not guaranteed to be comparable to any other time source.</p>
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003221 * <p>When {@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME, the
3222 * timestamps measure time in the same timebase as {@link android.os.SystemClock#elapsedRealtimeNanos }, and they can
3223 * be compared to other timestamps from other subsystems that
3224 * are using that base.</p>
Chien-Yu Chen6216e4e2015-05-29 11:49:54 -07003225 * <p>For reprocessing, the timestamp will match the start of exposure of
3226 * the input image, i.e. {@link CaptureResult#SENSOR_TIMESTAMP the
3227 * timestamp} in the TotalCaptureResult that was used to create the
3228 * reprocess capture request.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003229 * <p><b>Units</b>: Nanoseconds</p>
3230 * <p><b>Range of valid values:</b><br>
3231 * &gt; 0</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003232 * <p>This key is available on all devices.</p>
Zhijun He45fa43a12014-06-13 18:29:37 -07003233 *
Eino-Ville Talvalaabd9d3c2014-07-28 13:01:52 -07003234 * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003235 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003236 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003237 public static final Key<Long> SENSOR_TIMESTAMP =
3238 new Key<Long>("android.sensor.timestamp", long.class);
3239
3240 /**
Ruben Brunk7c062362014-04-15 23:53:53 -07003241 * <p>The estimated camera neutral color in the native sensor colorspace at
3242 * the time of capture.</p>
3243 * <p>This value gives the neutral color point encoded as an RGB value in the
3244 * native sensor color space. The neutral color point indicates the
3245 * currently estimated white point of the scene illumination. It can be
3246 * used to interpolate between the provided color transforms when
3247 * processing raw sensor data.</p>
3248 * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
Ruben Brunk20c76f62014-02-07 15:47:10 -08003249 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3250 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003251 @PublicKey
Ruben Brunk20c76f62014-02-07 15:47:10 -08003252 public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
3253 new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
3254
3255 /**
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003256 * <p>Noise model coefficients for each CFA mosaic channel.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003257 * <p>This key contains two noise model coefficients for each CFA channel
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003258 * corresponding to the sensor amplification (S) and sensor readout
3259 * noise (O). These are given as pairs of coefficients for each channel
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003260 * in the same order as channels listed for the CFA layout key
Ruben Brunk1b1f1b62014-07-23 17:49:08 -07003261 * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is
3262 * represented as an array of Pair&lt;Double, Double&gt;, where
3263 * the first member of the Pair at index n is the S coefficient and the
3264 * second member is the O coefficient for the nth color channel in the CFA.</p>
3265 * <p>These coefficients are used in a two parameter noise model to describe
3266 * the amount of noise present in the image for each CFA channel. The
3267 * noise model used here is:</p>
3268 * <p>N(x) = sqrt(Sx + O)</p>
3269 * <p>Where x represents the recorded signal of a CFA channel normalized to
3270 * the range [0, 1], and S and O are the noise model coeffiecients for
3271 * that channel.</p>
3272 * <p>A more detailed description of the noise model can be found in the
3273 * Adobe DNG specification for the NoiseProfile tag.</p>
3274 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3275 *
3276 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3277 */
3278 @PublicKey
3279 public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
3280 new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
3281
3282 /**
Ruben Brunk987d9f72014-02-11 18:00:24 -08003283 * <p>The worst-case divergence between Bayer green channels.</p>
3284 * <p>This value is an estimate of the worst case split between the
3285 * Bayer green channels in the red and blue rows in the sensor color
3286 * filter array.</p>
3287 * <p>The green split is calculated as follows:</p>
3288 * <ol>
Ruben Brunke89b1202014-03-24 17:10:35 -07003289 * <li>A 5x5 pixel (or larger) window W within the active sensor array is
3290 * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
3291 * mosaic channels (R, Gr, Gb, B). The location and size of the window
3292 * chosen is implementation defined, and should be chosen to provide a
3293 * green split estimate that is both representative of the entire image
3294 * for this camera sensor, and can be calculated quickly.</li>
Ruben Brunk987d9f72014-02-11 18:00:24 -08003295 * <li>The arithmetic mean of the green channels from the red
3296 * rows (mean_Gr) within W is computed.</li>
3297 * <li>The arithmetic mean of the green channels from the blue
3298 * rows (mean_Gb) within W is computed.</li>
3299 * <li>The maximum ratio R of the two means is computed as follows:
3300 * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
3301 * </ol>
3302 * <p>The ratio R is the green split divergence reported for this property,
3303 * which represents how much the green channels differ in the mosaic
3304 * pattern. This value is typically used to determine the treatment of
3305 * the green mosaic channels when demosaicing.</p>
3306 * <p>The green split value can be roughly interpreted as follows:</p>
3307 * <ul>
3308 * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
3309 * <li>1.20 &lt;= R &gt;= 1.03 will require some software
3310 * correction to avoid demosaic errors (3-20% divergence).</li>
3311 * <li>R &gt; 1.20 will require strong software correction to produce
3312 * a usuable image (&gt;20% divergence).</li>
3313 * </ul>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003314 * <p><b>Range of valid values:</b><br></p>
3315 * <p>&gt;= 0</p>
Ruben Brunk987d9f72014-02-11 18:00:24 -08003316 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3317 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003318 @PublicKey
Ruben Brunk987d9f72014-02-11 18:00:24 -08003319 public static final Key<Float> SENSOR_GREEN_SPLIT =
3320 new Key<Float>("android.sensor.greenSplit", float.class);
3321
3322 /**
Zhijun He379af012014-05-06 11:54:54 -07003323 * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
3324 * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
3325 * <p>Each color channel is treated as an unsigned 32-bit integer.
3326 * The camera device then uses the most significant X bits
3327 * that correspond to how many bits are in its Bayer raw sensor
3328 * output.</p>
3329 * <p>For example, a sensor with RAW10 Bayer output would use the
3330 * 10 most significant bits from each color channel.</p>
3331 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3332 *
3333 * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
3334 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003335 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07003336 public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
3337 new Key<int[]>("android.sensor.testPatternData", int[].class);
3338
3339 /**
Igor Murashkinc127f052014-01-17 18:06:02 -08003340 * <p>When enabled, the sensor sends a test pattern instead of
3341 * doing a real exposure from the camera.</p>
3342 * <p>When a test pattern is enabled, all manual sensor controls specified
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003343 * by android.sensor.* will be ignored. All other controls should
Igor Murashkinc127f052014-01-17 18:06:02 -08003344 * work as normal.</p>
3345 * <p>For example, if manual flash is enabled, flash firing should still
3346 * occur (and that the test pattern remain unmodified, since the flash
3347 * would not actually affect it).</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003348 * <p>Defaults to OFF.</p>
3349 * <p><b>Possible values:</b>
3350 * <ul>
3351 * <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li>
3352 * <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li>
3353 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li>
3354 * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li>
3355 * <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li>
3356 * <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li>
3357 * </ul></p>
3358 * <p><b>Available values for this device:</b><br>
3359 * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p>
Igor Murashkinc127f052014-01-17 18:06:02 -08003360 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003361 *
3362 * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES
Igor Murashkinc127f052014-01-17 18:06:02 -08003363 * @see #SENSOR_TEST_PATTERN_MODE_OFF
3364 * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
3365 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
3366 * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
3367 * @see #SENSOR_TEST_PATTERN_MODE_PN9
3368 * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
3369 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003370 @PublicKey
Igor Murashkinc127f052014-01-17 18:06:02 -08003371 public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
3372 new Key<Integer>("android.sensor.testPatternMode", int.class);
3373
3374 /**
Zhijun He0bda31a2014-06-13 14:38:39 -07003375 * <p>Duration between the start of first row exposure
3376 * and the start of last row exposure.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003377 * <p>This is the exposure time skew between the first and last
3378 * row exposure start times. The first row and the last row are
3379 * the first and last rows inside of the
3380 * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Zhijun He0bda31a2014-06-13 14:38:39 -07003381 * <p>For typical camera sensors that use rolling shutters, this is also equivalent
3382 * to the frame readout time.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003383 * <p><b>Units</b>: Nanoseconds</p>
3384 * <p><b>Range of valid values:</b><br>
3385 * &gt;= 0 and &lt;
Eino-Ville Talvalab6eb52f2015-04-16 16:39:45 -07003386 * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003387 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3388 * <p><b>Limited capability</b> -
3389 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
3390 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He0bda31a2014-06-13 14:38:39 -07003391 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003392 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0bda31a2014-06-13 14:38:39 -07003393 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3394 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003395 @PublicKey
Zhijun He0bda31a2014-06-13 14:38:39 -07003396 public static final Key<Long> SENSOR_ROLLING_SHUTTER_SKEW =
3397 new Key<Long>("android.sensor.rollingShutterSkew", long.class);
3398
3399 /**
Zhijun Hecd950b62015-11-12 17:47:52 -08003400 * <p>A per-frame dynamic black level offset for each of the color filter
3401 * arrangement (CFA) mosaic channels.</p>
3402 * <p>Camera sensor black levels may vary dramatically for different
3403 * capture settings (e.g. {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). The fixed black
3404 * level reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} may be too
3405 * inaccurate to represent the actual value on a per-frame basis. The
3406 * camera device internal pipeline relies on reliable black level values
3407 * to process the raw images appropriately. To get the best image
3408 * quality, the camera device may choose to estimate the per frame black
3409 * level values either based on optically shielded black regions
3410 * ({@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}) or its internal model.</p>
3411 * <p>This key reports the camera device estimated per-frame zero light
3412 * value for each of the CFA mosaic channels in the camera sensor. The
3413 * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} may only represent a coarse
3414 * approximation of the actual black level values. This value is the
3415 * black level used in camera device internal image processing pipeline
3416 * and generally more accurate than the fixed black level values.
3417 * However, since they are estimated values by the camera device, they
3418 * may not be as accurate as the black level values calculated from the
3419 * optical black pixels reported by {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions}.</p>
3420 * <p>The values are given in the same order as channels listed for the CFA
3421 * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the
3422 * nth value given corresponds to the black level offset for the nth
3423 * color channel listed in the CFA.</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003424 * <p>This key will be available if {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} is available or the
3425 * camera device advertises this key via {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys }.</p>
Zhijun Hecd950b62015-11-12 17:47:52 -08003426 * <p><b>Range of valid values:</b><br>
3427 * &gt;= 0 for each.</p>
3428 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3429 *
3430 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
3431 * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3432 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
3433 * @see CaptureRequest#SENSOR_SENSITIVITY
3434 */
3435 @PublicKey
Zhijun He8998ad92015-11-24 14:31:04 -08003436 public static final Key<float[]> SENSOR_DYNAMIC_BLACK_LEVEL =
3437 new Key<float[]>("android.sensor.dynamicBlackLevel", float[].class);
Zhijun Hecd950b62015-11-12 17:47:52 -08003438
3439 /**
3440 * <p>Maximum raw value output by sensor for this frame.</p>
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07003441 * <p>Since the {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} may change for different
Zhijun Hecd950b62015-11-12 17:47:52 -08003442 * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}), the white
3443 * level will change accordingly. This key is similar to
3444 * {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}, but specifies the camera device
3445 * estimated white level for each frame.</p>
3446 * <p>This key will be available if {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} is
3447 * available or the camera device advertises this key via
3448 * {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys }.</p>
3449 * <p><b>Range of valid values:</b><br>
3450 * &gt;= 0</p>
3451 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3452 *
Eino-Ville Talvalac7c569d2016-04-04 10:48:38 -07003453 * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
Zhijun Hecd950b62015-11-12 17:47:52 -08003454 * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
3455 * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS
3456 * @see CaptureRequest#SENSOR_SENSITIVITY
3457 */
3458 @PublicKey
3459 public static final Key<Integer> SENSOR_DYNAMIC_WHITE_LEVEL =
3460 new Key<Integer>("android.sensor.dynamicWhiteLevel", int.class);
3461
3462 /**
Zhijun Heba93fe62014-01-17 16:43:05 -08003463 * <p>Quality of lens shading correction applied
3464 * to the image data.</p>
3465 * <p>When set to OFF mode, no lens shading correction will be applied by the
3466 * camera device, and an identity lens shading map data will be provided
3467 * 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 -07003468 * shading map with size of <code>[ 4, 3 ]</code>,
3469 * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity
3470 * map shown below:</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08003471 * <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 -07003472 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3473 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3474 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3475 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
3476 * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
Zhijun Heba93fe62014-01-17 16:43:05 -08003477 * </code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003478 * <p>When set to other modes, lens shading correction will be applied by the camera
3479 * device. Applications can request lens shading map data by setting
3480 * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens
3481 * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map
3482 * data will be the one applied by the camera device for this capture request.</p>
3483 * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
3484 * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
3485 * 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>
3486 * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
3487 * to be converged before using the returned shading map data.</p>
3488 * <p><b>Possible values:</b>
3489 * <ul>
3490 * <li>{@link #SHADING_MODE_OFF OFF}</li>
3491 * <li>{@link #SHADING_MODE_FAST FAST}</li>
3492 * <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
3493 * </ul></p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003494 * <p><b>Available values for this device:</b><br>
3495 * {@link CameraCharacteristics#SHADING_AVAILABLE_MODES android.shading.availableModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003496 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3497 * <p><b>Full capability</b> -
3498 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3499 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun Heba93fe62014-01-17 16:43:05 -08003500 *
Zhijun Hefa7c7552014-05-22 16:36:02 -07003501 * @see CaptureRequest#CONTROL_AE_MODE
3502 * @see CaptureRequest#CONTROL_AWB_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003503 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003504 * @see CameraCharacteristics#SHADING_AVAILABLE_MODES
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003505 * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
Zhijun Heba93fe62014-01-17 16:43:05 -08003506 * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
3507 * @see #SHADING_MODE_OFF
3508 * @see #SHADING_MODE_FAST
3509 * @see #SHADING_MODE_HIGH_QUALITY
Zhijun Heba93fe62014-01-17 16:43:05 -08003510 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003511 @PublicKey
Zhijun Heba93fe62014-01-17 16:43:05 -08003512 public static final Key<Integer> SHADING_MODE =
3513 new Key<Integer>("android.shading.mode", int.class);
3514
3515 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003516 * <p>Operating mode for the face detector
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003517 * unit.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003518 * <p>Whether face detection is enabled, and whether it
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003519 * should output just the basic fields or the full set of
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003520 * fields.</p>
3521 * <p><b>Possible values:</b>
3522 * <ul>
3523 * <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li>
3524 * <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li>
3525 * <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li>
3526 * </ul></p>
3527 * <p><b>Available values for this device:</b><br>
3528 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p>
3529 * <p>This key is available on all devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003530 *
3531 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003532 * @see #STATISTICS_FACE_DETECT_MODE_OFF
3533 * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
3534 * @see #STATISTICS_FACE_DETECT_MODE_FULL
3535 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003536 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003537 public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
3538 new Key<Integer>("android.statistics.faceDetectMode", int.class);
3539
3540 /**
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003541 * <p>List of unique IDs for detected faces.</p>
3542 * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
3543 * to the camera device. A face that leaves the field of view and later returns may be
3544 * assigned a new ID.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003545 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
3546 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003547 *
3548 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003549 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003550 */
3551 public static final Key<int[]> STATISTICS_FACE_IDS =
3552 new Key<int[]>("android.statistics.faceIds", int[].class);
3553
3554 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003555 * <p>List of landmarks for detected
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003556 * faces.</p>
3557 * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
3558 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003559 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} == FULL
3560 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003561 *
3562 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3563 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003564 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003565 */
3566 public static final Key<int[]> STATISTICS_FACE_LANDMARKS =
3567 new Key<int[]>("android.statistics.faceLandmarks", int[].class);
3568
3569 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003570 * <p>List of the bounding rectangles for detected
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003571 * faces.</p>
3572 * <p>The coordinate system is that of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with
3573 * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003574 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF
3575 * This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003576 *
3577 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3578 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003579 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003580 */
3581 public static final Key<android.graphics.Rect[]> STATISTICS_FACE_RECTANGLES =
3582 new Key<android.graphics.Rect[]>("android.statistics.faceRectangles", android.graphics.Rect[].class);
3583
3584 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003585 * <p>List of the face confidence scores for
3586 * detected faces</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003587 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} != OFF.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003588 * <p><b>Range of valid values:</b><br>
3589 * 1-100</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003590 * <p>This key is available on all devices.</p>
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003591 *
3592 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
Zhijun He7f80d6f2013-11-04 10:18:05 -08003593 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003594 */
3595 public static final Key<byte[]> STATISTICS_FACE_SCORES =
3596 new Key<byte[]>("android.statistics.faceScores", byte[].class);
3597
3598 /**
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003599 * <p>List of the faces detected through camera face detection
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003600 * in this capture.</p>
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003601 * <p>Only available if {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} <code>!=</code> OFF.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003602 * <p>This key is available on all devices.</p>
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003603 *
3604 * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE
3605 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003606 @PublicKey
3607 @SyntheticKey
Igor Murashkin72f9f0a2014-05-14 15:46:10 -07003608 public static final Key<android.hardware.camera2.params.Face[]> STATISTICS_FACES =
3609 new Key<android.hardware.camera2.params.Face[]>("android.statistics.faces", android.hardware.camera2.params.Face[].class);
3610
3611 /**
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003612 * <p>The shading map is a low-resolution floating-point map
3613 * that lists the coefficients used to correct for vignetting, for each
3614 * Bayer color channel.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003615 * <p>The map provided here is the same map that is used by the camera device to
3616 * correct both color shading and vignetting for output non-RAW images.</p>
3617 * <p>When there is no lens shading correction applied to RAW
3618 * output images ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} <code>==</code>
3619 * false), this map is the complete lens shading correction
3620 * map; when there is some lens shading correction applied to
3621 * 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
3622 * correction map that needs to be applied to get shading
3623 * corrected images that match the camera device's output for
3624 * non-RAW formats.</p>
3625 * <p>For a complete shading correction map, the least shaded
3626 * section of the image will have a gain factor of 1; all
3627 * other sections will have gains above 1.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003628 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003629 * will take into account the colorCorrection settings.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003630 * <p>The shading map is for the entire active pixel array, and is not
3631 * affected by the crop region specified in the request. Each shading map
3632 * entry is the value of the shading compensation map over a specific
3633 * pixel on the sensor. Specifically, with a (N x M) resolution shading
3634 * map, and an active pixel array size (W x H), shading map entry
3635 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
3636 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
3637 * The map is assumed to be bilinearly interpolated between the sample points.</p>
3638 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
3639 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
Ruben Brunk57493682014-05-27 18:58:08 -07003640 * The shading map is stored in a fully interleaved format.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003641 * <p>The shading map will generally have on the order of 30-40 rows and columns,
3642 * and will be smaller than 64x64.</p>
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003643 * <p>As an example, given a very small map defined as:</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003644 * <pre><code>width,height = [ 4, 3 ]
3645 * values =
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003646 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003647 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
3648 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
3649 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
3650 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
3651 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Igor Murashkin7a9b30e2013-12-11 13:31:38 -08003652 * </code></pre>
3653 * <p>The low-resolution scaling map images for each channel are
3654 * (displayed using nearest-neighbor interpolation):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003655 * <p><img alt="Red lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
3656 * <img alt="Green (even rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
3657 * <img alt="Green (odd rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
3658 * <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 -08003659 * <p>As a visualization only, inverting the full-color map to recover an
3660 * 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 -08003661 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003662 * <p><b>Range of valid values:</b><br>
3663 * Each gain factor is &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003664 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3665 * <p><b>Full capability</b> -
3666 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3667 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003668 *
Zhijun He5f2a47f2014-01-16 15:44:41 -08003669 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003670 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003671 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
Ruben Brunk57493682014-05-27 18:58:08 -07003672 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003673 @PublicKey
Ruben Brunk57493682014-05-27 18:58:08 -07003674 public static final Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP =
3675 new Key<android.hardware.camera2.params.LensShadingMap>("android.statistics.lensShadingCorrectionMap", android.hardware.camera2.params.LensShadingMap.class);
3676
3677 /**
3678 * <p>The shading map is a low-resolution floating-point map
Zhijun He43210fe2016-04-12 23:15:23 -07003679 * that lists the coefficients used to correct for vignetting and color shading,
3680 * for each Bayer color channel of RAW image data.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003681 * <p>The map provided here is the same map that is used by the camera device to
3682 * correct both color shading and vignetting for output non-RAW images.</p>
3683 * <p>When there is no lens shading correction applied to RAW
3684 * output images ({@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} <code>==</code>
3685 * false), this map is the complete lens shading correction
3686 * map; when there is some lens shading correction applied to
3687 * 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
3688 * correction map that needs to be applied to get shading
3689 * corrected images that match the camera device's output for
3690 * non-RAW formats.</p>
3691 * <p>For a complete shading correction map, the least shaded
3692 * section of the image will have a gain factor of 1; all
3693 * other sections will have gains above 1.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003694 * <p>When {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} = TRANSFORM_MATRIX, the map
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003695 * will take into account the colorCorrection settings.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003696 * <p>The shading map is for the entire active pixel array, and is not
3697 * affected by the crop region specified in the request. Each shading map
3698 * entry is the value of the shading compensation map over a specific
3699 * pixel on the sensor. Specifically, with a (N x M) resolution shading
3700 * map, and an active pixel array size (W x H), shading map entry
3701 * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
3702 * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
3703 * The map is assumed to be bilinearly interpolated between the sample points.</p>
3704 * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
3705 * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
3706 * The shading map is stored in a fully interleaved format, and its size
3707 * is provided in the camera static metadata by android.lens.info.shadingMapSize.</p>
Eino-Ville Talvalac62cea82016-06-02 14:21:27 -07003708 * <p>The shading map will generally have on the order of 30-40 rows and columns,
3709 * and will be smaller than 64x64.</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003710 * <p>As an example, given a very small map defined as:</p>
3711 * <pre><code>android.lens.info.shadingMapSize = [ 4, 3 ]
3712 * android.statistics.lensShadingMap =
3713 * [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003714 * 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
3715 * 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
3716 * 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
3717 * 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
3718 * 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
Ruben Brunk57493682014-05-27 18:58:08 -07003719 * </code></pre>
3720 * <p>The low-resolution scaling map images for each channel are
3721 * (displayed using nearest-neighbor interpolation):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003722 * <p><img alt="Red lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
3723 * <img alt="Green (even rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
3724 * <img alt="Green (odd rows) lens shading map" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
3725 * <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 -07003726 * <p>As a visualization only, inverting the full-color map to recover an
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003727 * image of a gray wall (using bicubic interpolation for visual quality)
3728 * as captured by the sensor gives:</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003729 * <p><img alt="Image of a uniform white wall (inverse shading map)" src="/reference/images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003730 * <p>Note that the RAW image data might be subject to lens shading
3731 * correction not reported on this map. Query
3732 * {@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied} to see if RAW image data has subject
3733 * to lens shading correction. If {@link CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED android.sensor.info.lensShadingApplied}
3734 * is TRUE, the RAW image data is subject to partial or full lens shading
3735 * correction. In the case full lens shading correction is applied to RAW
3736 * images, the gain factor map reported in this key will contain all 1.0 gains.
3737 * In other words, the map reported in this key is the remaining lens shading
3738 * that needs to be applied on the RAW image to get images without lens shading
3739 * artifacts. See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image
3740 * formats.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003741 * <p><b>Range of valid values:</b><br>
3742 * Each gain factor is &gt;= 1</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003743 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3744 * <p><b>Full capability</b> -
3745 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3746 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Ruben Brunk57493682014-05-27 18:58:08 -07003747 *
3748 * @see CaptureRequest#COLOR_CORRECTION_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003749 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003750 * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW
3751 * @see CameraCharacteristics#SENSOR_INFO_LENS_SHADING_APPLIED
Ruben Brunk57493682014-05-27 18:58:08 -07003752 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003753 */
3754 public static final Key<float[]> STATISTICS_LENS_SHADING_MAP =
3755 new Key<float[]>("android.statistics.lensShadingMap", float[].class);
3756
3757 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003758 * <p>The best-fit color channel gains calculated
Zhijun Hecc28a412014-02-24 15:11:23 -08003759 * by the camera device's statistics units for the current output frame.</p>
Igor Murashkinace5bf02013-12-10 17:36:40 -08003760 * <p>This may be different than the gains used for this frame,
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003761 * since statistics processing on data from a new frame
3762 * typically completes after the transform has already been
Igor Murashkinace5bf02013-12-10 17:36:40 -08003763 * applied to that frame.</p>
3764 * <p>The 4 channel gains are defined in Bayer domain,
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003765 * see {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} for details.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003766 * <p>This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkinace5bf02013-12-10 17:36:40 -08003767 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003768 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003769 *
3770 * @see CaptureRequest#COLOR_CORRECTION_GAINS
Igor Murashkin9c595172014-05-12 13:56:20 -07003771 * @deprecated
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003772 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003773 */
Igor Murashkin9c595172014-05-12 13:56:20 -07003774 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003775 public static final Key<float[]> STATISTICS_PREDICTED_COLOR_GAINS =
3776 new Key<float[]>("android.statistics.predictedColorGains", float[].class);
3777
3778 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003779 * <p>The best-fit color transform matrix estimate
Zhijun Hecc28a412014-02-24 15:11:23 -08003780 * calculated by the camera device's statistics units for the current
3781 * output frame.</p>
3782 * <p>The camera device will provide the estimate from its
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003783 * statistics unit on the white balance transforms to use
Zhijun Hecc28a412014-02-24 15:11:23 -08003784 * for the next frame. These are the values the camera device believes
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003785 * are the best fit for the current output frame. This may
3786 * be different than the transform used for this frame, since
3787 * statistics processing on data from a new frame typically
3788 * completes after the transform has already been applied to
Igor Murashkinace5bf02013-12-10 17:36:40 -08003789 * that frame.</p>
3790 * <p>These estimates must be provided for all frames, even if
3791 * capture settings and color transforms are set by the application.</p>
Eino-Ville Talvalab67a3b32014-06-06 13:07:20 -07003792 * <p>This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkinace5bf02013-12-10 17:36:40 -08003793 * regardless of the android.control.* current values.</p>
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003794 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Igor Murashkin9c595172014-05-12 13:56:20 -07003795 * @deprecated
Igor Murashkinaef3b7e2014-01-15 13:20:37 -08003796 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003797 */
Igor Murashkin9c595172014-05-12 13:56:20 -07003798 @Deprecated
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003799 public static final Key<Rational[]> STATISTICS_PREDICTED_COLOR_TRANSFORM =
3800 new Key<Rational[]>("android.statistics.predictedColorTransform", Rational[].class);
3801
3802 /**
Zhijun He208fb6c2014-02-03 13:09:06 -08003803 * <p>The camera device estimated scene illumination lighting
3804 * frequency.</p>
3805 * <p>Many light sources, such as most fluorescent lights, flicker at a rate
3806 * that depends on the local utility power standards. This flicker must be
3807 * accounted for by auto-exposure routines to avoid artifacts in captured images.
3808 * The camera device uses this entry to tell the application what the scene
3809 * illuminant frequency is.</p>
3810 * <p>When manual exposure control is enabled
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003811 * (<code>{@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} == OFF</code> or <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} ==
3812 * OFF</code>), the {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} doesn't perform
3813 * antibanding, and the application can ensure it selects
3814 * exposure times that do not cause banding issues by looking
3815 * into this metadata field. See
3816 * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} for more details.</p>
3817 * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003818 * <p><b>Possible values:</b>
3819 * <ul>
3820 * <li>{@link #STATISTICS_SCENE_FLICKER_NONE NONE}</li>
3821 * <li>{@link #STATISTICS_SCENE_FLICKER_50HZ 50HZ}</li>
3822 * <li>{@link #STATISTICS_SCENE_FLICKER_60HZ 60HZ}</li>
3823 * </ul></p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003824 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3825 * <p><b>Full capability</b> -
3826 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3827 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He208fb6c2014-02-03 13:09:06 -08003828 *
3829 * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE
3830 * @see CaptureRequest#CONTROL_AE_MODE
3831 * @see CaptureRequest#CONTROL_MODE
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003832 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003833 * @see #STATISTICS_SCENE_FLICKER_NONE
3834 * @see #STATISTICS_SCENE_FLICKER_50HZ
3835 * @see #STATISTICS_SCENE_FLICKER_60HZ
3836 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003837 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003838 public static final Key<Integer> STATISTICS_SCENE_FLICKER =
3839 new Key<Integer>("android.statistics.sceneFlicker", int.class);
3840
3841 /**
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003842 * <p>Operating mode for hot pixel map generation.</p>
3843 * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
3844 * If set to <code>false</code>, no hot pixel map will be returned.</p>
3845 * <p><b>Range of valid values:</b><br>
3846 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003847 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003848 *
3849 * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
3850 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
3851 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003852 @PublicKey
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003853 public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
3854 new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
3855
3856 /**
3857 * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
3858 * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
3859 * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
3860 * bottom-right of the pixel array, respectively. The width and
3861 * height dimensions are given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.
3862 * This may include hot pixels that lie outside of the active array
3863 * bounds given by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003864 * <p><b>Range of valid values:</b><br></p>
3865 * <p>n &lt;= number of pixels on the sensor.
3866 * The <code>(x, y)</code> coordinates must be bounded by
3867 * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003868 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003869 *
3870 * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
3871 * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE
3872 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003873 @PublicKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003874 public static final Key<android.graphics.Point[]> STATISTICS_HOT_PIXEL_MAP =
3875 new Key<android.graphics.Point[]>("android.statistics.hotPixelMap", android.graphics.Point[].class);
Ruben Brunk9d454fd2014-03-04 14:11:52 -08003876
3877 /**
Zhijun He379af012014-05-06 11:54:54 -07003878 * <p>Whether the camera device will output the lens
3879 * shading map in output result metadata.</p>
3880 * <p>When set to ON,
Eino-Ville Talvalae600d6a2014-06-09 14:25:50 -07003881 * android.statistics.lensShadingMap will be provided in
Zhijun He379af012014-05-06 11:54:54 -07003882 * the output result metadata.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003883 * <p>ON is always supported on devices with the RAW capability.</p>
3884 * <p><b>Possible values:</b>
3885 * <ul>
3886 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li>
3887 * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li>
3888 * </ul></p>
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003889 * <p><b>Available values for this device:</b><br>
3890 * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES android.statistics.info.availableLensShadingMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003891 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3892 * <p><b>Full capability</b> -
3893 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3894 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
3895 *
3896 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yehe4aa2832015-02-06 15:15:53 -08003897 * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES
Zhijun He379af012014-05-06 11:54:54 -07003898 * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
3899 * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
3900 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07003901 @PublicKey
Zhijun He379af012014-05-06 11:54:54 -07003902 public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
3903 new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
3904
3905 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003906 * <p>Tonemapping / contrast / gamma curve for the blue
Igor Murashkine0060932014-01-17 17:24:11 -08003907 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3908 * CONTRAST_CURVE.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003909 * <p>See android.tonemap.curveRed for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003910 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3911 * <p><b>Full capability</b> -
3912 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3913 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003914 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003915 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He5f2a47f2014-01-16 15:44:41 -08003916 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003917 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003918 */
Zhijun He3ffd7052013-08-19 15:45:08 -07003919 public static final Key<float[]> TONEMAP_CURVE_BLUE =
3920 new Key<float[]>("android.tonemap.curveBlue", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003921
3922 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003923 * <p>Tonemapping / contrast / gamma curve for the green
Igor Murashkine0060932014-01-17 17:24:11 -08003924 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3925 * CONTRAST_CURVE.</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003926 * <p>See android.tonemap.curveRed for more details.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003927 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3928 * <p><b>Full capability</b> -
3929 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3930 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003931 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003932 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He5f2a47f2014-01-16 15:44:41 -08003933 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003934 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003935 */
Zhijun He3ffd7052013-08-19 15:45:08 -07003936 public static final Key<float[]> TONEMAP_CURVE_GREEN =
3937 new Key<float[]>("android.tonemap.curveGreen", float[].class);
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003938
3939 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08003940 * <p>Tonemapping / contrast / gamma curve for the red
Igor Murashkine0060932014-01-17 17:24:11 -08003941 * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
3942 * CONTRAST_CURVE.</p>
3943 * <p>Each channel's curve is defined by an array of control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003944 * <pre><code>android.tonemap.curveRed =
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003945 * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He870922b2014-02-15 21:47:51 -08003946 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003947 * <p>These are sorted in order of increasing <code>Pin</code>; it is
3948 * required that input values 0.0 and 1.0 are included in the list to
Igor Murashkine0060932014-01-17 17:24:11 -08003949 * define a complete mapping. For input values between control points,
3950 * the camera device must linearly interpolate between the control
3951 * points.</p>
3952 * <p>Each curve can have an independent number of points, and the number
3953 * of points can be less than max (that is, the request doesn't have to
3954 * always provide a curve with number of points equivalent to
3955 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
3956 * <p>A few examples, and their corresponding graphical mappings; these
3957 * only specify the red channel and the precision is limited to 4
3958 * digits, for conciseness.</p>
3959 * <p>Linear mapping:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003960 * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003961 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003962 * <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 -08003963 * <p>Invert mapping:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003964 * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003965 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003966 * <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 -08003967 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003968 * <pre><code>android.tonemap.curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003969 * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
3970 * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
3971 * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
3972 * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003973 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003974 * <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 -08003975 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003976 * <pre><code>android.tonemap.curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07003977 * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
3978 * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
3979 * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
3980 * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
Igor Murashkine0060932014-01-17 17:24:11 -08003981 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08003982 * <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 -07003983 * <p><b>Range of valid values:</b><br>
3984 * 0-1 on both input and output coordinates, normalized
3985 * as a floating-point value such that 0 == black and 1 == white.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003986 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
3987 * <p><b>Full capability</b> -
3988 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
3989 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003990 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07003991 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Igor Murashkine0060932014-01-17 17:24:11 -08003992 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08003993 * @see CaptureRequest#TONEMAP_MODE
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07003994 * @hide
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07003995 */
3996 public static final Key<float[]> TONEMAP_CURVE_RED =
3997 new Key<float[]>("android.tonemap.curveRed", float[].class);
3998
3999 /**
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004000 * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}
4001 * is CONTRAST_CURVE.</p>
4002 * <p>The tonemapCurve consist of three curves for each of red, green, and blue
4003 * channels respectively. The following example uses the red channel as an
4004 * example. The same logic applies to green and blue channel.
4005 * Each channel's curve is defined by an array of control points:</p>
4006 * <pre><code>curveRed =
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004007 * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004008 * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
4009 * <p>These are sorted in order of increasing <code>Pin</code>; it is always
4010 * guaranteed that input values 0.0 and 1.0 are included in the list to
4011 * define a complete mapping. For input values between control points,
4012 * the camera device must linearly interpolate between the control
4013 * points.</p>
4014 * <p>Each curve can have an independent number of points, and the number
4015 * of points can be less than max (that is, the request doesn't have to
4016 * always provide a curve with number of points equivalent to
4017 * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
4018 * <p>A few examples, and their corresponding graphical mappings; these
4019 * only specify the red channel and the precision is limited to 4
4020 * digits, for conciseness.</p>
4021 * <p>Linear mapping:</p>
4022 * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ]
4023 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004024 * <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 -07004025 * <p>Invert mapping:</p>
4026 * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ]
4027 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004028 * <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 -07004029 * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
4030 * <pre><code>curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004031 * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
4032 * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
4033 * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
4034 * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004035 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004036 * <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 -07004037 * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
4038 * <pre><code>curveRed = [
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004039 * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
4040 * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
4041 * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
4042 * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004043 * </code></pre>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004044 * <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 -07004045 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4046 * <p><b>Full capability</b> -
4047 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4048 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004049 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004050 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004051 * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
4052 * @see CaptureRequest#TONEMAP_MODE
4053 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004054 @PublicKey
4055 @SyntheticKey
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004056 public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE =
4057 new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class);
4058
4059 /**
Igor Murashkine0060932014-01-17 17:24:11 -08004060 * <p>High-level global contrast/gamma/tonemapping control.</p>
4061 * <p>When switching to an application-defined contrast curve by setting
4062 * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
4063 * per-channel with a set of <code>(in, out)</code> points that specify the
4064 * mapping from input high-bit-depth pixel value to the output
4065 * low-bit-depth value. Since the actual pixel ranges of both input
4066 * and output may change depending on the camera pipeline, the values
4067 * are specified by normalized floating-point numbers.</p>
4068 * <p>More-complex color mapping operations such as 3D color look-up
4069 * tables, selective chroma enhancement, or other non-linear color
4070 * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4071 * CONTRAST_CURVE.</p>
4072 * <p>When using either FAST or HIGH_QUALITY, the camera device will
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004073 * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.
Igor Murashkine0060932014-01-17 17:24:11 -08004074 * These values are always available, and as close as possible to the
4075 * actually used nonlinear/nonglobal transforms.</p>
Zhijun Hefa7c7552014-05-22 16:36:02 -07004076 * <p>If a request is sent with CONTRAST_CURVE with the camera device's
Igor Murashkine0060932014-01-17 17:24:11 -08004077 * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
4078 * roughly the same.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004079 * <p><b>Possible values:</b>
4080 * <ul>
4081 * <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li>
4082 * <li>{@link #TONEMAP_MODE_FAST FAST}</li>
4083 * <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li>
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004084 * <li>{@link #TONEMAP_MODE_GAMMA_VALUE GAMMA_VALUE}</li>
4085 * <li>{@link #TONEMAP_MODE_PRESET_CURVE PRESET_CURVE}</li>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004086 * </ul></p>
4087 * <p><b>Available values for this device:</b><br>
4088 * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004089 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4090 * <p><b>Full capability</b> -
4091 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4092 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Igor Murashkin3242f4f2014-01-15 12:27:41 -08004093 *
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004094 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Ruben Brunk6dc379c2014-03-04 15:04:00 -08004095 * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
Yin-Chia Yeh8490ace2014-05-27 10:04:54 -07004096 * @see CaptureRequest#TONEMAP_CURVE
Igor Murashkine0060932014-01-17 17:24:11 -08004097 * @see CaptureRequest#TONEMAP_MODE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004098 * @see #TONEMAP_MODE_CONTRAST_CURVE
4099 * @see #TONEMAP_MODE_FAST
4100 * @see #TONEMAP_MODE_HIGH_QUALITY
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004101 * @see #TONEMAP_MODE_GAMMA_VALUE
4102 * @see #TONEMAP_MODE_PRESET_CURVE
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004103 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004104 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004105 public static final Key<Integer> TONEMAP_MODE =
4106 new Key<Integer>("android.tonemap.mode", int.class);
4107
4108 /**
Yin-Chia Yeh956c52b2015-02-06 11:23:25 -08004109 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4110 * GAMMA_VALUE</p>
4111 * <p>The tonemap curve will be defined the following formula:
4112 * * OUT = pow(IN, 1.0 / gamma)
4113 * where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
4114 * pow is the power function and gamma is the gamma value specified by this
4115 * key.</p>
4116 * <p>The same curve will be applied to all color channels. The camera device
4117 * may clip the input gamma value to its supported range. The actual applied
4118 * value will be returned in capture result.</p>
4119 * <p>The valid range of gamma value varies on different devices, but values
4120 * within [1.0, 5.0] are guaranteed not to be clipped.</p>
4121 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4122 *
4123 * @see CaptureRequest#TONEMAP_MODE
4124 */
4125 @PublicKey
4126 public static final Key<Float> TONEMAP_GAMMA =
4127 new Key<Float>("android.tonemap.gamma", float.class);
4128
4129 /**
4130 * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
4131 * PRESET_CURVE</p>
4132 * <p>The tonemap curve will be defined by specified standard.</p>
4133 * <p>sRGB (approximated by 16 control points):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004134 * <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 -08004135 * <p>Rec. 709 (approximated by 16 control points):</p>
Eino-Ville Talvala9dc7ec12017-11-10 15:23:00 -08004136 * <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 -08004137 * <p>Note that above figures show a 16 control points approximation of preset
4138 * curves. Camera devices may apply a different approximation to the curve.</p>
4139 * <p><b>Possible values:</b>
4140 * <ul>
4141 * <li>{@link #TONEMAP_PRESET_CURVE_SRGB SRGB}</li>
4142 * <li>{@link #TONEMAP_PRESET_CURVE_REC709 REC709}</li>
4143 * </ul></p>
4144 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4145 *
4146 * @see CaptureRequest#TONEMAP_MODE
4147 * @see #TONEMAP_PRESET_CURVE_SRGB
4148 * @see #TONEMAP_PRESET_CURVE_REC709
4149 */
4150 @PublicKey
4151 public static final Key<Integer> TONEMAP_PRESET_CURVE =
4152 new Key<Integer>("android.tonemap.presetCurve", int.class);
4153
4154 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004155 * <p>This LED is nominally used to indicate to the user
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004156 * that the camera is powered on and may be streaming images back to the
4157 * Application Processor. In certain rare circumstances, the OS may
4158 * disable this when video is processed locally and not transmitted to
Igor Murashkinace5bf02013-12-10 17:36:40 -08004159 * any untrusted applications.</p>
4160 * <p>In particular, the LED <em>must</em> always be on when the data could be
4161 * transmitted off the device. The LED <em>should</em> always be on whenever
4162 * data is stored locally on the device.</p>
4163 * <p>The LED <em>may</em> be off if a trusted application is using the data that
4164 * doesn't violate the above rules.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004165 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004166 * @hide
4167 */
4168 public static final Key<Boolean> LED_TRANSMIT =
4169 new Key<Boolean>("android.led.transmit", boolean.class);
4170
4171 /**
Igor Murashkinace5bf02013-12-10 17:36:40 -08004172 * <p>Whether black-level compensation is locked
Eino-Ville Talvala0956af52013-12-26 13:19:10 -08004173 * to its current values, or is free to vary.</p>
4174 * <p>Whether the black level offset was locked for this frame. Should be
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004175 * 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 -08004176 * a change in other capture settings forced the camera device to
4177 * perform a black level reset.</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004178 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
4179 * <p><b>Full capability</b> -
4180 * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
4181 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Eino-Ville Talvala0da8bf52014-01-08 16:18:35 -08004182 *
4183 * @see CaptureRequest#BLACK_LEVEL_LOCK
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004184 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004185 */
Igor Murashkin6c76f582014-07-15 17:19:49 -07004186 @PublicKey
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004187 public static final Key<Boolean> BLACK_LEVEL_LOCK =
4188 new Key<Boolean>("android.blackLevel.lock", boolean.class);
4189
Igor Murashkin3865a842014-01-17 18:18:39 -08004190 /**
4191 * <p>The frame number corresponding to the last request
4192 * with which the output result (metadata + buffers) has been fully
4193 * synchronized.</p>
4194 * <p>When a request is submitted to the camera device, there is usually a
4195 * delay of several frames before the controls get applied. A camera
4196 * device may either choose to account for this delay by implementing a
4197 * pipeline and carefully submit well-timed atomic control updates, or
4198 * it may start streaming control changes that span over several frame
4199 * boundaries.</p>
4200 * <p>In the latter case, whenever a request's settings change relative to
4201 * the previous submitted request, the full set of changes may take
4202 * multiple frame durations to fully take effect. Some settings may
4203 * take effect sooner (in less frame durations) than others.</p>
4204 * <p>While a set of control changes are being propagated, this value
4205 * will be CONVERGING.</p>
4206 * <p>Once it is fully known that a set of control changes have been
4207 * finished propagating, and the resulting updated control settings
4208 * have been read back by the camera device, this value will be set
4209 * to a non-negative frame number (corresponding to the request to
4210 * which the results have synchronized to).</p>
4211 * <p>Older camera device implementations may not have a way to detect
4212 * when all camera controls have been applied, and will always set this
4213 * value to UNKNOWN.</p>
4214 * <p>FULL capability devices will always have this value set to the
4215 * frame number of the request corresponding to this result.</p>
4216 * <p><em>Further details</em>:</p>
4217 * <ul>
4218 * <li>Whenever a request differs from the last request, any future
4219 * results not yet returned may have this value set to CONVERGING (this
4220 * could include any in-progress captures not yet returned by the camera
4221 * device, for more details see pipeline considerations below).</li>
4222 * <li>Submitting a series of multiple requests that differ from the
4223 * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
4224 * moves the new synchronization frame to the last non-repeating
4225 * request (using the smallest frame number from the contiguous list of
4226 * repeating requests).</li>
4227 * <li>Submitting the same request repeatedly will not change this value
4228 * to CONVERGING, if it was already a non-negative value.</li>
4229 * <li>When this value changes to non-negative, that means that all of the
4230 * metadata controls from the request have been applied, all of the
4231 * metadata controls from the camera device have been read to the
4232 * updated values (into the result), and all of the graphics buffers
4233 * corresponding to this result are also synchronized to the request.</li>
4234 * </ul>
4235 * <p><em>Pipeline considerations</em>:</p>
4236 * <p>Submitting a request with updated controls relative to the previously
4237 * submitted requests may also invalidate the synchronization state
4238 * of all the results corresponding to currently in-flight requests.</p>
4239 * <p>In other words, results for this current request and up to
4240 * {@link CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH android.request.pipelineMaxDepth} prior requests may have their
4241 * android.sync.frameNumber change to CONVERGING.</p>
Eino-Ville Talvalafd3e2892014-10-06 10:23:55 -07004242 * <p><b>Possible values:</b>
4243 * <ul>
4244 * <li>{@link #SYNC_FRAME_NUMBER_CONVERGING CONVERGING}</li>
4245 * <li>{@link #SYNC_FRAME_NUMBER_UNKNOWN UNKNOWN}</li>
4246 * </ul></p>
4247 * <p><b>Available values for this device:</b><br>
4248 * Either a non-negative value corresponding to a
4249 * <code>frame_number</code>, or one of the two enums (CONVERGING / UNKNOWN).</p>
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004250 * <p>This key is available on all devices.</p>
Igor Murashkin3865a842014-01-17 18:18:39 -08004251 *
4252 * @see CameraCharacteristics#REQUEST_PIPELINE_MAX_DEPTH
4253 * @see #SYNC_FRAME_NUMBER_CONVERGING
4254 * @see #SYNC_FRAME_NUMBER_UNKNOWN
4255 * @hide
4256 */
Zhijun He4f91e2a2014-04-17 13:20:21 -07004257 public static final Key<Long> SYNC_FRAME_NUMBER =
4258 new Key<Long>("android.sync.frameNumber", long.class);
Igor Murashkin3865a842014-01-17 18:18:39 -08004259
Zhijun He0e99c222015-01-29 15:26:05 -08004260 /**
4261 * <p>The amount of exposure time increase factor applied to the original output
4262 * frame by the application processing before sending for reprocessing.</p>
4263 * <p>This is optional, and will be supported if the camera device supports YUV_REPROCESSING
4264 * capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains YUV_REPROCESSING).</p>
4265 * <p>For some YUV reprocessing use cases, the application may choose to filter the original
4266 * output frames to effectively reduce the noise to the same level as a frame that was
4267 * captured with longer exposure time. To be more specific, assuming the original captured
4268 * images were captured with a sensitivity of S and an exposure time of T, the model in
4269 * the camera device is that the amount of noise in the image would be approximately what
4270 * would be expected if the original capture parameters had been a sensitivity of
4271 * S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather
4272 * than S and T respectively. If the captured images were processed by the application
4273 * before being sent for reprocessing, then the application may have used image processing
4274 * algorithms and/or multi-frame image fusion to reduce the noise in the
4275 * application-processed images (input images). By using the effectiveExposureFactor
4276 * control, the application can communicate to the camera device the actual noise level
4277 * improvement in the application-processed image. With this information, the camera
4278 * device can select appropriate noise reduction and edge enhancement parameters to avoid
4279 * excessive noise reduction ({@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}) and insufficient edge
4280 * enhancement ({@link CaptureRequest#EDGE_MODE android.edge.mode}) being applied to the reprocessed frames.</p>
4281 * <p>For example, for multi-frame image fusion use case, the application may fuse
4282 * multiple output frames together to a final frame for reprocessing. When N image are
4283 * fused into 1 image for reprocessing, the exposure time increase factor could be up to
4284 * square root of N (based on a simple photon shot noise model). The camera device will
4285 * adjust the reprocessing noise reduction and edge enhancement parameters accordingly to
4286 * produce the best quality images.</p>
4287 * <p>This is relative factor, 1.0 indicates the application hasn't processed the input
4288 * buffer in a way that affects its effective exposure time.</p>
4289 * <p>This control is only effective for YUV reprocessing capture request. For noise
4290 * reduction reprocessing, it is only effective when <code>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} != OFF</code>.
4291 * Similarly, for edge enhancement reprocessing, it is only effective when
4292 * <code>{@link CaptureRequest#EDGE_MODE android.edge.mode} != OFF</code>.</p>
4293 * <p><b>Units</b>: Relative exposure time increase factor.</p>
4294 * <p><b>Range of valid values:</b><br>
4295 * &gt;= 1.0</p>
4296 * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
Zhijun He513f7c32015-04-24 18:23:54 -07004297 * <p><b>Limited capability</b> -
4298 * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the
4299 * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
Zhijun He0e99c222015-01-29 15:26:05 -08004300 *
4301 * @see CaptureRequest#EDGE_MODE
Zhijun He513f7c32015-04-24 18:23:54 -07004302 * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
Zhijun He0e99c222015-01-29 15:26:05 -08004303 * @see CaptureRequest#NOISE_REDUCTION_MODE
4304 * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
4305 */
4306 @PublicKey
4307 public static final Key<Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR =
4308 new Key<Float>("android.reprocess.effectiveExposureFactor", float.class);
4309
Eino-Ville Talvala5a32b20c2013-08-08 12:38:36 -07004310 /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
4311 * End generated code
4312 *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
Igor Murashkin6c76f582014-07-15 17:19:49 -07004313
Igor Murashkin4b8cd6b2014-10-02 16:00:52 -07004314
4315
Eino-Ville Talvalab2675542012-12-12 13:29:45 -08004316}