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_LOGICAL_MULTI_CAMERA,
73     ACAMERA_DISTORTION_CORRECTION,
74     ACAMERA_HEIC,
75     ACAMERA_HEIC_INFO,
76     ACAMERA_SECTION_COUNT,
77 
78     ACAMERA_VENDOR = 0x8000
79 } acamera_metadata_section_t;
80 
81 /**
82  * Hierarchy positions in enum space.
83  */
84 typedef enum acamera_metadata_section_start {
85     ACAMERA_COLOR_CORRECTION_START = ACAMERA_COLOR_CORRECTION  << 16,
86     ACAMERA_CONTROL_START          = ACAMERA_CONTROL           << 16,
87     ACAMERA_DEMOSAIC_START         = ACAMERA_DEMOSAIC          << 16,
88     ACAMERA_EDGE_START             = ACAMERA_EDGE              << 16,
89     ACAMERA_FLASH_START            = ACAMERA_FLASH             << 16,
90     ACAMERA_FLASH_INFO_START       = ACAMERA_FLASH_INFO        << 16,
91     ACAMERA_HOT_PIXEL_START        = ACAMERA_HOT_PIXEL         << 16,
92     ACAMERA_JPEG_START             = ACAMERA_JPEG              << 16,
93     ACAMERA_LENS_START             = ACAMERA_LENS              << 16,
94     ACAMERA_LENS_INFO_START        = ACAMERA_LENS_INFO         << 16,
95     ACAMERA_NOISE_REDUCTION_START  = ACAMERA_NOISE_REDUCTION   << 16,
96     ACAMERA_QUIRKS_START           = ACAMERA_QUIRKS            << 16,
97     ACAMERA_REQUEST_START          = ACAMERA_REQUEST           << 16,
98     ACAMERA_SCALER_START           = ACAMERA_SCALER            << 16,
99     ACAMERA_SENSOR_START           = ACAMERA_SENSOR            << 16,
100     ACAMERA_SENSOR_INFO_START      = ACAMERA_SENSOR_INFO       << 16,
101     ACAMERA_SHADING_START          = ACAMERA_SHADING           << 16,
102     ACAMERA_STATISTICS_START       = ACAMERA_STATISTICS        << 16,
103     ACAMERA_STATISTICS_INFO_START  = ACAMERA_STATISTICS_INFO   << 16,
104     ACAMERA_TONEMAP_START          = ACAMERA_TONEMAP           << 16,
105     ACAMERA_LED_START              = ACAMERA_LED               << 16,
106     ACAMERA_INFO_START             = ACAMERA_INFO              << 16,
107     ACAMERA_BLACK_LEVEL_START      = ACAMERA_BLACK_LEVEL       << 16,
108     ACAMERA_SYNC_START             = ACAMERA_SYNC              << 16,
109     ACAMERA_REPROCESS_START        = ACAMERA_REPROCESS         << 16,
110     ACAMERA_DEPTH_START            = ACAMERA_DEPTH             << 16,
111     ACAMERA_LOGICAL_MULTI_CAMERA_START
112                                    = ACAMERA_LOGICAL_MULTI_CAMERA
113                                                                 << 16,
114     ACAMERA_DISTORTION_CORRECTION_START
115                                    = ACAMERA_DISTORTION_CORRECTION
116                                                                 << 16,
117     ACAMERA_HEIC_START             = ACAMERA_HEIC              << 16,
118     ACAMERA_HEIC_INFO_START        = ACAMERA_HEIC_INFO         << 16,
119     ACAMERA_VENDOR_START           = ACAMERA_VENDOR            << 16
120 } acamera_metadata_section_start_t;
121 
122 /**
123  * Main enum for camera metadata tags.
124  */
125 typedef enum acamera_metadata_tag {
126     /**
127      * <p>The mode control selects how the image data is converted from the
128      * sensor's native color into linear sRGB color.</p>
129      *
130      * <p>Type: byte (acamera_metadata_enum_android_color_correction_mode_t)</p>
131      *
132      * <p>This tag may appear in:
133      * <ul>
134      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
135      *   <li>ACaptureRequest</li>
136      * </ul></p>
137      *
138      * <p>When auto-white balance (AWB) is enabled with ACAMERA_CONTROL_AWB_MODE, this
139      * control is overridden by the AWB routine. When AWB is disabled, the
140      * application controls how the color mapping is performed.</p>
141      * <p>We define the expected processing pipeline below. For consistency
142      * across devices, this is always the case with TRANSFORM_MATRIX.</p>
143      * <p>When either FAST or HIGH_QUALITY is used, the camera device may
144      * do additional processing but ACAMERA_COLOR_CORRECTION_GAINS and
145      * ACAMERA_COLOR_CORRECTION_TRANSFORM will still be provided by the
146      * camera device (in the results) and be roughly correct.</p>
147      * <p>Switching to TRANSFORM_MATRIX and using the data provided from
148      * FAST or HIGH_QUALITY will yield a picture with the same white point
149      * as what was produced by the camera device in the earlier frame.</p>
150      * <p>The expected processing pipeline is as follows:</p>
151      * <p><img alt="White balance processing pipeline" src="../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
152      * <p>The white balance is encoded by two values, a 4-channel white-balance
153      * gain vector (applied in the Bayer domain), and a 3x3 color transform
154      * matrix (applied after demosaic).</p>
155      * <p>The 4-channel white-balance gains are defined as:</p>
156      * <pre><code>ACAMERA_COLOR_CORRECTION_GAINS = [ R G_even G_odd B ]
157      * </code></pre>
158      * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
159      * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
160      * These may be identical for a given camera device implementation; if
161      * the camera device does not support a separate gain for even/odd green
162      * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
163      * <code>G_even</code> in the output result metadata.</p>
164      * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
165      * <pre><code>ACAMERA_COLOR_CORRECTION_TRANSFORM = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
166      * </code></pre>
167      * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
168      * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
169      * <p>with colors as follows:</p>
170      * <pre><code>r' = I0r + I1g + I2b
171      * g' = I3r + I4g + I5b
172      * b' = I6r + I7g + I8b
173      * </code></pre>
174      * <p>Both the input and output value ranges must match. Overflow/underflow
175      * values are clipped to fit within the range.</p>
176      *
177      * @see ACAMERA_COLOR_CORRECTION_GAINS
178      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
179      * @see ACAMERA_CONTROL_AWB_MODE
180      */
181     ACAMERA_COLOR_CORRECTION_MODE =                             // byte (acamera_metadata_enum_android_color_correction_mode_t)
182             ACAMERA_COLOR_CORRECTION_START,
183     /**
184      * <p>A color transform matrix to use to transform
185      * from sensor RGB color space to output linear sRGB color space.</p>
186      *
187      * <p>Type: rational[3*3]</p>
188      *
189      * <p>This tag may appear in:
190      * <ul>
191      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
192      *   <li>ACaptureRequest</li>
193      * </ul></p>
194      *
195      * <p>This matrix is either set by the camera device when the request
196      * ACAMERA_COLOR_CORRECTION_MODE is not TRANSFORM_MATRIX, or
197      * directly by the application in the request when the
198      * ACAMERA_COLOR_CORRECTION_MODE is TRANSFORM_MATRIX.</p>
199      * <p>In the latter case, the camera device may round the matrix to account
200      * for precision issues; the final rounded matrix should be reported back
201      * in this matrix result metadata. The transform should keep the magnitude
202      * of the output color values within <code>[0, 1.0]</code> (assuming input color
203      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
204      * <p>The valid range of each matrix element varies on different devices, but
205      * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
206      *
207      * @see ACAMERA_COLOR_CORRECTION_MODE
208      */
209     ACAMERA_COLOR_CORRECTION_TRANSFORM =                        // rational[3*3]
210             ACAMERA_COLOR_CORRECTION_START + 1,
211     /**
212      * <p>Gains applying to Bayer raw color channels for
213      * white-balance.</p>
214      *
215      * <p>Type: float[4]</p>
216      *
217      * <p>This tag may appear in:
218      * <ul>
219      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
220      *   <li>ACaptureRequest</li>
221      * </ul></p>
222      *
223      * <p>These per-channel gains are either set by the camera device
224      * when the request ACAMERA_COLOR_CORRECTION_MODE is not
225      * TRANSFORM_MATRIX, or directly by the application in the
226      * request when the ACAMERA_COLOR_CORRECTION_MODE is
227      * TRANSFORM_MATRIX.</p>
228      * <p>The gains in the result metadata are the gains actually
229      * applied by the camera device to the current frame.</p>
230      * <p>The valid range of gains varies on different devices, but gains
231      * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
232      * device allows gains below 1.0, this is usually not recommended because
233      * this can create color artifacts.</p>
234      *
235      * @see ACAMERA_COLOR_CORRECTION_MODE
236      */
237     ACAMERA_COLOR_CORRECTION_GAINS =                            // float[4]
238             ACAMERA_COLOR_CORRECTION_START + 2,
239     /**
240      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
241      *
242      * <p>Type: byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)</p>
243      *
244      * <p>This tag may appear in:
245      * <ul>
246      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
247      *   <li>ACaptureRequest</li>
248      * </ul></p>
249      *
250      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
251      * can not focus on the same point after exiting from the lens. This metadata defines
252      * the high level control of chromatic aberration correction algorithm, which aims to
253      * minimize the chromatic artifacts that may occur along the object boundaries in an
254      * image.</p>
255      * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
256      * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
257      * use the highest-quality aberration correction algorithms, even if it slows down
258      * capture rate. FAST means the camera device will not slow down capture rate when
259      * applying aberration correction.</p>
260      * <p>LEGACY devices will always be in FAST mode.</p>
261      */
262     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE =                  // byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)
263             ACAMERA_COLOR_CORRECTION_START + 3,
264     /**
265      * <p>List of aberration correction modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE that are
266      * supported by this camera device.</p>
267      *
268      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
269      *
270      * <p>Type: byte[n]</p>
271      *
272      * <p>This tag may appear in:
273      * <ul>
274      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
275      * </ul></p>
276      *
277      * <p>This key lists the valid modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE.  If no
278      * aberration correction modes are available for a device, this list will solely include
279      * OFF mode. All camera devices will support either OFF or FAST mode.</p>
280      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
281      * OFF mode. This includes all FULL level devices.</p>
282      * <p>LEGACY devices will always only support FAST mode.</p>
283      *
284      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
285      */
286     ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =       // byte[n]
287             ACAMERA_COLOR_CORRECTION_START + 4,
288     ACAMERA_COLOR_CORRECTION_END,
289 
290     /**
291      * <p>The desired setting for the camera device's auto-exposure
292      * algorithm's antibanding compensation.</p>
293      *
294      * <p>Type: byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)</p>
295      *
296      * <p>This tag may appear in:
297      * <ul>
298      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
299      *   <li>ACaptureRequest</li>
300      * </ul></p>
301      *
302      * <p>Some kinds of lighting fixtures, such as some fluorescent
303      * lights, flicker at the rate of the power supply frequency
304      * (60Hz or 50Hz, depending on country). While this is
305      * typically not noticeable to a person, it can be visible to
306      * a camera device. If a camera sets its exposure time to the
307      * wrong value, the flicker may become visible in the
308      * viewfinder as flicker or in a final captured image, as a
309      * set of variable-brightness bands across the image.</p>
310      * <p>Therefore, the auto-exposure routines of camera devices
311      * include antibanding routines that ensure that the chosen
312      * exposure value will not cause such banding. The choice of
313      * exposure time depends on the rate of flicker, which the
314      * camera device can detect automatically, or the expected
315      * rate can be selected by the application using this
316      * control.</p>
317      * <p>A given camera device may not support all of the possible
318      * options for the antibanding mode. The
319      * ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES key contains
320      * the available modes for a given camera device.</p>
321      * <p>AUTO mode is the default if it is available on given
322      * camera device. When AUTO mode is not available, the
323      * default will be either 50HZ or 60HZ, and both 50HZ
324      * and 60HZ will be available.</p>
325      * <p>If manual exposure control is enabled (by setting
326      * ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE to OFF),
327      * then this setting has no effect, and the application must
328      * ensure it selects exposure times that do not cause banding
329      * issues. The ACAMERA_STATISTICS_SCENE_FLICKER key can assist
330      * the application in this.</p>
331      *
332      * @see ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
333      * @see ACAMERA_CONTROL_AE_MODE
334      * @see ACAMERA_CONTROL_MODE
335      * @see ACAMERA_STATISTICS_SCENE_FLICKER
336      */
337     ACAMERA_CONTROL_AE_ANTIBANDING_MODE =                       // byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)
338             ACAMERA_CONTROL_START,
339     /**
340      * <p>Adjustment to auto-exposure (AE) target image
341      * brightness.</p>
342      *
343      * <p>Type: int32</p>
344      *
345      * <p>This tag may appear in:
346      * <ul>
347      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
348      *   <li>ACaptureRequest</li>
349      * </ul></p>
350      *
351      * <p>The adjustment is measured as a count of steps, with the
352      * step size defined by ACAMERA_CONTROL_AE_COMPENSATION_STEP and the
353      * allowed range by ACAMERA_CONTROL_AE_COMPENSATION_RANGE.</p>
354      * <p>For example, if the exposure value (EV) step is 0.333, '6'
355      * will mean an exposure compensation of +2 EV; -3 will mean an
356      * exposure compensation of -1 EV. One EV represents a doubling
357      * of image brightness. Note that this control will only be
358      * effective if ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF. This control
359      * will take effect even when ACAMERA_CONTROL_AE_LOCK <code>== true</code>.</p>
360      * <p>In the event of exposure compensation value being changed, camera device
361      * may take several frames to reach the newly requested exposure target.
362      * During that time, ACAMERA_CONTROL_AE_STATE field will be in the SEARCHING
363      * state. Once the new exposure target is reached, ACAMERA_CONTROL_AE_STATE will
364      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
365      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
366      *
367      * @see ACAMERA_CONTROL_AE_COMPENSATION_RANGE
368      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
369      * @see ACAMERA_CONTROL_AE_LOCK
370      * @see ACAMERA_CONTROL_AE_MODE
371      * @see ACAMERA_CONTROL_AE_STATE
372      */
373     ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION =                  // int32
374             ACAMERA_CONTROL_START + 1,
375     /**
376      * <p>Whether auto-exposure (AE) is currently locked to its latest
377      * calculated values.</p>
378      *
379      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_t)</p>
380      *
381      * <p>This tag may appear in:
382      * <ul>
383      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
384      *   <li>ACaptureRequest</li>
385      * </ul></p>
386      *
387      * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
388      * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
389      * <p>Note that even when AE is locked, the flash may be fired if
390      * the ACAMERA_CONTROL_AE_MODE is ON_AUTO_FLASH /
391      * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
392      * <p>When ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION is changed, even if the AE lock
393      * is ON, the camera device will still adjust its exposure value.</p>
394      * <p>If AE precapture is triggered (see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER)
395      * when AE is already locked, the camera device will not change the exposure time
396      * (ACAMERA_SENSOR_EXPOSURE_TIME) and sensitivity (ACAMERA_SENSOR_SENSITIVITY)
397      * parameters. The flash may be fired if the ACAMERA_CONTROL_AE_MODE
398      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
399      * ACAMERA_CONTROL_AE_MODE is ON_ALWAYS_FLASH, the scene may become overexposed.
400      * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
401      * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
402      * the AE if AE is locked by the camera device internally during precapture metering
403      * sequence In other words, submitting requests with AE unlock has no effect for an
404      * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
405      * will never succeed in a sequence of preview requests where AE lock is always set
406      * to <code>false</code>.</p>
407      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
408      * get locked do not necessarily correspond to the settings that were present in the
409      * latest capture result received from the camera device, since additional captures
410      * and AE updates may have occurred even before the result was sent out. If an
411      * application is switching between automatic and manual control and wishes to eliminate
412      * any flicker during the switch, the following procedure is recommended:</p>
413      * <ol>
414      * <li>Starting in auto-AE mode:</li>
415      * <li>Lock AE</li>
416      * <li>Wait for the first result to be output that has the AE locked</li>
417      * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
418      * <li>Submit the capture request, proceed to run manual AE as desired.</li>
419      * </ol>
420      * <p>See ACAMERA_CONTROL_AE_STATE for AE lock related state transition details.</p>
421      *
422      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
423      * @see ACAMERA_CONTROL_AE_MODE
424      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
425      * @see ACAMERA_CONTROL_AE_STATE
426      * @see ACAMERA_SENSOR_EXPOSURE_TIME
427      * @see ACAMERA_SENSOR_SENSITIVITY
428      */
429     ACAMERA_CONTROL_AE_LOCK =                                   // byte (acamera_metadata_enum_android_control_ae_lock_t)
430             ACAMERA_CONTROL_START + 2,
431     /**
432      * <p>The desired mode for the camera device's
433      * auto-exposure routine.</p>
434      *
435      * <p>Type: byte (acamera_metadata_enum_android_control_ae_mode_t)</p>
436      *
437      * <p>This tag may appear in:
438      * <ul>
439      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
440      *   <li>ACaptureRequest</li>
441      * </ul></p>
442      *
443      * <p>This control is only effective if ACAMERA_CONTROL_MODE is
444      * AUTO.</p>
445      * <p>When set to any of the ON modes, the camera device's
446      * auto-exposure routine is enabled, overriding the
447      * application's selected exposure time, sensor sensitivity,
448      * and frame duration (ACAMERA_SENSOR_EXPOSURE_TIME,
449      * ACAMERA_SENSOR_SENSITIVITY, and
450      * ACAMERA_SENSOR_FRAME_DURATION). If one of the FLASH modes
451      * is selected, the camera device's flash unit controls are
452      * also overridden.</p>
453      * <p>The FLASH modes are only available if the camera device
454      * has a flash unit (ACAMERA_FLASH_INFO_AVAILABLE is <code>true</code>).</p>
455      * <p>If flash TORCH mode is desired, this field must be set to
456      * ON or OFF, and ACAMERA_FLASH_MODE set to TORCH.</p>
457      * <p>When set to any of the ON modes, the values chosen by the
458      * camera device auto-exposure routine for the overridden
459      * fields for a given capture will be available in its
460      * CaptureResult.</p>
461      *
462      * @see ACAMERA_CONTROL_MODE
463      * @see ACAMERA_FLASH_INFO_AVAILABLE
464      * @see ACAMERA_FLASH_MODE
465      * @see ACAMERA_SENSOR_EXPOSURE_TIME
466      * @see ACAMERA_SENSOR_FRAME_DURATION
467      * @see ACAMERA_SENSOR_SENSITIVITY
468      */
469     ACAMERA_CONTROL_AE_MODE =                                   // byte (acamera_metadata_enum_android_control_ae_mode_t)
470             ACAMERA_CONTROL_START + 3,
471     /**
472      * <p>List of metering areas to use for auto-exposure adjustment.</p>
473      *
474      * <p>Type: int32[5*area_count]</p>
475      *
476      * <p>This tag may appear in:
477      * <ul>
478      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
479      *   <li>ACaptureRequest</li>
480      * </ul></p>
481      *
482      * <p>Not available if android.control.maxRegionsAe is 0.
483      * Otherwise will always be present.</p>
484      * <p>The maximum number of regions supported by the device is determined by the value
485      * of android.control.maxRegionsAe.</p>
486      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
487      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
488      * the top-left pixel in the active pixel array, and
489      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
490      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
491      * active pixel array.</p>
492      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
493      * system depends on the mode being set.
494      * When the distortion correction mode is OFF, the coordinate system follows
495      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
496      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
497      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
498      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
499      * pixel in the pre-correction active pixel array.
500      * When the distortion correction mode is not OFF, the coordinate system follows
501      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
502      * <code>(0, 0)</code> being the top-left pixel of the active array, and
503      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
504      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
505      * active pixel array.</p>
506      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
507      * for every pixel in the area. This means that a large metering area
508      * with the same weight as a smaller area will have more effect in
509      * the metering result. Metering areas can partially overlap and the
510      * camera device will add the weights in the overlap region.</p>
511      * <p>The weights are relative to weights of other exposure metering regions, so if only one
512      * region is used, all non-zero weights will have the same effect. A region with 0
513      * weight is ignored.</p>
514      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
515      * camera device.</p>
516      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
517      * capture result metadata, the camera device will ignore the sections outside the crop
518      * region and output only the intersection rectangle as the metering region in the result
519      * metadata.  If the region is entirely outside the crop region, it will be ignored and
520      * not reported in the result metadata.</p>
521      * <p>Starting from API level 30, the coordinate system of activeArraySize or
522      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
523      * pre-zoom field of view. This means that the same aeRegions values at different
524      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The aeRegions
525      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
526      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
527      * aeRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
528      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
529      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
530      * mode.</p>
531      * <p>The data representation is <code>int[5 * area_count]</code>.
532      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
533      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
534      * ymax.</p>
535      *
536      * @see ACAMERA_CONTROL_ZOOM_RATIO
537      * @see ACAMERA_DISTORTION_CORRECTION_MODE
538      * @see ACAMERA_SCALER_CROP_REGION
539      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
540      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
541      */
542     ACAMERA_CONTROL_AE_REGIONS =                                // int32[5*area_count]
543             ACAMERA_CONTROL_START + 4,
544     /**
545      * <p>Range over which the auto-exposure routine can
546      * adjust the capture frame rate to maintain good
547      * exposure.</p>
548      *
549      * <p>Type: int32[2]</p>
550      *
551      * <p>This tag may appear in:
552      * <ul>
553      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
554      *   <li>ACaptureRequest</li>
555      * </ul></p>
556      *
557      * <p>Only constrains auto-exposure (AE) algorithm, not
558      * manual control of ACAMERA_SENSOR_EXPOSURE_TIME and
559      * ACAMERA_SENSOR_FRAME_DURATION.</p>
560      *
561      * @see ACAMERA_SENSOR_EXPOSURE_TIME
562      * @see ACAMERA_SENSOR_FRAME_DURATION
563      */
564     ACAMERA_CONTROL_AE_TARGET_FPS_RANGE =                       // int32[2]
565             ACAMERA_CONTROL_START + 5,
566     /**
567      * <p>Whether the camera device will trigger a precapture
568      * metering sequence when it processes this request.</p>
569      *
570      * <p>Type: byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)</p>
571      *
572      * <p>This tag may appear in:
573      * <ul>
574      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
575      *   <li>ACaptureRequest</li>
576      * </ul></p>
577      *
578      * <p>This entry is normally set to IDLE, or is not
579      * included at all in the request settings. When included and
580      * set to START, the camera device will trigger the auto-exposure (AE)
581      * precapture metering sequence.</p>
582      * <p>When set to CANCEL, the camera device will cancel any active
583      * precapture metering trigger, and return to its initial AE state.
584      * If a precapture metering sequence is already completed, and the camera
585      * device has implicitly locked the AE for subsequent still capture, the
586      * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
587      * <p>The precapture sequence should be triggered before starting a
588      * high-quality still capture for final metering decisions to
589      * be made, and for firing pre-capture flash pulses to estimate
590      * scene brightness and required final capture flash power, when
591      * the flash is enabled.</p>
592      * <p>Normally, this entry should be set to START for only a
593      * single request, and the application should wait until the
594      * sequence completes before starting a new one.</p>
595      * <p>When a precapture metering sequence is finished, the camera device
596      * may lock the auto-exposure routine internally to be able to accurately expose the
597      * subsequent still capture image (<code>ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE</code>).
598      * For this case, the AE may not resume normal scan if no subsequent still capture is
599      * submitted. To ensure that the AE routine restarts normal scan, the application should
600      * submit a request with <code>ACAMERA_CONTROL_AE_LOCK == true</code>, followed by a request
601      * with <code>ACAMERA_CONTROL_AE_LOCK == false</code>, if the application decides not to submit a
602      * still capture request after the precapture sequence completes. Alternatively, for
603      * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
604      * internally locked AE if the application doesn't submit a still capture request after
605      * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
606      * be used in devices that have earlier API levels.</p>
607      * <p>The exact effect of auto-exposure (AE) precapture trigger
608      * depends on the current AE mode and state; see
609      * ACAMERA_CONTROL_AE_STATE for AE precapture state transition
610      * details.</p>
611      * <p>On LEGACY-level devices, the precapture trigger is not supported;
612      * capturing a high-resolution JPEG image will automatically trigger a
613      * precapture sequence before the high-resolution capture, including
614      * potentially firing a pre-capture flash.</p>
615      * <p>Using the precapture trigger and the auto-focus trigger ACAMERA_CONTROL_AF_TRIGGER
616      * simultaneously is allowed. However, since these triggers often require cooperation between
617      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
618      * focus sweep), the camera device may delay acting on a later trigger until the previous
619      * trigger has been fully handled. This may lead to longer intervals between the trigger and
620      * changes to ACAMERA_CONTROL_AE_STATE indicating the start of the precapture sequence, for
621      * example.</p>
622      * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
623      * the camera device will complete them in the optimal order for that device.</p>
624      *
625      * @see ACAMERA_CONTROL_AE_LOCK
626      * @see ACAMERA_CONTROL_AE_STATE
627      * @see ACAMERA_CONTROL_AF_TRIGGER
628      * @see ACAMERA_CONTROL_CAPTURE_INTENT
629      */
630     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER =                     // byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)
631             ACAMERA_CONTROL_START + 6,
632     /**
633      * <p>Whether auto-focus (AF) is currently enabled, and what
634      * mode it is set to.</p>
635      *
636      * <p>Type: byte (acamera_metadata_enum_android_control_af_mode_t)</p>
637      *
638      * <p>This tag may appear in:
639      * <ul>
640      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
641      *   <li>ACaptureRequest</li>
642      * </ul></p>
643      *
644      * <p>Only effective if ACAMERA_CONTROL_MODE = AUTO and the lens is not fixed focus
645      * (i.e. <code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>). Also note that
646      * when ACAMERA_CONTROL_AE_MODE is OFF, the behavior of AF is device
647      * dependent. It is recommended to lock AF by using ACAMERA_CONTROL_AF_TRIGGER before
648      * setting ACAMERA_CONTROL_AE_MODE to OFF, or set AF mode to OFF when AE is OFF.</p>
649      * <p>If the lens is controlled by the camera device auto-focus algorithm,
650      * the camera device will report the current AF status in ACAMERA_CONTROL_AF_STATE
651      * in result metadata.</p>
652      *
653      * @see ACAMERA_CONTROL_AE_MODE
654      * @see ACAMERA_CONTROL_AF_STATE
655      * @see ACAMERA_CONTROL_AF_TRIGGER
656      * @see ACAMERA_CONTROL_MODE
657      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
658      */
659     ACAMERA_CONTROL_AF_MODE =                                   // byte (acamera_metadata_enum_android_control_af_mode_t)
660             ACAMERA_CONTROL_START + 7,
661     /**
662      * <p>List of metering areas to use for auto-focus.</p>
663      *
664      * <p>Type: int32[5*area_count]</p>
665      *
666      * <p>This tag may appear in:
667      * <ul>
668      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
669      *   <li>ACaptureRequest</li>
670      * </ul></p>
671      *
672      * <p>Not available if android.control.maxRegionsAf is 0.
673      * Otherwise will always be present.</p>
674      * <p>The maximum number of focus areas supported by the device is determined by the value
675      * of android.control.maxRegionsAf.</p>
676      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
677      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
678      * the top-left pixel in the active pixel array, and
679      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
680      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
681      * active pixel array.</p>
682      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
683      * system depends on the mode being set.
684      * When the distortion correction mode is OFF, the coordinate system follows
685      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
686      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
687      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
688      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
689      * pixel in the pre-correction active pixel array.
690      * When the distortion correction mode is not OFF, the coordinate system follows
691      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
692      * <code>(0, 0)</code> being the top-left pixel of the active array, and
693      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
694      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
695      * active pixel array.</p>
696      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
697      * for every pixel in the area. This means that a large metering area
698      * with the same weight as a smaller area will have more effect in
699      * the metering result. Metering areas can partially overlap and the
700      * camera device will add the weights in the overlap region.</p>
701      * <p>The weights are relative to weights of other metering regions, so if only one region
702      * is used, all non-zero weights will have the same effect. A region with 0 weight is
703      * ignored.</p>
704      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
705      * camera device. The capture result will either be a zero weight region as well, or
706      * the region selected by the camera device as the focus area of interest.</p>
707      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
708      * capture result metadata, the camera device will ignore the sections outside the crop
709      * region and output only the intersection rectangle as the metering region in the result
710      * metadata. If the region is entirely outside the crop region, it will be ignored and
711      * not reported in the result metadata.</p>
712      * <p>Starting from API level 30, the coordinate system of activeArraySize or
713      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
714      * pre-zoom field of view. This means that the same afRegions values at different
715      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The afRegions
716      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
717      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
718      * afRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
719      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
720      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
721      * mode.</p>
722      * <p>The data representation is <code>int[5 * area_count]</code>.
723      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
724      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
725      * ymax.</p>
726      *
727      * @see ACAMERA_CONTROL_ZOOM_RATIO
728      * @see ACAMERA_DISTORTION_CORRECTION_MODE
729      * @see ACAMERA_SCALER_CROP_REGION
730      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
731      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
732      */
733     ACAMERA_CONTROL_AF_REGIONS =                                // int32[5*area_count]
734             ACAMERA_CONTROL_START + 8,
735     /**
736      * <p>Whether the camera device will trigger autofocus for this request.</p>
737      *
738      * <p>Type: byte (acamera_metadata_enum_android_control_af_trigger_t)</p>
739      *
740      * <p>This tag may appear in:
741      * <ul>
742      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
743      *   <li>ACaptureRequest</li>
744      * </ul></p>
745      *
746      * <p>This entry is normally set to IDLE, or is not
747      * included at all in the request settings.</p>
748      * <p>When included and set to START, the camera device will trigger the
749      * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
750      * <p>When set to CANCEL, the camera device will cancel any active trigger,
751      * and return to its initial AF state.</p>
752      * <p>Generally, applications should set this entry to START or CANCEL for only a
753      * single capture, and then return it to IDLE (or not set at all). Specifying
754      * START for multiple captures in a row means restarting the AF operation over
755      * and over again.</p>
756      * <p>See ACAMERA_CONTROL_AF_STATE for what the trigger means for each AF mode.</p>
757      * <p>Using the autofocus trigger and the precapture trigger ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
758      * simultaneously is allowed. However, since these triggers often require cooperation between
759      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
760      * focus sweep), the camera device may delay acting on a later trigger until the previous
761      * trigger has been fully handled. This may lead to longer intervals between the trigger and
762      * changes to ACAMERA_CONTROL_AF_STATE, for example.</p>
763      *
764      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
765      * @see ACAMERA_CONTROL_AF_STATE
766      */
767     ACAMERA_CONTROL_AF_TRIGGER =                                // byte (acamera_metadata_enum_android_control_af_trigger_t)
768             ACAMERA_CONTROL_START + 9,
769     /**
770      * <p>Whether auto-white balance (AWB) is currently locked to its
771      * latest calculated values.</p>
772      *
773      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_t)</p>
774      *
775      * <p>This tag may appear in:
776      * <ul>
777      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
778      *   <li>ACaptureRequest</li>
779      * </ul></p>
780      *
781      * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
782      * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
783      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
784      * get locked do not necessarily correspond to the settings that were present in the
785      * latest capture result received from the camera device, since additional captures
786      * and AWB updates may have occurred even before the result was sent out. If an
787      * application is switching between automatic and manual control and wishes to eliminate
788      * any flicker during the switch, the following procedure is recommended:</p>
789      * <ol>
790      * <li>Starting in auto-AWB mode:</li>
791      * <li>Lock AWB</li>
792      * <li>Wait for the first result to be output that has the AWB locked</li>
793      * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
794      * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
795      * </ol>
796      * <p>Note that AWB lock is only meaningful when
797      * ACAMERA_CONTROL_AWB_MODE is in the AUTO mode; in other modes,
798      * AWB is already fixed to a specific setting.</p>
799      * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
800      *
801      * @see ACAMERA_CONTROL_AWB_MODE
802      */
803     ACAMERA_CONTROL_AWB_LOCK =                                  // byte (acamera_metadata_enum_android_control_awb_lock_t)
804             ACAMERA_CONTROL_START + 10,
805     /**
806      * <p>Whether auto-white balance (AWB) is currently setting the color
807      * transform fields, and what its illumination target
808      * is.</p>
809      *
810      * <p>Type: byte (acamera_metadata_enum_android_control_awb_mode_t)</p>
811      *
812      * <p>This tag may appear in:
813      * <ul>
814      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
815      *   <li>ACaptureRequest</li>
816      * </ul></p>
817      *
818      * <p>This control is only effective if ACAMERA_CONTROL_MODE is AUTO.</p>
819      * <p>When set to the ON mode, the camera device's auto-white balance
820      * routine is enabled, overriding the application's selected
821      * ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS and
822      * ACAMERA_COLOR_CORRECTION_MODE. Note that when ACAMERA_CONTROL_AE_MODE
823      * is OFF, the behavior of AWB is device dependent. It is recommened to
824      * also set AWB mode to OFF or lock AWB by using ACAMERA_CONTROL_AWB_LOCK before
825      * setting AE mode to OFF.</p>
826      * <p>When set to the OFF mode, the camera device's auto-white balance
827      * routine is disabled. The application manually controls the white
828      * balance by ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS
829      * and ACAMERA_COLOR_CORRECTION_MODE.</p>
830      * <p>When set to any other modes, the camera device's auto-white
831      * balance routine is disabled. The camera device uses each
832      * particular illumination target for white balance
833      * adjustment. The application's values for
834      * ACAMERA_COLOR_CORRECTION_TRANSFORM,
835      * ACAMERA_COLOR_CORRECTION_GAINS and
836      * ACAMERA_COLOR_CORRECTION_MODE are ignored.</p>
837      *
838      * @see ACAMERA_COLOR_CORRECTION_GAINS
839      * @see ACAMERA_COLOR_CORRECTION_MODE
840      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
841      * @see ACAMERA_CONTROL_AE_MODE
842      * @see ACAMERA_CONTROL_AWB_LOCK
843      * @see ACAMERA_CONTROL_MODE
844      */
845     ACAMERA_CONTROL_AWB_MODE =                                  // byte (acamera_metadata_enum_android_control_awb_mode_t)
846             ACAMERA_CONTROL_START + 11,
847     /**
848      * <p>List of metering areas to use for auto-white-balance illuminant
849      * estimation.</p>
850      *
851      * <p>Type: int32[5*area_count]</p>
852      *
853      * <p>This tag may appear in:
854      * <ul>
855      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
856      *   <li>ACaptureRequest</li>
857      * </ul></p>
858      *
859      * <p>Not available if android.control.maxRegionsAwb is 0.
860      * Otherwise will always be present.</p>
861      * <p>The maximum number of regions supported by the device is determined by the value
862      * of android.control.maxRegionsAwb.</p>
863      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
864      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
865      * the top-left pixel in the active pixel array, and
866      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
867      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
868      * active pixel array.</p>
869      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
870      * system depends on the mode being set.
871      * When the distortion correction mode is OFF, the coordinate system follows
872      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
873      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
874      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
875      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
876      * pixel in the pre-correction active pixel array.
877      * When the distortion correction mode is not OFF, the coordinate system follows
878      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
879      * <code>(0, 0)</code> being the top-left pixel of the active array, and
880      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
881      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
882      * active pixel array.</p>
883      * <p>The weight must range from 0 to 1000, and represents a weight
884      * for every pixel in the area. This means that a large metering area
885      * with the same weight as a smaller area will have more effect in
886      * the metering result. Metering areas can partially overlap and the
887      * camera device will add the weights in the overlap region.</p>
888      * <p>The weights are relative to weights of other white balance metering regions, so if
889      * only one region is used, all non-zero weights will have the same effect. A region with
890      * 0 weight is ignored.</p>
891      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
892      * camera device.</p>
893      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
894      * capture result metadata, the camera device will ignore the sections outside the crop
895      * region and output only the intersection rectangle as the metering region in the result
896      * metadata.  If the region is entirely outside the crop region, it will be ignored and
897      * not reported in the result metadata.</p>
898      * <p>Starting from API level 30, the coordinate system of activeArraySize or
899      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
900      * pre-zoom field of view. This means that the same awbRegions values at different
901      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The awbRegions
902      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
903      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
904      * awbRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of
905      * the scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
906      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
907      * mode.</p>
908      * <p>The data representation is <code>int[5 * area_count]</code>.
909      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
910      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
911      * ymax.</p>
912      *
913      * @see ACAMERA_CONTROL_ZOOM_RATIO
914      * @see ACAMERA_DISTORTION_CORRECTION_MODE
915      * @see ACAMERA_SCALER_CROP_REGION
916      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
917      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
918      */
919     ACAMERA_CONTROL_AWB_REGIONS =                               // int32[5*area_count]
920             ACAMERA_CONTROL_START + 12,
921     /**
922      * <p>Information to the camera device 3A (auto-exposure,
923      * auto-focus, auto-white balance) routines about the purpose
924      * of this capture, to help the camera device to decide optimal 3A
925      * strategy.</p>
926      *
927      * <p>Type: byte (acamera_metadata_enum_android_control_capture_intent_t)</p>
928      *
929      * <p>This tag may appear in:
930      * <ul>
931      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
932      *   <li>ACaptureRequest</li>
933      * </ul></p>
934      *
935      * <p>This control (except for MANUAL) is only effective if
936      * <code>ACAMERA_CONTROL_MODE != OFF</code> and any 3A routine is active.</p>
937      * <p>All intents are supported by all devices, except that:
938      *   * ZERO_SHUTTER_LAG will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
939      * PRIVATE_REPROCESSING or YUV_REPROCESSING.
940      *   * MANUAL will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
941      * MANUAL_SENSOR.
942      *   * MOTION_TRACKING will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
943      * MOTION_TRACKING.</p>
944      *
945      * @see ACAMERA_CONTROL_MODE
946      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
947      */
948     ACAMERA_CONTROL_CAPTURE_INTENT =                            // byte (acamera_metadata_enum_android_control_capture_intent_t)
949             ACAMERA_CONTROL_START + 13,
950     /**
951      * <p>A special color effect to apply.</p>
952      *
953      * <p>Type: byte (acamera_metadata_enum_android_control_effect_mode_t)</p>
954      *
955      * <p>This tag may appear in:
956      * <ul>
957      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
958      *   <li>ACaptureRequest</li>
959      * </ul></p>
960      *
961      * <p>When this mode is set, a color effect will be applied
962      * to images produced by the camera device. The interpretation
963      * and implementation of these color effects is left to the
964      * implementor of the camera device, and should not be
965      * depended on to be consistent (or present) across all
966      * devices.</p>
967      */
968     ACAMERA_CONTROL_EFFECT_MODE =                               // byte (acamera_metadata_enum_android_control_effect_mode_t)
969             ACAMERA_CONTROL_START + 14,
970     /**
971      * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
972      * routines.</p>
973      *
974      * <p>Type: byte (acamera_metadata_enum_android_control_mode_t)</p>
975      *
976      * <p>This tag may appear in:
977      * <ul>
978      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
979      *   <li>ACaptureRequest</li>
980      * </ul></p>
981      *
982      * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
983      * by the camera device is disabled. The application must set the fields for
984      * capture parameters itself.</p>
985      * <p>When set to AUTO, the individual algorithm controls in
986      * ACAMERA_CONTROL_* are in effect, such as ACAMERA_CONTROL_AF_MODE.</p>
987      * <p>When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
988      * ACAMERA_CONTROL_* are mostly disabled, and the camera device
989      * implements one of the scene mode or extended scene mode settings (such as ACTION,
990      * SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
991      * 3A settings are provided by {@link ACameraCaptureSession_captureCallback_result capture results}.</p>
992      * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
993      * is that this frame will not be used by camera device background 3A statistics
994      * update, as if this frame is never captured. This mode can be used in the scenario
995      * where the application doesn't want a 3A manual control capture to affect
996      * the subsequent auto 3A capture results.</p>
997      *
998      * @see ACAMERA_CONTROL_AF_MODE
999      */
1000     ACAMERA_CONTROL_MODE =                                      // byte (acamera_metadata_enum_android_control_mode_t)
1001             ACAMERA_CONTROL_START + 15,
1002     /**
1003      * <p>Control for which scene mode is currently active.</p>
1004      *
1005      * <p>Type: byte (acamera_metadata_enum_android_control_scene_mode_t)</p>
1006      *
1007      * <p>This tag may appear in:
1008      * <ul>
1009      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1010      *   <li>ACaptureRequest</li>
1011      * </ul></p>
1012      *
1013      * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
1014      * capture settings.</p>
1015      * <p>This is the mode that that is active when
1016      * <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
1017      * disable ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
1018      * while in use.</p>
1019      * <p>The interpretation and implementation of these scene modes is left
1020      * to the implementor of the camera device. Their behavior will not be
1021      * consistent across all devices, and any given device may only implement
1022      * a subset of these modes.</p>
1023      *
1024      * @see ACAMERA_CONTROL_AE_MODE
1025      * @see ACAMERA_CONTROL_AF_MODE
1026      * @see ACAMERA_CONTROL_AWB_MODE
1027      * @see ACAMERA_CONTROL_MODE
1028      */
1029     ACAMERA_CONTROL_SCENE_MODE =                                // byte (acamera_metadata_enum_android_control_scene_mode_t)
1030             ACAMERA_CONTROL_START + 16,
1031     /**
1032      * <p>Whether video stabilization is
1033      * active.</p>
1034      *
1035      * <p>Type: byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)</p>
1036      *
1037      * <p>This tag may appear in:
1038      * <ul>
1039      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1040      *   <li>ACaptureRequest</li>
1041      * </ul></p>
1042      *
1043      * <p>Video stabilization automatically warps images from
1044      * the camera in order to stabilize motion between consecutive frames.</p>
1045      * <p>If enabled, video stabilization can modify the
1046      * ACAMERA_SCALER_CROP_REGION to keep the video stream stabilized.</p>
1047      * <p>Switching between different video stabilization modes may take several
1048      * frames to initialize, the camera device will report the current mode
1049      * in capture result metadata. For example, When "ON" mode is requested,
1050      * the video stabilization modes in the first several capture results may
1051      * still be "OFF", and it will become "ON" when the initialization is
1052      * done.</p>
1053      * <p>In addition, not all recording sizes or frame rates may be supported for
1054      * stabilization by a device that reports stabilization support. It is guaranteed
1055      * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
1056      * the recording resolution is less than or equal to 1920 x 1080 (width less than
1057      * or equal to 1920, height less than or equal to 1080), and the recording
1058      * frame rate is less than or equal to 30fps.  At other sizes, the CaptureResult
1059      * ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE field will return
1060      * OFF if the recording output is not stabilized, or if there are no output
1061      * Surface types that can be stabilized.</p>
1062      * <p>If a camera device supports both this mode and OIS
1063      * (ACAMERA_LENS_OPTICAL_STABILIZATION_MODE), turning both modes on may
1064      * produce undesirable interaction, so it is recommended not to enable
1065      * both at the same time.</p>
1066      *
1067      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1068      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
1069      * @see ACAMERA_SCALER_CROP_REGION
1070      */
1071     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE =                  // byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)
1072             ACAMERA_CONTROL_START + 17,
1073     /**
1074      * <p>List of auto-exposure antibanding modes for ACAMERA_CONTROL_AE_ANTIBANDING_MODE that are
1075      * supported by this camera device.</p>
1076      *
1077      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1078      *
1079      * <p>Type: byte[n]</p>
1080      *
1081      * <p>This tag may appear in:
1082      * <ul>
1083      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1084      * </ul></p>
1085      *
1086      * <p>Not all of the auto-exposure anti-banding modes may be
1087      * supported by a given camera device. This field lists the
1088      * valid anti-banding modes that the application may request
1089      * for this camera device with the
1090      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE control.</p>
1091      *
1092      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1093      */
1094     ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =            // byte[n]
1095             ACAMERA_CONTROL_START + 18,
1096     /**
1097      * <p>List of auto-exposure modes for ACAMERA_CONTROL_AE_MODE that are supported by this camera
1098      * device.</p>
1099      *
1100      * @see ACAMERA_CONTROL_AE_MODE
1101      *
1102      * <p>Type: byte[n]</p>
1103      *
1104      * <p>This tag may appear in:
1105      * <ul>
1106      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1107      * </ul></p>
1108      *
1109      * <p>Not all the auto-exposure modes may be supported by a
1110      * given camera device, especially if no flash unit is
1111      * available. This entry lists the valid modes for
1112      * ACAMERA_CONTROL_AE_MODE for this camera device.</p>
1113      * <p>All camera devices support ON, and all camera devices with flash
1114      * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
1115      * <p>FULL mode camera devices always support OFF mode,
1116      * which enables application control of camera exposure time,
1117      * sensitivity, and frame duration.</p>
1118      * <p>LEGACY mode camera devices never support OFF mode.
1119      * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
1120      * capability.</p>
1121      *
1122      * @see ACAMERA_CONTROL_AE_MODE
1123      */
1124     ACAMERA_CONTROL_AE_AVAILABLE_MODES =                        // byte[n]
1125             ACAMERA_CONTROL_START + 19,
1126     /**
1127      * <p>List of frame rate ranges for ACAMERA_CONTROL_AE_TARGET_FPS_RANGE supported by
1128      * this camera device.</p>
1129      *
1130      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
1131      *
1132      * <p>Type: int32[2*n]</p>
1133      *
1134      * <p>This tag may appear in:
1135      * <ul>
1136      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1137      * </ul></p>
1138      *
1139      * <p>For devices at the LEGACY level or above:</p>
1140      * <ul>
1141      * <li>
1142      * <p>For constant-framerate recording, for each normal
1143      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>, that is, a
1144      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1145      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#quality">quality</a> in
1146      * the range [<a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_LOW">QUALITY_LOW</a>,
1147      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_2160P">QUALITY_2160P</a>], if the profile is
1148      * supported by the device and has
1149      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code>, this list will
1150      * always include (<code>x</code>,<code>x</code>).</p>
1151      * </li>
1152      * <li>
1153      * <p>Also, a camera device must either not support any
1154      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>,
1155      * or support at least one
1156      * normal <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1157      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code> &gt;= 24.</p>
1158      * </li>
1159      * </ul>
1160      * <p>For devices at the LIMITED level or above:</p>
1161      * <ul>
1162      * <li>For devices that advertise NIR color filter arrangement in
1163      * ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, this list will always include
1164      * (<code>max</code>, <code>max</code>) where <code>max</code> = the maximum output frame rate of the maximum YUV_420_888
1165      * output size.</li>
1166      * <li>For devices advertising any color filter arrangement other than NIR, or devices not
1167      * advertising color filter arrangement, this list will always include (<code>min</code>, <code>max</code>) and
1168      * (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
1169      * maximum YUV_420_888 output size.</li>
1170      * </ul>
1171      *
1172      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1173      */
1174     ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =            // int32[2*n]
1175             ACAMERA_CONTROL_START + 20,
1176     /**
1177      * <p>Maximum and minimum exposure compensation values for
1178      * ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION, in counts of ACAMERA_CONTROL_AE_COMPENSATION_STEP,
1179      * that are supported by this camera device.</p>
1180      *
1181      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
1182      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1183      *
1184      * <p>Type: int32[2]</p>
1185      *
1186      * <p>This tag may appear in:
1187      * <ul>
1188      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1189      * </ul></p>
1190      *
1191      */
1192     ACAMERA_CONTROL_AE_COMPENSATION_RANGE =                     // int32[2]
1193             ACAMERA_CONTROL_START + 21,
1194     /**
1195      * <p>Smallest step by which the exposure compensation
1196      * can be changed.</p>
1197      *
1198      * <p>Type: rational</p>
1199      *
1200      * <p>This tag may appear in:
1201      * <ul>
1202      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1203      * </ul></p>
1204      *
1205      * <p>This is the unit for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION. For example, if this key has
1206      * a value of <code>1/2</code>, then a setting of <code>-2</code> for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION means
1207      * that the target EV offset for the auto-exposure routine is -1 EV.</p>
1208      * <p>One unit of EV compensation changes the brightness of the captured image by a factor
1209      * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
1210      *
1211      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1212      */
1213     ACAMERA_CONTROL_AE_COMPENSATION_STEP =                      // rational
1214             ACAMERA_CONTROL_START + 22,
1215     /**
1216      * <p>List of auto-focus (AF) modes for ACAMERA_CONTROL_AF_MODE that are
1217      * supported by this camera device.</p>
1218      *
1219      * @see ACAMERA_CONTROL_AF_MODE
1220      *
1221      * <p>Type: byte[n]</p>
1222      *
1223      * <p>This tag may appear in:
1224      * <ul>
1225      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1226      * </ul></p>
1227      *
1228      * <p>Not all the auto-focus modes may be supported by a
1229      * given camera device. This entry lists the valid modes for
1230      * ACAMERA_CONTROL_AF_MODE for this camera device.</p>
1231      * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
1232      * camera devices with adjustable focuser units
1233      * (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>) will support AUTO mode.</p>
1234      * <p>LEGACY devices will support OFF mode only if they support
1235      * focusing to infinity (by also setting ACAMERA_LENS_FOCUS_DISTANCE to
1236      * <code>0.0f</code>).</p>
1237      *
1238      * @see ACAMERA_CONTROL_AF_MODE
1239      * @see ACAMERA_LENS_FOCUS_DISTANCE
1240      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
1241      */
1242     ACAMERA_CONTROL_AF_AVAILABLE_MODES =                        // byte[n]
1243             ACAMERA_CONTROL_START + 23,
1244     /**
1245      * <p>List of color effects for ACAMERA_CONTROL_EFFECT_MODE that are supported by this camera
1246      * device.</p>
1247      *
1248      * @see ACAMERA_CONTROL_EFFECT_MODE
1249      *
1250      * <p>Type: byte[n]</p>
1251      *
1252      * <p>This tag may appear in:
1253      * <ul>
1254      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1255      * </ul></p>
1256      *
1257      * <p>This list contains the color effect modes that can be applied to
1258      * images produced by the camera device.
1259      * Implementations are not expected to be consistent across all devices.
1260      * If no color effect modes are available for a device, this will only list
1261      * OFF.</p>
1262      * <p>A color effect will only be applied if
1263      * ACAMERA_CONTROL_MODE != OFF.  OFF is always included in this list.</p>
1264      * <p>This control has no effect on the operation of other control routines such
1265      * as auto-exposure, white balance, or focus.</p>
1266      *
1267      * @see ACAMERA_CONTROL_MODE
1268      */
1269     ACAMERA_CONTROL_AVAILABLE_EFFECTS =                         // byte[n]
1270             ACAMERA_CONTROL_START + 24,
1271     /**
1272      * <p>List of scene modes for ACAMERA_CONTROL_SCENE_MODE that are supported by this camera
1273      * device.</p>
1274      *
1275      * @see ACAMERA_CONTROL_SCENE_MODE
1276      *
1277      * <p>Type: byte[n]</p>
1278      *
1279      * <p>This tag may appear in:
1280      * <ul>
1281      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1282      * </ul></p>
1283      *
1284      * <p>This list contains scene modes that can be set for the camera device.
1285      * Only scene modes that have been fully implemented for the
1286      * camera device may be included here. Implementations are not expected
1287      * to be consistent across all devices.</p>
1288      * <p>If no scene modes are supported by the camera device, this
1289      * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
1290      * <p>FACE_PRIORITY is always listed if face detection is
1291      * supported (i.e.<code>ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT &gt;
1292      * 0</code>).</p>
1293      *
1294      * @see ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT
1295      */
1296     ACAMERA_CONTROL_AVAILABLE_SCENE_MODES =                     // byte[n]
1297             ACAMERA_CONTROL_START + 25,
1298     /**
1299      * <p>List of video stabilization modes for ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1300      * that are supported by this camera device.</p>
1301      *
1302      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1303      *
1304      * <p>Type: byte[n]</p>
1305      *
1306      * <p>This tag may appear in:
1307      * <ul>
1308      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1309      * </ul></p>
1310      *
1311      * <p>OFF will always be listed.</p>
1312      */
1313     ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =       // byte[n]
1314             ACAMERA_CONTROL_START + 26,
1315     /**
1316      * <p>List of auto-white-balance modes for ACAMERA_CONTROL_AWB_MODE that are supported by this
1317      * camera device.</p>
1318      *
1319      * @see ACAMERA_CONTROL_AWB_MODE
1320      *
1321      * <p>Type: byte[n]</p>
1322      *
1323      * <p>This tag may appear in:
1324      * <ul>
1325      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1326      * </ul></p>
1327      *
1328      * <p>Not all the auto-white-balance modes may be supported by a
1329      * given camera device. This entry lists the valid modes for
1330      * ACAMERA_CONTROL_AWB_MODE for this camera device.</p>
1331      * <p>All camera devices will support ON mode.</p>
1332      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
1333      * mode, which enables application control of white balance, by using
1334      * ACAMERA_COLOR_CORRECTION_TRANSFORM and ACAMERA_COLOR_CORRECTION_GAINS(ACAMERA_COLOR_CORRECTION_MODE must be set to TRANSFORM_MATRIX). This includes all FULL
1335      * mode camera devices.</p>
1336      *
1337      * @see ACAMERA_COLOR_CORRECTION_GAINS
1338      * @see ACAMERA_COLOR_CORRECTION_MODE
1339      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
1340      * @see ACAMERA_CONTROL_AWB_MODE
1341      */
1342     ACAMERA_CONTROL_AWB_AVAILABLE_MODES =                       // byte[n]
1343             ACAMERA_CONTROL_START + 27,
1344     /**
1345      * <p>List of the maximum number of regions that can be used for metering in
1346      * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
1347      * this corresponds to the maximum number of elements in
1348      * ACAMERA_CONTROL_AE_REGIONS, ACAMERA_CONTROL_AWB_REGIONS,
1349      * and ACAMERA_CONTROL_AF_REGIONS.</p>
1350      *
1351      * @see ACAMERA_CONTROL_AE_REGIONS
1352      * @see ACAMERA_CONTROL_AF_REGIONS
1353      * @see ACAMERA_CONTROL_AWB_REGIONS
1354      *
1355      * <p>Type: int32[3]</p>
1356      *
1357      * <p>This tag may appear in:
1358      * <ul>
1359      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1360      * </ul></p>
1361      *
1362      */
1363     ACAMERA_CONTROL_MAX_REGIONS =                               // int32[3]
1364             ACAMERA_CONTROL_START + 28,
1365     /**
1366      * <p>Current state of the auto-exposure (AE) algorithm.</p>
1367      *
1368      * <p>Type: byte (acamera_metadata_enum_android_control_ae_state_t)</p>
1369      *
1370      * <p>This tag may appear in:
1371      * <ul>
1372      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1373      * </ul></p>
1374      *
1375      * <p>Switching between or enabling AE modes (ACAMERA_CONTROL_AE_MODE) always
1376      * resets the AE state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1377      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1378      * the algorithm states to INACTIVE.</p>
1379      * <p>The camera device can do several state transitions between two results, if it is
1380      * allowed by the state transition table. For example: INACTIVE may never actually be
1381      * seen in a result.</p>
1382      * <p>The state in the result is the state for this image (in sync with this image): if
1383      * AE state becomes CONVERGED, then the image data associated with this result should
1384      * be good to use.</p>
1385      * <p>Below are state transition tables for different AE modes.</p>
1386      * <p>State       | Transition Cause | New State | Notes
1387      * :------------:|:----------------:|:---------:|:-----------------------:
1388      * INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled</p>
1389      * <p>When ACAMERA_CONTROL_AE_MODE is AE_MODE_ON*:</p>
1390      * <p>State        | Transition Cause                             | New State      | Notes
1391      * :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
1392      * INACTIVE       | Camera device initiates AE scan              | SEARCHING      | Values changing
1393      * INACTIVE       | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1394      * SEARCHING      | Camera device finishes AE scan               | CONVERGED      | Good values, not changing
1395      * SEARCHING      | Camera device finishes AE scan               | FLASH_REQUIRED | Converged but too dark w/o flash
1396      * SEARCHING      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1397      * CONVERGED      | Camera device initiates AE scan              | SEARCHING      | Values changing
1398      * CONVERGED      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1399      * FLASH_REQUIRED | Camera device initiates AE scan              | SEARCHING      | Values changing
1400      * FLASH_REQUIRED | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1401      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | SEARCHING      | Values not good after unlock
1402      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | CONVERGED      | Values good after unlock
1403      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | FLASH_REQUIRED | Exposure good, but too dark
1404      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is OFF | CONVERGED      | Ready for high-quality capture
1405      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is ON  | LOCKED         | Ready for high-quality capture
1406      * LOCKED         | aeLock is ON and aePrecaptureTrigger is START | LOCKED        | Precapture trigger is ignored when AE is already locked
1407      * LOCKED         | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED        | Precapture trigger is ignored when AE is already locked
1408      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START | PRECAPTURE     | Start AE precapture metering sequence
1409      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled</p>
1410      * <p>If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
1411      * ACAMERA_CONTROL_AE_AVAILABLE_MODES), ACAMERA_CONTROL_AE_STATE must be FLASH_REQUIRED after
1412      * the camera device finishes AE scan and it's too dark without flash.</p>
1413      * <p>For the above table, the camera device may skip reporting any state changes that happen
1414      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1415      * can be skipped in that manner is called a transient state.</p>
1416      * <p>For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
1417      * listed in above table, it is also legal for the camera device to skip one or more
1418      * transient states between two results. See below table for examples:</p>
1419      * <p>State        | Transition Cause                                            | New State      | Notes
1420      * :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
1421      * INACTIVE       | Camera device finished AE scan                              | CONVERGED      | Values are already good, transient states are skipped by camera device.
1422      * 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.
1423      * 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.
1424      * 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.
1425      * 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.
1426      * 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.
1427      * FLASH_REQUIRED | Camera device finished AE scan                              | CONVERGED      | Converged after a new scan, transient states are skipped by camera device.</p>
1428      *
1429      * @see ACAMERA_CONTROL_AE_AVAILABLE_MODES
1430      * @see ACAMERA_CONTROL_AE_LOCK
1431      * @see ACAMERA_CONTROL_AE_MODE
1432      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
1433      * @see ACAMERA_CONTROL_AE_STATE
1434      * @see ACAMERA_CONTROL_MODE
1435      * @see ACAMERA_CONTROL_SCENE_MODE
1436      */
1437     ACAMERA_CONTROL_AE_STATE =                                  // byte (acamera_metadata_enum_android_control_ae_state_t)
1438             ACAMERA_CONTROL_START + 31,
1439     /**
1440      * <p>Current state of auto-focus (AF) algorithm.</p>
1441      *
1442      * <p>Type: byte (acamera_metadata_enum_android_control_af_state_t)</p>
1443      *
1444      * <p>This tag may appear in:
1445      * <ul>
1446      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1447      * </ul></p>
1448      *
1449      * <p>Switching between or enabling AF modes (ACAMERA_CONTROL_AF_MODE) always
1450      * resets the AF state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1451      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1452      * the algorithm states to INACTIVE.</p>
1453      * <p>The camera device can do several state transitions between two results, if it is
1454      * allowed by the state transition table. For example: INACTIVE may never actually be
1455      * seen in a result.</p>
1456      * <p>The state in the result is the state for this image (in sync with this image): if
1457      * AF state becomes FOCUSED, then the image data associated with this result should
1458      * be sharp.</p>
1459      * <p>Below are state transition tables for different AF modes.</p>
1460      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_OFF or AF_MODE_EDOF:</p>
1461      * <p>State       | Transition Cause | New State | Notes
1462      * :------------:|:----------------:|:---------:|:-----------:
1463      * INACTIVE      |                  | INACTIVE  | Never changes</p>
1464      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1465      * <p>State            | Transition Cause | New State          | Notes
1466      * :-----------------:|:----------------:|:------------------:|:--------------:
1467      * INACTIVE           | AF_TRIGGER       | ACTIVE_SCAN        | Start AF sweep, Lens now moving
1468      * ACTIVE_SCAN        | AF sweep done    | FOCUSED_LOCKED     | Focused, Lens now locked
1469      * ACTIVE_SCAN        | AF sweep done    | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
1470      * ACTIVE_SCAN        | AF_CANCEL        | INACTIVE           | Cancel/reset AF, Lens now locked
1471      * FOCUSED_LOCKED     | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1472      * FOCUSED_LOCKED     | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1473      * NOT_FOCUSED_LOCKED | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1474      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1475      * Any state          | Mode change      | INACTIVE           |</p>
1476      * <p>For the above table, the camera device may skip reporting any state changes that happen
1477      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1478      * can be skipped in that manner is called a transient state.</p>
1479      * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1480      * state transitions listed in above table, it is also legal for the camera device to skip
1481      * one or more transient states between two results. See below table for examples:</p>
1482      * <p>State            | Transition Cause | New State          | Notes
1483      * :-----------------:|:----------------:|:------------------:|:--------------:
1484      * INACTIVE           | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1485      * INACTIVE           | AF_TRIGGER       | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
1486      * FOCUSED_LOCKED     | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1487      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is good after a scan, lens is not locked.</p>
1488      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_VIDEO:</p>
1489      * <p>State            | Transition Cause                    | New State          | Notes
1490      * :-----------------:|:-----------------------------------:|:------------------:|:--------------:
1491      * INACTIVE           | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1492      * INACTIVE           | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1493      * PASSIVE_SCAN       | Camera device completes current scan| PASSIVE_FOCUSED    | End AF scan, Lens now locked
1494      * PASSIVE_SCAN       | Camera device fails current scan    | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1495      * PASSIVE_SCAN       | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, if focus is good. Lens now locked
1496      * PASSIVE_SCAN       | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
1497      * PASSIVE_SCAN       | AF_CANCEL                           | INACTIVE           | Reset lens position, Lens now locked
1498      * PASSIVE_FOCUSED    | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1499      * PASSIVE_UNFOCUSED  | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1500      * PASSIVE_FOCUSED    | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, lens now locked
1501      * PASSIVE_UNFOCUSED  | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
1502      * FOCUSED_LOCKED     | AF_TRIGGER                          | FOCUSED_LOCKED     | No effect
1503      * FOCUSED_LOCKED     | AF_CANCEL                           | INACTIVE           | Restart AF scan
1504      * NOT_FOCUSED_LOCKED | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | No effect
1505      * NOT_FOCUSED_LOCKED | AF_CANCEL                           | INACTIVE           | Restart AF scan</p>
1506      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_PICTURE:</p>
1507      * <p>State            | Transition Cause                     | New State          | Notes
1508      * :-----------------:|:------------------------------------:|:------------------:|:--------------:
1509      * INACTIVE           | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1510      * INACTIVE           | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1511      * PASSIVE_SCAN       | Camera device completes current scan | PASSIVE_FOCUSED    | End AF scan, Lens now locked
1512      * PASSIVE_SCAN       | Camera device fails current scan     | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1513      * PASSIVE_SCAN       | AF_TRIGGER                           | FOCUSED_LOCKED     | Eventual transition once the focus is good. Lens now locked
1514      * PASSIVE_SCAN       | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
1515      * PASSIVE_SCAN       | AF_CANCEL                            | INACTIVE           | Reset lens position, Lens now locked
1516      * PASSIVE_FOCUSED    | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1517      * PASSIVE_UNFOCUSED  | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1518      * PASSIVE_FOCUSED    | AF_TRIGGER                           | FOCUSED_LOCKED     | Immediate trans. Lens now locked
1519      * PASSIVE_UNFOCUSED  | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
1520      * FOCUSED_LOCKED     | AF_TRIGGER                           | FOCUSED_LOCKED     | No effect
1521      * FOCUSED_LOCKED     | AF_CANCEL                            | INACTIVE           | Restart AF scan
1522      * NOT_FOCUSED_LOCKED | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | No effect
1523      * NOT_FOCUSED_LOCKED | AF_CANCEL                            | INACTIVE           | Restart AF scan</p>
1524      * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1525      * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1526      * camera device. When a trigger is included in a mode switch request, the trigger
1527      * will be evaluated in the context of the new mode in the request.
1528      * See below table for examples:</p>
1529      * <p>State      | Transition Cause                       | New State                                | Notes
1530      * :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
1531      * any state    | CAF--&gt;AUTO mode switch                 | INACTIVE                                 | Mode switch without trigger, initial state must be INACTIVE
1532      * any state    | CAF--&gt;AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE   | Mode switch with trigger, INACTIVE is skipped
1533      * any state    | AUTO--&gt;CAF mode switch                 | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped</p>
1534      *
1535      * @see ACAMERA_CONTROL_AF_MODE
1536      * @see ACAMERA_CONTROL_MODE
1537      * @see ACAMERA_CONTROL_SCENE_MODE
1538      */
1539     ACAMERA_CONTROL_AF_STATE =                                  // byte (acamera_metadata_enum_android_control_af_state_t)
1540             ACAMERA_CONTROL_START + 32,
1541     /**
1542      * <p>Current state of auto-white balance (AWB) algorithm.</p>
1543      *
1544      * <p>Type: byte (acamera_metadata_enum_android_control_awb_state_t)</p>
1545      *
1546      * <p>This tag may appear in:
1547      * <ul>
1548      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1549      * </ul></p>
1550      *
1551      * <p>Switching between or enabling AWB modes (ACAMERA_CONTROL_AWB_MODE) always
1552      * resets the AWB state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1553      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1554      * the algorithm states to INACTIVE.</p>
1555      * <p>The camera device can do several state transitions between two results, if it is
1556      * allowed by the state transition table. So INACTIVE may never actually be seen in
1557      * a result.</p>
1558      * <p>The state in the result is the state for this image (in sync with this image): if
1559      * AWB state becomes CONVERGED, then the image data associated with this result should
1560      * be good to use.</p>
1561      * <p>Below are state transition tables for different AWB modes.</p>
1562      * <p>When <code>ACAMERA_CONTROL_AWB_MODE != AWB_MODE_AUTO</code>:</p>
1563      * <p>State       | Transition Cause | New State | Notes
1564      * :------------:|:----------------:|:---------:|:-----------------------:
1565      * INACTIVE      |                  |INACTIVE   |Camera device auto white balance algorithm is disabled</p>
1566      * <p>When ACAMERA_CONTROL_AWB_MODE is AWB_MODE_AUTO:</p>
1567      * <p>State        | Transition Cause                 | New State     | Notes
1568      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1569      * INACTIVE       | Camera device initiates AWB scan | SEARCHING     | Values changing
1570      * INACTIVE       | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1571      * SEARCHING      | Camera device finishes AWB scan  | CONVERGED     | Good values, not changing
1572      * SEARCHING      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1573      * CONVERGED      | Camera device initiates AWB scan | SEARCHING     | Values changing
1574      * CONVERGED      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1575      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | SEARCHING     | Values not good after unlock</p>
1576      * <p>For the above table, the camera device may skip reporting any state changes that happen
1577      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1578      * can be skipped in that manner is called a transient state.</p>
1579      * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1580      * listed in above table, it is also legal for the camera device to skip one or more
1581      * transient states between two results. See below table for examples:</p>
1582      * <p>State        | Transition Cause                 | New State     | Notes
1583      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1584      * INACTIVE       | Camera device finished AWB scan  | CONVERGED     | Values are already good, transient states are skipped by camera device.
1585      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | CONVERGED     | Values good after unlock, transient states are skipped by camera device.</p>
1586      *
1587      * @see ACAMERA_CONTROL_AWB_LOCK
1588      * @see ACAMERA_CONTROL_AWB_MODE
1589      * @see ACAMERA_CONTROL_MODE
1590      * @see ACAMERA_CONTROL_SCENE_MODE
1591      */
1592     ACAMERA_CONTROL_AWB_STATE =                                 // byte (acamera_metadata_enum_android_control_awb_state_t)
1593             ACAMERA_CONTROL_START + 34,
1594     /**
1595      * <p>Whether the camera device supports ACAMERA_CONTROL_AE_LOCK</p>
1596      *
1597      * @see ACAMERA_CONTROL_AE_LOCK
1598      *
1599      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_available_t)</p>
1600      *
1601      * <p>This tag may appear in:
1602      * <ul>
1603      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1604      * </ul></p>
1605      *
1606      * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1607      * list <code>true</code>. This includes FULL devices.</p>
1608      */
1609     ACAMERA_CONTROL_AE_LOCK_AVAILABLE =                         // byte (acamera_metadata_enum_android_control_ae_lock_available_t)
1610             ACAMERA_CONTROL_START + 36,
1611     /**
1612      * <p>Whether the camera device supports ACAMERA_CONTROL_AWB_LOCK</p>
1613      *
1614      * @see ACAMERA_CONTROL_AWB_LOCK
1615      *
1616      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_available_t)</p>
1617      *
1618      * <p>This tag may appear in:
1619      * <ul>
1620      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1621      * </ul></p>
1622      *
1623      * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1624      * always list <code>true</code>. This includes FULL devices.</p>
1625      */
1626     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE =                        // byte (acamera_metadata_enum_android_control_awb_lock_available_t)
1627             ACAMERA_CONTROL_START + 37,
1628     /**
1629      * <p>List of control modes for ACAMERA_CONTROL_MODE that are supported by this camera
1630      * device.</p>
1631      *
1632      * @see ACAMERA_CONTROL_MODE
1633      *
1634      * <p>Type: byte[n]</p>
1635      *
1636      * <p>This tag may appear in:
1637      * <ul>
1638      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1639      * </ul></p>
1640      *
1641      * <p>This list contains control modes that can be set for the camera device.
1642      * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1643      * devices will always support OFF, AUTO modes.</p>
1644      */
1645     ACAMERA_CONTROL_AVAILABLE_MODES =                           // byte[n]
1646             ACAMERA_CONTROL_START + 38,
1647     /**
1648      * <p>Range of boosts for ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST supported
1649      * by this camera device.</p>
1650      *
1651      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1652      *
1653      * <p>Type: int32[2]</p>
1654      *
1655      * <p>This tag may appear in:
1656      * <ul>
1657      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1658      * </ul></p>
1659      *
1660      * <p>Devices support post RAW sensitivity boost  will advertise
1661      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST key for controling
1662      * post RAW sensitivity boost.</p>
1663      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1664      * outputs. For devices that do support RAW format outputs, this key will always
1665      * present, and if a device does not support post RAW sensitivity boost, it will
1666      * list <code>(100, 100)</code> in this key.</p>
1667      *
1668      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1669      */
1670     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =          // int32[2]
1671             ACAMERA_CONTROL_START + 39,
1672     /**
1673      * <p>The amount of additional sensitivity boost applied to output images
1674      * after RAW sensor data is captured.</p>
1675      *
1676      * <p>Type: int32</p>
1677      *
1678      * <p>This tag may appear in:
1679      * <ul>
1680      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1681      *   <li>ACaptureRequest</li>
1682      * </ul></p>
1683      *
1684      * <p>Some camera devices support additional digital sensitivity boosting in the
1685      * camera processing pipeline after sensor RAW image is captured.
1686      * Such a boost will be applied to YUV/JPEG format output images but will not
1687      * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
1688      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1689      * outputs. For devices that do support RAW format outputs, this key will always
1690      * present, and if a device does not support post RAW sensitivity boost, it will
1691      * list <code>100</code> in this key.</p>
1692      * <p>If the camera device cannot apply the exact boost requested, it will reduce the
1693      * boost to the nearest supported value.
1694      * The final boost value used will be available in the output capture result.</p>
1695      * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
1696      * of such device will have the total sensitivity of
1697      * <code>ACAMERA_SENSOR_SENSITIVITY * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST / 100</code>
1698      * The sensitivity of RAW format images will always be <code>ACAMERA_SENSOR_SENSITIVITY</code></p>
1699      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
1700      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
1701      *
1702      * @see ACAMERA_CONTROL_AE_MODE
1703      * @see ACAMERA_CONTROL_MODE
1704      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1705      * @see ACAMERA_SENSOR_SENSITIVITY
1706      */
1707     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST =                // int32
1708             ACAMERA_CONTROL_START + 40,
1709     /**
1710      * <p>Allow camera device to enable zero-shutter-lag mode for requests with
1711      * ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE.</p>
1712      *
1713      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1714      *
1715      * <p>Type: byte (acamera_metadata_enum_android_control_enable_zsl_t)</p>
1716      *
1717      * <p>This tag may appear in:
1718      * <ul>
1719      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1720      *   <li>ACaptureRequest</li>
1721      * </ul></p>
1722      *
1723      * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
1724      * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
1725      * produce output images for a zero-shutter-lag request. The result metadata including the
1726      * ACAMERA_SENSOR_TIMESTAMP reflects the source frames used to produce output images.
1727      * Therefore, the contents of the output images and the result metadata may be out of order
1728      * compared to previous regular requests. enableZsl does not affect requests with other
1729      * capture intents.</p>
1730      * <p>For example, when requests are submitted in the following order:
1731      *   Request A: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is PREVIEW
1732      *   Request B: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is STILL_CAPTURE</p>
1733      * <p>The output images for request B may have contents captured before the output images for
1734      * request A, and the result metadata for request B may be older than the result metadata for
1735      * request A.</p>
1736      * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in
1737      * the past for requests with STILL_CAPTURE capture intent.</p>
1738      * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
1739      * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
1740      * <code>false</code> if present.</p>
1741      * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
1742      * capture templates is always <code>false</code> if present.</p>
1743      * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
1744      *
1745      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1746      * @see ACAMERA_SENSOR_TIMESTAMP
1747      */
1748     ACAMERA_CONTROL_ENABLE_ZSL =                                // byte (acamera_metadata_enum_android_control_enable_zsl_t)
1749             ACAMERA_CONTROL_START + 41,
1750     /**
1751      * <p>Whether a significant scene change is detected within the currently-set AF
1752      * region(s).</p>
1753      *
1754      * <p>Type: byte (acamera_metadata_enum_android_control_af_scene_change_t)</p>
1755      *
1756      * <p>This tag may appear in:
1757      * <ul>
1758      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1759      * </ul></p>
1760      *
1761      * <p>When the camera focus routine detects a change in the scene it is looking at,
1762      * such as a large shift in camera viewpoint, significant motion in the scene, or a
1763      * significant illumination change, this value will be set to DETECTED for a single capture
1764      * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
1765      * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.</p>
1766      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
1767      */
1768     ACAMERA_CONTROL_AF_SCENE_CHANGE =                           // byte (acamera_metadata_enum_android_control_af_scene_change_t)
1769             ACAMERA_CONTROL_START + 42,
1770     /**
1771      * <p>The list of extended scene modes for ACAMERA_CONTROL_EXTENDED_SCENE_MODE that are supported
1772      * by this camera device, and each extended scene mode's maximum streaming (non-stall) size
1773      * with  effect.</p>
1774      *
1775      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1776      *
1777      * <p>Type: int32[3*n]</p>
1778      *
1779      * <p>This tag may appear in:
1780      * <ul>
1781      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1782      * </ul></p>
1783      *
1784      * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p>
1785      * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
1786      * under which bokeh is effective when capture intent is PREVIEW. Note that when capture
1787      * intent is PREVIEW, the bokeh effect may not be as high in quality compared to
1788      * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming
1789      * dimension must be one of the YUV_420_888 or PRIVATE resolutions in
1790      * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the
1791      * application configures a stream larger than the maximum streaming dimension, bokeh
1792      * effect may not be applied for this stream for PREVIEW intent.</p>
1793      * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
1794      * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
1795      * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
1796      * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
1797      * If the application configures a stream with larger dimension, the stream may not have
1798      * bokeh effect applied.</p>
1799      */
1800     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES =   // int32[3*n]
1801             ACAMERA_CONTROL_START + 43,
1802     /**
1803      * <p>The ranges of supported zoom ratio for non-DISABLED ACAMERA_CONTROL_EXTENDED_SCENE_MODE.</p>
1804      *
1805      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1806      *
1807      * <p>Type: float[2*n]</p>
1808      *
1809      * <p>This tag may appear in:
1810      * <ul>
1811      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1812      * </ul></p>
1813      *
1814      * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios
1815      * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges
1816      * for all supported non-DISABLED extended scene modes, in the same order as in
1817      * android.control.availableExtended.</p>
1818      * <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p>
1819      */
1820     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES =
1821                                                                 // float[2*n]
1822             ACAMERA_CONTROL_START + 44,
1823     /**
1824      * <p>Whether extended scene mode is enabled for a particular capture request.</p>
1825      *
1826      * <p>Type: byte (acamera_metadata_enum_android_control_extended_scene_mode_t)</p>
1827      *
1828      * <p>This tag may appear in:
1829      * <ul>
1830      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1831      *   <li>ACaptureRequest</li>
1832      * </ul></p>
1833      *
1834      * <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
1835      * focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
1836      * <p>When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
1837      * processing needed for high quality bokeh effect, the stall may be longer than when
1838      * capture intent is not STILL_CAPTURE.</p>
1839      * <p>When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,</p>
1840      * <ul>
1841      * <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
1842      * BURST_CAPTURE must still be met.</li>
1843      * <li>All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
1844      * (queried via {@link ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES })
1845      * will have preview bokeh effect applied.</li>
1846      * </ul>
1847      * <p>When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
1848      * maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
1849      * be available for streams larger than the maximum streaming dimension.</p>
1850      * <p>Switching between different extended scene modes may involve reconfiguration of the camera
1851      * pipeline, resulting in long latency. The application should check this key against the
1852      * available session keys queried via
1853      * {@link ACameraManager_getCameraCharacteristics }.</p>
1854      * <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
1855      * with different field of view. As a result, when bokeh mode is enabled, the camera device
1856      * may override ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO, and the field of
1857      * view may be smaller than when bokeh mode is off.</p>
1858      *
1859      * @see ACAMERA_CONTROL_ZOOM_RATIO
1860      * @see ACAMERA_SCALER_CROP_REGION
1861      */
1862     ACAMERA_CONTROL_EXTENDED_SCENE_MODE =                       // byte (acamera_metadata_enum_android_control_extended_scene_mode_t)
1863             ACAMERA_CONTROL_START + 45,
1864     /**
1865      * <p>Minimum and maximum zoom ratios supported by this camera device.</p>
1866      *
1867      * <p>Type: float[2]</p>
1868      *
1869      * <p>This tag may appear in:
1870      * <ul>
1871      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1872      * </ul></p>
1873      *
1874      * <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
1875      * setting ACAMERA_CONTROL_ZOOM_RATIO to values less than 1.0 increases the camera's field
1876      * of view.</p>
1877      *
1878      * @see ACAMERA_CONTROL_ZOOM_RATIO
1879      */
1880     ACAMERA_CONTROL_ZOOM_RATIO_RANGE =                          // float[2]
1881             ACAMERA_CONTROL_START + 46,
1882     /**
1883      * <p>The desired zoom ratio</p>
1884      *
1885      * <p>Type: float</p>
1886      *
1887      * <p>This tag may appear in:
1888      * <ul>
1889      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1890      *   <li>ACaptureRequest</li>
1891      * </ul></p>
1892      *
1893      * <p>Instead of using ACAMERA_SCALER_CROP_REGION with dual purposes of crop and zoom, the
1894      * application can now choose to use this tag to specify the desired zoom level. The
1895      * ACAMERA_SCALER_CROP_REGION can still be used to specify the horizontal or vertical
1896      * crop to achieve aspect ratios different than the native camera sensor.</p>
1897      * <p>By using this control, the application gains a simpler way to control zoom, which can
1898      * be a combination of optical and digital zoom. For example, a multi-camera system may
1899      * contain more than one lens with different focal lengths, and the user can use optical
1900      * zoom by switching between lenses. Using zoomRatio has benefits in the scenarios below:</p>
1901      * <ul>
1902      * <li>Zooming in from a wide-angle lens to a telephoto lens: A floating-point ratio provides
1903      *   better precision compared to an integer value of ACAMERA_SCALER_CROP_REGION.</li>
1904      * <li>Zooming out from a wide lens to an ultrawide lens: zoomRatio supports zoom-out whereas
1905      *   ACAMERA_SCALER_CROP_REGION doesn't.</li>
1906      * </ul>
1907      * <p>To illustrate, here are several scenarios of different zoom ratios, crop regions,
1908      * and output streams, for a hypothetical camera device with an active array of size
1909      * <code>(2000,1500)</code>.</p>
1910      * <ul>
1911      * <li>Camera Configuration:<ul>
1912      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
1913      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
1914      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
1915      * </ul>
1916      * </li>
1917      * <li>Case #1: 4:3 crop region with 2.0x zoom ratio<ul>
1918      * <li>Zoomed field of view: 1/4 of original field of view</li>
1919      * <li>Crop region: <code>Rect(0, 0, 2000, 1500) // (left, top, right, bottom)</code> (post zoom)</li>
1920      * </ul>
1921      * </li>
1922      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-43.png" /><ul>
1923      * <li><code>640x480</code> stream source area: <code>(0, 0, 2000, 1500)</code> (equal to crop region)</li>
1924      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (letterboxed)</li>
1925      * </ul>
1926      * </li>
1927      * <li>Case #2: 16:9 crop region with 2.0x zoom.<ul>
1928      * <li>Zoomed field of view: 1/4 of original field of view</li>
1929      * <li>Crop region: <code>Rect(0, 187, 2000, 1312)</code></li>
1930      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-169.png" /></li>
1931      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (pillarboxed)</li>
1932      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (equal to crop region)</li>
1933      * </ul>
1934      * </li>
1935      * <li>Case #3: 1:1 crop region with 0.5x zoom out to ultrawide lens.<ul>
1936      * <li>Zoomed field of view: 4x of original field of view (switched from wide lens to ultrawide lens)</li>
1937      * <li>Crop region: <code>Rect(250, 0, 1750, 1500)</code></li>
1938      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-0.5-crop-11.png" /></li>
1939      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (letterboxed)</li>
1940      * <li><code>1280x720</code> stream source area: <code>(250, 328, 1750, 1172)</code> (letterboxed)</li>
1941      * </ul>
1942      * </li>
1943      * </ul>
1944      * <p>As seen from the graphs above, the coordinate system of cropRegion now changes to the
1945      * effective after-zoom field-of-view, and is represented by the rectangle of (0, 0,
1946      * activeArrayWith, activeArrayHeight). The same applies to AE/AWB/AF regions, and faces.
1947      * This coordinate system change isn't applicable to RAW capture and its related
1948      * metadata such as intrinsicCalibration and lensShadingMap.</p>
1949      * <p>Using the same hypothetical example above, and assuming output stream #1 (640x480) is
1950      * the viewfinder stream, the application can achieve 2.0x zoom in one of two ways:</p>
1951      * <ul>
1952      * <li>zoomRatio = 2.0, scaler.cropRegion = (0, 0, 2000, 1500)</li>
1953      * <li>zoomRatio = 1.0 (default), scaler.cropRegion = (500, 375, 1500, 1125)</li>
1954      * </ul>
1955      * <p>If the application intends to set aeRegions to be top-left quarter of the viewfinder
1956      * field-of-view, the ACAMERA_CONTROL_AE_REGIONS should be set to (0, 0, 1000, 750) with
1957      * zoomRatio set to 2.0. Alternatively, the application can set aeRegions to the equivalent
1958      * region of (500, 375, 1000, 750) for zoomRatio of 1.0. If the application doesn't
1959      * explicitly set ACAMERA_CONTROL_ZOOM_RATIO, its value defaults to 1.0.</p>
1960      * <p>One limitation of controlling zoom using zoomRatio is that the ACAMERA_SCALER_CROP_REGION
1961      * must only be used for letterboxing or pillarboxing of the sensor active array, and no
1962      * FREEFORM cropping can be used with ACAMERA_CONTROL_ZOOM_RATIO other than 1.0.</p>
1963      *
1964      * @see ACAMERA_CONTROL_AE_REGIONS
1965      * @see ACAMERA_CONTROL_ZOOM_RATIO
1966      * @see ACAMERA_SCALER_CROP_REGION
1967      */
1968     ACAMERA_CONTROL_ZOOM_RATIO =                                // float
1969             ACAMERA_CONTROL_START + 47,
1970     ACAMERA_CONTROL_END,
1971 
1972     /**
1973      * <p>Operation mode for edge
1974      * enhancement.</p>
1975      *
1976      * <p>Type: byte (acamera_metadata_enum_android_edge_mode_t)</p>
1977      *
1978      * <p>This tag may appear in:
1979      * <ul>
1980      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1981      *   <li>ACaptureRequest</li>
1982      * </ul></p>
1983      *
1984      * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
1985      * no enhancement will be applied by the camera device.</p>
1986      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
1987      * will be applied. HIGH_QUALITY mode indicates that the
1988      * camera device will use the highest-quality enhancement algorithms,
1989      * even if it slows down capture rate. FAST means the camera device will
1990      * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
1991      * edge enhancement will slow down capture rate. Every output stream will have a similar
1992      * amount of enhancement applied.</p>
1993      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
1994      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
1995      * into a final capture when triggered by the user. In this mode, the camera device applies
1996      * edge enhancement to low-resolution streams (below maximum recording resolution) to
1997      * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
1998      * since those will be reprocessed later if necessary.</p>
1999      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
2000      * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
2001      * The camera device may adjust its internal edge enhancement parameters for best
2002      * image quality based on the android.reprocess.effectiveExposureFactor, if it is set.</p>
2003      */
2004     ACAMERA_EDGE_MODE =                                         // byte (acamera_metadata_enum_android_edge_mode_t)
2005             ACAMERA_EDGE_START,
2006     /**
2007      * <p>List of edge enhancement modes for ACAMERA_EDGE_MODE that are supported by this camera
2008      * device.</p>
2009      *
2010      * @see ACAMERA_EDGE_MODE
2011      *
2012      * <p>Type: byte[n]</p>
2013      *
2014      * <p>This tag may appear in:
2015      * <ul>
2016      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2017      * </ul></p>
2018      *
2019      * <p>Full-capability camera devices must always support OFF; camera devices that support
2020      * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
2021      * list FAST.</p>
2022      */
2023     ACAMERA_EDGE_AVAILABLE_EDGE_MODES =                         // byte[n]
2024             ACAMERA_EDGE_START + 2,
2025     ACAMERA_EDGE_END,
2026 
2027     /**
2028      * <p>The desired mode for for the camera device's flash control.</p>
2029      *
2030      * <p>Type: byte (acamera_metadata_enum_android_flash_mode_t)</p>
2031      *
2032      * <p>This tag may appear in:
2033      * <ul>
2034      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2035      *   <li>ACaptureRequest</li>
2036      * </ul></p>
2037      *
2038      * <p>This control is only effective when flash unit is available
2039      * (<code>ACAMERA_FLASH_INFO_AVAILABLE == true</code>).</p>
2040      * <p>When this control is used, the ACAMERA_CONTROL_AE_MODE must be set to ON or OFF.
2041      * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2042      * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2043      * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2044      * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2045      * device's auto-exposure routine's result. When used in still capture case, this
2046      * control should be used along with auto-exposure (AE) precapture metering sequence
2047      * (ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER), otherwise, the image may be incorrectly exposed.</p>
2048      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2049      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
2050      * <p>The flash status will be reported by ACAMERA_FLASH_STATE in the capture result metadata.</p>
2051      *
2052      * @see ACAMERA_CONTROL_AE_MODE
2053      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
2054      * @see ACAMERA_FLASH_INFO_AVAILABLE
2055      * @see ACAMERA_FLASH_STATE
2056      */
2057     ACAMERA_FLASH_MODE =                                        // byte (acamera_metadata_enum_android_flash_mode_t)
2058             ACAMERA_FLASH_START + 2,
2059     /**
2060      * <p>Current state of the flash
2061      * unit.</p>
2062      *
2063      * <p>Type: byte (acamera_metadata_enum_android_flash_state_t)</p>
2064      *
2065      * <p>This tag may appear in:
2066      * <ul>
2067      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2068      * </ul></p>
2069      *
2070      * <p>When the camera device doesn't have flash unit
2071      * (i.e. <code>ACAMERA_FLASH_INFO_AVAILABLE == false</code>), this state will always be UNAVAILABLE.
2072      * Other states indicate the current flash status.</p>
2073      * <p>In certain conditions, this will be available on LEGACY devices:</p>
2074      * <ul>
2075      * <li>Flash-less cameras always return UNAVAILABLE.</li>
2076      * <li>Using ACAMERA_CONTROL_AE_MODE <code>==</code> ON_ALWAYS_FLASH
2077      *    will always return FIRED.</li>
2078      * <li>Using ACAMERA_FLASH_MODE <code>==</code> TORCH
2079      *    will always return FIRED.</li>
2080      * </ul>
2081      * <p>In all other conditions the state will not be available on
2082      * LEGACY devices (i.e. it will be <code>null</code>).</p>
2083      *
2084      * @see ACAMERA_CONTROL_AE_MODE
2085      * @see ACAMERA_FLASH_INFO_AVAILABLE
2086      * @see ACAMERA_FLASH_MODE
2087      */
2088     ACAMERA_FLASH_STATE =                                       // byte (acamera_metadata_enum_android_flash_state_t)
2089             ACAMERA_FLASH_START + 5,
2090     ACAMERA_FLASH_END,
2091 
2092     /**
2093      * <p>Whether this camera device has a
2094      * flash unit.</p>
2095      *
2096      * <p>Type: byte (acamera_metadata_enum_android_flash_info_available_t)</p>
2097      *
2098      * <p>This tag may appear in:
2099      * <ul>
2100      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2101      * </ul></p>
2102      *
2103      * <p>Will be <code>false</code> if no flash is available.</p>
2104      * <p>If there is no flash unit, none of the flash controls do
2105      * anything.</p>
2106      */
2107     ACAMERA_FLASH_INFO_AVAILABLE =                              // byte (acamera_metadata_enum_android_flash_info_available_t)
2108             ACAMERA_FLASH_INFO_START,
2109     ACAMERA_FLASH_INFO_END,
2110 
2111     /**
2112      * <p>Operational mode for hot pixel correction.</p>
2113      *
2114      * <p>Type: byte (acamera_metadata_enum_android_hot_pixel_mode_t)</p>
2115      *
2116      * <p>This tag may appear in:
2117      * <ul>
2118      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2119      *   <li>ACaptureRequest</li>
2120      * </ul></p>
2121      *
2122      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
2123      * that do not accurately measure the incoming light (i.e. pixels that
2124      * are stuck at an arbitrary value or are oversensitive).</p>
2125      */
2126     ACAMERA_HOT_PIXEL_MODE =                                    // byte (acamera_metadata_enum_android_hot_pixel_mode_t)
2127             ACAMERA_HOT_PIXEL_START,
2128     /**
2129      * <p>List of hot pixel correction modes for ACAMERA_HOT_PIXEL_MODE that are supported by this
2130      * camera device.</p>
2131      *
2132      * @see ACAMERA_HOT_PIXEL_MODE
2133      *
2134      * <p>Type: byte[n]</p>
2135      *
2136      * <p>This tag may appear in:
2137      * <ul>
2138      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2139      * </ul></p>
2140      *
2141      * <p>FULL mode camera devices will always support FAST.</p>
2142      */
2143     ACAMERA_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =               // byte[n]
2144             ACAMERA_HOT_PIXEL_START + 1,
2145     ACAMERA_HOT_PIXEL_END,
2146 
2147     /**
2148      * <p>GPS coordinates to include in output JPEG
2149      * EXIF.</p>
2150      *
2151      * <p>Type: double[3]</p>
2152      *
2153      * <p>This tag may appear in:
2154      * <ul>
2155      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2156      *   <li>ACaptureRequest</li>
2157      * </ul></p>
2158      *
2159      * <p>This tag is also used for HEIC image capture.</p>
2160      */
2161     ACAMERA_JPEG_GPS_COORDINATES =                              // double[3]
2162             ACAMERA_JPEG_START,
2163     /**
2164      * <p>32 characters describing GPS algorithm to
2165      * include in EXIF.</p>
2166      *
2167      * <p>Type: byte</p>
2168      *
2169      * <p>This tag may appear in:
2170      * <ul>
2171      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2172      *   <li>ACaptureRequest</li>
2173      * </ul></p>
2174      *
2175      * <p>This tag is also used for HEIC image capture.</p>
2176      */
2177     ACAMERA_JPEG_GPS_PROCESSING_METHOD =                        // byte
2178             ACAMERA_JPEG_START + 1,
2179     /**
2180      * <p>Time GPS fix was made to include in
2181      * EXIF.</p>
2182      *
2183      * <p>Type: int64</p>
2184      *
2185      * <p>This tag may appear in:
2186      * <ul>
2187      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2188      *   <li>ACaptureRequest</li>
2189      * </ul></p>
2190      *
2191      * <p>This tag is also used for HEIC image capture.</p>
2192      */
2193     ACAMERA_JPEG_GPS_TIMESTAMP =                                // int64
2194             ACAMERA_JPEG_START + 2,
2195     /**
2196      * <p>The orientation for a JPEG image.</p>
2197      *
2198      * <p>Type: int32</p>
2199      *
2200      * <p>This tag may appear in:
2201      * <ul>
2202      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2203      *   <li>ACaptureRequest</li>
2204      * </ul></p>
2205      *
2206      * <p>The clockwise rotation angle in degrees, relative to the orientation
2207      * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2208      * upright.</p>
2209      * <p>Camera devices may either encode this value into the JPEG EXIF header, or
2210      * rotate the image data to match this orientation. When the image data is rotated,
2211      * the thumbnail data will also be rotated.</p>
2212      * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2213      * by ACAMERA_SENSOR_ORIENTATION.</p>
2214      * <p>To translate from the device orientation given by the Android sensor APIs for camera
2215      * sensors which are not EXTERNAL, the following sample code may be used:</p>
2216      * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2217      *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2218      *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2219      *
2220      *     // Round device orientation to a multiple of 90
2221      *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2222      *
2223      *     // Reverse device orientation for front-facing cameras
2224      *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2225      *     if (facingFront) deviceOrientation = -deviceOrientation;
2226      *
2227      *     // Calculate desired JPEG orientation relative to camera orientation to make
2228      *     // the image upright relative to the device orientation
2229      *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2230      *
2231      *     return jpegOrientation;
2232      * }
2233      * </code></pre>
2234      * <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
2235      * also be set to EXTERNAL. The above code is not relevant in such case.</p>
2236      * <p>This tag is also used to describe the orientation of the HEIC image capture, in which
2237      * case the rotation is reflected by
2238      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2239      * rotating the image data itself.</p>
2240      *
2241      * @see ACAMERA_SENSOR_ORIENTATION
2242      */
2243     ACAMERA_JPEG_ORIENTATION =                                  // int32
2244             ACAMERA_JPEG_START + 3,
2245     /**
2246      * <p>Compression quality of the final JPEG
2247      * image.</p>
2248      *
2249      * <p>Type: byte</p>
2250      *
2251      * <p>This tag may appear in:
2252      * <ul>
2253      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2254      *   <li>ACaptureRequest</li>
2255      * </ul></p>
2256      *
2257      * <p>85-95 is typical usage range. This tag is also used to describe the quality
2258      * of the HEIC image capture.</p>
2259      */
2260     ACAMERA_JPEG_QUALITY =                                      // byte
2261             ACAMERA_JPEG_START + 4,
2262     /**
2263      * <p>Compression quality of JPEG
2264      * thumbnail.</p>
2265      *
2266      * <p>Type: byte</p>
2267      *
2268      * <p>This tag may appear in:
2269      * <ul>
2270      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2271      *   <li>ACaptureRequest</li>
2272      * </ul></p>
2273      *
2274      * <p>This tag is also used to describe the quality of the HEIC image capture.</p>
2275      */
2276     ACAMERA_JPEG_THUMBNAIL_QUALITY =                            // byte
2277             ACAMERA_JPEG_START + 5,
2278     /**
2279      * <p>Resolution of embedded JPEG thumbnail.</p>
2280      *
2281      * <p>Type: int32[2]</p>
2282      *
2283      * <p>This tag may appear in:
2284      * <ul>
2285      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2286      *   <li>ACaptureRequest</li>
2287      * </ul></p>
2288      *
2289      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2290      * but the captured JPEG will still be a valid image.</p>
2291      * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2292      * should have the same aspect ratio as the main JPEG output.</p>
2293      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2294      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2295      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2296      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2297      * generate the thumbnail image. The thumbnail image will always have a smaller Field
2298      * Of View (FOV) than the primary image when aspect ratios differ.</p>
2299      * <p>When an ACAMERA_JPEG_ORIENTATION of non-zero degree is requested,
2300      * the camera device will handle thumbnail rotation in one of the following ways:</p>
2301      * <ul>
2302      * <li>Set the <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>
2303      *   and keep jpeg and thumbnail image data unrotated.</li>
2304      * <li>Rotate the jpeg and thumbnail image data and not set
2305      *   <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>. In this
2306      *   case, LIMITED or FULL hardware level devices will report rotated thumnail size in
2307      *   capture result, so the width and height will be interchanged if 90 or 270 degree
2308      *   orientation is requested. LEGACY device will always report unrotated thumbnail
2309      *   size.</li>
2310      * </ul>
2311      * <p>The tag is also used as thumbnail size for HEIC image format capture, in which case the
2312      * the thumbnail rotation is reflected by
2313      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2314      * rotating the thumbnail data itself.</p>
2315      *
2316      * @see ACAMERA_JPEG_ORIENTATION
2317      */
2318     ACAMERA_JPEG_THUMBNAIL_SIZE =                               // int32[2]
2319             ACAMERA_JPEG_START + 6,
2320     /**
2321      * <p>List of JPEG thumbnail sizes for ACAMERA_JPEG_THUMBNAIL_SIZE supported by this
2322      * camera device.</p>
2323      *
2324      * @see ACAMERA_JPEG_THUMBNAIL_SIZE
2325      *
2326      * <p>Type: int32[2*n]</p>
2327      *
2328      * <p>This tag may appear in:
2329      * <ul>
2330      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2331      * </ul></p>
2332      *
2333      * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
2334      * thumbnail should be generated.</p>
2335      * <p>Below condiditions will be satisfied for this size list:</p>
2336      * <ul>
2337      * <li>The sizes will be sorted by increasing pixel area (width x height).
2338      * If several resolutions have the same area, they will be sorted by increasing width.</li>
2339      * <li>The aspect ratio of the largest thumbnail size will be same as the
2340      * aspect ratio of largest JPEG output size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
2341      * The largest size is defined as the size that has the largest pixel area
2342      * in a given size list.</li>
2343      * <li>Each output JPEG size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS will have at least
2344      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
2345      * and vice versa.</li>
2346      * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
2347      * </ul>
2348      * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
2349      *
2350      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
2351      */
2352     ACAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES =                    // int32[2*n]
2353             ACAMERA_JPEG_START + 7,
2354     ACAMERA_JPEG_END,
2355 
2356     /**
2357      * <p>The desired lens aperture size, as a ratio of lens focal length to the
2358      * effective aperture diameter.</p>
2359      *
2360      * <p>Type: float</p>
2361      *
2362      * <p>This tag may appear in:
2363      * <ul>
2364      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2365      *   <li>ACaptureRequest</li>
2366      * </ul></p>
2367      *
2368      * <p>Setting this value is only supported on the camera devices that have a variable
2369      * aperture lens.</p>
2370      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is OFF,
2371      * this can be set along with ACAMERA_SENSOR_EXPOSURE_TIME,
2372      * ACAMERA_SENSOR_SENSITIVITY, and ACAMERA_SENSOR_FRAME_DURATION
2373      * to achieve manual exposure control.</p>
2374      * <p>The requested aperture value may take several frames to reach the
2375      * requested value; the camera device will report the current (intermediate)
2376      * aperture size in capture result metadata while the aperture is changing.
2377      * While the aperture is still changing, ACAMERA_LENS_STATE will be set to MOVING.</p>
2378      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is one of
2379      * the ON modes, this will be overridden by the camera device
2380      * auto-exposure algorithm, the overridden values are then provided
2381      * back to the user in the corresponding result.</p>
2382      *
2383      * @see ACAMERA_CONTROL_AE_MODE
2384      * @see ACAMERA_LENS_STATE
2385      * @see ACAMERA_SENSOR_EXPOSURE_TIME
2386      * @see ACAMERA_SENSOR_FRAME_DURATION
2387      * @see ACAMERA_SENSOR_SENSITIVITY
2388      */
2389     ACAMERA_LENS_APERTURE =                                     // float
2390             ACAMERA_LENS_START,
2391     /**
2392      * <p>The desired setting for the lens neutral density filter(s).</p>
2393      *
2394      * <p>Type: float</p>
2395      *
2396      * <p>This tag may appear in:
2397      * <ul>
2398      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2399      *   <li>ACaptureRequest</li>
2400      * </ul></p>
2401      *
2402      * <p>This control will not be supported on most camera devices.</p>
2403      * <p>Lens filters are typically used to lower the amount of light the
2404      * sensor is exposed to (measured in steps of EV). As used here, an EV
2405      * step is the standard logarithmic representation, which are
2406      * non-negative, and inversely proportional to the amount of light
2407      * hitting the sensor.  For example, setting this to 0 would result
2408      * in no reduction of the incoming light, and setting this to 2 would
2409      * mean that the filter is set to reduce incoming light by two stops
2410      * (allowing 1/4 of the prior amount of light to the sensor).</p>
2411      * <p>It may take several frames before the lens filter density changes
2412      * to the requested value. While the filter density is still changing,
2413      * ACAMERA_LENS_STATE will be set to MOVING.</p>
2414      *
2415      * @see ACAMERA_LENS_STATE
2416      */
2417     ACAMERA_LENS_FILTER_DENSITY =                               // float
2418             ACAMERA_LENS_START + 1,
2419     /**
2420      * <p>The desired lens focal length; used for optical zoom.</p>
2421      *
2422      * <p>Type: float</p>
2423      *
2424      * <p>This tag may appear in:
2425      * <ul>
2426      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2427      *   <li>ACaptureRequest</li>
2428      * </ul></p>
2429      *
2430      * <p>This setting controls the physical focal length of the camera
2431      * device's lens. Changing the focal length changes the field of
2432      * view of the camera device, and is usually used for optical zoom.</p>
2433      * <p>Like ACAMERA_LENS_FOCUS_DISTANCE and ACAMERA_LENS_APERTURE, this
2434      * setting won't be applied instantaneously, and it may take several
2435      * frames before the lens can change to the requested focal length.
2436      * While the focal length is still changing, ACAMERA_LENS_STATE will
2437      * be set to MOVING.</p>
2438      * <p>Optical zoom via this control will not be supported on most devices. Starting from API
2439      * level 30, the camera device may combine optical and digital zoom through the
2440      * ACAMERA_CONTROL_ZOOM_RATIO control.</p>
2441      *
2442      * @see ACAMERA_CONTROL_ZOOM_RATIO
2443      * @see ACAMERA_LENS_APERTURE
2444      * @see ACAMERA_LENS_FOCUS_DISTANCE
2445      * @see ACAMERA_LENS_STATE
2446      */
2447     ACAMERA_LENS_FOCAL_LENGTH =                                 // float
2448             ACAMERA_LENS_START + 2,
2449     /**
2450      * <p>Desired distance to plane of sharpest focus,
2451      * measured from frontmost surface of the lens.</p>
2452      *
2453      * <p>Type: float</p>
2454      *
2455      * <p>This tag may appear in:
2456      * <ul>
2457      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2458      *   <li>ACaptureRequest</li>
2459      * </ul></p>
2460      *
2461      * <p>Should be zero for fixed-focus cameras</p>
2462      */
2463     ACAMERA_LENS_FOCUS_DISTANCE =                               // float
2464             ACAMERA_LENS_START + 3,
2465     /**
2466      * <p>Sets whether the camera device uses optical image stabilization (OIS)
2467      * when capturing images.</p>
2468      *
2469      * <p>Type: byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)</p>
2470      *
2471      * <p>This tag may appear in:
2472      * <ul>
2473      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2474      *   <li>ACaptureRequest</li>
2475      * </ul></p>
2476      *
2477      * <p>OIS is used to compensate for motion blur due to small
2478      * movements of the camera during capture. Unlike digital image
2479      * stabilization (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), OIS
2480      * makes use of mechanical elements to stabilize the camera
2481      * sensor, and thus allows for longer exposure times before
2482      * camera shake becomes apparent.</p>
2483      * <p>Switching between different optical stabilization modes may take several
2484      * frames to initialize, the camera device will report the current mode in
2485      * capture result metadata. For example, When "ON" mode is requested, the
2486      * optical stabilization modes in the first several capture results may still
2487      * be "OFF", and it will become "ON" when the initialization is done.</p>
2488      * <p>If a camera device supports both OIS and digital image stabilization
2489      * (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), turning both modes on may produce undesirable
2490      * interaction, so it is recommended not to enable both at the same time.</p>
2491      * <p>Not all devices will support OIS; see
2492      * ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION for
2493      * available controls.</p>
2494      *
2495      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
2496      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
2497      */
2498     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE =                   // byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)
2499             ACAMERA_LENS_START + 4,
2500     /**
2501      * <p>Direction the camera faces relative to
2502      * device screen.</p>
2503      *
2504      * <p>Type: byte (acamera_metadata_enum_android_lens_facing_t)</p>
2505      *
2506      * <p>This tag may appear in:
2507      * <ul>
2508      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2509      * </ul></p>
2510      *
2511      */
2512     ACAMERA_LENS_FACING =                                       // byte (acamera_metadata_enum_android_lens_facing_t)
2513             ACAMERA_LENS_START + 5,
2514     /**
2515      * <p>The orientation of the camera relative to the sensor
2516      * coordinate system.</p>
2517      *
2518      * <p>Type: float[4]</p>
2519      *
2520      * <p>This tag may appear in:
2521      * <ul>
2522      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2523      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2524      * </ul></p>
2525      *
2526      * <p>The four coefficients that describe the quaternion
2527      * rotation from the Android sensor coordinate system to a
2528      * camera-aligned coordinate system where the X-axis is
2529      * aligned with the long side of the image sensor, the Y-axis
2530      * is aligned with the short side of the image sensor, and
2531      * the Z-axis is aligned with the optical axis of the sensor.</p>
2532      * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
2533      * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
2534      * amount <code>theta</code>, the following formulas can be used:</p>
2535      * <pre><code> theta = 2 * acos(w)
2536      * a_x = x / sin(theta/2)
2537      * a_y = y / sin(theta/2)
2538      * a_z = z / sin(theta/2)
2539      * </code></pre>
2540      * <p>To create a 3x3 rotation matrix that applies the rotation
2541      * defined by this quaternion, the following matrix can be
2542      * used:</p>
2543      * <pre><code>R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
2544      *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
2545      *            2xz - 2yw,       2yz + 2xw, 1 - 2x^2 - 2y^2 ]
2546      * </code></pre>
2547      * <p>This matrix can then be used to apply the rotation to a
2548      *  column vector point with</p>
2549      * <p><code>p' = Rp</code></p>
2550      * <p>where <code>p</code> is in the device sensor coordinate system, and
2551      *  <code>p'</code> is in the camera-oriented coordinate system.</p>
2552      * <p>If ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, the quaternion rotation cannot
2553      *  be accurately represented by the camera device, and will be represented by
2554      *  default values matching its default facing.</p>
2555      *
2556      * @see ACAMERA_LENS_POSE_REFERENCE
2557      */
2558     ACAMERA_LENS_POSE_ROTATION =                                // float[4]
2559             ACAMERA_LENS_START + 6,
2560     /**
2561      * <p>Position of the camera optical center.</p>
2562      *
2563      * <p>Type: float[3]</p>
2564      *
2565      * <p>This tag may appear in:
2566      * <ul>
2567      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2568      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2569      * </ul></p>
2570      *
2571      * <p>The position of the camera device's lens optical center,
2572      * as a three-dimensional vector <code>(x,y,z)</code>.</p>
2573      * <p>Prior to Android P, or when ACAMERA_LENS_POSE_REFERENCE is PRIMARY_CAMERA, this position
2574      * is relative to the optical center of the largest camera device facing in the same
2575      * direction as this camera, in the <a href="https://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor
2576      * coordinate axes</a>. Note that only the axis definitions are shared with the sensor
2577      * coordinate system, but not the origin.</p>
2578      * <p>If this device is the largest or only camera device with a given facing, then this
2579      * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
2580      * from the main sensor along the +X axis (to the right from the user's perspective) will
2581      * report <code>(0.03, 0, 0)</code>.  Note that this means that, for many computer vision
2582      * applications, the position needs to be negated to convert it to a translation from the
2583      * camera to the origin.</p>
2584      * <p>To transform a pixel coordinates between two cameras facing the same direction, first
2585      * the source camera ACAMERA_LENS_DISTORTION must be corrected for.  Then the source
2586      * camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs to be applied, followed by the
2587      * ACAMERA_LENS_POSE_ROTATION of the source camera, the translation of the source camera
2588      * relative to the destination camera, the ACAMERA_LENS_POSE_ROTATION of the destination
2589      * camera, and finally the inverse of ACAMERA_LENS_INTRINSIC_CALIBRATION of the destination
2590      * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
2591      * coordinates.</p>
2592      * <p>To compare this against a real image from the destination camera, the destination camera
2593      * image then needs to be corrected for radial distortion before comparison or sampling.</p>
2594      * <p>When ACAMERA_LENS_POSE_REFERENCE is GYROSCOPE, then this position is relative to
2595      * the center of the primary gyroscope on the device. The axis definitions are the same as
2596      * with PRIMARY_CAMERA.</p>
2597      * <p>When ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, this position cannot be accurately
2598      * represented by the camera device, and will be represented as <code>(0, 0, 0)</code>.</p>
2599      *
2600      * @see ACAMERA_LENS_DISTORTION
2601      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2602      * @see ACAMERA_LENS_POSE_REFERENCE
2603      * @see ACAMERA_LENS_POSE_ROTATION
2604      */
2605     ACAMERA_LENS_POSE_TRANSLATION =                             // float[3]
2606             ACAMERA_LENS_START + 7,
2607     /**
2608      * <p>The range of scene distances that are in
2609      * sharp focus (depth of field).</p>
2610      *
2611      * <p>Type: float[2]</p>
2612      *
2613      * <p>This tag may appear in:
2614      * <ul>
2615      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2616      * </ul></p>
2617      *
2618      * <p>If variable focus not supported, can still report
2619      * fixed depth of field range</p>
2620      */
2621     ACAMERA_LENS_FOCUS_RANGE =                                  // float[2]
2622             ACAMERA_LENS_START + 8,
2623     /**
2624      * <p>Current lens status.</p>
2625      *
2626      * <p>Type: byte (acamera_metadata_enum_android_lens_state_t)</p>
2627      *
2628      * <p>This tag may appear in:
2629      * <ul>
2630      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2631      * </ul></p>
2632      *
2633      * <p>For lens parameters ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
2634      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE, when changes are requested,
2635      * they may take several frames to reach the requested values. This state indicates
2636      * the current status of the lens parameters.</p>
2637      * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2638      * either because the parameters are all fixed, or because the lens has had enough
2639      * time to reach the most recently-requested values.
2640      * If all these lens parameters are not changable for a camera device, as listed below:</p>
2641      * <ul>
2642      * <li>Fixed focus (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE == 0</code>), which means
2643      * ACAMERA_LENS_FOCUS_DISTANCE parameter will always be 0.</li>
2644      * <li>Fixed focal length (ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS contains single value),
2645      * which means the optical zoom is not supported.</li>
2646      * <li>No ND filter (ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES contains only 0).</li>
2647      * <li>Fixed aperture (ACAMERA_LENS_INFO_AVAILABLE_APERTURES contains single value).</li>
2648      * </ul>
2649      * <p>Then this state will always be STATIONARY.</p>
2650      * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2651      * is changing.</p>
2652      *
2653      * @see ACAMERA_LENS_APERTURE
2654      * @see ACAMERA_LENS_FILTER_DENSITY
2655      * @see ACAMERA_LENS_FOCAL_LENGTH
2656      * @see ACAMERA_LENS_FOCUS_DISTANCE
2657      * @see ACAMERA_LENS_INFO_AVAILABLE_APERTURES
2658      * @see ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES
2659      * @see ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2660      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
2661      */
2662     ACAMERA_LENS_STATE =                                        // byte (acamera_metadata_enum_android_lens_state_t)
2663             ACAMERA_LENS_START + 9,
2664     /**
2665      * <p>The parameters for this camera device's intrinsic
2666      * calibration.</p>
2667      *
2668      * <p>Type: float[5]</p>
2669      *
2670      * <p>This tag may appear in:
2671      * <ul>
2672      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2673      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2674      * </ul></p>
2675      *
2676      * <p>The five calibration parameters that describe the
2677      * transform from camera-centric 3D coordinates to sensor
2678      * pixel coordinates:</p>
2679      * <pre><code>[f_x, f_y, c_x, c_y, s]
2680      * </code></pre>
2681      * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
2682      * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
2683      * axis, and <code>s</code> is a skew parameter for the sensor plane not
2684      * being aligned with the lens plane.</p>
2685      * <p>These are typically used within a transformation matrix K:</p>
2686      * <pre><code>K = [ f_x,   s, c_x,
2687      *        0, f_y, c_y,
2688      *        0    0,   1 ]
2689      * </code></pre>
2690      * <p>which can then be combined with the camera pose rotation
2691      * <code>R</code> and translation <code>t</code> (ACAMERA_LENS_POSE_ROTATION and
2692      * ACAMERA_LENS_POSE_TRANSLATION, respectively) to calculate the
2693      * complete transform from world coordinates to pixel
2694      * coordinates:</p>
2695      * <pre><code>P = [ K 0   * [ R -Rt
2696      *      0 1 ]      0 1 ]
2697      * </code></pre>
2698      * <p>(Note the negation of poseTranslation when mapping from camera
2699      * to world coordinates, and multiplication by the rotation).</p>
2700      * <p>With <code>p_w</code> being a point in the world coordinate system
2701      * and <code>p_s</code> being a point in the camera active pixel array
2702      * coordinate system, and with the mapping including the
2703      * homogeneous division by z:</p>
2704      * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
2705      * p_s = p_h / z_h
2706      * </code></pre>
2707      * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
2708      * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
2709      * (depth) in pixel coordinates.</p>
2710      * <p>Note that the coordinate system for this transform is the
2711      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE system,
2712      * where <code>(0,0)</code> is the top-left of the
2713      * preCorrectionActiveArraySize rectangle. Once the pose and
2714      * intrinsic calibration transforms have been applied to a
2715      * world point, then the ACAMERA_LENS_DISTORTION
2716      * transform needs to be applied, and the result adjusted to
2717      * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate
2718      * system (where <code>(0, 0)</code> is the top-left of the
2719      * activeArraySize rectangle), to determine the final pixel
2720      * coordinate of the world point for processed (non-RAW)
2721      * output buffers.</p>
2722      * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
2723      * coordinate <code>(x + 0.5, y + 0.5)</code>.  So on a device with a
2724      * precorrection active array of size <code>(10,10)</code>, the valid pixel
2725      * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
2726      * have an optical center at the exact center of the pixel grid, at
2727      * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
2728      * <code>(5,5)</code>.</p>
2729      *
2730      * @see ACAMERA_LENS_DISTORTION
2731      * @see ACAMERA_LENS_POSE_ROTATION
2732      * @see ACAMERA_LENS_POSE_TRANSLATION
2733      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2734      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
2735      */
2736     ACAMERA_LENS_INTRINSIC_CALIBRATION =                        // float[5]
2737             ACAMERA_LENS_START + 10,
2738     ACAMERA_LENS_RADIAL_DISTORTION =                            // Deprecated! DO NOT USE
2739             ACAMERA_LENS_START + 11,
2740     /**
2741      * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION, and the accuracy of
2742      * ACAMERA_LENS_POSE_TRANSLATION and ACAMERA_LENS_POSE_ROTATION.</p>
2743      *
2744      * @see ACAMERA_LENS_POSE_ROTATION
2745      * @see ACAMERA_LENS_POSE_TRANSLATION
2746      *
2747      * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p>
2748      *
2749      * <p>This tag may appear in:
2750      * <ul>
2751      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2752      * </ul></p>
2753      *
2754      * <p>Different calibration methods and use cases can produce better or worse results
2755      * depending on the selected coordinate origin.</p>
2756      */
2757     ACAMERA_LENS_POSE_REFERENCE =                               // byte (acamera_metadata_enum_android_lens_pose_reference_t)
2758             ACAMERA_LENS_START + 12,
2759     /**
2760      * <p>The correction coefficients to correct for this camera device's
2761      * radial and tangential lens distortion.</p>
2762      * <p>Replaces the deprecated ACAMERA_LENS_RADIAL_DISTORTION field, which was
2763      * inconsistently defined.</p>
2764      *
2765      * @see ACAMERA_LENS_RADIAL_DISTORTION
2766      *
2767      * <p>Type: float[5]</p>
2768      *
2769      * <p>This tag may appear in:
2770      * <ul>
2771      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2772      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2773      * </ul></p>
2774      *
2775      * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
2776      * kappa_3]</code> and two tangential distortion coefficients
2777      * <code>[kappa_4, kappa_5]</code> that can be used to correct the
2778      * lens's geometric distortion with the mapping equations:</p>
2779      * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2780      *        kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
2781      *  y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2782      *        kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
2783      * </code></pre>
2784      * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
2785      * input image that correspond to the pixel values in the
2786      * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
2787      * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
2788      * </code></pre>
2789      * <p>The pixel coordinates are defined in a coordinate system
2790      * related to the ACAMERA_LENS_INTRINSIC_CALIBRATION
2791      * calibration fields; see that entry for details of the mapping stages.
2792      * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
2793      * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
2794      * the range of the coordinates depends on the focal length
2795      * terms of the intrinsic calibration.</p>
2796      * <p>Finally, <code>r</code> represents the radial distance from the
2797      * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
2798      * <p>The distortion model used is the Brown-Conrady model.</p>
2799      *
2800      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2801      */
2802     ACAMERA_LENS_DISTORTION =                                   // float[5]
2803             ACAMERA_LENS_START + 13,
2804     ACAMERA_LENS_END,
2805 
2806     /**
2807      * <p>List of aperture size values for ACAMERA_LENS_APERTURE that are
2808      * supported by this camera device.</p>
2809      *
2810      * @see ACAMERA_LENS_APERTURE
2811      *
2812      * <p>Type: float[n]</p>
2813      *
2814      * <p>This tag may appear in:
2815      * <ul>
2816      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2817      * </ul></p>
2818      *
2819      * <p>If the camera device doesn't support a variable lens aperture,
2820      * this list will contain only one value, which is the fixed aperture size.</p>
2821      * <p>If the camera device supports a variable aperture, the aperture values
2822      * in this list will be sorted in ascending order.</p>
2823      */
2824     ACAMERA_LENS_INFO_AVAILABLE_APERTURES =                     // float[n]
2825             ACAMERA_LENS_INFO_START,
2826     /**
2827      * <p>List of neutral density filter values for
2828      * ACAMERA_LENS_FILTER_DENSITY that are supported by this camera device.</p>
2829      *
2830      * @see ACAMERA_LENS_FILTER_DENSITY
2831      *
2832      * <p>Type: float[n]</p>
2833      *
2834      * <p>This tag may appear in:
2835      * <ul>
2836      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2837      * </ul></p>
2838      *
2839      * <p>If a neutral density filter is not supported by this camera device,
2840      * this list will contain only 0. Otherwise, this list will include every
2841      * filter density supported by the camera device, in ascending order.</p>
2842      */
2843     ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES =              // float[n]
2844             ACAMERA_LENS_INFO_START + 1,
2845     /**
2846      * <p>List of focal lengths for ACAMERA_LENS_FOCAL_LENGTH that are supported by this camera
2847      * device.</p>
2848      *
2849      * @see ACAMERA_LENS_FOCAL_LENGTH
2850      *
2851      * <p>Type: float[n]</p>
2852      *
2853      * <p>This tag may appear in:
2854      * <ul>
2855      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2856      * </ul></p>
2857      *
2858      * <p>If optical zoom is not supported, this list will only contain
2859      * a single value corresponding to the fixed focal length of the
2860      * device. Otherwise, this list will include every focal length supported
2861      * by the camera device, in ascending order.</p>
2862      */
2863     ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS =                 // float[n]
2864             ACAMERA_LENS_INFO_START + 2,
2865     /**
2866      * <p>List of optical image stabilization (OIS) modes for
2867      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE that are supported by this camera device.</p>
2868      *
2869      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
2870      *
2871      * <p>Type: byte[n]</p>
2872      *
2873      * <p>This tag may appear in:
2874      * <ul>
2875      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2876      * </ul></p>
2877      *
2878      * <p>If OIS is not supported by a given camera device, this list will
2879      * contain only OFF.</p>
2880      */
2881     ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =         // byte[n]
2882             ACAMERA_LENS_INFO_START + 3,
2883     /**
2884      * <p>Hyperfocal distance for this lens.</p>
2885      *
2886      * <p>Type: float</p>
2887      *
2888      * <p>This tag may appear in:
2889      * <ul>
2890      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2891      * </ul></p>
2892      *
2893      * <p>If the lens is not fixed focus, the camera device will report this
2894      * field when ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION is APPROXIMATE or CALIBRATED.</p>
2895      *
2896      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
2897      */
2898     ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE =                     // float
2899             ACAMERA_LENS_INFO_START + 4,
2900     /**
2901      * <p>Shortest distance from frontmost surface
2902      * of the lens that can be brought into sharp focus.</p>
2903      *
2904      * <p>Type: float</p>
2905      *
2906      * <p>This tag may appear in:
2907      * <ul>
2908      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2909      * </ul></p>
2910      *
2911      * <p>If the lens is fixed-focus, this will be
2912      * 0.</p>
2913      */
2914     ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE =                  // float
2915             ACAMERA_LENS_INFO_START + 5,
2916     /**
2917      * <p>Dimensions of lens shading map.</p>
2918      *
2919      * <p>Type: int32[2]</p>
2920      *
2921      * <p>This tag may appear in:
2922      * <ul>
2923      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2924      * </ul></p>
2925      *
2926      * <p>The map should be on the order of 30-40 rows and columns, and
2927      * must be smaller than 64x64.</p>
2928      */
2929     ACAMERA_LENS_INFO_SHADING_MAP_SIZE =                        // int32[2]
2930             ACAMERA_LENS_INFO_START + 6,
2931     /**
2932      * <p>The lens focus distance calibration quality.</p>
2933      *
2934      * <p>Type: byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)</p>
2935      *
2936      * <p>This tag may appear in:
2937      * <ul>
2938      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2939      * </ul></p>
2940      *
2941      * <p>The lens focus distance calibration quality determines the reliability of
2942      * focus related metadata entries, i.e. ACAMERA_LENS_FOCUS_DISTANCE,
2943      * ACAMERA_LENS_FOCUS_RANGE, ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE, and
2944      * ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE.</p>
2945      * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
2946      * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
2947      * and increasing positive numbers represent focusing closer and closer
2948      * to the camera device. The focus distance control also uses diopters
2949      * on these devices.</p>
2950      * <p>UNCALIBRATED devices do not use units that are directly comparable
2951      * to any real physical measurement, but <code>0.0f</code> still represents farthest
2952      * focus, and ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE represents the
2953      * nearest focus the device can achieve.</p>
2954      *
2955      * @see ACAMERA_LENS_FOCUS_DISTANCE
2956      * @see ACAMERA_LENS_FOCUS_RANGE
2957      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
2958      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
2959      */
2960     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION =              // byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)
2961             ACAMERA_LENS_INFO_START + 7,
2962     ACAMERA_LENS_INFO_END,
2963 
2964     /**
2965      * <p>Mode of operation for the noise reduction algorithm.</p>
2966      *
2967      * <p>Type: byte (acamera_metadata_enum_android_noise_reduction_mode_t)</p>
2968      *
2969      * <p>This tag may appear in:
2970      * <ul>
2971      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2972      *   <li>ACaptureRequest</li>
2973      * </ul></p>
2974      *
2975      * <p>The noise reduction algorithm attempts to improve image quality by removing
2976      * excessive noise added by the capture process, especially in dark conditions.</p>
2977      * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
2978      * YUV domain.</p>
2979      * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
2980      * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
2981      * This mode is optional, may not be support by all devices. The application should check
2982      * ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES before using it.</p>
2983      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
2984      * will be applied. HIGH_QUALITY mode indicates that the camera device
2985      * will use the highest-quality noise filtering algorithms,
2986      * even if it slows down capture rate. FAST means the camera device will not
2987      * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
2988      * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
2989      * Every output stream will have a similar amount of enhancement applied.</p>
2990      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2991      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2992      * into a final capture when triggered by the user. In this mode, the camera device applies
2993      * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
2994      * preview quality, but does not apply noise reduction to high-resolution streams, since
2995      * those will be reprocessed later if necessary.</p>
2996      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
2997      * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
2998      * may adjust the noise reduction parameters for best image quality based on the
2999      * android.reprocess.effectiveExposureFactor if it is set.</p>
3000      *
3001      * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
3002      */
3003     ACAMERA_NOISE_REDUCTION_MODE =                              // byte (acamera_metadata_enum_android_noise_reduction_mode_t)
3004             ACAMERA_NOISE_REDUCTION_START,
3005     /**
3006      * <p>List of noise reduction modes for ACAMERA_NOISE_REDUCTION_MODE that are supported
3007      * by this camera device.</p>
3008      *
3009      * @see ACAMERA_NOISE_REDUCTION_MODE
3010      *
3011      * <p>Type: byte[n]</p>
3012      *
3013      * <p>This tag may appear in:
3014      * <ul>
3015      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3016      * </ul></p>
3017      *
3018      * <p>Full-capability camera devices will always support OFF and FAST.</p>
3019      * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
3020      * ZERO_SHUTTER_LAG.</p>
3021      * <p>Legacy-capability camera devices will only support FAST mode.</p>
3022      */
3023     ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =   // byte[n]
3024             ACAMERA_NOISE_REDUCTION_START + 2,
3025     ACAMERA_NOISE_REDUCTION_END,
3026 
3027     /**
3028      * <p>The maximum numbers of different types of output streams
3029      * that can be configured and used simultaneously by a camera device.</p>
3030      *
3031      * <p>Type: int32[3]</p>
3032      *
3033      * <p>This tag may appear in:
3034      * <ul>
3035      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3036      * </ul></p>
3037      *
3038      * <p>This is a 3 element tuple that contains the max number of output simultaneous
3039      * streams for raw sensor, processed (but not stalling), and processed (and stalling)
3040      * formats respectively. For example, assuming that JPEG is typically a processed and
3041      * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
3042      * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
3043      * <p>This lists the upper bound of the number of output streams supported by
3044      * the camera device. Using more streams simultaneously may require more hardware and
3045      * CPU resources that will consume more power. The image format for an output stream can
3046      * be any supported format provided by ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
3047      * The formats defined in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS can be catergorized
3048      * into the 3 stream types as below:</p>
3049      * <ul>
3050      * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
3051      *   Typically {@link AIMAGE_FORMAT_JPEG JPEG format}.</li>
3052      * <li>Raw formats: {@link AIMAGE_FORMAT_RAW16 RAW_SENSOR}, {@link AIMAGE_FORMAT_RAW10 RAW10}, or
3053      *   {@link AIMAGE_FORMAT_RAW12 RAW12}.</li>
3054      * <li>Processed (but not-stalling): any non-RAW format without a stall duration.  Typically
3055      *   {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888},
3056      *   <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#NV21">NV21</a>, <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#YV12">YV12</a>, or {@link AIMAGE_FORMAT_Y8 Y8} .</li>
3057      * </ul>
3058      *
3059      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3060      */
3061     ACAMERA_REQUEST_MAX_NUM_OUTPUT_STREAMS =                    // int32[3]
3062             ACAMERA_REQUEST_START + 6,
3063     /**
3064      * <p>Specifies the number of pipeline stages the frame went
3065      * through from when it was exposed to when the final completed result
3066      * was available to the framework.</p>
3067      *
3068      * <p>Type: byte</p>
3069      *
3070      * <p>This tag may appear in:
3071      * <ul>
3072      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3073      * </ul></p>
3074      *
3075      * <p>Depending on what settings are used in the request, and
3076      * what streams are configured, the data may undergo less processing,
3077      * and some pipeline stages skipped.</p>
3078      * <p>See ACAMERA_REQUEST_PIPELINE_MAX_DEPTH for more details.</p>
3079      *
3080      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
3081      */
3082     ACAMERA_REQUEST_PIPELINE_DEPTH =                            // byte
3083             ACAMERA_REQUEST_START + 9,
3084     /**
3085      * <p>Specifies the number of maximum pipeline stages a frame
3086      * has to go through from when it's exposed to when it's available
3087      * to the framework.</p>
3088      *
3089      * <p>Type: byte</p>
3090      *
3091      * <p>This tag may appear in:
3092      * <ul>
3093      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3094      * </ul></p>
3095      *
3096      * <p>A typical minimum value for this is 2 (one stage to expose,
3097      * one stage to readout) from the sensor. The ISP then usually adds
3098      * its own stages to do custom HW processing. Further stages may be
3099      * added by SW processing.</p>
3100      * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
3101      * processing is enabled (e.g. face detection), the actual pipeline
3102      * depth (specified by ACAMERA_REQUEST_PIPELINE_DEPTH) may be less than
3103      * the max pipeline depth.</p>
3104      * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
3105      * X frame intervals.</p>
3106      * <p>This value will normally be 8 or less, however, for high speed capture session,
3107      * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
3108      *
3109      * @see ACAMERA_REQUEST_PIPELINE_DEPTH
3110      */
3111     ACAMERA_REQUEST_PIPELINE_MAX_DEPTH =                        // byte
3112             ACAMERA_REQUEST_START + 10,
3113     /**
3114      * <p>Defines how many sub-components
3115      * a result will be composed of.</p>
3116      *
3117      * <p>Type: int32</p>
3118      *
3119      * <p>This tag may appear in:
3120      * <ul>
3121      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3122      * </ul></p>
3123      *
3124      * <p>In order to combat the pipeline latency, partial results
3125      * may be delivered to the application layer from the camera device as
3126      * soon as they are available.</p>
3127      * <p>Optional; defaults to 1. A value of 1 means that partial
3128      * results are not supported, and only the final TotalCaptureResult will
3129      * be produced by the camera device.</p>
3130      * <p>A typical use case for this might be: after requesting an
3131      * auto-focus (AF) lock the new AF state might be available 50%
3132      * of the way through the pipeline.  The camera device could
3133      * then immediately dispatch this state via a partial result to
3134      * the application, and the rest of the metadata via later
3135      * partial results.</p>
3136      */
3137     ACAMERA_REQUEST_PARTIAL_RESULT_COUNT =                      // int32
3138             ACAMERA_REQUEST_START + 11,
3139     /**
3140      * <p>List of capabilities that this camera device
3141      * advertises as fully supporting.</p>
3142      *
3143      * <p>Type: byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)</p>
3144      *
3145      * <p>This tag may appear in:
3146      * <ul>
3147      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3148      * </ul></p>
3149      *
3150      * <p>A capability is a contract that the camera device makes in order
3151      * to be able to satisfy one or more use cases.</p>
3152      * <p>Listing a capability guarantees that the whole set of features
3153      * required to support a common use will all be available.</p>
3154      * <p>Using a subset of the functionality provided by an unsupported
3155      * capability may be possible on a specific camera device implementation;
3156      * to do this query each of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS,
3157      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS,
3158      * ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS.</p>
3159      * <p>The following capabilities are guaranteed to be available on
3160      * ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL <code>==</code> FULL devices:</p>
3161      * <ul>
3162      * <li>MANUAL_SENSOR</li>
3163      * <li>MANUAL_POST_PROCESSING</li>
3164      * </ul>
3165      * <p>Other capabilities may be available on either FULL or LIMITED
3166      * devices, but the application should query this key to be sure.</p>
3167      *
3168      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3169      * @see ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS
3170      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3171      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3172      */
3173     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES =                    // byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)
3174             ACAMERA_REQUEST_START + 12,
3175     /**
3176      * <p>A list of all keys that the camera device has available
3177      * to use with {@link ACaptureRequest }.</p>
3178      *
3179      * <p>Type: int32[n]</p>
3180      *
3181      * <p>This tag may appear in:
3182      * <ul>
3183      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3184      * </ul></p>
3185      *
3186      * <p>Attempting to set a key into a CaptureRequest that is not
3187      * listed here will result in an invalid request and will be rejected
3188      * by the camera device.</p>
3189      * <p>This field can be used to query the feature set of a camera device
3190      * at a more granular level than capabilities. This is especially
3191      * important for optional keys that are not listed under any capability
3192      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3193      *
3194      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3195      */
3196     ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS =                    // int32[n]
3197             ACAMERA_REQUEST_START + 13,
3198     /**
3199      * <p>A list of all keys that the camera device has available to use with {@link ACameraCaptureSession_captureCallback_result }.</p>
3200      *
3201      * <p>Type: int32[n]</p>
3202      *
3203      * <p>This tag may appear in:
3204      * <ul>
3205      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3206      * </ul></p>
3207      *
3208      * <p>Attempting to get a key from a CaptureResult that is not
3209      * listed here will always return a <code>null</code> value. Getting a key from
3210      * a CaptureResult that is listed here will generally never return a <code>null</code>
3211      * value.</p>
3212      * <p>The following keys may return <code>null</code> unless they are enabled:</p>
3213      * <ul>
3214      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP (non-null iff ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON)</li>
3215      * </ul>
3216      * <p>(Those sometimes-null keys will nevertheless be listed here
3217      * if they are available.)</p>
3218      * <p>This field can be used to query the feature set of a camera device
3219      * at a more granular level than capabilities. This is especially
3220      * important for optional keys that are not listed under any capability
3221      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3222      *
3223      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3224      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
3225      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
3226      */
3227     ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS =                     // int32[n]
3228             ACAMERA_REQUEST_START + 14,
3229     /**
3230      * <p>A list of all keys that the camera device has available to use with {@link ACameraManager_getCameraCharacteristics }.</p>
3231      *
3232      * <p>Type: int32[n]</p>
3233      *
3234      * <p>This tag may appear in:
3235      * <ul>
3236      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3237      * </ul></p>
3238      *
3239      * <p>This entry follows the same rules as
3240      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS (except that it applies for
3241      * CameraCharacteristics instead of CaptureResult). See above for more
3242      * details.</p>
3243      *
3244      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3245      */
3246     ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =            // int32[n]
3247             ACAMERA_REQUEST_START + 15,
3248     /**
3249      * <p>A subset of the available request keys that the camera device
3250      * can pass as part of the capture session initialization.</p>
3251      *
3252      * <p>Type: int32[n]</p>
3253      *
3254      * <p>This tag may appear in:
3255      * <ul>
3256      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3257      * </ul></p>
3258      *
3259      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which
3260      * contains a list of keys that are difficult to apply per-frame and
3261      * can result in unexpected delays when modified during the capture session
3262      * lifetime. Typical examples include parameters that require a
3263      * time-consuming hardware re-configuration or internal camera pipeline
3264      * change. For performance reasons we advise clients to pass their initial
3265      * values as part of
3266      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3267      * Once the camera capture session is enabled it is also recommended to avoid
3268      * changing them from their initial values set in
3269      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3270      * Control over session parameters can still be exerted in capture requests
3271      * but clients should be aware and expect delays during their application.
3272      * An example usage scenario could look like this:</p>
3273      * <ul>
3274      * <li>The camera client starts by quering the session parameter key list via
3275      *   {@link ACameraManager_getCameraCharacteristics }.</li>
3276      * <li>Before triggering the capture session create sequence, a capture request
3277      *   must be built via
3278      *   {@link ACameraDevice_createCaptureRequest }
3279      *   using an appropriate template matching the particular use case.</li>
3280      * <li>The client should go over the list of session parameters and check
3281      *   whether some of the keys listed matches with the parameters that
3282      *   they intend to modify as part of the first capture request.</li>
3283      * <li>If there is no such match, the capture request can be  passed
3284      *   unmodified to
3285      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3286      * <li>If matches do exist, the client should update the respective values
3287      *   and pass the request to
3288      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3289      * <li>After the capture session initialization completes the session parameter
3290      *   key list can continue to serve as reference when posting or updating
3291      *   further requests. As mentioned above further changes to session
3292      *   parameters should ideally be avoided, if updates are necessary
3293      *   however clients could expect a delay/glitch during the
3294      *   parameter switch.</li>
3295      * </ul>
3296      *
3297      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3298      */
3299     ACAMERA_REQUEST_AVAILABLE_SESSION_KEYS =                    // int32[n]
3300             ACAMERA_REQUEST_START + 16,
3301     /**
3302      * <p>A subset of the available request keys that can be overridden for
3303      * physical devices backing a logical multi-camera.</p>
3304      *
3305      * <p>Type: int32[n]</p>
3306      *
3307      * <p>This tag may appear in:
3308      * <ul>
3309      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3310      * </ul></p>
3311      *
3312      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which contains a list
3313      * of keys that can be overridden using <a href="https://developer.android.com/reference/CaptureRequest/Builder.html#setPhysicalCameraKey">Builder#setPhysicalCameraKey</a>.
3314      * The respective value of such request key can be obtained by calling
3315      * <a href="https://developer.android.com/reference/CaptureRequest/Builder.html#getPhysicalCameraKey">Builder#getPhysicalCameraKey</a>. Capture requests that contain
3316      * individual physical device requests must be built via
3317      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureRequest(int,">Set)</a>.</p>
3318      *
3319      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3320      */
3321     ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =    // int32[n]
3322             ACAMERA_REQUEST_START + 17,
3323     ACAMERA_REQUEST_END,
3324 
3325     /**
3326      * <p>The desired region of the sensor to read out for this capture.</p>
3327      *
3328      * <p>Type: int32[4]</p>
3329      *
3330      * <p>This tag may appear in:
3331      * <ul>
3332      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3333      *   <li>ACaptureRequest</li>
3334      * </ul></p>
3335      *
3336      * <p>This control can be used to implement digital zoom.</p>
3337      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
3338      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
3339      * the top-left pixel of the active array.</p>
3340      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate system
3341      * depends on the mode being set.  When the distortion correction mode is OFF, the
3342      * coordinate system follows ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with <code>(0,
3343      * 0)</code> being the top-left pixel of the pre-correction active array.  When the distortion
3344      * correction mode is not OFF, the coordinate system follows
3345      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being the top-left pixel of the
3346      * active array.</p>
3347      * <p>Output streams use this rectangle to produce their output, cropping to a smaller region
3348      * if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
3349      * match the output's configured resolution.</p>
3350      * <p>The crop region is applied after the RAW to other color space (e.g. YUV)
3351      * conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, they are not
3352      * croppable. The crop region will be ignored by raw streams.</p>
3353      * <p>For non-raw streams, any additional per-stream cropping will be done to maximize the
3354      * final pixel area of the stream.</p>
3355      * <p>For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
3356      * the exact crop region. 16:9 streams will further crop vertically (letterbox).</p>
3357      * <p>Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
3358      * (pillarbox), and 16:9 streams will match exactly. These additional crops will be
3359      * centered within the crop region.</p>
3360      * <p>To illustrate, here are several scenarios of different crop regions and output streams,
3361      * for a hypothetical camera device with an active array of size <code>(2000,1500)</code>.  Note that
3362      * several of these examples use non-centered crop regions for ease of illustration; such
3363      * regions are only supported on devices with FREEFORM capability
3364      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>), but this does not affect the way the crop
3365      * rules work otherwise.</p>
3366      * <ul>
3367      * <li>Camera Configuration:<ul>
3368      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
3369      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
3370      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
3371      * </ul>
3372      * </li>
3373      * <li>Case #1: 4:3 crop region with 2x digital zoom<ul>
3374      * <li>Crop region: <code>Rect(500, 375, 1500, 1125) // (left, top, right, bottom)</code></li>
3375      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-43-ratio.png" /></li>
3376      * <li><code>640x480</code> stream source area: <code>(500, 375, 1500, 1125)</code> (equal to crop region)</li>
3377      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3378      * </ul>
3379      * </li>
3380      * <li>Case #2: 16:9 crop region with ~1.5x digital zoom.<ul>
3381      * <li>Crop region: <code>Rect(500, 375, 1833, 1125)</code></li>
3382      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-169-ratio.png" /></li>
3383      * <li><code>640x480</code> stream source area: <code>(666, 375, 1666, 1125)</code> (pillarboxed)</li>
3384      * <li><code>1280x720</code> stream source area: <code>(500, 375, 1833, 1125)</code> (equal to crop region)</li>
3385      * </ul>
3386      * </li>
3387      * <li>Case #3: 1:1 crop region with ~2.6x digital zoom.<ul>
3388      * <li>Crop region: <code>Rect(500, 375, 1250, 1125)</code></li>
3389      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-11-ratio.png" /></li>
3390      * <li><code>640x480</code> stream source area: <code>(500, 469, 1250, 1031)</code> (letterboxed)</li>
3391      * <li><code>1280x720</code> stream source area: <code>(500, 543, 1250, 957)</code> (letterboxed)</li>
3392      * </ul>
3393      * </li>
3394      * <li>Case #4: Replace <code>640x480</code> stream with <code>1024x1024</code> stream, with 4:3 crop region:<ul>
3395      * <li>Crop region: <code>Rect(500, 375, 1500, 1125)</code></li>
3396      * <li><img alt="Square output, 4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-43-square-ratio.png" /></li>
3397      * <li><code>1024x1024</code> stream source area: <code>(625, 375, 1375, 1125)</code> (pillarboxed)</li>
3398      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3399      * <li>Note that in this case, neither of the two outputs is a subset of the other, with
3400      *   each containing image data the other doesn't have.</li>
3401      * </ul>
3402      * </li>
3403      * </ul>
3404      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, the width and height
3405      * of the crop region cannot be set to be smaller than
3406      * <code>floor( activeArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code> and
3407      * <code>floor( activeArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>, respectively.</p>
3408      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, the width
3409      * and height of the crop region cannot be set to be smaller than
3410      * <code>floor( preCorrectionActiveArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>
3411      * and
3412      * <code>floor( preCorrectionActiveArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>,
3413      * respectively.</p>
3414      * <p>The camera device may adjust the crop region to account for rounding and other hardware
3415      * requirements; the final crop region used will be included in the output capture result.</p>
3416      * <p>Starting from API level 30, it's strongly recommended to use ACAMERA_CONTROL_ZOOM_RATIO
3417      * to take advantage of better support for zoom with logical multi-camera. The benefits
3418      * include better precision with optical-digital zoom combination, and ability to do
3419      * zoom-out from 1.0x. When using ACAMERA_CONTROL_ZOOM_RATIO for zoom, the crop region in
3420      * the capture request must be either letterboxing or pillarboxing (but not both). The
3421      * coordinate system is post-zoom, meaning that the activeArraySize or
3422      * preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
3423      * ACAMERA_CONTROL_ZOOM_RATIO for details.</p>
3424      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
3425      *
3426      * @see ACAMERA_CONTROL_ZOOM_RATIO
3427      * @see ACAMERA_DISTORTION_CORRECTION_MODE
3428      * @see ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
3429      * @see ACAMERA_SCALER_CROPPING_TYPE
3430      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3431      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3432      */
3433     ACAMERA_SCALER_CROP_REGION =                                // int32[4]
3434             ACAMERA_SCALER_START,
3435     /**
3436      * <p>The maximum ratio between both active area width
3437      * and crop region width, and active area height and
3438      * crop region height, for ACAMERA_SCALER_CROP_REGION.</p>
3439      *
3440      * @see ACAMERA_SCALER_CROP_REGION
3441      *
3442      * <p>Type: float</p>
3443      *
3444      * <p>This tag may appear in:
3445      * <ul>
3446      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3447      * </ul></p>
3448      *
3449      * <p>This represents the maximum amount of zooming possible by
3450      * the camera device, or equivalently, the minimum cropping
3451      * window size.</p>
3452      * <p>Crop regions that have a width or height that is smaller
3453      * than this ratio allows will be rounded up to the minimum
3454      * allowed size by the camera device.</p>
3455      * <p>Starting from API level 30, when using ACAMERA_CONTROL_ZOOM_RATIO to zoom in or out,
3456      * the application must use ACAMERA_CONTROL_ZOOM_RATIO_RANGE to query both the minimum and
3457      * maximum zoom ratio.</p>
3458      *
3459      * @see ACAMERA_CONTROL_ZOOM_RATIO
3460      * @see ACAMERA_CONTROL_ZOOM_RATIO_RANGE
3461      */
3462     ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =                 // float
3463             ACAMERA_SCALER_START + 4,
3464     /**
3465      * <p>The available stream configurations that this
3466      * camera device supports
3467      * (i.e. format, width, height, output/input stream).</p>
3468      *
3469      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)</p>
3470      *
3471      * <p>This tag may appear in:
3472      * <ul>
3473      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3474      * </ul></p>
3475      *
3476      * <p>The configurations are listed as <code>(format, width, height, input?)</code>
3477      * tuples.</p>
3478      * <p>For a given use case, the actual maximum supported resolution
3479      * may be lower than what is listed here, depending on the destination
3480      * Surface for the image data. For example, for recording video,
3481      * the video encoder chosen may have a maximum size limit (e.g. 1080p)
3482      * smaller than what the camera (e.g. maximum resolution is 3264x2448)
3483      * can provide.</p>
3484      * <p>Please reference the documentation for the image data destination to
3485      * check if it limits the maximum size for image data.</p>
3486      * <p>Not all output formats may be supported in a configuration with
3487      * an input stream of a particular format. For more details, see
3488      * android.scaler.availableInputOutputFormatsMap.</p>
3489      * <p>The following table describes the minimum required output stream
3490      * configurations based on the hardware level
3491      * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL):</p>
3492      * <p>Format         | Size                                         | Hardware Level | Notes
3493      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
3494      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
3495      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
3496      * JPEG           | 1280x720 (720)                               | Any            | if 720p &lt;= activeArraySize
3497      * JPEG           | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
3498      * JPEG           | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
3499      * YUV_420_888    | all output sizes available for JPEG          | FULL           |
3500      * YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
3501      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
3502      * <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
3503      * mandatory stream configurations on a per-capability basis.</p>
3504      * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
3505      * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
3506      * fully supported due to this limitation on devices with high-resolution image sensors.
3507      * Therefore, trying to configure a QCIF resolution stream together with any other
3508      * stream larger than 1920x1080 resolution (either width or height) might not be supported,
3509      * and capture session creation will fail if it is not.</p>
3510      *
3511      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3512      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3513      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3514      */
3515     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS =            // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)
3516             ACAMERA_SCALER_START + 10,
3517     /**
3518      * <p>This lists the minimum frame duration for each
3519      * format/size combination.</p>
3520      *
3521      * <p>Type: int64[4*n]</p>
3522      *
3523      * <p>This tag may appear in:
3524      * <ul>
3525      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3526      * </ul></p>
3527      *
3528      * <p>This should correspond to the frame duration when only that
3529      * stream is active, with all processing (typically in android.*.mode)
3530      * set to either OFF or FAST.</p>
3531      * <p>When multiple streams are used in a request, the minimum frame
3532      * duration will be max(individual stream min durations).</p>
3533      * <p>The minimum frame duration of a stream (of a particular format, size)
3534      * is the same regardless of whether the stream is input or output.</p>
3535      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
3536      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
3537      * calculating the max frame rate.</p>
3538      *
3539      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
3540      * @see ACAMERA_SENSOR_FRAME_DURATION
3541      */
3542     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS =              // int64[4*n]
3543             ACAMERA_SCALER_START + 11,
3544     /**
3545      * <p>This lists the maximum stall duration for each
3546      * output format/size combination.</p>
3547      *
3548      * <p>Type: int64[4*n]</p>
3549      *
3550      * <p>This tag may appear in:
3551      * <ul>
3552      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3553      * </ul></p>
3554      *
3555      * <p>A stall duration is how much extra time would get added
3556      * to the normal minimum frame duration for a repeating request
3557      * that has streams with non-zero stall.</p>
3558      * <p>For example, consider JPEG captures which have the following
3559      * characteristics:</p>
3560      * <ul>
3561      * <li>JPEG streams act like processed YUV streams in requests for which
3562      * they are not included; in requests in which they are directly
3563      * referenced, they act as JPEG streams. This is because supporting a
3564      * JPEG stream requires the underlying YUV data to always be ready for
3565      * use by a JPEG encoder, but the encoder will only be used (and impact
3566      * frame duration) on requests that actually reference a JPEG stream.</li>
3567      * <li>The JPEG processor can run concurrently to the rest of the camera
3568      * pipeline, but cannot process more than 1 capture at a time.</li>
3569      * </ul>
3570      * <p>In other words, using a repeating YUV request would result
3571      * in a steady frame rate (let's say it's 30 FPS). If a single
3572      * JPEG request is submitted periodically, the frame rate will stay
3573      * at 30 FPS (as long as we wait for the previous JPEG to return each
3574      * time). If we try to submit a repeating YUV + JPEG request, then
3575      * the frame rate will drop from 30 FPS.</p>
3576      * <p>In general, submitting a new request with a non-0 stall time
3577      * stream will <em>not</em> cause a frame rate drop unless there are still
3578      * outstanding buffers for that stream from previous requests.</p>
3579      * <p>Submitting a repeating request with streams (call this <code>S</code>)
3580      * is the same as setting the minimum frame duration from
3581      * the normal minimum frame duration corresponding to <code>S</code>, added with
3582      * the maximum stall duration for <code>S</code>.</p>
3583      * <p>If interleaving requests with and without a stall duration,
3584      * a request will stall by the maximum of the remaining times
3585      * for each can-stall stream with outstanding buffers.</p>
3586      * <p>This means that a stalling request will not have an exposure start
3587      * until the stall has completed.</p>
3588      * <p>This should correspond to the stall duration when only that stream is
3589      * active, with all processing (typically in android.*.mode) set to FAST
3590      * or OFF. Setting any of the processing modes to HIGH_QUALITY
3591      * effectively results in an indeterminate stall duration for all
3592      * streams in a request (the regular stall calculation rules are
3593      * ignored).</p>
3594      * <p>The following formats may always have a stall duration:</p>
3595      * <ul>
3596      * <li>{@link AIMAGE_FORMAT_JPEG }</li>
3597      * <li>{@link AIMAGE_FORMAT_RAW16 }</li>
3598      * </ul>
3599      * <p>The following formats will never have a stall duration:</p>
3600      * <ul>
3601      * <li>{@link AIMAGE_FORMAT_YUV_420_888 }</li>
3602      * <li>{@link AIMAGE_FORMAT_RAW10 }</li>
3603      * <li>{@link AIMAGE_FORMAT_RAW12 }</li>
3604      * <li>{@link AIMAGE_FORMAT_Y8 }</li>
3605      * </ul>
3606      * <p>All other formats may or may not have an allowed stall duration on
3607      * a per-capability basis; refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3608      * for more details.</p>
3609      * <p>See ACAMERA_SENSOR_FRAME_DURATION for more information about
3610      * calculating the max frame rate (absent stalls).</p>
3611      *
3612      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3613      * @see ACAMERA_SENSOR_FRAME_DURATION
3614      */
3615     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS =                  // int64[4*n]
3616             ACAMERA_SCALER_START + 12,
3617     /**
3618      * <p>The crop type that this camera device supports.</p>
3619      *
3620      * <p>Type: byte (acamera_metadata_enum_android_scaler_cropping_type_t)</p>
3621      *
3622      * <p>This tag may appear in:
3623      * <ul>
3624      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3625      * </ul></p>
3626      *
3627      * <p>When passing a non-centered crop region (ACAMERA_SCALER_CROP_REGION) to a camera
3628      * device that only supports CENTER_ONLY cropping, the camera device will move the
3629      * crop region to the center of the sensor active array (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE)
3630      * and keep the crop region width and height unchanged. The camera device will return the
3631      * final used crop region in metadata result ACAMERA_SCALER_CROP_REGION.</p>
3632      * <p>Camera devices that support FREEFORM cropping will support any crop region that
3633      * is inside of the active array. The camera device will apply the same crop region and
3634      * return the final used crop region in capture result metadata ACAMERA_SCALER_CROP_REGION.</p>
3635      * <p>Starting from API level 30,</p>
3636      * <ul>
3637      * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
3638      * application must set ACAMERA_CONTROL_ZOOM_RATIO to 1.0, and use ACAMERA_SCALER_CROP_REGION
3639      * for zoom.</li>
3640      * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol>
3641      * <li>Set ACAMERA_CONTROL_ZOOM_RATIO to 1.0; adjust zoom by ACAMERA_SCALER_CROP_REGION.</li>
3642      * <li>Adjust zoom by ACAMERA_CONTROL_ZOOM_RATIO; use ACAMERA_SCALER_CROP_REGION to crop
3643      * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
3644      * windowboxing.</li>
3645      * </ol>
3646      * </li>
3647      * <li>Setting ACAMERA_CONTROL_ZOOM_RATIO to values different than 1.0 and
3648      * ACAMERA_SCALER_CROP_REGION to be windowboxing at the same time is undefined behavior.</li>
3649      * </ul>
3650      * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
3651      *
3652      * @see ACAMERA_CONTROL_ZOOM_RATIO
3653      * @see ACAMERA_SCALER_CROP_REGION
3654      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3655      */
3656     ACAMERA_SCALER_CROPPING_TYPE =                              // byte (acamera_metadata_enum_android_scaler_cropping_type_t)
3657             ACAMERA_SCALER_START + 13,
3658     /**
3659      * <p>Recommended stream configurations for common client use cases.</p>
3660      *
3661      * <p>Type: int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)</p>
3662      *
3663      * <p>This tag may appear in:
3664      * <ul>
3665      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3666      * </ul></p>
3667      *
3668      * <p>Optional subset of the ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS that contains
3669      * similar tuples listed as
3670      * (i.e. width, height, format, output/input stream, usecase bit field).
3671      * Camera devices will be able to suggest particular stream configurations which are
3672      * power and performance efficient for specific use cases. For more information about
3673      * retrieving the suggestions see
3674      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
3675      * <p>The data representation is int[5], which maps to
3676      * (width, height, format, output/input stream, usecase bit field). The array can be
3677      * parsed using the following pseudo code:</p>
3678      * <p>struct StreamConfiguration {
3679      * int32_t format;
3680      * int32_t width;
3681      * int32_t height;
3682      * int32_t isInput; };</p>
3683      * <p>void getPreferredStreamConfigurations(
3684      *     int32_t *array, size_t count, int32_t usecaseId,
3685      *     Vector &lt; StreamConfiguration &gt; * scs) {
3686      *     const size_t STREAM_CONFIGURATION_SIZE = 5;
3687      *     const size_t STREAM_WIDTH_OFFSET = 0;
3688      *     const size_t STREAM_HEIGHT_OFFSET = 1;
3689      *     const size_t STREAM_FORMAT_OFFSET = 2;
3690      *     const size_t STREAM_IS_INPUT_OFFSET = 3;
3691      *     const size_t STREAM_USECASE_BITMAP_OFFSET = 4;</p>
3692      * <pre><code>for (size_t i = 0; i &lt; count; i+= STREAM_CONFIGURATION_SIZE) {
3693      *     int32_t width = array[i + STREAM_WIDTH_OFFSET];
3694      *     int32_t height = array[i + STREAM_HEIGHT_OFFSET];
3695      *     int32_t format = array[i + STREAM_FORMAT_OFFSET];
3696      *     int32_t isInput = array[i + STREAM_IS_INPUT_OFFSET];
3697      *     int32_t supportedUsecases = array[i + STREAM_USECASE_BITMAP_OFFSET];
3698      *     if (supportedUsecases &amp; (1 &lt;&lt; usecaseId)) {
3699      *         StreamConfiguration sc = {format, width, height, isInput};
3700      *         scs-&gt;add(sc);
3701      *     }
3702      * }
3703      * </code></pre>
3704      * <p>}</p>
3705      *
3706      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3707      */
3708     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
3709                                                                 // int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)
3710             ACAMERA_SCALER_START + 14,
3711     /**
3712      * <p>Recommended mappings of image formats that are supported by this
3713      * camera device for input streams, to their corresponding output formats.</p>
3714      *
3715      * <p>Type: int32</p>
3716      *
3717      * <p>This tag may appear in:
3718      * <ul>
3719      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3720      * </ul></p>
3721      *
3722      * <p>This is a recommended subset of the complete list of mappings found in
3723      * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
3724      * The list however doesn't need to contain all available and supported mappings. Instead of
3725      * this developers must list only recommended and efficient entries.
3726      * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
3727      * configuration see
3728      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
3729      */
3730     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
3731                                                                 // int32
3732             ACAMERA_SCALER_START + 15,
3733     ACAMERA_SCALER_END,
3734 
3735     /**
3736      * <p>Duration each pixel is exposed to
3737      * light.</p>
3738      *
3739      * <p>Type: int64</p>
3740      *
3741      * <p>This tag may appear in:
3742      * <ul>
3743      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3744      *   <li>ACaptureRequest</li>
3745      * </ul></p>
3746      *
3747      * <p>If the sensor can't expose this exact duration, it will shorten the
3748      * duration exposed to the nearest possible value (rather than expose longer).
3749      * The final exposure time used will be available in the output capture result.</p>
3750      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
3751      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3752      *
3753      * @see ACAMERA_CONTROL_AE_MODE
3754      * @see ACAMERA_CONTROL_MODE
3755      */
3756     ACAMERA_SENSOR_EXPOSURE_TIME =                              // int64
3757             ACAMERA_SENSOR_START,
3758     /**
3759      * <p>Duration from start of frame exposure to
3760      * start of next frame exposure.</p>
3761      *
3762      * <p>Type: int64</p>
3763      *
3764      * <p>This tag may appear in:
3765      * <ul>
3766      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3767      *   <li>ACaptureRequest</li>
3768      * </ul></p>
3769      *
3770      * <p>The maximum frame rate that can be supported by a camera subsystem is
3771      * a function of many factors:</p>
3772      * <ul>
3773      * <li>Requested resolutions of output image streams</li>
3774      * <li>Availability of binning / skipping modes on the imager</li>
3775      * <li>The bandwidth of the imager interface</li>
3776      * <li>The bandwidth of the various ISP processing blocks</li>
3777      * </ul>
3778      * <p>Since these factors can vary greatly between different ISPs and
3779      * sensors, the camera abstraction tries to represent the bandwidth
3780      * restrictions with as simple a model as possible.</p>
3781      * <p>The model presented has the following characteristics:</p>
3782      * <ul>
3783      * <li>The image sensor is always configured to output the smallest
3784      * resolution possible given the application's requested output stream
3785      * sizes.  The smallest resolution is defined as being at least as large
3786      * as the largest requested output stream size; the camera pipeline must
3787      * never digitally upsample sensor data when the crop region covers the
3788      * whole sensor. In general, this means that if only small output stream
3789      * resolutions are configured, the sensor can provide a higher frame
3790      * rate.</li>
3791      * <li>Since any request may use any or all the currently configured
3792      * output streams, the sensor and ISP must be configured to support
3793      * scaling a single capture to all the streams at the same time.  This
3794      * means the camera pipeline must be ready to produce the largest
3795      * requested output size without any delay.  Therefore, the overall
3796      * frame rate of a given configured stream set is governed only by the
3797      * largest requested stream resolution.</li>
3798      * <li>Using more than one output stream in a request does not affect the
3799      * frame duration.</li>
3800      * <li>Certain format-streams may need to do additional background processing
3801      * before data is consumed/produced by that stream. These processors
3802      * can run concurrently to the rest of the camera pipeline, but
3803      * cannot process more than 1 capture at a time.</li>
3804      * </ul>
3805      * <p>The necessary information for the application, given the model above, is provided via
3806      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }.
3807      * These are used to determine the maximum frame rate / minimum frame duration that is
3808      * possible for a given stream configuration.</p>
3809      * <p>Specifically, the application can use the following rules to
3810      * determine the minimum frame duration it can request from the camera
3811      * device:</p>
3812      * <ol>
3813      * <li>Let the set of currently configured input/output streams be called <code>S</code>.</li>
3814      * <li>Find the minimum frame durations for each stream in <code>S</code>, by looking it up in {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
3815      * (with its respective size/format). Let this set of frame durations be called <code>F</code>.</li>
3816      * <li>For any given request <code>R</code>, the minimum frame duration allowed for <code>R</code> is the maximum
3817      * out of all values in <code>F</code>. Let the streams used in <code>R</code> be called <code>S_r</code>.</li>
3818      * </ol>
3819      * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }
3820      * using its respective size/format), then the frame duration in <code>F</code> determines the steady
3821      * state frame rate that the application will get if it uses <code>R</code> as a repeating request. Let
3822      * this special kind of request be called <code>Rsimple</code>.</p>
3823      * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved by a single capture of a
3824      * new request <code>Rstall</code> (which has at least one in-use stream with a non-0 stall time) and if
3825      * <code>Rstall</code> has the same minimum frame duration this will not cause a frame rate loss if all
3826      * buffers from the previous <code>Rstall</code> have already been delivered.</p>
3827      * <p>For more details about stalling, see {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }.</p>
3828      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
3829      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3830      *
3831      * @see ACAMERA_CONTROL_AE_MODE
3832      * @see ACAMERA_CONTROL_MODE
3833      */
3834     ACAMERA_SENSOR_FRAME_DURATION =                             // int64
3835             ACAMERA_SENSOR_START + 1,
3836     /**
3837      * <p>The amount of gain applied to sensor data
3838      * before processing.</p>
3839      *
3840      * <p>Type: int32</p>
3841      *
3842      * <p>This tag may appear in:
3843      * <ul>
3844      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3845      *   <li>ACaptureRequest</li>
3846      * </ul></p>
3847      *
3848      * <p>The sensitivity is the standard ISO sensitivity value,
3849      * as defined in ISO 12232:2006.</p>
3850      * <p>The sensitivity must be within ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE, and
3851      * if if it less than ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY, the camera device
3852      * is guaranteed to use only analog amplification for applying the gain.</p>
3853      * <p>If the camera device cannot apply the exact sensitivity
3854      * requested, it will reduce the gain to the nearest supported
3855      * value. The final sensitivity used will be available in the
3856      * output capture result.</p>
3857      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
3858      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
3859      * <p>Note that for devices supporting postRawSensitivityBoost, the total sensitivity applied
3860      * to the final processed image is the combination of ACAMERA_SENSOR_SENSITIVITY and
3861      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST. In case the application uses the sensor
3862      * sensitivity from last capture result of an auto request for a manual request, in order
3863      * to achieve the same brightness in the output image, the application should also
3864      * set postRawSensitivityBoost.</p>
3865      *
3866      * @see ACAMERA_CONTROL_AE_MODE
3867      * @see ACAMERA_CONTROL_MODE
3868      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
3869      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
3870      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
3871      * @see ACAMERA_SENSOR_SENSITIVITY
3872      */
3873     ACAMERA_SENSOR_SENSITIVITY =                                // int32
3874             ACAMERA_SENSOR_START + 2,
3875     /**
3876      * <p>The standard reference illuminant used as the scene light source when
3877      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM1,
3878      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
3879      * ACAMERA_SENSOR_FORWARD_MATRIX1 matrices.</p>
3880      *
3881      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
3882      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
3883      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
3884      *
3885      * <p>Type: byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)</p>
3886      *
3887      * <p>This tag may appear in:
3888      * <ul>
3889      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3890      * </ul></p>
3891      *
3892      * <p>The values in this key correspond to the values defined for the
3893      * EXIF LightSource tag. These illuminants are standard light sources
3894      * that are often used calibrating camera devices.</p>
3895      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM1,
3896      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
3897      * ACAMERA_SENSOR_FORWARD_MATRIX1 will also be present.</p>
3898      * <p>Some devices may choose to provide a second set of calibration
3899      * information for improved quality, including
3900      * ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 and its corresponding matrices.</p>
3901      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3902      * the camera device has RAW capability.</p>
3903      *
3904      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
3905      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
3906      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
3907      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
3908      */
3909     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 =                      // byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)
3910             ACAMERA_SENSOR_START + 3,
3911     /**
3912      * <p>The standard reference illuminant used as the scene light source when
3913      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM2,
3914      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
3915      * ACAMERA_SENSOR_FORWARD_MATRIX2 matrices.</p>
3916      *
3917      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
3918      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
3919      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
3920      *
3921      * <p>Type: byte</p>
3922      *
3923      * <p>This tag may appear in:
3924      * <ul>
3925      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3926      * </ul></p>
3927      *
3928      * <p>See ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 for more details.</p>
3929      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM2,
3930      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
3931      * ACAMERA_SENSOR_FORWARD_MATRIX2 will also be present.</p>
3932      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3933      * the camera device has RAW capability.</p>
3934      *
3935      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
3936      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
3937      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
3938      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
3939      */
3940     ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 =                      // byte
3941             ACAMERA_SENSOR_START + 4,
3942     /**
3943      * <p>A per-device calibration transform matrix that maps from the
3944      * reference sensor colorspace to the actual device sensor colorspace.</p>
3945      *
3946      * <p>Type: rational[3*3]</p>
3947      *
3948      * <p>This tag may appear in:
3949      * <ul>
3950      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3951      * </ul></p>
3952      *
3953      * <p>This matrix is used to correct for per-device variations in the
3954      * sensor colorspace, and is used for processing raw buffer data.</p>
3955      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3956      * contains a per-device calibration transform that maps colors
3957      * from reference sensor color space (i.e. the "golden module"
3958      * colorspace) into this camera device's native sensor color
3959      * space under the first reference illuminant
3960      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
3961      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3962      * the camera device has RAW capability.</p>
3963      *
3964      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
3965      */
3966     ACAMERA_SENSOR_CALIBRATION_TRANSFORM1 =                     // rational[3*3]
3967             ACAMERA_SENSOR_START + 5,
3968     /**
3969      * <p>A per-device calibration transform matrix that maps from the
3970      * reference sensor colorspace to the actual device sensor colorspace
3971      * (this is the colorspace of the raw buffer data).</p>
3972      *
3973      * <p>Type: rational[3*3]</p>
3974      *
3975      * <p>This tag may appear in:
3976      * <ul>
3977      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3978      * </ul></p>
3979      *
3980      * <p>This matrix is used to correct for per-device variations in the
3981      * sensor colorspace, and is used for processing raw buffer data.</p>
3982      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
3983      * contains a per-device calibration transform that maps colors
3984      * from reference sensor color space (i.e. the "golden module"
3985      * colorspace) into this camera device's native sensor color
3986      * space under the second reference illuminant
3987      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
3988      * <p>This matrix will only be present if the second reference
3989      * illuminant is present.</p>
3990      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
3991      * the camera device has RAW capability.</p>
3992      *
3993      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
3994      */
3995     ACAMERA_SENSOR_CALIBRATION_TRANSFORM2 =                     // rational[3*3]
3996             ACAMERA_SENSOR_START + 6,
3997     /**
3998      * <p>A matrix that transforms color values from CIE XYZ color space to
3999      * reference sensor color space.</p>
4000      *
4001      * <p>Type: rational[3*3]</p>
4002      *
4003      * <p>This tag may appear in:
4004      * <ul>
4005      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4006      * </ul></p>
4007      *
4008      * <p>This matrix is used to convert from the standard CIE XYZ color
4009      * space to the reference sensor colorspace, and is used when processing
4010      * raw buffer data.</p>
4011      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4012      * contains a color transform matrix that maps colors from the CIE
4013      * XYZ color space to the reference sensor color space (i.e. the
4014      * "golden module" colorspace) under the first reference illuminant
4015      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
4016      * <p>The white points chosen in both the reference sensor color space
4017      * and the CIE XYZ colorspace when calculating this transform will
4018      * match the standard white point for the first reference illuminant
4019      * (i.e. no chromatic adaptation will be applied by this transform).</p>
4020      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4021      * the camera device has RAW capability.</p>
4022      *
4023      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4024      */
4025     ACAMERA_SENSOR_COLOR_TRANSFORM1 =                           // rational[3*3]
4026             ACAMERA_SENSOR_START + 7,
4027     /**
4028      * <p>A matrix that transforms color values from CIE XYZ color space to
4029      * reference sensor color space.</p>
4030      *
4031      * <p>Type: rational[3*3]</p>
4032      *
4033      * <p>This tag may appear in:
4034      * <ul>
4035      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4036      * </ul></p>
4037      *
4038      * <p>This matrix is used to convert from the standard CIE XYZ color
4039      * space to the reference sensor colorspace, and is used when processing
4040      * raw buffer data.</p>
4041      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4042      * contains a color transform matrix that maps colors from the CIE
4043      * XYZ color space to the reference sensor color space (i.e. the
4044      * "golden module" colorspace) under the second reference illuminant
4045      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
4046      * <p>The white points chosen in both the reference sensor color space
4047      * and the CIE XYZ colorspace when calculating this transform will
4048      * match the standard white point for the second reference illuminant
4049      * (i.e. no chromatic adaptation will be applied by this transform).</p>
4050      * <p>This matrix will only be present if the second reference
4051      * illuminant is present.</p>
4052      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4053      * the camera device has RAW capability.</p>
4054      *
4055      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4056      */
4057     ACAMERA_SENSOR_COLOR_TRANSFORM2 =                           // rational[3*3]
4058             ACAMERA_SENSOR_START + 8,
4059     /**
4060      * <p>A matrix that transforms white balanced camera colors from the reference
4061      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4062      *
4063      * <p>Type: rational[3*3]</p>
4064      *
4065      * <p>This tag may appear in:
4066      * <ul>
4067      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4068      * </ul></p>
4069      *
4070      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4071      * is used when processing raw buffer data.</p>
4072      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4073      * a color transform matrix that maps white balanced colors from the
4074      * reference sensor color space to the CIE XYZ color space with a D50 white
4075      * point.</p>
4076      * <p>Under the first reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1)
4077      * this matrix is chosen so that the standard white point for this reference
4078      * illuminant in the reference sensor colorspace is mapped to D50 in the
4079      * CIE XYZ colorspace.</p>
4080      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4081      * the camera device has RAW capability.</p>
4082      *
4083      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4084      */
4085     ACAMERA_SENSOR_FORWARD_MATRIX1 =                            // rational[3*3]
4086             ACAMERA_SENSOR_START + 9,
4087     /**
4088      * <p>A matrix that transforms white balanced camera colors from the reference
4089      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4090      *
4091      * <p>Type: rational[3*3]</p>
4092      *
4093      * <p>This tag may appear in:
4094      * <ul>
4095      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4096      * </ul></p>
4097      *
4098      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4099      * is used when processing raw buffer data.</p>
4100      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4101      * a color transform matrix that maps white balanced colors from the
4102      * reference sensor color space to the CIE XYZ color space with a D50 white
4103      * point.</p>
4104      * <p>Under the second reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2)
4105      * this matrix is chosen so that the standard white point for this reference
4106      * illuminant in the reference sensor colorspace is mapped to D50 in the
4107      * CIE XYZ colorspace.</p>
4108      * <p>This matrix will only be present if the second reference
4109      * illuminant is present.</p>
4110      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4111      * the camera device has RAW capability.</p>
4112      *
4113      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4114      */
4115     ACAMERA_SENSOR_FORWARD_MATRIX2 =                            // rational[3*3]
4116             ACAMERA_SENSOR_START + 10,
4117     /**
4118      * <p>A fixed black level offset for each of the color filter arrangement
4119      * (CFA) mosaic channels.</p>
4120      *
4121      * <p>Type: int32[4]</p>
4122      *
4123      * <p>This tag may appear in:
4124      * <ul>
4125      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4126      * </ul></p>
4127      *
4128      * <p>This key specifies the zero light value for each of the CFA mosaic
4129      * channels in the camera sensor.  The maximal value output by the
4130      * sensor is represented by the value in ACAMERA_SENSOR_INFO_WHITE_LEVEL.</p>
4131      * <p>The values are given in the same order as channels listed for the CFA
4132      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
4133      * nth value given corresponds to the black level offset for the nth
4134      * color channel listed in the CFA.</p>
4135      * <p>The black level values of captured images may vary for different
4136      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
4137      * represents a coarse approximation for such case. It is recommended to
4138      * use ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL or use pixels from
4139      * ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS directly for captures when
4140      * supported by the camera device, which provides more accurate black
4141      * level values. For raw capture in particular, it is recommended to use
4142      * pixels from ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS to calculate black
4143      * level values for each frame.</p>
4144      * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p>
4145      *
4146      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
4147      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4148      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
4149      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4150      * @see ACAMERA_SENSOR_SENSITIVITY
4151      */
4152     ACAMERA_SENSOR_BLACK_LEVEL_PATTERN =                        // int32[4]
4153             ACAMERA_SENSOR_START + 12,
4154     /**
4155      * <p>Maximum sensitivity that is implemented
4156      * purely through analog gain.</p>
4157      *
4158      * <p>Type: int32</p>
4159      *
4160      * <p>This tag may appear in:
4161      * <ul>
4162      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4163      * </ul></p>
4164      *
4165      * <p>For ACAMERA_SENSOR_SENSITIVITY values less than or
4166      * equal to this, all applied gain must be analog. For
4167      * values above this, the gain applied can be a mix of analog and
4168      * digital.</p>
4169      *
4170      * @see ACAMERA_SENSOR_SENSITIVITY
4171      */
4172     ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY =                     // int32
4173             ACAMERA_SENSOR_START + 13,
4174     /**
4175      * <p>Clockwise angle through which the output image needs to be rotated to be
4176      * upright on the device screen in its native orientation.</p>
4177      *
4178      * <p>Type: int32</p>
4179      *
4180      * <p>This tag may appear in:
4181      * <ul>
4182      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4183      * </ul></p>
4184      *
4185      * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
4186      * the sensor's coordinate system.</p>
4187      */
4188     ACAMERA_SENSOR_ORIENTATION =                                // int32
4189             ACAMERA_SENSOR_START + 14,
4190     /**
4191      * <p>Time at start of exposure of first
4192      * row of the image sensor active array, in nanoseconds.</p>
4193      *
4194      * <p>Type: int64</p>
4195      *
4196      * <p>This tag may appear in:
4197      * <ul>
4198      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4199      * </ul></p>
4200      *
4201      * <p>The timestamps are also included in all image
4202      * buffers produced for the same capture, and will be identical
4203      * on all the outputs.</p>
4204      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> UNKNOWN,
4205      * the timestamps measure time since an unspecified starting point,
4206      * and are monotonically increasing. They can be compared with the
4207      * timestamps for other captures from the same camera device, but are
4208      * not guaranteed to be comparable to any other time source.</p>
4209      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME, the
4210      * timestamps measure time in the same timebase as <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">SystemClock#elapsedRealtimeNanos</a>, and they can
4211      * be compared to other timestamps from other subsystems that
4212      * are using that base.</p>
4213      * <p>For reprocessing, the timestamp will match the start of exposure of
4214      * the input image, i.e. <a href="https://developer.android.com/reference/CaptureResult.html#SENSOR_TIMESTAMP">the
4215      * timestamp</a> in the TotalCaptureResult that was used to create the
4216      * reprocess capture request.</p>
4217      *
4218      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
4219      */
4220     ACAMERA_SENSOR_TIMESTAMP =                                  // int64
4221             ACAMERA_SENSOR_START + 16,
4222     /**
4223      * <p>The estimated camera neutral color in the native sensor colorspace at
4224      * the time of capture.</p>
4225      *
4226      * <p>Type: rational[3]</p>
4227      *
4228      * <p>This tag may appear in:
4229      * <ul>
4230      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4231      * </ul></p>
4232      *
4233      * <p>This value gives the neutral color point encoded as an RGB value in the
4234      * native sensor color space.  The neutral color point indicates the
4235      * currently estimated white point of the scene illumination.  It can be
4236      * used to interpolate between the provided color transforms when
4237      * processing raw sensor data.</p>
4238      * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
4239      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4240      * the camera device has RAW capability.</p>
4241      */
4242     ACAMERA_SENSOR_NEUTRAL_COLOR_POINT =                        // rational[3]
4243             ACAMERA_SENSOR_START + 18,
4244     /**
4245      * <p>Noise model coefficients for each CFA mosaic channel.</p>
4246      *
4247      * <p>Type: double[2*CFA Channels]</p>
4248      *
4249      * <p>This tag may appear in:
4250      * <ul>
4251      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4252      * </ul></p>
4253      *
4254      * <p>This key contains two noise model coefficients for each CFA channel
4255      * corresponding to the sensor amplification (S) and sensor readout
4256      * noise (O).  These are given as pairs of coefficients for each channel
4257      * in the same order as channels listed for the CFA layout key
4258      * (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT).  This is
4259      * represented as an array of Pair&lt;Double, Double&gt;, where
4260      * the first member of the Pair at index n is the S coefficient and the
4261      * second member is the O coefficient for the nth color channel in the CFA.</p>
4262      * <p>These coefficients are used in a two parameter noise model to describe
4263      * the amount of noise present in the image for each CFA channel.  The
4264      * noise model used here is:</p>
4265      * <p>N(x) = sqrt(Sx + O)</p>
4266      * <p>Where x represents the recorded signal of a CFA channel normalized to
4267      * the range [0, 1], and S and O are the noise model coeffiecients for
4268      * that channel.</p>
4269      * <p>A more detailed description of the noise model can be found in the
4270      * Adobe DNG specification for the NoiseProfile tag.</p>
4271      * <p>For a MONOCHROME camera, there is only one color channel. So the noise model coefficients
4272      * will only contain one S and one O.</p>
4273      *
4274      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4275      */
4276     ACAMERA_SENSOR_NOISE_PROFILE =                              // double[2*CFA Channels]
4277             ACAMERA_SENSOR_START + 19,
4278     /**
4279      * <p>The worst-case divergence between Bayer green channels.</p>
4280      *
4281      * <p>Type: float</p>
4282      *
4283      * <p>This tag may appear in:
4284      * <ul>
4285      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4286      * </ul></p>
4287      *
4288      * <p>This value is an estimate of the worst case split between the
4289      * Bayer green channels in the red and blue rows in the sensor color
4290      * filter array.</p>
4291      * <p>The green split is calculated as follows:</p>
4292      * <ol>
4293      * <li>A 5x5 pixel (or larger) window W within the active sensor array is
4294      * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
4295      * mosaic channels (R, Gr, Gb, B).  The location and size of the window
4296      * chosen is implementation defined, and should be chosen to provide a
4297      * green split estimate that is both representative of the entire image
4298      * for this camera sensor, and can be calculated quickly.</li>
4299      * <li>The arithmetic mean of the green channels from the red
4300      * rows (mean_Gr) within W is computed.</li>
4301      * <li>The arithmetic mean of the green channels from the blue
4302      * rows (mean_Gb) within W is computed.</li>
4303      * <li>The maximum ratio R of the two means is computed as follows:
4304      * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
4305      * </ol>
4306      * <p>The ratio R is the green split divergence reported for this property,
4307      * which represents how much the green channels differ in the mosaic
4308      * pattern.  This value is typically used to determine the treatment of
4309      * the green mosaic channels when demosaicing.</p>
4310      * <p>The green split value can be roughly interpreted as follows:</p>
4311      * <ul>
4312      * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
4313      * <li>1.20 &lt;= R &gt;= 1.03 will require some software
4314      * correction to avoid demosaic errors (3-20% divergence).</li>
4315      * <li>R &gt; 1.20 will require strong software correction to produce
4316      * a usuable image (&gt;20% divergence).</li>
4317      * </ul>
4318      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4319      * the camera device has RAW capability.</p>
4320      */
4321     ACAMERA_SENSOR_GREEN_SPLIT =                                // float
4322             ACAMERA_SENSOR_START + 22,
4323     /**
4324      * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
4325      * when ACAMERA_SENSOR_TEST_PATTERN_MODE is SOLID_COLOR.</p>
4326      *
4327      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
4328      *
4329      * <p>Type: int32[4]</p>
4330      *
4331      * <p>This tag may appear in:
4332      * <ul>
4333      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4334      *   <li>ACaptureRequest</li>
4335      * </ul></p>
4336      *
4337      * <p>Each color channel is treated as an unsigned 32-bit integer.
4338      * The camera device then uses the most significant X bits
4339      * that correspond to how many bits are in its Bayer raw sensor
4340      * output.</p>
4341      * <p>For example, a sensor with RAW10 Bayer output would use the
4342      * 10 most significant bits from each color channel.</p>
4343      */
4344     ACAMERA_SENSOR_TEST_PATTERN_DATA =                          // int32[4]
4345             ACAMERA_SENSOR_START + 23,
4346     /**
4347      * <p>When enabled, the sensor sends a test pattern instead of
4348      * doing a real exposure from the camera.</p>
4349      *
4350      * <p>Type: int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)</p>
4351      *
4352      * <p>This tag may appear in:
4353      * <ul>
4354      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4355      *   <li>ACaptureRequest</li>
4356      * </ul></p>
4357      *
4358      * <p>When a test pattern is enabled, all manual sensor controls specified
4359      * by ACAMERA_SENSOR_* will be ignored. All other controls should
4360      * work as normal.</p>
4361      * <p>For example, if manual flash is enabled, flash firing should still
4362      * occur (and that the test pattern remain unmodified, since the flash
4363      * would not actually affect it).</p>
4364      * <p>Defaults to OFF.</p>
4365      */
4366     ACAMERA_SENSOR_TEST_PATTERN_MODE =                          // int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)
4367             ACAMERA_SENSOR_START + 24,
4368     /**
4369      * <p>List of sensor test pattern modes for ACAMERA_SENSOR_TEST_PATTERN_MODE
4370      * supported by this camera device.</p>
4371      *
4372      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
4373      *
4374      * <p>Type: int32[n]</p>
4375      *
4376      * <p>This tag may appear in:
4377      * <ul>
4378      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4379      * </ul></p>
4380      *
4381      * <p>Defaults to OFF, and always includes OFF if defined.</p>
4382      */
4383     ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES =               // int32[n]
4384             ACAMERA_SENSOR_START + 25,
4385     /**
4386      * <p>Duration between the start of exposure for the first row of the image sensor,
4387      * and the start of exposure for one past the last row of the image sensor.</p>
4388      *
4389      * <p>Type: int64</p>
4390      *
4391      * <p>This tag may appear in:
4392      * <ul>
4393      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4394      * </ul></p>
4395      *
4396      * <p>This is the exposure time skew between the first and <code>(last+1)</code> row exposure start times. The
4397      * first row and the last row are the first and last rows inside of the
4398      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4399      * <p>For typical camera sensors that use rolling shutters, this is also equivalent to the frame
4400      * readout time.</p>
4401      * <p>If the image sensor is operating in a binned or cropped mode due to the current output
4402      * target resolutions, it's possible this skew is reported to be larger than the exposure
4403      * time, for example, since it is based on the full array even if a partial array is read
4404      * out. Be sure to scale the number to cover the section of the sensor actually being used
4405      * for the outputs you care about. So if your output covers N rows of the active array of
4406      * height H, scale this value by N/H to get the total skew for that viewport.</p>
4407      * <p><em>Note:</em> Prior to Android 11, this field was described as measuring duration from
4408      * first to last row of the image sensor, which is not equal to the frame readout time for a
4409      * rolling shutter sensor. Implementations generally reported the latter value, so to resolve
4410      * the inconsistency, the description has been updated to range from (first, last+1) row
4411      * exposure start, instead.</p>
4412      *
4413      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4414      */
4415     ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW =                       // int64
4416             ACAMERA_SENSOR_START + 26,
4417     /**
4418      * <p>List of disjoint rectangles indicating the sensor
4419      * optically shielded black pixel regions.</p>
4420      *
4421      * <p>Type: int32[4*num_regions]</p>
4422      *
4423      * <p>This tag may appear in:
4424      * <ul>
4425      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4426      * </ul></p>
4427      *
4428      * <p>In most camera sensors, the active array is surrounded by some
4429      * optically shielded pixel areas. By blocking light, these pixels
4430      * provides a reliable black reference for black level compensation
4431      * in active array region.</p>
4432      * <p>This key provides a list of disjoint rectangles specifying the
4433      * regions of optically shielded (with metal shield) black pixel
4434      * regions if the camera device is capable of reading out these black
4435      * pixels in the output raw images. In comparison to the fixed black
4436      * level values reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN, this key
4437      * may provide a more accurate way for the application to calculate
4438      * black level of each captured raw images.</p>
4439      * <p>When this key is reported, the ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL and
4440      * ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL will also be reported.</p>
4441      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
4442      *
4443      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4444      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
4445      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
4446      */
4447     ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS =                      // int32[4*num_regions]
4448             ACAMERA_SENSOR_START + 27,
4449     /**
4450      * <p>A per-frame dynamic black level offset for each of the color filter
4451      * arrangement (CFA) mosaic channels.</p>
4452      *
4453      * <p>Type: float[4]</p>
4454      *
4455      * <p>This tag may appear in:
4456      * <ul>
4457      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4458      * </ul></p>
4459      *
4460      * <p>Camera sensor black levels may vary dramatically for different
4461      * capture settings (e.g. ACAMERA_SENSOR_SENSITIVITY). The fixed black
4462      * level reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may be too
4463      * inaccurate to represent the actual value on a per-frame basis. The
4464      * camera device internal pipeline relies on reliable black level values
4465      * to process the raw images appropriately. To get the best image
4466      * quality, the camera device may choose to estimate the per frame black
4467      * level values either based on optically shielded black regions
4468      * (ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS) or its internal model.</p>
4469      * <p>This key reports the camera device estimated per-frame zero light
4470      * value for each of the CFA mosaic channels in the camera sensor. The
4471      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may only represent a coarse
4472      * approximation of the actual black level values. This value is the
4473      * black level used in camera device internal image processing pipeline
4474      * and generally more accurate than the fixed black level values.
4475      * However, since they are estimated values by the camera device, they
4476      * may not be as accurate as the black level values calculated from the
4477      * optical black pixels reported by ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS.</p>
4478      * <p>The values are given in the same order as channels listed for the CFA
4479      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
4480      * nth value given corresponds to the black level offset for the nth
4481      * color channel listed in the CFA.</p>
4482      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values.</p>
4483      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is available or the
4484      * camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
4485      *
4486      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4487      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4488      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4489      * @see ACAMERA_SENSOR_SENSITIVITY
4490      */
4491     ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL =                        // float[4]
4492             ACAMERA_SENSOR_START + 28,
4493     /**
4494      * <p>Maximum raw value output by sensor for this frame.</p>
4495      *
4496      * <p>Type: int32</p>
4497      *
4498      * <p>This tag may appear in:
4499      * <ul>
4500      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4501      * </ul></p>
4502      *
4503      * <p>Since the ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may change for different
4504      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY), the white
4505      * level will change accordingly. This key is similar to
4506      * ACAMERA_SENSOR_INFO_WHITE_LEVEL, but specifies the camera device
4507      * estimated white level for each frame.</p>
4508      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is
4509      * available or the camera device advertises this key via
4510      * {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
4511      *
4512      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4513      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
4514      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4515      * @see ACAMERA_SENSOR_SENSITIVITY
4516      */
4517     ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL =                        // int32
4518             ACAMERA_SENSOR_START + 29,
4519     ACAMERA_SENSOR_END,
4520 
4521     /**
4522      * <p>The area of the image sensor which corresponds to active pixels after any geometric
4523      * distortion correction has been applied.</p>
4524      *
4525      * <p>Type: int32[4]</p>
4526      *
4527      * <p>This tag may appear in:
4528      * <ul>
4529      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4530      * </ul></p>
4531      *
4532      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
4533      * the region that actually receives light from the scene) after any geometric correction
4534      * has been applied, and should be treated as the maximum size in pixels of any of the
4535      * image output formats aside from the raw formats.</p>
4536      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
4537      * the full pixel array, and the size of the full pixel array is given by
4538      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
4539      * <p>The coordinate system for most other keys that list pixel coordinates, including
4540      * ACAMERA_SCALER_CROP_REGION, is defined relative to the active array rectangle given in
4541      * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
4542      * <p>The active array may be smaller than the full pixel array, since the full array may
4543      * include black calibration pixels or other inactive regions.</p>
4544      * <p>For devices that do not support ACAMERA_DISTORTION_CORRECTION_MODE control, the active
4545      * array must be the same as ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
4546      * <p>For devices that support ACAMERA_DISTORTION_CORRECTION_MODE control, the active array must
4547      * be enclosed by ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. The difference between
4548      * pre-correction active array and active array accounts for scaling or cropping caused
4549      * by lens geometric distortion correction.</p>
4550      * <p>In general, application should always refer to active array size for controls like
4551      * metering regions or crop region. Two exceptions are when the application is dealing with
4552      * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
4553      * ACAMERA_DISTORTION_CORRECTION_MODE to OFF. In these cases, application should refer
4554      * to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
4555      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
4556      *
4557      * @see ACAMERA_DISTORTION_CORRECTION_MODE
4558      * @see ACAMERA_SCALER_CROP_REGION
4559      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
4560      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4561      */
4562     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE =                     // int32[4]
4563             ACAMERA_SENSOR_INFO_START,
4564     /**
4565      * <p>Range of sensitivities for ACAMERA_SENSOR_SENSITIVITY supported by this
4566      * camera device.</p>
4567      *
4568      * @see ACAMERA_SENSOR_SENSITIVITY
4569      *
4570      * <p>Type: int32[2]</p>
4571      *
4572      * <p>This tag may appear in:
4573      * <ul>
4574      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4575      * </ul></p>
4576      *
4577      * <p>The values are the standard ISO sensitivity values,
4578      * as defined in ISO 12232:2006.</p>
4579      */
4580     ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE =                     // int32[2]
4581             ACAMERA_SENSOR_INFO_START + 1,
4582     /**
4583      * <p>The arrangement of color filters on sensor;
4584      * represents the colors in the top-left 2x2 section of
4585      * the sensor, in reading order, for a Bayer camera, or the
4586      * light spectrum it captures for MONOCHROME camera.</p>
4587      *
4588      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)</p>
4589      *
4590      * <p>This tag may appear in:
4591      * <ul>
4592      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4593      * </ul></p>
4594      *
4595      */
4596     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =              // byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)
4597             ACAMERA_SENSOR_INFO_START + 2,
4598     /**
4599      * <p>The range of image exposure times for ACAMERA_SENSOR_EXPOSURE_TIME supported
4600      * by this camera device.</p>
4601      *
4602      * @see ACAMERA_SENSOR_EXPOSURE_TIME
4603      *
4604      * <p>Type: int64[2]</p>
4605      *
4606      * <p>This tag may appear in:
4607      * <ul>
4608      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4609      * </ul></p>
4610      *
4611      */
4612     ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE =                   // int64[2]
4613             ACAMERA_SENSOR_INFO_START + 3,
4614     /**
4615      * <p>The maximum possible frame duration (minimum frame rate) for
4616      * ACAMERA_SENSOR_FRAME_DURATION that is supported this camera device.</p>
4617      *
4618      * @see ACAMERA_SENSOR_FRAME_DURATION
4619      *
4620      * <p>Type: int64</p>
4621      *
4622      * <p>This tag may appear in:
4623      * <ul>
4624      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4625      * </ul></p>
4626      *
4627      * <p>Attempting to use frame durations beyond the maximum will result in the frame
4628      * duration being clipped to the maximum. See that control for a full definition of frame
4629      * durations.</p>
4630      * <p>Refer to {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
4631      * for the minimum frame duration values.</p>
4632      */
4633     ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION =                    // int64
4634             ACAMERA_SENSOR_INFO_START + 4,
4635     /**
4636      * <p>The physical dimensions of the full pixel
4637      * array.</p>
4638      *
4639      * <p>Type: float[2]</p>
4640      *
4641      * <p>This tag may appear in:
4642      * <ul>
4643      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4644      * </ul></p>
4645      *
4646      * <p>This is the physical size of the sensor pixel
4647      * array defined by ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
4648      *
4649      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
4650      */
4651     ACAMERA_SENSOR_INFO_PHYSICAL_SIZE =                         // float[2]
4652             ACAMERA_SENSOR_INFO_START + 5,
4653     /**
4654      * <p>Dimensions of the full pixel array, possibly
4655      * including black calibration pixels.</p>
4656      *
4657      * <p>Type: int32[2]</p>
4658      *
4659      * <p>This tag may appear in:
4660      * <ul>
4661      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4662      * </ul></p>
4663      *
4664      * <p>The pixel count of the full pixel array of the image sensor, which covers
4665      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area.  This represents the full pixel dimensions of
4666      * the raw buffers produced by this sensor.</p>
4667      * <p>If a camera device supports raw sensor formats, either this or
4668      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is the maximum dimensions for the raw
4669      * output formats listed in {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
4670      * (this depends on whether or not the image sensor returns buffers containing pixels that
4671      * are not part of the active array region for blacklevel calibration or other purposes).</p>
4672      * <p>Some parts of the full pixel array may not receive light from the scene,
4673      * or be otherwise inactive.  The ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE key
4674      * defines the rectangle of active pixels that will be included in processed image
4675      * formats.</p>
4676      *
4677      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
4678      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4679      */
4680     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE =                      // int32[2]
4681             ACAMERA_SENSOR_INFO_START + 6,
4682     /**
4683      * <p>Maximum raw value output by sensor.</p>
4684      *
4685      * <p>Type: int32</p>
4686      *
4687      * <p>This tag may appear in:
4688      * <ul>
4689      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4690      * </ul></p>
4691      *
4692      * <p>This specifies the fully-saturated encoding level for the raw
4693      * sample values from the sensor.  This is typically caused by the
4694      * sensor becoming highly non-linear or clipping. The minimum for
4695      * each channel is specified by the offset in the
4696      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN key.</p>
4697      * <p>The white level is typically determined either by sensor bit depth
4698      * (8-14 bits is expected), or by the point where the sensor response
4699      * becomes too non-linear to be useful.  The default value for this is
4700      * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
4701      * <p>The white level values of captured images may vary for different
4702      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
4703      * represents a coarse approximation for such case. It is recommended
4704      * to use ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL for captures when supported
4705      * by the camera device, which provides more accurate white level values.</p>
4706      *
4707      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4708      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
4709      * @see ACAMERA_SENSOR_SENSITIVITY
4710      */
4711     ACAMERA_SENSOR_INFO_WHITE_LEVEL =                           // int32
4712             ACAMERA_SENSOR_INFO_START + 7,
4713     /**
4714      * <p>The time base source for sensor capture start timestamps.</p>
4715      *
4716      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)</p>
4717      *
4718      * <p>This tag may appear in:
4719      * <ul>
4720      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4721      * </ul></p>
4722      *
4723      * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
4724      * may not based on a time source that can be compared to other system time sources.</p>
4725      * <p>This characteristic defines the source for the timestamps, and therefore whether they
4726      * can be compared against other system time sources/timestamps.</p>
4727      */
4728     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE =                      // byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)
4729             ACAMERA_SENSOR_INFO_START + 8,
4730     /**
4731      * <p>Whether the RAW images output from this camera device are subject to
4732      * lens shading correction.</p>
4733      *
4734      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)</p>
4735      *
4736      * <p>This tag may appear in:
4737      * <ul>
4738      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4739      * </ul></p>
4740      *
4741      * <p>If TRUE, all images produced by the camera device in the RAW image formats will
4742      * have lens shading correction already applied to it. If FALSE, the images will
4743      * not be adjusted for lens shading correction.
4744      * See android.request.maxNumOutputRaw for a list of RAW image formats.</p>
4745      * <p>This key will be <code>null</code> for all devices do not report this information.
4746      * Devices with RAW capability will always report this information in this key.</p>
4747      */
4748     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED =                  // byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)
4749             ACAMERA_SENSOR_INFO_START + 9,
4750     /**
4751      * <p>The area of the image sensor which corresponds to active pixels prior to the
4752      * application of any geometric distortion correction.</p>
4753      *
4754      * <p>Type: int32[4]</p>
4755      *
4756      * <p>This tag may appear in:
4757      * <ul>
4758      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4759      * </ul></p>
4760      *
4761      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
4762      * the region that actually receives light from the scene) before any geometric correction
4763      * has been applied, and should be treated as the active region rectangle for any of the
4764      * raw formats.  All metadata associated with raw processing (e.g. the lens shading
4765      * correction map, and radial distortion fields) treats the top, left of this rectangle as
4766      * the origin, (0,0).</p>
4767      * <p>The size of this region determines the maximum field of view and the maximum number of
4768      * pixels that an image from this sensor can contain, prior to the application of
4769      * geometric distortion correction. The effective maximum pixel dimensions of a
4770      * post-distortion-corrected image is given by the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4771      * field, and the effective maximum field of view for a post-distortion-corrected image
4772      * can be calculated by applying the geometric distortion correction fields to this
4773      * rectangle, and cropping to the rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4774      * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
4775      * dimensions in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE given the position of a pixel,
4776      * (x', y'), in the raw pixel array with dimensions give in
4777      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE:</p>
4778      * <ol>
4779      * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
4780      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, otherwise this pixel is considered
4781      * to be outside of the FOV, and will not be shown in the processed output image.</li>
4782      * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
4783      * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
4784      * buffers is defined relative to the top, left of the
4785      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE rectangle.</li>
4786      * <li>If the resulting corrected pixel coordinate is within the region given in
4787      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, then the position of this pixel in the
4788      * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
4789      * when the top, left coordinate of that buffer is treated as (0, 0).</li>
4790      * </ol>
4791      * <p>Thus, for pixel x',y' = (25, 25) on a sensor where ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
4792      * is (100,100), ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is (10, 10, 100, 100),
4793      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE is (20, 20, 80, 80), and the geometric distortion
4794      * correction doesn't change the pixel coordinate, the resulting pixel selected in
4795      * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
4796      * with dimensions given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, and would be (5, 5)
4797      * relative to the top,left of post-processed YUV output buffer with dimensions given in
4798      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4799      * <p>The currently supported fields that correct for geometric distortion are:</p>
4800      * <ol>
4801      * <li>ACAMERA_LENS_DISTORTION.</li>
4802      * </ol>
4803      * <p>If the camera device doesn't support geometric distortion correction, or all of the
4804      * geometric distortion fields are no-ops, this rectangle will be the same as the
4805      * post-distortion-corrected rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4806      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
4807      * the full pixel array, and the size of the full pixel array is given by
4808      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
4809      * <p>The pre-correction active array may be smaller than the full pixel array, since the
4810      * full array may include black calibration pixels or other inactive regions.</p>
4811      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
4812      *
4813      * @see ACAMERA_LENS_DISTORTION
4814      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4815      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
4816      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4817      */
4818     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =      // int32[4]
4819             ACAMERA_SENSOR_INFO_START + 10,
4820     ACAMERA_SENSOR_INFO_END,
4821 
4822     /**
4823      * <p>Quality of lens shading correction applied
4824      * to the image data.</p>
4825      *
4826      * <p>Type: byte (acamera_metadata_enum_android_shading_mode_t)</p>
4827      *
4828      * <p>This tag may appear in:
4829      * <ul>
4830      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4831      *   <li>ACaptureRequest</li>
4832      * </ul></p>
4833      *
4834      * <p>When set to OFF mode, no lens shading correction will be applied by the
4835      * camera device, and an identity lens shading map data will be provided
4836      * if <code>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON</code>. For example, for lens
4837      * shading map with size of <code>[ 4, 3 ]</code>,
4838      * the output android.statistics.lensShadingCorrectionMap for this case will be an identity
4839      * map shown below:</p>
4840      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
4841      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
4842      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
4843      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
4844      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
4845      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
4846      * </code></pre>
4847      * <p>When set to other modes, lens shading correction will be applied by the camera
4848      * device. Applications can request lens shading map data by setting
4849      * ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE to ON, and then the camera device will provide lens
4850      * shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
4851      * data will be the one applied by the camera device for this capture request.</p>
4852      * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
4853      * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
4854      * AWB are in AUTO modes(ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF and ACAMERA_CONTROL_AWB_MODE <code>!=</code>
4855      * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
4856      * to be converged before using the returned shading map data.</p>
4857      *
4858      * @see ACAMERA_CONTROL_AE_MODE
4859      * @see ACAMERA_CONTROL_AWB_MODE
4860      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
4861      */
4862     ACAMERA_SHADING_MODE =                                      // byte (acamera_metadata_enum_android_shading_mode_t)
4863             ACAMERA_SHADING_START,
4864     /**
4865      * <p>List of lens shading modes for ACAMERA_SHADING_MODE that are supported by this camera device.</p>
4866      *
4867      * @see ACAMERA_SHADING_MODE
4868      *
4869      * <p>Type: byte[n]</p>
4870      *
4871      * <p>This tag may appear in:
4872      * <ul>
4873      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4874      * </ul></p>
4875      *
4876      * <p>This list contains lens shading modes that can be set for the camera device.
4877      * Camera devices that support the MANUAL_POST_PROCESSING capability will always
4878      * list OFF and FAST mode. This includes all FULL level devices.
4879      * LEGACY devices will always only support FAST mode.</p>
4880      */
4881     ACAMERA_SHADING_AVAILABLE_MODES =                           // byte[n]
4882             ACAMERA_SHADING_START + 2,
4883     ACAMERA_SHADING_END,
4884 
4885     /**
4886      * <p>Operating mode for the face detector
4887      * unit.</p>
4888      *
4889      * <p>Type: byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)</p>
4890      *
4891      * <p>This tag may appear in:
4892      * <ul>
4893      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4894      *   <li>ACaptureRequest</li>
4895      * </ul></p>
4896      *
4897      * <p>Whether face detection is enabled, and whether it
4898      * should output just the basic fields or the full set of
4899      * fields.</p>
4900      */
4901     ACAMERA_STATISTICS_FACE_DETECT_MODE =                       // byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)
4902             ACAMERA_STATISTICS_START,
4903     /**
4904      * <p>Operating mode for hot pixel map generation.</p>
4905      *
4906      * <p>Type: byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)</p>
4907      *
4908      * <p>This tag may appear in:
4909      * <ul>
4910      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4911      *   <li>ACaptureRequest</li>
4912      * </ul></p>
4913      *
4914      * <p>If set to <code>true</code>, a hot pixel map is returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.
4915      * If set to <code>false</code>, no hot pixel map will be returned.</p>
4916      *
4917      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
4918      */
4919     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE =                     // byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)
4920             ACAMERA_STATISTICS_START + 3,
4921     /**
4922      * <p>List of unique IDs for detected faces.</p>
4923      *
4924      * <p>Type: int32[n]</p>
4925      *
4926      * <p>This tag may appear in:
4927      * <ul>
4928      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4929      * </ul></p>
4930      *
4931      * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
4932      * to the camera device.  A face that leaves the field of view and later returns may be
4933      * assigned a new ID.</p>
4934      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL</p>
4935      *
4936      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4937      */
4938     ACAMERA_STATISTICS_FACE_IDS =                               // int32[n]
4939             ACAMERA_STATISTICS_START + 4,
4940     /**
4941      * <p>List of landmarks for detected
4942      * faces.</p>
4943      *
4944      * <p>Type: int32[n*6]</p>
4945      *
4946      * <p>This tag may appear in:
4947      * <ul>
4948      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4949      * </ul></p>
4950      *
4951      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
4952      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
4953      * the top-left pixel of the active array.</p>
4954      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
4955      * system depends on the mode being set.
4956      * When the distortion correction mode is OFF, the coordinate system follows
4957      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
4958      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
4959      * When the distortion correction mode is not OFF, the coordinate system follows
4960      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
4961      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
4962      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL.</p>
4963      * <p>Starting from API level 30, the coordinate system of activeArraySize or
4964      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
4965      * pre-zoomRatio field of view. This means that if the relative position of faces and
4966      * the camera device doesn't change, when zooming in by increasing
4967      * ACAMERA_CONTROL_ZOOM_RATIO, the face landmarks move farther away from the center of the
4968      * activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0
4969      * (default), the face landmarks coordinates won't change as ACAMERA_SCALER_CROP_REGION
4970      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
4971      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
4972      *
4973      * @see ACAMERA_CONTROL_ZOOM_RATIO
4974      * @see ACAMERA_DISTORTION_CORRECTION_MODE
4975      * @see ACAMERA_SCALER_CROP_REGION
4976      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4977      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4978      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
4979      */
4980     ACAMERA_STATISTICS_FACE_LANDMARKS =                         // int32[n*6]
4981             ACAMERA_STATISTICS_START + 5,
4982     /**
4983      * <p>List of the bounding rectangles for detected
4984      * faces.</p>
4985      *
4986      * <p>Type: int32[n*4]</p>
4987      *
4988      * <p>This tag may appear in:
4989      * <ul>
4990      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4991      * </ul></p>
4992      *
4993      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
4994      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
4995      * the top-left pixel of the active array.</p>
4996      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
4997      * system depends on the mode being set.
4998      * When the distortion correction mode is OFF, the coordinate system follows
4999      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
5000      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
5001      * When the distortion correction mode is not OFF, the coordinate system follows
5002      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
5003      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
5004      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
5005      * <p>Starting from API level 30, the coordinate system of activeArraySize or
5006      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
5007      * pre-zoomRatio field of view. This means that if the relative position of faces and
5008      * the camera device doesn't change, when zooming in by increasing
5009      * ACAMERA_CONTROL_ZOOM_RATIO, the face rectangles grow larger and move farther away from
5010      * the center of the activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO
5011      * is set to 1.0 (default), the face rectangles won't change as ACAMERA_SCALER_CROP_REGION
5012      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
5013      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
5014      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, right, bottom)</code>.</p>
5015      *
5016      * @see ACAMERA_CONTROL_ZOOM_RATIO
5017      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5018      * @see ACAMERA_SCALER_CROP_REGION
5019      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5020      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5021      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5022      */
5023     ACAMERA_STATISTICS_FACE_RECTANGLES =                        // int32[n*4]
5024             ACAMERA_STATISTICS_START + 6,
5025     /**
5026      * <p>List of the face confidence scores for
5027      * detected faces</p>
5028      *
5029      * <p>Type: byte[n]</p>
5030      *
5031      * <p>This tag may appear in:
5032      * <ul>
5033      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5034      * </ul></p>
5035      *
5036      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
5037      *
5038      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5039      */
5040     ACAMERA_STATISTICS_FACE_SCORES =                            // byte[n]
5041             ACAMERA_STATISTICS_START + 7,
5042     /**
5043      * <p>The shading map is a low-resolution floating-point map
5044      * that lists the coefficients used to correct for vignetting and color shading,
5045      * for each Bayer color channel of RAW image data.</p>
5046      *
5047      * <p>Type: float[4*n*m]</p>
5048      *
5049      * <p>This tag may appear in:
5050      * <ul>
5051      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5052      * </ul></p>
5053      *
5054      * <p>The map provided here is the same map that is used by the camera device to
5055      * correct both color shading and vignetting for output non-RAW images.</p>
5056      * <p>When there is no lens shading correction applied to RAW
5057      * output images (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED <code>==</code>
5058      * false), this map is the complete lens shading correction
5059      * map; when there is some lens shading correction applied to
5060      * the RAW output image (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED<code>==</code> true), this map reports the remaining lens shading
5061      * correction map that needs to be applied to get shading
5062      * corrected images that match the camera device's output for
5063      * non-RAW formats.</p>
5064      * <p>For a complete shading correction map, the least shaded
5065      * section of the image will have a gain factor of 1; all
5066      * other sections will have gains above 1.</p>
5067      * <p>When ACAMERA_COLOR_CORRECTION_MODE = TRANSFORM_MATRIX, the map
5068      * will take into account the colorCorrection settings.</p>
5069      * <p>The shading map is for the entire active pixel array, and is not
5070      * affected by the crop region specified in the request. Each shading map
5071      * entry is the value of the shading compensation map over a specific
5072      * pixel on the sensor.  Specifically, with a (N x M) resolution shading
5073      * map, and an active pixel array size (W x H), shading map entry
5074      * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
5075      * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
5076      * The map is assumed to be bilinearly interpolated between the sample points.</p>
5077      * <p>For a Bayer camera, the channel order is [R, Geven, Godd, B], where Geven is
5078      * the green channel for the even rows of a Bayer pattern, and Godd is the odd rows.
5079      * The shading map is stored in a fully interleaved format, and its size
5080      * is provided in the camera static metadata by ACAMERA_LENS_INFO_SHADING_MAP_SIZE.</p>
5081      * <p>The shading map will generally have on the order of 30-40 rows and columns,
5082      * and will be smaller than 64x64.</p>
5083      * <p>As an example, given a very small map for a Bayer camera defined as:</p>
5084      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
5085      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
5086      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
5087      *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
5088      *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
5089      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
5090      *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
5091      *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
5092      * </code></pre>
5093      * <p>The low-resolution scaling map images for each channel are
5094      * (displayed using nearest-neighbor interpolation):</p>
5095      * <p><img alt="Red lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
5096      * <img alt="Green (even rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
5097      * <img alt="Green (odd rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
5098      * <img alt="Blue lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
5099      * <p>As a visualization only, inverting the full-color map to recover an
5100      * image of a gray wall (using bicubic interpolation for visual quality)
5101      * as captured by the sensor gives:</p>
5102      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
5103      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
5104      * shading map for such a camera is defined as:</p>
5105      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
5106      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
5107      * [ 1.3, 1.3, 1.3, 1.3,  1.2, 1.2, 1.2, 1.2,
5108      *     1.1, 1.1, 1.1, 1.1,  1.3, 1.3, 1.3, 1.3,
5109      *   1.2, 1.2, 1.2, 1.2,  1.1, 1.1, 1.1, 1.1,
5110      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.2, 1.2, 1.2,
5111      *   1.3, 1.3, 1.3, 1.3,   1.2, 1.2, 1.2, 1.2,
5112      *     1.2, 1.2, 1.2, 1.2,  1.3, 1.3, 1.3, 1.3 ]
5113      * </code></pre>
5114      * <p>Note that the RAW image data might be subject to lens shading
5115      * correction not reported on this map. Query
5116      * ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED to see if RAW image data has subject
5117      * to lens shading correction. If ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
5118      * is TRUE, the RAW image data is subject to partial or full lens shading
5119      * correction. In the case full lens shading correction is applied to RAW
5120      * images, the gain factor map reported in this key will contain all 1.0 gains.
5121      * In other words, the map reported in this key is the remaining lens shading
5122      * that needs to be applied on the RAW image to get images without lens shading
5123      * artifacts. See android.request.maxNumOutputRaw for a list of RAW image
5124      * formats.</p>
5125      *
5126      * @see ACAMERA_COLOR_CORRECTION_MODE
5127      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
5128      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
5129      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
5130      */
5131     ACAMERA_STATISTICS_LENS_SHADING_MAP =                       // float[4*n*m]
5132             ACAMERA_STATISTICS_START + 11,
5133     /**
5134      * <p>The camera device estimated scene illumination lighting
5135      * frequency.</p>
5136      *
5137      * <p>Type: byte (acamera_metadata_enum_android_statistics_scene_flicker_t)</p>
5138      *
5139      * <p>This tag may appear in:
5140      * <ul>
5141      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5142      * </ul></p>
5143      *
5144      * <p>Many light sources, such as most fluorescent lights, flicker at a rate
5145      * that depends on the local utility power standards. This flicker must be
5146      * accounted for by auto-exposure routines to avoid artifacts in captured images.
5147      * The camera device uses this entry to tell the application what the scene
5148      * illuminant frequency is.</p>
5149      * <p>When manual exposure control is enabled
5150      * (<code>ACAMERA_CONTROL_AE_MODE == OFF</code> or <code>ACAMERA_CONTROL_MODE ==
5151      * OFF</code>), the ACAMERA_CONTROL_AE_ANTIBANDING_MODE doesn't perform
5152      * antibanding, and the application can ensure it selects
5153      * exposure times that do not cause banding issues by looking
5154      * into this metadata field. See
5155      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE for more details.</p>
5156      * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
5157      *
5158      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
5159      * @see ACAMERA_CONTROL_AE_MODE
5160      * @see ACAMERA_CONTROL_MODE
5161      */
5162     ACAMERA_STATISTICS_SCENE_FLICKER =                          // byte (acamera_metadata_enum_android_statistics_scene_flicker_t)
5163             ACAMERA_STATISTICS_START + 14,
5164     /**
5165      * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
5166      *
5167      * <p>Type: int32[2*n]</p>
5168      *
5169      * <p>This tag may appear in:
5170      * <ul>
5171      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5172      * </ul></p>
5173      *
5174      * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
5175      * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
5176      * bottom-right of the pixel array, respectively. The width and
5177      * height dimensions are given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.
5178      * This may include hot pixels that lie outside of the active array
5179      * bounds given by ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5180      *
5181      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5182      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5183      */
5184     ACAMERA_STATISTICS_HOT_PIXEL_MAP =                          // int32[2*n]
5185             ACAMERA_STATISTICS_START + 15,
5186     /**
5187      * <p>Whether the camera device will output the lens
5188      * shading map in output result metadata.</p>
5189      *
5190      * <p>Type: byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)</p>
5191      *
5192      * <p>This tag may appear in:
5193      * <ul>
5194      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5195      *   <li>ACaptureRequest</li>
5196      * </ul></p>
5197      *
5198      * <p>When set to ON,
5199      * ACAMERA_STATISTICS_LENS_SHADING_MAP will be provided in
5200      * the output result metadata.</p>
5201      * <p>ON is always supported on devices with the RAW capability.</p>
5202      *
5203      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
5204      */
5205     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE =                  // byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)
5206             ACAMERA_STATISTICS_START + 16,
5207     /**
5208      * <p>A control for selecting whether optical stabilization (OIS) position
5209      * information is included in output result metadata.</p>
5210      *
5211      * <p>Type: byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)</p>
5212      *
5213      * <p>This tag may appear in:
5214      * <ul>
5215      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5216      *   <li>ACaptureRequest</li>
5217      * </ul></p>
5218      *
5219      * <p>Since optical image stabilization generally involves motion much faster than the duration
5220      * of individualq image exposure, multiple OIS samples can be included for a single capture
5221      * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
5222      * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
5223      * with the rolling shutter skew to account for lens motion during image exposure in
5224      * post-processing algorithms.</p>
5225      */
5226     ACAMERA_STATISTICS_OIS_DATA_MODE =                          // byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)
5227             ACAMERA_STATISTICS_START + 17,
5228     /**
5229      * <p>An array of timestamps of OIS samples, in nanoseconds.</p>
5230      *
5231      * <p>Type: int64[n]</p>
5232      *
5233      * <p>This tag may appear in:
5234      * <ul>
5235      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5236      * </ul></p>
5237      *
5238      * <p>The array contains the timestamps of OIS samples. The timestamps are in the same
5239      * timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.</p>
5240      *
5241      * @see ACAMERA_SENSOR_TIMESTAMP
5242      */
5243     ACAMERA_STATISTICS_OIS_TIMESTAMPS =                         // int64[n]
5244             ACAMERA_STATISTICS_START + 18,
5245     /**
5246      * <p>An array of shifts of OIS samples, in x direction.</p>
5247      *
5248      * <p>Type: float[n]</p>
5249      *
5250      * <p>This tag may appear in:
5251      * <ul>
5252      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5253      * </ul></p>
5254      *
5255      * <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
5256      * A positive value is a shift from left to right in the pre-correction active array
5257      * coordinate system. For example, if the optical center is (1000, 500) in pre-correction
5258      * active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
5259      * <p>The number of shifts must match the number of timestamps in
5260      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
5261      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
5262      * supporting devices). They are always reported in pre-correction active array coordinates,
5263      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
5264      * is needed.</p>
5265      *
5266      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
5267      */
5268     ACAMERA_STATISTICS_OIS_X_SHIFTS =                           // float[n]
5269             ACAMERA_STATISTICS_START + 19,
5270     /**
5271      * <p>An array of shifts of OIS samples, in y direction.</p>
5272      *
5273      * <p>Type: float[n]</p>
5274      *
5275      * <p>This tag may appear in:
5276      * <ul>
5277      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5278      * </ul></p>
5279      *
5280      * <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
5281      * A positive value is a shift from top to bottom in pre-correction active array coordinate
5282      * system. For example, if the optical center is (1000, 500) in active array coordinates, a
5283      * shift of (0, 5) puts the new optical center at (1000, 505).</p>
5284      * <p>The number of shifts must match the number of timestamps in
5285      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
5286      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
5287      * supporting devices). They are always reported in pre-correction active array coordinates,
5288      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
5289      * is needed.</p>
5290      *
5291      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
5292      */
5293     ACAMERA_STATISTICS_OIS_Y_SHIFTS =                           // float[n]
5294             ACAMERA_STATISTICS_START + 20,
5295     ACAMERA_STATISTICS_END,
5296 
5297     /**
5298      * <p>List of face detection modes for ACAMERA_STATISTICS_FACE_DETECT_MODE that are
5299      * supported by this camera device.</p>
5300      *
5301      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5302      *
5303      * <p>Type: byte[n]</p>
5304      *
5305      * <p>This tag may appear in:
5306      * <ul>
5307      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5308      * </ul></p>
5309      *
5310      * <p>OFF is always supported.</p>
5311      */
5312     ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =       // byte[n]
5313             ACAMERA_STATISTICS_INFO_START,
5314     /**
5315      * <p>The maximum number of simultaneously detectable
5316      * faces.</p>
5317      *
5318      * <p>Type: int32</p>
5319      *
5320      * <p>This tag may appear in:
5321      * <ul>
5322      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5323      * </ul></p>
5324      *
5325      */
5326     ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT =                    // int32
5327             ACAMERA_STATISTICS_INFO_START + 2,
5328     /**
5329      * <p>List of hot pixel map output modes for ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE that are
5330      * supported by this camera device.</p>
5331      *
5332      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
5333      *
5334      * <p>Type: byte[n]</p>
5335      *
5336      * <p>This tag may appear in:
5337      * <ul>
5338      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5339      * </ul></p>
5340      *
5341      * <p>If no hotpixel map output is available for this camera device, this will contain only
5342      * <code>false</code>.</p>
5343      * <p>ON is always supported on devices with the RAW capability.</p>
5344      */
5345     ACAMERA_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =     // byte[n]
5346             ACAMERA_STATISTICS_INFO_START + 6,
5347     /**
5348      * <p>List of lens shading map output modes for ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE that
5349      * are supported by this camera device.</p>
5350      *
5351      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
5352      *
5353      * <p>Type: byte[n]</p>
5354      *
5355      * <p>This tag may appear in:
5356      * <ul>
5357      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5358      * </ul></p>
5359      *
5360      * <p>If no lens shading map output is available for this camera device, this key will
5361      * contain only OFF.</p>
5362      * <p>ON is always supported on devices with the RAW capability.
5363      * LEGACY mode devices will always only support OFF.</p>
5364      */
5365     ACAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =  // byte[n]
5366             ACAMERA_STATISTICS_INFO_START + 7,
5367     /**
5368      * <p>List of OIS data output modes for ACAMERA_STATISTICS_OIS_DATA_MODE that
5369      * are supported by this camera device.</p>
5370      *
5371      * @see ACAMERA_STATISTICS_OIS_DATA_MODE
5372      *
5373      * <p>Type: byte[n]</p>
5374      *
5375      * <p>This tag may appear in:
5376      * <ul>
5377      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5378      * </ul></p>
5379      *
5380      * <p>If no OIS data output is available for this camera device, this key will
5381      * contain only OFF.</p>
5382      */
5383     ACAMERA_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =          // byte[n]
5384             ACAMERA_STATISTICS_INFO_START + 8,
5385     ACAMERA_STATISTICS_INFO_END,
5386 
5387     /**
5388      * <p>Tonemapping / contrast / gamma curve for the blue
5389      * channel, to use when ACAMERA_TONEMAP_MODE is
5390      * CONTRAST_CURVE.</p>
5391      *
5392      * @see ACAMERA_TONEMAP_MODE
5393      *
5394      * <p>Type: float[n*2]</p>
5395      *
5396      * <p>This tag may appear in:
5397      * <ul>
5398      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5399      *   <li>ACaptureRequest</li>
5400      * </ul></p>
5401      *
5402      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
5403      *
5404      * @see ACAMERA_TONEMAP_CURVE_RED
5405      */
5406     ACAMERA_TONEMAP_CURVE_BLUE =                                // float[n*2]
5407             ACAMERA_TONEMAP_START,
5408     /**
5409      * <p>Tonemapping / contrast / gamma curve for the green
5410      * channel, to use when ACAMERA_TONEMAP_MODE is
5411      * CONTRAST_CURVE.</p>
5412      *
5413      * @see ACAMERA_TONEMAP_MODE
5414      *
5415      * <p>Type: float[n*2]</p>
5416      *
5417      * <p>This tag may appear in:
5418      * <ul>
5419      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5420      *   <li>ACaptureRequest</li>
5421      * </ul></p>
5422      *
5423      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
5424      *
5425      * @see ACAMERA_TONEMAP_CURVE_RED
5426      */
5427     ACAMERA_TONEMAP_CURVE_GREEN =                               // float[n*2]
5428             ACAMERA_TONEMAP_START + 1,
5429     /**
5430      * <p>Tonemapping / contrast / gamma curve for the red
5431      * channel, to use when ACAMERA_TONEMAP_MODE is
5432      * CONTRAST_CURVE.</p>
5433      *
5434      * @see ACAMERA_TONEMAP_MODE
5435      *
5436      * <p>Type: float[n*2]</p>
5437      *
5438      * <p>This tag may appear in:
5439      * <ul>
5440      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5441      *   <li>ACaptureRequest</li>
5442      * </ul></p>
5443      *
5444      * <p>Each channel's curve is defined by an array of control points:</p>
5445      * <pre><code>ACAMERA_TONEMAP_CURVE_RED =
5446      *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
5447      * 2 &lt;= N &lt;= ACAMERA_TONEMAP_MAX_CURVE_POINTS</code></pre>
5448      * <p>These are sorted in order of increasing <code>Pin</code>; it is
5449      * required that input values 0.0 and 1.0 are included in the list to
5450      * define a complete mapping. For input values between control points,
5451      * the camera device must linearly interpolate between the control
5452      * points.</p>
5453      * <p>Each curve can have an independent number of points, and the number
5454      * of points can be less than max (that is, the request doesn't have to
5455      * always provide a curve with number of points equivalent to
5456      * ACAMERA_TONEMAP_MAX_CURVE_POINTS).</p>
5457      * <p>For devices with MONOCHROME capability, all three channels must have the same set of
5458      * control points.</p>
5459      * <p>A few examples, and their corresponding graphical mappings; these
5460      * only specify the red channel and the precision is limited to 4
5461      * digits, for conciseness.</p>
5462      * <p>Linear mapping:</p>
5463      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 0, 1.0, 1.0 ]
5464      * </code></pre>
5465      * <p><img alt="Linear mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
5466      * <p>Invert mapping:</p>
5467      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 1.0, 1.0, 0 ]
5468      * </code></pre>
5469      * <p><img alt="Inverting mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
5470      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
5471      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
5472      *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
5473      *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
5474      *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
5475      *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
5476      * </code></pre>
5477      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
5478      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
5479      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
5480      *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
5481      *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
5482      *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
5483      *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
5484      * </code></pre>
5485      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
5486      *
5487      * @see ACAMERA_TONEMAP_CURVE_RED
5488      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
5489      */
5490     ACAMERA_TONEMAP_CURVE_RED =                                 // float[n*2]
5491             ACAMERA_TONEMAP_START + 2,
5492     /**
5493      * <p>High-level global contrast/gamma/tonemapping control.</p>
5494      *
5495      * <p>Type: byte (acamera_metadata_enum_android_tonemap_mode_t)</p>
5496      *
5497      * <p>This tag may appear in:
5498      * <ul>
5499      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5500      *   <li>ACaptureRequest</li>
5501      * </ul></p>
5502      *
5503      * <p>When switching to an application-defined contrast curve by setting
5504      * ACAMERA_TONEMAP_MODE to CONTRAST_CURVE, the curve is defined
5505      * per-channel with a set of <code>(in, out)</code> points that specify the
5506      * mapping from input high-bit-depth pixel value to the output
5507      * low-bit-depth value.  Since the actual pixel ranges of both input
5508      * and output may change depending on the camera pipeline, the values
5509      * are specified by normalized floating-point numbers.</p>
5510      * <p>More-complex color mapping operations such as 3D color look-up
5511      * tables, selective chroma enhancement, or other non-linear color
5512      * transforms will be disabled when ACAMERA_TONEMAP_MODE is
5513      * CONTRAST_CURVE.</p>
5514      * <p>When using either FAST or HIGH_QUALITY, the camera device will
5515      * emit its own tonemap curve in android.tonemap.curve.
5516      * These values are always available, and as close as possible to the
5517      * actually used nonlinear/nonglobal transforms.</p>
5518      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
5519      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
5520      * roughly the same.</p>
5521      *
5522      * @see ACAMERA_TONEMAP_MODE
5523      */
5524     ACAMERA_TONEMAP_MODE =                                      // byte (acamera_metadata_enum_android_tonemap_mode_t)
5525             ACAMERA_TONEMAP_START + 3,
5526     /**
5527      * <p>Maximum number of supported points in the
5528      * tonemap curve that can be used for android.tonemap.curve.</p>
5529      *
5530      * <p>Type: int32</p>
5531      *
5532      * <p>This tag may appear in:
5533      * <ul>
5534      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5535      * </ul></p>
5536      *
5537      * <p>If the actual number of points provided by the application (in ACAMERA_TONEMAPCURVE_*) is
5538      * less than this maximum, the camera device will resample the curve to its internal
5539      * representation, using linear interpolation.</p>
5540      * <p>The output curves in the result metadata may have a different number
5541      * of points than the input curves, and will represent the actual
5542      * hardware curves used as closely as possible when linearly interpolated.</p>
5543      */
5544     ACAMERA_TONEMAP_MAX_CURVE_POINTS =                          // int32
5545             ACAMERA_TONEMAP_START + 4,
5546     /**
5547      * <p>List of tonemapping modes for ACAMERA_TONEMAP_MODE that are supported by this camera
5548      * device.</p>
5549      *
5550      * @see ACAMERA_TONEMAP_MODE
5551      *
5552      * <p>Type: byte[n]</p>
5553      *
5554      * <p>This tag may appear in:
5555      * <ul>
5556      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5557      * </ul></p>
5558      *
5559      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
5560      * at least one of below mode combinations:</p>
5561      * <ul>
5562      * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
5563      * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
5564      * </ul>
5565      * <p>This includes all FULL level devices.</p>
5566      */
5567     ACAMERA_TONEMAP_AVAILABLE_TONE_MAP_MODES =                  // byte[n]
5568             ACAMERA_TONEMAP_START + 5,
5569     /**
5570      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
5571      * GAMMA_VALUE</p>
5572      *
5573      * @see ACAMERA_TONEMAP_MODE
5574      *
5575      * <p>Type: float</p>
5576      *
5577      * <p>This tag may appear in:
5578      * <ul>
5579      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5580      *   <li>ACaptureRequest</li>
5581      * </ul></p>
5582      *
5583      * <p>The tonemap curve will be defined the following formula:
5584      * * OUT = pow(IN, 1.0 / gamma)
5585      * where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
5586      * pow is the power function and gamma is the gamma value specified by this
5587      * key.</p>
5588      * <p>The same curve will be applied to all color channels. The camera device
5589      * may clip the input gamma value to its supported range. The actual applied
5590      * value will be returned in capture result.</p>
5591      * <p>The valid range of gamma value varies on different devices, but values
5592      * within [1.0, 5.0] are guaranteed not to be clipped.</p>
5593      */
5594     ACAMERA_TONEMAP_GAMMA =                                     // float
5595             ACAMERA_TONEMAP_START + 6,
5596     /**
5597      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
5598      * PRESET_CURVE</p>
5599      *
5600      * @see ACAMERA_TONEMAP_MODE
5601      *
5602      * <p>Type: byte (acamera_metadata_enum_android_tonemap_preset_curve_t)</p>
5603      *
5604      * <p>This tag may appear in:
5605      * <ul>
5606      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5607      *   <li>ACaptureRequest</li>
5608      * </ul></p>
5609      *
5610      * <p>The tonemap curve will be defined by specified standard.</p>
5611      * <p>sRGB (approximated by 16 control points):</p>
5612      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
5613      * <p>Rec. 709 (approximated by 16 control points):</p>
5614      * <p><img alt="Rec. 709 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
5615      * <p>Note that above figures show a 16 control points approximation of preset
5616      * curves. Camera devices may apply a different approximation to the curve.</p>
5617      */
5618     ACAMERA_TONEMAP_PRESET_CURVE =                              // byte (acamera_metadata_enum_android_tonemap_preset_curve_t)
5619             ACAMERA_TONEMAP_START + 7,
5620     ACAMERA_TONEMAP_END,
5621 
5622     /**
5623      * <p>Generally classifies the overall set of the camera device functionality.</p>
5624      *
5625      * <p>Type: byte (acamera_metadata_enum_android_info_supported_hardware_level_t)</p>
5626      *
5627      * <p>This tag may appear in:
5628      * <ul>
5629      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5630      * </ul></p>
5631      *
5632      * <p>The supported hardware level is a high-level description of the camera device's
5633      * capabilities, summarizing several capabilities into one field.  Each level adds additional
5634      * features to the previous one, and is always a strict superset of the previous level.
5635      * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
5636      * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
5637      * numerical value as well. To check if a given device is at least at a given hardware level,
5638      * the following code snippet can be used:</p>
5639      * <pre><code>// Returns true if the device supports the required hardware level, or better.
5640      * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
5641      *     final int[] sortedHwLevels = {
5642      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
5643      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
5644      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
5645      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
5646      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
5647      *     };
5648      *     int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
5649      *     if (requiredLevel == deviceLevel) {
5650      *         return true;
5651      *     }
5652      *
5653      *     for (int sortedlevel : sortedHwLevels) {
5654      *         if (sortedlevel == requiredLevel) {
5655      *             return true;
5656      *         } else if (sortedlevel == deviceLevel) {
5657      *             return false;
5658      *         }
5659      *     }
5660      *     return false; // Should never reach here
5661      * }
5662      * </code></pre>
5663      * <p>At a high level, the levels are:</p>
5664      * <ul>
5665      * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
5666      *   Android devices, and have very limited capabilities.</li>
5667      * <li><code>LIMITED</code> devices represent the
5668      *   baseline feature set, and may also include additional capabilities that are
5669      *   subsets of <code>FULL</code>.</li>
5670      * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
5671      *   post-processing settings, and image capture at a high rate.</li>
5672      * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
5673      *   with additional output stream configurations.</li>
5674      * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
5675      *   lens information not reported or less stable framerates.</li>
5676      * </ul>
5677      * <p>See the individual level enums for full descriptions of the supported capabilities.  The
5678      * ACAMERA_REQUEST_AVAILABLE_CAPABILITIES entry describes the device's capabilities at a
5679      * finer-grain level, if needed. In addition, many controls have their available settings or
5680      * ranges defined in individual entries from {@link ACameraManager_getCameraCharacteristics }.</p>
5681      * <p>Some features are not part of any particular hardware level or capability and must be
5682      * queried separately. These include:</p>
5683      * <ul>
5684      * <li>Calibrated timestamps (ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME)</li>
5685      * <li>Precision lens control (ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION <code>==</code> CALIBRATED)</li>
5686      * <li>Face detection (ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES)</li>
5687      * <li>Optical or electrical image stabilization
5688      *   (ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
5689      *    ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)</li>
5690      * </ul>
5691      *
5692      * @see ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
5693      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
5694      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
5695      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
5696      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
5697      * @see ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
5698      */
5699     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL =                     // byte (acamera_metadata_enum_android_info_supported_hardware_level_t)
5700             ACAMERA_INFO_START,
5701     /**
5702      * <p>A short string for manufacturer version information about the camera device, such as
5703      * ISP hardware, sensors, etc.</p>
5704      *
5705      * <p>Type: byte</p>
5706      *
5707      * <p>This tag may appear in:
5708      * <ul>
5709      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5710      * </ul></p>
5711      *
5712      * <p>This can be used in <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_IMAGE_DESCRIPTION">TAG_IMAGE_DESCRIPTION</a>
5713      * in jpeg EXIF. This key may be absent if no version information is available on the
5714      * device.</p>
5715      */
5716     ACAMERA_INFO_VERSION =                                      // byte
5717             ACAMERA_INFO_START + 1,
5718     ACAMERA_INFO_END,
5719 
5720     /**
5721      * <p>Whether black-level compensation is locked
5722      * to its current values, or is free to vary.</p>
5723      *
5724      * <p>Type: byte (acamera_metadata_enum_android_black_level_lock_t)</p>
5725      *
5726      * <p>This tag may appear in:
5727      * <ul>
5728      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5729      *   <li>ACaptureRequest</li>
5730      * </ul></p>
5731      *
5732      * <p>Whether the black level offset was locked for this frame.  Should be
5733      * ON if ACAMERA_BLACK_LEVEL_LOCK was ON in the capture request, unless
5734      * a change in other capture settings forced the camera device to
5735      * perform a black level reset.</p>
5736      *
5737      * @see ACAMERA_BLACK_LEVEL_LOCK
5738      */
5739     ACAMERA_BLACK_LEVEL_LOCK =                                  // byte (acamera_metadata_enum_android_black_level_lock_t)
5740             ACAMERA_BLACK_LEVEL_START,
5741     ACAMERA_BLACK_LEVEL_END,
5742 
5743     /**
5744      * <p>The frame number corresponding to the last request
5745      * with which the output result (metadata + buffers) has been fully
5746      * synchronized.</p>
5747      *
5748      * <p>Type: int64 (acamera_metadata_enum_android_sync_frame_number_t)</p>
5749      *
5750      * <p>This tag may appear in:
5751      * <ul>
5752      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5753      * </ul></p>
5754      *
5755      * <p>When a request is submitted to the camera device, there is usually a
5756      * delay of several frames before the controls get applied. A camera
5757      * device may either choose to account for this delay by implementing a
5758      * pipeline and carefully submit well-timed atomic control updates, or
5759      * it may start streaming control changes that span over several frame
5760      * boundaries.</p>
5761      * <p>In the latter case, whenever a request's settings change relative to
5762      * the previous submitted request, the full set of changes may take
5763      * multiple frame durations to fully take effect. Some settings may
5764      * take effect sooner (in less frame durations) than others.</p>
5765      * <p>While a set of control changes are being propagated, this value
5766      * will be CONVERGING.</p>
5767      * <p>Once it is fully known that a set of control changes have been
5768      * finished propagating, and the resulting updated control settings
5769      * have been read back by the camera device, this value will be set
5770      * to a non-negative frame number (corresponding to the request to
5771      * which the results have synchronized to).</p>
5772      * <p>Older camera device implementations may not have a way to detect
5773      * when all camera controls have been applied, and will always set this
5774      * value to UNKNOWN.</p>
5775      * <p>FULL capability devices will always have this value set to the
5776      * frame number of the request corresponding to this result.</p>
5777      * <p><em>Further details</em>:</p>
5778      * <ul>
5779      * <li>Whenever a request differs from the last request, any future
5780      * results not yet returned may have this value set to CONVERGING (this
5781      * could include any in-progress captures not yet returned by the camera
5782      * device, for more details see pipeline considerations below).</li>
5783      * <li>Submitting a series of multiple requests that differ from the
5784      * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
5785      * moves the new synchronization frame to the last non-repeating
5786      * request (using the smallest frame number from the contiguous list of
5787      * repeating requests).</li>
5788      * <li>Submitting the same request repeatedly will not change this value
5789      * to CONVERGING, if it was already a non-negative value.</li>
5790      * <li>When this value changes to non-negative, that means that all of the
5791      * metadata controls from the request have been applied, all of the
5792      * metadata controls from the camera device have been read to the
5793      * updated values (into the result), and all of the graphics buffers
5794      * corresponding to this result are also synchronized to the request.</li>
5795      * </ul>
5796      * <p><em>Pipeline considerations</em>:</p>
5797      * <p>Submitting a request with updated controls relative to the previously
5798      * submitted requests may also invalidate the synchronization state
5799      * of all the results corresponding to currently in-flight requests.</p>
5800      * <p>In other words, results for this current request and up to
5801      * ACAMERA_REQUEST_PIPELINE_MAX_DEPTH prior requests may have their
5802      * ACAMERA_SYNC_FRAME_NUMBER change to CONVERGING.</p>
5803      *
5804      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
5805      * @see ACAMERA_SYNC_FRAME_NUMBER
5806      */
5807     ACAMERA_SYNC_FRAME_NUMBER =                                 // int64 (acamera_metadata_enum_android_sync_frame_number_t)
5808             ACAMERA_SYNC_START,
5809     /**
5810      * <p>The maximum number of frames that can occur after a request
5811      * (different than the previous) has been submitted, and before the
5812      * result's state becomes synchronized.</p>
5813      *
5814      * <p>Type: int32 (acamera_metadata_enum_android_sync_max_latency_t)</p>
5815      *
5816      * <p>This tag may appear in:
5817      * <ul>
5818      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5819      * </ul></p>
5820      *
5821      * <p>This defines the maximum distance (in number of metadata results),
5822      * between the frame number of the request that has new controls to apply
5823      * and the frame number of the result that has all the controls applied.</p>
5824      * <p>In other words this acts as an upper boundary for how many frames
5825      * must occur before the camera device knows for a fact that the new
5826      * submitted camera settings have been applied in outgoing frames.</p>
5827      */
5828     ACAMERA_SYNC_MAX_LATENCY =                                  // int32 (acamera_metadata_enum_android_sync_max_latency_t)
5829             ACAMERA_SYNC_START + 1,
5830     ACAMERA_SYNC_END,
5831 
5832     /**
5833      * <p>The available depth dataspace stream
5834      * configurations that this camera device supports
5835      * (i.e. format, width, height, output/input stream).</p>
5836      *
5837      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)</p>
5838      *
5839      * <p>This tag may appear in:
5840      * <ul>
5841      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5842      * </ul></p>
5843      *
5844      * <p>These are output stream configurations for use with
5845      * dataSpace HAL_DATASPACE_DEPTH. The configurations are
5846      * listed as <code>(format, width, height, input?)</code> tuples.</p>
5847      * <p>Only devices that support depth output for at least
5848      * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
5849      * this entry.</p>
5850      * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
5851      * sparse depth point cloud must report a single entry for
5852      * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
5853      * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
5854      * the entries for HAL_PIXEL_FORMAT_Y16.</p>
5855      */
5856     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =       // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)
5857             ACAMERA_DEPTH_START + 1,
5858     /**
5859      * <p>This lists the minimum frame duration for each
5860      * format/size combination for depth output formats.</p>
5861      *
5862      * <p>Type: int64[4*n]</p>
5863      *
5864      * <p>This tag may appear in:
5865      * <ul>
5866      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5867      * </ul></p>
5868      *
5869      * <p>This should correspond to the frame duration when only that
5870      * stream is active, with all processing (typically in android.*.mode)
5871      * set to either OFF or FAST.</p>
5872      * <p>When multiple streams are used in a request, the minimum frame
5873      * duration will be max(individual stream min durations).</p>
5874      * <p>The minimum frame duration of a stream (of a particular format, size)
5875      * is the same regardless of whether the stream is input or output.</p>
5876      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
5877      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
5878      * calculating the max frame rate.</p>
5879      *
5880      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
5881      * @see ACAMERA_SENSOR_FRAME_DURATION
5882      */
5883     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =         // int64[4*n]
5884             ACAMERA_DEPTH_START + 2,
5885     /**
5886      * <p>This lists the maximum stall duration for each
5887      * output format/size combination for depth streams.</p>
5888      *
5889      * <p>Type: int64[4*n]</p>
5890      *
5891      * <p>This tag may appear in:
5892      * <ul>
5893      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5894      * </ul></p>
5895      *
5896      * <p>A stall duration is how much extra time would get added
5897      * to the normal minimum frame duration for a repeating request
5898      * that has streams with non-zero stall.</p>
5899      * <p>This functions similarly to
5900      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for depth
5901      * streams.</p>
5902      * <p>All depth output stream formats may have a nonzero stall
5903      * duration.</p>
5904      *
5905      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
5906      */
5907     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =             // int64[4*n]
5908             ACAMERA_DEPTH_START + 3,
5909     /**
5910      * <p>Indicates whether a capture request may target both a
5911      * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
5912      * YUV_420_888, JPEG, or RAW) simultaneously.</p>
5913      *
5914      * <p>Type: byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)</p>
5915      *
5916      * <p>This tag may appear in:
5917      * <ul>
5918      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5919      * </ul></p>
5920      *
5921      * <p>If TRUE, including both depth and color outputs in a single
5922      * capture request is not supported. An application must interleave color
5923      * and depth requests.  If FALSE, a single request can target both types
5924      * of output.</p>
5925      * <p>Typically, this restriction exists on camera devices that
5926      * need to emit a specific pattern or wavelength of light to
5927      * measure depth values, which causes the color image to be
5928      * corrupted during depth measurement.</p>
5929      */
5930     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE =                          // byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)
5931             ACAMERA_DEPTH_START + 4,
5932     /**
5933      * <p>Recommended depth stream configurations for common client use cases.</p>
5934      *
5935      * <p>Type: int32[n*5]</p>
5936      *
5937      * <p>This tag may appear in:
5938      * <ul>
5939      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5940      * </ul></p>
5941      *
5942      * <p>Optional subset of the ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS that
5943      * contains similar tuples listed as
5944      * (i.e. width, height, format, output/input stream, usecase bit field).
5945      * Camera devices will be able to suggest particular depth stream configurations which are
5946      * power and performance efficient for specific use cases. For more information about
5947      * retrieving the suggestions see
5948      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
5949      * <p>For data representation please refer to
5950      * ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS</p>
5951      *
5952      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
5953      * @see ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
5954      */
5955     ACAMERA_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
5956                                                                 // int32[n*5]
5957             ACAMERA_DEPTH_START + 5,
5958     /**
5959      * <p>The available dynamic depth dataspace stream
5960      * configurations that this camera device supports
5961      * (i.e. format, width, height, output/input stream).</p>
5962      *
5963      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)</p>
5964      *
5965      * <p>This tag may appear in:
5966      * <ul>
5967      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5968      * </ul></p>
5969      *
5970      * <p>These are output stream configurations for use with
5971      * dataSpace DYNAMIC_DEPTH. The configurations are
5972      * listed as <code>(format, width, height, input?)</code> tuples.</p>
5973      * <p>Only devices that support depth output for at least
5974      * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
5975      * HAL_PIXEL_FORMAT_BLOB with the same size or size with
5976      * the same aspect ratio can have dynamic depth dataspace
5977      * stream configuration. ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE also
5978      * needs to be set to FALSE.</p>
5979      *
5980      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
5981      */
5982     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
5983                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)
5984             ACAMERA_DEPTH_START + 6,
5985     /**
5986      * <p>This lists the minimum frame duration for each
5987      * format/size combination for dynamic depth output streams.</p>
5988      *
5989      * <p>Type: int64[4*n]</p>
5990      *
5991      * <p>This tag may appear in:
5992      * <ul>
5993      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5994      * </ul></p>
5995      *
5996      * <p>This should correspond to the frame duration when only that
5997      * stream is active, with all processing (typically in android.*.mode)
5998      * set to either OFF or FAST.</p>
5999      * <p>When multiple streams are used in a request, the minimum frame
6000      * duration will be max(individual stream min durations).</p>
6001      * <p>The minimum frame duration of a stream (of a particular format, size)
6002      * is the same regardless of whether the stream is input or output.</p>
6003      */
6004     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = // int64[4*n]
6005             ACAMERA_DEPTH_START + 7,
6006     /**
6007      * <p>This lists the maximum stall duration for each
6008      * output format/size combination for dynamic depth streams.</p>
6009      *
6010      * <p>Type: int64[4*n]</p>
6011      *
6012      * <p>This tag may appear in:
6013      * <ul>
6014      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6015      * </ul></p>
6016      *
6017      * <p>A stall duration is how much extra time would get added
6018      * to the normal minimum frame duration for a repeating request
6019      * that has streams with non-zero stall.</p>
6020      * <p>All dynamic depth output streams may have a nonzero stall
6021      * duration.</p>
6022      */
6023     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =     // int64[4*n]
6024             ACAMERA_DEPTH_START + 8,
6025     ACAMERA_DEPTH_END,
6026 
6027     /**
6028      * <p>String containing the ids of the underlying physical cameras.</p>
6029      *
6030      * <p>Type: byte[n]</p>
6031      *
6032      * <p>This tag may appear in:
6033      * <ul>
6034      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6035      * </ul></p>
6036      *
6037      * <p>For a logical camera, this is concatenation of all underlying physical camera IDs.
6038      * The null terminator for physical camera ID must be preserved so that the whole string
6039      * can be tokenized using '\0' to generate list of physical camera IDs.</p>
6040      * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
6041      * value of this tag will be ['2', '\0', '3', '\0'].</p>
6042      * <p>The number of physical camera IDs must be no less than 2.</p>
6043      */
6044     ACAMERA_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =                 // byte[n]
6045             ACAMERA_LOGICAL_MULTI_CAMERA_START,
6046     /**
6047      * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
6048      *
6049      * <p>Type: byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)</p>
6050      *
6051      * <p>This tag may appear in:
6052      * <ul>
6053      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6054      * </ul></p>
6055      *
6056      * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
6057      * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the
6058      * physical camera sensors usually run in leader/follower mode where one sensor generates a
6059      * timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE
6060      * sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors
6061      * use their own timing generator, and there could be offset between their start of exposure.</p>
6062      * <p>In both cases, all images generated for a particular capture request still carry the same
6063      * timestamps, so that they can be used to look up the matching frame number and
6064      * onCaptureStarted callback.</p>
6065      * <p>This tag is only applicable if the logical camera device supports concurrent physical
6066      * streams from different physical cameras.</p>
6067      */
6068     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =             // byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)
6069             ACAMERA_LOGICAL_MULTI_CAMERA_START + 1,
6070     /**
6071      * <p>String containing the ID of the underlying active physical camera.</p>
6072      *
6073      * <p>Type: byte</p>
6074      *
6075      * <p>This tag may appear in:
6076      * <ul>
6077      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6078      * </ul></p>
6079      *
6080      * <p>The ID of the active physical camera that's backing the logical camera. All camera
6081      * streams and metadata that are not physical camera specific will be originating from this
6082      * physical camera.</p>
6083      * <p>For a logical camera made up of physical cameras where each camera's lenses have
6084      * different characteristics, the camera device may choose to switch between the physical
6085      * cameras when application changes FOCAL_LENGTH or SCALER_CROP_REGION.
6086      * At the time of lens switch, this result metadata reflects the new active physical camera
6087      * ID.</p>
6088      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.
6089      * When available, this must be one of valid physical IDs backing this logical multi-camera.
6090      * If this key is not available for a logical multi-camera, the camera device implementation
6091      * may still switch between different active physical cameras based on use case, but the
6092      * current active physical camera information won't be available to the application.</p>
6093      */
6094     ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID =           // byte
6095             ACAMERA_LOGICAL_MULTI_CAMERA_START + 2,
6096     ACAMERA_LOGICAL_MULTI_CAMERA_END,
6097 
6098     /**
6099      * <p>Mode of operation for the lens distortion correction block.</p>
6100      *
6101      * <p>Type: byte (acamera_metadata_enum_android_distortion_correction_mode_t)</p>
6102      *
6103      * <p>This tag may appear in:
6104      * <ul>
6105      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6106      *   <li>ACaptureRequest</li>
6107      * </ul></p>
6108      *
6109      * <p>The lens distortion correction block attempts to improve image quality by fixing
6110      * radial, tangential, or other geometric aberrations in the camera device's optics.  If
6111      * available, the ACAMERA_LENS_DISTORTION field documents the lens's distortion parameters.</p>
6112      * <p>OFF means no distortion correction is done.</p>
6113      * <p>FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
6114      * applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
6115      * correction algorithms, even if it slows down capture rate. FAST means the camera device
6116      * will not slow down capture rate when applying correction. FAST may be the same as OFF if
6117      * any correction at all would slow down capture rate.  Every output stream will have a
6118      * similar amount of enhancement applied.</p>
6119      * <p>The correction only applies to processed outputs such as YUV, Y8, JPEG, or DEPTH16; it is
6120      * not applied to any RAW output.</p>
6121      * <p>This control will be on by default on devices that support this control. Applications
6122      * disabling distortion correction need to pay extra attention with the coordinate system of
6123      * metering regions, crop region, and face rectangles. When distortion correction is OFF,
6124      * metadata coordinates follow the coordinate system of
6125      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. When distortion is not OFF, metadata
6126      * coordinates follow the coordinate system of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.  The
6127      * camera device will map these metadata fields to match the corrected image produced by the
6128      * camera device, for both capture requests and results.  However, this mapping is not very
6129      * precise, since rectangles do not generally map to rectangles when corrected.  Only linear
6130      * scaling between the active array and precorrection active array coordinates is
6131      * performed. Applications that require precise correction of metadata need to undo that
6132      * linear scaling, and apply a more complete correction that takes into the account the app's
6133      * own requirements.</p>
6134      * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
6135      * <ul>
6136      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
6137      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
6138      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
6139      * <li>ACAMERA_SCALER_CROP_REGION</li>
6140      * <li>android.statistics.faces</li>
6141      * </ul>
6142      *
6143      * @see ACAMERA_CONTROL_AE_REGIONS
6144      * @see ACAMERA_CONTROL_AF_REGIONS
6145      * @see ACAMERA_CONTROL_AWB_REGIONS
6146      * @see ACAMERA_LENS_DISTORTION
6147      * @see ACAMERA_SCALER_CROP_REGION
6148      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
6149      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
6150      */
6151     ACAMERA_DISTORTION_CORRECTION_MODE =                        // byte (acamera_metadata_enum_android_distortion_correction_mode_t)
6152             ACAMERA_DISTORTION_CORRECTION_START,
6153     /**
6154      * <p>List of distortion correction modes for ACAMERA_DISTORTION_CORRECTION_MODE that are
6155      * supported by this camera device.</p>
6156      *
6157      * @see ACAMERA_DISTORTION_CORRECTION_MODE
6158      *
6159      * <p>Type: byte[n]</p>
6160      *
6161      * <p>This tag may appear in:
6162      * <ul>
6163      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6164      * </ul></p>
6165      *
6166      * <p>No device is required to support this API; such devices will always list only 'OFF'.
6167      * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
6168      */
6169     ACAMERA_DISTORTION_CORRECTION_AVAILABLE_MODES =             // byte[n]
6170             ACAMERA_DISTORTION_CORRECTION_START + 1,
6171     ACAMERA_DISTORTION_CORRECTION_END,
6172 
6173     /**
6174      * <p>The available HEIC (ISO/IEC 23008-12) stream
6175      * configurations that this camera device supports
6176      * (i.e. format, width, height, output/input stream).</p>
6177      *
6178      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)</p>
6179      *
6180      * <p>This tag may appear in:
6181      * <ul>
6182      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6183      * </ul></p>
6184      *
6185      * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
6186      * <p>If the camera device supports HEIC image format, it will support identical set of stream
6187      * combinations involving HEIC image format, compared to the combinations involving JPEG
6188      * image format as required by the device's hardware level and capabilities.</p>
6189      * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
6190      * Configuring JPEG and HEIC streams at the same time is not supported.</p>
6191      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
6192      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
6193      */
6194     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =         // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)
6195             ACAMERA_HEIC_START,
6196     /**
6197      * <p>This lists the minimum frame duration for each
6198      * format/size combination for HEIC output formats.</p>
6199      *
6200      * <p>Type: int64[4*n]</p>
6201      *
6202      * <p>This tag may appear in:
6203      * <ul>
6204      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6205      * </ul></p>
6206      *
6207      * <p>This should correspond to the frame duration when only that
6208      * stream is active, with all processing (typically in android.*.mode)
6209      * set to either OFF or FAST.</p>
6210      * <p>When multiple streams are used in a request, the minimum frame
6211      * duration will be max(individual stream min durations).</p>
6212      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
6213      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
6214      * calculating the max frame rate.</p>
6215      *
6216      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6217      * @see ACAMERA_SENSOR_FRAME_DURATION
6218      */
6219     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =           // int64[4*n]
6220             ACAMERA_HEIC_START + 1,
6221     /**
6222      * <p>This lists the maximum stall duration for each
6223      * output format/size combination for HEIC streams.</p>
6224      *
6225      * <p>Type: int64[4*n]</p>
6226      *
6227      * <p>This tag may appear in:
6228      * <ul>
6229      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6230      * </ul></p>
6231      *
6232      * <p>A stall duration is how much extra time would get added
6233      * to the normal minimum frame duration for a repeating request
6234      * that has streams with non-zero stall.</p>
6235      * <p>This functions similarly to
6236      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for HEIC
6237      * streams.</p>
6238      * <p>All HEIC output stream formats may have a nonzero stall
6239      * duration.</p>
6240      *
6241      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6242      */
6243     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS =               // int64[4*n]
6244             ACAMERA_HEIC_START + 2,
6245     ACAMERA_HEIC_END,
6246 
6247 } acamera_metadata_tag_t;
6248 
6249 /**
6250  * Enumeration definitions for the various entries that need them
6251  */
6252 
6253 // ACAMERA_COLOR_CORRECTION_MODE
6254 typedef enum acamera_metadata_enum_acamera_color_correction_mode {
6255     /**
6256      * <p>Use the ACAMERA_COLOR_CORRECTION_TRANSFORM matrix
6257      * and ACAMERA_COLOR_CORRECTION_GAINS to do color conversion.</p>
6258      * <p>All advanced white balance adjustments (not specified
6259      * by our white balance pipeline) must be disabled.</p>
6260      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
6261      * TRANSFORM_MATRIX is ignored. The camera device will override
6262      * this value to either FAST or HIGH_QUALITY.</p>
6263      *
6264      * @see ACAMERA_COLOR_CORRECTION_GAINS
6265      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6266      * @see ACAMERA_CONTROL_AWB_MODE
6267      */
6268     ACAMERA_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX                   = 0,
6269 
6270     /**
6271      * <p>Color correction processing must not slow down
6272      * capture rate relative to sensor raw output.</p>
6273      * <p>Advanced white balance adjustments above and beyond
6274      * the specified white balance pipeline may be applied.</p>
6275      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
6276      * the camera device uses the last frame's AWB values
6277      * (or defaults if AWB has never been run).</p>
6278      *
6279      * @see ACAMERA_CONTROL_AWB_MODE
6280      */
6281     ACAMERA_COLOR_CORRECTION_MODE_FAST                               = 1,
6282 
6283     /**
6284      * <p>Color correction processing operates at improved
6285      * quality but the capture rate might be reduced (relative to sensor
6286      * raw output rate)</p>
6287      * <p>Advanced white balance adjustments above and beyond
6288      * the specified white balance pipeline may be applied.</p>
6289      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
6290      * the camera device uses the last frame's AWB values
6291      * (or defaults if AWB has never been run).</p>
6292      *
6293      * @see ACAMERA_CONTROL_AWB_MODE
6294      */
6295     ACAMERA_COLOR_CORRECTION_MODE_HIGH_QUALITY                       = 2,
6296 
6297 } acamera_metadata_enum_android_color_correction_mode_t;
6298 
6299 // ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
6300 typedef enum acamera_metadata_enum_acamera_color_correction_aberration_mode {
6301     /**
6302      * <p>No aberration correction is applied.</p>
6303      */
6304     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_OFF                     = 0,
6305 
6306     /**
6307      * <p>Aberration correction will not slow down capture rate
6308      * relative to sensor raw output.</p>
6309      */
6310     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_FAST                    = 1,
6311 
6312     /**
6313      * <p>Aberration correction operates at improved quality but the capture rate might be
6314      * reduced (relative to sensor raw output rate)</p>
6315      */
6316     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY            = 2,
6317 
6318 } acamera_metadata_enum_android_color_correction_aberration_mode_t;
6319 
6320 
6321 // ACAMERA_CONTROL_AE_ANTIBANDING_MODE
6322 typedef enum acamera_metadata_enum_acamera_control_ae_antibanding_mode {
6323     /**
6324      * <p>The camera device will not adjust exposure duration to
6325      * avoid banding problems.</p>
6326      */
6327     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_OFF                          = 0,
6328 
6329     /**
6330      * <p>The camera device will adjust exposure duration to
6331      * avoid banding problems with 50Hz illumination sources.</p>
6332      */
6333     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_50HZ                         = 1,
6334 
6335     /**
6336      * <p>The camera device will adjust exposure duration to
6337      * avoid banding problems with 60Hz illumination
6338      * sources.</p>
6339      */
6340     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_60HZ                         = 2,
6341 
6342     /**
6343      * <p>The camera device will automatically adapt its
6344      * antibanding routine to the current illumination
6345      * condition. This is the default mode if AUTO is
6346      * available on given camera device.</p>
6347      */
6348     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_AUTO                         = 3,
6349 
6350 } acamera_metadata_enum_android_control_ae_antibanding_mode_t;
6351 
6352 // ACAMERA_CONTROL_AE_LOCK
6353 typedef enum acamera_metadata_enum_acamera_control_ae_lock {
6354     /**
6355      * <p>Auto-exposure lock is disabled; the AE algorithm
6356      * is free to update its parameters.</p>
6357      */
6358     ACAMERA_CONTROL_AE_LOCK_OFF                                      = 0,
6359 
6360     /**
6361      * <p>Auto-exposure lock is enabled; the AE algorithm
6362      * must not update the exposure and sensitivity parameters
6363      * while the lock is active.</p>
6364      * <p>ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION setting changes
6365      * will still take effect while auto-exposure is locked.</p>
6366      * <p>Some rare LEGACY devices may not support
6367      * this, in which case the value will always be overridden to OFF.</p>
6368      *
6369      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
6370      */
6371     ACAMERA_CONTROL_AE_LOCK_ON                                       = 1,
6372 
6373 } acamera_metadata_enum_android_control_ae_lock_t;
6374 
6375 // ACAMERA_CONTROL_AE_MODE
6376 typedef enum acamera_metadata_enum_acamera_control_ae_mode {
6377     /**
6378      * <p>The camera device's autoexposure routine is disabled.</p>
6379      * <p>The application-selected ACAMERA_SENSOR_EXPOSURE_TIME,
6380      * ACAMERA_SENSOR_SENSITIVITY and
6381      * ACAMERA_SENSOR_FRAME_DURATION are used by the camera
6382      * device, along with ACAMERA_FLASH_* fields, if there's
6383      * a flash unit for this camera device.</p>
6384      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
6385      * behavior is device dependent when AE is in OFF mode.
6386      * To have consistent behavior across different devices,
6387      * it is recommended to either set AWB and AF to OFF mode
6388      * or lock AWB and AF before setting AE to OFF.
6389      * See ACAMERA_CONTROL_AWB_MODE, ACAMERA_CONTROL_AF_MODE,
6390      * ACAMERA_CONTROL_AWB_LOCK, and ACAMERA_CONTROL_AF_TRIGGER
6391      * for more details.</p>
6392      * <p>LEGACY devices do not support the OFF mode and will
6393      * override attempts to use this value to ON.</p>
6394      *
6395      * @see ACAMERA_CONTROL_AF_MODE
6396      * @see ACAMERA_CONTROL_AF_TRIGGER
6397      * @see ACAMERA_CONTROL_AWB_LOCK
6398      * @see ACAMERA_CONTROL_AWB_MODE
6399      * @see ACAMERA_SENSOR_EXPOSURE_TIME
6400      * @see ACAMERA_SENSOR_FRAME_DURATION
6401      * @see ACAMERA_SENSOR_SENSITIVITY
6402      */
6403     ACAMERA_CONTROL_AE_MODE_OFF                                      = 0,
6404 
6405     /**
6406      * <p>The camera device's autoexposure routine is active,
6407      * with no flash control.</p>
6408      * <p>The application's values for
6409      * ACAMERA_SENSOR_EXPOSURE_TIME,
6410      * ACAMERA_SENSOR_SENSITIVITY, and
6411      * ACAMERA_SENSOR_FRAME_DURATION are ignored. The
6412      * application has control over the various
6413      * ACAMERA_FLASH_* fields.</p>
6414      *
6415      * @see ACAMERA_SENSOR_EXPOSURE_TIME
6416      * @see ACAMERA_SENSOR_FRAME_DURATION
6417      * @see ACAMERA_SENSOR_SENSITIVITY
6418      */
6419     ACAMERA_CONTROL_AE_MODE_ON                                       = 1,
6420 
6421     /**
6422      * <p>Like ON, except that the camera device also controls
6423      * the camera's flash unit, firing it in low-light
6424      * conditions.</p>
6425      * <p>The flash may be fired during a precapture sequence
6426      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
6427      * may be fired for captures for which the
6428      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
6429      * STILL_CAPTURE</p>
6430      *
6431      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
6432      * @see ACAMERA_CONTROL_CAPTURE_INTENT
6433      */
6434     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH                            = 2,
6435 
6436     /**
6437      * <p>Like ON, except that the camera device also controls
6438      * the camera's flash unit, always firing it for still
6439      * captures.</p>
6440      * <p>The flash may be fired during a precapture sequence
6441      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
6442      * will always be fired for captures for which the
6443      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
6444      * STILL_CAPTURE</p>
6445      *
6446      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
6447      * @see ACAMERA_CONTROL_CAPTURE_INTENT
6448      */
6449     ACAMERA_CONTROL_AE_MODE_ON_ALWAYS_FLASH                          = 3,
6450 
6451     /**
6452      * <p>Like ON_AUTO_FLASH, but with automatic red eye
6453      * reduction.</p>
6454      * <p>If deemed necessary by the camera device, a red eye
6455      * reduction flash will fire during the precapture
6456      * sequence.</p>
6457      */
6458     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE                     = 4,
6459 
6460     /**
6461      * <p>An external flash has been turned on.</p>
6462      * <p>It informs the camera device that an external flash has been turned on, and that
6463      * metering (and continuous focus if active) should be quickly recaculated to account
6464      * for the external flash. Otherwise, this mode acts like ON.</p>
6465      * <p>When the external flash is turned off, AE mode should be changed to one of the
6466      * other available AE modes.</p>
6467      * <p>If the camera device supports AE external flash mode, ACAMERA_CONTROL_AE_STATE must
6468      * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
6469      * flash.</p>
6470      *
6471      * @see ACAMERA_CONTROL_AE_STATE
6472      */
6473     ACAMERA_CONTROL_AE_MODE_ON_EXTERNAL_FLASH                        = 5,
6474 
6475 } acamera_metadata_enum_android_control_ae_mode_t;
6476 
6477 // ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
6478 typedef enum acamera_metadata_enum_acamera_control_ae_precapture_trigger {
6479     /**
6480      * <p>The trigger is idle.</p>
6481      */
6482     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE                       = 0,
6483 
6484     /**
6485      * <p>The precapture metering sequence will be started
6486      * by the camera device.</p>
6487      * <p>The exact effect of the precapture trigger depends on
6488      * the current AE mode and state.</p>
6489      */
6490     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_START                      = 1,
6491 
6492     /**
6493      * <p>The camera device will cancel any currently active or completed
6494      * precapture metering sequence, the auto-exposure routine will return to its
6495      * initial state.</p>
6496      */
6497     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL                     = 2,
6498 
6499 } acamera_metadata_enum_android_control_ae_precapture_trigger_t;
6500 
6501 // ACAMERA_CONTROL_AF_MODE
6502 typedef enum acamera_metadata_enum_acamera_control_af_mode {
6503     /**
6504      * <p>The auto-focus routine does not control the lens;
6505      * ACAMERA_LENS_FOCUS_DISTANCE is controlled by the
6506      * application.</p>
6507      *
6508      * @see ACAMERA_LENS_FOCUS_DISTANCE
6509      */
6510     ACAMERA_CONTROL_AF_MODE_OFF                                      = 0,
6511 
6512     /**
6513      * <p>Basic automatic focus mode.</p>
6514      * <p>In this mode, the lens does not move unless
6515      * the autofocus trigger action is called. When that trigger
6516      * is activated, AF will transition to ACTIVE_SCAN, then to
6517      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
6518      * <p>Always supported if lens is not fixed focus.</p>
6519      * <p>Use ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE to determine if lens
6520      * is fixed-focus.</p>
6521      * <p>Triggering AF_CANCEL resets the lens position to default,
6522      * and sets the AF state to INACTIVE.</p>
6523      *
6524      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
6525      */
6526     ACAMERA_CONTROL_AF_MODE_AUTO                                     = 1,
6527 
6528     /**
6529      * <p>Close-up focusing mode.</p>
6530      * <p>In this mode, the lens does not move unless the
6531      * autofocus trigger action is called. When that trigger is
6532      * activated, AF will transition to ACTIVE_SCAN, then to
6533      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
6534      * mode is optimized for focusing on objects very close to
6535      * the camera.</p>
6536      * <p>When that trigger is activated, AF will transition to
6537      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
6538      * NOT_FOCUSED). Triggering cancel AF resets the lens
6539      * position to default, and sets the AF state to
6540      * INACTIVE.</p>
6541      */
6542     ACAMERA_CONTROL_AF_MODE_MACRO                                    = 2,
6543 
6544     /**
6545      * <p>In this mode, the AF algorithm modifies the lens
6546      * position continually to attempt to provide a
6547      * constantly-in-focus image stream.</p>
6548      * <p>The focusing behavior should be suitable for good quality
6549      * video recording; typically this means slower focus
6550      * movement and no overshoots. When the AF trigger is not
6551      * involved, the AF algorithm should start in INACTIVE state,
6552      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
6553      * states as appropriate. When the AF trigger is activated,
6554      * the algorithm should immediately transition into
6555      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
6556      * lens position until a cancel AF trigger is received.</p>
6557      * <p>Once cancel is received, the algorithm should transition
6558      * back to INACTIVE and resume passive scan. Note that this
6559      * behavior is not identical to CONTINUOUS_PICTURE, since an
6560      * ongoing PASSIVE_SCAN must immediately be
6561      * canceled.</p>
6562      */
6563     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_VIDEO                         = 3,
6564 
6565     /**
6566      * <p>In this mode, the AF algorithm modifies the lens
6567      * position continually to attempt to provide a
6568      * constantly-in-focus image stream.</p>
6569      * <p>The focusing behavior should be suitable for still image
6570      * capture; typically this means focusing as fast as
6571      * possible. When the AF trigger is not involved, the AF
6572      * algorithm should start in INACTIVE state, and then
6573      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
6574      * appropriate as it attempts to maintain focus. When the AF
6575      * trigger is activated, the algorithm should finish its
6576      * PASSIVE_SCAN if active, and then transition into
6577      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
6578      * lens position until a cancel AF trigger is received.</p>
6579      * <p>When the AF cancel trigger is activated, the algorithm
6580      * should transition back to INACTIVE and then act as if it
6581      * has just been started.</p>
6582      */
6583     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_PICTURE                       = 4,
6584 
6585     /**
6586      * <p>Extended depth of field (digital focus) mode.</p>
6587      * <p>The camera device will produce images with an extended
6588      * depth of field automatically; no special focusing
6589      * operations need to be done before taking a picture.</p>
6590      * <p>AF triggers are ignored, and the AF state will always be
6591      * INACTIVE.</p>
6592      */
6593     ACAMERA_CONTROL_AF_MODE_EDOF                                     = 5,
6594 
6595 } acamera_metadata_enum_android_control_af_mode_t;
6596 
6597 // ACAMERA_CONTROL_AF_TRIGGER
6598 typedef enum acamera_metadata_enum_acamera_control_af_trigger {
6599     /**
6600      * <p>The trigger is idle.</p>
6601      */
6602     ACAMERA_CONTROL_AF_TRIGGER_IDLE                                  = 0,
6603 
6604     /**
6605      * <p>Autofocus will trigger now.</p>
6606      */
6607     ACAMERA_CONTROL_AF_TRIGGER_START                                 = 1,
6608 
6609     /**
6610      * <p>Autofocus will return to its initial
6611      * state, and cancel any currently active trigger.</p>
6612      */
6613     ACAMERA_CONTROL_AF_TRIGGER_CANCEL                                = 2,
6614 
6615 } acamera_metadata_enum_android_control_af_trigger_t;
6616 
6617 // ACAMERA_CONTROL_AWB_LOCK
6618 typedef enum acamera_metadata_enum_acamera_control_awb_lock {
6619     /**
6620      * <p>Auto-white balance lock is disabled; the AWB
6621      * algorithm is free to update its parameters if in AUTO
6622      * mode.</p>
6623      */
6624     ACAMERA_CONTROL_AWB_LOCK_OFF                                     = 0,
6625 
6626     /**
6627      * <p>Auto-white balance lock is enabled; the AWB
6628      * algorithm will not update its parameters while the lock
6629      * is active.</p>
6630      */
6631     ACAMERA_CONTROL_AWB_LOCK_ON                                      = 1,
6632 
6633 } acamera_metadata_enum_android_control_awb_lock_t;
6634 
6635 // ACAMERA_CONTROL_AWB_MODE
6636 typedef enum acamera_metadata_enum_acamera_control_awb_mode {
6637     /**
6638      * <p>The camera device's auto-white balance routine is disabled.</p>
6639      * <p>The application-selected color transform matrix
6640      * (ACAMERA_COLOR_CORRECTION_TRANSFORM) and gains
6641      * (ACAMERA_COLOR_CORRECTION_GAINS) are used by the camera
6642      * device for manual white balance control.</p>
6643      *
6644      * @see ACAMERA_COLOR_CORRECTION_GAINS
6645      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6646      */
6647     ACAMERA_CONTROL_AWB_MODE_OFF                                     = 0,
6648 
6649     /**
6650      * <p>The camera device's auto-white balance routine is active.</p>
6651      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6652      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6653      * For devices that support the MANUAL_POST_PROCESSING capability, the
6654      * values used by the camera device for the transform and gains
6655      * will be available in the capture result for this request.</p>
6656      *
6657      * @see ACAMERA_COLOR_CORRECTION_GAINS
6658      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6659      */
6660     ACAMERA_CONTROL_AWB_MODE_AUTO                                    = 1,
6661 
6662     /**
6663      * <p>The camera device's auto-white balance routine is disabled;
6664      * the camera device uses incandescent light as the assumed scene
6665      * illumination for white balance.</p>
6666      * <p>While the exact white balance transforms are up to the
6667      * camera device, they will approximately match the CIE
6668      * standard illuminant A.</p>
6669      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6670      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6671      * For devices that support the MANUAL_POST_PROCESSING capability, the
6672      * values used by the camera device for the transform and gains
6673      * will be available in the capture result for this request.</p>
6674      *
6675      * @see ACAMERA_COLOR_CORRECTION_GAINS
6676      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6677      */
6678     ACAMERA_CONTROL_AWB_MODE_INCANDESCENT                            = 2,
6679 
6680     /**
6681      * <p>The camera device's auto-white balance routine is disabled;
6682      * the camera device uses fluorescent light as the assumed scene
6683      * illumination for white balance.</p>
6684      * <p>While the exact white balance transforms are up to the
6685      * camera device, they will approximately match the CIE
6686      * standard illuminant F2.</p>
6687      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6688      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6689      * For devices that support the MANUAL_POST_PROCESSING capability, the
6690      * values used by the camera device for the transform and gains
6691      * will be available in the capture result for this request.</p>
6692      *
6693      * @see ACAMERA_COLOR_CORRECTION_GAINS
6694      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6695      */
6696     ACAMERA_CONTROL_AWB_MODE_FLUORESCENT                             = 3,
6697 
6698     /**
6699      * <p>The camera device's auto-white balance routine is disabled;
6700      * the camera device uses warm fluorescent light as the assumed scene
6701      * illumination for white balance.</p>
6702      * <p>While the exact white balance transforms are up to the
6703      * camera device, they will approximately match the CIE
6704      * standard illuminant F4.</p>
6705      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6706      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6707      * For devices that support the MANUAL_POST_PROCESSING capability, the
6708      * values used by the camera device for the transform and gains
6709      * will be available in the capture result for this request.</p>
6710      *
6711      * @see ACAMERA_COLOR_CORRECTION_GAINS
6712      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6713      */
6714     ACAMERA_CONTROL_AWB_MODE_WARM_FLUORESCENT                        = 4,
6715 
6716     /**
6717      * <p>The camera device's auto-white balance routine is disabled;
6718      * the camera device uses daylight light as the assumed scene
6719      * illumination for white balance.</p>
6720      * <p>While the exact white balance transforms are up to the
6721      * camera device, they will approximately match the CIE
6722      * standard illuminant D65.</p>
6723      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6724      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6725      * For devices that support the MANUAL_POST_PROCESSING capability, the
6726      * values used by the camera device for the transform and gains
6727      * will be available in the capture result for this request.</p>
6728      *
6729      * @see ACAMERA_COLOR_CORRECTION_GAINS
6730      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6731      */
6732     ACAMERA_CONTROL_AWB_MODE_DAYLIGHT                                = 5,
6733 
6734     /**
6735      * <p>The camera device's auto-white balance routine is disabled;
6736      * the camera device uses cloudy daylight light as the assumed scene
6737      * illumination for white balance.</p>
6738      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6739      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6740      * For devices that support the MANUAL_POST_PROCESSING capability, the
6741      * values used by the camera device for the transform and gains
6742      * will be available in the capture result for this request.</p>
6743      *
6744      * @see ACAMERA_COLOR_CORRECTION_GAINS
6745      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6746      */
6747     ACAMERA_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT                         = 6,
6748 
6749     /**
6750      * <p>The camera device's auto-white balance routine is disabled;
6751      * the camera device uses twilight light as the assumed scene
6752      * illumination for white balance.</p>
6753      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6754      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6755      * For devices that support the MANUAL_POST_PROCESSING capability, the
6756      * values used by the camera device for the transform and gains
6757      * will be available in the capture result for this request.</p>
6758      *
6759      * @see ACAMERA_COLOR_CORRECTION_GAINS
6760      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6761      */
6762     ACAMERA_CONTROL_AWB_MODE_TWILIGHT                                = 7,
6763 
6764     /**
6765      * <p>The camera device's auto-white balance routine is disabled;
6766      * the camera device uses shade light as the assumed scene
6767      * illumination for white balance.</p>
6768      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
6769      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
6770      * For devices that support the MANUAL_POST_PROCESSING capability, the
6771      * values used by the camera device for the transform and gains
6772      * will be available in the capture result for this request.</p>
6773      *
6774      * @see ACAMERA_COLOR_CORRECTION_GAINS
6775      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
6776      */
6777     ACAMERA_CONTROL_AWB_MODE_SHADE                                   = 8,
6778 
6779 } acamera_metadata_enum_android_control_awb_mode_t;
6780 
6781 // ACAMERA_CONTROL_CAPTURE_INTENT
6782 typedef enum acamera_metadata_enum_acamera_control_capture_intent {
6783     /**
6784      * <p>The goal of this request doesn't fall into the other
6785      * categories. The camera device will default to preview-like
6786      * behavior.</p>
6787      */
6788     ACAMERA_CONTROL_CAPTURE_INTENT_CUSTOM                            = 0,
6789 
6790     /**
6791      * <p>This request is for a preview-like use case.</p>
6792      * <p>The precapture trigger may be used to start off a metering
6793      * w/flash sequence.</p>
6794      */
6795     ACAMERA_CONTROL_CAPTURE_INTENT_PREVIEW                           = 1,
6796 
6797     /**
6798      * <p>This request is for a still capture-type
6799      * use case.</p>
6800      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
6801      */
6802     ACAMERA_CONTROL_CAPTURE_INTENT_STILL_CAPTURE                     = 2,
6803 
6804     /**
6805      * <p>This request is for a video recording
6806      * use case.</p>
6807      */
6808     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_RECORD                      = 3,
6809 
6810     /**
6811      * <p>This request is for a video snapshot (still
6812      * image while recording video) use case.</p>
6813      * <p>The camera device should take the highest-quality image
6814      * possible (given the other settings) without disrupting the
6815      * frame rate of video recording.  </p>
6816      */
6817     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT                    = 4,
6818 
6819     /**
6820      * <p>This request is for a ZSL usecase; the
6821      * application will stream full-resolution images and
6822      * reprocess one or several later for a final
6823      * capture.</p>
6824      */
6825     ACAMERA_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG                  = 5,
6826 
6827     /**
6828      * <p>This request is for manual capture use case where
6829      * the applications want to directly control the capture parameters.</p>
6830      * <p>For example, the application may wish to manually control
6831      * ACAMERA_SENSOR_EXPOSURE_TIME, ACAMERA_SENSOR_SENSITIVITY, etc.</p>
6832      *
6833      * @see ACAMERA_SENSOR_EXPOSURE_TIME
6834      * @see ACAMERA_SENSOR_SENSITIVITY
6835      */
6836     ACAMERA_CONTROL_CAPTURE_INTENT_MANUAL                            = 6,
6837 
6838     /**
6839      * <p>This request is for a motion tracking use case, where
6840      * the application will use camera and inertial sensor data to
6841      * locate and track objects in the world.</p>
6842      * <p>The camera device auto-exposure routine will limit the exposure time
6843      * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
6844      */
6845     ACAMERA_CONTROL_CAPTURE_INTENT_MOTION_TRACKING                   = 7,
6846 
6847 } acamera_metadata_enum_android_control_capture_intent_t;
6848 
6849 // ACAMERA_CONTROL_EFFECT_MODE
6850 typedef enum acamera_metadata_enum_acamera_control_effect_mode {
6851     /**
6852      * <p>No color effect will be applied.</p>
6853      */
6854     ACAMERA_CONTROL_EFFECT_MODE_OFF                                  = 0,
6855 
6856     /**
6857      * <p>A "monocolor" effect where the image is mapped into
6858      * a single color.</p>
6859      * <p>This will typically be grayscale.</p>
6860      */
6861     ACAMERA_CONTROL_EFFECT_MODE_MONO                                 = 1,
6862 
6863     /**
6864      * <p>A "photo-negative" effect where the image's colors
6865      * are inverted.</p>
6866      */
6867     ACAMERA_CONTROL_EFFECT_MODE_NEGATIVE                             = 2,
6868 
6869     /**
6870      * <p>A "solarisation" effect (Sabattier effect) where the
6871      * image is wholly or partially reversed in
6872      * tone.</p>
6873      */
6874     ACAMERA_CONTROL_EFFECT_MODE_SOLARIZE                             = 3,
6875 
6876     /**
6877      * <p>A "sepia" effect where the image is mapped into warm
6878      * gray, red, and brown tones.</p>
6879      */
6880     ACAMERA_CONTROL_EFFECT_MODE_SEPIA                                = 4,
6881 
6882     /**
6883      * <p>A "posterization" effect where the image uses
6884      * discrete regions of tone rather than a continuous
6885      * gradient of tones.</p>
6886      */
6887     ACAMERA_CONTROL_EFFECT_MODE_POSTERIZE                            = 5,
6888 
6889     /**
6890      * <p>A "whiteboard" effect where the image is typically displayed
6891      * as regions of white, with black or grey details.</p>
6892      */
6893     ACAMERA_CONTROL_EFFECT_MODE_WHITEBOARD                           = 6,
6894 
6895     /**
6896      * <p>A "blackboard" effect where the image is typically displayed
6897      * as regions of black, with white or grey details.</p>
6898      */
6899     ACAMERA_CONTROL_EFFECT_MODE_BLACKBOARD                           = 7,
6900 
6901     /**
6902      * <p>An "aqua" effect where a blue hue is added to the image.</p>
6903      */
6904     ACAMERA_CONTROL_EFFECT_MODE_AQUA                                 = 8,
6905 
6906 } acamera_metadata_enum_android_control_effect_mode_t;
6907 
6908 // ACAMERA_CONTROL_MODE
6909 typedef enum acamera_metadata_enum_acamera_control_mode {
6910     /**
6911      * <p>Full application control of pipeline.</p>
6912      * <p>All control by the device's metering and focusing (3A)
6913      * routines is disabled, and no other settings in
6914      * ACAMERA_CONTROL_* have any effect, except that
6915      * ACAMERA_CONTROL_CAPTURE_INTENT may be used by the camera
6916      * device to select post-processing values for processing
6917      * blocks that do not allow for manual control, or are not
6918      * exposed by the camera API.</p>
6919      * <p>However, the camera device's 3A routines may continue to
6920      * collect statistics and update their internal state so that
6921      * when control is switched to AUTO mode, good control values
6922      * can be immediately applied.</p>
6923      *
6924      * @see ACAMERA_CONTROL_CAPTURE_INTENT
6925      */
6926     ACAMERA_CONTROL_MODE_OFF                                         = 0,
6927 
6928     /**
6929      * <p>Use settings for each individual 3A routine.</p>
6930      * <p>Manual control of capture parameters is disabled. All
6931      * controls in ACAMERA_CONTROL_* besides sceneMode take
6932      * effect.</p>
6933      */
6934     ACAMERA_CONTROL_MODE_AUTO                                        = 1,
6935 
6936     /**
6937      * <p>Use a specific scene mode.</p>
6938      * <p>Enabling this disables control.aeMode, control.awbMode and
6939      * control.afMode controls; the camera device will ignore
6940      * those settings while USE_SCENE_MODE is active (except for
6941      * FACE_PRIORITY scene mode). Other control entries are still active.
6942      * This setting can only be used if scene mode is supported (i.e.
6943      * ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
6944      * contain some modes other than DISABLED).</p>
6945      * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p>
6946      *
6947      * @see ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
6948      */
6949     ACAMERA_CONTROL_MODE_USE_SCENE_MODE                              = 2,
6950 
6951     /**
6952      * <p>Same as OFF mode, except that this capture will not be
6953      * used by camera device background auto-exposure, auto-white balance and
6954      * auto-focus algorithms (3A) to update their statistics.</p>
6955      * <p>Specifically, the 3A routines are locked to the last
6956      * values set from a request with AUTO, OFF, or
6957      * USE_SCENE_MODE, and any statistics or state updates
6958      * collected from manual captures with OFF_KEEP_STATE will be
6959      * discarded by the camera device.</p>
6960      */
6961     ACAMERA_CONTROL_MODE_OFF_KEEP_STATE                              = 3,
6962 
6963     /**
6964      * <p>Use a specific extended scene mode.</p>
6965      * <p>When extended scene mode is on, the camera device may override certain control
6966      * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
6967      * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
6968      * are guaranteed.</p>
6969      * <p>This setting can only be used if extended scene mode is supported (i.e.
6970      * android.control.availableExtendedSceneModes
6971      * contains some modes other than DISABLED).</p>
6972      */
6973     ACAMERA_CONTROL_MODE_USE_EXTENDED_SCENE_MODE                     = 4,
6974 
6975 } acamera_metadata_enum_android_control_mode_t;
6976 
6977 // ACAMERA_CONTROL_SCENE_MODE
6978 typedef enum acamera_metadata_enum_acamera_control_scene_mode {
6979     /**
6980      * <p>Indicates that no scene modes are set for a given capture request.</p>
6981      */
6982     ACAMERA_CONTROL_SCENE_MODE_DISABLED                              = 0,
6983 
6984     /**
6985      * <p>If face detection support exists, use face
6986      * detection data for auto-focus, auto-white balance, and
6987      * auto-exposure routines.</p>
6988      * <p>If face detection statistics are disabled
6989      * (i.e. ACAMERA_STATISTICS_FACE_DETECT_MODE is set to OFF),
6990      * this should still operate correctly (but will not return
6991      * face detection statistics to the framework).</p>
6992      * <p>Unlike the other scene modes, ACAMERA_CONTROL_AE_MODE,
6993      * ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
6994      * remain active when FACE_PRIORITY is set.</p>
6995      *
6996      * @see ACAMERA_CONTROL_AE_MODE
6997      * @see ACAMERA_CONTROL_AF_MODE
6998      * @see ACAMERA_CONTROL_AWB_MODE
6999      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
7000      */
7001     ACAMERA_CONTROL_SCENE_MODE_FACE_PRIORITY                         = 1,
7002 
7003     /**
7004      * <p>Optimized for photos of quickly moving objects.</p>
7005      * <p>Similar to SPORTS.</p>
7006      */
7007     ACAMERA_CONTROL_SCENE_MODE_ACTION                                = 2,
7008 
7009     /**
7010      * <p>Optimized for still photos of people.</p>
7011      */
7012     ACAMERA_CONTROL_SCENE_MODE_PORTRAIT                              = 3,
7013 
7014     /**
7015      * <p>Optimized for photos of distant macroscopic objects.</p>
7016      */
7017     ACAMERA_CONTROL_SCENE_MODE_LANDSCAPE                             = 4,
7018 
7019     /**
7020      * <p>Optimized for low-light settings.</p>
7021      */
7022     ACAMERA_CONTROL_SCENE_MODE_NIGHT                                 = 5,
7023 
7024     /**
7025      * <p>Optimized for still photos of people in low-light
7026      * settings.</p>
7027      */
7028     ACAMERA_CONTROL_SCENE_MODE_NIGHT_PORTRAIT                        = 6,
7029 
7030     /**
7031      * <p>Optimized for dim, indoor settings where flash must
7032      * remain off.</p>
7033      */
7034     ACAMERA_CONTROL_SCENE_MODE_THEATRE                               = 7,
7035 
7036     /**
7037      * <p>Optimized for bright, outdoor beach settings.</p>
7038      */
7039     ACAMERA_CONTROL_SCENE_MODE_BEACH                                 = 8,
7040 
7041     /**
7042      * <p>Optimized for bright, outdoor settings containing snow.</p>
7043      */
7044     ACAMERA_CONTROL_SCENE_MODE_SNOW                                  = 9,
7045 
7046     /**
7047      * <p>Optimized for scenes of the setting sun.</p>
7048      */
7049     ACAMERA_CONTROL_SCENE_MODE_SUNSET                                = 10,
7050 
7051     /**
7052      * <p>Optimized to avoid blurry photos due to small amounts of
7053      * device motion (for example: due to hand shake).</p>
7054      */
7055     ACAMERA_CONTROL_SCENE_MODE_STEADYPHOTO                           = 11,
7056 
7057     /**
7058      * <p>Optimized for nighttime photos of fireworks.</p>
7059      */
7060     ACAMERA_CONTROL_SCENE_MODE_FIREWORKS                             = 12,
7061 
7062     /**
7063      * <p>Optimized for photos of quickly moving people.</p>
7064      * <p>Similar to ACTION.</p>
7065      */
7066     ACAMERA_CONTROL_SCENE_MODE_SPORTS                                = 13,
7067 
7068     /**
7069      * <p>Optimized for dim, indoor settings with multiple moving
7070      * people.</p>
7071      */
7072     ACAMERA_CONTROL_SCENE_MODE_PARTY                                 = 14,
7073 
7074     /**
7075      * <p>Optimized for dim settings where the main light source
7076      * is a candle.</p>
7077      */
7078     ACAMERA_CONTROL_SCENE_MODE_CANDLELIGHT                           = 15,
7079 
7080     /**
7081      * <p>Optimized for accurately capturing a photo of barcode
7082      * for use by camera applications that wish to read the
7083      * barcode value.</p>
7084      */
7085     ACAMERA_CONTROL_SCENE_MODE_BARCODE                               = 16,
7086 
7087     /**
7088      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
7089      * <p>In this scene mode, the camera device captures images
7090      * that keep a larger range of scene illumination levels
7091      * visible in the final image. For example, when taking a
7092      * picture of a object in front of a bright window, both
7093      * the object and the scene through the window may be
7094      * visible when using HDR mode, while in normal AUTO mode,
7095      * one or the other may be poorly exposed. As a tradeoff,
7096      * HDR mode generally takes much longer to capture a single
7097      * image, has no user control, and may have other artifacts
7098      * depending on the HDR method used.</p>
7099      * <p>Therefore, HDR captures operate at a much slower rate
7100      * than regular captures.</p>
7101      * <p>In this mode, on LIMITED or FULL devices, when a request
7102      * is made with a ACAMERA_CONTROL_CAPTURE_INTENT of
7103      * STILL_CAPTURE, the camera device will capture an image
7104      * using a high dynamic range capture technique.  On LEGACY
7105      * devices, captures that target a JPEG-format output will
7106      * be captured with HDR, and the capture intent is not
7107      * relevant.</p>
7108      * <p>The HDR capture may involve the device capturing a burst
7109      * of images internally and combining them into one, or it
7110      * may involve the device using specialized high dynamic
7111      * range capture hardware. In all cases, a single image is
7112      * produced in response to a capture request submitted
7113      * while in HDR mode.</p>
7114      * <p>Since substantial post-processing is generally needed to
7115      * produce an HDR image, only YUV, PRIVATE, and JPEG
7116      * outputs are supported for LIMITED/FULL device HDR
7117      * captures, and only JPEG outputs are supported for LEGACY
7118      * HDR captures. Using a RAW output for HDR capture is not
7119      * supported.</p>
7120      * <p>Some devices may also support always-on HDR, which
7121      * applies HDR processing at full frame rate.  For these
7122      * devices, intents other than STILL_CAPTURE will also
7123      * produce an HDR output with no frame rate impact compared
7124      * to normal operation, though the quality may be lower
7125      * than for STILL_CAPTURE intents.</p>
7126      * <p>If SCENE_MODE_HDR is used with unsupported output types
7127      * or capture intents, the images captured will be as if
7128      * the SCENE_MODE was not enabled at all.</p>
7129      *
7130      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7131      */
7132     ACAMERA_CONTROL_SCENE_MODE_HDR                                   = 18,
7133 
7134 } acamera_metadata_enum_android_control_scene_mode_t;
7135 
7136 // ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
7137 typedef enum acamera_metadata_enum_acamera_control_video_stabilization_mode {
7138     /**
7139      * <p>Video stabilization is disabled.</p>
7140      */
7141     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_OFF                     = 0,
7142 
7143     /**
7144      * <p>Video stabilization is enabled.</p>
7145      */
7146     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_ON                      = 1,
7147 
7148 } acamera_metadata_enum_android_control_video_stabilization_mode_t;
7149 
7150 // ACAMERA_CONTROL_AE_STATE
7151 typedef enum acamera_metadata_enum_acamera_control_ae_state {
7152     /**
7153      * <p>AE is off or recently reset.</p>
7154      * <p>When a camera device is opened, it starts in
7155      * this state. This is a transient state, the camera device may skip reporting
7156      * this state in capture result.</p>
7157      */
7158     ACAMERA_CONTROL_AE_STATE_INACTIVE                                = 0,
7159 
7160     /**
7161      * <p>AE doesn't yet have a good set of control values
7162      * for the current scene.</p>
7163      * <p>This is a transient state, the camera device may skip
7164      * reporting this state in capture result.</p>
7165      */
7166     ACAMERA_CONTROL_AE_STATE_SEARCHING                               = 1,
7167 
7168     /**
7169      * <p>AE has a good set of control values for the
7170      * current scene.</p>
7171      */
7172     ACAMERA_CONTROL_AE_STATE_CONVERGED                               = 2,
7173 
7174     /**
7175      * <p>AE has been locked.</p>
7176      */
7177     ACAMERA_CONTROL_AE_STATE_LOCKED                                  = 3,
7178 
7179     /**
7180      * <p>AE has a good set of control values, but flash
7181      * needs to be fired for good quality still
7182      * capture.</p>
7183      */
7184     ACAMERA_CONTROL_AE_STATE_FLASH_REQUIRED                          = 4,
7185 
7186     /**
7187      * <p>AE has been asked to do a precapture sequence
7188      * and is currently executing it.</p>
7189      * <p>Precapture can be triggered through setting
7190      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to START. Currently
7191      * active and completed (if it causes camera device internal AE lock) precapture
7192      * metering sequence can be canceled through setting
7193      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to CANCEL.</p>
7194      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
7195      * or FLASH_REQUIRED as appropriate. This is a transient
7196      * state, the camera device may skip reporting this state in
7197      * capture result.</p>
7198      *
7199      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7200      */
7201     ACAMERA_CONTROL_AE_STATE_PRECAPTURE                              = 5,
7202 
7203 } acamera_metadata_enum_android_control_ae_state_t;
7204 
7205 // ACAMERA_CONTROL_AF_STATE
7206 typedef enum acamera_metadata_enum_acamera_control_af_state {
7207     /**
7208      * <p>AF is off or has not yet tried to scan/been asked
7209      * to scan.</p>
7210      * <p>When a camera device is opened, it starts in this
7211      * state. This is a transient state, the camera device may
7212      * skip reporting this state in capture
7213      * result.</p>
7214      */
7215     ACAMERA_CONTROL_AF_STATE_INACTIVE                                = 0,
7216 
7217     /**
7218      * <p>AF is currently performing an AF scan initiated the
7219      * camera device in a continuous autofocus mode.</p>
7220      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
7221      * state, the camera device may skip reporting this state in
7222      * capture result.</p>
7223      */
7224     ACAMERA_CONTROL_AF_STATE_PASSIVE_SCAN                            = 1,
7225 
7226     /**
7227      * <p>AF currently believes it is in focus, but may
7228      * restart scanning at any time.</p>
7229      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
7230      * state, the camera device may skip reporting this state in
7231      * capture result.</p>
7232      */
7233     ACAMERA_CONTROL_AF_STATE_PASSIVE_FOCUSED                         = 2,
7234 
7235     /**
7236      * <p>AF is performing an AF scan because it was
7237      * triggered by AF trigger.</p>
7238      * <p>Only used by AUTO or MACRO AF modes. This is a transient
7239      * state, the camera device may skip reporting this state in
7240      * capture result.</p>
7241      */
7242     ACAMERA_CONTROL_AF_STATE_ACTIVE_SCAN                             = 3,
7243 
7244     /**
7245      * <p>AF believes it is focused correctly and has locked
7246      * focus.</p>
7247      * <p>This state is reached only after an explicit START AF trigger has been
7248      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus has been obtained.</p>
7249      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
7250      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
7251      *
7252      * @see ACAMERA_CONTROL_AF_MODE
7253      * @see ACAMERA_CONTROL_AF_TRIGGER
7254      */
7255     ACAMERA_CONTROL_AF_STATE_FOCUSED_LOCKED                          = 4,
7256 
7257     /**
7258      * <p>AF has failed to focus successfully and has locked
7259      * focus.</p>
7260      * <p>This state is reached only after an explicit START AF trigger has been
7261      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus cannot be obtained.</p>
7262      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
7263      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
7264      *
7265      * @see ACAMERA_CONTROL_AF_MODE
7266      * @see ACAMERA_CONTROL_AF_TRIGGER
7267      */
7268     ACAMERA_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED                      = 5,
7269 
7270     /**
7271      * <p>AF finished a passive scan without finding focus,
7272      * and may restart scanning at any time.</p>
7273      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
7274      * device may skip reporting this state in capture result.</p>
7275      * <p>LEGACY camera devices do not support this state. When a passive
7276      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
7277      */
7278     ACAMERA_CONTROL_AF_STATE_PASSIVE_UNFOCUSED                       = 6,
7279 
7280 } acamera_metadata_enum_android_control_af_state_t;
7281 
7282 // ACAMERA_CONTROL_AWB_STATE
7283 typedef enum acamera_metadata_enum_acamera_control_awb_state {
7284     /**
7285      * <p>AWB is not in auto mode, or has not yet started metering.</p>
7286      * <p>When a camera device is opened, it starts in this
7287      * state. This is a transient state, the camera device may
7288      * skip reporting this state in capture
7289      * result.</p>
7290      */
7291     ACAMERA_CONTROL_AWB_STATE_INACTIVE                               = 0,
7292 
7293     /**
7294      * <p>AWB doesn't yet have a good set of control
7295      * values for the current scene.</p>
7296      * <p>This is a transient state, the camera device
7297      * may skip reporting this state in capture result.</p>
7298      */
7299     ACAMERA_CONTROL_AWB_STATE_SEARCHING                              = 1,
7300 
7301     /**
7302      * <p>AWB has a good set of control values for the
7303      * current scene.</p>
7304      */
7305     ACAMERA_CONTROL_AWB_STATE_CONVERGED                              = 2,
7306 
7307     /**
7308      * <p>AWB has been locked.</p>
7309      */
7310     ACAMERA_CONTROL_AWB_STATE_LOCKED                                 = 3,
7311 
7312 } acamera_metadata_enum_android_control_awb_state_t;
7313 
7314 // ACAMERA_CONTROL_AE_LOCK_AVAILABLE
7315 typedef enum acamera_metadata_enum_acamera_control_ae_lock_available {
7316     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_FALSE                          = 0,
7317 
7318     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_TRUE                           = 1,
7319 
7320 } acamera_metadata_enum_android_control_ae_lock_available_t;
7321 
7322 // ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
7323 typedef enum acamera_metadata_enum_acamera_control_awb_lock_available {
7324     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_FALSE                         = 0,
7325 
7326     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_TRUE                          = 1,
7327 
7328 } acamera_metadata_enum_android_control_awb_lock_available_t;
7329 
7330 // ACAMERA_CONTROL_ENABLE_ZSL
7331 typedef enum acamera_metadata_enum_acamera_control_enable_zsl {
7332     /**
7333      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE must be captured
7334      * after previous requests.</p>
7335      *
7336      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7337      */
7338     ACAMERA_CONTROL_ENABLE_ZSL_FALSE                                 = 0,
7339 
7340     /**
7341      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may or may not be
7342      * captured before previous requests.</p>
7343      *
7344      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7345      */
7346     ACAMERA_CONTROL_ENABLE_ZSL_TRUE                                  = 1,
7347 
7348 } acamera_metadata_enum_android_control_enable_zsl_t;
7349 
7350 // ACAMERA_CONTROL_AF_SCENE_CHANGE
7351 typedef enum acamera_metadata_enum_acamera_control_af_scene_change {
7352     /**
7353      * <p>Scene change is not detected within the AF region(s).</p>
7354      */
7355     ACAMERA_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED                     = 0,
7356 
7357     /**
7358      * <p>Scene change is detected within the AF region(s).</p>
7359      */
7360     ACAMERA_CONTROL_AF_SCENE_CHANGE_DETECTED                         = 1,
7361 
7362 } acamera_metadata_enum_android_control_af_scene_change_t;
7363 
7364 // ACAMERA_CONTROL_EXTENDED_SCENE_MODE
7365 typedef enum acamera_metadata_enum_acamera_control_extended_scene_mode {
7366     /**
7367      * <p>Extended scene mode is disabled.</p>
7368      */
7369     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_DISABLED                     = 0,
7370 
7371     /**
7372      * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
7373      * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
7374      * extra image processing, this mode may introduce additional stall to non-raw streams.
7375      * This mode should be used in high quality still capture use case.</p>
7376      */
7377     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE          = 1,
7378 
7379     /**
7380      * <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
7381      * and the effect is applied to all processed streams no larger than the maximum
7382      * streaming dimension. This mode should be used if performance and power are a
7383      * priority, such as video recording.</p>
7384      */
7385     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS             = 2,
7386 
7387 } acamera_metadata_enum_android_control_extended_scene_mode_t;
7388 
7389 
7390 
7391 // ACAMERA_EDGE_MODE
7392 typedef enum acamera_metadata_enum_acamera_edge_mode {
7393     /**
7394      * <p>No edge enhancement is applied.</p>
7395      */
7396     ACAMERA_EDGE_MODE_OFF                                            = 0,
7397 
7398     /**
7399      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
7400      * relative to sensor output. It may be the same as OFF if edge enhancement will
7401      * slow down frame rate relative to sensor.</p>
7402      */
7403     ACAMERA_EDGE_MODE_FAST                                           = 1,
7404 
7405     /**
7406      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
7407      */
7408     ACAMERA_EDGE_MODE_HIGH_QUALITY                                   = 2,
7409 
7410     /**
7411      * <p>Edge enhancement is applied at different
7412      * levels for different output streams, based on resolution. Streams at maximum recording
7413      * resolution (see {@link ACameraDevice_createCaptureSession })
7414      * or below have edge enhancement applied, while higher-resolution streams have no edge
7415      * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
7416      * so that frame rate is not impacted, and the quality is equal to or better than FAST
7417      * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
7418      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
7419      * with YUV or PRIVATE reprocessing, where the application continuously captures
7420      * high-resolution intermediate buffers into a circular buffer, from which a final image is
7421      * produced via reprocessing when a user takes a picture.  For such a use case, the
7422      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
7423      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
7424      * buffers (used for recording or preview, generally) need edge enhancement applied for
7425      * reasonable preview quality.</p>
7426      * <p>This mode is guaranteed to be supported by devices that support either the
7427      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
7428      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
7429      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
7430      *
7431      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
7432      */
7433     ACAMERA_EDGE_MODE_ZERO_SHUTTER_LAG                               = 3,
7434 
7435 } acamera_metadata_enum_android_edge_mode_t;
7436 
7437 
7438 // ACAMERA_FLASH_MODE
7439 typedef enum acamera_metadata_enum_acamera_flash_mode {
7440     /**
7441      * <p>Do not fire the flash for this capture.</p>
7442      */
7443     ACAMERA_FLASH_MODE_OFF                                           = 0,
7444 
7445     /**
7446      * <p>If the flash is available and charged, fire flash
7447      * for this capture.</p>
7448      */
7449     ACAMERA_FLASH_MODE_SINGLE                                        = 1,
7450 
7451     /**
7452      * <p>Transition flash to continuously on.</p>
7453      */
7454     ACAMERA_FLASH_MODE_TORCH                                         = 2,
7455 
7456 } acamera_metadata_enum_android_flash_mode_t;
7457 
7458 // ACAMERA_FLASH_STATE
7459 typedef enum acamera_metadata_enum_acamera_flash_state {
7460     /**
7461      * <p>No flash on camera.</p>
7462      */
7463     ACAMERA_FLASH_STATE_UNAVAILABLE                                  = 0,
7464 
7465     /**
7466      * <p>Flash is charging and cannot be fired.</p>
7467      */
7468     ACAMERA_FLASH_STATE_CHARGING                                     = 1,
7469 
7470     /**
7471      * <p>Flash is ready to fire.</p>
7472      */
7473     ACAMERA_FLASH_STATE_READY                                        = 2,
7474 
7475     /**
7476      * <p>Flash fired for this capture.</p>
7477      */
7478     ACAMERA_FLASH_STATE_FIRED                                        = 3,
7479 
7480     /**
7481      * <p>Flash partially illuminated this frame.</p>
7482      * <p>This is usually due to the next or previous frame having
7483      * the flash fire, and the flash spilling into this capture
7484      * due to hardware limitations.</p>
7485      */
7486     ACAMERA_FLASH_STATE_PARTIAL                                      = 4,
7487 
7488 } acamera_metadata_enum_android_flash_state_t;
7489 
7490 
7491 // ACAMERA_FLASH_INFO_AVAILABLE
7492 typedef enum acamera_metadata_enum_acamera_flash_info_available {
7493     ACAMERA_FLASH_INFO_AVAILABLE_FALSE                               = 0,
7494 
7495     ACAMERA_FLASH_INFO_AVAILABLE_TRUE                                = 1,
7496 
7497 } acamera_metadata_enum_android_flash_info_available_t;
7498 
7499 
7500 // ACAMERA_HOT_PIXEL_MODE
7501 typedef enum acamera_metadata_enum_acamera_hot_pixel_mode {
7502     /**
7503      * <p>No hot pixel correction is applied.</p>
7504      * <p>The frame rate must not be reduced relative to sensor raw output
7505      * for this option.</p>
7506      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
7507      *
7508      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
7509      */
7510     ACAMERA_HOT_PIXEL_MODE_OFF                                       = 0,
7511 
7512     /**
7513      * <p>Hot pixel correction is applied, without reducing frame
7514      * rate relative to sensor raw output.</p>
7515      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
7516      *
7517      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
7518      */
7519     ACAMERA_HOT_PIXEL_MODE_FAST                                      = 1,
7520 
7521     /**
7522      * <p>High-quality hot pixel correction is applied, at a cost
7523      * of possibly reduced frame rate relative to sensor raw output.</p>
7524      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
7525      *
7526      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
7527      */
7528     ACAMERA_HOT_PIXEL_MODE_HIGH_QUALITY                              = 2,
7529 
7530 } acamera_metadata_enum_android_hot_pixel_mode_t;
7531 
7532 
7533 
7534 // ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
7535 typedef enum acamera_metadata_enum_acamera_lens_optical_stabilization_mode {
7536     /**
7537      * <p>Optical stabilization is unavailable.</p>
7538      */
7539     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_OFF                      = 0,
7540 
7541     /**
7542      * <p>Optical stabilization is enabled.</p>
7543      */
7544     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_ON                       = 1,
7545 
7546 } acamera_metadata_enum_android_lens_optical_stabilization_mode_t;
7547 
7548 // ACAMERA_LENS_FACING
7549 typedef enum acamera_metadata_enum_acamera_lens_facing {
7550     /**
7551      * <p>The camera device faces the same direction as the device's screen.</p>
7552      */
7553     ACAMERA_LENS_FACING_FRONT                                        = 0,
7554 
7555     /**
7556      * <p>The camera device faces the opposite direction as the device's screen.</p>
7557      */
7558     ACAMERA_LENS_FACING_BACK                                         = 1,
7559 
7560     /**
7561      * <p>The camera device is an external camera, and has no fixed facing relative to the
7562      * device's screen.</p>
7563      */
7564     ACAMERA_LENS_FACING_EXTERNAL                                     = 2,
7565 
7566 } acamera_metadata_enum_android_lens_facing_t;
7567 
7568 // ACAMERA_LENS_STATE
7569 typedef enum acamera_metadata_enum_acamera_lens_state {
7570     /**
7571      * <p>The lens parameters (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
7572      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE) are not changing.</p>
7573      *
7574      * @see ACAMERA_LENS_APERTURE
7575      * @see ACAMERA_LENS_FILTER_DENSITY
7576      * @see ACAMERA_LENS_FOCAL_LENGTH
7577      * @see ACAMERA_LENS_FOCUS_DISTANCE
7578      */
7579     ACAMERA_LENS_STATE_STATIONARY                                    = 0,
7580 
7581     /**
7582      * <p>One or several of the lens parameters
7583      * (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
7584      * ACAMERA_LENS_FILTER_DENSITY or ACAMERA_LENS_APERTURE) is
7585      * currently changing.</p>
7586      *
7587      * @see ACAMERA_LENS_APERTURE
7588      * @see ACAMERA_LENS_FILTER_DENSITY
7589      * @see ACAMERA_LENS_FOCAL_LENGTH
7590      * @see ACAMERA_LENS_FOCUS_DISTANCE
7591      */
7592     ACAMERA_LENS_STATE_MOVING                                        = 1,
7593 
7594 } acamera_metadata_enum_android_lens_state_t;
7595 
7596 // ACAMERA_LENS_POSE_REFERENCE
7597 typedef enum acamera_metadata_enum_acamera_lens_pose_reference {
7598     /**
7599      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the optical center of
7600      * the largest camera device facing the same direction as this camera.</p>
7601      * <p>This is the default value for API levels before Android P.</p>
7602      *
7603      * @see ACAMERA_LENS_POSE_TRANSLATION
7604      */
7605     ACAMERA_LENS_POSE_REFERENCE_PRIMARY_CAMERA                       = 0,
7606 
7607     /**
7608      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the position of the
7609      * primary gyroscope of this Android device.</p>
7610      *
7611      * @see ACAMERA_LENS_POSE_TRANSLATION
7612      */
7613     ACAMERA_LENS_POSE_REFERENCE_GYROSCOPE                            = 1,
7614 
7615     /**
7616      * <p>The camera device cannot represent the values of ACAMERA_LENS_POSE_TRANSLATION
7617      * and ACAMERA_LENS_POSE_ROTATION accurately enough. One such example is a camera device
7618      * on the cover of a foldable phone: in order to measure the pose translation and rotation,
7619      * some kind of hinge position sensor would be needed.</p>
7620      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION must be all zeros, and
7621      * ACAMERA_LENS_POSE_ROTATION must be values matching its default facing.</p>
7622      *
7623      * @see ACAMERA_LENS_POSE_ROTATION
7624      * @see ACAMERA_LENS_POSE_TRANSLATION
7625      */
7626     ACAMERA_LENS_POSE_REFERENCE_UNDEFINED                            = 2,
7627 
7628 } acamera_metadata_enum_android_lens_pose_reference_t;
7629 
7630 
7631 // ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
7632 typedef enum acamera_metadata_enum_acamera_lens_info_focus_distance_calibration {
7633     /**
7634      * <p>The lens focus distance is not accurate, and the units used for
7635      * ACAMERA_LENS_FOCUS_DISTANCE do not correspond to any physical units.</p>
7636      * <p>Setting the lens to the same focus distance on separate occasions may
7637      * result in a different real focus distance, depending on factors such
7638      * as the orientation of the device, the age of the focusing mechanism,
7639      * and the device temperature. The focus distance value will still be
7640      * in the range of <code>[0, ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE]</code>, where 0
7641      * represents the farthest focus.</p>
7642      *
7643      * @see ACAMERA_LENS_FOCUS_DISTANCE
7644      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
7645      */
7646     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED        = 0,
7647 
7648     /**
7649      * <p>The lens focus distance is measured in diopters.</p>
7650      * <p>However, setting the lens to the same focus distance
7651      * on separate occasions may result in a different real
7652      * focus distance, depending on factors such as the
7653      * orientation of the device, the age of the focusing
7654      * mechanism, and the device temperature.</p>
7655      */
7656     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE         = 1,
7657 
7658     /**
7659      * <p>The lens focus distance is measured in diopters, and
7660      * is calibrated.</p>
7661      * <p>The lens mechanism is calibrated so that setting the
7662      * same focus distance is repeatable on multiple
7663      * occasions with good accuracy, and the focus distance
7664      * corresponds to the real physical distance to the plane
7665      * of best focus.</p>
7666      */
7667     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED          = 2,
7668 
7669 } acamera_metadata_enum_android_lens_info_focus_distance_calibration_t;
7670 
7671 
7672 // ACAMERA_NOISE_REDUCTION_MODE
7673 typedef enum acamera_metadata_enum_acamera_noise_reduction_mode {
7674     /**
7675      * <p>No noise reduction is applied.</p>
7676      */
7677     ACAMERA_NOISE_REDUCTION_MODE_OFF                                 = 0,
7678 
7679     /**
7680      * <p>Noise reduction is applied without reducing frame rate relative to sensor
7681      * output. It may be the same as OFF if noise reduction will reduce frame rate
7682      * relative to sensor.</p>
7683      */
7684     ACAMERA_NOISE_REDUCTION_MODE_FAST                                = 1,
7685 
7686     /**
7687      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
7688      * rate relative to sensor output.</p>
7689      */
7690     ACAMERA_NOISE_REDUCTION_MODE_HIGH_QUALITY                        = 2,
7691 
7692     /**
7693      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
7694      * sensor output. </p>
7695      */
7696     ACAMERA_NOISE_REDUCTION_MODE_MINIMAL                             = 3,
7697 
7698     /**
7699      * <p>Noise reduction is applied at different levels for different output streams,
7700      * based on resolution. Streams at maximum recording resolution (see {@link ACameraDevice_createCaptureSession })
7701      * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
7702      * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
7703      * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
7704      * and the quality is equal to or better than FAST (since it is only applied to
7705      * lower-resolution outputs, quality may improve from FAST).</p>
7706      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
7707      * with YUV or PRIVATE reprocessing, where the application continuously captures
7708      * high-resolution intermediate buffers into a circular buffer, from which a final image is
7709      * produced via reprocessing when a user takes a picture.  For such a use case, the
7710      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
7711      * preview and to avoid over-applying noise filtering when reprocessing, while
7712      * low-resolution buffers (used for recording or preview, generally) need noise reduction
7713      * applied for reasonable preview quality.</p>
7714      * <p>This mode is guaranteed to be supported by devices that support either the
7715      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
7716      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
7717      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
7718      *
7719      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
7720      */
7721     ACAMERA_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG                    = 4,
7722 
7723 } acamera_metadata_enum_android_noise_reduction_mode_t;
7724 
7725 
7726 
7727 // ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
7728 typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
7729     /**
7730      * <p>The minimal set of capabilities that every camera
7731      * device (regardless of ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL)
7732      * supports.</p>
7733      * <p>This capability is listed by all normal devices, and
7734      * indicates that the camera device has a feature set
7735      * that's comparable to the baseline requirements for the
7736      * older android.hardware.Camera API.</p>
7737      * <p>Devices with the DEPTH_OUTPUT capability might not list this
7738      * capability, indicating that they support only depth measurement,
7739      * not standard color output.</p>
7740      *
7741      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
7742      */
7743     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE       = 0,
7744 
7745     /**
7746      * <p>The camera device can be manually controlled (3A algorithms such
7747      * as auto-exposure, and auto-focus can be bypassed).
7748      * The camera device supports basic manual control of the sensor image
7749      * acquisition related stages. This means the following controls are
7750      * guaranteed to be supported:</p>
7751      * <ul>
7752      * <li>Manual frame duration control<ul>
7753      * <li>ACAMERA_SENSOR_FRAME_DURATION</li>
7754      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
7755      * </ul>
7756      * </li>
7757      * <li>Manual exposure control<ul>
7758      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
7759      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
7760      * </ul>
7761      * </li>
7762      * <li>Manual sensitivity control<ul>
7763      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
7764      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
7765      * </ul>
7766      * </li>
7767      * <li>Manual lens control (if the lens is adjustable)<ul>
7768      * <li>ACAMERA_LENS_*</li>
7769      * </ul>
7770      * </li>
7771      * <li>Manual flash control (if a flash unit is present)<ul>
7772      * <li>ACAMERA_FLASH_*</li>
7773      * </ul>
7774      * </li>
7775      * <li>Manual black level locking<ul>
7776      * <li>ACAMERA_BLACK_LEVEL_LOCK</li>
7777      * </ul>
7778      * </li>
7779      * <li>Auto exposure lock<ul>
7780      * <li>ACAMERA_CONTROL_AE_LOCK</li>
7781      * </ul>
7782      * </li>
7783      * </ul>
7784      * <p>If any of the above 3A algorithms are enabled, then the camera
7785      * device will accurately report the values applied by 3A in the
7786      * result.</p>
7787      * <p>A given camera device may also support additional manual sensor controls,
7788      * but this capability only covers the above list of controls.</p>
7789      * <p>If this is supported, android.scaler.streamConfigurationMap will
7790      * additionally return a min frame duration that is greater than
7791      * zero for each supported size-format combination.</p>
7792      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
7793      * physical camera switches, exposureTime, sensitivity, and lens properties may change
7794      * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
7795      * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
7796      *
7797      * @see ACAMERA_BLACK_LEVEL_LOCK
7798      * @see ACAMERA_CONTROL_AE_LOCK
7799      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7800      * @see ACAMERA_SENSOR_FRAME_DURATION
7801      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
7802      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
7803      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
7804      * @see ACAMERA_SENSOR_SENSITIVITY
7805      */
7806     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR             = 1,
7807 
7808     /**
7809      * <p>The camera device post-processing stages can be manually controlled.
7810      * The camera device supports basic manual control of the image post-processing
7811      * stages. This means the following controls are guaranteed to be supported:</p>
7812      * <ul>
7813      * <li>
7814      * <p>Manual tonemap control</p>
7815      * <ul>
7816      * <li>android.tonemap.curve</li>
7817      * <li>ACAMERA_TONEMAP_MODE</li>
7818      * <li>ACAMERA_TONEMAP_MAX_CURVE_POINTS</li>
7819      * <li>ACAMERA_TONEMAP_GAMMA</li>
7820      * <li>ACAMERA_TONEMAP_PRESET_CURVE</li>
7821      * </ul>
7822      * </li>
7823      * <li>
7824      * <p>Manual white balance control</p>
7825      * <ul>
7826      * <li>ACAMERA_COLOR_CORRECTION_TRANSFORM</li>
7827      * <li>ACAMERA_COLOR_CORRECTION_GAINS</li>
7828      * </ul>
7829      * </li>
7830      * <li>Manual lens shading map control<ul>
7831      * <li>ACAMERA_SHADING_MODE</li>
7832      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE</li>
7833      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP</li>
7834      * <li>ACAMERA_LENS_INFO_SHADING_MAP_SIZE</li>
7835      * </ul>
7836      * </li>
7837      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
7838      * <li>ACAMERA_COLOR_CORRECTION_ABERRATION_MODE</li>
7839      * <li>ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES</li>
7840      * </ul>
7841      * </li>
7842      * <li>Auto white balance lock<ul>
7843      * <li>ACAMERA_CONTROL_AWB_LOCK</li>
7844      * </ul>
7845      * </li>
7846      * </ul>
7847      * <p>If auto white balance is enabled, then the camera device
7848      * will accurately report the values applied by AWB in the result.</p>
7849      * <p>A given camera device may also support additional post-processing
7850      * controls, but this capability only covers the above list of controls.</p>
7851      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
7852      * physical camera switches, tonemap, white balance, and shading map may change even if
7853      * awb is locked. However, the overall post-processing experience for users will be
7854      * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
7855      *
7856      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
7857      * @see ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
7858      * @see ACAMERA_COLOR_CORRECTION_GAINS
7859      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7860      * @see ACAMERA_CONTROL_AWB_LOCK
7861      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
7862      * @see ACAMERA_SHADING_MODE
7863      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
7864      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
7865      * @see ACAMERA_TONEMAP_GAMMA
7866      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
7867      * @see ACAMERA_TONEMAP_MODE
7868      * @see ACAMERA_TONEMAP_PRESET_CURVE
7869      */
7870     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING    = 2,
7871 
7872     /**
7873      * <p>The camera device supports outputting RAW buffers and
7874      * metadata for interpreting them.</p>
7875      * <p>Devices supporting the RAW capability allow both for
7876      * saving DNG files, and for direct application processing of
7877      * raw sensor images.</p>
7878      * <ul>
7879      * <li>RAW_SENSOR is supported as an output format.</li>
7880      * <li>The maximum available resolution for RAW_SENSOR streams
7881      *   will match either the value in
7882      *   ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE or
7883      *   ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</li>
7884      * <li>All DNG-related optional metadata entries are provided
7885      *   by the camera device.</li>
7886      * </ul>
7887      *
7888      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
7889      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
7890      */
7891     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_RAW                       = 3,
7892 
7893     /**
7894      * <p>The camera device supports accurately reporting the sensor settings for many of
7895      * the sensor controls while the built-in 3A algorithm is running.  This allows
7896      * reporting of sensor settings even when these settings cannot be manually changed.</p>
7897      * <p>The values reported for the following controls are guaranteed to be available
7898      * in the CaptureResult, including when 3A is enabled:</p>
7899      * <ul>
7900      * <li>Exposure control<ul>
7901      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
7902      * </ul>
7903      * </li>
7904      * <li>Sensitivity control<ul>
7905      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
7906      * </ul>
7907      * </li>
7908      * <li>Lens controls (if the lens is adjustable)<ul>
7909      * <li>ACAMERA_LENS_FOCUS_DISTANCE</li>
7910      * <li>ACAMERA_LENS_APERTURE</li>
7911      * </ul>
7912      * </li>
7913      * </ul>
7914      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
7915      * always be included if the MANUAL_SENSOR capability is available.</p>
7916      *
7917      * @see ACAMERA_LENS_APERTURE
7918      * @see ACAMERA_LENS_FOCUS_DISTANCE
7919      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7920      * @see ACAMERA_SENSOR_SENSITIVITY
7921      */
7922     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS      = 5,
7923 
7924     /**
7925      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
7926      * second, in at least the uncompressed YUV format, when post-processing settings are
7927      * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
7928      * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
7929      * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
7930      * <p>More specifically, this means that at least one output {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
7931      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
7932      * is larger or equal to the 'high resolution' defined above, and can be captured at at
7933      * least 20 fps.  For the largest {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
7934      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS },
7935      * camera device can capture this size for at least 10 frames per second if the size is
7936      * less than 24 megapixels. Also the ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES entry
7937      * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
7938      * for the largest YUV_420_888 size.</p>
7939      * <p>If the device supports the {@link AIMAGE_FORMAT_RAW10 }, {@link AIMAGE_FORMAT_RAW12 }, {@link AIMAGE_FORMAT_Y8 }, then those can also be
7940      * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
7941      * <p>In addition, the ACAMERA_SYNC_MAX_LATENCY field is guaranted to have a value between 0
7942      * and 4, inclusive. ACAMERA_CONTROL_AE_LOCK_AVAILABLE and ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
7943      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
7944      * consistent image output.</p>
7945      *
7946      * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
7947      * @see ACAMERA_CONTROL_AE_LOCK_AVAILABLE
7948      * @see ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
7949      * @see ACAMERA_SYNC_MAX_LATENCY
7950      */
7951     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE             = 6,
7952 
7953     /**
7954      * <p>The camera device can produce depth measurements from its field of view.</p>
7955      * <p>This capability requires the camera device to support the following:</p>
7956      * <ul>
7957      * <li>{@link AIMAGE_FORMAT_DEPTH16 } is supported as
7958      *   an output format.</li>
7959      * <li>{@link AIMAGE_FORMAT_DEPTH_POINT_CLOUD } is
7960      *   optionally supported as an output format.</li>
7961      * <li>This camera device, and all camera devices with the same ACAMERA_LENS_FACING, will
7962      *   list the following calibration metadata entries in both {@link ACameraManager_getCameraCharacteristics }
7963      *   and {@link ACameraCaptureSession_captureCallback_result }:<ul>
7964      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
7965      * <li>ACAMERA_LENS_POSE_ROTATION</li>
7966      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
7967      * <li>ACAMERA_LENS_DISTORTION</li>
7968      * </ul>
7969      * </li>
7970      * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li>
7971      * <li>As of Android P, the ACAMERA_LENS_POSE_REFERENCE entry is listed by this device.</li>
7972      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
7973      *   normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
7974      *   DEPTH16 format.</li>
7975      * </ul>
7976      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
7977      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
7978      * should be accounted for (see {@link ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS }).
7979      * On a device that supports both depth and color-based output, to enable smooth preview,
7980      * using a repeating burst is recommended, where a depth-output target is only included
7981      * once every N frames, where N is the ratio between preview output rate and depth output
7982      * rate, including depth stall time.</p>
7983      *
7984      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
7985      * @see ACAMERA_LENS_DISTORTION
7986      * @see ACAMERA_LENS_FACING
7987      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
7988      * @see ACAMERA_LENS_POSE_REFERENCE
7989      * @see ACAMERA_LENS_POSE_ROTATION
7990      * @see ACAMERA_LENS_POSE_TRANSLATION
7991      */
7992     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT              = 8,
7993 
7994     /**
7995      * <p>The camera device supports the MOTION_TRACKING value for
7996      * ACAMERA_CONTROL_CAPTURE_INTENT, which limits maximum exposure time to 20 ms.</p>
7997      * <p>This limits the motion blur of capture images, resulting in better image tracking
7998      * results for use cases such as image stabilization or augmented reality.</p>
7999      *
8000      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8001      */
8002     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING           = 10,
8003 
8004     /**
8005      * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
8006      * <p>In API level 28, the physical cameras must also be exposed to the application via
8007      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>.</p>
8008      * <p>Starting from API level 29:</p>
8009      * <ul>
8010      * <li>Some or all physical cameras may not be independently exposed to the application,
8011      * in which case the physical camera IDs will not be available in
8012      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>. But the
8013      * application can still query the physical cameras' characteristics by calling
8014      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraCharacteristics">CameraManager#getCameraCharacteristics</a>.</li>
8015      * <li>If a physical camera is hidden from camera ID list, the mandatory stream
8016      * combinations for that physical camera must be supported through the logical camera
8017      * using physical streams. One exception is that in API level 30, a physical camera
8018      * may become unavailable via
8019      * {@link ACameraManager_PhysicalCameraAvailabilityCallback }
8020      * callback.</li>
8021      * </ul>
8022      * <p>Combinations of logical and physical streams, or physical streams from different
8023      * physical cameras are not guaranteed. However, if the camera device supports
8024      * {@link ACameraDevice_isSessionConfigurationSupported },
8025      * application must be able to query whether a stream combination involving physical
8026      * streams is supported by calling
8027      * {@link ACameraDevice_isSessionConfigurationSupported }.</p>
8028      * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
8029      * camera in the system. For an application that switches between front and back cameras,
8030      * the recommendation is to switch between the first rear camera and the first front
8031      * camera in the list of supported camera devices.</p>
8032      * <p>This capability requires the camera device to support the following:</p>
8033      * <ul>
8034      * <li>The IDs of underlying physical cameras are returned via
8035      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getPhysicalCameraIds">CameraCharacteristics#getPhysicalCameraIds</a>.</li>
8036      * <li>This camera device must list static metadata
8037      *   ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE in
8038      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html">CameraCharacteristics</a>.</li>
8039      * <li>The underlying physical cameras' static metadata must list the following entries,
8040      *   so that the application can correlate pixels from the physical streams:<ul>
8041      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
8042      * <li>ACAMERA_LENS_POSE_ROTATION</li>
8043      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
8044      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
8045      * <li>ACAMERA_LENS_DISTORTION</li>
8046      * </ul>
8047      * </li>
8048      * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
8049      *   the same.</li>
8050      * <li>The logical camera must be LIMITED or higher device.</li>
8051      * </ul>
8052      * <p>A logical camera device's dynamic metadata may contain
8053      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID to notify the application of the current
8054      * active physical camera Id. An active physical camera is the physical camera from which
8055      * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
8056      * In addition, this serves as an indication which physical camera is used to output to
8057      * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
8058      * the application should request.</p>
8059      * <p>Logical camera's static metadata tags below describe the default active physical
8060      * camera. An active physical camera is default if it's used when application directly
8061      * uses requests built from a template. All templates will default to the same active
8062      * physical camera.</p>
8063      * <ul>
8064      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
8065      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
8066      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
8067      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
8068      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
8069      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
8070      * <li>ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED</li>
8071      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT1</li>
8072      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT2</li>
8073      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM1</li>
8074      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM2</li>
8075      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM1</li>
8076      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM2</li>
8077      * <li>ACAMERA_SENSOR_FORWARD_MATRIX1</li>
8078      * <li>ACAMERA_SENSOR_FORWARD_MATRIX2</li>
8079      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
8080      * <li>ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY</li>
8081      * <li>ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS</li>
8082      * <li>ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES</li>
8083      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
8084      * <li>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE</li>
8085      * <li>ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION</li>
8086      * <li>ACAMERA_LENS_POSE_ROTATION</li>
8087      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
8088      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
8089      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
8090      * <li>ACAMERA_LENS_DISTORTION</li>
8091      * </ul>
8092      * <p>The field of view of non-RAW physical streams must not be smaller than that of the
8093      * non-RAW logical streams, or the maximum field-of-view of the physical camera,
8094      * whichever is smaller. The application should check the physical capture result
8095      * metadata for how the physical streams are cropped or zoomed. More specifically, given
8096      * the physical camera result metadata, the effective horizontal field-of-view of the
8097      * physical camera is:</p>
8098      * <pre><code>fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength)
8099      * </code></pre>
8100      * <p>where the equation parameters are the physical camera's crop region width, physical
8101      * sensor width, zoom ratio, active array width, and focal length respectively. Typically
8102      * the physical stream of active physical camera has the same field-of-view as the
8103      * logical streams. However, the same may not be true for physical streams from
8104      * non-active physical cameras. For example, if the logical camera has a wide-ultrawide
8105      * configuration where the wide lens is the default, when the crop region is set to the
8106      * logical camera's active array size, (and the zoom ratio set to 1.0 starting from
8107      * Android 11), a physical stream for the ultrawide camera may prefer outputing images
8108      * with larger field-of-view than that of the wide camera for better stereo matching
8109      * margin or more robust motion tracking. At the same time, the physical non-RAW streams'
8110      * field of view must not be smaller than the requested crop region and zoom ratio, as
8111      * long as it's within the physical lens' capability. For example, for a logical camera
8112      * with wide-tele lens configuration where the wide lens is the default, if the logical
8113      * camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical
8114      * stream for the tele lens will be configured to its maximum size crop region (no zoom).</p>
8115      * <p><em>Deprecated:</em> Prior to Android 11, the field of view of all non-RAW physical streams
8116      * cannot be larger than that of non-RAW logical streams. If the logical camera has a
8117      * wide-ultrawide lens configuration where the wide lens is the default, when the logical
8118      * camera's crop region is set to maximum size, the FOV of the physical streams for the
8119      * ultrawide lens will be the same as the logical stream, by making the crop region
8120      * smaller than its active array size to compensate for the smaller focal length.</p>
8121      * <p>Even if the underlying physical cameras have different RAW characteristics (such as
8122      * size or CFA pattern), a logical camera can still advertise RAW capability. In this
8123      * case, when the application configures a RAW stream, the camera device will make sure
8124      * the active physical camera will remain active to ensure consistent RAW output
8125      * behavior, and not switch to other physical cameras.</p>
8126      * <p>The capture request and result metadata tags required for backward compatible camera
8127      * functionalities will be solely based on the logical camera capabiltity. On the other
8128      * hand, the use of manual capture controls (sensor or post-processing) with a
8129      * logical camera may result in unexpected behavior when the HAL decides to switch
8130      * between physical cameras with different characteristics under the hood. For example,
8131      * when the application manually sets exposure time and sensitivity while zooming in,
8132      * the brightness of the camera images may suddenly change because HAL switches from one
8133      * physical camera to the other.</p>
8134      *
8135      * @see ACAMERA_LENS_DISTORTION
8136      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
8137      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
8138      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
8139      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
8140      * @see ACAMERA_LENS_POSE_REFERENCE
8141      * @see ACAMERA_LENS_POSE_ROTATION
8142      * @see ACAMERA_LENS_POSE_TRANSLATION
8143      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
8144      * @see ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
8145      * @see ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES
8146      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
8147      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
8148      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
8149      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
8150      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
8151      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
8152      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
8153      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
8154      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
8155      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
8156      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
8157      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
8158      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
8159      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
8160      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
8161      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
8162      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
8163      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
8164      */
8165     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA      = 11,
8166 
8167     /**
8168      * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
8169      * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p>
8170      * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
8171      * its device level and capabilities. Additionally, if the monochrome camera device
8172      * supports Y8 format, all mandatory stream combination requirements related to {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888} apply
8173      * to {@link AIMAGE_FORMAT_Y8 Y8} as well. There are no
8174      * mandatory stream combination requirements with regard to
8175      * {@link AIMAGE_FORMAT_Y8 Y8} for Bayer camera devices.</p>
8176      * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
8177      * camera will be either MONO or NIR.</p>
8178      */
8179     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME                = 12,
8180 
8181     /**
8182      * <p>The camera device is capable of writing image data into a region of memory
8183      * inaccessible to Android userspace or the Android kernel, and only accessible to
8184      * trusted execution environments (TEE).</p>
8185      */
8186     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA         = 13,
8187 
8188     /**
8189      * <p>The camera device is only accessible by Android's system components and privileged
8190      * applications. Processes need to have the android.permission.SYSTEM_CAMERA in
8191      * addition to android.permission.CAMERA in order to connect to this camera device.</p>
8192      */
8193     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA             = 14,
8194 
8195 } acamera_metadata_enum_android_request_available_capabilities_t;
8196 
8197 
8198 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
8199 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations {
8200     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT            = 0,
8201 
8202     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT             = 1,
8203 
8204 } acamera_metadata_enum_android_scaler_available_stream_configurations_t;
8205 
8206 // ACAMERA_SCALER_CROPPING_TYPE
8207 typedef enum acamera_metadata_enum_acamera_scaler_cropping_type {
8208     /**
8209      * <p>The camera device only supports centered crop regions.</p>
8210      */
8211     ACAMERA_SCALER_CROPPING_TYPE_CENTER_ONLY                         = 0,
8212 
8213     /**
8214      * <p>The camera device supports arbitrarily chosen crop regions.</p>
8215      */
8216     ACAMERA_SCALER_CROPPING_TYPE_FREEFORM                            = 1,
8217 
8218 } acamera_metadata_enum_android_scaler_cropping_type_t;
8219 
8220 // ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
8221 typedef enum acamera_metadata_enum_acamera_scaler_available_recommended_stream_configurations {
8222     /**
8223      * <p>Preview must only include non-stalling processed stream configurations with
8224      * output formats like
8225      * {@link AIMAGE_FORMAT_YUV_420_888 },
8226      * {@link AIMAGE_FORMAT_PRIVATE }, etc.</p>
8227      */
8228     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW
8229                                                                       = 0x0,
8230 
8231     /**
8232      * <p>Video record must include stream configurations that match the advertised
8233      * supported media profiles <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> with
8234      * IMPLEMENTATION_DEFINED format.</p>
8235      */
8236     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD
8237                                                                       = 0x1,
8238 
8239     /**
8240      * <p>Video snapshot must include stream configurations at least as big as
8241      * the maximum RECORD resolutions and only with
8242      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
8243      * Additionally the configurations shouldn't cause preview glitches and also be able to
8244      * run at 30 fps.</p>
8245      */
8246     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT
8247                                                                       = 0x2,
8248 
8249     /**
8250      * <p>Recommended snapshot stream configurations must include at least one with
8251      * size close to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE and
8252      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
8253      * Taking into account restrictions on aspect ratio, alignment etc. the area of the
8254      * maximum suggested size shouldn’t be less than 97% of the sensor array size area.</p>
8255      *
8256      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
8257      */
8258     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT
8259                                                                       = 0x3,
8260 
8261     /**
8262      * <p>If supported, recommended input stream configurations must only be advertised with
8263      * ZSL along with other processed and/or stalling output formats.</p>
8264      */
8265     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL   = 0x4,
8266 
8267     /**
8268      * <p>If supported, recommended raw stream configurations must only include RAW based
8269      * output formats.</p>
8270      */
8271     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW   = 0x5,
8272 
8273     /**
8274      * <p>If supported, the recommended low latency stream configurations must have
8275      * end-to-end latency that does not exceed 200 ms. under standard operating conditions
8276      * (reasonable light levels, not loaded system) and using template
8277      * TEMPLATE_STILL_CAPTURE. This is primarily for listing configurations for the
8278      * {@link AIMAGE_FORMAT_JPEG JPEG output format}
8279      * however other supported output formats can be added as well.</p>
8280      */
8281     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT
8282                                                                       = 0x6,
8283 
8284     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END
8285                                                                       = 0x7,
8286 
8287     /**
8288      * <p>Vendor defined use cases. These depend on the vendor implementation.</p>
8289      */
8290     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START
8291                                                                       = 0x18,
8292 
8293 } acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t;
8294 
8295 
8296 // ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
8297 typedef enum acamera_metadata_enum_acamera_sensor_reference_illuminant1 {
8298     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT                    = 1,
8299 
8300     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT                 = 2,
8301 
8302     /**
8303      * <p>Incandescent light</p>
8304      */
8305     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN                    = 3,
8306 
8307     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLASH                       = 4,
8308 
8309     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER                = 9,
8310 
8311     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER              = 10,
8312 
8313     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_SHADE                       = 11,
8314 
8315     /**
8316      * <p>D 5700 - 7100K</p>
8317      */
8318     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT        = 12,
8319 
8320     /**
8321      * <p>N 4600 - 5400K</p>
8322      */
8323     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT       = 13,
8324 
8325     /**
8326      * <p>W 3900 - 4500K</p>
8327      */
8328     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT      = 14,
8329 
8330     /**
8331      * <p>WW 3200 - 3700K</p>
8332      */
8333     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT           = 15,
8334 
8335     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A                  = 17,
8336 
8337     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B                  = 18,
8338 
8339     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C                  = 19,
8340 
8341     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D55                         = 20,
8342 
8343     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D65                         = 21,
8344 
8345     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D75                         = 22,
8346 
8347     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D50                         = 23,
8348 
8349     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN         = 24,
8350 
8351 } acamera_metadata_enum_android_sensor_reference_illuminant1_t;
8352 
8353 // ACAMERA_SENSOR_TEST_PATTERN_MODE
8354 typedef enum acamera_metadata_enum_acamera_sensor_test_pattern_mode {
8355     /**
8356      * <p>No test pattern mode is used, and the camera
8357      * device returns captures from the image sensor.</p>
8358      * <p>This is the default if the key is not set.</p>
8359      */
8360     ACAMERA_SENSOR_TEST_PATTERN_MODE_OFF                             = 0,
8361 
8362     /**
8363      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
8364      * respective color channel provided in
8365      * ACAMERA_SENSOR_TEST_PATTERN_DATA.</p>
8366      * <p>For example:</p>
8367      * <pre><code>android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
8368      * </code></pre>
8369      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
8370      * <pre><code>android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
8371      * </code></pre>
8372      * <p>All red pixels are 100% red. Only the odd green pixels
8373      * are 100% green. All blue pixels are 100% black.</p>
8374      *
8375      * @see ACAMERA_SENSOR_TEST_PATTERN_DATA
8376      */
8377     ACAMERA_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR                     = 1,
8378 
8379     /**
8380      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
8381      * <p>The vertical bars (left-to-right) are as follows:</p>
8382      * <ul>
8383      * <li>100% white</li>
8384      * <li>yellow</li>
8385      * <li>cyan</li>
8386      * <li>green</li>
8387      * <li>magenta</li>
8388      * <li>red</li>
8389      * <li>blue</li>
8390      * <li>black</li>
8391      * </ul>
8392      * <p>In general the image would look like the following:</p>
8393      * <pre><code>W Y C G M R B K
8394      * W Y C G M R B K
8395      * W Y C G M R B K
8396      * W Y C G M R B K
8397      * W Y C G M R B K
8398      * . . . . . . . .
8399      * . . . . . . . .
8400      * . . . . . . . .
8401      *
8402      * (B = Blue, K = Black)
8403      * </code></pre>
8404      * <p>Each bar should take up 1/8 of the sensor pixel array width.
8405      * When this is not possible, the bar size should be rounded
8406      * down to the nearest integer and the pattern can repeat
8407      * on the right side.</p>
8408      * <p>Each bar's height must always take up the full sensor
8409      * pixel array height.</p>
8410      * <p>Each pixel in this test pattern must be set to either
8411      * 0% intensity or 100% intensity.</p>
8412      */
8413     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS                      = 2,
8414 
8415     /**
8416      * <p>The test pattern is similar to COLOR_BARS, except that
8417      * each bar should start at its specified color at the top,
8418      * and fade to gray at the bottom.</p>
8419      * <p>Furthermore each bar is further subdivided into a left and
8420      * right half. The left half should have a smooth gradient,
8421      * and the right half should have a quantized gradient.</p>
8422      * <p>In particular, the right half's should consist of blocks of the
8423      * same color for 1/16th active sensor pixel array width.</p>
8424      * <p>The least significant bits in the quantized gradient should
8425      * be copied from the most significant bits of the smooth gradient.</p>
8426      * <p>The height of each bar should always be a multiple of 128.
8427      * When this is not the case, the pattern should repeat at the bottom
8428      * of the image.</p>
8429      */
8430     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY         = 3,
8431 
8432     /**
8433      * <p>All pixel data is replaced by a pseudo-random sequence
8434      * generated from a PN9 512-bit sequence (typically implemented
8435      * in hardware with a linear feedback shift register).</p>
8436      * <p>The generator should be reset at the beginning of each frame,
8437      * and thus each subsequent raw frame with this test pattern should
8438      * be exactly the same as the last.</p>
8439      */
8440     ACAMERA_SENSOR_TEST_PATTERN_MODE_PN9                             = 4,
8441 
8442     /**
8443      * <p>The first custom test pattern. All custom patterns that are
8444      * available only on this camera device are at least this numeric
8445      * value.</p>
8446      * <p>All of the custom test patterns will be static
8447      * (that is the raw image must not vary from frame to frame).</p>
8448      */
8449     ACAMERA_SENSOR_TEST_PATTERN_MODE_CUSTOM1                         = 256,
8450 
8451 } acamera_metadata_enum_android_sensor_test_pattern_mode_t;
8452 
8453 
8454 // ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
8455 typedef enum acamera_metadata_enum_acamera_sensor_info_color_filter_arrangement {
8456     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB                = 0,
8457 
8458     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG                = 1,
8459 
8460     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG                = 2,
8461 
8462     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR                = 3,
8463 
8464     /**
8465      * <p>Sensor is not Bayer; output has 3 16-bit
8466      * values for each pixel, instead of just 1 16-bit value
8467      * per pixel.</p>
8468      */
8469     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB                 = 4,
8470 
8471     /**
8472      * <p>Sensor doesn't have any Bayer color filter.
8473      * Such sensor captures visible light in monochrome. The exact weighting and
8474      * wavelengths captured is not specified, but generally only includes the visible
8475      * frequencies. This value implies a MONOCHROME camera.</p>
8476      */
8477     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO                = 5,
8478 
8479     /**
8480      * <p>Sensor has a near infrared filter capturing light with wavelength between
8481      * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
8482      * value implies a MONOCHROME camera.</p>
8483      */
8484     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR                 = 6,
8485 
8486 } acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
8487 
8488 // ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
8489 typedef enum acamera_metadata_enum_acamera_sensor_info_timestamp_source {
8490     /**
8491      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in nanoseconds and monotonic, but can
8492      * not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.),
8493      * or other instances of the same or different camera devices in the same system with
8494      * accuracy. However, the timestamps are roughly in the same timebase as
8495      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#uptimeMillis">SystemClock#uptimeMillis</a>.  The accuracy is sufficient for tasks
8496      * like A/V synchronization for video recording, at least, and the timestamps can be
8497      * directly used together with timestamps from the audio subsystem for that task.</p>
8498      * <p>Timestamps between streams and results for a single camera instance are comparable,
8499      * and the timestamps for all buffers and the result metadata generated by a single
8500      * capture are identical.</p>
8501      *
8502      * @see ACAMERA_SENSOR_TIMESTAMP
8503      */
8504     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN                     = 0,
8505 
8506     /**
8507      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in the same timebase as
8508      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">SystemClock#elapsedRealtimeNanos</a>,
8509      * and they can be compared to other timestamps using that base.</p>
8510      * <p>When buffers from a REALTIME device are passed directly to a video encoder from the
8511      * camera, automatic compensation is done to account for differing timebases of the
8512      * audio and camera subsystems.  If the application is receiving buffers and then later
8513      * sending them to a video encoder or other application where they are compared with
8514      * audio subsystem timestamps or similar, this compensation is not present.  In those
8515      * cases, applications need to adjust the timestamps themselves.  Since <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">SystemClock#elapsedRealtimeNanos</a> and <a href="https://developer.android.com/reference/android/os/SystemClock.html#uptimeMillis">SystemClock#uptimeMillis</a> only diverge while the device is asleep, an
8516      * offset between the two sources can be measured once per active session and applied
8517      * to timestamps for sufficient accuracy for A/V sync.</p>
8518      *
8519      * @see ACAMERA_SENSOR_TIMESTAMP
8520      */
8521     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME                    = 1,
8522 
8523 } acamera_metadata_enum_android_sensor_info_timestamp_source_t;
8524 
8525 // ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
8526 typedef enum acamera_metadata_enum_acamera_sensor_info_lens_shading_applied {
8527     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE                   = 0,
8528 
8529     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE                    = 1,
8530 
8531 } acamera_metadata_enum_android_sensor_info_lens_shading_applied_t;
8532 
8533 
8534 // ACAMERA_SHADING_MODE
8535 typedef enum acamera_metadata_enum_acamera_shading_mode {
8536     /**
8537      * <p>No lens shading correction is applied.</p>
8538      */
8539     ACAMERA_SHADING_MODE_OFF                                         = 0,
8540 
8541     /**
8542      * <p>Apply lens shading corrections, without slowing
8543      * frame rate relative to sensor raw output</p>
8544      */
8545     ACAMERA_SHADING_MODE_FAST                                        = 1,
8546 
8547     /**
8548      * <p>Apply high-quality lens shading correction, at the
8549      * cost of possibly reduced frame rate.</p>
8550      */
8551     ACAMERA_SHADING_MODE_HIGH_QUALITY                                = 2,
8552 
8553 } acamera_metadata_enum_android_shading_mode_t;
8554 
8555 
8556 // ACAMERA_STATISTICS_FACE_DETECT_MODE
8557 typedef enum acamera_metadata_enum_acamera_statistics_face_detect_mode {
8558     /**
8559      * <p>Do not include face detection statistics in capture
8560      * results.</p>
8561      */
8562     ACAMERA_STATISTICS_FACE_DETECT_MODE_OFF                          = 0,
8563 
8564     /**
8565      * <p>Return face rectangle and confidence values only.</p>
8566      */
8567     ACAMERA_STATISTICS_FACE_DETECT_MODE_SIMPLE                       = 1,
8568 
8569     /**
8570      * <p>Return all face
8571      * metadata.</p>
8572      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
8573      */
8574     ACAMERA_STATISTICS_FACE_DETECT_MODE_FULL                         = 2,
8575 
8576 } acamera_metadata_enum_android_statistics_face_detect_mode_t;
8577 
8578 // ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
8579 typedef enum acamera_metadata_enum_acamera_statistics_hot_pixel_map_mode {
8580     /**
8581      * <p>Hot pixel map production is disabled.</p>
8582      */
8583     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_OFF                        = 0,
8584 
8585     /**
8586      * <p>Hot pixel map production is enabled.</p>
8587      */
8588     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_ON                         = 1,
8589 
8590 } acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t;
8591 
8592 // ACAMERA_STATISTICS_SCENE_FLICKER
8593 typedef enum acamera_metadata_enum_acamera_statistics_scene_flicker {
8594     /**
8595      * <p>The camera device does not detect any flickering illumination
8596      * in the current scene.</p>
8597      */
8598     ACAMERA_STATISTICS_SCENE_FLICKER_NONE                            = 0,
8599 
8600     /**
8601      * <p>The camera device detects illumination flickering at 50Hz
8602      * in the current scene.</p>
8603      */
8604     ACAMERA_STATISTICS_SCENE_FLICKER_50HZ                            = 1,
8605 
8606     /**
8607      * <p>The camera device detects illumination flickering at 60Hz
8608      * in the current scene.</p>
8609      */
8610     ACAMERA_STATISTICS_SCENE_FLICKER_60HZ                            = 2,
8611 
8612 } acamera_metadata_enum_android_statistics_scene_flicker_t;
8613 
8614 // ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
8615 typedef enum acamera_metadata_enum_acamera_statistics_lens_shading_map_mode {
8616     /**
8617      * <p>Do not include a lens shading map in the capture result.</p>
8618      */
8619     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_OFF                     = 0,
8620 
8621     /**
8622      * <p>Include a lens shading map in the capture result.</p>
8623      */
8624     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_ON                      = 1,
8625 
8626 } acamera_metadata_enum_android_statistics_lens_shading_map_mode_t;
8627 
8628 // ACAMERA_STATISTICS_OIS_DATA_MODE
8629 typedef enum acamera_metadata_enum_acamera_statistics_ois_data_mode {
8630     /**
8631      * <p>Do not include OIS data in the capture result.</p>
8632      */
8633     ACAMERA_STATISTICS_OIS_DATA_MODE_OFF                             = 0,
8634 
8635     /**
8636      * <p>Include OIS data in the capture result.</p>
8637      * <p>ACAMERA_STATISTICS_OIS_TIMESTAMPS, ACAMERA_STATISTICS_OIS_X_SHIFTS,
8638      * and ACAMERA_STATISTICS_OIS_Y_SHIFTS provide OIS data in the output result metadata.</p>
8639      *
8640      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
8641      * @see ACAMERA_STATISTICS_OIS_X_SHIFTS
8642      * @see ACAMERA_STATISTICS_OIS_Y_SHIFTS
8643      */
8644     ACAMERA_STATISTICS_OIS_DATA_MODE_ON                              = 1,
8645 
8646 } acamera_metadata_enum_android_statistics_ois_data_mode_t;
8647 
8648 
8649 
8650 // ACAMERA_TONEMAP_MODE
8651 typedef enum acamera_metadata_enum_acamera_tonemap_mode {
8652     /**
8653      * <p>Use the tone mapping curve specified in
8654      * the ACAMERA_TONEMAPCURVE_* entries.</p>
8655      * <p>All color enhancement and tonemapping must be disabled, except
8656      * for applying the tonemapping curve specified by
8657      * android.tonemap.curve.</p>
8658      * <p>Must not slow down frame rate relative to raw
8659      * sensor output.</p>
8660      */
8661     ACAMERA_TONEMAP_MODE_CONTRAST_CURVE                              = 0,
8662 
8663     /**
8664      * <p>Advanced gamma mapping and color enhancement may be applied, without
8665      * reducing frame rate compared to raw sensor output.</p>
8666      */
8667     ACAMERA_TONEMAP_MODE_FAST                                        = 1,
8668 
8669     /**
8670      * <p>High-quality gamma mapping and color enhancement will be applied, at
8671      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
8672      */
8673     ACAMERA_TONEMAP_MODE_HIGH_QUALITY                                = 2,
8674 
8675     /**
8676      * <p>Use the gamma value specified in ACAMERA_TONEMAP_GAMMA to peform
8677      * tonemapping.</p>
8678      * <p>All color enhancement and tonemapping must be disabled, except
8679      * for applying the tonemapping curve specified by ACAMERA_TONEMAP_GAMMA.</p>
8680      * <p>Must not slow down frame rate relative to raw sensor output.</p>
8681      *
8682      * @see ACAMERA_TONEMAP_GAMMA
8683      */
8684     ACAMERA_TONEMAP_MODE_GAMMA_VALUE                                 = 3,
8685 
8686     /**
8687      * <p>Use the preset tonemapping curve specified in
8688      * ACAMERA_TONEMAP_PRESET_CURVE to peform tonemapping.</p>
8689      * <p>All color enhancement and tonemapping must be disabled, except
8690      * for applying the tonemapping curve specified by
8691      * ACAMERA_TONEMAP_PRESET_CURVE.</p>
8692      * <p>Must not slow down frame rate relative to raw sensor output.</p>
8693      *
8694      * @see ACAMERA_TONEMAP_PRESET_CURVE
8695      */
8696     ACAMERA_TONEMAP_MODE_PRESET_CURVE                                = 4,
8697 
8698 } acamera_metadata_enum_android_tonemap_mode_t;
8699 
8700 // ACAMERA_TONEMAP_PRESET_CURVE
8701 typedef enum acamera_metadata_enum_acamera_tonemap_preset_curve {
8702     /**
8703      * <p>Tonemapping curve is defined by sRGB</p>
8704      */
8705     ACAMERA_TONEMAP_PRESET_CURVE_SRGB                                = 0,
8706 
8707     /**
8708      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
8709      */
8710     ACAMERA_TONEMAP_PRESET_CURVE_REC709                              = 1,
8711 
8712 } acamera_metadata_enum_android_tonemap_preset_curve_t;
8713 
8714 
8715 
8716 // ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
8717 typedef enum acamera_metadata_enum_acamera_info_supported_hardware_level {
8718     /**
8719      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
8720      * better.</p>
8721      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
8722      * {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
8723      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
8724      * support for color image capture. The only exception is that the device may
8725      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
8726      * measurements and not color images.</p>
8727      * <p><code>LIMITED</code> devices and above require the use of ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8728      * to lock exposure metering (and calculate flash power, for cameras with flash) before
8729      * capturing a high-quality still image.</p>
8730      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
8731      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
8732      * supported for ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AF_MODE, or
8733      * ACAMERA_CONTROL_AWB_MODE)</p>
8734      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
8735      * can be checked for in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
8736      *
8737      * @see ACAMERA_CONTROL_AE_MODE
8738      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8739      * @see ACAMERA_CONTROL_AF_MODE
8740      * @see ACAMERA_CONTROL_AWB_MODE
8741      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8742      */
8743     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED                    = 0,
8744 
8745     /**
8746      * <p>This camera device is capable of supporting advanced imaging applications.</p>
8747      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
8748      * {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
8749      * <p>A <code>FULL</code> device will support below capabilities:</p>
8750      * <ul>
8751      * <li><code>BURST_CAPTURE</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
8752      *   <code>BURST_CAPTURE</code>)</li>
8753      * <li>Per frame control (ACAMERA_SYNC_MAX_LATENCY <code>==</code> PER_FRAME_CONTROL)</li>
8754      * <li>Manual sensor control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains <code>MANUAL_SENSOR</code>)</li>
8755      * <li>Manual post-processing control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
8756      *   <code>MANUAL_POST_PROCESSING</code>)</li>
8757      * <li>The required exposure time range defined in ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
8758      * <li>The required maxFrameDuration defined in ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
8759      * </ul>
8760      * <p>Note:
8761      * Pre-API level 23, FULL devices also supported arbitrary cropping region
8762      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>); this requirement was relaxed in API level
8763      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
8764      *
8765      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8766      * @see ACAMERA_SCALER_CROPPING_TYPE
8767      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
8768      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
8769      * @see ACAMERA_SYNC_MAX_LATENCY
8770      */
8771     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_FULL                       = 1,
8772 
8773     /**
8774      * <p>This camera device is running in backward compatibility mode.</p>
8775      * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are supported.</p>
8776      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
8777      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
8778      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
8779      * <code>LEGACY</code> device in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
8780      * <p>In addition, the ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is not functional on <code>LEGACY</code>
8781      * devices. Instead, every request that includes a JPEG-format output target is treated
8782      * as triggering a still capture, internally executing a precapture trigger.  This may
8783      * fire the flash for flash power metering during precapture, and then fire the flash
8784      * for the final capture, if a flash is available on the device and the AE mode is set to
8785      * enable the flash.</p>
8786      * <p>Devices that initially shipped with Android version <a href="https://developer.android.com/reference/android/os/Build/VERSION_CODES.html#Q">Q</a> or newer will not include any LEGACY-level devices.</p>
8787      *
8788      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8789      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8790      */
8791     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY                     = 2,
8792 
8793     /**
8794      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
8795      * FULL-level capabilities.</p>
8796      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
8797      * <code>LIMITED</code> tables in the {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
8798      * <p>The following additional capabilities are guaranteed to be supported:</p>
8799      * <ul>
8800      * <li><code>YUV_REPROCESSING</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
8801      *   <code>YUV_REPROCESSING</code>)</li>
8802      * <li><code>RAW</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
8803      *   <code>RAW</code>)</li>
8804      * </ul>
8805      *
8806      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8807      */
8808     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_3                          = 3,
8809 
8810     /**
8811      * <p>This camera device is backed by an external camera connected to this Android device.</p>
8812      * <p>The device has capability identical to a LIMITED level device, with the following
8813      * exceptions:</p>
8814      * <ul>
8815      * <li>The device may not report lens/sensor related information such as<ul>
8816      * <li>ACAMERA_LENS_FOCAL_LENGTH</li>
8817      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
8818      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
8819      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
8820      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
8821      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
8822      * <li>ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW</li>
8823      * </ul>
8824      * </li>
8825      * <li>The device will report 0 for ACAMERA_SENSOR_ORIENTATION</li>
8826      * <li>The device has less guarantee on stable framerate, as the framerate partly depends
8827      *   on the external camera being used.</li>
8828      * </ul>
8829      *
8830      * @see ACAMERA_LENS_FOCAL_LENGTH
8831      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
8832      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
8833      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
8834      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
8835      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
8836      * @see ACAMERA_SENSOR_ORIENTATION
8837      * @see ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW
8838      */
8839     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL                   = 4,
8840 
8841 } acamera_metadata_enum_android_info_supported_hardware_level_t;
8842 
8843 
8844 // ACAMERA_BLACK_LEVEL_LOCK
8845 typedef enum acamera_metadata_enum_acamera_black_level_lock {
8846     ACAMERA_BLACK_LEVEL_LOCK_OFF                                     = 0,
8847 
8848     ACAMERA_BLACK_LEVEL_LOCK_ON                                      = 1,
8849 
8850 } acamera_metadata_enum_android_black_level_lock_t;
8851 
8852 
8853 // ACAMERA_SYNC_FRAME_NUMBER
8854 typedef enum acamera_metadata_enum_acamera_sync_frame_number {
8855     /**
8856      * <p>The current result is not yet fully synchronized to any request.</p>
8857      * <p>Synchronization is in progress, and reading metadata from this
8858      * result may include a mix of data that have taken effect since the
8859      * last synchronization time.</p>
8860      * <p>In some future result, within ACAMERA_SYNC_MAX_LATENCY frames,
8861      * this value will update to the actual frame number frame number
8862      * the result is guaranteed to be synchronized to (as long as the
8863      * request settings remain constant).</p>
8864      *
8865      * @see ACAMERA_SYNC_MAX_LATENCY
8866      */
8867     ACAMERA_SYNC_FRAME_NUMBER_CONVERGING                             = -1,
8868 
8869     /**
8870      * <p>The current result's synchronization status is unknown.</p>
8871      * <p>The result may have already converged, or it may be in
8872      * progress.  Reading from this result may include some mix
8873      * of settings from past requests.</p>
8874      * <p>After a settings change, the new settings will eventually all
8875      * take effect for the output buffers and results. However, this
8876      * value will not change when that happens. Altering settings
8877      * rapidly may provide outcomes using mixes of settings from recent
8878      * requests.</p>
8879      * <p>This value is intended primarily for backwards compatibility with
8880      * the older camera implementations (for android.hardware.Camera).</p>
8881      */
8882     ACAMERA_SYNC_FRAME_NUMBER_UNKNOWN                                = -2,
8883 
8884 } acamera_metadata_enum_android_sync_frame_number_t;
8885 
8886 // ACAMERA_SYNC_MAX_LATENCY
8887 typedef enum acamera_metadata_enum_acamera_sync_max_latency {
8888     /**
8889      * <p>Every frame has the requests immediately applied.</p>
8890      * <p>Changing controls over multiple requests one after another will
8891      * produce results that have those controls applied atomically
8892      * each frame.</p>
8893      * <p>All FULL capability devices will have this as their maxLatency.</p>
8894      */
8895     ACAMERA_SYNC_MAX_LATENCY_PER_FRAME_CONTROL                       = 0,
8896 
8897     /**
8898      * <p>Each new frame has some subset (potentially the entire set)
8899      * of the past requests applied to the camera settings.</p>
8900      * <p>By submitting a series of identical requests, the camera device
8901      * will eventually have the camera settings applied, but it is
8902      * unknown when that exact point will be.</p>
8903      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
8904      */
8905     ACAMERA_SYNC_MAX_LATENCY_UNKNOWN                                 = -1,
8906 
8907 } acamera_metadata_enum_android_sync_max_latency_t;
8908 
8909 
8910 
8911 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
8912 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations {
8913     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT       = 0,
8914 
8915     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT        = 1,
8916 
8917 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_t;
8918 
8919 // ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
8920 typedef enum acamera_metadata_enum_acamera_depth_depth_is_exclusive {
8921     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE                           = 0,
8922 
8923     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE                            = 1,
8924 
8925 } acamera_metadata_enum_android_depth_depth_is_exclusive_t;
8926 
8927 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
8928 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations {
8929     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT
8930                                                                       = 0,
8931 
8932     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT
8933                                                                       = 1,
8934 
8935 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t;
8936 
8937 
8938 // ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
8939 typedef enum acamera_metadata_enum_acamera_logical_multi_camera_sensor_sync_type {
8940     /**
8941      * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
8942      * the timestamp of an image from a physical stream is only an approximation of the
8943      * image sensor start-of-exposure time.</p>
8944      */
8945     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE        = 0,
8946 
8947     /**
8948      * <p>The camera device supports frame timestamp synchronization at the hardware level,
8949      * and the timestamp of a physical stream image accurately reflects its
8950      * start-of-exposure time.</p>
8951      */
8952     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED         = 1,
8953 
8954 } acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t;
8955 
8956 
8957 // ACAMERA_DISTORTION_CORRECTION_MODE
8958 typedef enum acamera_metadata_enum_acamera_distortion_correction_mode {
8959     /**
8960      * <p>No distortion correction is applied.</p>
8961      */
8962     ACAMERA_DISTORTION_CORRECTION_MODE_OFF                           = 0,
8963 
8964     /**
8965      * <p>Lens distortion correction is applied without reducing frame rate
8966      * relative to sensor output. It may be the same as OFF if distortion correction would
8967      * reduce frame rate relative to sensor.</p>
8968      */
8969     ACAMERA_DISTORTION_CORRECTION_MODE_FAST                          = 1,
8970 
8971     /**
8972      * <p>High-quality distortion correction is applied, at the cost of
8973      * possibly reduced frame rate relative to sensor output.</p>
8974      */
8975     ACAMERA_DISTORTION_CORRECTION_MODE_HIGH_QUALITY                  = 2,
8976 
8977 } acamera_metadata_enum_android_distortion_correction_mode_t;
8978 
8979 
8980 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
8981 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations {
8982     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT         = 0,
8983 
8984     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT          = 1,
8985 
8986 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_t;
8987 
8988 
8989 
8990 #endif /* __ANDROID_API__ >= 24 */
8991 
8992 __END_DECLS
8993 
8994 #endif /* _NDK_CAMERA_METADATA_TAGS_H */
8995 
8996 /** @} */
8997