1 /*
2  * Copyright (C) 2015 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 
17 /**
18  * @addtogroup Camera
19  * @{
20  */
21 
22 /**
23  * @file NdkCameraMetadataTags.h
24  */
25 
26 /*
27  * This file defines an NDK API.
28  * Do not remove methods.
29  * Do not change method signatures.
30  * Do not change the value of constants.
31  * Do not change the size of any of the classes defined in here.
32  * Do not reference types that are not part of the NDK.
33  * Do not #include files that aren't part of the NDK.
34  */
35 
36 #ifndef _NDK_CAMERA_METADATA_TAGS_H
37 #define _NDK_CAMERA_METADATA_TAGS_H
38 
39 #include <sys/cdefs.h>
40 
41 __BEGIN_DECLS
42 
43 #if __ANDROID_API__ >= 24
44 
45 typedef enum acamera_metadata_section {
46     ACAMERA_COLOR_CORRECTION,
47     ACAMERA_CONTROL,
48     ACAMERA_DEMOSAIC,
49     ACAMERA_EDGE,
50     ACAMERA_FLASH,
51     ACAMERA_FLASH_INFO,
52     ACAMERA_HOT_PIXEL,
53     ACAMERA_JPEG,
54     ACAMERA_LENS,
55     ACAMERA_LENS_INFO,
56     ACAMERA_NOISE_REDUCTION,
57     ACAMERA_QUIRKS,
58     ACAMERA_REQUEST,
59     ACAMERA_SCALER,
60     ACAMERA_SENSOR,
61     ACAMERA_SENSOR_INFO,
62     ACAMERA_SHADING,
63     ACAMERA_STATISTICS,
64     ACAMERA_STATISTICS_INFO,
65     ACAMERA_TONEMAP,
66     ACAMERA_LED,
67     ACAMERA_INFO,
68     ACAMERA_BLACK_LEVEL,
69     ACAMERA_SYNC,
70     ACAMERA_REPROCESS,
71     ACAMERA_DEPTH,
72     ACAMERA_SECTION_COUNT,
73 
74     ACAMERA_VENDOR = 0x8000
75 } acamera_metadata_section_t;
76 
77 /**
78  * Hierarchy positions in enum space.
79  */
80 typedef enum acamera_metadata_section_start {
81     ACAMERA_COLOR_CORRECTION_START = ACAMERA_COLOR_CORRECTION  << 16,
82     ACAMERA_CONTROL_START          = ACAMERA_CONTROL           << 16,
83     ACAMERA_DEMOSAIC_START         = ACAMERA_DEMOSAIC          << 16,
84     ACAMERA_EDGE_START             = ACAMERA_EDGE              << 16,
85     ACAMERA_FLASH_START            = ACAMERA_FLASH             << 16,
86     ACAMERA_FLASH_INFO_START       = ACAMERA_FLASH_INFO        << 16,
87     ACAMERA_HOT_PIXEL_START        = ACAMERA_HOT_PIXEL         << 16,
88     ACAMERA_JPEG_START             = ACAMERA_JPEG              << 16,
89     ACAMERA_LENS_START             = ACAMERA_LENS              << 16,
90     ACAMERA_LENS_INFO_START        = ACAMERA_LENS_INFO         << 16,
91     ACAMERA_NOISE_REDUCTION_START  = ACAMERA_NOISE_REDUCTION   << 16,
92     ACAMERA_QUIRKS_START           = ACAMERA_QUIRKS            << 16,
93     ACAMERA_REQUEST_START          = ACAMERA_REQUEST           << 16,
94     ACAMERA_SCALER_START           = ACAMERA_SCALER            << 16,
95     ACAMERA_SENSOR_START           = ACAMERA_SENSOR            << 16,
96     ACAMERA_SENSOR_INFO_START      = ACAMERA_SENSOR_INFO       << 16,
97     ACAMERA_SHADING_START          = ACAMERA_SHADING           << 16,
98     ACAMERA_STATISTICS_START       = ACAMERA_STATISTICS        << 16,
99     ACAMERA_STATISTICS_INFO_START  = ACAMERA_STATISTICS_INFO   << 16,
100     ACAMERA_TONEMAP_START          = ACAMERA_TONEMAP           << 16,
101     ACAMERA_LED_START              = ACAMERA_LED               << 16,
102     ACAMERA_INFO_START             = ACAMERA_INFO              << 16,
103     ACAMERA_BLACK_LEVEL_START      = ACAMERA_BLACK_LEVEL       << 16,
104     ACAMERA_SYNC_START             = ACAMERA_SYNC              << 16,
105     ACAMERA_REPROCESS_START        = ACAMERA_REPROCESS         << 16,
106     ACAMERA_DEPTH_START            = ACAMERA_DEPTH             << 16,
107     ACAMERA_VENDOR_START           = ACAMERA_VENDOR            << 16
108 } acamera_metadata_section_start_t;
109 
110 /**
111  * Main enum for camera metadata tags.
112  */
113 typedef enum acamera_metadata_tag {
114     /**
115      * <p>The mode control selects how the image data is converted from the
116      * sensor's native color into linear sRGB color.</p>
117      *
118      * <p>This tag may appear in:</p>
119      * <ul>
120      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
121      *   <li>ACaptureRequest</li>
122      * </ul>
123      *
124      * <p>When auto-white balance (AWB) is enabled with ACAMERA_CONTROL_AWB_MODE, this
125      * control is overridden by the AWB routine. When AWB is disabled, the
126      * application controls how the color mapping is performed.</p>
127      * <p>We define the expected processing pipeline below. For consistency
128      * across devices, this is always the case with TRANSFORM_MATRIX.</p>
129      * <p>When either FULL or HIGH_QUALITY is used, the camera device may
130      * do additional processing but ACAMERA_COLOR_CORRECTION_GAINS and
131      * ACAMERA_COLOR_CORRECTION_TRANSFORM will still be provided by the
132      * camera device (in the results) and be roughly correct.</p>
133      * <p>Switching to TRANSFORM_MATRIX and using the data provided from
134      * FAST or HIGH_QUALITY will yield a picture with the same white point
135      * as what was produced by the camera device in the earlier frame.</p>
136      * <p>The expected processing pipeline is as follows:</p>
137      * <p><img alt="White balance processing pipeline" src="../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
138      * <p>The white balance is encoded by two values, a 4-channel white-balance
139      * gain vector (applied in the Bayer domain), and a 3x3 color transform
140      * matrix (applied after demosaic).</p>
141      * <p>The 4-channel white-balance gains are defined as:</p>
142      * <pre><code>ACAMERA_COLOR_CORRECTION_GAINS = [ R G_even G_odd B ]
143      * </code></pre>
144      * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
145      * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
146      * These may be identical for a given camera device implementation; if
147      * the camera device does not support a separate gain for even/odd green
148      * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
149      * <code>G_even</code> in the output result metadata.</p>
150      * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
151      * <pre><code>ACAMERA_COLOR_CORRECTION_TRANSFORM = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
152      * </code></pre>
153      * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
154      * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
155      * <p>with colors as follows:</p>
156      * <pre><code>r' = I0r + I1g + I2b
157      * g' = I3r + I4g + I5b
158      * b' = I6r + I7g + I8b
159      * </code></pre>
160      * <p>Both the input and output value ranges must match. Overflow/underflow
161      * values are clipped to fit within the range.</p>
162      *
163      * @see ACAMERA_COLOR_CORRECTION_GAINS
164      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
165      * @see ACAMERA_CONTROL_AWB_MODE
166      */
167     ACAMERA_COLOR_CORRECTION_MODE =                             // byte (enum)
168             ACAMERA_COLOR_CORRECTION_START,
169     /**
170      * <p>A color transform matrix to use to transform
171      * from sensor RGB color space to output linear sRGB color space.</p>
172      *
173      * <p>This tag may appear in:</p>
174      * <ul>
175      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
176      *   <li>ACaptureRequest</li>
177      * </ul>
178      *
179      * <p>This matrix is either set by the camera device when the request
180      * ACAMERA_COLOR_CORRECTION_MODE is not TRANSFORM_MATRIX, or
181      * directly by the application in the request when the
182      * ACAMERA_COLOR_CORRECTION_MODE is TRANSFORM_MATRIX.</p>
183      * <p>In the latter case, the camera device may round the matrix to account
184      * for precision issues; the final rounded matrix should be reported back
185      * in this matrix result metadata. The transform should keep the magnitude
186      * of the output color values within <code>[0, 1.0]</code> (assuming input color
187      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
188      * <p>The valid range of each matrix element varies on different devices, but
189      * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
190      *
191      * @see ACAMERA_COLOR_CORRECTION_MODE
192      */
193     ACAMERA_COLOR_CORRECTION_TRANSFORM =                        // rational[3*3]
194             ACAMERA_COLOR_CORRECTION_START + 1,
195     /**
196      * <p>Gains applying to Bayer raw color channels for
197      * white-balance.</p>
198      *
199      * <p>This tag may appear in:</p>
200      * <ul>
201      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
202      *   <li>ACaptureRequest</li>
203      * </ul>
204      *
205      * <p>These per-channel gains are either set by the camera device
206      * when the request ACAMERA_COLOR_CORRECTION_MODE is not
207      * TRANSFORM_MATRIX, or directly by the application in the
208      * request when the ACAMERA_COLOR_CORRECTION_MODE is
209      * TRANSFORM_MATRIX.</p>
210      * <p>The gains in the result metadata are the gains actually
211      * applied by the camera device to the current frame.</p>
212      * <p>The valid range of gains varies on different devices, but gains
213      * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
214      * device allows gains below 1.0, this is usually not recommended because
215      * this can create color artifacts.</p>
216      *
217      * @see ACAMERA_COLOR_CORRECTION_MODE
218      */
219     ACAMERA_COLOR_CORRECTION_GAINS =                            // float[4]
220             ACAMERA_COLOR_CORRECTION_START + 2,
221     /**
222      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
223      *
224      * <p>This tag may appear in:</p>
225      * <ul>
226      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
227      *   <li>ACaptureRequest</li>
228      * </ul>
229      *
230      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
231      * can not focus on the same point after exiting from the lens. This metadata defines
232      * the high level control of chromatic aberration correction algorithm, which aims to
233      * minimize the chromatic artifacts that may occur along the object boundaries in an
234      * image.</p>
235      * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
236      * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
237      * use the highest-quality aberration correction algorithms, even if it slows down
238      * capture rate. FAST means the camera device will not slow down capture rate when
239      * applying aberration correction.</p>
240      * <p>LEGACY devices will always be in FAST mode.</p>
241      */
242     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE =                  // byte (enum)
243             ACAMERA_COLOR_CORRECTION_START + 3,
244     /**
245      * <p>List of aberration correction modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE that are
246      * supported by this camera device.</p>
247      *
248      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
249      *
250      * <p>This tag may appear in:</p>
251      * <ul>
252      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
253      * </ul>
254      *
255      * <p>This key lists the valid modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE.  If no
256      * aberration correction modes are available for a device, this list will solely include
257      * OFF mode. All camera devices will support either OFF or FAST mode.</p>
258      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
259      * OFF mode. This includes all FULL level devices.</p>
260      * <p>LEGACY devices will always only support FAST mode.</p>
261      *
262      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
263      */
264     ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =       // byte[n]
265             ACAMERA_COLOR_CORRECTION_START + 4,
266     ACAMERA_COLOR_CORRECTION_END,
267 
268     /**
269      * <p>The desired setting for the camera device's auto-exposure
270      * algorithm's antibanding compensation.</p>
271      *
272      * <p>This tag may appear in:</p>
273      * <ul>
274      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
275      *   <li>ACaptureRequest</li>
276      * </ul>
277      *
278      * <p>Some kinds of lighting fixtures, such as some fluorescent
279      * lights, flicker at the rate of the power supply frequency
280      * (60Hz or 50Hz, depending on country). While this is
281      * typically not noticeable to a person, it can be visible to
282      * a camera device. If a camera sets its exposure time to the
283      * wrong value, the flicker may become visible in the
284      * viewfinder as flicker or in a final captured image, as a
285      * set of variable-brightness bands across the image.</p>
286      * <p>Therefore, the auto-exposure routines of camera devices
287      * include antibanding routines that ensure that the chosen
288      * exposure value will not cause such banding. The choice of
289      * exposure time depends on the rate of flicker, which the
290      * camera device can detect automatically, or the expected
291      * rate can be selected by the application using this
292      * control.</p>
293      * <p>A given camera device may not support all of the possible
294      * options for the antibanding mode. The
295      * ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES key contains
296      * the available modes for a given camera device.</p>
297      * <p>AUTO mode is the default if it is available on given
298      * camera device. When AUTO mode is not available, the
299      * default will be either 50HZ or 60HZ, and both 50HZ
300      * and 60HZ will be available.</p>
301      * <p>If manual exposure control is enabled (by setting
302      * ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE to OFF),
303      * then this setting has no effect, and the application must
304      * ensure it selects exposure times that do not cause banding
305      * issues. The ACAMERA_STATISTICS_SCENE_FLICKER key can assist
306      * the application in this.</p>
307      *
308      * @see ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
309      * @see ACAMERA_CONTROL_AE_MODE
310      * @see ACAMERA_CONTROL_MODE
311      * @see ACAMERA_STATISTICS_SCENE_FLICKER
312      */
313     ACAMERA_CONTROL_AE_ANTIBANDING_MODE =                       // byte (enum)
314             ACAMERA_CONTROL_START,
315     /**
316      * <p>Adjustment to auto-exposure (AE) target image
317      * brightness.</p>
318      *
319      * <p>This tag may appear in:</p>
320      * <ul>
321      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
322      *   <li>ACaptureRequest</li>
323      * </ul>
324      *
325      * <p>The adjustment is measured as a count of steps, with the
326      * step size defined by ACAMERA_CONTROL_AE_COMPENSATION_STEP and the
327      * allowed range by ACAMERA_CONTROL_AE_COMPENSATION_RANGE.</p>
328      * <p>For example, if the exposure value (EV) step is 0.333, '6'
329      * will mean an exposure compensation of +2 EV; -3 will mean an
330      * exposure compensation of -1 EV. One EV represents a doubling
331      * of image brightness. Note that this control will only be
332      * effective if ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF. This control
333      * will take effect even when ACAMERA_CONTROL_AE_LOCK <code>== true</code>.</p>
334      * <p>In the event of exposure compensation value being changed, camera device
335      * may take several frames to reach the newly requested exposure target.
336      * During that time, ACAMERA_CONTROL_AE_STATE field will be in the SEARCHING
337      * state. Once the new exposure target is reached, ACAMERA_CONTROL_AE_STATE will
338      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
339      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
340      *
341      * @see ACAMERA_CONTROL_AE_COMPENSATION_RANGE
342      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
343      * @see ACAMERA_CONTROL_AE_LOCK
344      * @see ACAMERA_CONTROL_AE_MODE
345      * @see ACAMERA_CONTROL_AE_STATE
346      */
347     ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION =                  // int32
348             ACAMERA_CONTROL_START + 1,
349     /**
350      * <p>Whether auto-exposure (AE) is currently locked to its latest
351      * calculated values.</p>
352      *
353      * <p>This tag may appear in:</p>
354      * <ul>
355      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
356      *   <li>ACaptureRequest</li>
357      * </ul>
358      *
359      * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
360      * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
361      * <p>Note that even when AE is locked, the flash may be fired if
362      * the ACAMERA_CONTROL_AE_MODE is ON_AUTO_FLASH /
363      * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
364      * <p>When ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION is changed, even if the AE lock
365      * is ON, the camera device will still adjust its exposure value.</p>
366      * <p>If AE precapture is triggered (see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER)
367      * when AE is already locked, the camera device will not change the exposure time
368      * (ACAMERA_SENSOR_EXPOSURE_TIME) and sensitivity (ACAMERA_SENSOR_SENSITIVITY)
369      * parameters. The flash may be fired if the ACAMERA_CONTROL_AE_MODE
370      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
371      * ACAMERA_CONTROL_AE_MODE is ON_ALWAYS_FLASH, the scene may become overexposed.
372      * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
373      * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
374      * the AE if AE is locked by the camera device internally during precapture metering
375      * sequence In other words, submitting requests with AE unlock has no effect for an
376      * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
377      * will never succeed in a sequence of preview requests where AE lock is always set
378      * to <code>false</code>.</p>
379      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
380      * get locked do not necessarily correspond to the settings that were present in the
381      * latest capture result received from the camera device, since additional captures
382      * and AE updates may have occurred even before the result was sent out. If an
383      * application is switching between automatic and manual control and wishes to eliminate
384      * any flicker during the switch, the following procedure is recommended:</p>
385      * <ol>
386      * <li>Starting in auto-AE mode:</li>
387      * <li>Lock AE</li>
388      * <li>Wait for the first result to be output that has the AE locked</li>
389      * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
390      * <li>Submit the capture request, proceed to run manual AE as desired.</li>
391      * </ol>
392      * <p>See ACAMERA_CONTROL_AE_STATE for AE lock related state transition details.</p>
393      *
394      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
395      * @see ACAMERA_CONTROL_AE_MODE
396      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
397      * @see ACAMERA_CONTROL_AE_STATE
398      * @see ACAMERA_SENSOR_EXPOSURE_TIME
399      * @see ACAMERA_SENSOR_SENSITIVITY
400      */
401     ACAMERA_CONTROL_AE_LOCK =                                   // byte (enum)
402             ACAMERA_CONTROL_START + 2,
403     /**
404      * <p>The desired mode for the camera device's
405      * auto-exposure routine.</p>
406      *
407      * <p>This tag may appear in:</p>
408      * <ul>
409      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
410      *   <li>ACaptureRequest</li>
411      * </ul>
412      *
413      * <p>This control is only effective if ACAMERA_CONTROL_MODE is
414      * AUTO.</p>
415      * <p>When set to any of the ON modes, the camera device's
416      * auto-exposure routine is enabled, overriding the
417      * application's selected exposure time, sensor sensitivity,
418      * and frame duration (ACAMERA_SENSOR_EXPOSURE_TIME,
419      * ACAMERA_SENSOR_SENSITIVITY, and
420      * ACAMERA_SENSOR_FRAME_DURATION). If one of the FLASH modes
421      * is selected, the camera device's flash unit controls are
422      * also overridden.</p>
423      * <p>The FLASH modes are only available if the camera device
424      * has a flash unit (ACAMERA_FLASH_INFO_AVAILABLE is <code>true</code>).</p>
425      * <p>If flash TORCH mode is desired, this field must be set to
426      * ON or OFF, and ACAMERA_FLASH_MODE set to TORCH.</p>
427      * <p>When set to any of the ON modes, the values chosen by the
428      * camera device auto-exposure routine for the overridden
429      * fields for a given capture will be available in its
430      * CaptureResult.</p>
431      *
432      * @see ACAMERA_CONTROL_MODE
433      * @see ACAMERA_FLASH_INFO_AVAILABLE
434      * @see ACAMERA_FLASH_MODE
435      * @see ACAMERA_SENSOR_EXPOSURE_TIME
436      * @see ACAMERA_SENSOR_FRAME_DURATION
437      * @see ACAMERA_SENSOR_SENSITIVITY
438      */
439     ACAMERA_CONTROL_AE_MODE =                                   // byte (enum)
440             ACAMERA_CONTROL_START + 3,
441     /**
442      * <p>List of metering areas to use for auto-exposure adjustment.</p>
443      *
444      * <p>This tag may appear in:</p>
445      * <ul>
446      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
447      *   <li>ACaptureRequest</li>
448      * </ul>
449      *
450      * <p>Not available if android.control.maxRegionsAe is 0.
451      * Otherwise will always be present.</p>
452      * <p>The maximum number of regions supported by the device is determined by the value
453      * of android.control.maxRegionsAe.</p>
454      * <p>The data representation is int[5 * area_count].
455      * Every five elements represent a metering region of (xmin, ymin, xmax, ymax, weight).
456      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
457      * ymax.</p>
458      * <p>The coordinate system is based on the active pixel array,
459      * with (0,0) being the top-left pixel in the active pixel array, and
460      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
461      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the
462      * bottom-right pixel in the active pixel array.</p>
463      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
464      * for every pixel in the area. This means that a large metering area
465      * with the same weight as a smaller area will have more effect in
466      * the metering result. Metering areas can partially overlap and the
467      * camera device will add the weights in the overlap region.</p>
468      * <p>The weights are relative to weights of other exposure metering regions, so if only one
469      * region is used, all non-zero weights will have the same effect. A region with 0
470      * weight is ignored.</p>
471      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
472      * camera device.</p>
473      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
474      * capture result metadata, the camera device will ignore the sections outside the crop
475      * region and output only the intersection rectangle as the metering region in the result
476      * metadata.  If the region is entirely outside the crop region, it will be ignored and
477      * not reported in the result metadata.</p>
478      *
479      * @see ACAMERA_SCALER_CROP_REGION
480      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
481      */
482     ACAMERA_CONTROL_AE_REGIONS =                                // int32[5*area_count]
483             ACAMERA_CONTROL_START + 4,
484     /**
485      * <p>Range over which the auto-exposure routine can
486      * adjust the capture frame rate to maintain good
487      * exposure.</p>
488      *
489      * <p>This tag may appear in:</p>
490      * <ul>
491      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
492      *   <li>ACaptureRequest</li>
493      * </ul>
494      *
495      * <p>Only constrains auto-exposure (AE) algorithm, not
496      * manual control of ACAMERA_SENSOR_EXPOSURE_TIME and
497      * ACAMERA_SENSOR_FRAME_DURATION.</p>
498      *
499      * @see ACAMERA_SENSOR_EXPOSURE_TIME
500      * @see ACAMERA_SENSOR_FRAME_DURATION
501      */
502     ACAMERA_CONTROL_AE_TARGET_FPS_RANGE =                       // int32[2]
503             ACAMERA_CONTROL_START + 5,
504     /**
505      * <p>Whether the camera device will trigger a precapture
506      * metering sequence when it processes this request.</p>
507      *
508      * <p>This tag may appear in:</p>
509      * <ul>
510      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
511      *   <li>ACaptureRequest</li>
512      * </ul>
513      *
514      * <p>This entry is normally set to IDLE, or is not
515      * included at all in the request settings. When included and
516      * set to START, the camera device will trigger the auto-exposure (AE)
517      * precapture metering sequence.</p>
518      * <p>When set to CANCEL, the camera device will cancel any active
519      * precapture metering trigger, and return to its initial AE state.
520      * If a precapture metering sequence is already completed, and the camera
521      * device has implicitly locked the AE for subsequent still capture, the
522      * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
523      * <p>The precapture sequence should be triggered before starting a
524      * high-quality still capture for final metering decisions to
525      * be made, and for firing pre-capture flash pulses to estimate
526      * scene brightness and required final capture flash power, when
527      * the flash is enabled.</p>
528      * <p>Normally, this entry should be set to START for only a
529      * single request, and the application should wait until the
530      * sequence completes before starting a new one.</p>
531      * <p>When a precapture metering sequence is finished, the camera device
532      * may lock the auto-exposure routine internally to be able to accurately expose the
533      * subsequent still capture image (<code>ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE</code>).
534      * For this case, the AE may not resume normal scan if no subsequent still capture is
535      * submitted. To ensure that the AE routine restarts normal scan, the application should
536      * submit a request with <code>ACAMERA_CONTROL_AE_LOCK == true</code>, followed by a request
537      * with <code>ACAMERA_CONTROL_AE_LOCK == false</code>, if the application decides not to submit a
538      * still capture request after the precapture sequence completes. Alternatively, for
539      * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
540      * internally locked AE if the application doesn't submit a still capture request after
541      * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
542      * be used in devices that have earlier API levels.</p>
543      * <p>The exact effect of auto-exposure (AE) precapture trigger
544      * depends on the current AE mode and state; see
545      * ACAMERA_CONTROL_AE_STATE for AE precapture state transition
546      * details.</p>
547      * <p>On LEGACY-level devices, the precapture trigger is not supported;
548      * capturing a high-resolution JPEG image will automatically trigger a
549      * precapture sequence before the high-resolution capture, including
550      * potentially firing a pre-capture flash.</p>
551      * <p>Using the precapture trigger and the auto-focus trigger ACAMERA_CONTROL_AF_TRIGGER
552      * simultaneously is allowed. However, since these triggers often require cooperation between
553      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
554      * focus sweep), the camera device may delay acting on a later trigger until the previous
555      * trigger has been fully handled. This may lead to longer intervals between the trigger and
556      * changes to ACAMERA_CONTROL_AE_STATE indicating the start of the precapture sequence, for
557      * example.</p>
558      * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
559      * the camera device will complete them in the optimal order for that device.</p>
560      *
561      * @see ACAMERA_CONTROL_AE_LOCK
562      * @see ACAMERA_CONTROL_AE_STATE
563      * @see ACAMERA_CONTROL_AF_TRIGGER
564      * @see ACAMERA_CONTROL_CAPTURE_INTENT
565      */
566     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER =                     // byte (enum)
567             ACAMERA_CONTROL_START + 6,
568     /**
569      * <p>Whether auto-focus (AF) is currently enabled, and what
570      * mode it is set to.</p>
571      *
572      * <p>This tag may appear in:</p>
573      * <ul>
574      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
575      *   <li>ACaptureRequest</li>
576      * </ul>
577      *
578      * <p>Only effective if ACAMERA_CONTROL_MODE = AUTO and the lens is not fixed focus
579      * (i.e. <code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>). Also note that
580      * when ACAMERA_CONTROL_AE_MODE is OFF, the behavior of AF is device
581      * dependent. It is recommended to lock AF by using ACAMERA_CONTROL_AF_TRIGGER before
582      * setting ACAMERA_CONTROL_AE_MODE to OFF, or set AF mode to OFF when AE is OFF.</p>
583      * <p>If the lens is controlled by the camera device auto-focus algorithm,
584      * the camera device will report the current AF status in ACAMERA_CONTROL_AF_STATE
585      * in result metadata.</p>
586      *
587      * @see ACAMERA_CONTROL_AE_MODE
588      * @see ACAMERA_CONTROL_AF_STATE
589      * @see ACAMERA_CONTROL_AF_TRIGGER
590      * @see ACAMERA_CONTROL_MODE
591      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
592      */
593     ACAMERA_CONTROL_AF_MODE =                                   // byte (enum)
594             ACAMERA_CONTROL_START + 7,
595     /**
596      * <p>List of metering areas to use for auto-focus.</p>
597      *
598      * <p>This tag may appear in:</p>
599      * <ul>
600      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
601      *   <li>ACaptureRequest</li>
602      * </ul>
603      *
604      * <p>Not available if android.control.maxRegionsAf is 0.
605      * Otherwise will always be present.</p>
606      * <p>The maximum number of focus areas supported by the device is determined by the value
607      * of android.control.maxRegionsAf.</p>
608      * <p>The data representation is int[5 * area_count].
609      * Every five elements represent a metering region of (xmin, ymin, xmax, ymax, weight).
610      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
611      * ymax.</p>
612      * <p>The coordinate system is based on the active pixel array,
613      * with (0,0) being the top-left pixel in the active pixel array, and
614      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
615      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the
616      * bottom-right pixel in the active pixel array.</p>
617      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
618      * for every pixel in the area. This means that a large metering area
619      * with the same weight as a smaller area will have more effect in
620      * the metering result. Metering areas can partially overlap and the
621      * camera device will add the weights in the overlap region.</p>
622      * <p>The weights are relative to weights of other metering regions, so if only one region
623      * is used, all non-zero weights will have the same effect. A region with 0 weight is
624      * ignored.</p>
625      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
626      * camera device.</p>
627      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
628      * capture result metadata, the camera device will ignore the sections outside the crop
629      * region and output only the intersection rectangle as the metering region in the result
630      * metadata. If the region is entirely outside the crop region, it will be ignored and
631      * not reported in the result metadata.</p>
632      *
633      * @see ACAMERA_SCALER_CROP_REGION
634      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
635      */
636     ACAMERA_CONTROL_AF_REGIONS =                                // int32[5*area_count]
637             ACAMERA_CONTROL_START + 8,
638     /**
639      * <p>Whether the camera device will trigger autofocus for this request.</p>
640      *
641      * <p>This tag may appear in:</p>
642      * <ul>
643      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
644      *   <li>ACaptureRequest</li>
645      * </ul>
646      *
647      * <p>This entry is normally set to IDLE, or is not
648      * included at all in the request settings.</p>
649      * <p>When included and set to START, the camera device will trigger the
650      * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
651      * <p>When set to CANCEL, the camera device will cancel any active trigger,
652      * and return to its initial AF state.</p>
653      * <p>Generally, applications should set this entry to START or CANCEL for only a
654      * single capture, and then return it to IDLE (or not set at all). Specifying
655      * START for multiple captures in a row means restarting the AF operation over
656      * and over again.</p>
657      * <p>See ACAMERA_CONTROL_AF_STATE for what the trigger means for each AF mode.</p>
658      * <p>Using the autofocus trigger and the precapture trigger ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
659      * simultaneously is allowed. However, since these triggers often require cooperation between
660      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
661      * focus sweep), the camera device may delay acting on a later trigger until the previous
662      * trigger has been fully handled. This may lead to longer intervals between the trigger and
663      * changes to ACAMERA_CONTROL_AF_STATE, for example.</p>
664      *
665      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
666      * @see ACAMERA_CONTROL_AF_STATE
667      */
668     ACAMERA_CONTROL_AF_TRIGGER =                                // byte (enum)
669             ACAMERA_CONTROL_START + 9,
670     /**
671      * <p>Whether auto-white balance (AWB) is currently locked to its
672      * latest calculated values.</p>
673      *
674      * <p>This tag may appear in:</p>
675      * <ul>
676      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
677      *   <li>ACaptureRequest</li>
678      * </ul>
679      *
680      * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
681      * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
682      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
683      * get locked do not necessarily correspond to the settings that were present in the
684      * latest capture result received from the camera device, since additional captures
685      * and AWB updates may have occurred even before the result was sent out. If an
686      * application is switching between automatic and manual control and wishes to eliminate
687      * any flicker during the switch, the following procedure is recommended:</p>
688      * <ol>
689      * <li>Starting in auto-AWB mode:</li>
690      * <li>Lock AWB</li>
691      * <li>Wait for the first result to be output that has the AWB locked</li>
692      * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
693      * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
694      * </ol>
695      * <p>Note that AWB lock is only meaningful when
696      * ACAMERA_CONTROL_AWB_MODE is in the AUTO mode; in other modes,
697      * AWB is already fixed to a specific setting.</p>
698      * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
699      *
700      * @see ACAMERA_CONTROL_AWB_MODE
701      */
702     ACAMERA_CONTROL_AWB_LOCK =                                  // byte (enum)
703             ACAMERA_CONTROL_START + 10,
704     /**
705      * <p>Whether auto-white balance (AWB) is currently setting the color
706      * transform fields, and what its illumination target
707      * is.</p>
708      *
709      * <p>This tag may appear in:</p>
710      * <ul>
711      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
712      *   <li>ACaptureRequest</li>
713      * </ul>
714      *
715      * <p>This control is only effective if ACAMERA_CONTROL_MODE is AUTO.</p>
716      * <p>When set to the ON mode, the camera device's auto-white balance
717      * routine is enabled, overriding the application's selected
718      * ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS and
719      * ACAMERA_COLOR_CORRECTION_MODE. Note that when ACAMERA_CONTROL_AE_MODE
720      * is OFF, the behavior of AWB is device dependent. It is recommened to
721      * also set AWB mode to OFF or lock AWB by using ACAMERA_CONTROL_AWB_LOCK before
722      * setting AE mode to OFF.</p>
723      * <p>When set to the OFF mode, the camera device's auto-white balance
724      * routine is disabled. The application manually controls the white
725      * balance by ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS
726      * and ACAMERA_COLOR_CORRECTION_MODE.</p>
727      * <p>When set to any other modes, the camera device's auto-white
728      * balance routine is disabled. The camera device uses each
729      * particular illumination target for white balance
730      * adjustment. The application's values for
731      * ACAMERA_COLOR_CORRECTION_TRANSFORM,
732      * ACAMERA_COLOR_CORRECTION_GAINS and
733      * ACAMERA_COLOR_CORRECTION_MODE are ignored.</p>
734      *
735      * @see ACAMERA_COLOR_CORRECTION_GAINS
736      * @see ACAMERA_COLOR_CORRECTION_MODE
737      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
738      * @see ACAMERA_CONTROL_AE_MODE
739      * @see ACAMERA_CONTROL_AWB_LOCK
740      * @see ACAMERA_CONTROL_MODE
741      */
742     ACAMERA_CONTROL_AWB_MODE =                                  // byte (enum)
743             ACAMERA_CONTROL_START + 11,
744     /**
745      * <p>List of metering areas to use for auto-white-balance illuminant
746      * estimation.</p>
747      *
748      * <p>This tag may appear in:</p>
749      * <ul>
750      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
751      *   <li>ACaptureRequest</li>
752      * </ul>
753      *
754      * <p>Not available if android.control.maxRegionsAwb is 0.
755      * Otherwise will always be present.</p>
756      * <p>The maximum number of regions supported by the device is determined by the value
757      * of android.control.maxRegionsAwb.</p>
758      * <p>The data representation is int[5 * area_count].
759      * Every five elements represent a metering region of (xmin, ymin, xmax, ymax, weight).
760      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
761      * ymax.</p>
762      * <p>The coordinate system is based on the active pixel array,
763      * with (0,0) being the top-left pixel in the active pixel array, and
764      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
765      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the
766      * bottom-right pixel in the active pixel array.</p>
767      * <p>The weight must range from 0 to 1000, and represents a weight
768      * for every pixel in the area. This means that a large metering area
769      * with the same weight as a smaller area will have more effect in
770      * the metering result. Metering areas can partially overlap and the
771      * camera device will add the weights in the overlap region.</p>
772      * <p>The weights are relative to weights of other white balance metering regions, so if
773      * only one region is used, all non-zero weights will have the same effect. A region with
774      * 0 weight is ignored.</p>
775      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
776      * camera device.</p>
777      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
778      * capture result metadata, the camera device will ignore the sections outside the crop
779      * region and output only the intersection rectangle as the metering region in the result
780      * metadata.  If the region is entirely outside the crop region, it will be ignored and
781      * not reported in the result metadata.</p>
782      *
783      * @see ACAMERA_SCALER_CROP_REGION
784      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
785      */
786     ACAMERA_CONTROL_AWB_REGIONS =                               // int32[5*area_count]
787             ACAMERA_CONTROL_START + 12,
788     /**
789      * <p>Information to the camera device 3A (auto-exposure,
790      * auto-focus, auto-white balance) routines about the purpose
791      * of this capture, to help the camera device to decide optimal 3A
792      * strategy.</p>
793      *
794      * <p>This tag may appear in:</p>
795      * <ul>
796      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
797      *   <li>ACaptureRequest</li>
798      * </ul>
799      *
800      * <p>This control (except for MANUAL) is only effective if
801      * <code>ACAMERA_CONTROL_MODE != OFF</code> and any 3A routine is active.</p>
802      * <p>ZERO_SHUTTER_LAG will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
803      * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if
804      * ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains MANUAL_SENSOR. Other intent values are
805      * always supported.</p>
806      *
807      * @see ACAMERA_CONTROL_MODE
808      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
809      */
810     ACAMERA_CONTROL_CAPTURE_INTENT =                            // byte (enum)
811             ACAMERA_CONTROL_START + 13,
812     /**
813      * <p>A special color effect to apply.</p>
814      *
815      * <p>This tag may appear in:</p>
816      * <ul>
817      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
818      *   <li>ACaptureRequest</li>
819      * </ul>
820      *
821      * <p>When this mode is set, a color effect will be applied
822      * to images produced by the camera device. The interpretation
823      * and implementation of these color effects is left to the
824      * implementor of the camera device, and should not be
825      * depended on to be consistent (or present) across all
826      * devices.</p>
827      */
828     ACAMERA_CONTROL_EFFECT_MODE =                               // byte (enum)
829             ACAMERA_CONTROL_START + 14,
830     /**
831      * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
832      * routines.</p>
833      *
834      * <p>This tag may appear in:</p>
835      * <ul>
836      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
837      *   <li>ACaptureRequest</li>
838      * </ul>
839      *
840      * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
841      * by the camera device is disabled. The application must set the fields for
842      * capture parameters itself.</p>
843      * <p>When set to AUTO, the individual algorithm controls in
844      * ACAMERA_CONTROL_* are in effect, such as ACAMERA_CONTROL_AF_MODE.</p>
845      * <p>When set to USE_SCENE_MODE, the individual controls in
846      * ACAMERA_CONTROL_* are mostly disabled, and the camera device implements
847      * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
848      * as it wishes. The camera device scene mode 3A settings are provided by
849      * capture results {@link ACameraMetadata} from
850      * {@link ACameraCaptureSession_captureCallback_result}.</p>
851      * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
852      * is that this frame will not be used by camera device background 3A statistics
853      * update, as if this frame is never captured. This mode can be used in the scenario
854      * where the application doesn't want a 3A manual control capture to affect
855      * the subsequent auto 3A capture results.</p>
856      *
857      * @see ACAMERA_CONTROL_AF_MODE
858      */
859     ACAMERA_CONTROL_MODE =                                      // byte (enum)
860             ACAMERA_CONTROL_START + 15,
861     /**
862      * <p>Control for which scene mode is currently active.</p>
863      *
864      * <p>This tag may appear in:</p>
865      * <ul>
866      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
867      *   <li>ACaptureRequest</li>
868      * </ul>
869      *
870      * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
871      * capture settings.</p>
872      * <p>This is the mode that that is active when
873      * <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
874      * disable ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
875      * while in use.</p>
876      * <p>The interpretation and implementation of these scene modes is left
877      * to the implementor of the camera device. Their behavior will not be
878      * consistent across all devices, and any given device may only implement
879      * a subset of these modes.</p>
880      *
881      * @see ACAMERA_CONTROL_AE_MODE
882      * @see ACAMERA_CONTROL_AF_MODE
883      * @see ACAMERA_CONTROL_AWB_MODE
884      * @see ACAMERA_CONTROL_MODE
885      */
886     ACAMERA_CONTROL_SCENE_MODE =                                // byte (enum)
887             ACAMERA_CONTROL_START + 16,
888     /**
889      * <p>Whether video stabilization is
890      * active.</p>
891      *
892      * <p>This tag may appear in:</p>
893      * <ul>
894      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
895      *   <li>ACaptureRequest</li>
896      * </ul>
897      *
898      * <p>Video stabilization automatically warps images from
899      * the camera in order to stabilize motion between consecutive frames.</p>
900      * <p>If enabled, video stabilization can modify the
901      * ACAMERA_SCALER_CROP_REGION to keep the video stream stabilized.</p>
902      * <p>Switching between different video stabilization modes may take several
903      * frames to initialize, the camera device will report the current mode
904      * in capture result metadata. For example, When "ON" mode is requested,
905      * the video stabilization modes in the first several capture results may
906      * still be "OFF", and it will become "ON" when the initialization is
907      * done.</p>
908      * <p>In addition, not all recording sizes or frame rates may be supported for
909      * stabilization by a device that reports stabilization support. It is guaranteed
910      * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
911      * the recording resolution is less than or equal to 1920 x 1080 (width less than
912      * or equal to 1920, height less than or equal to 1080), and the recording
913      * frame rate is less than or equal to 30fps.  At other sizes, the CaptureResult
914      * ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE field will return
915      * OFF if the recording output is not stabilized, or if there are no output
916      * Surface types that can be stabilized.</p>
917      * <p>If a camera device supports both this mode and OIS
918      * (ACAMERA_LENS_OPTICAL_STABILIZATION_MODE), turning both modes on may
919      * produce undesirable interaction, so it is recommended not to enable
920      * both at the same time.</p>
921      *
922      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
923      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
924      * @see ACAMERA_SCALER_CROP_REGION
925      */
926     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE =                  // byte (enum)
927             ACAMERA_CONTROL_START + 17,
928     /**
929      * <p>List of auto-exposure antibanding modes for ACAMERA_CONTROL_AE_ANTIBANDING_MODE that are
930      * supported by this camera device.</p>
931      *
932      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
933      *
934      * <p>This tag may appear in:</p>
935      * <ul>
936      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
937      * </ul>
938      *
939      * <p>Not all of the auto-exposure anti-banding modes may be
940      * supported by a given camera device. This field lists the
941      * valid anti-banding modes that the application may request
942      * for this camera device with the
943      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE control.</p>
944      *
945      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
946      */
947     ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =            // byte[n]
948             ACAMERA_CONTROL_START + 18,
949     /**
950      * <p>List of auto-exposure modes for ACAMERA_CONTROL_AE_MODE that are supported by this camera
951      * device.</p>
952      *
953      * @see ACAMERA_CONTROL_AE_MODE
954      *
955      * <p>This tag may appear in:</p>
956      * <ul>
957      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
958      * </ul>
959      *
960      * <p>Not all the auto-exposure modes may be supported by a
961      * given camera device, especially if no flash unit is
962      * available. This entry lists the valid modes for
963      * ACAMERA_CONTROL_AE_MODE for this camera device.</p>
964      * <p>All camera devices support ON, and all camera devices with flash
965      * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
966      * <p>FULL mode camera devices always support OFF mode,
967      * which enables application control of camera exposure time,
968      * sensitivity, and frame duration.</p>
969      * <p>LEGACY mode camera devices never support OFF mode.
970      * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
971      * capability.</p>
972      *
973      * @see ACAMERA_CONTROL_AE_MODE
974      */
975     ACAMERA_CONTROL_AE_AVAILABLE_MODES =                        // byte[n]
976             ACAMERA_CONTROL_START + 19,
977     /**
978      * <p>List of frame rate ranges for ACAMERA_CONTROL_AE_TARGET_FPS_RANGE supported by
979      * this camera device.</p>
980      *
981      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
982      *
983      * <p>This tag may appear in:</p>
984      * <ul>
985      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
986      * </ul>
987      *
988      * <p>For devices at the LEGACY level or above:</p>
989      * <ul>
990      * <li>
991      * <p>For constant-framerate recording, for each normal
992      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>, that is, a
993      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
994      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#quality">quality</a>
995      * in the range [
996      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_LOW">QUALITY_LOW</a>,
997      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_2160P">QUALITY_2160P</a>],
998      * if the profile is supported by the device and has
999      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a>
1000      * <code>x</code>, this list will always include (<code>x</code>,<code>x</code>).</p>
1001      * </li>
1002      * <li>
1003      * <p>Also, a camera device must either not support any
1004      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>,
1005      * or support at least one
1006      * normal <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>
1007      * that has
1008      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code> &gt;= 24.</p>
1009      * </li>
1010      * </ul>
1011      * <p>For devices at the LIMITED level or above:</p>
1012      * <ul>
1013      * <li>For YUV_420_888 burst capture use case, this list will always include (<code>min</code>, <code>max</code>)
1014      * and (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
1015      * maximum YUV_420_888 output size.</li>
1016      * </ul>
1017      */
1018     ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =            // int32[2*n]
1019             ACAMERA_CONTROL_START + 20,
1020     /**
1021      * <p>Maximum and minimum exposure compensation values for
1022      * ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION, in counts of ACAMERA_CONTROL_AE_COMPENSATION_STEP,
1023      * that are supported by this camera device.</p>
1024      *
1025      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
1026      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1027      *
1028      * <p>This tag may appear in:</p>
1029      * <ul>
1030      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1031      * </ul>
1032      *
1033      * <p>None</p>
1034      */
1035     ACAMERA_CONTROL_AE_COMPENSATION_RANGE =                     // int32[2]
1036             ACAMERA_CONTROL_START + 21,
1037     /**
1038      * <p>Smallest step by which the exposure compensation
1039      * can be changed.</p>
1040      *
1041      * <p>This tag may appear in:</p>
1042      * <ul>
1043      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1044      * </ul>
1045      *
1046      * <p>This is the unit for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION. For example, if this key has
1047      * a value of <code>1/2</code>, then a setting of <code>-2</code> for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION means
1048      * that the target EV offset for the auto-exposure routine is -1 EV.</p>
1049      * <p>One unit of EV compensation changes the brightness of the captured image by a factor
1050      * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
1051      *
1052      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1053      */
1054     ACAMERA_CONTROL_AE_COMPENSATION_STEP =                      // rational
1055             ACAMERA_CONTROL_START + 22,
1056     /**
1057      * <p>List of auto-focus (AF) modes for ACAMERA_CONTROL_AF_MODE that are
1058      * supported by this camera device.</p>
1059      *
1060      * @see ACAMERA_CONTROL_AF_MODE
1061      *
1062      * <p>This tag may appear in:</p>
1063      * <ul>
1064      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1065      * </ul>
1066      *
1067      * <p>Not all the auto-focus modes may be supported by a
1068      * given camera device. This entry lists the valid modes for
1069      * ACAMERA_CONTROL_AF_MODE for this camera device.</p>
1070      * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
1071      * camera devices with adjustable focuser units
1072      * (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>) will support AUTO mode.</p>
1073      * <p>LEGACY devices will support OFF mode only if they support
1074      * focusing to infinity (by also setting ACAMERA_LENS_FOCUS_DISTANCE to
1075      * <code>0.0f</code>).</p>
1076      *
1077      * @see ACAMERA_CONTROL_AF_MODE
1078      * @see ACAMERA_LENS_FOCUS_DISTANCE
1079      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
1080      */
1081     ACAMERA_CONTROL_AF_AVAILABLE_MODES =                        // byte[n]
1082             ACAMERA_CONTROL_START + 23,
1083     /**
1084      * <p>List of color effects for ACAMERA_CONTROL_EFFECT_MODE that are supported by this camera
1085      * device.</p>
1086      *
1087      * @see ACAMERA_CONTROL_EFFECT_MODE
1088      *
1089      * <p>This tag may appear in:</p>
1090      * <ul>
1091      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1092      * </ul>
1093      *
1094      * <p>This list contains the color effect modes that can be applied to
1095      * images produced by the camera device.
1096      * Implementations are not expected to be consistent across all devices.
1097      * If no color effect modes are available for a device, this will only list
1098      * OFF.</p>
1099      * <p>A color effect will only be applied if
1100      * ACAMERA_CONTROL_MODE != OFF.  OFF is always included in this list.</p>
1101      * <p>This control has no effect on the operation of other control routines such
1102      * as auto-exposure, white balance, or focus.</p>
1103      *
1104      * @see ACAMERA_CONTROL_MODE
1105      */
1106     ACAMERA_CONTROL_AVAILABLE_EFFECTS =                         // byte[n]
1107             ACAMERA_CONTROL_START + 24,
1108     /**
1109      * <p>List of scene modes for ACAMERA_CONTROL_SCENE_MODE that are supported by this camera
1110      * device.</p>
1111      *
1112      * @see ACAMERA_CONTROL_SCENE_MODE
1113      *
1114      * <p>This tag may appear in:</p>
1115      * <ul>
1116      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1117      * </ul>
1118      *
1119      * <p>This list contains scene modes that can be set for the camera device.
1120      * Only scene modes that have been fully implemented for the
1121      * camera device may be included here. Implementations are not expected
1122      * to be consistent across all devices.</p>
1123      * <p>If no scene modes are supported by the camera device, this
1124      * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
1125      * <p>FACE_PRIORITY is always listed if face detection is
1126      * supported (i.e.<code>ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT &gt;
1127      * 0</code>).</p>
1128      *
1129      * @see ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT
1130      */
1131     ACAMERA_CONTROL_AVAILABLE_SCENE_MODES =                     // byte[n]
1132             ACAMERA_CONTROL_START + 25,
1133     /**
1134      * <p>List of video stabilization modes for ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1135      * that are supported by this camera device.</p>
1136      *
1137      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1138      *
1139      * <p>This tag may appear in:</p>
1140      * <ul>
1141      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1142      * </ul>
1143      *
1144      * <p>OFF will always be listed.</p>
1145      */
1146     ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =       // byte[n]
1147             ACAMERA_CONTROL_START + 26,
1148     /**
1149      * <p>List of auto-white-balance modes for ACAMERA_CONTROL_AWB_MODE that are supported by this
1150      * camera device.</p>
1151      *
1152      * @see ACAMERA_CONTROL_AWB_MODE
1153      *
1154      * <p>This tag may appear in:</p>
1155      * <ul>
1156      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1157      * </ul>
1158      *
1159      * <p>Not all the auto-white-balance modes may be supported by a
1160      * given camera device. This entry lists the valid modes for
1161      * ACAMERA_CONTROL_AWB_MODE for this camera device.</p>
1162      * <p>All camera devices will support ON mode.</p>
1163      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
1164      * mode, which enables application control of white balance, by using
1165      * ACAMERA_COLOR_CORRECTION_TRANSFORM and ACAMERA_COLOR_CORRECTION_GAINS(ACAMERA_COLOR_CORRECTION_MODE must be set to TRANSFORM_MATRIX). This includes all FULL
1166      * mode camera devices.</p>
1167      *
1168      * @see ACAMERA_COLOR_CORRECTION_GAINS
1169      * @see ACAMERA_COLOR_CORRECTION_MODE
1170      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
1171      * @see ACAMERA_CONTROL_AWB_MODE
1172      */
1173     ACAMERA_CONTROL_AWB_AVAILABLE_MODES =                       // byte[n]
1174             ACAMERA_CONTROL_START + 27,
1175     /**
1176      * <p>List of the maximum number of regions that can be used for metering in
1177      * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
1178      * this corresponds to the the maximum number of elements in
1179      * ACAMERA_CONTROL_AE_REGIONS, ACAMERA_CONTROL_AWB_REGIONS,
1180      * and ACAMERA_CONTROL_AF_REGIONS.</p>
1181      *
1182      * @see ACAMERA_CONTROL_AE_REGIONS
1183      * @see ACAMERA_CONTROL_AF_REGIONS
1184      * @see ACAMERA_CONTROL_AWB_REGIONS
1185      *
1186      * <p>This tag may appear in:</p>
1187      * <ul>
1188      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1189      * </ul>
1190      *
1191      * <p>None</p>
1192      */
1193     ACAMERA_CONTROL_MAX_REGIONS =                               // int32[3]
1194             ACAMERA_CONTROL_START + 28,
1195     /**
1196      * <p>Current state of the auto-exposure (AE) algorithm.</p>
1197      *
1198      * <p>This tag may appear in:</p>
1199      * <ul>
1200      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1201      * </ul>
1202      *
1203      * <p>Switching between or enabling AE modes (ACAMERA_CONTROL_AE_MODE) always
1204      * resets the AE state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1205      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1206      * the algorithm states to INACTIVE.</p>
1207      * <p>The camera device can do several state transitions between two results, if it is
1208      * allowed by the state transition table. For example: INACTIVE may never actually be
1209      * seen in a result.</p>
1210      * <p>The state in the result is the state for this image (in sync with this image): if
1211      * AE state becomes CONVERGED, then the image data associated with this result should
1212      * be good to use.</p>
1213      * <p>Below are state transition tables for different AE modes.</p>
1214      * <p>State       | Transition Cause | New State | Notes
1215      * :------------:|:----------------:|:---------:|:-----------------------:
1216      * INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled</p>
1217      * <p>When ACAMERA_CONTROL_AE_MODE is AE_MODE_ON_*:</p>
1218      * <p>State        | Transition Cause                             | New State      | Notes
1219      * :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
1220      * INACTIVE       | Camera device initiates AE scan              | SEARCHING      | Values changing
1221      * INACTIVE       | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1222      * SEARCHING      | Camera device finishes AE scan               | CONVERGED      | Good values, not changing
1223      * SEARCHING      | Camera device finishes AE scan               | FLASH_REQUIRED | Converged but too dark w/o flash
1224      * SEARCHING      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1225      * CONVERGED      | Camera device initiates AE scan              | SEARCHING      | Values changing
1226      * CONVERGED      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1227      * FLASH_REQUIRED | Camera device initiates AE scan              | SEARCHING      | Values changing
1228      * FLASH_REQUIRED | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1229      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | SEARCHING      | Values not good after unlock
1230      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | CONVERGED      | Values good after unlock
1231      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | FLASH_REQUIRED | Exposure good, but too dark
1232      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is OFF | CONVERGED      | Ready for high-quality capture
1233      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is ON  | LOCKED         | Ready for high-quality capture
1234      * LOCKED         | aeLock is ON and aePrecaptureTrigger is START | LOCKED        | Precapture trigger is ignored when AE is already locked
1235      * LOCKED         | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED        | Precapture trigger is ignored when AE is already locked
1236      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START | PRECAPTURE     | Start AE precapture metering sequence
1237      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled</p>
1238      * <p>For the above table, the camera device may skip reporting any state changes that happen
1239      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1240      * can be skipped in that manner is called a transient state.</p>
1241      * <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
1242      * listed in above table, it is also legal for the camera device to skip one or more
1243      * transient states between two results. See below table for examples:</p>
1244      * <p>State        | Transition Cause                                            | New State      | Notes
1245      * :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
1246      * INACTIVE       | Camera device finished AE scan                              | CONVERGED      | Values are already good, transient states are skipped by camera device.
1247      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START, sequence done | FLASH_REQUIRED | Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.
1248      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START, sequence done | CONVERGED      | Converged after a precapture sequence, transient states are skipped by camera device.
1249      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL, converged    | FLASH_REQUIRED | Converged but too dark w/o flash after a precapture sequence is canceled, transient states are skipped by camera device.
1250      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL, converged    | CONVERGED      | Converged after a precapture sequenceis canceled, transient states are skipped by camera device.
1251      * CONVERGED      | Camera device finished AE scan                              | FLASH_REQUIRED | Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.
1252      * FLASH_REQUIRED | Camera device finished AE scan                              | CONVERGED      | Converged after a new scan, transient states are skipped by camera device.</p>
1253      *
1254      * @see ACAMERA_CONTROL_AE_LOCK
1255      * @see ACAMERA_CONTROL_AE_MODE
1256      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
1257      * @see ACAMERA_CONTROL_MODE
1258      * @see ACAMERA_CONTROL_SCENE_MODE
1259      */
1260     ACAMERA_CONTROL_AE_STATE =                                  // byte (enum)
1261             ACAMERA_CONTROL_START + 31,
1262     /**
1263      * <p>Current state of auto-focus (AF) algorithm.</p>
1264      *
1265      * <p>This tag may appear in:</p>
1266      * <ul>
1267      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1268      * </ul>
1269      *
1270      * <p>Switching between or enabling AF modes (ACAMERA_CONTROL_AF_MODE) always
1271      * resets the AF state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1272      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1273      * the algorithm states to INACTIVE.</p>
1274      * <p>The camera device can do several state transitions between two results, if it is
1275      * allowed by the state transition table. For example: INACTIVE may never actually be
1276      * seen in a result.</p>
1277      * <p>The state in the result is the state for this image (in sync with this image): if
1278      * AF state becomes FOCUSED, then the image data associated with this result should
1279      * be sharp.</p>
1280      * <p>Below are state transition tables for different AF modes.</p>
1281      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_OFF or AF_MODE_EDOF:</p>
1282      * <p>State       | Transition Cause | New State | Notes
1283      * :------------:|:----------------:|:---------:|:-----------:
1284      * INACTIVE      |                  | INACTIVE  | Never changes</p>
1285      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1286      * <p>State            | Transition Cause | New State          | Notes
1287      * :-----------------:|:----------------:|:------------------:|:--------------:
1288      * INACTIVE           | AF_TRIGGER       | ACTIVE_SCAN        | Start AF sweep, Lens now moving
1289      * ACTIVE_SCAN        | AF sweep done    | FOCUSED_LOCKED     | Focused, Lens now locked
1290      * ACTIVE_SCAN        | AF sweep done    | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
1291      * ACTIVE_SCAN        | AF_CANCEL        | INACTIVE           | Cancel/reset AF, Lens now locked
1292      * FOCUSED_LOCKED     | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1293      * FOCUSED_LOCKED     | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1294      * NOT_FOCUSED_LOCKED | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1295      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1296      * Any state          | Mode change      | INACTIVE           |</p>
1297      * <p>For the above table, the camera device may skip reporting any state changes that happen
1298      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1299      * can be skipped in that manner is called a transient state.</p>
1300      * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1301      * state transitions listed in above table, it is also legal for the camera device to skip
1302      * one or more transient states between two results. See below table for examples:</p>
1303      * <p>State            | Transition Cause | New State          | Notes
1304      * :-----------------:|:----------------:|:------------------:|:--------------:
1305      * INACTIVE           | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1306      * INACTIVE           | AF_TRIGGER       | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
1307      * FOCUSED_LOCKED     | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1308      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is good after a scan, lens is not locked.</p>
1309      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_VIDEO:</p>
1310      * <p>State            | Transition Cause                    | New State          | Notes
1311      * :-----------------:|:-----------------------------------:|:------------------:|:--------------:
1312      * INACTIVE           | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1313      * INACTIVE           | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1314      * PASSIVE_SCAN       | Camera device completes current scan| PASSIVE_FOCUSED    | End AF scan, Lens now locked
1315      * PASSIVE_SCAN       | Camera device fails current scan    | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1316      * PASSIVE_SCAN       | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, if focus is good. Lens now locked
1317      * PASSIVE_SCAN       | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
1318      * PASSIVE_SCAN       | AF_CANCEL                           | INACTIVE           | Reset lens position, Lens now locked
1319      * PASSIVE_FOCUSED    | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1320      * PASSIVE_UNFOCUSED  | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1321      * PASSIVE_FOCUSED    | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, lens now locked
1322      * PASSIVE_UNFOCUSED  | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
1323      * FOCUSED_LOCKED     | AF_TRIGGER                          | FOCUSED_LOCKED     | No effect
1324      * FOCUSED_LOCKED     | AF_CANCEL                           | INACTIVE           | Restart AF scan
1325      * NOT_FOCUSED_LOCKED | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | No effect
1326      * NOT_FOCUSED_LOCKED | AF_CANCEL                           | INACTIVE           | Restart AF scan</p>
1327      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_PICTURE:</p>
1328      * <p>State            | Transition Cause                     | New State          | Notes
1329      * :-----------------:|:------------------------------------:|:------------------:|:--------------:
1330      * INACTIVE           | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1331      * INACTIVE           | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1332      * PASSIVE_SCAN       | Camera device completes current scan | PASSIVE_FOCUSED    | End AF scan, Lens now locked
1333      * PASSIVE_SCAN       | Camera device fails current scan     | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1334      * PASSIVE_SCAN       | AF_TRIGGER                           | FOCUSED_LOCKED     | Eventual transition once the focus is good. Lens now locked
1335      * PASSIVE_SCAN       | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
1336      * PASSIVE_SCAN       | AF_CANCEL                            | INACTIVE           | Reset lens position, Lens now locked
1337      * PASSIVE_FOCUSED    | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1338      * PASSIVE_UNFOCUSED  | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1339      * PASSIVE_FOCUSED    | AF_TRIGGER                           | FOCUSED_LOCKED     | Immediate trans. Lens now locked
1340      * PASSIVE_UNFOCUSED  | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
1341      * FOCUSED_LOCKED     | AF_TRIGGER                           | FOCUSED_LOCKED     | No effect
1342      * FOCUSED_LOCKED     | AF_CANCEL                            | INACTIVE           | Restart AF scan
1343      * NOT_FOCUSED_LOCKED | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | No effect
1344      * NOT_FOCUSED_LOCKED | AF_CANCEL                            | INACTIVE           | Restart AF scan</p>
1345      * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1346      * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1347      * camera device. When a trigger is included in a mode switch request, the trigger
1348      * will be evaluated in the context of the new mode in the request.
1349      * See below table for examples:</p>
1350      * <p>State      | Transition Cause                       | New State                                | Notes
1351      * :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
1352      * any state    | CAF--&gt;AUTO mode switch                 | INACTIVE                                 | Mode switch without trigger, initial state must be INACTIVE
1353      * any state    | CAF--&gt;AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE   | Mode switch with trigger, INACTIVE is skipped
1354      * any state    | AUTO--&gt;CAF mode switch                 | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped</p>
1355      *
1356      * @see ACAMERA_CONTROL_AF_MODE
1357      * @see ACAMERA_CONTROL_MODE
1358      * @see ACAMERA_CONTROL_SCENE_MODE
1359      */
1360     ACAMERA_CONTROL_AF_STATE =                                  // byte (enum)
1361             ACAMERA_CONTROL_START + 32,
1362     /**
1363      * <p>Current state of auto-white balance (AWB) algorithm.</p>
1364      *
1365      * <p>This tag may appear in:</p>
1366      * <ul>
1367      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1368      * </ul>
1369      *
1370      * <p>Switching between or enabling AWB modes (ACAMERA_CONTROL_AWB_MODE) always
1371      * resets the AWB state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1372      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1373      * the algorithm states to INACTIVE.</p>
1374      * <p>The camera device can do several state transitions between two results, if it is
1375      * allowed by the state transition table. So INACTIVE may never actually be seen in
1376      * a result.</p>
1377      * <p>The state in the result is the state for this image (in sync with this image): if
1378      * AWB state becomes CONVERGED, then the image data associated with this result should
1379      * be good to use.</p>
1380      * <p>Below are state transition tables for different AWB modes.</p>
1381      * <p>When <code>ACAMERA_CONTROL_AWB_MODE != AWB_MODE_AUTO</code>:</p>
1382      * <p>State       | Transition Cause | New State | Notes
1383      * :------------:|:----------------:|:---------:|:-----------------------:
1384      * INACTIVE      |                  |INACTIVE   |Camera device auto white balance algorithm is disabled</p>
1385      * <p>When ACAMERA_CONTROL_AWB_MODE is AWB_MODE_AUTO:</p>
1386      * <p>State        | Transition Cause                 | New State     | Notes
1387      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1388      * INACTIVE       | Camera device initiates AWB scan | SEARCHING     | Values changing
1389      * INACTIVE       | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1390      * SEARCHING      | Camera device finishes AWB scan  | CONVERGED     | Good values, not changing
1391      * SEARCHING      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1392      * CONVERGED      | Camera device initiates AWB scan | SEARCHING     | Values changing
1393      * CONVERGED      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1394      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | SEARCHING     | Values not good after unlock</p>
1395      * <p>For the above table, the camera device may skip reporting any state changes that happen
1396      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1397      * can be skipped in that manner is called a transient state.</p>
1398      * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1399      * listed in above table, it is also legal for the camera device to skip one or more
1400      * transient states between two results. See below table for examples:</p>
1401      * <p>State        | Transition Cause                 | New State     | Notes
1402      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1403      * INACTIVE       | Camera device finished AWB scan  | CONVERGED     | Values are already good, transient states are skipped by camera device.
1404      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | CONVERGED     | Values good after unlock, transient states are skipped by camera device.</p>
1405      *
1406      * @see ACAMERA_CONTROL_AWB_LOCK
1407      * @see ACAMERA_CONTROL_AWB_MODE
1408      * @see ACAMERA_CONTROL_MODE
1409      * @see ACAMERA_CONTROL_SCENE_MODE
1410      */
1411     ACAMERA_CONTROL_AWB_STATE =                                 // byte (enum)
1412             ACAMERA_CONTROL_START + 34,
1413     /**
1414      * <p>Whether the camera device supports ACAMERA_CONTROL_AE_LOCK</p>
1415      *
1416      * @see ACAMERA_CONTROL_AE_LOCK
1417      *
1418      * <p>This tag may appear in:</p>
1419      * <ul>
1420      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1421      * </ul>
1422      *
1423      * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1424      * list <code>true</code>. This includes FULL devices.</p>
1425      */
1426     ACAMERA_CONTROL_AE_LOCK_AVAILABLE =                         // byte (enum)
1427             ACAMERA_CONTROL_START + 36,
1428     /**
1429      * <p>Whether the camera device supports ACAMERA_CONTROL_AWB_LOCK</p>
1430      *
1431      * @see ACAMERA_CONTROL_AWB_LOCK
1432      *
1433      * <p>This tag may appear in:</p>
1434      * <ul>
1435      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1436      * </ul>
1437      *
1438      * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1439      * always list <code>true</code>. This includes FULL devices.</p>
1440      */
1441     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE =                        // byte (enum)
1442             ACAMERA_CONTROL_START + 37,
1443     /**
1444      * <p>List of control modes for ACAMERA_CONTROL_MODE that are supported by this camera
1445      * device.</p>
1446      *
1447      * @see ACAMERA_CONTROL_MODE
1448      *
1449      * <p>This tag may appear in:</p>
1450      * <ul>
1451      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1452      * </ul>
1453      *
1454      * <p>This list contains control modes that can be set for the camera device.
1455      * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1456      * devices will always support OFF, AUTO modes.</p>
1457      */
1458     ACAMERA_CONTROL_AVAILABLE_MODES =                           // byte[n]
1459             ACAMERA_CONTROL_START + 38,
1460     /**
1461      * <p>Range of boosts for ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST supported
1462      * by this camera device.</p>
1463      *
1464      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1465      *
1466      * <p>This tag may appear in:</p>
1467      * <ul>
1468      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1469      * </ul>
1470      *
1471      * <p>Devices support post RAW sensitivity boost  will advertise
1472      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST key for controling
1473      * post RAW sensitivity boost.</p>
1474      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1475      * outputs. For devices that do support RAW format outputs, this key will always
1476      * present, and if a device does not support post RAW sensitivity boost, it will
1477      * list <code>(100, 100)</code> in this key.</p>
1478      *
1479      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1480      */
1481     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =          // int32[2]
1482             ACAMERA_CONTROL_START + 39,
1483     /**
1484      * <p>The amount of additional sensitivity boost applied to output images
1485      * after RAW sensor data is captured.</p>
1486      *
1487      * <p>This tag may appear in:</p>
1488      * <ul>
1489      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1490      *   <li>ACaptureRequest</li>
1491      * </ul>
1492      *
1493      * <p>Some camera devices support additional digital sensitivity boosting in the
1494      * camera processing pipeline after sensor RAW image is captured.
1495      * Such a boost will be applied to YUV/JPEG format output images but will not
1496      * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
1497      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1498      * outputs. For devices that do support RAW format outputs, this key will always
1499      * present, and if a device does not support post RAW sensitivity boost, it will
1500      * list <code>100</code> in this key.</p>
1501      * <p>If the camera device cannot apply the exact boost requested, it will reduce the
1502      * boost to the nearest supported value.
1503      * The final boost value used will be available in the output capture result.</p>
1504      * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
1505      * of such device will have the total sensitivity of
1506      * <code>ACAMERA_SENSOR_SENSITIVITY * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST / 100</code>
1507      * The sensitivity of RAW format images will always be <code>ACAMERA_SENSOR_SENSITIVITY</code></p>
1508      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
1509      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
1510      *
1511      * @see ACAMERA_CONTROL_AE_MODE
1512      * @see ACAMERA_CONTROL_MODE
1513      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1514      * @see ACAMERA_SENSOR_SENSITIVITY
1515      */
1516     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST =                // int32
1517             ACAMERA_CONTROL_START + 40,
1518     /**
1519      * <p>Allow camera device to enable zero-shutter-lag mode for requests with
1520      * ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE.</p>
1521      *
1522      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1523      *
1524      * <p>This tag may appear in:</p>
1525      * <ul>
1526      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1527      *   <li>ACaptureRequest</li>
1528      * </ul>
1529      *
1530      * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
1531      * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
1532      * produce output images for a zero-shutter-lag request. The result metadata including the
1533      * ACAMERA_SENSOR_TIMESTAMP reflects the source frames used to produce output images.
1534      * Therefore, the contents of the output images and the result metadata may be out of order
1535      * compared to previous regular requests. enableZsl does not affect requests with other
1536      * capture intents.</p>
1537      * <p>For example, when requests are submitted in the following order:
1538      *   Request A: enableZsl is <code>true</code>, ACAMERA_CONTROL_CAPTURE_INTENT is PREVIEW
1539      *   Request B: enableZsl is <code>true</code>, ACAMERA_CONTROL_CAPTURE_INTENT is STILL_CAPTURE</p>
1540      * <p>The output images for request B may have contents captured before the output images for
1541      * request A, and the result metadata for request B may be older than the result metadata for
1542      * request A.</p>
1543      * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in the
1544      * past for requests with STILL_CAPTURE capture intent.</p>
1545      * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
1546      * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
1547      * <code>false</code> if present.</p>
1548      * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
1549      * capture templates is always <code>false</code> if present.</p>
1550      * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
1551      *
1552      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1553      * @see ACAMERA_SENSOR_TIMESTAMP
1554      */
1555     ACAMERA_CONTROL_ENABLE_ZSL =                                // byte (enum)
1556             ACAMERA_CONTROL_START + 41,
1557     ACAMERA_CONTROL_END,
1558 
1559     /**
1560      * <p>Operation mode for edge
1561      * enhancement.</p>
1562      *
1563      * <p>This tag may appear in:</p>
1564      * <ul>
1565      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1566      *   <li>ACaptureRequest</li>
1567      * </ul>
1568      *
1569      * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
1570      * no enhancement will be applied by the camera device.</p>
1571      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
1572      * will be applied. HIGH_QUALITY mode indicates that the
1573      * camera device will use the highest-quality enhancement algorithms,
1574      * even if it slows down capture rate. FAST means the camera device will
1575      * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
1576      * edge enhancement will slow down capture rate. Every output stream will have a similar
1577      * amount of enhancement applied.</p>
1578      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
1579      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
1580      * into a final capture when triggered by the user. In this mode, the camera device applies
1581      * edge enhancement to low-resolution streams (below maximum recording resolution) to
1582      * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
1583      * since those will be reprocessed later if necessary.</p>
1584      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
1585      * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
1586      * The camera device may adjust its internal edge enhancement parameters for best
1587      * image quality based on the android.reprocess.effectiveExposureFactor, if it is set.</p>
1588      */
1589     ACAMERA_EDGE_MODE =                                         // byte (enum)
1590             ACAMERA_EDGE_START,
1591     /**
1592      * <p>List of edge enhancement modes for ACAMERA_EDGE_MODE that are supported by this camera
1593      * device.</p>
1594      *
1595      * @see ACAMERA_EDGE_MODE
1596      *
1597      * <p>This tag may appear in:</p>
1598      * <ul>
1599      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1600      * </ul>
1601      *
1602      * <p>Full-capability camera devices must always support OFF; camera devices that support
1603      * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
1604      * list FAST.</p>
1605      */
1606     ACAMERA_EDGE_AVAILABLE_EDGE_MODES =                         // byte[n]
1607             ACAMERA_EDGE_START + 2,
1608     ACAMERA_EDGE_END,
1609 
1610     /**
1611      * <p>The desired mode for for the camera device's flash control.</p>
1612      *
1613      * <p>This tag may appear in:</p>
1614      * <ul>
1615      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1616      *   <li>ACaptureRequest</li>
1617      * </ul>
1618      *
1619      * <p>This control is only effective when flash unit is available
1620      * (<code>ACAMERA_FLASH_INFO_AVAILABLE == true</code>).</p>
1621      * <p>When this control is used, the ACAMERA_CONTROL_AE_MODE must be set to ON or OFF.
1622      * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
1623      * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
1624      * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
1625      * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
1626      * device's auto-exposure routine's result. When used in still capture case, this
1627      * control should be used along with auto-exposure (AE) precapture metering sequence
1628      * (ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER), otherwise, the image may be incorrectly exposed.</p>
1629      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
1630      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
1631      * <p>The flash status will be reported by ACAMERA_FLASH_STATE in the capture result metadata.</p>
1632      *
1633      * @see ACAMERA_CONTROL_AE_MODE
1634      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
1635      * @see ACAMERA_FLASH_INFO_AVAILABLE
1636      * @see ACAMERA_FLASH_STATE
1637      */
1638     ACAMERA_FLASH_MODE =                                        // byte (enum)
1639             ACAMERA_FLASH_START + 2,
1640     /**
1641      * <p>Current state of the flash
1642      * unit.</p>
1643      *
1644      * <p>This tag may appear in:</p>
1645      * <ul>
1646      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1647      * </ul>
1648      *
1649      * <p>When the camera device doesn't have flash unit
1650      * (i.e. <code>ACAMERA_FLASH_INFO_AVAILABLE == false</code>), this state will always be UNAVAILABLE.
1651      * Other states indicate the current flash status.</p>
1652      * <p>In certain conditions, this will be available on LEGACY devices:</p>
1653      * <ul>
1654      * <li>Flash-less cameras always return UNAVAILABLE.</li>
1655      * <li>Using ACAMERA_CONTROL_AE_MODE <code>==</code> ON_ALWAYS_FLASH
1656      *    will always return FIRED.</li>
1657      * <li>Using ACAMERA_FLASH_MODE <code>==</code> TORCH
1658      *    will always return FIRED.</li>
1659      * </ul>
1660      * <p>In all other conditions the state will not be available on
1661      * LEGACY devices (i.e. it will be <code>null</code>).</p>
1662      *
1663      * @see ACAMERA_CONTROL_AE_MODE
1664      * @see ACAMERA_FLASH_INFO_AVAILABLE
1665      * @see ACAMERA_FLASH_MODE
1666      */
1667     ACAMERA_FLASH_STATE =                                       // byte (enum)
1668             ACAMERA_FLASH_START + 5,
1669     ACAMERA_FLASH_END,
1670 
1671     /**
1672      * <p>Whether this camera device has a
1673      * flash unit.</p>
1674      *
1675      * <p>This tag may appear in:</p>
1676      * <ul>
1677      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1678      * </ul>
1679      *
1680      * <p>Will be <code>false</code> if no flash is available.</p>
1681      * <p>If there is no flash unit, none of the flash controls do
1682      * anything.</p>
1683      */
1684     ACAMERA_FLASH_INFO_AVAILABLE =                              // byte (enum)
1685             ACAMERA_FLASH_INFO_START,
1686     ACAMERA_FLASH_INFO_END,
1687 
1688     /**
1689      * <p>Operational mode for hot pixel correction.</p>
1690      *
1691      * <p>This tag may appear in:</p>
1692      * <ul>
1693      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1694      *   <li>ACaptureRequest</li>
1695      * </ul>
1696      *
1697      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
1698      * that do not accurately measure the incoming light (i.e. pixels that
1699      * are stuck at an arbitrary value or are oversensitive).</p>
1700      */
1701     ACAMERA_HOT_PIXEL_MODE =                                    // byte (enum)
1702             ACAMERA_HOT_PIXEL_START,
1703     /**
1704      * <p>List of hot pixel correction modes for ACAMERA_HOT_PIXEL_MODE that are supported by this
1705      * camera device.</p>
1706      *
1707      * @see ACAMERA_HOT_PIXEL_MODE
1708      *
1709      * <p>This tag may appear in:</p>
1710      * <ul>
1711      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1712      * </ul>
1713      *
1714      * <p>FULL mode camera devices will always support FAST.</p>
1715      */
1716     ACAMERA_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =               // byte[n]
1717             ACAMERA_HOT_PIXEL_START + 1,
1718     ACAMERA_HOT_PIXEL_END,
1719 
1720     /**
1721      * <p>GPS coordinates to include in output JPEG
1722      * EXIF.</p>
1723      *
1724      * <p>This tag may appear in:</p>
1725      * <ul>
1726      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1727      *   <li>ACaptureRequest</li>
1728      * </ul>
1729      *
1730      * <p>None</p>
1731      */
1732     ACAMERA_JPEG_GPS_COORDINATES =                              // double[3]
1733             ACAMERA_JPEG_START,
1734     /**
1735      * <p>32 characters describing GPS algorithm to
1736      * include in EXIF.</p>
1737      *
1738      * <p>This tag may appear in:</p>
1739      * <ul>
1740      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1741      *   <li>ACaptureRequest</li>
1742      * </ul>
1743      *
1744      * <p>None</p>
1745      */
1746     ACAMERA_JPEG_GPS_PROCESSING_METHOD =                        // byte
1747             ACAMERA_JPEG_START + 1,
1748     /**
1749      * <p>Time GPS fix was made to include in
1750      * EXIF.</p>
1751      *
1752      * <p>This tag may appear in:</p>
1753      * <ul>
1754      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1755      *   <li>ACaptureRequest</li>
1756      * </ul>
1757      *
1758      * <p>None</p>
1759      */
1760     ACAMERA_JPEG_GPS_TIMESTAMP =                                // int64
1761             ACAMERA_JPEG_START + 2,
1762     /**
1763      * <p>The orientation for a JPEG image.</p>
1764      *
1765      * <p>This tag may appear in:</p>
1766      * <ul>
1767      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1768      *   <li>ACaptureRequest</li>
1769      * </ul>
1770      *
1771      * <p>The clockwise rotation angle in degrees, relative to the orientation
1772      * to the camera, that the JPEG picture needs to be rotated by, to be viewed
1773      * upright.</p>
1774      * <p>Camera devices may either encode this value into the JPEG EXIF header, or
1775      * rotate the image data to match this orientation. When the image data is rotated,
1776      * the thumbnail data will also be rotated.</p>
1777      * <p>Note that this orientation is relative to the orientation of the camera sensor, given
1778      * by ACAMERA_SENSOR_ORIENTATION.</p>
1779      * <p>To translate from the device orientation given by the Android sensor APIs, the following
1780      * sample code may be used:</p>
1781      * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
1782      *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
1783      *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
1784      *
1785      *     // Round device orientation to a multiple of 90
1786      *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
1787      *
1788      *     // Reverse device orientation for front-facing cameras
1789      *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
1790      *     if (facingFront) deviceOrientation = -deviceOrientation;
1791      *
1792      *     // Calculate desired JPEG orientation relative to camera orientation to make
1793      *     // the image upright relative to the device orientation
1794      *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
1795      *
1796      *     return jpegOrientation;
1797      * }
1798      * </code></pre>
1799      *
1800      * @see ACAMERA_SENSOR_ORIENTATION
1801      */
1802     ACAMERA_JPEG_ORIENTATION =                                  // int32
1803             ACAMERA_JPEG_START + 3,
1804     /**
1805      * <p>Compression quality of the final JPEG
1806      * image.</p>
1807      *
1808      * <p>This tag may appear in:</p>
1809      * <ul>
1810      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1811      *   <li>ACaptureRequest</li>
1812      * </ul>
1813      *
1814      * <p>85-95 is typical usage range.</p>
1815      */
1816     ACAMERA_JPEG_QUALITY =                                      // byte
1817             ACAMERA_JPEG_START + 4,
1818     /**
1819      * <p>Compression quality of JPEG
1820      * thumbnail.</p>
1821      *
1822      * <p>This tag may appear in:</p>
1823      * <ul>
1824      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1825      *   <li>ACaptureRequest</li>
1826      * </ul>
1827      *
1828      * <p>None</p>
1829      */
1830     ACAMERA_JPEG_THUMBNAIL_QUALITY =                            // byte
1831             ACAMERA_JPEG_START + 5,
1832     /**
1833      * <p>Resolution of embedded JPEG thumbnail.</p>
1834      *
1835      * <p>This tag may appear in:</p>
1836      * <ul>
1837      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1838      *   <li>ACaptureRequest</li>
1839      * </ul>
1840      *
1841      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
1842      * but the captured JPEG will still be a valid image.</p>
1843      * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
1844      * should have the same aspect ratio as the main JPEG output.</p>
1845      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
1846      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
1847      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
1848      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
1849      * generate the thumbnail image. The thumbnail image will always have a smaller Field
1850      * Of View (FOV) than the primary image when aspect ratios differ.</p>
1851      * <p>When an ACAMERA_JPEG_ORIENTATION of non-zero degree is requested,
1852      * the camera device will handle thumbnail rotation in one of the following ways:</p>
1853      * <ul>
1854      * <li>Set the
1855      *   <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>
1856      *   and keep jpeg and thumbnail image data unrotated.</li>
1857      * <li>Rotate the jpeg and thumbnail image data and not set
1858      *   <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>.
1859      *   In this case, LIMITED or FULL hardware level devices will report rotated thumnail size
1860      *   in capture result, so the width and height will be interchanged if 90 or 270 degree
1861      *   orientation is requested. LEGACY device will always report unrotated thumbnail size.</li>
1862      * </ul>
1863      *
1864      * @see ACAMERA_JPEG_ORIENTATION
1865      */
1866     ACAMERA_JPEG_THUMBNAIL_SIZE =                               // int32[2]
1867             ACAMERA_JPEG_START + 6,
1868     /**
1869      * <p>List of JPEG thumbnail sizes for ACAMERA_JPEG_THUMBNAIL_SIZE supported by this
1870      * camera device.</p>
1871      *
1872      * @see ACAMERA_JPEG_THUMBNAIL_SIZE
1873      *
1874      * <p>This tag may appear in:</p>
1875      * <ul>
1876      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1877      * </ul>
1878      *
1879      * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
1880      * thumbnail should be generated.</p>
1881      * <p>Below condiditions will be satisfied for this size list:</p>
1882      * <ul>
1883      * <li>The sizes will be sorted by increasing pixel area (width x height).
1884      * If several resolutions have the same area, they will be sorted by increasing width.</li>
1885      * <li>The aspect ratio of the largest thumbnail size will be same as the
1886      * aspect ratio of largest JPEG output size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
1887      * The largest size is defined as the size that has the largest pixel area
1888      * in a given size list.</li>
1889      * <li>Each output JPEG size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS will have at least
1890      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
1891      * and vice versa.</li>
1892      * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
1893      * </ul>
1894      *
1895      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
1896      */
1897     ACAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES =                    // int32[2*n]
1898             ACAMERA_JPEG_START + 7,
1899     ACAMERA_JPEG_END,
1900 
1901     /**
1902      * <p>The desired lens aperture size, as a ratio of lens focal length to the
1903      * effective aperture diameter.</p>
1904      *
1905      * <p>This tag may appear in:</p>
1906      * <ul>
1907      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1908      *   <li>ACaptureRequest</li>
1909      * </ul>
1910      *
1911      * <p>Setting this value is only supported on the camera devices that have a variable
1912      * aperture lens.</p>
1913      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is OFF,
1914      * this can be set along with ACAMERA_SENSOR_EXPOSURE_TIME,
1915      * ACAMERA_SENSOR_SENSITIVITY, and ACAMERA_SENSOR_FRAME_DURATION
1916      * to achieve manual exposure control.</p>
1917      * <p>The requested aperture value may take several frames to reach the
1918      * requested value; the camera device will report the current (intermediate)
1919      * aperture size in capture result metadata while the aperture is changing.
1920      * While the aperture is still changing, ACAMERA_LENS_STATE will be set to MOVING.</p>
1921      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is one of
1922      * the ON modes, this will be overridden by the camera device
1923      * auto-exposure algorithm, the overridden values are then provided
1924      * back to the user in the corresponding result.</p>
1925      *
1926      * @see ACAMERA_CONTROL_AE_MODE
1927      * @see ACAMERA_LENS_STATE
1928      * @see ACAMERA_SENSOR_EXPOSURE_TIME
1929      * @see ACAMERA_SENSOR_FRAME_DURATION
1930      * @see ACAMERA_SENSOR_SENSITIVITY
1931      */
1932     ACAMERA_LENS_APERTURE =                                     // float
1933             ACAMERA_LENS_START,
1934     /**
1935      * <p>The desired setting for the lens neutral density filter(s).</p>
1936      *
1937      * <p>This tag may appear in:</p>
1938      * <ul>
1939      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1940      *   <li>ACaptureRequest</li>
1941      * </ul>
1942      *
1943      * <p>This control will not be supported on most camera devices.</p>
1944      * <p>Lens filters are typically used to lower the amount of light the
1945      * sensor is exposed to (measured in steps of EV). As used here, an EV
1946      * step is the standard logarithmic representation, which are
1947      * non-negative, and inversely proportional to the amount of light
1948      * hitting the sensor.  For example, setting this to 0 would result
1949      * in no reduction of the incoming light, and setting this to 2 would
1950      * mean that the filter is set to reduce incoming light by two stops
1951      * (allowing 1/4 of the prior amount of light to the sensor).</p>
1952      * <p>It may take several frames before the lens filter density changes
1953      * to the requested value. While the filter density is still changing,
1954      * ACAMERA_LENS_STATE will be set to MOVING.</p>
1955      *
1956      * @see ACAMERA_LENS_STATE
1957      */
1958     ACAMERA_LENS_FILTER_DENSITY =                               // float
1959             ACAMERA_LENS_START + 1,
1960     /**
1961      * <p>The desired lens focal length; used for optical zoom.</p>
1962      *
1963      * <p>This tag may appear in:</p>
1964      * <ul>
1965      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1966      *   <li>ACaptureRequest</li>
1967      * </ul>
1968      *
1969      * <p>This setting controls the physical focal length of the camera
1970      * device's lens. Changing the focal length changes the field of
1971      * view of the camera device, and is usually used for optical zoom.</p>
1972      * <p>Like ACAMERA_LENS_FOCUS_DISTANCE and ACAMERA_LENS_APERTURE, this
1973      * setting won't be applied instantaneously, and it may take several
1974      * frames before the lens can change to the requested focal length.
1975      * While the focal length is still changing, ACAMERA_LENS_STATE will
1976      * be set to MOVING.</p>
1977      * <p>Optical zoom will not be supported on most devices.</p>
1978      *
1979      * @see ACAMERA_LENS_APERTURE
1980      * @see ACAMERA_LENS_FOCUS_DISTANCE
1981      * @see ACAMERA_LENS_STATE
1982      */
1983     ACAMERA_LENS_FOCAL_LENGTH =                                 // float
1984             ACAMERA_LENS_START + 2,
1985     /**
1986      * <p>Desired distance to plane of sharpest focus,
1987      * measured from frontmost surface of the lens.</p>
1988      *
1989      * <p>This tag may appear in:</p>
1990      * <ul>
1991      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1992      *   <li>ACaptureRequest</li>
1993      * </ul>
1994      *
1995      * <p>Should be zero for fixed-focus cameras</p>
1996      */
1997     ACAMERA_LENS_FOCUS_DISTANCE =                               // float
1998             ACAMERA_LENS_START + 3,
1999     /**
2000      * <p>Sets whether the camera device uses optical image stabilization (OIS)
2001      * when capturing images.</p>
2002      *
2003      * <p>This tag may appear in:</p>
2004      * <ul>
2005      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2006      *   <li>ACaptureRequest</li>
2007      * </ul>
2008      *
2009      * <p>OIS is used to compensate for motion blur due to small
2010      * movements of the camera during capture. Unlike digital image
2011      * stabilization (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), OIS
2012      * makes use of mechanical elements to stabilize the camera
2013      * sensor, and thus allows for longer exposure times before
2014      * camera shake becomes apparent.</p>
2015      * <p>Switching between different optical stabilization modes may take several
2016      * frames to initialize, the camera device will report the current mode in
2017      * capture result metadata. For example, When "ON" mode is requested, the
2018      * optical stabilization modes in the first several capture results may still
2019      * be "OFF", and it will become "ON" when the initialization is done.</p>
2020      * <p>If a camera device supports both OIS and digital image stabilization
2021      * (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), turning both modes on may produce undesirable
2022      * interaction, so it is recommended not to enable both at the same time.</p>
2023      * <p>Not all devices will support OIS; see
2024      * ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION for
2025      * available controls.</p>
2026      *
2027      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
2028      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
2029      */
2030     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE =                   // byte (enum)
2031             ACAMERA_LENS_START + 4,
2032     /**
2033      * <p>Direction the camera faces relative to
2034      * device screen.</p>
2035      *
2036      * <p>This tag may appear in:</p>
2037      * <ul>
2038      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2039      * </ul>
2040      *
2041      * <p>None</p>
2042      */
2043     ACAMERA_LENS_FACING =                                       // byte (enum)
2044             ACAMERA_LENS_START + 5,
2045     /**
2046      * <p>The orientation of the camera relative to the sensor
2047      * coordinate system.</p>
2048      *
2049      * <p>This tag may appear in:</p>
2050      * <ul>
2051      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2052      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2053      * </ul>
2054      *
2055      * <p>The four coefficients that describe the quaternion
2056      * rotation from the Android sensor coordinate system to a
2057      * camera-aligned coordinate system where the X-axis is
2058      * aligned with the long side of the image sensor, the Y-axis
2059      * is aligned with the short side of the image sensor, and
2060      * the Z-axis is aligned with the optical axis of the sensor.</p>
2061      * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
2062      * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
2063      * amount <code>theta</code>, the following formulas can be used:</p>
2064      * <pre><code> theta = 2 * acos(w)
2065      * a_x = x / sin(theta/2)
2066      * a_y = y / sin(theta/2)
2067      * a_z = z / sin(theta/2)
2068      * </code></pre>
2069      * <p>To create a 3x3 rotation matrix that applies the rotation
2070      * defined by this quaternion, the following matrix can be
2071      * used:</p>
2072      * <pre><code>R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
2073      *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
2074      *            2xz - 2yw,       2yz + 2xw, 1 - 2x^2 - 2y^2 ]
2075      * </code></pre>
2076      * <p>This matrix can then be used to apply the rotation to a
2077      *  column vector point with</p>
2078      * <p><code>p' = Rp</code></p>
2079      * <p>where <code>p</code> is in the device sensor coordinate system, and
2080      *  <code>p'</code> is in the camera-oriented coordinate system.</p>
2081      */
2082     ACAMERA_LENS_POSE_ROTATION =                                // float[4]
2083             ACAMERA_LENS_START + 6,
2084     /**
2085      * <p>Position of the camera optical center.</p>
2086      *
2087      * <p>This tag may appear in:</p>
2088      * <ul>
2089      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2090      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2091      * </ul>
2092      *
2093      * <p>The position of the camera device's lens optical center,
2094      * as a three-dimensional vector <code>(x,y,z)</code>, relative to the
2095      * optical center of the largest camera device facing in the
2096      * same direction as this camera, in the
2097      * <a href="https://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor coordinate axes</a>.
2098      * Note that only the axis definitions are shared with
2099      * the sensor coordinate system, but not the origin.</p>
2100      * <p>If this device is the largest or only camera device with a
2101      * given facing, then this position will be <code>(0, 0, 0)</code>; a
2102      * camera device with a lens optical center located 3 cm from
2103      * the main sensor along the +X axis (to the right from the
2104      * user's perspective) will report <code>(0.03, 0, 0)</code>.</p>
2105      * <p>To transform a pixel coordinates between two cameras
2106      * facing the same direction, first the source camera
2107      * ACAMERA_LENS_RADIAL_DISTORTION must be corrected for.  Then
2108      * the source camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs
2109      * to be applied, followed by the ACAMERA_LENS_POSE_ROTATION
2110      * of the source camera, the translation of the source camera
2111      * relative to the destination camera, the
2112      * ACAMERA_LENS_POSE_ROTATION of the destination camera, and
2113      * finally the inverse of ACAMERA_LENS_INTRINSIC_CALIBRATION
2114      * of the destination camera. This obtains a
2115      * radial-distortion-free coordinate in the destination
2116      * camera pixel coordinates.</p>
2117      * <p>To compare this against a real image from the destination
2118      * camera, the destination camera image then needs to be
2119      * corrected for radial distortion before comparison or
2120      * sampling.</p>
2121      *
2122      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2123      * @see ACAMERA_LENS_POSE_ROTATION
2124      * @see ACAMERA_LENS_RADIAL_DISTORTION
2125      */
2126     ACAMERA_LENS_POSE_TRANSLATION =                             // float[3]
2127             ACAMERA_LENS_START + 7,
2128     /**
2129      * <p>The range of scene distances that are in
2130      * sharp focus (depth of field).</p>
2131      *
2132      * <p>This tag may appear in:</p>
2133      * <ul>
2134      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2135      * </ul>
2136      *
2137      * <p>If variable focus not supported, can still report
2138      * fixed depth of field range</p>
2139      */
2140     ACAMERA_LENS_FOCUS_RANGE =                                  // float[2]
2141             ACAMERA_LENS_START + 8,
2142     /**
2143      * <p>Current lens status.</p>
2144      *
2145      * <p>This tag may appear in:</p>
2146      * <ul>
2147      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2148      * </ul>
2149      *
2150      * <p>For lens parameters ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
2151      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE, when changes are requested,
2152      * they may take several frames to reach the requested values. This state indicates
2153      * the current status of the lens parameters.</p>
2154      * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2155      * either because the parameters are all fixed, or because the lens has had enough
2156      * time to reach the most recently-requested values.
2157      * If all these lens parameters are not changable for a camera device, as listed below:</p>
2158      * <ul>
2159      * <li>Fixed focus (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE == 0</code>), which means
2160      * ACAMERA_LENS_FOCUS_DISTANCE parameter will always be 0.</li>
2161      * <li>Fixed focal length (ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS contains single value),
2162      * which means the optical zoom is not supported.</li>
2163      * <li>No ND filter (ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES contains only 0).</li>
2164      * <li>Fixed aperture (ACAMERA_LENS_INFO_AVAILABLE_APERTURES contains single value).</li>
2165      * </ul>
2166      * <p>Then this state will always be STATIONARY.</p>
2167      * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2168      * is changing.</p>
2169      *
2170      * @see ACAMERA_LENS_APERTURE
2171      * @see ACAMERA_LENS_FILTER_DENSITY
2172      * @see ACAMERA_LENS_FOCAL_LENGTH
2173      * @see ACAMERA_LENS_FOCUS_DISTANCE
2174      * @see ACAMERA_LENS_INFO_AVAILABLE_APERTURES
2175      * @see ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES
2176      * @see ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2177      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
2178      */
2179     ACAMERA_LENS_STATE =                                        // byte (enum)
2180             ACAMERA_LENS_START + 9,
2181     /**
2182      * <p>The parameters for this camera device's intrinsic
2183      * calibration.</p>
2184      *
2185      * <p>This tag may appear in:</p>
2186      * <ul>
2187      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2188      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2189      * </ul>
2190      *
2191      * <p>The five calibration parameters that describe the
2192      * transform from camera-centric 3D coordinates to sensor
2193      * pixel coordinates:</p>
2194      * <pre><code>[f_x, f_y, c_x, c_y, s]
2195      * </code></pre>
2196      * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
2197      * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
2198      * axis, and <code>s</code> is a skew parameter for the sensor plane not
2199      * being aligned with the lens plane.</p>
2200      * <p>These are typically used within a transformation matrix K:</p>
2201      * <pre><code>K = [ f_x,   s, c_x,
2202      *        0, f_y, c_y,
2203      *        0    0,   1 ]
2204      * </code></pre>
2205      * <p>which can then be combined with the camera pose rotation
2206      * <code>R</code> and translation <code>t</code> (ACAMERA_LENS_POSE_ROTATION and
2207      * ACAMERA_LENS_POSE_TRANSLATION, respective) to calculate the
2208      * complete transform from world coordinates to pixel
2209      * coordinates:</p>
2210      * <pre><code>P = [ K 0   * [ R t
2211      *      0 1 ]     0 1 ]
2212      * </code></pre>
2213      * <p>and with <code>p_w</code> being a point in the world coordinate system
2214      * and <code>p_s</code> being a point in the camera active pixel array
2215      * coordinate system, and with the mapping including the
2216      * homogeneous division by z:</p>
2217      * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
2218      * p_s = p_h / z_h
2219      * </code></pre>
2220      * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
2221      * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
2222      * (depth) in pixel coordinates.</p>
2223      * <p>Note that the coordinate system for this transform is the
2224      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE system,
2225      * where <code>(0,0)</code> is the top-left of the
2226      * preCorrectionActiveArraySize rectangle. Once the pose and
2227      * intrinsic calibration transforms have been applied to a
2228      * world point, then the ACAMERA_LENS_RADIAL_DISTORTION
2229      * transform needs to be applied, and the result adjusted to
2230      * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate
2231      * system (where <code>(0, 0)</code> is the top-left of the
2232      * activeArraySize rectangle), to determine the final pixel
2233      * coordinate of the world point for processed (non-RAW)
2234      * output buffers.</p>
2235      *
2236      * @see ACAMERA_LENS_POSE_ROTATION
2237      * @see ACAMERA_LENS_POSE_TRANSLATION
2238      * @see ACAMERA_LENS_RADIAL_DISTORTION
2239      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2240      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
2241      */
2242     ACAMERA_LENS_INTRINSIC_CALIBRATION =                        // float[5]
2243             ACAMERA_LENS_START + 10,
2244     /**
2245      * <p>The correction coefficients to correct for this camera device's
2246      * radial and tangential lens distortion.</p>
2247      *
2248      * <p>This tag may appear in:</p>
2249      * <ul>
2250      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2251      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2252      * </ul>
2253      *
2254      * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2,
2255      * kappa_3]</code> and two tangential distortion coefficients
2256      * <code>[kappa_4, kappa_5]</code> that can be used to correct the
2257      * lens's geometric distortion with the mapping equations:</p>
2258      * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2259      *        kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
2260      *  y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2261      *        kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
2262      * </code></pre>
2263      * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
2264      * input image that correspond to the pixel values in the
2265      * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
2266      * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
2267      * </code></pre>
2268      * <p>The pixel coordinates are defined in a normalized
2269      * coordinate system related to the
2270      * ACAMERA_LENS_INTRINSIC_CALIBRATION calibration fields.
2271      * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the
2272      * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes
2273      * of both x and y coordinates are normalized to be 1 at the
2274      * edge further from the optical center, so the range
2275      * for both dimensions is <code>-1 &lt;= x &lt;= 1</code>.</p>
2276      * <p>Finally, <code>r</code> represents the radial distance from the
2277      * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude
2278      * is therefore no larger than <code>|r| &lt;= sqrt(2)</code>.</p>
2279      * <p>The distortion model used is the Brown-Conrady model.</p>
2280      *
2281      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2282      */
2283     ACAMERA_LENS_RADIAL_DISTORTION =                            // float[6]
2284             ACAMERA_LENS_START + 11,
2285     ACAMERA_LENS_END,
2286 
2287     /**
2288      * <p>List of aperture size values for ACAMERA_LENS_APERTURE that are
2289      * supported by this camera device.</p>
2290      *
2291      * @see ACAMERA_LENS_APERTURE
2292      *
2293      * <p>This tag may appear in:</p>
2294      * <ul>
2295      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2296      * </ul>
2297      *
2298      * <p>If the camera device doesn't support a variable lens aperture,
2299      * this list will contain only one value, which is the fixed aperture size.</p>
2300      * <p>If the camera device supports a variable aperture, the aperture values
2301      * in this list will be sorted in ascending order.</p>
2302      */
2303     ACAMERA_LENS_INFO_AVAILABLE_APERTURES =                     // float[n]
2304             ACAMERA_LENS_INFO_START,
2305     /**
2306      * <p>List of neutral density filter values for
2307      * ACAMERA_LENS_FILTER_DENSITY that are supported by this camera device.</p>
2308      *
2309      * @see ACAMERA_LENS_FILTER_DENSITY
2310      *
2311      * <p>This tag may appear in:</p>
2312      * <ul>
2313      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2314      * </ul>
2315      *
2316      * <p>If a neutral density filter is not supported by this camera device,
2317      * this list will contain only 0. Otherwise, this list will include every
2318      * filter density supported by the camera device, in ascending order.</p>
2319      */
2320     ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES =              // float[n]
2321             ACAMERA_LENS_INFO_START + 1,
2322     /**
2323      * <p>List of focal lengths for ACAMERA_LENS_FOCAL_LENGTH that are supported by this camera
2324      * device.</p>
2325      *
2326      * @see ACAMERA_LENS_FOCAL_LENGTH
2327      *
2328      * <p>This tag may appear in:</p>
2329      * <ul>
2330      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2331      * </ul>
2332      *
2333      * <p>If optical zoom is not supported, this list will only contain
2334      * a single value corresponding to the fixed focal length of the
2335      * device. Otherwise, this list will include every focal length supported
2336      * by the camera device, in ascending order.</p>
2337      */
2338     ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS =                 // float[n]
2339             ACAMERA_LENS_INFO_START + 2,
2340     /**
2341      * <p>List of optical image stabilization (OIS) modes for
2342      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE that are supported by this camera device.</p>
2343      *
2344      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
2345      *
2346      * <p>This tag may appear in:</p>
2347      * <ul>
2348      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2349      * </ul>
2350      *
2351      * <p>If OIS is not supported by a given camera device, this list will
2352      * contain only OFF.</p>
2353      */
2354     ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =         // byte[n]
2355             ACAMERA_LENS_INFO_START + 3,
2356     /**
2357      * <p>Hyperfocal distance for this lens.</p>
2358      *
2359      * <p>This tag may appear in:</p>
2360      * <ul>
2361      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2362      * </ul>
2363      *
2364      * <p>If the lens is not fixed focus, the camera device will report this
2365      * field when ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION is APPROXIMATE or CALIBRATED.</p>
2366      *
2367      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
2368      */
2369     ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE =                     // float
2370             ACAMERA_LENS_INFO_START + 4,
2371     /**
2372      * <p>Shortest distance from frontmost surface
2373      * of the lens that can be brought into sharp focus.</p>
2374      *
2375      * <p>This tag may appear in:</p>
2376      * <ul>
2377      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2378      * </ul>
2379      *
2380      * <p>If the lens is fixed-focus, this will be
2381      * 0.</p>
2382      */
2383     ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE =                  // float
2384             ACAMERA_LENS_INFO_START + 5,
2385     /**
2386      * <p>Dimensions of lens shading map.</p>
2387      *
2388      * <p>This tag may appear in:</p>
2389      * <ul>
2390      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2391      * </ul>
2392      *
2393      * <p>The map should be on the order of 30-40 rows and columns, and
2394      * must be smaller than 64x64.</p>
2395      */
2396     ACAMERA_LENS_INFO_SHADING_MAP_SIZE =                        // int32[2]
2397             ACAMERA_LENS_INFO_START + 6,
2398     /**
2399      * <p>The lens focus distance calibration quality.</p>
2400      *
2401      * <p>This tag may appear in:</p>
2402      * <ul>
2403      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2404      * </ul>
2405      *
2406      * <p>The lens focus distance calibration quality determines the reliability of
2407      * focus related metadata entries, i.e. ACAMERA_LENS_FOCUS_DISTANCE,
2408      * ACAMERA_LENS_FOCUS_RANGE, ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE, and
2409      * ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE.</p>
2410      * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
2411      * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
2412      * and increasing positive numbers represent focusing closer and closer
2413      * to the camera device. The focus distance control also uses diopters
2414      * on these devices.</p>
2415      * <p>UNCALIBRATED devices do not use units that are directly comparable
2416      * to any real physical measurement, but <code>0.0f</code> still represents farthest
2417      * focus, and ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE represents the
2418      * nearest focus the device can achieve.</p>
2419      *
2420      * @see ACAMERA_LENS_FOCUS_DISTANCE
2421      * @see ACAMERA_LENS_FOCUS_RANGE
2422      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
2423      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
2424      */
2425     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION =              // byte (enum)
2426             ACAMERA_LENS_INFO_START + 7,
2427     ACAMERA_LENS_INFO_END,
2428 
2429     /**
2430      * <p>Mode of operation for the noise reduction algorithm.</p>
2431      *
2432      * <p>This tag may appear in:</p>
2433      * <ul>
2434      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2435      *   <li>ACaptureRequest</li>
2436      * </ul>
2437      *
2438      * <p>The noise reduction algorithm attempts to improve image quality by removing
2439      * excessive noise added by the capture process, especially in dark conditions.</p>
2440      * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
2441      * YUV domain.</p>
2442      * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
2443      * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
2444      * This mode is optional, may not be support by all devices. The application should check
2445      * ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES before using it.</p>
2446      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
2447      * will be applied. HIGH_QUALITY mode indicates that the camera device
2448      * will use the highest-quality noise filtering algorithms,
2449      * even if it slows down capture rate. FAST means the camera device will not
2450      * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
2451      * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
2452      * Every output stream will have a similar amount of enhancement applied.</p>
2453      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2454      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2455      * into a final capture when triggered by the user. In this mode, the camera device applies
2456      * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
2457      * preview quality, but does not apply noise reduction to high-resolution streams, since
2458      * those will be reprocessed later if necessary.</p>
2459      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
2460      * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
2461      * may adjust the noise reduction parameters for best image quality based on the
2462      * android.reprocess.effectiveExposureFactor if it is set.</p>
2463      *
2464      * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
2465      */
2466     ACAMERA_NOISE_REDUCTION_MODE =                              // byte (enum)
2467             ACAMERA_NOISE_REDUCTION_START,
2468     /**
2469      * <p>List of noise reduction modes for ACAMERA_NOISE_REDUCTION_MODE that are supported
2470      * by this camera device.</p>
2471      *
2472      * @see ACAMERA_NOISE_REDUCTION_MODE
2473      *
2474      * <p>This tag may appear in:</p>
2475      * <ul>
2476      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2477      * </ul>
2478      *
2479      * <p>Full-capability camera devices will always support OFF and FAST.</p>
2480      * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
2481      * ZERO_SHUTTER_LAG.</p>
2482      * <p>Legacy-capability camera devices will only support FAST mode.</p>
2483      */
2484     ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =   // byte[n]
2485             ACAMERA_NOISE_REDUCTION_START + 2,
2486     ACAMERA_NOISE_REDUCTION_END,
2487 
2488     /**
2489      * <p>The maximum numbers of different types of output streams
2490      * that can be configured and used simultaneously by a camera device.</p>
2491      *
2492      * <p>This tag may appear in:</p>
2493      * <ul>
2494      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2495      * </ul>
2496      *
2497      * <p>This is a 3 element tuple that contains the max number of output simultaneous
2498      * streams for raw sensor, processed (but not stalling), and processed (and stalling)
2499      * formats respectively. For example, assuming that JPEG is typically a processed and
2500      * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
2501      * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
2502      * <p>This lists the upper bound of the number of output streams supported by
2503      * the camera device. Using more streams simultaneously may require more hardware and
2504      * CPU resources that will consume more power. The image format for an output stream can
2505      * be any supported format provided by ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
2506      * The formats defined in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS can be catergorized
2507      * into the 3 stream types as below:</p>
2508      * <ul>
2509      * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
2510      *   Typically {@link AIMAGE_FORMAT_JPEG} format.</li>
2511      * <li>Raw formats: {@link AIMAGE_FORMAT_RAW16}, {@link AIMAGE_FORMAT_RAW10}, or
2512      *   {@link AIMAGE_FORMAT_RAW12}.</li>
2513      * <li>Processed (but not-stalling): any non-RAW format without a stall duration.
2514      *   Typically {@link AIMAGE_FORMAT_YUV_420_888}.</li>
2515      * </ul>
2516      *
2517      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
2518      */
2519     ACAMERA_REQUEST_MAX_NUM_OUTPUT_STREAMS =                    // int32[3]
2520             ACAMERA_REQUEST_START + 6,
2521     /**
2522      * <p>Specifies the number of pipeline stages the frame went
2523      * through from when it was exposed to when the final completed result
2524      * was available to the framework.</p>
2525      *
2526      * <p>This tag may appear in:</p>
2527      * <ul>
2528      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2529      * </ul>
2530      *
2531      * <p>Depending on what settings are used in the request, and
2532      * what streams are configured, the data may undergo less processing,
2533      * and some pipeline stages skipped.</p>
2534      * <p>See ACAMERA_REQUEST_PIPELINE_MAX_DEPTH for more details.</p>
2535      *
2536      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
2537      */
2538     ACAMERA_REQUEST_PIPELINE_DEPTH =                            // byte
2539             ACAMERA_REQUEST_START + 9,
2540     /**
2541      * <p>Specifies the number of maximum pipeline stages a frame
2542      * has to go through from when it's exposed to when it's available
2543      * to the framework.</p>
2544      *
2545      * <p>This tag may appear in:</p>
2546      * <ul>
2547      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2548      * </ul>
2549      *
2550      * <p>A typical minimum value for this is 2 (one stage to expose,
2551      * one stage to readout) from the sensor. The ISP then usually adds
2552      * its own stages to do custom HW processing. Further stages may be
2553      * added by SW processing.</p>
2554      * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
2555      * processing is enabled (e.g. face detection), the actual pipeline
2556      * depth (specified by ACAMERA_REQUEST_PIPELINE_DEPTH) may be less than
2557      * the max pipeline depth.</p>
2558      * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
2559      * X frame intervals.</p>
2560      * <p>This value will normally be 8 or less, however, for high speed capture session,
2561      * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
2562      *
2563      * @see ACAMERA_REQUEST_PIPELINE_DEPTH
2564      */
2565     ACAMERA_REQUEST_PIPELINE_MAX_DEPTH =                        // byte
2566             ACAMERA_REQUEST_START + 10,
2567     /**
2568      * <p>Defines how many sub-components
2569      * a result will be composed of.</p>
2570      *
2571      * <p>This tag may appear in:</p>
2572      * <ul>
2573      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2574      * </ul>
2575      *
2576      * <p>In order to combat the pipeline latency, partial results
2577      * may be delivered to the application layer from the camera device as
2578      * soon as they are available.</p>
2579      * <p>Optional; defaults to 1. A value of 1 means that partial
2580      * results are not supported, and only the final TotalCaptureResult will
2581      * be produced by the camera device.</p>
2582      * <p>A typical use case for this might be: after requesting an
2583      * auto-focus (AF) lock the new AF state might be available 50%
2584      * of the way through the pipeline.  The camera device could
2585      * then immediately dispatch this state via a partial result to
2586      * the application, and the rest of the metadata via later
2587      * partial results.</p>
2588      */
2589     ACAMERA_REQUEST_PARTIAL_RESULT_COUNT =                      // int32
2590             ACAMERA_REQUEST_START + 11,
2591     /**
2592      * <p>List of capabilities that this camera device
2593      * advertises as fully supporting.</p>
2594      *
2595      * <p>This tag may appear in:</p>
2596      * <ul>
2597      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2598      * </ul>
2599      *
2600      * <p>A capability is a contract that the camera device makes in order
2601      * to be able to satisfy one or more use cases.</p>
2602      * <p>Listing a capability guarantees that the whole set of features
2603      * required to support a common use will all be available.</p>
2604      * <p>Using a subset of the functionality provided by an unsupported
2605      * capability may be possible on a specific camera device implementation;
2606      * to do this query each of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS,
2607      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS,
2608      * ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS.</p>
2609      * <p>The following capabilities are guaranteed to be available on
2610      * ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL <code>==</code> FULL devices:</p>
2611      * <ul>
2612      * <li>MANUAL_SENSOR</li>
2613      * <li>MANUAL_POST_PROCESSING</li>
2614      * </ul>
2615      * <p>Other capabilities may be available on either FULL or LIMITED
2616      * devices, but the application should query this key to be sure.</p>
2617      *
2618      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
2619      * @see ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS
2620      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
2621      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
2622      */
2623     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES =                    // byte[n] (enum)
2624             ACAMERA_REQUEST_START + 12,
2625     /**
2626      * <p>A list of all keys that the camera device has available
2627      * to use with {@link ACaptureRequest}.</p>
2628      *
2629      * <p>This tag may appear in:</p>
2630      * <ul>
2631      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2632      * </ul>
2633      *
2634      * <p>Attempting to set a key into a CaptureRequest that is not
2635      * listed here will result in an invalid request and will be rejected
2636      * by the camera device.</p>
2637      * <p>This field can be used to query the feature set of a camera device
2638      * at a more granular level than capabilities. This is especially
2639      * important for optional keys that are not listed under any capability
2640      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
2641      *
2642      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
2643      */
2644     ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS =                    // int32[n]
2645             ACAMERA_REQUEST_START + 13,
2646     /**
2647      * <p>A list of all keys that the camera device has available
2648      * to query with {@link ACameraMetadata} from
2649      * {@link ACameraCaptureSession_captureCallback_result}.</p>
2650      *
2651      * <p>This tag may appear in:</p>
2652      * <ul>
2653      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2654      * </ul>
2655      *
2656      * <p>Attempting to get a key from a CaptureResult that is not
2657      * listed here will always return a <code>null</code> value. Getting a key from
2658      * a CaptureResult that is listed here will generally never return a <code>null</code>
2659      * value.</p>
2660      * <p>The following keys may return <code>null</code> unless they are enabled:</p>
2661      * <ul>
2662      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP (non-null iff ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON)</li>
2663      * </ul>
2664      * <p>(Those sometimes-null keys will nevertheless be listed here
2665      * if they are available.)</p>
2666      * <p>This field can be used to query the feature set of a camera device
2667      * at a more granular level than capabilities. This is especially
2668      * important for optional keys that are not listed under any capability
2669      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
2670      *
2671      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
2672      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
2673      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
2674      */
2675     ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS =                     // int32[n]
2676             ACAMERA_REQUEST_START + 14,
2677     /**
2678      * <p>A list of all keys that the camera device has available
2679      * to query with {@link ACameraMetadata} from
2680      * {@link ACameraManager_getCameraCharacteristics}.</p>
2681      *
2682      * <p>This tag may appear in:</p>
2683      * <ul>
2684      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2685      * </ul>
2686      *
2687      * <p>This entry follows the same rules as
2688      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS (except that it applies for
2689      * CameraCharacteristics instead of CaptureResult). See above for more
2690      * details.</p>
2691      *
2692      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
2693      */
2694     ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =            // int32[n]
2695             ACAMERA_REQUEST_START + 15,
2696     ACAMERA_REQUEST_END,
2697 
2698     /**
2699      * <p>The desired region of the sensor to read out for this capture.</p>
2700      *
2701      * <p>This tag may appear in:</p>
2702      * <ul>
2703      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2704      *   <li>ACaptureRequest</li>
2705      * </ul>
2706      *
2707      * <p>This control can be used to implement digital zoom.</p>
2708      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
2709      * <p>The crop region coordinate system is based off
2710      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being the
2711      * top-left corner of the sensor active array.</p>
2712      * <p>Output streams use this rectangle to produce their output,
2713      * cropping to a smaller region if necessary to maintain the
2714      * stream's aspect ratio, then scaling the sensor input to
2715      * match the output's configured resolution.</p>
2716      * <p>The crop region is applied after the RAW to other color
2717      * space (e.g. YUV) conversion. Since raw streams
2718      * (e.g. RAW16) don't have the conversion stage, they are not
2719      * croppable. The crop region will be ignored by raw streams.</p>
2720      * <p>For non-raw streams, any additional per-stream cropping will
2721      * be done to maximize the final pixel area of the stream.</p>
2722      * <p>For example, if the crop region is set to a 4:3 aspect
2723      * ratio, then 4:3 streams will use the exact crop
2724      * region. 16:9 streams will further crop vertically
2725      * (letterbox).</p>
2726      * <p>Conversely, if the crop region is set to a 16:9, then 4:3
2727      * outputs will crop horizontally (pillarbox), and 16:9
2728      * streams will match exactly. These additional crops will
2729      * be centered within the crop region.</p>
2730      * <p>The width and height of the crop region cannot
2731      * be set to be smaller than
2732      * <code>floor( activeArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code> and
2733      * <code>floor( activeArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>, respectively.</p>
2734      * <p>The camera device may adjust the crop region to account
2735      * for rounding and other hardware requirements; the final
2736      * crop region used will be included in the output capture
2737      * result.</p>
2738      *
2739      * @see ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
2740      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2741      */
2742     ACAMERA_SCALER_CROP_REGION =                                // int32[4]
2743             ACAMERA_SCALER_START,
2744     /**
2745      * <p>The maximum ratio between both active area width
2746      * and crop region width, and active area height and
2747      * crop region height, for ACAMERA_SCALER_CROP_REGION.</p>
2748      *
2749      * @see ACAMERA_SCALER_CROP_REGION
2750      *
2751      * <p>This tag may appear in:</p>
2752      * <ul>
2753      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2754      * </ul>
2755      *
2756      * <p>This represents the maximum amount of zooming possible by
2757      * the camera device, or equivalently, the minimum cropping
2758      * window size.</p>
2759      * <p>Crop regions that have a width or height that is smaller
2760      * than this ratio allows will be rounded up to the minimum
2761      * allowed size by the camera device.</p>
2762      */
2763     ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =                 // float
2764             ACAMERA_SCALER_START + 4,
2765     /**
2766      * <p>The available stream configurations that this
2767      * camera device supports
2768      * (i.e. format, width, height, output/input stream).</p>
2769      *
2770      * <p>This tag may appear in:</p>
2771      * <ul>
2772      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2773      * </ul>
2774      *
2775      * <p>The configurations are listed as <code>(format, width, height, input?)</code>
2776      * tuples.</p>
2777      * <p>For a given use case, the actual maximum supported resolution
2778      * may be lower than what is listed here, depending on the destination
2779      * Surface for the image data. For example, for recording video,
2780      * the video encoder chosen may have a maximum size limit (e.g. 1080p)
2781      * smaller than what the camera (e.g. maximum resolution is 3264x2448)
2782      * can provide.</p>
2783      * <p>Please reference the documentation for the image data destination to
2784      * check if it limits the maximum size for image data.</p>
2785      * <p>Not all output formats may be supported in a configuration with
2786      * an input stream of a particular format. For more details, see
2787      * android.scaler.availableInputOutputFormatsMap.</p>
2788      * <p>The following table describes the minimum required output stream
2789      * configurations based on the hardware level
2790      * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL):</p>
2791      * <p>Format         | Size                                         | Hardware Level | Notes
2792      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
2793      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
2794      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
2795      * JPEG           | 1280x720 (720)                               | Any            | if 720p &lt;= activeArraySize
2796      * JPEG           | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
2797      * JPEG           | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
2798      * YUV_420_888    | all output sizes available for JPEG          | FULL           |
2799      * YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
2800      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
2801      * <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
2802      * mandatory stream configurations on a per-capability basis.</p>
2803      *
2804      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
2805      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
2806      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2807      */
2808     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS =            // int32[n*4] (enum)
2809             ACAMERA_SCALER_START + 10,
2810     /**
2811      * <p>This lists the minimum frame duration for each
2812      * format/size combination.</p>
2813      *
2814      * <p>This tag may appear in:</p>
2815      * <ul>
2816      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2817      * </ul>
2818      *
2819      * <p>This should correspond to the frame duration when only that
2820      * stream is active, with all processing (typically in android.*.mode)
2821      * set to either OFF or FAST.</p>
2822      * <p>When multiple streams are used in a request, the minimum frame
2823      * duration will be max(individual stream min durations).</p>
2824      * <p>The minimum frame duration of a stream (of a particular format, size)
2825      * is the same regardless of whether the stream is input or output.</p>
2826      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
2827      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
2828      * calculating the max frame rate.</p>
2829      *
2830      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
2831      * @see ACAMERA_SENSOR_FRAME_DURATION
2832      */
2833     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS =              // int64[4*n]
2834             ACAMERA_SCALER_START + 11,
2835     /**
2836      * <p>This lists the maximum stall duration for each
2837      * output format/size combination.</p>
2838      *
2839      * <p>This tag may appear in:</p>
2840      * <ul>
2841      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2842      * </ul>
2843      *
2844      * <p>A stall duration is how much extra time would get added
2845      * to the normal minimum frame duration for a repeating request
2846      * that has streams with non-zero stall.</p>
2847      * <p>For example, consider JPEG captures which have the following
2848      * characteristics:</p>
2849      * <ul>
2850      * <li>JPEG streams act like processed YUV streams in requests for which
2851      * they are not included; in requests in which they are directly
2852      * referenced, they act as JPEG streams. This is because supporting a
2853      * JPEG stream requires the underlying YUV data to always be ready for
2854      * use by a JPEG encoder, but the encoder will only be used (and impact
2855      * frame duration) on requests that actually reference a JPEG stream.</li>
2856      * <li>The JPEG processor can run concurrently to the rest of the camera
2857      * pipeline, but cannot process more than 1 capture at a time.</li>
2858      * </ul>
2859      * <p>In other words, using a repeating YUV request would result
2860      * in a steady frame rate (let's say it's 30 FPS). If a single
2861      * JPEG request is submitted periodically, the frame rate will stay
2862      * at 30 FPS (as long as we wait for the previous JPEG to return each
2863      * time). If we try to submit a repeating YUV + JPEG request, then
2864      * the frame rate will drop from 30 FPS.</p>
2865      * <p>In general, submitting a new request with a non-0 stall time
2866      * stream will <em>not</em> cause a frame rate drop unless there are still
2867      * outstanding buffers for that stream from previous requests.</p>
2868      * <p>Submitting a repeating request with streams (call this <code>S</code>)
2869      * is the same as setting the minimum frame duration from
2870      * the normal minimum frame duration corresponding to <code>S</code>, added with
2871      * the maximum stall duration for <code>S</code>.</p>
2872      * <p>If interleaving requests with and without a stall duration,
2873      * a request will stall by the maximum of the remaining times
2874      * for each can-stall stream with outstanding buffers.</p>
2875      * <p>This means that a stalling request will not have an exposure start
2876      * until the stall has completed.</p>
2877      * <p>This should correspond to the stall duration when only that stream is
2878      * active, with all processing (typically in android.*.mode) set to FAST
2879      * or OFF. Setting any of the processing modes to HIGH_QUALITY
2880      * effectively results in an indeterminate stall duration for all
2881      * streams in a request (the regular stall calculation rules are
2882      * ignored).</p>
2883      * <p>The following formats may always have a stall duration:</p>
2884      * <ul>
2885      * <li>{@link AIMAGE_FORMAT_JPEG}</li>
2886      * <li>{@link AIMAGE_FORMAT_RAW16}</li>
2887      * </ul>
2888      * <p>The following formats will never have a stall duration:</p>
2889      * <ul>
2890      * <li>{@link AIMAGE_FORMAT_YUV_420_888}</li>
2891      * <li>{@link AIMAGE_FORMAT_RAW10}</li>
2892      * </ul>
2893      * <p>All other formats may or may not have an allowed stall duration on
2894      * a per-capability basis; refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
2895      * for more details.</p>
2896      * <p>See ACAMERA_SENSOR_FRAME_DURATION for more information about
2897      * calculating the max frame rate (absent stalls).</p>
2898      *
2899      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
2900      * @see ACAMERA_SENSOR_FRAME_DURATION
2901      */
2902     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS =                  // int64[4*n]
2903             ACAMERA_SCALER_START + 12,
2904     /**
2905      * <p>The crop type that this camera device supports.</p>
2906      *
2907      * <p>This tag may appear in:</p>
2908      * <ul>
2909      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2910      * </ul>
2911      *
2912      * <p>When passing a non-centered crop region (ACAMERA_SCALER_CROP_REGION) to a camera
2913      * device that only supports CENTER_ONLY cropping, the camera device will move the
2914      * crop region to the center of the sensor active array (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE)
2915      * and keep the crop region width and height unchanged. The camera device will return the
2916      * final used crop region in metadata result ACAMERA_SCALER_CROP_REGION.</p>
2917      * <p>Camera devices that support FREEFORM cropping will support any crop region that
2918      * is inside of the active array. The camera device will apply the same crop region and
2919      * return the final used crop region in capture result metadata ACAMERA_SCALER_CROP_REGION.</p>
2920      * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
2921      *
2922      * @see ACAMERA_SCALER_CROP_REGION
2923      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2924      */
2925     ACAMERA_SCALER_CROPPING_TYPE =                              // byte (enum)
2926             ACAMERA_SCALER_START + 13,
2927     ACAMERA_SCALER_END,
2928 
2929     /**
2930      * <p>Duration each pixel is exposed to
2931      * light.</p>
2932      *
2933      * <p>This tag may appear in:</p>
2934      * <ul>
2935      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2936      *   <li>ACaptureRequest</li>
2937      * </ul>
2938      *
2939      * <p>If the sensor can't expose this exact duration, it will shorten the
2940      * duration exposed to the nearest possible value (rather than expose longer).
2941      * The final exposure time used will be available in the output capture result.</p>
2942      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
2943      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
2944      *
2945      * @see ACAMERA_CONTROL_AE_MODE
2946      * @see ACAMERA_CONTROL_MODE
2947      */
2948     ACAMERA_SENSOR_EXPOSURE_TIME =                              // int64
2949             ACAMERA_SENSOR_START,
2950     /**
2951      * <p>Duration from start of frame exposure to
2952      * start of next frame exposure.</p>
2953      *
2954      * <p>This tag may appear in:</p>
2955      * <ul>
2956      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2957      *   <li>ACaptureRequest</li>
2958      * </ul>
2959      *
2960      * <p>The maximum frame rate that can be supported by a camera subsystem is
2961      * a function of many factors:</p>
2962      * <ul>
2963      * <li>Requested resolutions of output image streams</li>
2964      * <li>Availability of binning / skipping modes on the imager</li>
2965      * <li>The bandwidth of the imager interface</li>
2966      * <li>The bandwidth of the various ISP processing blocks</li>
2967      * </ul>
2968      * <p>Since these factors can vary greatly between different ISPs and
2969      * sensors, the camera abstraction tries to represent the bandwidth
2970      * restrictions with as simple a model as possible.</p>
2971      * <p>The model presented has the following characteristics:</p>
2972      * <ul>
2973      * <li>The image sensor is always configured to output the smallest
2974      * resolution possible given the application's requested output stream
2975      * sizes.  The smallest resolution is defined as being at least as large
2976      * as the largest requested output stream size; the camera pipeline must
2977      * never digitally upsample sensor data when the crop region covers the
2978      * whole sensor. In general, this means that if only small output stream
2979      * resolutions are configured, the sensor can provide a higher frame
2980      * rate.</li>
2981      * <li>Since any request may use any or all the currently configured
2982      * output streams, the sensor and ISP must be configured to support
2983      * scaling a single capture to all the streams at the same time.  This
2984      * means the camera pipeline must be ready to produce the largest
2985      * requested output size without any delay.  Therefore, the overall
2986      * frame rate of a given configured stream set is governed only by the
2987      * largest requested stream resolution.</li>
2988      * <li>Using more than one output stream in a request does not affect the
2989      * frame duration.</li>
2990      * <li>Certain format-streams may need to do additional background processing
2991      * before data is consumed/produced by that stream. These processors
2992      * can run concurrently to the rest of the camera pipeline, but
2993      * cannot process more than 1 capture at a time.</li>
2994      * </ul>
2995      * <p>The necessary information for the application, given the model above,
2996      * is provided via
2997      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}.
2998      * These are used to determine the maximum frame rate / minimum frame
2999      * duration that is possible for a given stream configuration.</p>
3000      * <p>Specifically, the application can use the following rules to
3001      * determine the minimum frame duration it can request from the camera
3002      * device:</p>
3003      * <ol>
3004      * <li>Let the set of currently configured input/output streams
3005      * be called <code>S</code>.</li>
3006      * <li>Find the minimum frame durations for each stream in <code>S</code>, by looking
3007      * it up in {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}
3008      * (with its respective size/format). Let this set of frame durations be
3009      * called <code>F</code>.</li>
3010      * <li>For any given request <code>R</code>, the minimum frame duration allowed
3011      * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams
3012      * used in <code>R</code> be called <code>S_r</code>.</li>
3013      * </ol>
3014      * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link
3015      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS}
3016      * using its respective size/format), then the frame duration in <code>F</code>
3017      * determines the steady state frame rate that the application will get
3018      * if it uses <code>R</code> as a repeating request. Let this special kind of
3019      * request be called <code>Rsimple</code>.</p>
3020      * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved
3021      * by a single capture of a new request <code>Rstall</code> (which has at least
3022      * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the
3023      * same minimum frame duration this will not cause a frame rate loss
3024      * if all buffers from the previous <code>Rstall</code> have already been
3025      * delivered.</p>
3026      * <p>For more details about stalling, see
3027      * {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS}.</p>
3028      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
3029      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3030      *
3031      * @see ACAMERA_CONTROL_AE_MODE
3032      * @see ACAMERA_CONTROL_MODE
3033      */
3034     ACAMERA_SENSOR_FRAME_DURATION =                             // int64
3035             ACAMERA_SENSOR_START + 1,
3036     /**
3037      * <p>The amount of gain applied to sensor data
3038      * before processing.</p>
3039      *
3040      * <p>This tag may appear in:</p>
3041      * <ul>
3042      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3043      *   <li>ACaptureRequest</li>
3044      * </ul>
3045      *
3046      * <p>The sensitivity is the standard ISO sensitivity value,
3047      * as defined in ISO 12232:2006.</p>
3048      * <p>The sensitivity must be within ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE, and
3049      * if if it less than ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY, the camera device
3050      * is guaranteed to use only analog amplification for applying the gain.</p>
3051      * <p>If the camera device cannot apply the exact sensitivity
3052      * requested, it will reduce the gain to the nearest supported
3053      * value. The final sensitivity used will be available in the
3054      * output capture result.</p>
3055      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
3056      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3057      *
3058      * @see ACAMERA_CONTROL_AE_MODE
3059      * @see ACAMERA_CONTROL_MODE
3060      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
3061      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
3062      */
3063     ACAMERA_SENSOR_SENSITIVITY =                                // int32
3064             ACAMERA_SENSOR_START + 2,
3065     /**
3066      * <p>The standard reference illuminant used as the scene light source when
3067      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM1,
3068      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
3069      * ACAMERA_SENSOR_FORWARD_MATRIX1 matrices.</p>
3070      *
3071      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
3072      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
3073      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
3074      *
3075      * <p>This tag may appear in:</p>
3076      * <ul>
3077      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3078      * </ul>
3079      *
3080      * <p>The values in this key correspond to the values defined for the
3081      * EXIF LightSource tag. These illuminants are standard light sources
3082      * that are often used calibrating camera devices.</p>
3083      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM1,
3084      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
3085      * ACAMERA_SENSOR_FORWARD_MATRIX1 will also be present.</p>
3086      * <p>Some devices may choose to provide a second set of calibration
3087      * information for improved quality, including
3088      * ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 and its corresponding matrices.</p>
3089      *
3090      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
3091      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
3092      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
3093      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
3094      */
3095     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 =                      // byte (enum)
3096             ACAMERA_SENSOR_START + 3,
3097     /**
3098      * <p>The standard reference illuminant used as the scene light source when
3099      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM2,
3100      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
3101      * ACAMERA_SENSOR_FORWARD_MATRIX2 matrices.</p>
3102      *
3103      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
3104      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
3105      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
3106      *
3107      * <p>This tag may appear in:</p>
3108      * <ul>
3109      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3110      * </ul>
3111      *
3112      * <p>See ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 for more details.</p>
3113      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM2,
3114      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
3115      * ACAMERA_SENSOR_FORWARD_MATRIX2 will also be present.</p>
3116      *
3117      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
3118      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
3119      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
3120      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
3121      */
3122     ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 =                      // byte
3123             ACAMERA_SENSOR_START + 4,
3124     /**
3125      * <p>A per-device calibration transform matrix that maps from the
3126      * reference sensor colorspace to the actual device sensor colorspace.</p>
3127      *
3128      * <p>This tag may appear in:</p>
3129      * <ul>
3130      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3131      * </ul>
3132      *
3133      * <p>This matrix is used to correct for per-device variations in the
3134      * sensor colorspace, and is used for processing raw buffer data.</p>
3135      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3136      * contains a per-device calibration transform that maps colors
3137      * from reference sensor color space (i.e. the "golden module"
3138      * colorspace) into this camera device's native sensor color
3139      * space under the first reference illuminant
3140      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
3141      *
3142      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
3143      */
3144     ACAMERA_SENSOR_CALIBRATION_TRANSFORM1 =                     // rational[3*3]
3145             ACAMERA_SENSOR_START + 5,
3146     /**
3147      * <p>A per-device calibration transform matrix that maps from the
3148      * reference sensor colorspace to the actual device sensor colorspace
3149      * (this is the colorspace of the raw buffer data).</p>
3150      *
3151      * <p>This tag may appear in:</p>
3152      * <ul>
3153      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3154      * </ul>
3155      *
3156      * <p>This matrix is used to correct for per-device variations in the
3157      * sensor colorspace, and is used for processing raw buffer data.</p>
3158      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3159      * contains a per-device calibration transform that maps colors
3160      * from reference sensor color space (i.e. the "golden module"
3161      * colorspace) into this camera device's native sensor color
3162      * space under the second reference illuminant
3163      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
3164      * <p>This matrix will only be present if the second reference
3165      * illuminant is present.</p>
3166      *
3167      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
3168      */
3169     ACAMERA_SENSOR_CALIBRATION_TRANSFORM2 =                     // rational[3*3]
3170             ACAMERA_SENSOR_START + 6,
3171     /**
3172      * <p>A matrix that transforms color values from CIE XYZ color space to
3173      * reference sensor color space.</p>
3174      *
3175      * <p>This tag may appear in:</p>
3176      * <ul>
3177      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3178      * </ul>
3179      *
3180      * <p>This matrix is used to convert from the standard CIE XYZ color
3181      * space to the reference sensor colorspace, and is used when processing
3182      * raw buffer data.</p>
3183      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3184      * contains a color transform matrix that maps colors from the CIE
3185      * XYZ color space to the reference sensor color space (i.e. the
3186      * "golden module" colorspace) under the first reference illuminant
3187      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
3188      * <p>The white points chosen in both the reference sensor color space
3189      * and the CIE XYZ colorspace when calculating this transform will
3190      * match the standard white point for the first reference illuminant
3191      * (i.e. no chromatic adaptation will be applied by this transform).</p>
3192      *
3193      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
3194      */
3195     ACAMERA_SENSOR_COLOR_TRANSFORM1 =                           // rational[3*3]
3196             ACAMERA_SENSOR_START + 7,
3197     /**
3198      * <p>A matrix that transforms color values from CIE XYZ color space to
3199      * reference sensor color space.</p>
3200      *
3201      * <p>This tag may appear in:</p>
3202      * <ul>
3203      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3204      * </ul>
3205      *
3206      * <p>This matrix is used to convert from the standard CIE XYZ color
3207      * space to the reference sensor colorspace, and is used when processing
3208      * raw buffer data.</p>
3209      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3210      * contains a color transform matrix that maps colors from the CIE
3211      * XYZ color space to the reference sensor color space (i.e. the
3212      * "golden module" colorspace) under the second reference illuminant
3213      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
3214      * <p>The white points chosen in both the reference sensor color space
3215      * and the CIE XYZ colorspace when calculating this transform will
3216      * match the standard white point for the second reference illuminant
3217      * (i.e. no chromatic adaptation will be applied by this transform).</p>
3218      * <p>This matrix will only be present if the second reference
3219      * illuminant is present.</p>
3220      *
3221      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
3222      */
3223     ACAMERA_SENSOR_COLOR_TRANSFORM2 =                           // rational[3*3]
3224             ACAMERA_SENSOR_START + 8,
3225     /**
3226      * <p>A matrix that transforms white balanced camera colors from the reference
3227      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
3228      *
3229      * <p>This tag may appear in:</p>
3230      * <ul>
3231      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3232      * </ul>
3233      *
3234      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
3235      * is used when processing raw buffer data.</p>
3236      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
3237      * a color transform matrix that maps white balanced colors from the
3238      * reference sensor color space to the CIE XYZ color space with a D50 white
3239      * point.</p>
3240      * <p>Under the first reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1)
3241      * this matrix is chosen so that the standard white point for this reference
3242      * illuminant in the reference sensor colorspace is mapped to D50 in the
3243      * CIE XYZ colorspace.</p>
3244      *
3245      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
3246      */
3247     ACAMERA_SENSOR_FORWARD_MATRIX1 =                            // rational[3*3]
3248             ACAMERA_SENSOR_START + 9,
3249     /**
3250      * <p>A matrix that transforms white balanced camera colors from the reference
3251      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
3252      *
3253      * <p>This tag may appear in:</p>
3254      * <ul>
3255      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3256      * </ul>
3257      *
3258      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
3259      * is used when processing raw buffer data.</p>
3260      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
3261      * a color transform matrix that maps white balanced colors from the
3262      * reference sensor color space to the CIE XYZ color space with a D50 white
3263      * point.</p>
3264      * <p>Under the second reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2)
3265      * this matrix is chosen so that the standard white point for this reference
3266      * illuminant in the reference sensor colorspace is mapped to D50 in the
3267      * CIE XYZ colorspace.</p>
3268      * <p>This matrix will only be present if the second reference
3269      * illuminant is present.</p>
3270      *
3271      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
3272      */
3273     ACAMERA_SENSOR_FORWARD_MATRIX2 =                            // rational[3*3]
3274             ACAMERA_SENSOR_START + 10,
3275     /**
3276      * <p>A fixed black level offset for each of the color filter arrangement
3277      * (CFA) mosaic channels.</p>
3278      *
3279      * <p>This tag may appear in:</p>
3280      * <ul>
3281      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3282      * </ul>
3283      *
3284      * <p>This key specifies the zero light value for each of the CFA mosaic
3285      * channels in the camera sensor.  The maximal value output by the
3286      * sensor is represented by the value in ACAMERA_SENSOR_INFO_WHITE_LEVEL.</p>
3287      * <p>The values are given in the same order as channels listed for the CFA
3288      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
3289      * nth value given corresponds to the black level offset for the nth
3290      * color channel listed in the CFA.</p>
3291      * <p>The black level values of captured images may vary for different
3292      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
3293      * represents a coarse approximation for such case. It is recommended to
3294      * use ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL or use pixels from
3295      * ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS directly for captures when
3296      * supported by the camera device, which provides more accurate black
3297      * level values. For raw capture in particular, it is recommended to use
3298      * pixels from ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS to calculate black
3299      * level values for each frame.</p>
3300      *
3301      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
3302      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3303      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
3304      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
3305      * @see ACAMERA_SENSOR_SENSITIVITY
3306      */
3307     ACAMERA_SENSOR_BLACK_LEVEL_PATTERN =                        // int32[4]
3308             ACAMERA_SENSOR_START + 12,
3309     /**
3310      * <p>Maximum sensitivity that is implemented
3311      * purely through analog gain.</p>
3312      *
3313      * <p>This tag may appear in:</p>
3314      * <ul>
3315      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3316      * </ul>
3317      *
3318      * <p>For ACAMERA_SENSOR_SENSITIVITY values less than or
3319      * equal to this, all applied gain must be analog. For
3320      * values above this, the gain applied can be a mix of analog and
3321      * digital.</p>
3322      *
3323      * @see ACAMERA_SENSOR_SENSITIVITY
3324      */
3325     ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY =                     // int32
3326             ACAMERA_SENSOR_START + 13,
3327     /**
3328      * <p>Clockwise angle through which the output image needs to be rotated to be
3329      * upright on the device screen in its native orientation.</p>
3330      *
3331      * <p>This tag may appear in:</p>
3332      * <ul>
3333      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3334      * </ul>
3335      *
3336      * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
3337      * the sensor's coordinate system.</p>
3338      */
3339     ACAMERA_SENSOR_ORIENTATION =                                // int32
3340             ACAMERA_SENSOR_START + 14,
3341     /**
3342      * <p>Time at start of exposure of first
3343      * row of the image sensor active array, in nanoseconds.</p>
3344      *
3345      * <p>This tag may appear in:</p>
3346      * <ul>
3347      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3348      * </ul>
3349      *
3350      * <p>The timestamps are also included in all image
3351      * buffers produced for the same capture, and will be identical
3352      * on all the outputs.</p>
3353      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> UNKNOWN,
3354      * the timestamps measure time since an unspecified starting point,
3355      * and are monotonically increasing. They can be compared with the
3356      * timestamps for other captures from the same camera device, but are
3357      * not guaranteed to be comparable to any other time source.</p>
3358      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME, the
3359      * timestamps measure time in the same timebase as
3360      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">elapsedRealtimeNanos</a>
3361      * (or CLOCK_BOOTTIME), and they can
3362      * be compared to other timestamps from other subsystems that
3363      * are using that base.</p>
3364      * <p>For reprocessing, the timestamp will match the start of exposure of
3365      * the input image, i.e. {@link CaptureResult#SENSOR_TIMESTAMP the
3366      * timestamp} in the TotalCaptureResult that was used to create the
3367      * reprocess capture request.</p>
3368      *
3369      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
3370      */
3371     ACAMERA_SENSOR_TIMESTAMP =                                  // int64
3372             ACAMERA_SENSOR_START + 16,
3373     /**
3374      * <p>The estimated camera neutral color in the native sensor colorspace at
3375      * the time of capture.</p>
3376      *
3377      * <p>This tag may appear in:</p>
3378      * <ul>
3379      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3380      * </ul>
3381      *
3382      * <p>This value gives the neutral color point encoded as an RGB value in the
3383      * native sensor color space.  The neutral color point indicates the
3384      * currently estimated white point of the scene illumination.  It can be
3385      * used to interpolate between the provided color transforms when
3386      * processing raw sensor data.</p>
3387      * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
3388      */
3389     ACAMERA_SENSOR_NEUTRAL_COLOR_POINT =                        // rational[3]
3390             ACAMERA_SENSOR_START + 18,
3391     /**
3392      * <p>Noise model coefficients for each CFA mosaic channel.</p>
3393      *
3394      * <p>This tag may appear in:</p>
3395      * <ul>
3396      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3397      * </ul>
3398      *
3399      * <p>This key contains two noise model coefficients for each CFA channel
3400      * corresponding to the sensor amplification (S) and sensor readout
3401      * noise (O).  These are given as pairs of coefficients for each channel
3402      * in the same order as channels listed for the CFA layout key
3403      * (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT).  This is
3404      * represented as an array of Pair&lt;Double, Double&gt;, where
3405      * the first member of the Pair at index n is the S coefficient and the
3406      * second member is the O coefficient for the nth color channel in the CFA.</p>
3407      * <p>These coefficients are used in a two parameter noise model to describe
3408      * the amount of noise present in the image for each CFA channel.  The
3409      * noise model used here is:</p>
3410      * <p>N(x) = sqrt(Sx + O)</p>
3411      * <p>Where x represents the recorded signal of a CFA channel normalized to
3412      * the range [0, 1], and S and O are the noise model coeffiecients for
3413      * that channel.</p>
3414      * <p>A more detailed description of the noise model can be found in the
3415      * Adobe DNG specification for the NoiseProfile tag.</p>
3416      *
3417      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3418      */
3419     ACAMERA_SENSOR_NOISE_PROFILE =                              // double[2*CFA Channels]
3420             ACAMERA_SENSOR_START + 19,
3421     /**
3422      * <p>The worst-case divergence between Bayer green channels.</p>
3423      *
3424      * <p>This tag may appear in:</p>
3425      * <ul>
3426      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3427      * </ul>
3428      *
3429      * <p>This value is an estimate of the worst case split between the
3430      * Bayer green channels in the red and blue rows in the sensor color
3431      * filter array.</p>
3432      * <p>The green split is calculated as follows:</p>
3433      * <ol>
3434      * <li>A 5x5 pixel (or larger) window W within the active sensor array is
3435      * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
3436      * mosaic channels (R, Gr, Gb, B).  The location and size of the window
3437      * chosen is implementation defined, and should be chosen to provide a
3438      * green split estimate that is both representative of the entire image
3439      * for this camera sensor, and can be calculated quickly.</li>
3440      * <li>The arithmetic mean of the green channels from the red
3441      * rows (mean_Gr) within W is computed.</li>
3442      * <li>The arithmetic mean of the green channels from the blue
3443      * rows (mean_Gb) within W is computed.</li>
3444      * <li>The maximum ratio R of the two means is computed as follows:
3445      * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
3446      * </ol>
3447      * <p>The ratio R is the green split divergence reported for this property,
3448      * which represents how much the green channels differ in the mosaic
3449      * pattern.  This value is typically used to determine the treatment of
3450      * the green mosaic channels when demosaicing.</p>
3451      * <p>The green split value can be roughly interpreted as follows:</p>
3452      * <ul>
3453      * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
3454      * <li>1.20 &lt;= R &gt;= 1.03 will require some software
3455      * correction to avoid demosaic errors (3-20% divergence).</li>
3456      * <li>R &gt; 1.20 will require strong software correction to produce
3457      * a usuable image (&gt;20% divergence).</li>
3458      * </ul>
3459      */
3460     ACAMERA_SENSOR_GREEN_SPLIT =                                // float
3461             ACAMERA_SENSOR_START + 22,
3462     /**
3463      * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
3464      * when ACAMERA_SENSOR_TEST_PATTERN_MODE is SOLID_COLOR.</p>
3465      *
3466      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
3467      *
3468      * <p>This tag may appear in:</p>
3469      * <ul>
3470      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3471      *   <li>ACaptureRequest</li>
3472      * </ul>
3473      *
3474      * <p>Each color channel is treated as an unsigned 32-bit integer.
3475      * The camera device then uses the most significant X bits
3476      * that correspond to how many bits are in its Bayer raw sensor
3477      * output.</p>
3478      * <p>For example, a sensor with RAW10 Bayer output would use the
3479      * 10 most significant bits from each color channel.</p>
3480      */
3481     ACAMERA_SENSOR_TEST_PATTERN_DATA =                          // int32[4]
3482             ACAMERA_SENSOR_START + 23,
3483     /**
3484      * <p>When enabled, the sensor sends a test pattern instead of
3485      * doing a real exposure from the camera.</p>
3486      *
3487      * <p>This tag may appear in:</p>
3488      * <ul>
3489      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3490      *   <li>ACaptureRequest</li>
3491      * </ul>
3492      *
3493      * <p>When a test pattern is enabled, all manual sensor controls specified
3494      * by ACAMERA_SENSOR_* will be ignored. All other controls should
3495      * work as normal.</p>
3496      * <p>For example, if manual flash is enabled, flash firing should still
3497      * occur (and that the test pattern remain unmodified, since the flash
3498      * would not actually affect it).</p>
3499      * <p>Defaults to OFF.</p>
3500      */
3501     ACAMERA_SENSOR_TEST_PATTERN_MODE =                          // int32 (enum)
3502             ACAMERA_SENSOR_START + 24,
3503     /**
3504      * <p>List of sensor test pattern modes for ACAMERA_SENSOR_TEST_PATTERN_MODE
3505      * supported by this camera device.</p>
3506      *
3507      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
3508      *
3509      * <p>This tag may appear in:</p>
3510      * <ul>
3511      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3512      * </ul>
3513      *
3514      * <p>Defaults to OFF, and always includes OFF if defined.</p>
3515      */
3516     ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES =               // int32[n]
3517             ACAMERA_SENSOR_START + 25,
3518     /**
3519      * <p>Duration between the start of first row exposure
3520      * and the start of last row exposure.</p>
3521      *
3522      * <p>This tag may appear in:</p>
3523      * <ul>
3524      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3525      * </ul>
3526      *
3527      * <p>This is the exposure time skew between the first and last
3528      * row exposure start times. The first row and the last row are
3529      * the first and last rows inside of the
3530      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
3531      * <p>For typical camera sensors that use rolling shutters, this is also equivalent
3532      * to the frame readout time.</p>
3533      *
3534      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3535      */
3536     ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW =                       // int64
3537             ACAMERA_SENSOR_START + 26,
3538     /**
3539      * <p>List of disjoint rectangles indicating the sensor
3540      * optically shielded black pixel regions.</p>
3541      *
3542      * <p>This tag may appear in:</p>
3543      * <ul>
3544      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3545      * </ul>
3546      *
3547      * <p>In most camera sensors, the active array is surrounded by some
3548      * optically shielded pixel areas. By blocking light, these pixels
3549      * provides a reliable black reference for black level compensation
3550      * in active array region.</p>
3551      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
3552      * <p>This key provides a list of disjoint rectangles specifying the
3553      * regions of optically shielded (with metal shield) black pixel
3554      * regions if the camera device is capable of reading out these black
3555      * pixels in the output raw images. In comparison to the fixed black
3556      * level values reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN, this key
3557      * may provide a more accurate way for the application to calculate
3558      * black level of each captured raw images.</p>
3559      * <p>When this key is reported, the ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL and
3560      * ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL will also be reported.</p>
3561      *
3562      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
3563      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
3564      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
3565      */
3566     ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS =                      // int32[4*num_regions]
3567             ACAMERA_SENSOR_START + 27,
3568     /**
3569      * <p>A per-frame dynamic black level offset for each of the color filter
3570      * arrangement (CFA) mosaic channels.</p>
3571      *
3572      * <p>This tag may appear in:</p>
3573      * <ul>
3574      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3575      * </ul>
3576      *
3577      * <p>Camera sensor black levels may vary dramatically for different
3578      * capture settings (e.g. ACAMERA_SENSOR_SENSITIVITY). The fixed black
3579      * level reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may be too
3580      * inaccurate to represent the actual value on a per-frame basis. The
3581      * camera device internal pipeline relies on reliable black level values
3582      * to process the raw images appropriately. To get the best image
3583      * quality, the camera device may choose to estimate the per frame black
3584      * level values either based on optically shielded black regions
3585      * (ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS) or its internal model.</p>
3586      * <p>This key reports the camera device estimated per-frame zero light
3587      * value for each of the CFA mosaic channels in the camera sensor. The
3588      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may only represent a coarse
3589      * approximation of the actual black level values. This value is the
3590      * black level used in camera device internal image processing pipeline
3591      * and generally more accurate than the fixed black level values.
3592      * However, since they are estimated values by the camera device, they
3593      * may not be as accurate as the black level values calculated from the
3594      * optical black pixels reported by ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS.</p>
3595      * <p>The values are given in the same order as channels listed for the CFA
3596      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
3597      * nth value given corresponds to the black level offset for the nth
3598      * color channel listed in the CFA.</p>
3599      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is
3600      * available or the camera device advertises this key via
3601      * {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.</p>
3602      *
3603      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
3604      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
3605      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
3606      * @see ACAMERA_SENSOR_SENSITIVITY
3607      */
3608     ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL =                        // float[4]
3609             ACAMERA_SENSOR_START + 28,
3610     /**
3611      * <p>Maximum raw value output by sensor for this frame.</p>
3612      *
3613      * <p>This tag may appear in:</p>
3614      * <ul>
3615      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3616      * </ul>
3617      *
3618      * <p>Since the ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may change for different
3619      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY), the white
3620      * level will change accordingly. This key is similar to
3621      * ACAMERA_SENSOR_INFO_WHITE_LEVEL, but specifies the camera device
3622      * estimated white level for each frame.</p>
3623      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is
3624      * available or the camera device advertises this key via
3625      * {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.</p>
3626      *
3627      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
3628      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
3629      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
3630      * @see ACAMERA_SENSOR_SENSITIVITY
3631      */
3632     ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL =                        // int32
3633             ACAMERA_SENSOR_START + 29,
3634     ACAMERA_SENSOR_END,
3635 
3636     /**
3637      * <p>The area of the image sensor which corresponds to active pixels after any geometric
3638      * distortion correction has been applied.</p>
3639      *
3640      * <p>This tag may appear in:</p>
3641      * <ul>
3642      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3643      * </ul>
3644      *
3645      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
3646      * the region that actually receives light from the scene) after any geometric correction
3647      * has been applied, and should be treated as the maximum size in pixels of any of the
3648      * image output formats aside from the raw formats.</p>
3649      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
3650      * the full pixel array, and the size of the full pixel array is given by
3651      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
3652      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
3653      * <p>The coordinate system for most other keys that list pixel coordinates, including
3654      * ACAMERA_SCALER_CROP_REGION, is defined relative to the active array rectangle given in
3655      * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
3656      * <p>The active array may be smaller than the full pixel array, since the full array may
3657      * include black calibration pixels or other inactive regions, and geometric correction
3658      * resulting in scaling or cropping may have been applied.</p>
3659      *
3660      * @see ACAMERA_SCALER_CROP_REGION
3661      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
3662      */
3663     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE =                     // int32[4]
3664             ACAMERA_SENSOR_INFO_START,
3665     /**
3666      * <p>Range of sensitivities for ACAMERA_SENSOR_SENSITIVITY supported by this
3667      * camera device.</p>
3668      *
3669      * @see ACAMERA_SENSOR_SENSITIVITY
3670      *
3671      * <p>This tag may appear in:</p>
3672      * <ul>
3673      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3674      * </ul>
3675      *
3676      * <p>The values are the standard ISO sensitivity values,
3677      * as defined in ISO 12232:2006.</p>
3678      */
3679     ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE =                     // int32[2]
3680             ACAMERA_SENSOR_INFO_START + 1,
3681     /**
3682      * <p>The arrangement of color filters on sensor;
3683      * represents the colors in the top-left 2x2 section of
3684      * the sensor, in reading order.</p>
3685      *
3686      * <p>This tag may appear in:</p>
3687      * <ul>
3688      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3689      * </ul>
3690      *
3691      * <p>None</p>
3692      */
3693     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =              // byte (enum)
3694             ACAMERA_SENSOR_INFO_START + 2,
3695     /**
3696      * <p>The range of image exposure times for ACAMERA_SENSOR_EXPOSURE_TIME supported
3697      * by this camera device.</p>
3698      *
3699      * @see ACAMERA_SENSOR_EXPOSURE_TIME
3700      *
3701      * <p>This tag may appear in:</p>
3702      * <ul>
3703      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3704      * </ul>
3705      *
3706      * <p>None</p>
3707      */
3708     ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE =                   // int64[2]
3709             ACAMERA_SENSOR_INFO_START + 3,
3710     /**
3711      * <p>The maximum possible frame duration (minimum frame rate) for
3712      * ACAMERA_SENSOR_FRAME_DURATION that is supported this camera device.</p>
3713      *
3714      * @see ACAMERA_SENSOR_FRAME_DURATION
3715      *
3716      * <p>This tag may appear in:</p>
3717      * <ul>
3718      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3719      * </ul>
3720      *
3721      * <p>Attempting to use frame durations beyond the maximum will result in the frame
3722      * duration being clipped to the maximum. See that control for a full definition of frame
3723      * durations.</p>
3724      * <p>Refer to {@link
3725      * ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}
3726      * for the minimum frame duration values.</p>
3727      */
3728     ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION =                    // int64
3729             ACAMERA_SENSOR_INFO_START + 4,
3730     /**
3731      * <p>The physical dimensions of the full pixel
3732      * array.</p>
3733      *
3734      * <p>This tag may appear in:</p>
3735      * <ul>
3736      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3737      * </ul>
3738      *
3739      * <p>This is the physical size of the sensor pixel
3740      * array defined by ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
3741      *
3742      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
3743      */
3744     ACAMERA_SENSOR_INFO_PHYSICAL_SIZE =                         // float[2]
3745             ACAMERA_SENSOR_INFO_START + 5,
3746     /**
3747      * <p>Dimensions of the full pixel array, possibly
3748      * including black calibration pixels.</p>
3749      *
3750      * <p>This tag may appear in:</p>
3751      * <ul>
3752      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3753      * </ul>
3754      *
3755      * <p>The pixel count of the full pixel array of the image sensor, which covers
3756      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area.  This represents the full pixel dimensions of
3757      * the raw buffers produced by this sensor.</p>
3758      * <p>If a camera device supports raw sensor formats, either this or
3759      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is the maximum dimensions for the raw
3760      * output formats listed in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS (this depends on
3761      * whether or not the image sensor returns buffers containing pixels that are not
3762      * part of the active array region for blacklevel calibration or other purposes).</p>
3763      * <p>Some parts of the full pixel array may not receive light from the scene,
3764      * or be otherwise inactive.  The ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE key
3765      * defines the rectangle of active pixels that will be included in processed image
3766      * formats.</p>
3767      *
3768      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
3769      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3770      */
3771     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE =                      // int32[2]
3772             ACAMERA_SENSOR_INFO_START + 6,
3773     /**
3774      * <p>Maximum raw value output by sensor.</p>
3775      *
3776      * <p>This tag may appear in:</p>
3777      * <ul>
3778      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3779      * </ul>
3780      *
3781      * <p>This specifies the fully-saturated encoding level for the raw
3782      * sample values from the sensor.  This is typically caused by the
3783      * sensor becoming highly non-linear or clipping. The minimum for
3784      * each channel is specified by the offset in the
3785      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN key.</p>
3786      * <p>The white level is typically determined either by sensor bit depth
3787      * (8-14 bits is expected), or by the point where the sensor response
3788      * becomes too non-linear to be useful.  The default value for this is
3789      * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
3790      * <p>The white level values of captured images may vary for different
3791      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
3792      * represents a coarse approximation for such case. It is recommended
3793      * to use ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL for captures when supported
3794      * by the camera device, which provides more accurate white level values.</p>
3795      *
3796      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
3797      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
3798      * @see ACAMERA_SENSOR_SENSITIVITY
3799      */
3800     ACAMERA_SENSOR_INFO_WHITE_LEVEL =                           // int32
3801             ACAMERA_SENSOR_INFO_START + 7,
3802     /**
3803      * <p>The time base source for sensor capture start timestamps.</p>
3804      *
3805      * <p>This tag may appear in:</p>
3806      * <ul>
3807      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3808      * </ul>
3809      *
3810      * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
3811      * may not based on a time source that can be compared to other system time sources.</p>
3812      * <p>This characteristic defines the source for the timestamps, and therefore whether they
3813      * can be compared against other system time sources/timestamps.</p>
3814      */
3815     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE =                      // byte (enum)
3816             ACAMERA_SENSOR_INFO_START + 8,
3817     /**
3818      * <p>Whether the RAW images output from this camera device are subject to
3819      * lens shading correction.</p>
3820      *
3821      * <p>This tag may appear in:</p>
3822      * <ul>
3823      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3824      * </ul>
3825      *
3826      * <p>If TRUE, all images produced by the camera device in the RAW image formats will
3827      * have lens shading correction already applied to it. If FALSE, the images will
3828      * not be adjusted for lens shading correction.
3829      * See android.request.maxNumOutputRaw for a list of RAW image formats.</p>
3830      * <p>This key will be <code>null</code> for all devices do not report this information.
3831      * Devices with RAW capability will always report this information in this key.</p>
3832      */
3833     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED =                  // byte (enum)
3834             ACAMERA_SENSOR_INFO_START + 9,
3835     /**
3836      * <p>The area of the image sensor which corresponds to active pixels prior to the
3837      * application of any geometric distortion correction.</p>
3838      *
3839      * <p>This tag may appear in:</p>
3840      * <ul>
3841      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3842      * </ul>
3843      *
3844      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
3845      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
3846      * the region that actually receives light from the scene) before any geometric correction
3847      * has been applied, and should be treated as the active region rectangle for any of the
3848      * raw formats.  All metadata associated with raw processing (e.g. the lens shading
3849      * correction map, and radial distortion fields) treats the top, left of this rectangle as
3850      * the origin, (0,0).</p>
3851      * <p>The size of this region determines the maximum field of view and the maximum number of
3852      * pixels that an image from this sensor can contain, prior to the application of
3853      * geometric distortion correction. The effective maximum pixel dimensions of a
3854      * post-distortion-corrected image is given by the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3855      * field, and the effective maximum field of view for a post-distortion-corrected image
3856      * can be calculated by applying the geometric distortion correction fields to this
3857      * rectangle, and cropping to the rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
3858      * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
3859      * dimensions in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE given the position of a pixel,
3860      * (x', y'), in the raw pixel array with dimensions give in
3861      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE:</p>
3862      * <ol>
3863      * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
3864      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, otherwise this pixel is considered
3865      * to be outside of the FOV, and will not be shown in the processed output image.</li>
3866      * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
3867      * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
3868      * buffers is defined relative to the top, left of the
3869      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE rectangle.</li>
3870      * <li>If the resulting corrected pixel coordinate is within the region given in
3871      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, then the position of this pixel in the
3872      * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
3873      * when the top, left coordinate of that buffer is treated as (0, 0).</li>
3874      * </ol>
3875      * <p>Thus, for pixel x',y' = (25, 25) on a sensor where ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
3876      * is (100,100), ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is (10, 10, 100, 100),
3877      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE is (20, 20, 80, 80), and the geometric distortion
3878      * correction doesn't change the pixel coordinate, the resulting pixel selected in
3879      * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
3880      * with dimensions given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, and would be (5, 5)
3881      * relative to the top,left of post-processed YUV output buffer with dimensions given in
3882      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
3883      * <p>The currently supported fields that correct for geometric distortion are:</p>
3884      * <ol>
3885      * <li>ACAMERA_LENS_RADIAL_DISTORTION.</li>
3886      * </ol>
3887      * <p>If all of the geometric distortion fields are no-ops, this rectangle will be the same
3888      * as the post-distortion-corrected rectangle given in
3889      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
3890      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
3891      * the full pixel array, and the size of the full pixel array is given by
3892      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
3893      * <p>The pre-correction active array may be smaller than the full pixel array, since the
3894      * full array may include black calibration pixels or other inactive regions.</p>
3895      *
3896      * @see ACAMERA_LENS_RADIAL_DISTORTION
3897      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3898      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
3899      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3900      */
3901     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =      // int32[4]
3902             ACAMERA_SENSOR_INFO_START + 10,
3903     ACAMERA_SENSOR_INFO_END,
3904 
3905     /**
3906      * <p>Quality of lens shading correction applied
3907      * to the image data.</p>
3908      *
3909      * <p>This tag may appear in:</p>
3910      * <ul>
3911      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3912      *   <li>ACaptureRequest</li>
3913      * </ul>
3914      *
3915      * <p>When set to OFF mode, no lens shading correction will be applied by the
3916      * camera device, and an identity lens shading map data will be provided
3917      * if <code>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON</code>. For example, for lens
3918      * shading map with size of <code>[ 4, 3 ]</code>,
3919      * the output android.statistics.lensShadingCorrectionMap for this case will be an identity
3920      * map shown below:</p>
3921      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
3922      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
3923      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
3924      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
3925      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
3926      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
3927      * </code></pre>
3928      * <p>When set to other modes, lens shading correction will be applied by the camera
3929      * device. Applications can request lens shading map data by setting
3930      * ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE to ON, and then the camera device will provide lens
3931      * shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
3932      * data will be the one applied by the camera device for this capture request.</p>
3933      * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
3934      * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
3935      * AWB are in AUTO modes(ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF and ACAMERA_CONTROL_AWB_MODE <code>!=</code>
3936      * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
3937      * to be converged before using the returned shading map data.</p>
3938      *
3939      * @see ACAMERA_CONTROL_AE_MODE
3940      * @see ACAMERA_CONTROL_AWB_MODE
3941      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
3942      */
3943     ACAMERA_SHADING_MODE =                                      // byte (enum)
3944             ACAMERA_SHADING_START,
3945     /**
3946      * <p>List of lens shading modes for ACAMERA_SHADING_MODE that are supported by this camera device.</p>
3947      *
3948      * @see ACAMERA_SHADING_MODE
3949      *
3950      * <p>This tag may appear in:</p>
3951      * <ul>
3952      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3953      * </ul>
3954      *
3955      * <p>This list contains lens shading modes that can be set for the camera device.
3956      * Camera devices that support the MANUAL_POST_PROCESSING capability will always
3957      * list OFF and FAST mode. This includes all FULL level devices.
3958      * LEGACY devices will always only support FAST mode.</p>
3959      */
3960     ACAMERA_SHADING_AVAILABLE_MODES =                           // byte[n]
3961             ACAMERA_SHADING_START + 2,
3962     ACAMERA_SHADING_END,
3963 
3964     /**
3965      * <p>Operating mode for the face detector
3966      * unit.</p>
3967      *
3968      * <p>This tag may appear in:</p>
3969      * <ul>
3970      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3971      *   <li>ACaptureRequest</li>
3972      * </ul>
3973      *
3974      * <p>Whether face detection is enabled, and whether it
3975      * should output just the basic fields or the full set of
3976      * fields.</p>
3977      */
3978     ACAMERA_STATISTICS_FACE_DETECT_MODE =                       // byte (enum)
3979             ACAMERA_STATISTICS_START,
3980     /**
3981      * <p>Operating mode for hot pixel map generation.</p>
3982      *
3983      * <p>This tag may appear in:</p>
3984      * <ul>
3985      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3986      *   <li>ACaptureRequest</li>
3987      * </ul>
3988      *
3989      * <p>If set to <code>true</code>, a hot pixel map is returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.
3990      * If set to <code>false</code>, no hot pixel map will be returned.</p>
3991      *
3992      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
3993      */
3994     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE =                     // byte (enum)
3995             ACAMERA_STATISTICS_START + 3,
3996     /**
3997      * <p>List of unique IDs for detected faces.</p>
3998      *
3999      * <p>This tag may appear in:</p>
4000      * <ul>
4001      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4002      * </ul>
4003      *
4004      * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
4005      * to the camera device.  A face that leaves the field of view and later returns may be
4006      * assigned a new ID.</p>
4007      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL</p>
4008      *
4009      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4010      */
4011     ACAMERA_STATISTICS_FACE_IDS =                               // int32[n]
4012             ACAMERA_STATISTICS_START + 4,
4013     /**
4014      * <p>List of landmarks for detected
4015      * faces.</p>
4016      *
4017      * <p>This tag may appear in:</p>
4018      * <ul>
4019      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4020      * </ul>
4021      *
4022      * <p>The coordinate system is that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
4023      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
4024      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL</p>
4025      *
4026      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4027      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4028      */
4029     ACAMERA_STATISTICS_FACE_LANDMARKS =                         // int32[n*6]
4030             ACAMERA_STATISTICS_START + 5,
4031     /**
4032      * <p>List of the bounding rectangles for detected
4033      * faces.</p>
4034      *
4035      * <p>This tag may appear in:</p>
4036      * <ul>
4037      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4038      * </ul>
4039      *
4040      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
4041      * <p>The coordinate system is that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
4042      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
4043      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF</p>
4044      *
4045      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4046      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4047      */
4048     ACAMERA_STATISTICS_FACE_RECTANGLES =                        // int32[n*4]
4049             ACAMERA_STATISTICS_START + 6,
4050     /**
4051      * <p>List of the face confidence scores for
4052      * detected faces</p>
4053      *
4054      * <p>This tag may appear in:</p>
4055      * <ul>
4056      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4057      * </ul>
4058      *
4059      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
4060      *
4061      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4062      */
4063     ACAMERA_STATISTICS_FACE_SCORES =                            // byte[n]
4064             ACAMERA_STATISTICS_START + 7,
4065     /**
4066      * <p>The shading map is a low-resolution floating-point map
4067      * that lists the coefficients used to correct for vignetting and color shading,
4068      * for each Bayer color channel of RAW image data.</p>
4069      *
4070      * <p>This tag may appear in:</p>
4071      * <ul>
4072      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4073      * </ul>
4074      *
4075      * <p>The map provided here is the same map that is used by the camera device to
4076      * correct both color shading and vignetting for output non-RAW images.</p>
4077      * <p>When there is no lens shading correction applied to RAW
4078      * output images (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED <code>==</code>
4079      * false), this map is the complete lens shading correction
4080      * map; when there is some lens shading correction applied to
4081      * the RAW output image (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED<code>==</code> true), this map reports the remaining lens shading
4082      * correction map that needs to be applied to get shading
4083      * corrected images that match the camera device's output for
4084      * non-RAW formats.</p>
4085      * <p>For a complete shading correction map, the least shaded
4086      * section of the image will have a gain factor of 1; all
4087      * other sections will have gains above 1.</p>
4088      * <p>When ACAMERA_COLOR_CORRECTION_MODE = TRANSFORM_MATRIX, the map
4089      * will take into account the colorCorrection settings.</p>
4090      * <p>The shading map is for the entire active pixel array, and is not
4091      * affected by the crop region specified in the request. Each shading map
4092      * entry is the value of the shading compensation map over a specific
4093      * pixel on the sensor.  Specifically, with a (N x M) resolution shading
4094      * map, and an active pixel array size (W x H), shading map entry
4095      * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
4096      * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
4097      * The map is assumed to be bilinearly interpolated between the sample points.</p>
4098      * <p>The channel order is [R, Geven, Godd, B], where Geven is the green
4099      * channel for the even rows of a Bayer pattern, and Godd is the odd rows.
4100      * The shading map is stored in a fully interleaved format, and its size
4101      * is provided in the camera static metadata by ACAMERA_LENS_INFO_SHADING_MAP_SIZE.</p>
4102      * <p>The shading map will generally have on the order of 30-40 rows and columns,
4103      * and will be smaller than 64x64.</p>
4104      * <p>As an example, given a very small map defined as:</p>
4105      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
4106      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
4107      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
4108      *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
4109      *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
4110      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
4111      *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
4112      *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
4113      * </code></pre>
4114      * <p>The low-resolution scaling map images for each channel are
4115      * (displayed using nearest-neighbor interpolation):</p>
4116      * <p><img alt="Red lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
4117      * <img alt="Green (even rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
4118      * <img alt="Green (odd rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
4119      * <img alt="Blue lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
4120      * <p>As a visualization only, inverting the full-color map to recover an
4121      * image of a gray wall (using bicubic interpolation for visual quality)
4122      * as captured by the sensor gives:</p>
4123      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
4124      * <p>Note that the RAW image data might be subject to lens shading
4125      * correction not reported on this map. Query
4126      * ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED to see if RAW image data has subject
4127      * to lens shading correction. If ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
4128      * is TRUE, the RAW image data is subject to partial or full lens shading
4129      * correction. In the case full lens shading correction is applied to RAW
4130      * images, the gain factor map reported in this key will contain all 1.0 gains.
4131      * In other words, the map reported in this key is the remaining lens shading
4132      * that needs to be applied on the RAW image to get images without lens shading
4133      * artifacts. See android.request.maxNumOutputRaw for a list of RAW image
4134      * formats.</p>
4135      *
4136      * @see ACAMERA_COLOR_CORRECTION_MODE
4137      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
4138      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
4139      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
4140      */
4141     ACAMERA_STATISTICS_LENS_SHADING_MAP =                       // float[4*n*m]
4142             ACAMERA_STATISTICS_START + 11,
4143     /**
4144      * <p>The camera device estimated scene illumination lighting
4145      * frequency.</p>
4146      *
4147      * <p>This tag may appear in:</p>
4148      * <ul>
4149      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4150      * </ul>
4151      *
4152      * <p>Many light sources, such as most fluorescent lights, flicker at a rate
4153      * that depends on the local utility power standards. This flicker must be
4154      * accounted for by auto-exposure routines to avoid artifacts in captured images.
4155      * The camera device uses this entry to tell the application what the scene
4156      * illuminant frequency is.</p>
4157      * <p>When manual exposure control is enabled
4158      * (<code>ACAMERA_CONTROL_AE_MODE == OFF</code> or <code>ACAMERA_CONTROL_MODE ==
4159      * OFF</code>), the ACAMERA_CONTROL_AE_ANTIBANDING_MODE doesn't perform
4160      * antibanding, and the application can ensure it selects
4161      * exposure times that do not cause banding issues by looking
4162      * into this metadata field. See
4163      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE for more details.</p>
4164      * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
4165      *
4166      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
4167      * @see ACAMERA_CONTROL_AE_MODE
4168      * @see ACAMERA_CONTROL_MODE
4169      */
4170     ACAMERA_STATISTICS_SCENE_FLICKER =                          // byte (enum)
4171             ACAMERA_STATISTICS_START + 14,
4172     /**
4173      * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
4174      *
4175      * <p>This tag may appear in:</p>
4176      * <ul>
4177      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4178      * </ul>
4179      *
4180      * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
4181      * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
4182      * bottom-right of the pixel array, respectively. The width and
4183      * height dimensions are given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.
4184      * This may include hot pixels that lie outside of the active array
4185      * bounds given by ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4186      *
4187      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4188      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
4189      */
4190     ACAMERA_STATISTICS_HOT_PIXEL_MAP =                          // int32[2*n]
4191             ACAMERA_STATISTICS_START + 15,
4192     /**
4193      * <p>Whether the camera device will output the lens
4194      * shading map in output result metadata.</p>
4195      *
4196      * <p>This tag may appear in:</p>
4197      * <ul>
4198      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4199      *   <li>ACaptureRequest</li>
4200      * </ul>
4201      *
4202      * <p>When set to ON,
4203      * ACAMERA_STATISTICS_LENS_SHADING_MAP will be provided in
4204      * the output result metadata.</p>
4205      * <p>ON is always supported on devices with the RAW capability.</p>
4206      *
4207      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
4208      */
4209     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE =                  // byte (enum)
4210             ACAMERA_STATISTICS_START + 16,
4211     ACAMERA_STATISTICS_END,
4212 
4213     /**
4214      * <p>List of face detection modes for ACAMERA_STATISTICS_FACE_DETECT_MODE that are
4215      * supported by this camera device.</p>
4216      *
4217      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4218      *
4219      * <p>This tag may appear in:</p>
4220      * <ul>
4221      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4222      * </ul>
4223      *
4224      * <p>OFF is always supported.</p>
4225      */
4226     ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =       // byte[n]
4227             ACAMERA_STATISTICS_INFO_START,
4228     /**
4229      * <p>The maximum number of simultaneously detectable
4230      * faces.</p>
4231      *
4232      * <p>This tag may appear in:</p>
4233      * <ul>
4234      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4235      * </ul>
4236      *
4237      * <p>None</p>
4238      */
4239     ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT =                    // int32
4240             ACAMERA_STATISTICS_INFO_START + 2,
4241     /**
4242      * <p>List of hot pixel map output modes for ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE that are
4243      * supported by this camera device.</p>
4244      *
4245      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
4246      *
4247      * <p>This tag may appear in:</p>
4248      * <ul>
4249      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4250      * </ul>
4251      *
4252      * <p>If no hotpixel map output is available for this camera device, this will contain only
4253      * <code>false</code>.</p>
4254      * <p>ON is always supported on devices with the RAW capability.</p>
4255      */
4256     ACAMERA_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =     // byte[n]
4257             ACAMERA_STATISTICS_INFO_START + 6,
4258     /**
4259      * <p>List of lens shading map output modes for ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE that
4260      * are supported by this camera device.</p>
4261      *
4262      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
4263      *
4264      * <p>This tag may appear in:</p>
4265      * <ul>
4266      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4267      * </ul>
4268      *
4269      * <p>If no lens shading map output is available for this camera device, this key will
4270      * contain only OFF.</p>
4271      * <p>ON is always supported on devices with the RAW capability.
4272      * LEGACY mode devices will always only support OFF.</p>
4273      */
4274     ACAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =  // byte[n]
4275             ACAMERA_STATISTICS_INFO_START + 7,
4276     ACAMERA_STATISTICS_INFO_END,
4277 
4278     /**
4279      * <p>Tonemapping / contrast / gamma curve for the blue
4280      * channel, to use when ACAMERA_TONEMAP_MODE is
4281      * CONTRAST_CURVE.</p>
4282      *
4283      * @see ACAMERA_TONEMAP_MODE
4284      *
4285      * <p>This tag may appear in:</p>
4286      * <ul>
4287      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4288      *   <li>ACaptureRequest</li>
4289      * </ul>
4290      *
4291      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
4292      *
4293      * @see ACAMERA_TONEMAP_CURVE_RED
4294      */
4295     ACAMERA_TONEMAP_CURVE_BLUE =                                // float[n*2]
4296             ACAMERA_TONEMAP_START,
4297     /**
4298      * <p>Tonemapping / contrast / gamma curve for the green
4299      * channel, to use when ACAMERA_TONEMAP_MODE is
4300      * CONTRAST_CURVE.</p>
4301      *
4302      * @see ACAMERA_TONEMAP_MODE
4303      *
4304      * <p>This tag may appear in:</p>
4305      * <ul>
4306      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4307      *   <li>ACaptureRequest</li>
4308      * </ul>
4309      *
4310      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
4311      *
4312      * @see ACAMERA_TONEMAP_CURVE_RED
4313      */
4314     ACAMERA_TONEMAP_CURVE_GREEN =                               // float[n*2]
4315             ACAMERA_TONEMAP_START + 1,
4316     /**
4317      * <p>Tonemapping / contrast / gamma curve for the red
4318      * channel, to use when ACAMERA_TONEMAP_MODE is
4319      * CONTRAST_CURVE.</p>
4320      *
4321      * @see ACAMERA_TONEMAP_MODE
4322      *
4323      * <p>This tag may appear in:</p>
4324      * <ul>
4325      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4326      *   <li>ACaptureRequest</li>
4327      * </ul>
4328      *
4329      * <p>Each channel's curve is defined by an array of control points:</p>
4330      * <pre><code>ACAMERA_TONEMAP_CURVE_RED =
4331      *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
4332      * 2 &lt;= N &lt;= ACAMERA_TONEMAP_MAX_CURVE_POINTS</code></pre>
4333      * <p>These are sorted in order of increasing <code>Pin</code>; it is
4334      * required that input values 0.0 and 1.0 are included in the list to
4335      * define a complete mapping. For input values between control points,
4336      * the camera device must linearly interpolate between the control
4337      * points.</p>
4338      * <p>Each curve can have an independent number of points, and the number
4339      * of points can be less than max (that is, the request doesn't have to
4340      * always provide a curve with number of points equivalent to
4341      * ACAMERA_TONEMAP_MAX_CURVE_POINTS).</p>
4342      * <p>A few examples, and their corresponding graphical mappings; these
4343      * only specify the red channel and the precision is limited to 4
4344      * digits, for conciseness.</p>
4345      * <p>Linear mapping:</p>
4346      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 0, 1.0, 1.0 ]
4347      * </code></pre>
4348      * <p><img alt="Linear mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
4349      * <p>Invert mapping:</p>
4350      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 1.0, 1.0, 0 ]
4351      * </code></pre>
4352      * <p><img alt="Inverting mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
4353      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
4354      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
4355      *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
4356      *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
4357      *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
4358      *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
4359      * </code></pre>
4360      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
4361      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
4362      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
4363      *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
4364      *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
4365      *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
4366      *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
4367      * </code></pre>
4368      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
4369      *
4370      * @see ACAMERA_TONEMAP_CURVE_RED
4371      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
4372      */
4373     ACAMERA_TONEMAP_CURVE_RED =                                 // float[n*2]
4374             ACAMERA_TONEMAP_START + 2,
4375     /**
4376      * <p>High-level global contrast/gamma/tonemapping control.</p>
4377      *
4378      * <p>This tag may appear in:</p>
4379      * <ul>
4380      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4381      *   <li>ACaptureRequest</li>
4382      * </ul>
4383      *
4384      * <p>When switching to an application-defined contrast curve by setting
4385      * ACAMERA_TONEMAP_MODE to CONTRAST_CURVE, the curve is defined
4386      * per-channel with a set of <code>(in, out)</code> points that specify the
4387      * mapping from input high-bit-depth pixel value to the output
4388      * low-bit-depth value.  Since the actual pixel ranges of both input
4389      * and output may change depending on the camera pipeline, the values
4390      * are specified by normalized floating-point numbers.</p>
4391      * <p>More-complex color mapping operations such as 3D color look-up
4392      * tables, selective chroma enhancement, or other non-linear color
4393      * transforms will be disabled when ACAMERA_TONEMAP_MODE is
4394      * CONTRAST_CURVE.</p>
4395      * <p>When using either FAST or HIGH_QUALITY, the camera device will
4396      * emit its own tonemap curve in android.tonemap.curve.
4397      * These values are always available, and as close as possible to the
4398      * actually used nonlinear/nonglobal transforms.</p>
4399      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
4400      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
4401      * roughly the same.</p>
4402      *
4403      * @see ACAMERA_TONEMAP_MODE
4404      */
4405     ACAMERA_TONEMAP_MODE =                                      // byte (enum)
4406             ACAMERA_TONEMAP_START + 3,
4407     /**
4408      * <p>Maximum number of supported points in the
4409      * tonemap curve that can be used for android.tonemap.curve.</p>
4410      *
4411      * <p>This tag may appear in:</p>
4412      * <ul>
4413      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4414      * </ul>
4415      *
4416      * <p>If the actual number of points provided by the application (in ACAMERA_TONEMAPCURVE_*) is
4417      * less than this maximum, the camera device will resample the curve to its internal
4418      * representation, using linear interpolation.</p>
4419      * <p>The output curves in the result metadata may have a different number
4420      * of points than the input curves, and will represent the actual
4421      * hardware curves used as closely as possible when linearly interpolated.</p>
4422      */
4423     ACAMERA_TONEMAP_MAX_CURVE_POINTS =                          // int32
4424             ACAMERA_TONEMAP_START + 4,
4425     /**
4426      * <p>List of tonemapping modes for ACAMERA_TONEMAP_MODE that are supported by this camera
4427      * device.</p>
4428      *
4429      * @see ACAMERA_TONEMAP_MODE
4430      *
4431      * <p>This tag may appear in:</p>
4432      * <ul>
4433      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4434      * </ul>
4435      *
4436      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
4437      * at least one of below mode combinations:</p>
4438      * <ul>
4439      * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
4440      * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
4441      * </ul>
4442      * <p>This includes all FULL level devices.</p>
4443      */
4444     ACAMERA_TONEMAP_AVAILABLE_TONE_MAP_MODES =                  // byte[n]
4445             ACAMERA_TONEMAP_START + 5,
4446     /**
4447      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
4448      * GAMMA_VALUE</p>
4449      *
4450      * @see ACAMERA_TONEMAP_MODE
4451      *
4452      * <p>This tag may appear in:</p>
4453      * <ul>
4454      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4455      *   <li>ACaptureRequest</li>
4456      * </ul>
4457      *
4458      * <p>The tonemap curve will be defined the following formula:
4459      * * OUT = pow(IN, 1.0 / gamma)
4460      * where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
4461      * pow is the power function and gamma is the gamma value specified by this
4462      * key.</p>
4463      * <p>The same curve will be applied to all color channels. The camera device
4464      * may clip the input gamma value to its supported range. The actual applied
4465      * value will be returned in capture result.</p>
4466      * <p>The valid range of gamma value varies on different devices, but values
4467      * within [1.0, 5.0] are guaranteed not to be clipped.</p>
4468      */
4469     ACAMERA_TONEMAP_GAMMA =                                     // float
4470             ACAMERA_TONEMAP_START + 6,
4471     /**
4472      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
4473      * PRESET_CURVE</p>
4474      *
4475      * @see ACAMERA_TONEMAP_MODE
4476      *
4477      * <p>This tag may appear in:</p>
4478      * <ul>
4479      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4480      *   <li>ACaptureRequest</li>
4481      * </ul>
4482      *
4483      * <p>The tonemap curve will be defined by specified standard.</p>
4484      * <p>sRGB (approximated by 16 control points):</p>
4485      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
4486      * <p>Rec. 709 (approximated by 16 control points):</p>
4487      * <p><img alt="Rec. 709 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
4488      * <p>Note that above figures show a 16 control points approximation of preset
4489      * curves. Camera devices may apply a different approximation to the curve.</p>
4490      */
4491     ACAMERA_TONEMAP_PRESET_CURVE =                              // byte (enum)
4492             ACAMERA_TONEMAP_START + 7,
4493     ACAMERA_TONEMAP_END,
4494 
4495     /**
4496      * <p>Generally classifies the overall set of the camera device functionality.</p>
4497      *
4498      * <p>This tag may appear in:</p>
4499      * <ul>
4500      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4501      * </ul>
4502      *
4503      * <p>The supported hardware level is a high-level description of the camera device's
4504      * capabilities, summarizing several capabilities into one field.  Each level adds additional
4505      * features to the previous one, and is always a strict superset of the previous level.
4506      * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
4507      * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
4508      * numerical value as well. To check if a given device is at least at a given hardware level,
4509      * the following code snippet can be used:</p>
4510      * <pre><code>// Returns true if the device supports the required hardware level, or better.
4511      * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
4512      *     int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
4513      *     if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) {
4514      *         return requiredLevel == deviceLevel;
4515      *     }
4516      *     // deviceLevel is not LEGACY, can use numerical sort
4517      *     return requiredLevel &lt;= deviceLevel;
4518      * }
4519      * </code></pre>
4520      * <p>At a high level, the levels are:</p>
4521      * <ul>
4522      * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
4523      *   Android devices, and have very limited capabilities.</li>
4524      * <li><code>LIMITED</code> devices represent the
4525      *   baseline feature set, and may also include additional capabilities that are
4526      *   subsets of <code>FULL</code>.</li>
4527      * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
4528      *   post-processing settings, and image capture at a high rate.</li>
4529      * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
4530      *   with additional output stream configurations.</li>
4531      * </ul>
4532      * <p>See the individual level enums for full descriptions of the supported capabilities.  The
4533      * ACAMERA_REQUEST_AVAILABLE_CAPABILITIES entry describes the device's capabilities at a
4534      * finer-grain level, if needed. In addition, many controls have their available settings or
4535      * ranges defined in individual metadata tag entries in this document.</p>
4536      * <p>Some features are not part of any particular hardware level or capability and must be
4537      * queried separately. These include:</p>
4538      * <ul>
4539      * <li>Calibrated timestamps (ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME)</li>
4540      * <li>Precision lens control (ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION <code>==</code> CALIBRATED)</li>
4541      * <li>Face detection (ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES)</li>
4542      * <li>Optical or electrical image stabilization
4543      *   (ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
4544      *    ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)</li>
4545      * </ul>
4546      *
4547      * @see ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
4548      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
4549      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
4550      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
4551      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
4552      * @see ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
4553      */
4554     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL =                     // byte (enum)
4555             ACAMERA_INFO_START,
4556     ACAMERA_INFO_END,
4557 
4558     /**
4559      * <p>Whether black-level compensation is locked
4560      * to its current values, or is free to vary.</p>
4561      *
4562      * <p>This tag may appear in:</p>
4563      * <ul>
4564      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4565      *   <li>ACaptureRequest</li>
4566      * </ul>
4567      *
4568      * <p>Whether the black level offset was locked for this frame.  Should be
4569      * ON if ACAMERA_BLACK_LEVEL_LOCK was ON in the capture request, unless
4570      * a change in other capture settings forced the camera device to
4571      * perform a black level reset.</p>
4572      *
4573      * @see ACAMERA_BLACK_LEVEL_LOCK
4574      */
4575     ACAMERA_BLACK_LEVEL_LOCK =                                  // byte (enum)
4576             ACAMERA_BLACK_LEVEL_START,
4577     ACAMERA_BLACK_LEVEL_END,
4578 
4579     /**
4580      * <p>The frame number corresponding to the last request
4581      * with which the output result (metadata + buffers) has been fully
4582      * synchronized.</p>
4583      *
4584      * <p>This tag may appear in:</p>
4585      * <ul>
4586      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4587      * </ul>
4588      *
4589      * <p>When a request is submitted to the camera device, there is usually a
4590      * delay of several frames before the controls get applied. A camera
4591      * device may either choose to account for this delay by implementing a
4592      * pipeline and carefully submit well-timed atomic control updates, or
4593      * it may start streaming control changes that span over several frame
4594      * boundaries.</p>
4595      * <p>In the latter case, whenever a request's settings change relative to
4596      * the previous submitted request, the full set of changes may take
4597      * multiple frame durations to fully take effect. Some settings may
4598      * take effect sooner (in less frame durations) than others.</p>
4599      * <p>While a set of control changes are being propagated, this value
4600      * will be CONVERGING.</p>
4601      * <p>Once it is fully known that a set of control changes have been
4602      * finished propagating, and the resulting updated control settings
4603      * have been read back by the camera device, this value will be set
4604      * to a non-negative frame number (corresponding to the request to
4605      * which the results have synchronized to).</p>
4606      * <p>Older camera device implementations may not have a way to detect
4607      * when all camera controls have been applied, and will always set this
4608      * value to UNKNOWN.</p>
4609      * <p>FULL capability devices will always have this value set to the
4610      * frame number of the request corresponding to this result.</p>
4611      * <p><em>Further details</em>:</p>
4612      * <ul>
4613      * <li>Whenever a request differs from the last request, any future
4614      * results not yet returned may have this value set to CONVERGING (this
4615      * could include any in-progress captures not yet returned by the camera
4616      * device, for more details see pipeline considerations below).</li>
4617      * <li>Submitting a series of multiple requests that differ from the
4618      * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
4619      * moves the new synchronization frame to the last non-repeating
4620      * request (using the smallest frame number from the contiguous list of
4621      * repeating requests).</li>
4622      * <li>Submitting the same request repeatedly will not change this value
4623      * to CONVERGING, if it was already a non-negative value.</li>
4624      * <li>When this value changes to non-negative, that means that all of the
4625      * metadata controls from the request have been applied, all of the
4626      * metadata controls from the camera device have been read to the
4627      * updated values (into the result), and all of the graphics buffers
4628      * corresponding to this result are also synchronized to the request.</li>
4629      * </ul>
4630      * <p><em>Pipeline considerations</em>:</p>
4631      * <p>Submitting a request with updated controls relative to the previously
4632      * submitted requests may also invalidate the synchronization state
4633      * of all the results corresponding to currently in-flight requests.</p>
4634      * <p>In other words, results for this current request and up to
4635      * ACAMERA_REQUEST_PIPELINE_MAX_DEPTH prior requests may have their
4636      * ACAMERA_SYNC_FRAME_NUMBER change to CONVERGING.</p>
4637      *
4638      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
4639      * @see ACAMERA_SYNC_FRAME_NUMBER
4640      */
4641     ACAMERA_SYNC_FRAME_NUMBER =                                 // int64 (enum)
4642             ACAMERA_SYNC_START,
4643     /**
4644      * <p>The maximum number of frames that can occur after a request
4645      * (different than the previous) has been submitted, and before the
4646      * result's state becomes synchronized.</p>
4647      *
4648      * <p>This tag may appear in:</p>
4649      * <ul>
4650      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4651      * </ul>
4652      *
4653      * <p>This defines the maximum distance (in number of metadata results),
4654      * between the frame number of the request that has new controls to apply
4655      * and the frame number of the result that has all the controls applied.</p>
4656      * <p>In other words this acts as an upper boundary for how many frames
4657      * must occur before the camera device knows for a fact that the new
4658      * submitted camera settings have been applied in outgoing frames.</p>
4659      */
4660     ACAMERA_SYNC_MAX_LATENCY =                                  // int32 (enum)
4661             ACAMERA_SYNC_START + 1,
4662     ACAMERA_SYNC_END,
4663 
4664     /**
4665      * <p>The available depth dataspace stream
4666      * configurations that this camera device supports
4667      * (i.e. format, width, height, output/input stream).</p>
4668      *
4669      * <p>This tag may appear in:</p>
4670      * <ul>
4671      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4672      * </ul>
4673      *
4674      * <p>These are output stream configurations for use with
4675      * dataSpace HAL_DATASPACE_DEPTH. The configurations are
4676      * listed as <code>(format, width, height, input?)</code> tuples.</p>
4677      * <p>Only devices that support depth output for at least
4678      * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
4679      * this entry.</p>
4680      * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
4681      * sparse depth point cloud must report a single entry for
4682      * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
4683      * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
4684      * the entries for HAL_PIXEL_FORMAT_Y16.</p>
4685      */
4686     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =       // int32[n*4] (enum)
4687             ACAMERA_DEPTH_START + 1,
4688     /**
4689      * <p>This lists the minimum frame duration for each
4690      * format/size combination for depth output formats.</p>
4691      *
4692      * <p>This tag may appear in:</p>
4693      * <ul>
4694      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4695      * </ul>
4696      *
4697      * <p>This should correspond to the frame duration when only that
4698      * stream is active, with all processing (typically in android.*.mode)
4699      * set to either OFF or FAST.</p>
4700      * <p>When multiple streams are used in a request, the minimum frame
4701      * duration will be max(individual stream min durations).</p>
4702      * <p>The minimum frame duration of a stream (of a particular format, size)
4703      * is the same regardless of whether the stream is input or output.</p>
4704      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
4705      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
4706      * calculating the max frame rate.</p>
4707      *
4708      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
4709      * @see ACAMERA_SENSOR_FRAME_DURATION
4710      */
4711     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =         // int64[4*n]
4712             ACAMERA_DEPTH_START + 2,
4713     /**
4714      * <p>This lists the maximum stall duration for each
4715      * output format/size combination for depth streams.</p>
4716      *
4717      * <p>This tag may appear in:</p>
4718      * <ul>
4719      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4720      * </ul>
4721      *
4722      * <p>A stall duration is how much extra time would get added
4723      * to the normal minimum frame duration for a repeating request
4724      * that has streams with non-zero stall.</p>
4725      * <p>This functions similarly to
4726      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for depth
4727      * streams.</p>
4728      * <p>All depth output stream formats may have a nonzero stall
4729      * duration.</p>
4730      *
4731      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
4732      */
4733     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =             // int64[4*n]
4734             ACAMERA_DEPTH_START + 3,
4735     /**
4736      * <p>Indicates whether a capture request may target both a
4737      * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
4738      * YUV_420_888, JPEG, or RAW) simultaneously.</p>
4739      *
4740      * <p>This tag may appear in:</p>
4741      * <ul>
4742      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4743      * </ul>
4744      *
4745      * <p>If TRUE, including both depth and color outputs in a single
4746      * capture request is not supported. An application must interleave color
4747      * and depth requests.  If FALSE, a single request can target both types
4748      * of output.</p>
4749      * <p>Typically, this restriction exists on camera devices that
4750      * need to emit a specific pattern or wavelength of light to
4751      * measure depth values, which causes the color image to be
4752      * corrupted during depth measurement.</p>
4753      */
4754     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE =                          // byte (enum)
4755             ACAMERA_DEPTH_START + 4,
4756     ACAMERA_DEPTH_END,
4757 
4758 } acamera_metadata_tag_t;
4759 
4760 /**
4761  * Enumeration definitions for the various entries that need them
4762  */
4763 
4764 // ACAMERA_COLOR_CORRECTION_MODE
4765 typedef enum acamera_metadata_enum_acamera_color_correction_mode {
4766     /**
4767      * <p>Use the ACAMERA_COLOR_CORRECTION_TRANSFORM matrix
4768      * and ACAMERA_COLOR_CORRECTION_GAINS to do color conversion.</p>
4769      * <p>All advanced white balance adjustments (not specified
4770      * by our white balance pipeline) must be disabled.</p>
4771      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
4772      * TRANSFORM_MATRIX is ignored. The camera device will override
4773      * this value to either FAST or HIGH_QUALITY.</p>
4774      *
4775      * @see ACAMERA_COLOR_CORRECTION_GAINS
4776      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
4777      * @see ACAMERA_CONTROL_AWB_MODE
4778      */
4779     ACAMERA_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX                   = 0,
4780 
4781     /**
4782      * <p>Color correction processing must not slow down
4783      * capture rate relative to sensor raw output.</p>
4784      * <p>Advanced white balance adjustments above and beyond
4785      * the specified white balance pipeline may be applied.</p>
4786      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
4787      * the camera device uses the last frame's AWB values
4788      * (or defaults if AWB has never been run).</p>
4789      *
4790      * @see ACAMERA_CONTROL_AWB_MODE
4791      */
4792     ACAMERA_COLOR_CORRECTION_MODE_FAST                               = 1,
4793 
4794     /**
4795      * <p>Color correction processing operates at improved
4796      * quality but the capture rate might be reduced (relative to sensor
4797      * raw output rate)</p>
4798      * <p>Advanced white balance adjustments above and beyond
4799      * the specified white balance pipeline may be applied.</p>
4800      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
4801      * the camera device uses the last frame's AWB values
4802      * (or defaults if AWB has never been run).</p>
4803      *
4804      * @see ACAMERA_CONTROL_AWB_MODE
4805      */
4806     ACAMERA_COLOR_CORRECTION_MODE_HIGH_QUALITY                       = 2,
4807 
4808 } acamera_metadata_enum_android_color_correction_mode_t;
4809 
4810 // ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
4811 typedef enum acamera_metadata_enum_acamera_color_correction_aberration_mode {
4812     /**
4813      * <p>No aberration correction is applied.</p>
4814      */
4815     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_OFF                     = 0,
4816 
4817     /**
4818      * <p>Aberration correction will not slow down capture rate
4819      * relative to sensor raw output.</p>
4820      */
4821     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_FAST                    = 1,
4822 
4823     /**
4824      * <p>Aberration correction operates at improved quality but the capture rate might be
4825      * reduced (relative to sensor raw output rate)</p>
4826      */
4827     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY            = 2,
4828 
4829 } acamera_metadata_enum_android_color_correction_aberration_mode_t;
4830 
4831 
4832 // ACAMERA_CONTROL_AE_ANTIBANDING_MODE
4833 typedef enum acamera_metadata_enum_acamera_control_ae_antibanding_mode {
4834     /**
4835      * <p>The camera device will not adjust exposure duration to
4836      * avoid banding problems.</p>
4837      */
4838     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_OFF                          = 0,
4839 
4840     /**
4841      * <p>The camera device will adjust exposure duration to
4842      * avoid banding problems with 50Hz illumination sources.</p>
4843      */
4844     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_50HZ                         = 1,
4845 
4846     /**
4847      * <p>The camera device will adjust exposure duration to
4848      * avoid banding problems with 60Hz illumination
4849      * sources.</p>
4850      */
4851     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_60HZ                         = 2,
4852 
4853     /**
4854      * <p>The camera device will automatically adapt its
4855      * antibanding routine to the current illumination
4856      * condition. This is the default mode if AUTO is
4857      * available on given camera device.</p>
4858      */
4859     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_AUTO                         = 3,
4860 
4861 } acamera_metadata_enum_android_control_ae_antibanding_mode_t;
4862 
4863 // ACAMERA_CONTROL_AE_LOCK
4864 typedef enum acamera_metadata_enum_acamera_control_ae_lock {
4865     /**
4866      * <p>Auto-exposure lock is disabled; the AE algorithm
4867      * is free to update its parameters.</p>
4868      */
4869     ACAMERA_CONTROL_AE_LOCK_OFF                                      = 0,
4870 
4871     /**
4872      * <p>Auto-exposure lock is enabled; the AE algorithm
4873      * must not update the exposure and sensitivity parameters
4874      * while the lock is active.</p>
4875      * <p>ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION setting changes
4876      * will still take effect while auto-exposure is locked.</p>
4877      * <p>Some rare LEGACY devices may not support
4878      * this, in which case the value will always be overridden to OFF.</p>
4879      *
4880      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
4881      */
4882     ACAMERA_CONTROL_AE_LOCK_ON                                       = 1,
4883 
4884 } acamera_metadata_enum_android_control_ae_lock_t;
4885 
4886 // ACAMERA_CONTROL_AE_MODE
4887 typedef enum acamera_metadata_enum_acamera_control_ae_mode {
4888     /**
4889      * <p>The camera device's autoexposure routine is disabled.</p>
4890      * <p>The application-selected ACAMERA_SENSOR_EXPOSURE_TIME,
4891      * ACAMERA_SENSOR_SENSITIVITY and
4892      * ACAMERA_SENSOR_FRAME_DURATION are used by the camera
4893      * device, along with ACAMERA_FLASH_* fields, if there's
4894      * a flash unit for this camera device.</p>
4895      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
4896      * behavior is device dependent when AE is in OFF mode.
4897      * To have consistent behavior across different devices,
4898      * it is recommended to either set AWB and AF to OFF mode
4899      * or lock AWB and AF before setting AE to OFF.
4900      * See ACAMERA_CONTROL_AWB_MODE, ACAMERA_CONTROL_AF_MODE,
4901      * ACAMERA_CONTROL_AWB_LOCK, and ACAMERA_CONTROL_AF_TRIGGER
4902      * for more details.</p>
4903      * <p>LEGACY devices do not support the OFF mode and will
4904      * override attempts to use this value to ON.</p>
4905      *
4906      * @see ACAMERA_CONTROL_AF_MODE
4907      * @see ACAMERA_CONTROL_AF_TRIGGER
4908      * @see ACAMERA_CONTROL_AWB_LOCK
4909      * @see ACAMERA_CONTROL_AWB_MODE
4910      * @see ACAMERA_SENSOR_EXPOSURE_TIME
4911      * @see ACAMERA_SENSOR_FRAME_DURATION
4912      * @see ACAMERA_SENSOR_SENSITIVITY
4913      */
4914     ACAMERA_CONTROL_AE_MODE_OFF                                      = 0,
4915 
4916     /**
4917      * <p>The camera device's autoexposure routine is active,
4918      * with no flash control.</p>
4919      * <p>The application's values for
4920      * ACAMERA_SENSOR_EXPOSURE_TIME,
4921      * ACAMERA_SENSOR_SENSITIVITY, and
4922      * ACAMERA_SENSOR_FRAME_DURATION are ignored. The
4923      * application has control over the various
4924      * ACAMERA_FLASH_* fields.</p>
4925      *
4926      * @see ACAMERA_SENSOR_EXPOSURE_TIME
4927      * @see ACAMERA_SENSOR_FRAME_DURATION
4928      * @see ACAMERA_SENSOR_SENSITIVITY
4929      */
4930     ACAMERA_CONTROL_AE_MODE_ON                                       = 1,
4931 
4932     /**
4933      * <p>Like ON, except that the camera device also controls
4934      * the camera's flash unit, firing it in low-light
4935      * conditions.</p>
4936      * <p>The flash may be fired during a precapture sequence
4937      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
4938      * may be fired for captures for which the
4939      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
4940      * STILL_CAPTURE</p>
4941      *
4942      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
4943      * @see ACAMERA_CONTROL_CAPTURE_INTENT
4944      */
4945     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH                            = 2,
4946 
4947     /**
4948      * <p>Like ON, except that the camera device also controls
4949      * the camera's flash unit, always firing it for still
4950      * captures.</p>
4951      * <p>The flash may be fired during a precapture sequence
4952      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
4953      * will always be fired for captures for which the
4954      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
4955      * STILL_CAPTURE</p>
4956      *
4957      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
4958      * @see ACAMERA_CONTROL_CAPTURE_INTENT
4959      */
4960     ACAMERA_CONTROL_AE_MODE_ON_ALWAYS_FLASH                          = 3,
4961 
4962     /**
4963      * <p>Like ON_AUTO_FLASH, but with automatic red eye
4964      * reduction.</p>
4965      * <p>If deemed necessary by the camera device, a red eye
4966      * reduction flash will fire during the precapture
4967      * sequence.</p>
4968      */
4969     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE                     = 4,
4970 
4971 } acamera_metadata_enum_android_control_ae_mode_t;
4972 
4973 // ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
4974 typedef enum acamera_metadata_enum_acamera_control_ae_precapture_trigger {
4975     /**
4976      * <p>The trigger is idle.</p>
4977      */
4978     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE                       = 0,
4979 
4980     /**
4981      * <p>The precapture metering sequence will be started
4982      * by the camera device.</p>
4983      * <p>The exact effect of the precapture trigger depends on
4984      * the current AE mode and state.</p>
4985      */
4986     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_START                      = 1,
4987 
4988     /**
4989      * <p>The camera device will cancel any currently active or completed
4990      * precapture metering sequence, the auto-exposure routine will return to its
4991      * initial state.</p>
4992      */
4993     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL                     = 2,
4994 
4995 } acamera_metadata_enum_android_control_ae_precapture_trigger_t;
4996 
4997 // ACAMERA_CONTROL_AF_MODE
4998 typedef enum acamera_metadata_enum_acamera_control_af_mode {
4999     /**
5000      * <p>The auto-focus routine does not control the lens;
5001      * ACAMERA_LENS_FOCUS_DISTANCE is controlled by the
5002      * application.</p>
5003      *
5004      * @see ACAMERA_LENS_FOCUS_DISTANCE
5005      */
5006     ACAMERA_CONTROL_AF_MODE_OFF                                      = 0,
5007 
5008     /**
5009      * <p>Basic automatic focus mode.</p>
5010      * <p>In this mode, the lens does not move unless
5011      * the autofocus trigger action is called. When that trigger
5012      * is activated, AF will transition to ACTIVE_SCAN, then to
5013      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
5014      * <p>Always supported if lens is not fixed focus.</p>
5015      * <p>Use ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE to determine if lens
5016      * is fixed-focus.</p>
5017      * <p>Triggering AF_CANCEL resets the lens position to default,
5018      * and sets the AF state to INACTIVE.</p>
5019      *
5020      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
5021      */
5022     ACAMERA_CONTROL_AF_MODE_AUTO                                     = 1,
5023 
5024     /**
5025      * <p>Close-up focusing mode.</p>
5026      * <p>In this mode, the lens does not move unless the
5027      * autofocus trigger action is called. When that trigger is
5028      * activated, AF will transition to ACTIVE_SCAN, then to
5029      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
5030      * mode is optimized for focusing on objects very close to
5031      * the camera.</p>
5032      * <p>When that trigger is activated, AF will transition to
5033      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
5034      * NOT_FOCUSED). Triggering cancel AF resets the lens
5035      * position to default, and sets the AF state to
5036      * INACTIVE.</p>
5037      */
5038     ACAMERA_CONTROL_AF_MODE_MACRO                                    = 2,
5039 
5040     /**
5041      * <p>In this mode, the AF algorithm modifies the lens
5042      * position continually to attempt to provide a
5043      * constantly-in-focus image stream.</p>
5044      * <p>The focusing behavior should be suitable for good quality
5045      * video recording; typically this means slower focus
5046      * movement and no overshoots. When the AF trigger is not
5047      * involved, the AF algorithm should start in INACTIVE state,
5048      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
5049      * states as appropriate. When the AF trigger is activated,
5050      * the algorithm should immediately transition into
5051      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
5052      * lens position until a cancel AF trigger is received.</p>
5053      * <p>Once cancel is received, the algorithm should transition
5054      * back to INACTIVE and resume passive scan. Note that this
5055      * behavior is not identical to CONTINUOUS_PICTURE, since an
5056      * ongoing PASSIVE_SCAN must immediately be
5057      * canceled.</p>
5058      */
5059     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_VIDEO                         = 3,
5060 
5061     /**
5062      * <p>In this mode, the AF algorithm modifies the lens
5063      * position continually to attempt to provide a
5064      * constantly-in-focus image stream.</p>
5065      * <p>The focusing behavior should be suitable for still image
5066      * capture; typically this means focusing as fast as
5067      * possible. When the AF trigger is not involved, the AF
5068      * algorithm should start in INACTIVE state, and then
5069      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
5070      * appropriate as it attempts to maintain focus. When the AF
5071      * trigger is activated, the algorithm should finish its
5072      * PASSIVE_SCAN if active, and then transition into
5073      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
5074      * lens position until a cancel AF trigger is received.</p>
5075      * <p>When the AF cancel trigger is activated, the algorithm
5076      * should transition back to INACTIVE and then act as if it
5077      * has just been started.</p>
5078      */
5079     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_PICTURE                       = 4,
5080 
5081     /**
5082      * <p>Extended depth of field (digital focus) mode.</p>
5083      * <p>The camera device will produce images with an extended
5084      * depth of field automatically; no special focusing
5085      * operations need to be done before taking a picture.</p>
5086      * <p>AF triggers are ignored, and the AF state will always be
5087      * INACTIVE.</p>
5088      */
5089     ACAMERA_CONTROL_AF_MODE_EDOF                                     = 5,
5090 
5091 } acamera_metadata_enum_android_control_af_mode_t;
5092 
5093 // ACAMERA_CONTROL_AF_TRIGGER
5094 typedef enum acamera_metadata_enum_acamera_control_af_trigger {
5095     /**
5096      * <p>The trigger is idle.</p>
5097      */
5098     ACAMERA_CONTROL_AF_TRIGGER_IDLE                                  = 0,
5099 
5100     /**
5101      * <p>Autofocus will trigger now.</p>
5102      */
5103     ACAMERA_CONTROL_AF_TRIGGER_START                                 = 1,
5104 
5105     /**
5106      * <p>Autofocus will return to its initial
5107      * state, and cancel any currently active trigger.</p>
5108      */
5109     ACAMERA_CONTROL_AF_TRIGGER_CANCEL                                = 2,
5110 
5111 } acamera_metadata_enum_android_control_af_trigger_t;
5112 
5113 // ACAMERA_CONTROL_AWB_LOCK
5114 typedef enum acamera_metadata_enum_acamera_control_awb_lock {
5115     /**
5116      * <p>Auto-white balance lock is disabled; the AWB
5117      * algorithm is free to update its parameters if in AUTO
5118      * mode.</p>
5119      */
5120     ACAMERA_CONTROL_AWB_LOCK_OFF                                     = 0,
5121 
5122     /**
5123      * <p>Auto-white balance lock is enabled; the AWB
5124      * algorithm will not update its parameters while the lock
5125      * is active.</p>
5126      */
5127     ACAMERA_CONTROL_AWB_LOCK_ON                                      = 1,
5128 
5129 } acamera_metadata_enum_android_control_awb_lock_t;
5130 
5131 // ACAMERA_CONTROL_AWB_MODE
5132 typedef enum acamera_metadata_enum_acamera_control_awb_mode {
5133     /**
5134      * <p>The camera device's auto-white balance routine is disabled.</p>
5135      * <p>The application-selected color transform matrix
5136      * (ACAMERA_COLOR_CORRECTION_TRANSFORM) and gains
5137      * (ACAMERA_COLOR_CORRECTION_GAINS) are used by the camera
5138      * device for manual white balance control.</p>
5139      *
5140      * @see ACAMERA_COLOR_CORRECTION_GAINS
5141      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5142      */
5143     ACAMERA_CONTROL_AWB_MODE_OFF                                     = 0,
5144 
5145     /**
5146      * <p>The camera device's auto-white balance routine is active.</p>
5147      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5148      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5149      * For devices that support the MANUAL_POST_PROCESSING capability, the
5150      * values used by the camera device for the transform and gains
5151      * will be available in the capture result for this request.</p>
5152      *
5153      * @see ACAMERA_COLOR_CORRECTION_GAINS
5154      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5155      */
5156     ACAMERA_CONTROL_AWB_MODE_AUTO                                    = 1,
5157 
5158     /**
5159      * <p>The camera device's auto-white balance routine is disabled;
5160      * the camera device uses incandescent light as the assumed scene
5161      * illumination for white balance.</p>
5162      * <p>While the exact white balance transforms are up to the
5163      * camera device, they will approximately match the CIE
5164      * standard illuminant A.</p>
5165      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5166      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5167      * For devices that support the MANUAL_POST_PROCESSING capability, the
5168      * values used by the camera device for the transform and gains
5169      * will be available in the capture result for this request.</p>
5170      *
5171      * @see ACAMERA_COLOR_CORRECTION_GAINS
5172      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5173      */
5174     ACAMERA_CONTROL_AWB_MODE_INCANDESCENT                            = 2,
5175 
5176     /**
5177      * <p>The camera device's auto-white balance routine is disabled;
5178      * the camera device uses fluorescent light as the assumed scene
5179      * illumination for white balance.</p>
5180      * <p>While the exact white balance transforms are up to the
5181      * camera device, they will approximately match the CIE
5182      * standard illuminant F2.</p>
5183      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5184      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5185      * For devices that support the MANUAL_POST_PROCESSING capability, the
5186      * values used by the camera device for the transform and gains
5187      * will be available in the capture result for this request.</p>
5188      *
5189      * @see ACAMERA_COLOR_CORRECTION_GAINS
5190      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5191      */
5192     ACAMERA_CONTROL_AWB_MODE_FLUORESCENT                             = 3,
5193 
5194     /**
5195      * <p>The camera device's auto-white balance routine is disabled;
5196      * the camera device uses warm fluorescent light as the assumed scene
5197      * illumination for white balance.</p>
5198      * <p>While the exact white balance transforms are up to the
5199      * camera device, they will approximately match the CIE
5200      * standard illuminant F4.</p>
5201      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5202      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5203      * For devices that support the MANUAL_POST_PROCESSING capability, the
5204      * values used by the camera device for the transform and gains
5205      * will be available in the capture result for this request.</p>
5206      *
5207      * @see ACAMERA_COLOR_CORRECTION_GAINS
5208      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5209      */
5210     ACAMERA_CONTROL_AWB_MODE_WARM_FLUORESCENT                        = 4,
5211 
5212     /**
5213      * <p>The camera device's auto-white balance routine is disabled;
5214      * the camera device uses daylight light as the assumed scene
5215      * illumination for white balance.</p>
5216      * <p>While the exact white balance transforms are up to the
5217      * camera device, they will approximately match the CIE
5218      * standard illuminant D65.</p>
5219      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5220      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5221      * For devices that support the MANUAL_POST_PROCESSING capability, the
5222      * values used by the camera device for the transform and gains
5223      * will be available in the capture result for this request.</p>
5224      *
5225      * @see ACAMERA_COLOR_CORRECTION_GAINS
5226      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5227      */
5228     ACAMERA_CONTROL_AWB_MODE_DAYLIGHT                                = 5,
5229 
5230     /**
5231      * <p>The camera device's auto-white balance routine is disabled;
5232      * the camera device uses cloudy daylight light as the assumed scene
5233      * illumination for white balance.</p>
5234      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5235      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5236      * For devices that support the MANUAL_POST_PROCESSING capability, the
5237      * values used by the camera device for the transform and gains
5238      * will be available in the capture result for this request.</p>
5239      *
5240      * @see ACAMERA_COLOR_CORRECTION_GAINS
5241      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5242      */
5243     ACAMERA_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT                         = 6,
5244 
5245     /**
5246      * <p>The camera device's auto-white balance routine is disabled;
5247      * the camera device uses twilight light as the assumed scene
5248      * illumination for white balance.</p>
5249      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5250      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5251      * For devices that support the MANUAL_POST_PROCESSING capability, the
5252      * values used by the camera device for the transform and gains
5253      * will be available in the capture result for this request.</p>
5254      *
5255      * @see ACAMERA_COLOR_CORRECTION_GAINS
5256      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5257      */
5258     ACAMERA_CONTROL_AWB_MODE_TWILIGHT                                = 7,
5259 
5260     /**
5261      * <p>The camera device's auto-white balance routine is disabled;
5262      * the camera device uses shade light as the assumed scene
5263      * illumination for white balance.</p>
5264      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
5265      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
5266      * For devices that support the MANUAL_POST_PROCESSING capability, the
5267      * values used by the camera device for the transform and gains
5268      * will be available in the capture result for this request.</p>
5269      *
5270      * @see ACAMERA_COLOR_CORRECTION_GAINS
5271      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
5272      */
5273     ACAMERA_CONTROL_AWB_MODE_SHADE                                   = 8,
5274 
5275 } acamera_metadata_enum_android_control_awb_mode_t;
5276 
5277 // ACAMERA_CONTROL_CAPTURE_INTENT
5278 typedef enum acamera_metadata_enum_acamera_control_capture_intent {
5279     /**
5280      * <p>The goal of this request doesn't fall into the other
5281      * categories. The camera device will default to preview-like
5282      * behavior.</p>
5283      */
5284     ACAMERA_CONTROL_CAPTURE_INTENT_CUSTOM                            = 0,
5285 
5286     /**
5287      * <p>This request is for a preview-like use case.</p>
5288      * <p>The precapture trigger may be used to start off a metering
5289      * w/flash sequence.</p>
5290      */
5291     ACAMERA_CONTROL_CAPTURE_INTENT_PREVIEW                           = 1,
5292 
5293     /**
5294      * <p>This request is for a still capture-type
5295      * use case.</p>
5296      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
5297      */
5298     ACAMERA_CONTROL_CAPTURE_INTENT_STILL_CAPTURE                     = 2,
5299 
5300     /**
5301      * <p>This request is for a video recording
5302      * use case.</p>
5303      */
5304     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_RECORD                      = 3,
5305 
5306     /**
5307      * <p>This request is for a video snapshot (still
5308      * image while recording video) use case.</p>
5309      * <p>The camera device should take the highest-quality image
5310      * possible (given the other settings) without disrupting the
5311      * frame rate of video recording.  </p>
5312      */
5313     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT                    = 4,
5314 
5315     /**
5316      * <p>This request is for a ZSL usecase; the
5317      * application will stream full-resolution images and
5318      * reprocess one or several later for a final
5319      * capture.</p>
5320      */
5321     ACAMERA_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG                  = 5,
5322 
5323     /**
5324      * <p>This request is for manual capture use case where
5325      * the applications want to directly control the capture parameters.</p>
5326      * <p>For example, the application may wish to manually control
5327      * ACAMERA_SENSOR_EXPOSURE_TIME, ACAMERA_SENSOR_SENSITIVITY, etc.</p>
5328      *
5329      * @see ACAMERA_SENSOR_EXPOSURE_TIME
5330      * @see ACAMERA_SENSOR_SENSITIVITY
5331      */
5332     ACAMERA_CONTROL_CAPTURE_INTENT_MANUAL                            = 6,
5333 
5334 } acamera_metadata_enum_android_control_capture_intent_t;
5335 
5336 // ACAMERA_CONTROL_EFFECT_MODE
5337 typedef enum acamera_metadata_enum_acamera_control_effect_mode {
5338     /**
5339      * <p>No color effect will be applied.</p>
5340      */
5341     ACAMERA_CONTROL_EFFECT_MODE_OFF                                  = 0,
5342 
5343     /**
5344      * <p>A "monocolor" effect where the image is mapped into
5345      * a single color.</p>
5346      * <p>This will typically be grayscale.</p>
5347      */
5348     ACAMERA_CONTROL_EFFECT_MODE_MONO                                 = 1,
5349 
5350     /**
5351      * <p>A "photo-negative" effect where the image's colors
5352      * are inverted.</p>
5353      */
5354     ACAMERA_CONTROL_EFFECT_MODE_NEGATIVE                             = 2,
5355 
5356     /**
5357      * <p>A "solarisation" effect (Sabattier effect) where the
5358      * image is wholly or partially reversed in
5359      * tone.</p>
5360      */
5361     ACAMERA_CONTROL_EFFECT_MODE_SOLARIZE                             = 3,
5362 
5363     /**
5364      * <p>A "sepia" effect where the image is mapped into warm
5365      * gray, red, and brown tones.</p>
5366      */
5367     ACAMERA_CONTROL_EFFECT_MODE_SEPIA                                = 4,
5368 
5369     /**
5370      * <p>A "posterization" effect where the image uses
5371      * discrete regions of tone rather than a continuous
5372      * gradient of tones.</p>
5373      */
5374     ACAMERA_CONTROL_EFFECT_MODE_POSTERIZE                            = 5,
5375 
5376     /**
5377      * <p>A "whiteboard" effect where the image is typically displayed
5378      * as regions of white, with black or grey details.</p>
5379      */
5380     ACAMERA_CONTROL_EFFECT_MODE_WHITEBOARD                           = 6,
5381 
5382     /**
5383      * <p>A "blackboard" effect where the image is typically displayed
5384      * as regions of black, with white or grey details.</p>
5385      */
5386     ACAMERA_CONTROL_EFFECT_MODE_BLACKBOARD                           = 7,
5387 
5388     /**
5389      * <p>An "aqua" effect where a blue hue is added to the image.</p>
5390      */
5391     ACAMERA_CONTROL_EFFECT_MODE_AQUA                                 = 8,
5392 
5393 } acamera_metadata_enum_android_control_effect_mode_t;
5394 
5395 // ACAMERA_CONTROL_MODE
5396 typedef enum acamera_metadata_enum_acamera_control_mode {
5397     /**
5398      * <p>Full application control of pipeline.</p>
5399      * <p>All control by the device's metering and focusing (3A)
5400      * routines is disabled, and no other settings in
5401      * ACAMERA_CONTROL_* have any effect, except that
5402      * ACAMERA_CONTROL_CAPTURE_INTENT may be used by the camera
5403      * device to select post-processing values for processing
5404      * blocks that do not allow for manual control, or are not
5405      * exposed by the camera API.</p>
5406      * <p>However, the camera device's 3A routines may continue to
5407      * collect statistics and update their internal state so that
5408      * when control is switched to AUTO mode, good control values
5409      * can be immediately applied.</p>
5410      *
5411      * @see ACAMERA_CONTROL_CAPTURE_INTENT
5412      */
5413     ACAMERA_CONTROL_MODE_OFF                                         = 0,
5414 
5415     /**
5416      * <p>Use settings for each individual 3A routine.</p>
5417      * <p>Manual control of capture parameters is disabled. All
5418      * controls in ACAMERA_CONTROL_* besides sceneMode take
5419      * effect.</p>
5420      */
5421     ACAMERA_CONTROL_MODE_AUTO                                        = 1,
5422 
5423     /**
5424      * <p>Use a specific scene mode.</p>
5425      * <p>Enabling this disables control.aeMode, control.awbMode and
5426      * control.afMode controls; the camera device will ignore
5427      * those settings while USE_SCENE_MODE is active (except for
5428      * FACE_PRIORITY scene mode). Other control entries are still active.
5429      * This setting can only be used if scene mode is supported (i.e.
5430      * ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
5431      * contain some modes other than DISABLED).</p>
5432      *
5433      * @see ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
5434      */
5435     ACAMERA_CONTROL_MODE_USE_SCENE_MODE                              = 2,
5436 
5437     /**
5438      * <p>Same as OFF mode, except that this capture will not be
5439      * used by camera device background auto-exposure, auto-white balance and
5440      * auto-focus algorithms (3A) to update their statistics.</p>
5441      * <p>Specifically, the 3A routines are locked to the last
5442      * values set from a request with AUTO, OFF, or
5443      * USE_SCENE_MODE, and any statistics or state updates
5444      * collected from manual captures with OFF_KEEP_STATE will be
5445      * discarded by the camera device.</p>
5446      */
5447     ACAMERA_CONTROL_MODE_OFF_KEEP_STATE                              = 3,
5448 
5449 } acamera_metadata_enum_android_control_mode_t;
5450 
5451 // ACAMERA_CONTROL_SCENE_MODE
5452 typedef enum acamera_metadata_enum_acamera_control_scene_mode {
5453     /**
5454      * <p>Indicates that no scene modes are set for a given capture request.</p>
5455      */
5456     ACAMERA_CONTROL_SCENE_MODE_DISABLED                              = 0,
5457 
5458     /**
5459      * <p>If face detection support exists, use face
5460      * detection data for auto-focus, auto-white balance, and
5461      * auto-exposure routines.</p>
5462      * <p>If face detection statistics are disabled
5463      * (i.e. ACAMERA_STATISTICS_FACE_DETECT_MODE is set to OFF),
5464      * this should still operate correctly (but will not return
5465      * face detection statistics to the framework).</p>
5466      * <p>Unlike the other scene modes, ACAMERA_CONTROL_AE_MODE,
5467      * ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
5468      * remain active when FACE_PRIORITY is set.</p>
5469      *
5470      * @see ACAMERA_CONTROL_AE_MODE
5471      * @see ACAMERA_CONTROL_AF_MODE
5472      * @see ACAMERA_CONTROL_AWB_MODE
5473      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5474      */
5475     ACAMERA_CONTROL_SCENE_MODE_FACE_PRIORITY                         = 1,
5476 
5477     /**
5478      * <p>Optimized for photos of quickly moving objects.</p>
5479      * <p>Similar to SPORTS.</p>
5480      */
5481     ACAMERA_CONTROL_SCENE_MODE_ACTION                                = 2,
5482 
5483     /**
5484      * <p>Optimized for still photos of people.</p>
5485      */
5486     ACAMERA_CONTROL_SCENE_MODE_PORTRAIT                              = 3,
5487 
5488     /**
5489      * <p>Optimized for photos of distant macroscopic objects.</p>
5490      */
5491     ACAMERA_CONTROL_SCENE_MODE_LANDSCAPE                             = 4,
5492 
5493     /**
5494      * <p>Optimized for low-light settings.</p>
5495      */
5496     ACAMERA_CONTROL_SCENE_MODE_NIGHT                                 = 5,
5497 
5498     /**
5499      * <p>Optimized for still photos of people in low-light
5500      * settings.</p>
5501      */
5502     ACAMERA_CONTROL_SCENE_MODE_NIGHT_PORTRAIT                        = 6,
5503 
5504     /**
5505      * <p>Optimized for dim, indoor settings where flash must
5506      * remain off.</p>
5507      */
5508     ACAMERA_CONTROL_SCENE_MODE_THEATRE                               = 7,
5509 
5510     /**
5511      * <p>Optimized for bright, outdoor beach settings.</p>
5512      */
5513     ACAMERA_CONTROL_SCENE_MODE_BEACH                                 = 8,
5514 
5515     /**
5516      * <p>Optimized for bright, outdoor settings containing snow.</p>
5517      */
5518     ACAMERA_CONTROL_SCENE_MODE_SNOW                                  = 9,
5519 
5520     /**
5521      * <p>Optimized for scenes of the setting sun.</p>
5522      */
5523     ACAMERA_CONTROL_SCENE_MODE_SUNSET                                = 10,
5524 
5525     /**
5526      * <p>Optimized to avoid blurry photos due to small amounts of
5527      * device motion (for example: due to hand shake).</p>
5528      */
5529     ACAMERA_CONTROL_SCENE_MODE_STEADYPHOTO                           = 11,
5530 
5531     /**
5532      * <p>Optimized for nighttime photos of fireworks.</p>
5533      */
5534     ACAMERA_CONTROL_SCENE_MODE_FIREWORKS                             = 12,
5535 
5536     /**
5537      * <p>Optimized for photos of quickly moving people.</p>
5538      * <p>Similar to ACTION.</p>
5539      */
5540     ACAMERA_CONTROL_SCENE_MODE_SPORTS                                = 13,
5541 
5542     /**
5543      * <p>Optimized for dim, indoor settings with multiple moving
5544      * people.</p>
5545      */
5546     ACAMERA_CONTROL_SCENE_MODE_PARTY                                 = 14,
5547 
5548     /**
5549      * <p>Optimized for dim settings where the main light source
5550      * is a flame.</p>
5551      */
5552     ACAMERA_CONTROL_SCENE_MODE_CANDLELIGHT                           = 15,
5553 
5554     /**
5555      * <p>Optimized for accurately capturing a photo of barcode
5556      * for use by camera applications that wish to read the
5557      * barcode value.</p>
5558      */
5559     ACAMERA_CONTROL_SCENE_MODE_BARCODE                               = 16,
5560 
5561     /**
5562      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
5563      * <p>In this scene mode, the camera device captures images
5564      * that keep a larger range of scene illumination levels
5565      * visible in the final image. For example, when taking a
5566      * picture of a object in front of a bright window, both
5567      * the object and the scene through the window may be
5568      * visible when using HDR mode, while in normal AUTO mode,
5569      * one or the other may be poorly exposed. As a tradeoff,
5570      * HDR mode generally takes much longer to capture a single
5571      * image, has no user control, and may have other artifacts
5572      * depending on the HDR method used.</p>
5573      * <p>Therefore, HDR captures operate at a much slower rate
5574      * than regular captures.</p>
5575      * <p>In this mode, on LIMITED or FULL devices, when a request
5576      * is made with a ACAMERA_CONTROL_CAPTURE_INTENT of
5577      * STILL_CAPTURE, the camera device will capture an image
5578      * using a high dynamic range capture technique.  On LEGACY
5579      * devices, captures that target a JPEG-format output will
5580      * be captured with HDR, and the capture intent is not
5581      * relevant.</p>
5582      * <p>The HDR capture may involve the device capturing a burst
5583      * of images internally and combining them into one, or it
5584      * may involve the device using specialized high dynamic
5585      * range capture hardware. In all cases, a single image is
5586      * produced in response to a capture request submitted
5587      * while in HDR mode.</p>
5588      * <p>Since substantial post-processing is generally needed to
5589      * produce an HDR image, only YUV, PRIVATE, and JPEG
5590      * outputs are supported for LIMITED/FULL device HDR
5591      * captures, and only JPEG outputs are supported for LEGACY
5592      * HDR captures. Using a RAW output for HDR capture is not
5593      * supported.</p>
5594      * <p>Some devices may also support always-on HDR, which
5595      * applies HDR processing at full frame rate.  For these
5596      * devices, intents other than STILL_CAPTURE will also
5597      * produce an HDR output with no frame rate impact compared
5598      * to normal operation, though the quality may be lower
5599      * than for STILL_CAPTURE intents.</p>
5600      * <p>If SCENE_MODE_HDR is used with unsupported output types
5601      * or capture intents, the images captured will be as if
5602      * the SCENE_MODE was not enabled at all.</p>
5603      *
5604      * @see ACAMERA_CONTROL_CAPTURE_INTENT
5605      */
5606     ACAMERA_CONTROL_SCENE_MODE_HDR                                   = 18,
5607 
5608 } acamera_metadata_enum_android_control_scene_mode_t;
5609 
5610 // ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
5611 typedef enum acamera_metadata_enum_acamera_control_video_stabilization_mode {
5612     /**
5613      * <p>Video stabilization is disabled.</p>
5614      */
5615     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_OFF                     = 0,
5616 
5617     /**
5618      * <p>Video stabilization is enabled.</p>
5619      */
5620     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_ON                      = 1,
5621 
5622 } acamera_metadata_enum_android_control_video_stabilization_mode_t;
5623 
5624 // ACAMERA_CONTROL_AE_STATE
5625 typedef enum acamera_metadata_enum_acamera_control_ae_state {
5626     /**
5627      * <p>AE is off or recently reset.</p>
5628      * <p>When a camera device is opened, it starts in
5629      * this state. This is a transient state, the camera device may skip reporting
5630      * this state in capture result.</p>
5631      */
5632     ACAMERA_CONTROL_AE_STATE_INACTIVE                                = 0,
5633 
5634     /**
5635      * <p>AE doesn't yet have a good set of control values
5636      * for the current scene.</p>
5637      * <p>This is a transient state, the camera device may skip
5638      * reporting this state in capture result.</p>
5639      */
5640     ACAMERA_CONTROL_AE_STATE_SEARCHING                               = 1,
5641 
5642     /**
5643      * <p>AE has a good set of control values for the
5644      * current scene.</p>
5645      */
5646     ACAMERA_CONTROL_AE_STATE_CONVERGED                               = 2,
5647 
5648     /**
5649      * <p>AE has been locked.</p>
5650      */
5651     ACAMERA_CONTROL_AE_STATE_LOCKED                                  = 3,
5652 
5653     /**
5654      * <p>AE has a good set of control values, but flash
5655      * needs to be fired for good quality still
5656      * capture.</p>
5657      */
5658     ACAMERA_CONTROL_AE_STATE_FLASH_REQUIRED                          = 4,
5659 
5660     /**
5661      * <p>AE has been asked to do a precapture sequence
5662      * and is currently executing it.</p>
5663      * <p>Precapture can be triggered through setting
5664      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to START. Currently
5665      * active and completed (if it causes camera device internal AE lock) precapture
5666      * metering sequence can be canceled through setting
5667      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to CANCEL.</p>
5668      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
5669      * or FLASH_REQUIRED as appropriate. This is a transient
5670      * state, the camera device may skip reporting this state in
5671      * capture result.</p>
5672      *
5673      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
5674      */
5675     ACAMERA_CONTROL_AE_STATE_PRECAPTURE                              = 5,
5676 
5677 } acamera_metadata_enum_android_control_ae_state_t;
5678 
5679 // ACAMERA_CONTROL_AF_STATE
5680 typedef enum acamera_metadata_enum_acamera_control_af_state {
5681     /**
5682      * <p>AF is off or has not yet tried to scan/been asked
5683      * to scan.</p>
5684      * <p>When a camera device is opened, it starts in this
5685      * state. This is a transient state, the camera device may
5686      * skip reporting this state in capture
5687      * result.</p>
5688      */
5689     ACAMERA_CONTROL_AF_STATE_INACTIVE                                = 0,
5690 
5691     /**
5692      * <p>AF is currently performing an AF scan initiated the
5693      * camera device in a continuous autofocus mode.</p>
5694      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
5695      * state, the camera device may skip reporting this state in
5696      * capture result.</p>
5697      */
5698     ACAMERA_CONTROL_AF_STATE_PASSIVE_SCAN                            = 1,
5699 
5700     /**
5701      * <p>AF currently believes it is in focus, but may
5702      * restart scanning at any time.</p>
5703      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
5704      * state, the camera device may skip reporting this state in
5705      * capture result.</p>
5706      */
5707     ACAMERA_CONTROL_AF_STATE_PASSIVE_FOCUSED                         = 2,
5708 
5709     /**
5710      * <p>AF is performing an AF scan because it was
5711      * triggered by AF trigger.</p>
5712      * <p>Only used by AUTO or MACRO AF modes. This is a transient
5713      * state, the camera device may skip reporting this state in
5714      * capture result.</p>
5715      */
5716     ACAMERA_CONTROL_AF_STATE_ACTIVE_SCAN                             = 3,
5717 
5718     /**
5719      * <p>AF believes it is focused correctly and has locked
5720      * focus.</p>
5721      * <p>This state is reached only after an explicit START AF trigger has been
5722      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus has been obtained.</p>
5723      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
5724      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
5725      *
5726      * @see ACAMERA_CONTROL_AF_MODE
5727      * @see ACAMERA_CONTROL_AF_TRIGGER
5728      */
5729     ACAMERA_CONTROL_AF_STATE_FOCUSED_LOCKED                          = 4,
5730 
5731     /**
5732      * <p>AF has failed to focus successfully and has locked
5733      * focus.</p>
5734      * <p>This state is reached only after an explicit START AF trigger has been
5735      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus cannot be obtained.</p>
5736      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
5737      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
5738      *
5739      * @see ACAMERA_CONTROL_AF_MODE
5740      * @see ACAMERA_CONTROL_AF_TRIGGER
5741      */
5742     ACAMERA_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED                      = 5,
5743 
5744     /**
5745      * <p>AF finished a passive scan without finding focus,
5746      * and may restart scanning at any time.</p>
5747      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
5748      * device may skip reporting this state in capture result.</p>
5749      * <p>LEGACY camera devices do not support this state. When a passive
5750      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
5751      */
5752     ACAMERA_CONTROL_AF_STATE_PASSIVE_UNFOCUSED                       = 6,
5753 
5754 } acamera_metadata_enum_android_control_af_state_t;
5755 
5756 // ACAMERA_CONTROL_AWB_STATE
5757 typedef enum acamera_metadata_enum_acamera_control_awb_state {
5758     /**
5759      * <p>AWB is not in auto mode, or has not yet started metering.</p>
5760      * <p>When a camera device is opened, it starts in this
5761      * state. This is a transient state, the camera device may
5762      * skip reporting this state in capture
5763      * result.</p>
5764      */
5765     ACAMERA_CONTROL_AWB_STATE_INACTIVE                               = 0,
5766 
5767     /**
5768      * <p>AWB doesn't yet have a good set of control
5769      * values for the current scene.</p>
5770      * <p>This is a transient state, the camera device
5771      * may skip reporting this state in capture result.</p>
5772      */
5773     ACAMERA_CONTROL_AWB_STATE_SEARCHING                              = 1,
5774 
5775     /**
5776      * <p>AWB has a good set of control values for the
5777      * current scene.</p>
5778      */
5779     ACAMERA_CONTROL_AWB_STATE_CONVERGED                              = 2,
5780 
5781     /**
5782      * <p>AWB has been locked.</p>
5783      */
5784     ACAMERA_CONTROL_AWB_STATE_LOCKED                                 = 3,
5785 
5786 } acamera_metadata_enum_android_control_awb_state_t;
5787 
5788 // ACAMERA_CONTROL_AE_LOCK_AVAILABLE
5789 typedef enum acamera_metadata_enum_acamera_control_ae_lock_available {
5790     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_FALSE                          = 0,
5791 
5792     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_TRUE                           = 1,
5793 
5794 } acamera_metadata_enum_android_control_ae_lock_available_t;
5795 
5796 // ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
5797 typedef enum acamera_metadata_enum_acamera_control_awb_lock_available {
5798     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_FALSE                         = 0,
5799 
5800     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_TRUE                          = 1,
5801 
5802 } acamera_metadata_enum_android_control_awb_lock_available_t;
5803 
5804 // ACAMERA_CONTROL_ENABLE_ZSL
5805 typedef enum acamera_metadata_enum_acamera_control_enable_zsl {
5806     /**
5807      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE must be captured
5808      * after previous requests.</p>
5809      *
5810      * @see ACAMERA_CONTROL_CAPTURE_INTENT
5811      */
5812     ACAMERA_CONTROL_ENABLE_ZSL_FALSE                                 = 0,
5813 
5814     /**
5815      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may or may not be
5816      * captured before previous requests.</p>
5817      *
5818      * @see ACAMERA_CONTROL_CAPTURE_INTENT
5819      */
5820     ACAMERA_CONTROL_ENABLE_ZSL_TRUE                                  = 1,
5821 
5822 } acamera_metadata_enum_android_control_enable_zsl_t;
5823 
5824 
5825 
5826 // ACAMERA_EDGE_MODE
5827 typedef enum acamera_metadata_enum_acamera_edge_mode {
5828     /**
5829      * <p>No edge enhancement is applied.</p>
5830      */
5831     ACAMERA_EDGE_MODE_OFF                                            = 0,
5832 
5833     /**
5834      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
5835      * relative to sensor output. It may be the same as OFF if edge enhancement will
5836      * slow down frame rate relative to sensor.</p>
5837      */
5838     ACAMERA_EDGE_MODE_FAST                                           = 1,
5839 
5840     /**
5841      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
5842      */
5843     ACAMERA_EDGE_MODE_HIGH_QUALITY                                   = 2,
5844 
5845     /**
5846      * <p>Edge enhancement is applied at different levels for different output streams,
5847      * based on resolution. Streams at maximum recording resolution (see {@link
5848      * ACameraDevice_createCaptureSession}) or below have
5849      * edge enhancement applied, while higher-resolution streams have no edge enhancement
5850      * applied. The level of edge enhancement for low-resolution streams is tuned so that
5851      * frame rate is not impacted, and the quality is equal to or better than FAST (since it
5852      * is only applied to lower-resolution outputs, quality may improve from FAST).</p>
5853      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
5854      * with YUV or PRIVATE reprocessing, where the application continuously captures
5855      * high-resolution intermediate buffers into a circular buffer, from which a final image is
5856      * produced via reprocessing when a user takes a picture.  For such a use case, the
5857      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
5858      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
5859      * buffers (used for recording or preview, generally) need edge enhancement applied for
5860      * reasonable preview quality.</p>
5861      * <p>This mode is guaranteed to be supported by devices that support either the
5862      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
5863      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
5864      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
5865      *
5866      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
5867      */
5868     ACAMERA_EDGE_MODE_ZERO_SHUTTER_LAG                               = 3,
5869 
5870 } acamera_metadata_enum_android_edge_mode_t;
5871 
5872 
5873 // ACAMERA_FLASH_MODE
5874 typedef enum acamera_metadata_enum_acamera_flash_mode {
5875     /**
5876      * <p>Do not fire the flash for this capture.</p>
5877      */
5878     ACAMERA_FLASH_MODE_OFF                                           = 0,
5879 
5880     /**
5881      * <p>If the flash is available and charged, fire flash
5882      * for this capture.</p>
5883      */
5884     ACAMERA_FLASH_MODE_SINGLE                                        = 1,
5885 
5886     /**
5887      * <p>Transition flash to continuously on.</p>
5888      */
5889     ACAMERA_FLASH_MODE_TORCH                                         = 2,
5890 
5891 } acamera_metadata_enum_android_flash_mode_t;
5892 
5893 // ACAMERA_FLASH_STATE
5894 typedef enum acamera_metadata_enum_acamera_flash_state {
5895     /**
5896      * <p>No flash on camera.</p>
5897      */
5898     ACAMERA_FLASH_STATE_UNAVAILABLE                                  = 0,
5899 
5900     /**
5901      * <p>Flash is charging and cannot be fired.</p>
5902      */
5903     ACAMERA_FLASH_STATE_CHARGING                                     = 1,
5904 
5905     /**
5906      * <p>Flash is ready to fire.</p>
5907      */
5908     ACAMERA_FLASH_STATE_READY                                        = 2,
5909 
5910     /**
5911      * <p>Flash fired for this capture.</p>
5912      */
5913     ACAMERA_FLASH_STATE_FIRED                                        = 3,
5914 
5915     /**
5916      * <p>Flash partially illuminated this frame.</p>
5917      * <p>This is usually due to the next or previous frame having
5918      * the flash fire, and the flash spilling into this capture
5919      * due to hardware limitations.</p>
5920      */
5921     ACAMERA_FLASH_STATE_PARTIAL                                      = 4,
5922 
5923 } acamera_metadata_enum_android_flash_state_t;
5924 
5925 
5926 // ACAMERA_FLASH_INFO_AVAILABLE
5927 typedef enum acamera_metadata_enum_acamera_flash_info_available {
5928     ACAMERA_FLASH_INFO_AVAILABLE_FALSE                               = 0,
5929 
5930     ACAMERA_FLASH_INFO_AVAILABLE_TRUE                                = 1,
5931 
5932 } acamera_metadata_enum_android_flash_info_available_t;
5933 
5934 
5935 // ACAMERA_HOT_PIXEL_MODE
5936 typedef enum acamera_metadata_enum_acamera_hot_pixel_mode {
5937     /**
5938      * <p>No hot pixel correction is applied.</p>
5939      * <p>The frame rate must not be reduced relative to sensor raw output
5940      * for this option.</p>
5941      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
5942      *
5943      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
5944      */
5945     ACAMERA_HOT_PIXEL_MODE_OFF                                       = 0,
5946 
5947     /**
5948      * <p>Hot pixel correction is applied, without reducing frame
5949      * rate relative to sensor raw output.</p>
5950      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
5951      *
5952      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
5953      */
5954     ACAMERA_HOT_PIXEL_MODE_FAST                                      = 1,
5955 
5956     /**
5957      * <p>High-quality hot pixel correction is applied, at a cost
5958      * of possibly reduced frame rate relative to sensor raw output.</p>
5959      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
5960      *
5961      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
5962      */
5963     ACAMERA_HOT_PIXEL_MODE_HIGH_QUALITY                              = 2,
5964 
5965 } acamera_metadata_enum_android_hot_pixel_mode_t;
5966 
5967 
5968 
5969 // ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
5970 typedef enum acamera_metadata_enum_acamera_lens_optical_stabilization_mode {
5971     /**
5972      * <p>Optical stabilization is unavailable.</p>
5973      */
5974     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_OFF                      = 0,
5975 
5976     /**
5977      * <p>Optical stabilization is enabled.</p>
5978      */
5979     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_ON                       = 1,
5980 
5981 } acamera_metadata_enum_android_lens_optical_stabilization_mode_t;
5982 
5983 // ACAMERA_LENS_FACING
5984 typedef enum acamera_metadata_enum_acamera_lens_facing {
5985     /**
5986      * <p>The camera device faces the same direction as the device's screen.</p>
5987      */
5988     ACAMERA_LENS_FACING_FRONT                                        = 0,
5989 
5990     /**
5991      * <p>The camera device faces the opposite direction as the device's screen.</p>
5992      */
5993     ACAMERA_LENS_FACING_BACK                                         = 1,
5994 
5995     /**
5996      * <p>The camera device is an external camera, and has no fixed facing relative to the
5997      * device's screen.</p>
5998      */
5999     ACAMERA_LENS_FACING_EXTERNAL                                     = 2,
6000 
6001 } acamera_metadata_enum_android_lens_facing_t;
6002 
6003 // ACAMERA_LENS_STATE
6004 typedef enum acamera_metadata_enum_acamera_lens_state {
6005     /**
6006      * <p>The lens parameters (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
6007      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE) are not changing.</p>
6008      *
6009      * @see ACAMERA_LENS_APERTURE
6010      * @see ACAMERA_LENS_FILTER_DENSITY
6011      * @see ACAMERA_LENS_FOCAL_LENGTH
6012      * @see ACAMERA_LENS_FOCUS_DISTANCE
6013      */
6014     ACAMERA_LENS_STATE_STATIONARY                                    = 0,
6015 
6016     /**
6017      * <p>One or several of the lens parameters
6018      * (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
6019      * ACAMERA_LENS_FILTER_DENSITY or ACAMERA_LENS_APERTURE) is
6020      * currently changing.</p>
6021      *
6022      * @see ACAMERA_LENS_APERTURE
6023      * @see ACAMERA_LENS_FILTER_DENSITY
6024      * @see ACAMERA_LENS_FOCAL_LENGTH
6025      * @see ACAMERA_LENS_FOCUS_DISTANCE
6026      */
6027     ACAMERA_LENS_STATE_MOVING                                        = 1,
6028 
6029 } acamera_metadata_enum_android_lens_state_t;
6030 
6031 
6032 // ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
6033 typedef enum acamera_metadata_enum_acamera_lens_info_focus_distance_calibration {
6034     /**
6035      * <p>The lens focus distance is not accurate, and the units used for
6036      * ACAMERA_LENS_FOCUS_DISTANCE do not correspond to any physical units.</p>
6037      * <p>Setting the lens to the same focus distance on separate occasions may
6038      * result in a different real focus distance, depending on factors such
6039      * as the orientation of the device, the age of the focusing mechanism,
6040      * and the device temperature. The focus distance value will still be
6041      * in the range of <code>[0, ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE]</code>, where 0
6042      * represents the farthest focus.</p>
6043      *
6044      * @see ACAMERA_LENS_FOCUS_DISTANCE
6045      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
6046      */
6047     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED        = 0,
6048 
6049     /**
6050      * <p>The lens focus distance is measured in diopters.</p>
6051      * <p>However, setting the lens to the same focus distance
6052      * on separate occasions may result in a different real
6053      * focus distance, depending on factors such as the
6054      * orientation of the device, the age of the focusing
6055      * mechanism, and the device temperature.</p>
6056      */
6057     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE         = 1,
6058 
6059     /**
6060      * <p>The lens focus distance is measured in diopters, and
6061      * is calibrated.</p>
6062      * <p>The lens mechanism is calibrated so that setting the
6063      * same focus distance is repeatable on multiple
6064      * occasions with good accuracy, and the focus distance
6065      * corresponds to the real physical distance to the plane
6066      * of best focus.</p>
6067      */
6068     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED          = 2,
6069 
6070 } acamera_metadata_enum_android_lens_info_focus_distance_calibration_t;
6071 
6072 
6073 // ACAMERA_NOISE_REDUCTION_MODE
6074 typedef enum acamera_metadata_enum_acamera_noise_reduction_mode {
6075     /**
6076      * <p>No noise reduction is applied.</p>
6077      */
6078     ACAMERA_NOISE_REDUCTION_MODE_OFF                                 = 0,
6079 
6080     /**
6081      * <p>Noise reduction is applied without reducing frame rate relative to sensor
6082      * output. It may be the same as OFF if noise reduction will reduce frame rate
6083      * relative to sensor.</p>
6084      */
6085     ACAMERA_NOISE_REDUCTION_MODE_FAST                                = 1,
6086 
6087     /**
6088      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
6089      * rate relative to sensor output.</p>
6090      */
6091     ACAMERA_NOISE_REDUCTION_MODE_HIGH_QUALITY                        = 2,
6092 
6093     /**
6094      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
6095      * sensor output. </p>
6096      */
6097     ACAMERA_NOISE_REDUCTION_MODE_MINIMAL                             = 3,
6098 
6099     /**
6100      * <p>Noise reduction is applied at different levels for different output streams,
6101      * based on resolution. Streams at maximum recording resolution (see {@link
6102      * ACameraDevice_createCaptureSession}) or below have noise
6103      * reduction applied, while higher-resolution streams have MINIMAL (if supported) or no
6104      * noise reduction applied (if MINIMAL is not supported.) The degree of noise reduction
6105      * for low-resolution streams is tuned so that frame rate is not impacted, and the quality
6106      * is equal to or better than FAST (since it is only applied to lower-resolution outputs,
6107      * quality may improve from FAST).</p>
6108      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
6109      * with YUV or PRIVATE reprocessing, where the application continuously captures
6110      * high-resolution intermediate buffers into a circular buffer, from which a final image is
6111      * produced via reprocessing when a user takes a picture.  For such a use case, the
6112      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
6113      * preview and to avoid over-applying noise filtering when reprocessing, while
6114      * low-resolution buffers (used for recording or preview, generally) need noise reduction
6115      * applied for reasonable preview quality.</p>
6116      * <p>This mode is guaranteed to be supported by devices that support either the
6117      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
6118      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
6119      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
6120      *
6121      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6122      */
6123     ACAMERA_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG                    = 4,
6124 
6125 } acamera_metadata_enum_android_noise_reduction_mode_t;
6126 
6127 
6128 
6129 // ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6130 typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
6131     /**
6132      * <p>The minimal set of capabilities that every camera
6133      * device (regardless of ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL)
6134      * supports.</p>
6135      * <p>This capability is listed by all normal devices, and
6136      * indicates that the camera device has a feature set
6137      * that's comparable to the baseline requirements for the
6138      * older android.hardware.Camera API.</p>
6139      * <p>Devices with the DEPTH_OUTPUT capability might not list this
6140      * capability, indicating that they support only depth measurement,
6141      * not standard color output.</p>
6142      *
6143      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
6144      */
6145     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE       = 0,
6146 
6147     /**
6148      * <p>The camera device can be manually controlled (3A algorithms such
6149      * as auto-exposure, and auto-focus can be bypassed).
6150      * The camera device supports basic manual control of the sensor image
6151      * acquisition related stages. This means the following controls are
6152      * guaranteed to be supported:</p>
6153      * <ul>
6154      * <li>Manual frame duration control<ul>
6155      * <li>ACAMERA_SENSOR_FRAME_DURATION</li>
6156      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
6157      * </ul>
6158      * </li>
6159      * <li>Manual exposure control<ul>
6160      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
6161      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
6162      * </ul>
6163      * </li>
6164      * <li>Manual sensitivity control<ul>
6165      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
6166      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
6167      * </ul>
6168      * </li>
6169      * <li>Manual lens control (if the lens is adjustable)<ul>
6170      * <li>ACAMERA_LENS_*</li>
6171      * </ul>
6172      * </li>
6173      * <li>Manual flash control (if a flash unit is present)<ul>
6174      * <li>ACAMERA_FLASH_*</li>
6175      * </ul>
6176      * </li>
6177      * <li>Manual black level locking<ul>
6178      * <li>ACAMERA_BLACK_LEVEL_LOCK</li>
6179      * </ul>
6180      * </li>
6181      * <li>Auto exposure lock<ul>
6182      * <li>ACAMERA_CONTROL_AE_LOCK</li>
6183      * </ul>
6184      * </li>
6185      * </ul>
6186      * <p>If any of the above 3A algorithms are enabled, then the camera
6187      * device will accurately report the values applied by 3A in the
6188      * result.</p>
6189      * <p>A given camera device may also support additional manual sensor controls,
6190      * but this capability only covers the above list of controls.</p>
6191      * <p>If this is supported, android.scaler.streamConfigurationMap will
6192      * additionally return a min frame duration that is greater than
6193      * zero for each supported size-format combination.</p>
6194      *
6195      * @see ACAMERA_BLACK_LEVEL_LOCK
6196      * @see ACAMERA_CONTROL_AE_LOCK
6197      * @see ACAMERA_SENSOR_EXPOSURE_TIME
6198      * @see ACAMERA_SENSOR_FRAME_DURATION
6199      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
6200      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
6201      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
6202      * @see ACAMERA_SENSOR_SENSITIVITY
6203      */
6204     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR             = 1,
6205 
6206     /**
6207      * <p>The camera device post-processing stages can be manually controlled.
6208      * The camera device supports basic manual control of the image post-processing
6209      * stages. This means the following controls are guaranteed to be supported:</p>
6210      * <ul>
6211      * <li>
6212      * <p>Manual tonemap control</p>
6213      * <ul>
6214      * <li>android.tonemap.curve</li>
6215      * <li>ACAMERA_TONEMAP_MODE</li>
6216      * <li>ACAMERA_TONEMAP_MAX_CURVE_POINTS</li>
6217      * <li>ACAMERA_TONEMAP_GAMMA</li>
6218      * <li>ACAMERA_TONEMAP_PRESET_CURVE</li>
6219      * </ul>
6220      * </li>
6221      * <li>
6222      * <p>Manual white balance control</p>
6223      * <ul>
6224      * <li>ACAMERA_COLOR_CORRECTION_TRANSFORM</li>
6225      * <li>ACAMERA_COLOR_CORRECTION_GAINS</li>
6226      * </ul>
6227      * </li>
6228      * <li>Manual lens shading map control<ul>
6229      * <li>ACAMERA_SHADING_MODE</li>
6230      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE</li>
6231      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP</li>
6232      * <li>ACAMERA_LENS_INFO_SHADING_MAP_SIZE</li>
6233      * </ul>
6234      * </li>
6235      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
6236      * <li>ACAMERA_COLOR_CORRECTION_ABERRATION_MODE</li>
6237      * <li>ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES</li>
6238      * </ul>
6239      * </li>
6240      * <li>Auto white balance lock<ul>
6241      * <li>ACAMERA_CONTROL_AWB_LOCK</li>
6242      * </ul>
6243      * </li>
6244      * </ul>
6245      * <p>If auto white balance is enabled, then the camera device
6246      * will accurately report the values applied by AWB in the result.</p>
6247      * <p>A given camera device may also support additional post-processing
6248      * controls, but this capability only covers the above list of controls.</p>
6249      *
6250      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
6251      * @see ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
6252      * @see ACAMERA_COLOR_CORRECTION_GAINS
6253      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6254      * @see ACAMERA_CONTROL_AWB_LOCK
6255      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
6256      * @see ACAMERA_SHADING_MODE
6257      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
6258      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
6259      * @see ACAMERA_TONEMAP_GAMMA
6260      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
6261      * @see ACAMERA_TONEMAP_MODE
6262      * @see ACAMERA_TONEMAP_PRESET_CURVE
6263      */
6264     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING    = 2,
6265 
6266     /**
6267      * <p>The camera device supports outputting RAW buffers and
6268      * metadata for interpreting them.</p>
6269      * <p>Devices supporting the RAW capability allow both for
6270      * saving DNG files, and for direct application processing of
6271      * raw sensor images.</p>
6272      * <ul>
6273      * <li>RAW_SENSOR is supported as an output format.</li>
6274      * <li>The maximum available resolution for RAW_SENSOR streams
6275      *   will match either the value in
6276      *   ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE or
6277      *   ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</li>
6278      * <li>All DNG-related optional metadata entries are provided
6279      *   by the camera device.</li>
6280      * </ul>
6281      *
6282      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
6283      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
6284      */
6285     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_RAW                       = 3,
6286 
6287     /**
6288      * <p>The camera device supports accurately reporting the sensor settings for many of
6289      * the sensor controls while the built-in 3A algorithm is running.  This allows
6290      * reporting of sensor settings even when these settings cannot be manually changed.</p>
6291      * <p>The values reported for the following controls are guaranteed to be available
6292      * in the CaptureResult, including when 3A is enabled:</p>
6293      * <ul>
6294      * <li>Exposure control<ul>
6295      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
6296      * </ul>
6297      * </li>
6298      * <li>Sensitivity control<ul>
6299      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
6300      * </ul>
6301      * </li>
6302      * <li>Lens controls (if the lens is adjustable)<ul>
6303      * <li>ACAMERA_LENS_FOCUS_DISTANCE</li>
6304      * <li>ACAMERA_LENS_APERTURE</li>
6305      * </ul>
6306      * </li>
6307      * </ul>
6308      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
6309      * always be included if the MANUAL_SENSOR capability is available.</p>
6310      *
6311      * @see ACAMERA_LENS_APERTURE
6312      * @see ACAMERA_LENS_FOCUS_DISTANCE
6313      * @see ACAMERA_SENSOR_EXPOSURE_TIME
6314      * @see ACAMERA_SENSOR_SENSITIVITY
6315      */
6316     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS      = 5,
6317 
6318     /**
6319      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
6320      * second, in at least the uncompressed YUV format, when post-processing settings are set
6321      * to FAST. Additionally, maximum-resolution images can be captured at &gt;= 10 frames
6322      * per second.  Here, 'high resolution' means at least 8 megapixels, or the maximum
6323      * resolution of the device, whichever is smaller.</p>
6324      * <p>More specifically, this means that at least one output {@link
6325      * AIMAGE_FORMAT_YUV_420_888} size listed in
6326      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS} is larger or equal to the
6327      * 'high resolution' defined above, and can be captured at at least 20 fps.
6328      * For the largest {@link AIMAGE_FORMAT_YUV_420_888} size listed in
6329      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS}, camera device can capture this
6330      * size for at least 10 frames per second.
6331      * Also the ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES entry lists at least one FPS range
6332      * where the minimum FPS is &gt;= 1 / minimumFrameDuration for the largest YUV_420_888 size.</p>
6333      * <p>If the device supports the {@link AIMAGE_FORMAT_RAW10}, {@link
6334      * AIMAGE_FORMAT_RAW12}, then those can also be captured at the same rate
6335      * as the maximum-size YUV_420_888 resolution is.</p>
6336      * <p>In addition, the ACAMERA_SYNC_MAX_LATENCY field is guaranted to have a value between 0
6337      * and 4, inclusive. ACAMERA_CONTROL_AE_LOCK_AVAILABLE and ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
6338      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
6339      * consistent image output.</p>
6340      *
6341      * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
6342      * @see ACAMERA_CONTROL_AE_LOCK_AVAILABLE
6343      * @see ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
6344      * @see ACAMERA_SYNC_MAX_LATENCY
6345      */
6346     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE             = 6,
6347 
6348     /**
6349      * <p>The camera device can produce depth measurements from its field of view.</p>
6350      * <p>This capability requires the camera device to support the following:</p>
6351      * <ul>
6352      * <li>{@link AIMAGE_FORMAT_DEPTH16} is supported as an output format.</li>
6353      * <li>{@link AIMAGE_FORMAT_DEPTH_POINT_CLOUD} is optionally supported as an
6354      *   output format.</li>
6355      * <li>This camera device, and all camera devices with the same ACAMERA_LENS_FACING,
6356      *   will list the following calibration entries in {@link ACameraMetadata} from both
6357      *   {@link ACameraManager_getCameraCharacteristics} and
6358      *   {@link ACameraCaptureSession_captureCallback_result}:<ul>
6359      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
6360      * <li>ACAMERA_LENS_POSE_ROTATION</li>
6361      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
6362      * <li>ACAMERA_LENS_RADIAL_DISTORTION</li>
6363      * </ul>
6364      * </li>
6365      * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li>
6366      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
6367      *   normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16
6368      *   format.</li>
6369      * </ul>
6370      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
6371      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
6372      * should be accounted for (see
6373      * {@link ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS}).
6374      * On a device that supports both depth and color-based output, to enable smooth preview,
6375      * using a repeating burst is recommended, where a depth-output target is only included
6376      * once every N frames, where N is the ratio between preview output rate and depth output
6377      * rate, including depth stall time.</p>
6378      *
6379      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
6380      * @see ACAMERA_LENS_FACING
6381      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
6382      * @see ACAMERA_LENS_POSE_ROTATION
6383      * @see ACAMERA_LENS_POSE_TRANSLATION
6384      * @see ACAMERA_LENS_RADIAL_DISTORTION
6385      */
6386     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT              = 8,
6387 
6388 } acamera_metadata_enum_android_request_available_capabilities_t;
6389 
6390 
6391 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
6392 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations {
6393     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT            = 0,
6394 
6395     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT             = 1,
6396 
6397 } acamera_metadata_enum_android_scaler_available_stream_configurations_t;
6398 
6399 // ACAMERA_SCALER_CROPPING_TYPE
6400 typedef enum acamera_metadata_enum_acamera_scaler_cropping_type {
6401     /**
6402      * <p>The camera device only supports centered crop regions.</p>
6403      */
6404     ACAMERA_SCALER_CROPPING_TYPE_CENTER_ONLY                         = 0,
6405 
6406     /**
6407      * <p>The camera device supports arbitrarily chosen crop regions.</p>
6408      */
6409     ACAMERA_SCALER_CROPPING_TYPE_FREEFORM                            = 1,
6410 
6411 } acamera_metadata_enum_android_scaler_cropping_type_t;
6412 
6413 
6414 // ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
6415 typedef enum acamera_metadata_enum_acamera_sensor_reference_illuminant1 {
6416     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT                    = 1,
6417 
6418     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT                 = 2,
6419 
6420     /**
6421      * <p>Incandescent light</p>
6422      */
6423     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN                    = 3,
6424 
6425     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLASH                       = 4,
6426 
6427     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER                = 9,
6428 
6429     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER              = 10,
6430 
6431     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_SHADE                       = 11,
6432 
6433     /**
6434      * <p>D 5700 - 7100K</p>
6435      */
6436     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT        = 12,
6437 
6438     /**
6439      * <p>N 4600 - 5400K</p>
6440      */
6441     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT       = 13,
6442 
6443     /**
6444      * <p>W 3900 - 4500K</p>
6445      */
6446     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT      = 14,
6447 
6448     /**
6449      * <p>WW 3200 - 3700K</p>
6450      */
6451     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT           = 15,
6452 
6453     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A                  = 17,
6454 
6455     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B                  = 18,
6456 
6457     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C                  = 19,
6458 
6459     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D55                         = 20,
6460 
6461     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D65                         = 21,
6462 
6463     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D75                         = 22,
6464 
6465     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D50                         = 23,
6466 
6467     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN         = 24,
6468 
6469 } acamera_metadata_enum_android_sensor_reference_illuminant1_t;
6470 
6471 // ACAMERA_SENSOR_TEST_PATTERN_MODE
6472 typedef enum acamera_metadata_enum_acamera_sensor_test_pattern_mode {
6473     /**
6474      * <p>No test pattern mode is used, and the camera
6475      * device returns captures from the image sensor.</p>
6476      * <p>This is the default if the key is not set.</p>
6477      */
6478     ACAMERA_SENSOR_TEST_PATTERN_MODE_OFF                             = 0,
6479 
6480     /**
6481      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
6482      * respective color channel provided in
6483      * ACAMERA_SENSOR_TEST_PATTERN_DATA.</p>
6484      * <p>For example:</p>
6485      * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
6486      * </code></pre>
6487      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
6488      * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
6489      * </code></pre>
6490      * <p>All red pixels are 100% red. Only the odd green pixels
6491      * are 100% green. All blue pixels are 100% black.</p>
6492      *
6493      * @see ACAMERA_SENSOR_TEST_PATTERN_DATA
6494      */
6495     ACAMERA_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR                     = 1,
6496 
6497     /**
6498      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
6499      * <p>The vertical bars (left-to-right) are as follows:</p>
6500      * <ul>
6501      * <li>100% white</li>
6502      * <li>yellow</li>
6503      * <li>cyan</li>
6504      * <li>green</li>
6505      * <li>magenta</li>
6506      * <li>red</li>
6507      * <li>blue</li>
6508      * <li>black</li>
6509      * </ul>
6510      * <p>In general the image would look like the following:</p>
6511      * <pre><code>W Y C G M R B K
6512      * W Y C G M R B K
6513      * W Y C G M R B K
6514      * W Y C G M R B K
6515      * W Y C G M R B K
6516      * . . . . . . . .
6517      * . . . . . . . .
6518      * . . . . . . . .
6519      *
6520      * (B = Blue, K = Black)
6521      * </code></pre>
6522      * <p>Each bar should take up 1/8 of the sensor pixel array width.
6523      * When this is not possible, the bar size should be rounded
6524      * down to the nearest integer and the pattern can repeat
6525      * on the right side.</p>
6526      * <p>Each bar's height must always take up the full sensor
6527      * pixel array height.</p>
6528      * <p>Each pixel in this test pattern must be set to either
6529      * 0% intensity or 100% intensity.</p>
6530      */
6531     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS                      = 2,
6532 
6533     /**
6534      * <p>The test pattern is similar to COLOR_BARS, except that
6535      * each bar should start at its specified color at the top,
6536      * and fade to gray at the bottom.</p>
6537      * <p>Furthermore each bar is further subdivided into a left and
6538      * right half. The left half should have a smooth gradient,
6539      * and the right half should have a quantized gradient.</p>
6540      * <p>In particular, the right half's should consist of blocks of the
6541      * same color for 1/16th active sensor pixel array width.</p>
6542      * <p>The least significant bits in the quantized gradient should
6543      * be copied from the most significant bits of the smooth gradient.</p>
6544      * <p>The height of each bar should always be a multiple of 128.
6545      * When this is not the case, the pattern should repeat at the bottom
6546      * of the image.</p>
6547      */
6548     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY         = 3,
6549 
6550     /**
6551      * <p>All pixel data is replaced by a pseudo-random sequence
6552      * generated from a PN9 512-bit sequence (typically implemented
6553      * in hardware with a linear feedback shift register).</p>
6554      * <p>The generator should be reset at the beginning of each frame,
6555      * and thus each subsequent raw frame with this test pattern should
6556      * be exactly the same as the last.</p>
6557      */
6558     ACAMERA_SENSOR_TEST_PATTERN_MODE_PN9                             = 4,
6559 
6560     /**
6561      * <p>The first custom test pattern. All custom patterns that are
6562      * available only on this camera device are at least this numeric
6563      * value.</p>
6564      * <p>All of the custom test patterns will be static
6565      * (that is the raw image must not vary from frame to frame).</p>
6566      */
6567     ACAMERA_SENSOR_TEST_PATTERN_MODE_CUSTOM1                         = 256,
6568 
6569 } acamera_metadata_enum_android_sensor_test_pattern_mode_t;
6570 
6571 
6572 // ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
6573 typedef enum acamera_metadata_enum_acamera_sensor_info_color_filter_arrangement {
6574     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB                = 0,
6575 
6576     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG                = 1,
6577 
6578     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG                = 2,
6579 
6580     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR                = 3,
6581 
6582     /**
6583      * <p>Sensor is not Bayer; output has 3 16-bit
6584      * values for each pixel, instead of just 1 16-bit value
6585      * per pixel.</p>
6586      */
6587     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB                 = 4,
6588 
6589 } acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
6590 
6591 // ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
6592 typedef enum acamera_metadata_enum_acamera_sensor_info_timestamp_source {
6593     /**
6594      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in nanoseconds and monotonic,
6595      * but can not be compared to timestamps from other subsystems
6596      * (e.g. accelerometer, gyro etc.), or other instances of the same or different
6597      * camera devices in the same system. Timestamps between streams and results for
6598      * a single camera instance are comparable, and the timestamps for all buffers
6599      * and the result metadata generated by a single capture are identical.</p>
6600      *
6601      * @see ACAMERA_SENSOR_TIMESTAMP
6602      */
6603     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN                     = 0,
6604 
6605     /**
6606      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in the same timebase as
6607      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">elapsedRealtimeNanos</a>
6608      * (or CLOCK_BOOTTIME), and they can be compared to other timestamps using that base.</p>
6609      *
6610      * @see ACAMERA_SENSOR_TIMESTAMP
6611      */
6612     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME                    = 1,
6613 
6614 } acamera_metadata_enum_android_sensor_info_timestamp_source_t;
6615 
6616 // ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
6617 typedef enum acamera_metadata_enum_acamera_sensor_info_lens_shading_applied {
6618     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE                   = 0,
6619 
6620     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE                    = 1,
6621 
6622 } acamera_metadata_enum_android_sensor_info_lens_shading_applied_t;
6623 
6624 
6625 // ACAMERA_SHADING_MODE
6626 typedef enum acamera_metadata_enum_acamera_shading_mode {
6627     /**
6628      * <p>No lens shading correction is applied.</p>
6629      */
6630     ACAMERA_SHADING_MODE_OFF                                         = 0,
6631 
6632     /**
6633      * <p>Apply lens shading corrections, without slowing
6634      * frame rate relative to sensor raw output</p>
6635      */
6636     ACAMERA_SHADING_MODE_FAST                                        = 1,
6637 
6638     /**
6639      * <p>Apply high-quality lens shading correction, at the
6640      * cost of possibly reduced frame rate.</p>
6641      */
6642     ACAMERA_SHADING_MODE_HIGH_QUALITY                                = 2,
6643 
6644 } acamera_metadata_enum_android_shading_mode_t;
6645 
6646 
6647 // ACAMERA_STATISTICS_FACE_DETECT_MODE
6648 typedef enum acamera_metadata_enum_acamera_statistics_face_detect_mode {
6649     /**
6650      * <p>Do not include face detection statistics in capture
6651      * results.</p>
6652      */
6653     ACAMERA_STATISTICS_FACE_DETECT_MODE_OFF                          = 0,
6654 
6655     /**
6656      * <p>Return face rectangle and confidence values only.</p>
6657      */
6658     ACAMERA_STATISTICS_FACE_DETECT_MODE_SIMPLE                       = 1,
6659 
6660     /**
6661      * <p>Return all face
6662      * metadata.</p>
6663      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
6664      */
6665     ACAMERA_STATISTICS_FACE_DETECT_MODE_FULL                         = 2,
6666 
6667 } acamera_metadata_enum_android_statistics_face_detect_mode_t;
6668 
6669 // ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
6670 typedef enum acamera_metadata_enum_acamera_statistics_hot_pixel_map_mode {
6671     /**
6672      * <p>Hot pixel map production is disabled.</p>
6673      */
6674     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_OFF                        = 0,
6675 
6676     /**
6677      * <p>Hot pixel map production is enabled.</p>
6678      */
6679     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_ON                         = 1,
6680 
6681 } acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t;
6682 
6683 // ACAMERA_STATISTICS_SCENE_FLICKER
6684 typedef enum acamera_metadata_enum_acamera_statistics_scene_flicker {
6685     /**
6686      * <p>The camera device does not detect any flickering illumination
6687      * in the current scene.</p>
6688      */
6689     ACAMERA_STATISTICS_SCENE_FLICKER_NONE                            = 0,
6690 
6691     /**
6692      * <p>The camera device detects illumination flickering at 50Hz
6693      * in the current scene.</p>
6694      */
6695     ACAMERA_STATISTICS_SCENE_FLICKER_50HZ                            = 1,
6696 
6697     /**
6698      * <p>The camera device detects illumination flickering at 60Hz
6699      * in the current scene.</p>
6700      */
6701     ACAMERA_STATISTICS_SCENE_FLICKER_60HZ                            = 2,
6702 
6703 } acamera_metadata_enum_android_statistics_scene_flicker_t;
6704 
6705 // ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
6706 typedef enum acamera_metadata_enum_acamera_statistics_lens_shading_map_mode {
6707     /**
6708      * <p>Do not include a lens shading map in the capture result.</p>
6709      */
6710     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_OFF                     = 0,
6711 
6712     /**
6713      * <p>Include a lens shading map in the capture result.</p>
6714      */
6715     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_ON                      = 1,
6716 
6717 } acamera_metadata_enum_android_statistics_lens_shading_map_mode_t;
6718 
6719 
6720 
6721 // ACAMERA_TONEMAP_MODE
6722 typedef enum acamera_metadata_enum_acamera_tonemap_mode {
6723     /**
6724      * <p>Use the tone mapping curve specified in
6725      * the ACAMERA_TONEMAPCURVE_* entries.</p>
6726      * <p>All color enhancement and tonemapping must be disabled, except
6727      * for applying the tonemapping curve specified by
6728      * android.tonemap.curve.</p>
6729      * <p>Must not slow down frame rate relative to raw
6730      * sensor output.</p>
6731      */
6732     ACAMERA_TONEMAP_MODE_CONTRAST_CURVE                              = 0,
6733 
6734     /**
6735      * <p>Advanced gamma mapping and color enhancement may be applied, without
6736      * reducing frame rate compared to raw sensor output.</p>
6737      */
6738     ACAMERA_TONEMAP_MODE_FAST                                        = 1,
6739 
6740     /**
6741      * <p>High-quality gamma mapping and color enhancement will be applied, at
6742      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
6743      */
6744     ACAMERA_TONEMAP_MODE_HIGH_QUALITY                                = 2,
6745 
6746     /**
6747      * <p>Use the gamma value specified in ACAMERA_TONEMAP_GAMMA to peform
6748      * tonemapping.</p>
6749      * <p>All color enhancement and tonemapping must be disabled, except
6750      * for applying the tonemapping curve specified by ACAMERA_TONEMAP_GAMMA.</p>
6751      * <p>Must not slow down frame rate relative to raw sensor output.</p>
6752      *
6753      * @see ACAMERA_TONEMAP_GAMMA
6754      */
6755     ACAMERA_TONEMAP_MODE_GAMMA_VALUE                                 = 3,
6756 
6757     /**
6758      * <p>Use the preset tonemapping curve specified in
6759      * ACAMERA_TONEMAP_PRESET_CURVE to peform tonemapping.</p>
6760      * <p>All color enhancement and tonemapping must be disabled, except
6761      * for applying the tonemapping curve specified by
6762      * ACAMERA_TONEMAP_PRESET_CURVE.</p>
6763      * <p>Must not slow down frame rate relative to raw sensor output.</p>
6764      *
6765      * @see ACAMERA_TONEMAP_PRESET_CURVE
6766      */
6767     ACAMERA_TONEMAP_MODE_PRESET_CURVE                                = 4,
6768 
6769 } acamera_metadata_enum_android_tonemap_mode_t;
6770 
6771 // ACAMERA_TONEMAP_PRESET_CURVE
6772 typedef enum acamera_metadata_enum_acamera_tonemap_preset_curve {
6773     /**
6774      * <p>Tonemapping curve is defined by sRGB</p>
6775      */
6776     ACAMERA_TONEMAP_PRESET_CURVE_SRGB                                = 0,
6777 
6778     /**
6779      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
6780      */
6781     ACAMERA_TONEMAP_PRESET_CURVE_REC709                              = 1,
6782 
6783 } acamera_metadata_enum_android_tonemap_preset_curve_t;
6784 
6785 
6786 
6787 // ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
6788 typedef enum acamera_metadata_enum_acamera_info_supported_hardware_level {
6789     /**
6790      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
6791      * better.</p>
6792      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
6793      * {@link ACameraDevice_createCaptureSession} documentation are guaranteed to be supported.</p>
6794      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
6795      * support for color image capture. The only exception is that the device may
6796      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
6797      * measurements and not color images.</p>
6798      * <p><code>LIMITED</code> devices and above require the use of ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
6799      * to lock exposure metering (and calculate flash power, for cameras with flash) before
6800      * capturing a high-quality still image.</p>
6801      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
6802      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
6803      * supported for ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AF_MODE, or
6804      * ACAMERA_CONTROL_AWB_MODE)</p>
6805      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
6806      * can be checked for in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
6807      *
6808      * @see ACAMERA_CONTROL_AE_MODE
6809      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
6810      * @see ACAMERA_CONTROL_AF_MODE
6811      * @see ACAMERA_CONTROL_AWB_MODE
6812      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6813      */
6814     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED                    = 0,
6815 
6816     /**
6817      * <p>This camera device is capable of supporting advanced imaging applications.</p>
6818      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
6819      * {@link ACameraDevice_createCaptureSession} documentation are guaranteed to be supported.</p>
6820      * <p>A <code>FULL</code> device will support below capabilities:</p>
6821      * <ul>
6822      * <li><code>BURST_CAPTURE</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
6823      *   <code>BURST_CAPTURE</code>)</li>
6824      * <li>Per frame control (ACAMERA_SYNC_MAX_LATENCY <code>==</code> PER_FRAME_CONTROL)</li>
6825      * <li>Manual sensor control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains <code>MANUAL_SENSOR</code>)</li>
6826      * <li>Manual post-processing control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
6827      *   <code>MANUAL_POST_PROCESSING</code>)</li>
6828      * <li>The required exposure time range defined in ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
6829      * <li>The required maxFrameDuration defined in ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
6830      * </ul>
6831      * <p>Note:
6832      * Pre-API level 23, FULL devices also supported arbitrary cropping region
6833      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>); this requirement was relaxed in API level
6834      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
6835      *
6836      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6837      * @see ACAMERA_SCALER_CROPPING_TYPE
6838      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
6839      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
6840      * @see ACAMERA_SYNC_MAX_LATENCY
6841      */
6842     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_FULL                       = 1,
6843 
6844     /**
6845      * <p>This camera device is running in backward compatibility mode.</p>
6846      * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link
6847      * ACameraDevice_createCaptureSession} documentation are supported.</p>
6848      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
6849      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
6850      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
6851      * <code>LEGACY</code> device in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
6852      * <p>In addition, the ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is not functional on <code>LEGACY</code>
6853      * devices. Instead, every request that includes a JPEG-format output target is treated
6854      * as triggering a still capture, internally executing a precapture trigger.  This may
6855      * fire the flash for flash power metering during precapture, and then fire the flash
6856      * for the final capture, if a flash is available on the device and the AE mode is set to
6857      * enable the flash.</p>
6858      *
6859      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
6860      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6861      */
6862     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY                     = 2,
6863 
6864     /**
6865      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
6866      * FULL-level capabilities.</p>
6867      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
6868      * <code>LIMITED</code> tables in the {@link
6869      * ACameraDevice_createCaptureSession}
6870      * documentation are guaranteed to be supported.</p>
6871      * <p>The following additional capabilities are guaranteed to be supported:</p>
6872      * <ul>
6873      * <li><code>YUV_REPROCESSING</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
6874      *   <code>YUV_REPROCESSING</code>)</li>
6875      * <li><code>RAW</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
6876      *   <code>RAW</code>)</li>
6877      * </ul>
6878      *
6879      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6880      */
6881     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_3                          = 3,
6882 
6883 } acamera_metadata_enum_android_info_supported_hardware_level_t;
6884 
6885 
6886 // ACAMERA_BLACK_LEVEL_LOCK
6887 typedef enum acamera_metadata_enum_acamera_black_level_lock {
6888     ACAMERA_BLACK_LEVEL_LOCK_OFF                                     = 0,
6889 
6890     ACAMERA_BLACK_LEVEL_LOCK_ON                                      = 1,
6891 
6892 } acamera_metadata_enum_android_black_level_lock_t;
6893 
6894 
6895 // ACAMERA_SYNC_FRAME_NUMBER
6896 typedef enum acamera_metadata_enum_acamera_sync_frame_number {
6897     /**
6898      * <p>The current result is not yet fully synchronized to any request.</p>
6899      * <p>Synchronization is in progress, and reading metadata from this
6900      * result may include a mix of data that have taken effect since the
6901      * last synchronization time.</p>
6902      * <p>In some future result, within ACAMERA_SYNC_MAX_LATENCY frames,
6903      * this value will update to the actual frame number frame number
6904      * the result is guaranteed to be synchronized to (as long as the
6905      * request settings remain constant).</p>
6906      *
6907      * @see ACAMERA_SYNC_MAX_LATENCY
6908      */
6909     ACAMERA_SYNC_FRAME_NUMBER_CONVERGING                             = -1,
6910 
6911     /**
6912      * <p>The current result's synchronization status is unknown.</p>
6913      * <p>The result may have already converged, or it may be in
6914      * progress.  Reading from this result may include some mix
6915      * of settings from past requests.</p>
6916      * <p>After a settings change, the new settings will eventually all
6917      * take effect for the output buffers and results. However, this
6918      * value will not change when that happens. Altering settings
6919      * rapidly may provide outcomes using mixes of settings from recent
6920      * requests.</p>
6921      * <p>This value is intended primarily for backwards compatibility with
6922      * the older camera implementations (for android.hardware.Camera).</p>
6923      */
6924     ACAMERA_SYNC_FRAME_NUMBER_UNKNOWN                                = -2,
6925 
6926 } acamera_metadata_enum_android_sync_frame_number_t;
6927 
6928 // ACAMERA_SYNC_MAX_LATENCY
6929 typedef enum acamera_metadata_enum_acamera_sync_max_latency {
6930     /**
6931      * <p>Every frame has the requests immediately applied.</p>
6932      * <p>Changing controls over multiple requests one after another will
6933      * produce results that have those controls applied atomically
6934      * each frame.</p>
6935      * <p>All FULL capability devices will have this as their maxLatency.</p>
6936      */
6937     ACAMERA_SYNC_MAX_LATENCY_PER_FRAME_CONTROL                       = 0,
6938 
6939     /**
6940      * <p>Each new frame has some subset (potentially the entire set)
6941      * of the past requests applied to the camera settings.</p>
6942      * <p>By submitting a series of identical requests, the camera device
6943      * will eventually have the camera settings applied, but it is
6944      * unknown when that exact point will be.</p>
6945      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
6946      */
6947     ACAMERA_SYNC_MAX_LATENCY_UNKNOWN                                 = -1,
6948 
6949 } acamera_metadata_enum_android_sync_max_latency_t;
6950 
6951 
6952 
6953 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
6954 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations {
6955     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT       = 0,
6956 
6957     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT        = 1,
6958 
6959 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_t;
6960 
6961 // ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
6962 typedef enum acamera_metadata_enum_acamera_depth_depth_is_exclusive {
6963     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE                           = 0,
6964 
6965     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE                            = 1,
6966 
6967 } acamera_metadata_enum_android_depth_depth_is_exclusive_t;
6968 
6969 #endif /* __ANDROID_API__ >= 24 */
6970 
6971 __END_DECLS
6972 
6973 #endif /* _NDK_CAMERA_METADATA_TAGS_H */
6974 
6975 /** @} */
6976