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 
44 typedef enum acamera_metadata_section {
45     ACAMERA_COLOR_CORRECTION,
46     ACAMERA_CONTROL,
47     ACAMERA_DEMOSAIC,
48     ACAMERA_EDGE,
49     ACAMERA_FLASH,
50     ACAMERA_FLASH_INFO,
51     ACAMERA_HOT_PIXEL,
52     ACAMERA_JPEG,
53     ACAMERA_LENS,
54     ACAMERA_LENS_INFO,
55     ACAMERA_NOISE_REDUCTION,
56     ACAMERA_QUIRKS,
57     ACAMERA_REQUEST,
58     ACAMERA_SCALER,
59     ACAMERA_SENSOR,
60     ACAMERA_SENSOR_INFO,
61     ACAMERA_SHADING,
62     ACAMERA_STATISTICS,
63     ACAMERA_STATISTICS_INFO,
64     ACAMERA_TONEMAP,
65     ACAMERA_LED,
66     ACAMERA_INFO,
67     ACAMERA_BLACK_LEVEL,
68     ACAMERA_SYNC,
69     ACAMERA_REPROCESS,
70     ACAMERA_DEPTH,
71     ACAMERA_LOGICAL_MULTI_CAMERA,
72     ACAMERA_DISTORTION_CORRECTION,
73     ACAMERA_HEIC,
74     ACAMERA_HEIC_INFO,
75     ACAMERA_SECTION_COUNT,
76 
77     ACAMERA_VENDOR = 0x8000
78 } acamera_metadata_section_t;
79 
80 /**
81  * Hierarchy positions in enum space.
82  */
83 typedef enum acamera_metadata_section_start {
84     ACAMERA_COLOR_CORRECTION_START = ACAMERA_COLOR_CORRECTION  << 16,
85     ACAMERA_CONTROL_START          = ACAMERA_CONTROL           << 16,
86     ACAMERA_DEMOSAIC_START         = ACAMERA_DEMOSAIC          << 16,
87     ACAMERA_EDGE_START             = ACAMERA_EDGE              << 16,
88     ACAMERA_FLASH_START            = ACAMERA_FLASH             << 16,
89     ACAMERA_FLASH_INFO_START       = ACAMERA_FLASH_INFO        << 16,
90     ACAMERA_HOT_PIXEL_START        = ACAMERA_HOT_PIXEL         << 16,
91     ACAMERA_JPEG_START             = ACAMERA_JPEG              << 16,
92     ACAMERA_LENS_START             = ACAMERA_LENS              << 16,
93     ACAMERA_LENS_INFO_START        = ACAMERA_LENS_INFO         << 16,
94     ACAMERA_NOISE_REDUCTION_START  = ACAMERA_NOISE_REDUCTION   << 16,
95     ACAMERA_QUIRKS_START           = ACAMERA_QUIRKS            << 16,
96     ACAMERA_REQUEST_START          = ACAMERA_REQUEST           << 16,
97     ACAMERA_SCALER_START           = ACAMERA_SCALER            << 16,
98     ACAMERA_SENSOR_START           = ACAMERA_SENSOR            << 16,
99     ACAMERA_SENSOR_INFO_START      = ACAMERA_SENSOR_INFO       << 16,
100     ACAMERA_SHADING_START          = ACAMERA_SHADING           << 16,
101     ACAMERA_STATISTICS_START       = ACAMERA_STATISTICS        << 16,
102     ACAMERA_STATISTICS_INFO_START  = ACAMERA_STATISTICS_INFO   << 16,
103     ACAMERA_TONEMAP_START          = ACAMERA_TONEMAP           << 16,
104     ACAMERA_LED_START              = ACAMERA_LED               << 16,
105     ACAMERA_INFO_START             = ACAMERA_INFO              << 16,
106     ACAMERA_BLACK_LEVEL_START      = ACAMERA_BLACK_LEVEL       << 16,
107     ACAMERA_SYNC_START             = ACAMERA_SYNC              << 16,
108     ACAMERA_REPROCESS_START        = ACAMERA_REPROCESS         << 16,
109     ACAMERA_DEPTH_START            = ACAMERA_DEPTH             << 16,
110     ACAMERA_LOGICAL_MULTI_CAMERA_START
111                                    = ACAMERA_LOGICAL_MULTI_CAMERA
112                                                                 << 16,
113     ACAMERA_DISTORTION_CORRECTION_START
114                                    = ACAMERA_DISTORTION_CORRECTION
115                                                                 << 16,
116     ACAMERA_HEIC_START             = ACAMERA_HEIC              << 16,
117     ACAMERA_HEIC_INFO_START        = ACAMERA_HEIC_INFO         << 16,
118     ACAMERA_VENDOR_START           = ACAMERA_VENDOR            << 16
119 } acamera_metadata_section_start_t;
120 
121 /**
122  * Main enum for camera metadata tags.
123  */
124 typedef enum acamera_metadata_tag {
125     /**
126      * <p>The mode control selects how the image data is converted from the
127      * sensor's native color into linear sRGB color.</p>
128      *
129      * <p>Type: byte (acamera_metadata_enum_android_color_correction_mode_t)</p>
130      *
131      * <p>This tag may appear in:
132      * <ul>
133      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
134      *   <li>ACaptureRequest</li>
135      * </ul></p>
136      *
137      * <p>When auto-white balance (AWB) is enabled with ACAMERA_CONTROL_AWB_MODE, this
138      * control is overridden by the AWB routine. When AWB is disabled, the
139      * application controls how the color mapping is performed.</p>
140      * <p>We define the expected processing pipeline below. For consistency
141      * across devices, this is always the case with TRANSFORM_MATRIX.</p>
142      * <p>When either FAST or HIGH_QUALITY is used, the camera device may
143      * do additional processing but ACAMERA_COLOR_CORRECTION_GAINS and
144      * ACAMERA_COLOR_CORRECTION_TRANSFORM will still be provided by the
145      * camera device (in the results) and be roughly correct.</p>
146      * <p>Switching to TRANSFORM_MATRIX and using the data provided from
147      * FAST or HIGH_QUALITY will yield a picture with the same white point
148      * as what was produced by the camera device in the earlier frame.</p>
149      * <p>The expected processing pipeline is as follows:</p>
150      * <p><img alt="White balance processing pipeline" src="../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
151      * <p>The white balance is encoded by two values, a 4-channel white-balance
152      * gain vector (applied in the Bayer domain), and a 3x3 color transform
153      * matrix (applied after demosaic).</p>
154      * <p>The 4-channel white-balance gains are defined as:</p>
155      * <pre><code>ACAMERA_COLOR_CORRECTION_GAINS = [ R G_even G_odd B ]
156      * </code></pre>
157      * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
158      * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
159      * These may be identical for a given camera device implementation; if
160      * the camera device does not support a separate gain for even/odd green
161      * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
162      * <code>G_even</code> in the output result metadata.</p>
163      * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
164      * <pre><code>ACAMERA_COLOR_CORRECTION_TRANSFORM = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
165      * </code></pre>
166      * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
167      * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
168      * <p>with colors as follows:</p>
169      * <pre><code>r' = I0r + I1g + I2b
170      * g' = I3r + I4g + I5b
171      * b' = I6r + I7g + I8b
172      * </code></pre>
173      * <p>Both the input and output value ranges must match. Overflow/underflow
174      * values are clipped to fit within the range.</p>
175      *
176      * @see ACAMERA_COLOR_CORRECTION_GAINS
177      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
178      * @see ACAMERA_CONTROL_AWB_MODE
179      */
180     ACAMERA_COLOR_CORRECTION_MODE =                             // byte (acamera_metadata_enum_android_color_correction_mode_t)
181             ACAMERA_COLOR_CORRECTION_START,
182     /**
183      * <p>A color transform matrix to use to transform
184      * from sensor RGB color space to output linear sRGB color space.</p>
185      *
186      * <p>Type: rational[3*3]</p>
187      *
188      * <p>This tag may appear in:
189      * <ul>
190      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
191      *   <li>ACaptureRequest</li>
192      * </ul></p>
193      *
194      * <p>This matrix is either set by the camera device when the request
195      * ACAMERA_COLOR_CORRECTION_MODE is not TRANSFORM_MATRIX, or
196      * directly by the application in the request when the
197      * ACAMERA_COLOR_CORRECTION_MODE is TRANSFORM_MATRIX.</p>
198      * <p>In the latter case, the camera device may round the matrix to account
199      * for precision issues; the final rounded matrix should be reported back
200      * in this matrix result metadata. The transform should keep the magnitude
201      * of the output color values within <code>[0, 1.0]</code> (assuming input color
202      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
203      * <p>The valid range of each matrix element varies on different devices, but
204      * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
205      *
206      * @see ACAMERA_COLOR_CORRECTION_MODE
207      */
208     ACAMERA_COLOR_CORRECTION_TRANSFORM =                        // rational[3*3]
209             ACAMERA_COLOR_CORRECTION_START + 1,
210     /**
211      * <p>Gains applying to Bayer raw color channels for
212      * white-balance.</p>
213      *
214      * <p>Type: float[4]</p>
215      *
216      * <p>This tag may appear in:
217      * <ul>
218      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
219      *   <li>ACaptureRequest</li>
220      * </ul></p>
221      *
222      * <p>These per-channel gains are either set by the camera device
223      * when the request ACAMERA_COLOR_CORRECTION_MODE is not
224      * TRANSFORM_MATRIX, or directly by the application in the
225      * request when the ACAMERA_COLOR_CORRECTION_MODE is
226      * TRANSFORM_MATRIX.</p>
227      * <p>The gains in the result metadata are the gains actually
228      * applied by the camera device to the current frame.</p>
229      * <p>The valid range of gains varies on different devices, but gains
230      * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
231      * device allows gains below 1.0, this is usually not recommended because
232      * this can create color artifacts.</p>
233      *
234      * @see ACAMERA_COLOR_CORRECTION_MODE
235      */
236     ACAMERA_COLOR_CORRECTION_GAINS =                            // float[4]
237             ACAMERA_COLOR_CORRECTION_START + 2,
238     /**
239      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
240      *
241      * <p>Type: byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)</p>
242      *
243      * <p>This tag may appear in:
244      * <ul>
245      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
246      *   <li>ACaptureRequest</li>
247      * </ul></p>
248      *
249      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
250      * can not focus on the same point after exiting from the lens. This metadata defines
251      * the high level control of chromatic aberration correction algorithm, which aims to
252      * minimize the chromatic artifacts that may occur along the object boundaries in an
253      * image.</p>
254      * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
255      * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
256      * use the highest-quality aberration correction algorithms, even if it slows down
257      * capture rate. FAST means the camera device will not slow down capture rate when
258      * applying aberration correction.</p>
259      * <p>LEGACY devices will always be in FAST mode.</p>
260      */
261     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE =                  // byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)
262             ACAMERA_COLOR_CORRECTION_START + 3,
263     /**
264      * <p>List of aberration correction modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE that are
265      * supported by this camera device.</p>
266      *
267      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
268      *
269      * <p>Type: byte[n]</p>
270      *
271      * <p>This tag may appear in:
272      * <ul>
273      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
274      * </ul></p>
275      *
276      * <p>This key lists the valid modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE.  If no
277      * aberration correction modes are available for a device, this list will solely include
278      * OFF mode. All camera devices will support either OFF or FAST mode.</p>
279      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
280      * OFF mode. This includes all FULL level devices.</p>
281      * <p>LEGACY devices will always only support FAST mode.</p>
282      *
283      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
284      */
285     ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =       // byte[n]
286             ACAMERA_COLOR_CORRECTION_START + 4,
287     ACAMERA_COLOR_CORRECTION_END,
288 
289     /**
290      * <p>The desired setting for the camera device's auto-exposure
291      * algorithm's antibanding compensation.</p>
292      *
293      * <p>Type: byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)</p>
294      *
295      * <p>This tag may appear in:
296      * <ul>
297      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
298      *   <li>ACaptureRequest</li>
299      * </ul></p>
300      *
301      * <p>Some kinds of lighting fixtures, such as some fluorescent
302      * lights, flicker at the rate of the power supply frequency
303      * (60Hz or 50Hz, depending on country). While this is
304      * typically not noticeable to a person, it can be visible to
305      * a camera device. If a camera sets its exposure time to the
306      * wrong value, the flicker may become visible in the
307      * viewfinder as flicker or in a final captured image, as a
308      * set of variable-brightness bands across the image.</p>
309      * <p>Therefore, the auto-exposure routines of camera devices
310      * include antibanding routines that ensure that the chosen
311      * exposure value will not cause such banding. The choice of
312      * exposure time depends on the rate of flicker, which the
313      * camera device can detect automatically, or the expected
314      * rate can be selected by the application using this
315      * control.</p>
316      * <p>A given camera device may not support all of the possible
317      * options for the antibanding mode. The
318      * ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES key contains
319      * the available modes for a given camera device.</p>
320      * <p>AUTO mode is the default if it is available on given
321      * camera device. When AUTO mode is not available, the
322      * default will be either 50HZ or 60HZ, and both 50HZ
323      * and 60HZ will be available.</p>
324      * <p>If manual exposure control is enabled (by setting
325      * ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE to OFF),
326      * then this setting has no effect, and the application must
327      * ensure it selects exposure times that do not cause banding
328      * issues. The ACAMERA_STATISTICS_SCENE_FLICKER key can assist
329      * the application in this.</p>
330      *
331      * @see ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
332      * @see ACAMERA_CONTROL_AE_MODE
333      * @see ACAMERA_CONTROL_MODE
334      * @see ACAMERA_STATISTICS_SCENE_FLICKER
335      */
336     ACAMERA_CONTROL_AE_ANTIBANDING_MODE =                       // byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)
337             ACAMERA_CONTROL_START,
338     /**
339      * <p>Adjustment to auto-exposure (AE) target image
340      * brightness.</p>
341      *
342      * <p>Type: int32</p>
343      *
344      * <p>This tag may appear in:
345      * <ul>
346      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
347      *   <li>ACaptureRequest</li>
348      * </ul></p>
349      *
350      * <p>The adjustment is measured as a count of steps, with the
351      * step size defined by ACAMERA_CONTROL_AE_COMPENSATION_STEP and the
352      * allowed range by ACAMERA_CONTROL_AE_COMPENSATION_RANGE.</p>
353      * <p>For example, if the exposure value (EV) step is 0.333, '6'
354      * will mean an exposure compensation of +2 EV; -3 will mean an
355      * exposure compensation of -1 EV. One EV represents a doubling
356      * of image brightness. Note that this control will only be
357      * effective if ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF. This control
358      * will take effect even when ACAMERA_CONTROL_AE_LOCK <code>== true</code>.</p>
359      * <p>In the event of exposure compensation value being changed, camera device
360      * may take several frames to reach the newly requested exposure target.
361      * During that time, ACAMERA_CONTROL_AE_STATE field will be in the SEARCHING
362      * state. Once the new exposure target is reached, ACAMERA_CONTROL_AE_STATE will
363      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
364      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
365      *
366      * @see ACAMERA_CONTROL_AE_COMPENSATION_RANGE
367      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
368      * @see ACAMERA_CONTROL_AE_LOCK
369      * @see ACAMERA_CONTROL_AE_MODE
370      * @see ACAMERA_CONTROL_AE_STATE
371      */
372     ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION =                  // int32
373             ACAMERA_CONTROL_START + 1,
374     /**
375      * <p>Whether auto-exposure (AE) is currently locked to its latest
376      * calculated values.</p>
377      *
378      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_t)</p>
379      *
380      * <p>This tag may appear in:
381      * <ul>
382      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
383      *   <li>ACaptureRequest</li>
384      * </ul></p>
385      *
386      * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
387      * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
388      * <p>Note that even when AE is locked, the flash may be fired if
389      * the ACAMERA_CONTROL_AE_MODE is ON_AUTO_FLASH /
390      * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
391      * <p>When ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION is changed, even if the AE lock
392      * is ON, the camera device will still adjust its exposure value.</p>
393      * <p>If AE precapture is triggered (see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER)
394      * when AE is already locked, the camera device will not change the exposure time
395      * (ACAMERA_SENSOR_EXPOSURE_TIME) and sensitivity (ACAMERA_SENSOR_SENSITIVITY)
396      * parameters. The flash may be fired if the ACAMERA_CONTROL_AE_MODE
397      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
398      * ACAMERA_CONTROL_AE_MODE is ON_ALWAYS_FLASH, the scene may become overexposed.
399      * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
400      * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
401      * the AE if AE is locked by the camera device internally during precapture metering
402      * sequence In other words, submitting requests with AE unlock has no effect for an
403      * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
404      * will never succeed in a sequence of preview requests where AE lock is always set
405      * to <code>false</code>.</p>
406      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
407      * get locked do not necessarily correspond to the settings that were present in the
408      * latest capture result received from the camera device, since additional captures
409      * and AE updates may have occurred even before the result was sent out. If an
410      * application is switching between automatic and manual control and wishes to eliminate
411      * any flicker during the switch, the following procedure is recommended:</p>
412      * <ol>
413      * <li>Starting in auto-AE mode:</li>
414      * <li>Lock AE</li>
415      * <li>Wait for the first result to be output that has the AE locked</li>
416      * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
417      * <li>Submit the capture request, proceed to run manual AE as desired.</li>
418      * </ol>
419      * <p>See ACAMERA_CONTROL_AE_STATE for AE lock related state transition details.</p>
420      *
421      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
422      * @see ACAMERA_CONTROL_AE_MODE
423      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
424      * @see ACAMERA_CONTROL_AE_STATE
425      * @see ACAMERA_SENSOR_EXPOSURE_TIME
426      * @see ACAMERA_SENSOR_SENSITIVITY
427      */
428     ACAMERA_CONTROL_AE_LOCK =                                   // byte (acamera_metadata_enum_android_control_ae_lock_t)
429             ACAMERA_CONTROL_START + 2,
430     /**
431      * <p>The desired mode for the camera device's
432      * auto-exposure routine.</p>
433      *
434      * <p>Type: byte (acamera_metadata_enum_android_control_ae_mode_t)</p>
435      *
436      * <p>This tag may appear in:
437      * <ul>
438      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
439      *   <li>ACaptureRequest</li>
440      * </ul></p>
441      *
442      * <p>This control is only effective if ACAMERA_CONTROL_MODE is
443      * AUTO.</p>
444      * <p>When set to any of the ON modes, the camera device's
445      * auto-exposure routine is enabled, overriding the
446      * application's selected exposure time, sensor sensitivity,
447      * and frame duration (ACAMERA_SENSOR_EXPOSURE_TIME,
448      * ACAMERA_SENSOR_SENSITIVITY, and
449      * ACAMERA_SENSOR_FRAME_DURATION). If one of the FLASH modes
450      * is selected, the camera device's flash unit controls are
451      * also overridden.</p>
452      * <p>The FLASH modes are only available if the camera device
453      * has a flash unit (ACAMERA_FLASH_INFO_AVAILABLE is <code>true</code>).</p>
454      * <p>If flash TORCH mode is desired, this field must be set to
455      * ON or OFF, and ACAMERA_FLASH_MODE set to TORCH.</p>
456      * <p>When set to any of the ON modes, the values chosen by the
457      * camera device auto-exposure routine for the overridden
458      * fields for a given capture will be available in its
459      * CaptureResult.</p>
460      *
461      * @see ACAMERA_CONTROL_MODE
462      * @see ACAMERA_FLASH_INFO_AVAILABLE
463      * @see ACAMERA_FLASH_MODE
464      * @see ACAMERA_SENSOR_EXPOSURE_TIME
465      * @see ACAMERA_SENSOR_FRAME_DURATION
466      * @see ACAMERA_SENSOR_SENSITIVITY
467      */
468     ACAMERA_CONTROL_AE_MODE =                                   // byte (acamera_metadata_enum_android_control_ae_mode_t)
469             ACAMERA_CONTROL_START + 3,
470     /**
471      * <p>List of metering areas to use for auto-exposure adjustment.</p>
472      *
473      * <p>Type: int32[5*area_count]</p>
474      *
475      * <p>This tag may appear in:
476      * <ul>
477      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
478      *   <li>ACaptureRequest</li>
479      * </ul></p>
480      *
481      * <p>Not available if android.control.maxRegionsAe is 0.
482      * Otherwise will always be present.</p>
483      * <p>The maximum number of regions supported by the device is determined by the value
484      * of android.control.maxRegionsAe.</p>
485      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
486      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
487      * the top-left pixel in the active pixel array, and
488      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
489      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
490      * active pixel array.</p>
491      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
492      * system depends on the mode being set.
493      * When the distortion correction mode is OFF, the coordinate system follows
494      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
495      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
496      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
497      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
498      * pixel in the pre-correction active pixel array.
499      * When the distortion correction mode is not OFF, the coordinate system follows
500      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
501      * <code>(0, 0)</code> being the top-left pixel of the active array, and
502      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
503      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
504      * active pixel array.</p>
505      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
506      * for every pixel in the area. This means that a large metering area
507      * with the same weight as a smaller area will have more effect in
508      * the metering result. Metering areas can partially overlap and the
509      * camera device will add the weights in the overlap region.</p>
510      * <p>The weights are relative to weights of other exposure metering regions, so if only one
511      * region is used, all non-zero weights will have the same effect. A region with 0
512      * weight is ignored.</p>
513      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
514      * camera device.</p>
515      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
516      * capture result metadata, the camera device will ignore the sections outside the crop
517      * region and output only the intersection rectangle as the metering region in the result
518      * metadata.  If the region is entirely outside the crop region, it will be ignored and
519      * not reported in the result metadata.</p>
520      * <p>Starting from API level 30, the coordinate system of activeArraySize or
521      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
522      * pre-zoom field of view. This means that the same aeRegions values at different
523      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The aeRegions
524      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
525      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
526      * aeRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
527      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
528      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
529      * mode.</p>
530      * <p>For camera devices with the
531      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
532      * capability,
533      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
534      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
535      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
536      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
537      * <p>The data representation is <code>int[5 * area_count]</code>.
538      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
539      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
540      * ymax.</p>
541      *
542      * @see ACAMERA_CONTROL_ZOOM_RATIO
543      * @see ACAMERA_DISTORTION_CORRECTION_MODE
544      * @see ACAMERA_SCALER_CROP_REGION
545      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
546      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
547      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
548      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
549      * @see ACAMERA_SENSOR_PIXEL_MODE
550      */
551     ACAMERA_CONTROL_AE_REGIONS =                                // int32[5*area_count]
552             ACAMERA_CONTROL_START + 4,
553     /**
554      * <p>Range over which the auto-exposure routine can
555      * adjust the capture frame rate to maintain good
556      * exposure.</p>
557      *
558      * <p>Type: int32[2]</p>
559      *
560      * <p>This tag may appear in:
561      * <ul>
562      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
563      *   <li>ACaptureRequest</li>
564      * </ul></p>
565      *
566      * <p>Only constrains auto-exposure (AE) algorithm, not
567      * manual control of ACAMERA_SENSOR_EXPOSURE_TIME and
568      * ACAMERA_SENSOR_FRAME_DURATION.</p>
569      *
570      * @see ACAMERA_SENSOR_EXPOSURE_TIME
571      * @see ACAMERA_SENSOR_FRAME_DURATION
572      */
573     ACAMERA_CONTROL_AE_TARGET_FPS_RANGE =                       // int32[2]
574             ACAMERA_CONTROL_START + 5,
575     /**
576      * <p>Whether the camera device will trigger a precapture
577      * metering sequence when it processes this request.</p>
578      *
579      * <p>Type: byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)</p>
580      *
581      * <p>This tag may appear in:
582      * <ul>
583      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
584      *   <li>ACaptureRequest</li>
585      * </ul></p>
586      *
587      * <p>This entry is normally set to IDLE, or is not
588      * included at all in the request settings. When included and
589      * set to START, the camera device will trigger the auto-exposure (AE)
590      * precapture metering sequence.</p>
591      * <p>When set to CANCEL, the camera device will cancel any active
592      * precapture metering trigger, and return to its initial AE state.
593      * If a precapture metering sequence is already completed, and the camera
594      * device has implicitly locked the AE for subsequent still capture, the
595      * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
596      * <p>The precapture sequence should be triggered before starting a
597      * high-quality still capture for final metering decisions to
598      * be made, and for firing pre-capture flash pulses to estimate
599      * scene brightness and required final capture flash power, when
600      * the flash is enabled.</p>
601      * <p>Normally, this entry should be set to START for only a
602      * single request, and the application should wait until the
603      * sequence completes before starting a new one.</p>
604      * <p>When a precapture metering sequence is finished, the camera device
605      * may lock the auto-exposure routine internally to be able to accurately expose the
606      * subsequent still capture image (<code>ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE</code>).
607      * For this case, the AE may not resume normal scan if no subsequent still capture is
608      * submitted. To ensure that the AE routine restarts normal scan, the application should
609      * submit a request with <code>ACAMERA_CONTROL_AE_LOCK == true</code>, followed by a request
610      * with <code>ACAMERA_CONTROL_AE_LOCK == false</code>, if the application decides not to submit a
611      * still capture request after the precapture sequence completes. Alternatively, for
612      * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
613      * internally locked AE if the application doesn't submit a still capture request after
614      * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
615      * be used in devices that have earlier API levels.</p>
616      * <p>The exact effect of auto-exposure (AE) precapture trigger
617      * depends on the current AE mode and state; see
618      * ACAMERA_CONTROL_AE_STATE for AE precapture state transition
619      * details.</p>
620      * <p>On LEGACY-level devices, the precapture trigger is not supported;
621      * capturing a high-resolution JPEG image will automatically trigger a
622      * precapture sequence before the high-resolution capture, including
623      * potentially firing a pre-capture flash.</p>
624      * <p>Using the precapture trigger and the auto-focus trigger ACAMERA_CONTROL_AF_TRIGGER
625      * simultaneously is allowed. However, since these triggers often require cooperation between
626      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
627      * focus sweep), the camera device may delay acting on a later trigger until the previous
628      * trigger has been fully handled. This may lead to longer intervals between the trigger and
629      * changes to ACAMERA_CONTROL_AE_STATE indicating the start of the precapture sequence, for
630      * example.</p>
631      * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
632      * the camera device will complete them in the optimal order for that device.</p>
633      *
634      * @see ACAMERA_CONTROL_AE_LOCK
635      * @see ACAMERA_CONTROL_AE_STATE
636      * @see ACAMERA_CONTROL_AF_TRIGGER
637      * @see ACAMERA_CONTROL_CAPTURE_INTENT
638      */
639     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER =                     // byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)
640             ACAMERA_CONTROL_START + 6,
641     /**
642      * <p>Whether auto-focus (AF) is currently enabled, and what
643      * mode it is set to.</p>
644      *
645      * <p>Type: byte (acamera_metadata_enum_android_control_af_mode_t)</p>
646      *
647      * <p>This tag may appear in:
648      * <ul>
649      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
650      *   <li>ACaptureRequest</li>
651      * </ul></p>
652      *
653      * <p>Only effective if ACAMERA_CONTROL_MODE = AUTO and the lens is not fixed focus
654      * (i.e. <code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>). Also note that
655      * when ACAMERA_CONTROL_AE_MODE is OFF, the behavior of AF is device
656      * dependent. It is recommended to lock AF by using ACAMERA_CONTROL_AF_TRIGGER before
657      * setting ACAMERA_CONTROL_AE_MODE to OFF, or set AF mode to OFF when AE is OFF.</p>
658      * <p>If the lens is controlled by the camera device auto-focus algorithm,
659      * the camera device will report the current AF status in ACAMERA_CONTROL_AF_STATE
660      * in result metadata.</p>
661      *
662      * @see ACAMERA_CONTROL_AE_MODE
663      * @see ACAMERA_CONTROL_AF_STATE
664      * @see ACAMERA_CONTROL_AF_TRIGGER
665      * @see ACAMERA_CONTROL_MODE
666      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
667      */
668     ACAMERA_CONTROL_AF_MODE =                                   // byte (acamera_metadata_enum_android_control_af_mode_t)
669             ACAMERA_CONTROL_START + 7,
670     /**
671      * <p>List of metering areas to use for auto-focus.</p>
672      *
673      * <p>Type: int32[5*area_count]</p>
674      *
675      * <p>This tag may appear in:
676      * <ul>
677      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
678      *   <li>ACaptureRequest</li>
679      * </ul></p>
680      *
681      * <p>Not available if android.control.maxRegionsAf is 0.
682      * Otherwise will always be present.</p>
683      * <p>The maximum number of focus areas supported by the device is determined by the value
684      * of android.control.maxRegionsAf.</p>
685      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
686      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
687      * the top-left pixel in the active pixel array, and
688      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
689      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
690      * active pixel array.</p>
691      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
692      * system depends on the mode being set.
693      * When the distortion correction mode is OFF, the coordinate system follows
694      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
695      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
696      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
697      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
698      * pixel in the pre-correction active pixel array.
699      * When the distortion correction mode is not OFF, the coordinate system follows
700      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
701      * <code>(0, 0)</code> being the top-left pixel of the active array, and
702      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
703      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
704      * active pixel array.</p>
705      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
706      * for every pixel in the area. This means that a large metering area
707      * with the same weight as a smaller area will have more effect in
708      * the metering result. Metering areas can partially overlap and the
709      * camera device will add the weights in the overlap region.</p>
710      * <p>The weights are relative to weights of other metering regions, so if only one region
711      * is used, all non-zero weights will have the same effect. A region with 0 weight is
712      * ignored.</p>
713      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
714      * camera device. The capture result will either be a zero weight region as well, or
715      * the region selected by the camera device as the focus area of interest.</p>
716      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
717      * capture result metadata, the camera device will ignore the sections outside the crop
718      * region and output only the intersection rectangle as the metering region in the result
719      * metadata. If the region is entirely outside the crop region, it will be ignored and
720      * not reported in the result metadata.</p>
721      * <p>Starting from API level 30, the coordinate system of activeArraySize or
722      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
723      * pre-zoom field of view. This means that the same afRegions values at different
724      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The afRegions
725      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
726      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
727      * afRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
728      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
729      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
730      * mode.</p>
731      * <p>For camera devices with the
732      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
733      * capability, ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
734      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
735      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
736      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
737      * <p>The data representation is <code>int[5 * area_count]</code>.
738      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
739      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
740      * ymax.</p>
741      *
742      * @see ACAMERA_CONTROL_ZOOM_RATIO
743      * @see ACAMERA_DISTORTION_CORRECTION_MODE
744      * @see ACAMERA_SCALER_CROP_REGION
745      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
746      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
747      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
748      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
749      * @see ACAMERA_SENSOR_PIXEL_MODE
750      */
751     ACAMERA_CONTROL_AF_REGIONS =                                // int32[5*area_count]
752             ACAMERA_CONTROL_START + 8,
753     /**
754      * <p>Whether the camera device will trigger autofocus for this request.</p>
755      *
756      * <p>Type: byte (acamera_metadata_enum_android_control_af_trigger_t)</p>
757      *
758      * <p>This tag may appear in:
759      * <ul>
760      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
761      *   <li>ACaptureRequest</li>
762      * </ul></p>
763      *
764      * <p>This entry is normally set to IDLE, or is not
765      * included at all in the request settings.</p>
766      * <p>When included and set to START, the camera device will trigger the
767      * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
768      * <p>When set to CANCEL, the camera device will cancel any active trigger,
769      * and return to its initial AF state.</p>
770      * <p>Generally, applications should set this entry to START or CANCEL for only a
771      * single capture, and then return it to IDLE (or not set at all). Specifying
772      * START for multiple captures in a row means restarting the AF operation over
773      * and over again.</p>
774      * <p>See ACAMERA_CONTROL_AF_STATE for what the trigger means for each AF mode.</p>
775      * <p>Using the autofocus trigger and the precapture trigger ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
776      * simultaneously is allowed. However, since these triggers often require cooperation between
777      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
778      * focus sweep), the camera device may delay acting on a later trigger until the previous
779      * trigger has been fully handled. This may lead to longer intervals between the trigger and
780      * changes to ACAMERA_CONTROL_AF_STATE, for example.</p>
781      *
782      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
783      * @see ACAMERA_CONTROL_AF_STATE
784      */
785     ACAMERA_CONTROL_AF_TRIGGER =                                // byte (acamera_metadata_enum_android_control_af_trigger_t)
786             ACAMERA_CONTROL_START + 9,
787     /**
788      * <p>Whether auto-white balance (AWB) is currently locked to its
789      * latest calculated values.</p>
790      *
791      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_t)</p>
792      *
793      * <p>This tag may appear in:
794      * <ul>
795      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
796      *   <li>ACaptureRequest</li>
797      * </ul></p>
798      *
799      * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
800      * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
801      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
802      * get locked do not necessarily correspond to the settings that were present in the
803      * latest capture result received from the camera device, since additional captures
804      * and AWB updates may have occurred even before the result was sent out. If an
805      * application is switching between automatic and manual control and wishes to eliminate
806      * any flicker during the switch, the following procedure is recommended:</p>
807      * <ol>
808      * <li>Starting in auto-AWB mode:</li>
809      * <li>Lock AWB</li>
810      * <li>Wait for the first result to be output that has the AWB locked</li>
811      * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
812      * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
813      * </ol>
814      * <p>Note that AWB lock is only meaningful when
815      * ACAMERA_CONTROL_AWB_MODE is in the AUTO mode; in other modes,
816      * AWB is already fixed to a specific setting.</p>
817      * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
818      *
819      * @see ACAMERA_CONTROL_AWB_MODE
820      */
821     ACAMERA_CONTROL_AWB_LOCK =                                  // byte (acamera_metadata_enum_android_control_awb_lock_t)
822             ACAMERA_CONTROL_START + 10,
823     /**
824      * <p>Whether auto-white balance (AWB) is currently setting the color
825      * transform fields, and what its illumination target
826      * is.</p>
827      *
828      * <p>Type: byte (acamera_metadata_enum_android_control_awb_mode_t)</p>
829      *
830      * <p>This tag may appear in:
831      * <ul>
832      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
833      *   <li>ACaptureRequest</li>
834      * </ul></p>
835      *
836      * <p>This control is only effective if ACAMERA_CONTROL_MODE is AUTO.</p>
837      * <p>When set to the AUTO mode, the camera device's auto-white balance
838      * routine is enabled, overriding the application's selected
839      * ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS and
840      * ACAMERA_COLOR_CORRECTION_MODE. Note that when ACAMERA_CONTROL_AE_MODE
841      * is OFF, the behavior of AWB is device dependent. It is recommened to
842      * also set AWB mode to OFF or lock AWB by using ACAMERA_CONTROL_AWB_LOCK before
843      * setting AE mode to OFF.</p>
844      * <p>When set to the OFF mode, the camera device's auto-white balance
845      * routine is disabled. The application manually controls the white
846      * balance by ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS
847      * and ACAMERA_COLOR_CORRECTION_MODE.</p>
848      * <p>When set to any other modes, the camera device's auto-white
849      * balance routine is disabled. The camera device uses each
850      * particular illumination target for white balance
851      * adjustment. The application's values for
852      * ACAMERA_COLOR_CORRECTION_TRANSFORM,
853      * ACAMERA_COLOR_CORRECTION_GAINS and
854      * ACAMERA_COLOR_CORRECTION_MODE are ignored.</p>
855      *
856      * @see ACAMERA_COLOR_CORRECTION_GAINS
857      * @see ACAMERA_COLOR_CORRECTION_MODE
858      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
859      * @see ACAMERA_CONTROL_AE_MODE
860      * @see ACAMERA_CONTROL_AWB_LOCK
861      * @see ACAMERA_CONTROL_MODE
862      */
863     ACAMERA_CONTROL_AWB_MODE =                                  // byte (acamera_metadata_enum_android_control_awb_mode_t)
864             ACAMERA_CONTROL_START + 11,
865     /**
866      * <p>List of metering areas to use for auto-white-balance illuminant
867      * estimation.</p>
868      *
869      * <p>Type: int32[5*area_count]</p>
870      *
871      * <p>This tag may appear in:
872      * <ul>
873      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
874      *   <li>ACaptureRequest</li>
875      * </ul></p>
876      *
877      * <p>Not available if android.control.maxRegionsAwb is 0.
878      * Otherwise will always be present.</p>
879      * <p>The maximum number of regions supported by the device is determined by the value
880      * of android.control.maxRegionsAwb.</p>
881      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
882      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
883      * the top-left pixel in the active pixel array, and
884      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
885      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
886      * active pixel array.</p>
887      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
888      * system depends on the mode being set.
889      * When the distortion correction mode is OFF, the coordinate system follows
890      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
891      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
892      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
893      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
894      * pixel in the pre-correction active pixel array.
895      * When the distortion correction mode is not OFF, the coordinate system follows
896      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
897      * <code>(0, 0)</code> being the top-left pixel of the active array, and
898      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
899      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
900      * active pixel array.</p>
901      * <p>The weight must range from 0 to 1000, and represents a weight
902      * for every pixel in the area. This means that a large metering area
903      * with the same weight as a smaller area will have more effect in
904      * the metering result. Metering areas can partially overlap and the
905      * camera device will add the weights in the overlap region.</p>
906      * <p>The weights are relative to weights of other white balance metering regions, so if
907      * only one region is used, all non-zero weights will have the same effect. A region with
908      * 0 weight is ignored.</p>
909      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
910      * camera device.</p>
911      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
912      * capture result metadata, the camera device will ignore the sections outside the crop
913      * region and output only the intersection rectangle as the metering region in the result
914      * metadata.  If the region is entirely outside the crop region, it will be ignored and
915      * not reported in the result metadata.</p>
916      * <p>Starting from API level 30, the coordinate system of activeArraySize or
917      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
918      * pre-zoom field of view. This means that the same awbRegions values at different
919      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The awbRegions
920      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
921      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
922      * awbRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of
923      * the scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
924      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
925      * mode.</p>
926      * <p>For camera devices with the
927      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
928      * capability, ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
929      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
930      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
931      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
932      * <p>The data representation is <code>int[5 * area_count]</code>.
933      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
934      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
935      * ymax.</p>
936      *
937      * @see ACAMERA_CONTROL_ZOOM_RATIO
938      * @see ACAMERA_DISTORTION_CORRECTION_MODE
939      * @see ACAMERA_SCALER_CROP_REGION
940      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
941      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
942      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
943      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
944      * @see ACAMERA_SENSOR_PIXEL_MODE
945      */
946     ACAMERA_CONTROL_AWB_REGIONS =                               // int32[5*area_count]
947             ACAMERA_CONTROL_START + 12,
948     /**
949      * <p>Information to the camera device 3A (auto-exposure,
950      * auto-focus, auto-white balance) routines about the purpose
951      * of this capture, to help the camera device to decide optimal 3A
952      * strategy.</p>
953      *
954      * <p>Type: byte (acamera_metadata_enum_android_control_capture_intent_t)</p>
955      *
956      * <p>This tag may appear in:
957      * <ul>
958      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
959      *   <li>ACaptureRequest</li>
960      * </ul></p>
961      *
962      * <p>This control (except for MANUAL) is only effective if
963      * <code>ACAMERA_CONTROL_MODE != OFF</code> and any 3A routine is active.</p>
964      * <p>All intents are supported by all devices, except that:
965      *   * ZERO_SHUTTER_LAG will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
966      * PRIVATE_REPROCESSING or YUV_REPROCESSING.
967      *   * MANUAL will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
968      * MANUAL_SENSOR.
969      *   * MOTION_TRACKING will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
970      * MOTION_TRACKING.</p>
971      *
972      * @see ACAMERA_CONTROL_MODE
973      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
974      */
975     ACAMERA_CONTROL_CAPTURE_INTENT =                            // byte (acamera_metadata_enum_android_control_capture_intent_t)
976             ACAMERA_CONTROL_START + 13,
977     /**
978      * <p>A special color effect to apply.</p>
979      *
980      * <p>Type: byte (acamera_metadata_enum_android_control_effect_mode_t)</p>
981      *
982      * <p>This tag may appear in:
983      * <ul>
984      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
985      *   <li>ACaptureRequest</li>
986      * </ul></p>
987      *
988      * <p>When this mode is set, a color effect will be applied
989      * to images produced by the camera device. The interpretation
990      * and implementation of these color effects is left to the
991      * implementor of the camera device, and should not be
992      * depended on to be consistent (or present) across all
993      * devices.</p>
994      */
995     ACAMERA_CONTROL_EFFECT_MODE =                               // byte (acamera_metadata_enum_android_control_effect_mode_t)
996             ACAMERA_CONTROL_START + 14,
997     /**
998      * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
999      * routines.</p>
1000      *
1001      * <p>Type: byte (acamera_metadata_enum_android_control_mode_t)</p>
1002      *
1003      * <p>This tag may appear in:
1004      * <ul>
1005      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1006      *   <li>ACaptureRequest</li>
1007      * </ul></p>
1008      *
1009      * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
1010      * by the camera device is disabled. The application must set the fields for
1011      * capture parameters itself.</p>
1012      * <p>When set to AUTO, the individual algorithm controls in
1013      * ACAMERA_CONTROL_* are in effect, such as ACAMERA_CONTROL_AF_MODE.</p>
1014      * <p>When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
1015      * ACAMERA_CONTROL_* are mostly disabled, and the camera device
1016      * implements one of the scene mode or extended scene mode settings (such as ACTION,
1017      * SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
1018      * 3A settings are provided by {@link ACameraCaptureSession_captureCallback_result capture results}.</p>
1019      * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1020      * is that this frame will not be used by camera device background 3A statistics
1021      * update, as if this frame is never captured. This mode can be used in the scenario
1022      * where the application doesn't want a 3A manual control capture to affect
1023      * the subsequent auto 3A capture results.</p>
1024      *
1025      * @see ACAMERA_CONTROL_AF_MODE
1026      */
1027     ACAMERA_CONTROL_MODE =                                      // byte (acamera_metadata_enum_android_control_mode_t)
1028             ACAMERA_CONTROL_START + 15,
1029     /**
1030      * <p>Control for which scene mode is currently active.</p>
1031      *
1032      * <p>Type: byte (acamera_metadata_enum_android_control_scene_mode_t)</p>
1033      *
1034      * <p>This tag may appear in:
1035      * <ul>
1036      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1037      *   <li>ACaptureRequest</li>
1038      * </ul></p>
1039      *
1040      * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
1041      * capture settings.</p>
1042      * <p>This is the mode that that is active when
1043      * <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
1044      * disable ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
1045      * while in use.</p>
1046      * <p>The interpretation and implementation of these scene modes is left
1047      * to the implementor of the camera device. Their behavior will not be
1048      * consistent across all devices, and any given device may only implement
1049      * a subset of these modes.</p>
1050      *
1051      * @see ACAMERA_CONTROL_AE_MODE
1052      * @see ACAMERA_CONTROL_AF_MODE
1053      * @see ACAMERA_CONTROL_AWB_MODE
1054      * @see ACAMERA_CONTROL_MODE
1055      */
1056     ACAMERA_CONTROL_SCENE_MODE =                                // byte (acamera_metadata_enum_android_control_scene_mode_t)
1057             ACAMERA_CONTROL_START + 16,
1058     /**
1059      * <p>Whether video stabilization is
1060      * active.</p>
1061      *
1062      * <p>Type: byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)</p>
1063      *
1064      * <p>This tag may appear in:
1065      * <ul>
1066      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1067      *   <li>ACaptureRequest</li>
1068      * </ul></p>
1069      *
1070      * <p>Video stabilization automatically warps images from
1071      * the camera in order to stabilize motion between consecutive frames.</p>
1072      * <p>If enabled, video stabilization can modify the
1073      * ACAMERA_SCALER_CROP_REGION to keep the video stream stabilized.</p>
1074      * <p>Switching between different video stabilization modes may take several
1075      * frames to initialize, the camera device will report the current mode
1076      * in capture result metadata. For example, When "ON" mode is requested,
1077      * the video stabilization modes in the first several capture results may
1078      * still be "OFF", and it will become "ON" when the initialization is
1079      * done.</p>
1080      * <p>In addition, not all recording sizes or frame rates may be supported for
1081      * stabilization by a device that reports stabilization support. It is guaranteed
1082      * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
1083      * the recording resolution is less than or equal to 1920 x 1080 (width less than
1084      * or equal to 1920, height less than or equal to 1080), and the recording
1085      * frame rate is less than or equal to 30fps.  At other sizes, the CaptureResult
1086      * ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE field will return
1087      * OFF if the recording output is not stabilized, or if there are no output
1088      * Surface types that can be stabilized.</p>
1089      * <p>If a camera device supports both this mode and OIS
1090      * (ACAMERA_LENS_OPTICAL_STABILIZATION_MODE), turning both modes on may
1091      * produce undesirable interaction, so it is recommended not to enable
1092      * both at the same time.</p>
1093      *
1094      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1095      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
1096      * @see ACAMERA_SCALER_CROP_REGION
1097      */
1098     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE =                  // byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)
1099             ACAMERA_CONTROL_START + 17,
1100     /**
1101      * <p>List of auto-exposure antibanding modes for ACAMERA_CONTROL_AE_ANTIBANDING_MODE that are
1102      * supported by this camera device.</p>
1103      *
1104      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1105      *
1106      * <p>Type: byte[n]</p>
1107      *
1108      * <p>This tag may appear in:
1109      * <ul>
1110      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1111      * </ul></p>
1112      *
1113      * <p>Not all of the auto-exposure anti-banding modes may be
1114      * supported by a given camera device. This field lists the
1115      * valid anti-banding modes that the application may request
1116      * for this camera device with the
1117      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE control.</p>
1118      *
1119      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1120      */
1121     ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =            // byte[n]
1122             ACAMERA_CONTROL_START + 18,
1123     /**
1124      * <p>List of auto-exposure modes for ACAMERA_CONTROL_AE_MODE that are supported by this camera
1125      * device.</p>
1126      *
1127      * @see ACAMERA_CONTROL_AE_MODE
1128      *
1129      * <p>Type: byte[n]</p>
1130      *
1131      * <p>This tag may appear in:
1132      * <ul>
1133      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1134      * </ul></p>
1135      *
1136      * <p>Not all the auto-exposure modes may be supported by a
1137      * given camera device, especially if no flash unit is
1138      * available. This entry lists the valid modes for
1139      * ACAMERA_CONTROL_AE_MODE for this camera device.</p>
1140      * <p>All camera devices support ON, and all camera devices with flash
1141      * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
1142      * <p>FULL mode camera devices always support OFF mode,
1143      * which enables application control of camera exposure time,
1144      * sensitivity, and frame duration.</p>
1145      * <p>LEGACY mode camera devices never support OFF mode.
1146      * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
1147      * capability.</p>
1148      *
1149      * @see ACAMERA_CONTROL_AE_MODE
1150      */
1151     ACAMERA_CONTROL_AE_AVAILABLE_MODES =                        // byte[n]
1152             ACAMERA_CONTROL_START + 19,
1153     /**
1154      * <p>List of frame rate ranges for ACAMERA_CONTROL_AE_TARGET_FPS_RANGE supported by
1155      * this camera device.</p>
1156      *
1157      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
1158      *
1159      * <p>Type: int32[2*n]</p>
1160      *
1161      * <p>This tag may appear in:
1162      * <ul>
1163      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1164      * </ul></p>
1165      *
1166      * <p>For devices at the LEGACY level or above:</p>
1167      * <ul>
1168      * <li>
1169      * <p>For constant-framerate recording, for each normal
1170      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>, that is, a
1171      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1172      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#quality">quality</a> in
1173      * the range [<a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_LOW">QUALITY_LOW</a>,
1174      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_2160P">QUALITY_2160P</a>], if the profile is
1175      * supported by the device and has
1176      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code>, this list will
1177      * always include (<code>x</code>,<code>x</code>).</p>
1178      * </li>
1179      * <li>
1180      * <p>Also, a camera device must either not support any
1181      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>,
1182      * or support at least one
1183      * normal <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1184      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code> &gt;= 24.</p>
1185      * </li>
1186      * </ul>
1187      * <p>For devices at the LIMITED level or above:</p>
1188      * <ul>
1189      * <li>For devices that advertise NIR color filter arrangement in
1190      * ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, this list will always include
1191      * (<code>max</code>, <code>max</code>) where <code>max</code> = the maximum output frame rate of the maximum YUV_420_888
1192      * output size.</li>
1193      * <li>For devices advertising any color filter arrangement other than NIR, or devices not
1194      * advertising color filter arrangement, this list will always include (<code>min</code>, <code>max</code>) and
1195      * (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
1196      * maximum YUV_420_888 output size.</li>
1197      * </ul>
1198      *
1199      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1200      */
1201     ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =            // int32[2*n]
1202             ACAMERA_CONTROL_START + 20,
1203     /**
1204      * <p>Maximum and minimum exposure compensation values for
1205      * ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION, in counts of ACAMERA_CONTROL_AE_COMPENSATION_STEP,
1206      * that are supported by this camera device.</p>
1207      *
1208      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
1209      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1210      *
1211      * <p>Type: int32[2]</p>
1212      *
1213      * <p>This tag may appear in:
1214      * <ul>
1215      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1216      * </ul></p>
1217      *
1218      */
1219     ACAMERA_CONTROL_AE_COMPENSATION_RANGE =                     // int32[2]
1220             ACAMERA_CONTROL_START + 21,
1221     /**
1222      * <p>Smallest step by which the exposure compensation
1223      * can be changed.</p>
1224      *
1225      * <p>Type: rational</p>
1226      *
1227      * <p>This tag may appear in:
1228      * <ul>
1229      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1230      * </ul></p>
1231      *
1232      * <p>This is the unit for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION. For example, if this key has
1233      * a value of <code>1/2</code>, then a setting of <code>-2</code> for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION means
1234      * that the target EV offset for the auto-exposure routine is -1 EV.</p>
1235      * <p>One unit of EV compensation changes the brightness of the captured image by a factor
1236      * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
1237      *
1238      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1239      */
1240     ACAMERA_CONTROL_AE_COMPENSATION_STEP =                      // rational
1241             ACAMERA_CONTROL_START + 22,
1242     /**
1243      * <p>List of auto-focus (AF) modes for ACAMERA_CONTROL_AF_MODE that are
1244      * supported by this camera device.</p>
1245      *
1246      * @see ACAMERA_CONTROL_AF_MODE
1247      *
1248      * <p>Type: byte[n]</p>
1249      *
1250      * <p>This tag may appear in:
1251      * <ul>
1252      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1253      * </ul></p>
1254      *
1255      * <p>Not all the auto-focus modes may be supported by a
1256      * given camera device. This entry lists the valid modes for
1257      * ACAMERA_CONTROL_AF_MODE for this camera device.</p>
1258      * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
1259      * camera devices with adjustable focuser units
1260      * (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>) will support AUTO mode.</p>
1261      * <p>LEGACY devices will support OFF mode only if they support
1262      * focusing to infinity (by also setting ACAMERA_LENS_FOCUS_DISTANCE to
1263      * <code>0.0f</code>).</p>
1264      *
1265      * @see ACAMERA_CONTROL_AF_MODE
1266      * @see ACAMERA_LENS_FOCUS_DISTANCE
1267      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
1268      */
1269     ACAMERA_CONTROL_AF_AVAILABLE_MODES =                        // byte[n]
1270             ACAMERA_CONTROL_START + 23,
1271     /**
1272      * <p>List of color effects for ACAMERA_CONTROL_EFFECT_MODE that are supported by this camera
1273      * device.</p>
1274      *
1275      * @see ACAMERA_CONTROL_EFFECT_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 the color effect modes that can be applied to
1285      * images produced by the camera device.
1286      * Implementations are not expected to be consistent across all devices.
1287      * If no color effect modes are available for a device, this will only list
1288      * OFF.</p>
1289      * <p>A color effect will only be applied if
1290      * ACAMERA_CONTROL_MODE != OFF.  OFF is always included in this list.</p>
1291      * <p>This control has no effect on the operation of other control routines such
1292      * as auto-exposure, white balance, or focus.</p>
1293      *
1294      * @see ACAMERA_CONTROL_MODE
1295      */
1296     ACAMERA_CONTROL_AVAILABLE_EFFECTS =                         // byte[n]
1297             ACAMERA_CONTROL_START + 24,
1298     /**
1299      * <p>List of scene modes for ACAMERA_CONTROL_SCENE_MODE that are supported by this camera
1300      * device.</p>
1301      *
1302      * @see ACAMERA_CONTROL_SCENE_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>This list contains scene modes that can be set for the camera device.
1312      * Only scene modes that have been fully implemented for the
1313      * camera device may be included here. Implementations are not expected
1314      * to be consistent across all devices.</p>
1315      * <p>If no scene modes are supported by the camera device, this
1316      * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
1317      * <p>FACE_PRIORITY is always listed if face detection is
1318      * supported (i.e.<code>ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT &gt;
1319      * 0</code>).</p>
1320      *
1321      * @see ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT
1322      */
1323     ACAMERA_CONTROL_AVAILABLE_SCENE_MODES =                     // byte[n]
1324             ACAMERA_CONTROL_START + 25,
1325     /**
1326      * <p>List of video stabilization modes for ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1327      * that are supported by this camera device.</p>
1328      *
1329      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1330      *
1331      * <p>Type: byte[n]</p>
1332      *
1333      * <p>This tag may appear in:
1334      * <ul>
1335      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1336      * </ul></p>
1337      *
1338      * <p>OFF will always be listed.</p>
1339      */
1340     ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =       // byte[n]
1341             ACAMERA_CONTROL_START + 26,
1342     /**
1343      * <p>List of auto-white-balance modes for ACAMERA_CONTROL_AWB_MODE that are supported by this
1344      * camera device.</p>
1345      *
1346      * @see ACAMERA_CONTROL_AWB_MODE
1347      *
1348      * <p>Type: byte[n]</p>
1349      *
1350      * <p>This tag may appear in:
1351      * <ul>
1352      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1353      * </ul></p>
1354      *
1355      * <p>Not all the auto-white-balance modes may be supported by a
1356      * given camera device. This entry lists the valid modes for
1357      * ACAMERA_CONTROL_AWB_MODE for this camera device.</p>
1358      * <p>All camera devices will support ON mode.</p>
1359      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
1360      * mode, which enables application control of white balance, by using
1361      * ACAMERA_COLOR_CORRECTION_TRANSFORM and ACAMERA_COLOR_CORRECTION_GAINS(ACAMERA_COLOR_CORRECTION_MODE must be set to TRANSFORM_MATRIX). This includes all FULL
1362      * mode camera devices.</p>
1363      *
1364      * @see ACAMERA_COLOR_CORRECTION_GAINS
1365      * @see ACAMERA_COLOR_CORRECTION_MODE
1366      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
1367      * @see ACAMERA_CONTROL_AWB_MODE
1368      */
1369     ACAMERA_CONTROL_AWB_AVAILABLE_MODES =                       // byte[n]
1370             ACAMERA_CONTROL_START + 27,
1371     /**
1372      * <p>List of the maximum number of regions that can be used for metering in
1373      * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
1374      * this corresponds to the maximum number of elements in
1375      * ACAMERA_CONTROL_AE_REGIONS, ACAMERA_CONTROL_AWB_REGIONS,
1376      * and ACAMERA_CONTROL_AF_REGIONS.</p>
1377      *
1378      * @see ACAMERA_CONTROL_AE_REGIONS
1379      * @see ACAMERA_CONTROL_AF_REGIONS
1380      * @see ACAMERA_CONTROL_AWB_REGIONS
1381      *
1382      * <p>Type: int32[3]</p>
1383      *
1384      * <p>This tag may appear in:
1385      * <ul>
1386      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1387      * </ul></p>
1388      *
1389      */
1390     ACAMERA_CONTROL_MAX_REGIONS =                               // int32[3]
1391             ACAMERA_CONTROL_START + 28,
1392     /**
1393      * <p>Current state of the auto-exposure (AE) algorithm.</p>
1394      *
1395      * <p>Type: byte (acamera_metadata_enum_android_control_ae_state_t)</p>
1396      *
1397      * <p>This tag may appear in:
1398      * <ul>
1399      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1400      * </ul></p>
1401      *
1402      * <p>Switching between or enabling AE modes (ACAMERA_CONTROL_AE_MODE) always
1403      * resets the AE state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1404      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1405      * the algorithm states to INACTIVE.</p>
1406      * <p>The camera device can do several state transitions between two results, if it is
1407      * allowed by the state transition table. For example: INACTIVE may never actually be
1408      * seen in a result.</p>
1409      * <p>The state in the result is the state for this image (in sync with this image): if
1410      * AE state becomes CONVERGED, then the image data associated with this result should
1411      * be good to use.</p>
1412      * <p>Below are state transition tables for different AE modes.</p>
1413      * <p>State       | Transition Cause | New State | Notes
1414      * :------------:|:----------------:|:---------:|:-----------------------:
1415      * INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled</p>
1416      * <p>When ACAMERA_CONTROL_AE_MODE is AE_MODE_ON*:</p>
1417      * <p>State        | Transition Cause                             | New State      | Notes
1418      * :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
1419      * INACTIVE       | Camera device initiates AE scan              | SEARCHING      | Values changing
1420      * INACTIVE       | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1421      * SEARCHING      | Camera device finishes AE scan               | CONVERGED      | Good values, not changing
1422      * SEARCHING      | Camera device finishes AE scan               | FLASH_REQUIRED | Converged but too dark w/o flash
1423      * SEARCHING      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1424      * CONVERGED      | Camera device initiates AE scan              | SEARCHING      | Values changing
1425      * CONVERGED      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1426      * FLASH_REQUIRED | Camera device initiates AE scan              | SEARCHING      | Values changing
1427      * FLASH_REQUIRED | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1428      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | SEARCHING      | Values not good after unlock
1429      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | CONVERGED      | Values good after unlock
1430      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | FLASH_REQUIRED | Exposure good, but too dark
1431      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is OFF | CONVERGED      | Ready for high-quality capture
1432      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is ON  | LOCKED         | Ready for high-quality capture
1433      * LOCKED         | aeLock is ON and aePrecaptureTrigger is START | LOCKED        | Precapture trigger is ignored when AE is already locked
1434      * LOCKED         | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED        | Precapture trigger is ignored when AE is already locked
1435      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START | PRECAPTURE     | Start AE precapture metering sequence
1436      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled</p>
1437      * <p>If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
1438      * ACAMERA_CONTROL_AE_AVAILABLE_MODES), ACAMERA_CONTROL_AE_STATE must be FLASH_REQUIRED after
1439      * the camera device finishes AE scan and it's too dark without flash.</p>
1440      * <p>For the above table, the camera device may skip reporting any state changes that happen
1441      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1442      * can be skipped in that manner is called a transient state.</p>
1443      * <p>For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
1444      * listed in above table, it is also legal for the camera device to skip one or more
1445      * transient states between two results. See below table for examples:</p>
1446      * <p>State        | Transition Cause                                            | New State      | Notes
1447      * :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
1448      * INACTIVE       | Camera device finished AE scan                              | CONVERGED      | Values are already good, transient states are skipped by camera device.
1449      * 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.
1450      * 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.
1451      * 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.
1452      * 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.
1453      * 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.
1454      * FLASH_REQUIRED | Camera device finished AE scan                              | CONVERGED      | Converged after a new scan, transient states are skipped by camera device.</p>
1455      *
1456      * @see ACAMERA_CONTROL_AE_AVAILABLE_MODES
1457      * @see ACAMERA_CONTROL_AE_LOCK
1458      * @see ACAMERA_CONTROL_AE_MODE
1459      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
1460      * @see ACAMERA_CONTROL_AE_STATE
1461      * @see ACAMERA_CONTROL_MODE
1462      * @see ACAMERA_CONTROL_SCENE_MODE
1463      */
1464     ACAMERA_CONTROL_AE_STATE =                                  // byte (acamera_metadata_enum_android_control_ae_state_t)
1465             ACAMERA_CONTROL_START + 31,
1466     /**
1467      * <p>Current state of auto-focus (AF) algorithm.</p>
1468      *
1469      * <p>Type: byte (acamera_metadata_enum_android_control_af_state_t)</p>
1470      *
1471      * <p>This tag may appear in:
1472      * <ul>
1473      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1474      * </ul></p>
1475      *
1476      * <p>Switching between or enabling AF modes (ACAMERA_CONTROL_AF_MODE) always
1477      * resets the AF state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1478      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1479      * the algorithm states to INACTIVE.</p>
1480      * <p>The camera device can do several state transitions between two results, if it is
1481      * allowed by the state transition table. For example: INACTIVE may never actually be
1482      * seen in a result.</p>
1483      * <p>The state in the result is the state for this image (in sync with this image): if
1484      * AF state becomes FOCUSED, then the image data associated with this result should
1485      * be sharp.</p>
1486      * <p>Below are state transition tables for different AF modes.</p>
1487      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_OFF or AF_MODE_EDOF:</p>
1488      * <p>State       | Transition Cause | New State | Notes
1489      * :------------:|:----------------:|:---------:|:-----------:
1490      * INACTIVE      |                  | INACTIVE  | Never changes</p>
1491      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1492      * <p>State            | Transition Cause | New State          | Notes
1493      * :-----------------:|:----------------:|:------------------:|:--------------:
1494      * INACTIVE           | AF_TRIGGER       | ACTIVE_SCAN        | Start AF sweep, Lens now moving
1495      * ACTIVE_SCAN        | AF sweep done    | FOCUSED_LOCKED     | Focused, Lens now locked
1496      * ACTIVE_SCAN        | AF sweep done    | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
1497      * ACTIVE_SCAN        | AF_CANCEL        | INACTIVE           | Cancel/reset AF, Lens now locked
1498      * FOCUSED_LOCKED     | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1499      * FOCUSED_LOCKED     | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1500      * NOT_FOCUSED_LOCKED | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1501      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1502      * Any state          | Mode change      | INACTIVE           |</p>
1503      * <p>For the above table, the camera device may skip reporting any state changes that happen
1504      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1505      * can be skipped in that manner is called a transient state.</p>
1506      * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1507      * state transitions listed in above table, it is also legal for the camera device to skip
1508      * one or more transient states between two results. See below table for examples:</p>
1509      * <p>State            | Transition Cause | New State          | Notes
1510      * :-----------------:|:----------------:|:------------------:|:--------------:
1511      * INACTIVE           | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1512      * INACTIVE           | AF_TRIGGER       | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
1513      * FOCUSED_LOCKED     | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1514      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is good after a scan, lens is not locked.</p>
1515      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_VIDEO:</p>
1516      * <p>State            | Transition Cause                    | New State          | Notes
1517      * :-----------------:|:-----------------------------------:|:------------------:|:--------------:
1518      * INACTIVE           | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1519      * INACTIVE           | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1520      * PASSIVE_SCAN       | Camera device completes current scan| PASSIVE_FOCUSED    | End AF scan, Lens now locked
1521      * PASSIVE_SCAN       | Camera device fails current scan    | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1522      * PASSIVE_SCAN       | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, if focus is good. Lens now locked
1523      * PASSIVE_SCAN       | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
1524      * PASSIVE_SCAN       | AF_CANCEL                           | INACTIVE           | Reset lens position, Lens now locked
1525      * PASSIVE_FOCUSED    | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1526      * PASSIVE_UNFOCUSED  | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1527      * PASSIVE_FOCUSED    | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, lens now locked
1528      * PASSIVE_UNFOCUSED  | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
1529      * FOCUSED_LOCKED     | AF_TRIGGER                          | FOCUSED_LOCKED     | No effect
1530      * FOCUSED_LOCKED     | AF_CANCEL                           | INACTIVE           | Restart AF scan
1531      * NOT_FOCUSED_LOCKED | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | No effect
1532      * NOT_FOCUSED_LOCKED | AF_CANCEL                           | INACTIVE           | Restart AF scan</p>
1533      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_PICTURE:</p>
1534      * <p>State            | Transition Cause                     | New State          | Notes
1535      * :-----------------:|:------------------------------------:|:------------------:|:--------------:
1536      * INACTIVE           | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1537      * INACTIVE           | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1538      * PASSIVE_SCAN       | Camera device completes current scan | PASSIVE_FOCUSED    | End AF scan, Lens now locked
1539      * PASSIVE_SCAN       | Camera device fails current scan     | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1540      * PASSIVE_SCAN       | AF_TRIGGER                           | FOCUSED_LOCKED     | Eventual transition once the focus is good. Lens now locked
1541      * PASSIVE_SCAN       | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
1542      * PASSIVE_SCAN       | AF_CANCEL                            | INACTIVE           | Reset lens position, Lens now locked
1543      * PASSIVE_FOCUSED    | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1544      * PASSIVE_UNFOCUSED  | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1545      * PASSIVE_FOCUSED    | AF_TRIGGER                           | FOCUSED_LOCKED     | Immediate trans. Lens now locked
1546      * PASSIVE_UNFOCUSED  | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
1547      * FOCUSED_LOCKED     | AF_TRIGGER                           | FOCUSED_LOCKED     | No effect
1548      * FOCUSED_LOCKED     | AF_CANCEL                            | INACTIVE           | Restart AF scan
1549      * NOT_FOCUSED_LOCKED | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | No effect
1550      * NOT_FOCUSED_LOCKED | AF_CANCEL                            | INACTIVE           | Restart AF scan</p>
1551      * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1552      * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1553      * camera device. When a trigger is included in a mode switch request, the trigger
1554      * will be evaluated in the context of the new mode in the request.
1555      * See below table for examples:</p>
1556      * <p>State      | Transition Cause                       | New State                                | Notes
1557      * :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
1558      * any state    | CAF--&gt;AUTO mode switch                 | INACTIVE                                 | Mode switch without trigger, initial state must be INACTIVE
1559      * any state    | CAF--&gt;AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE   | Mode switch with trigger, INACTIVE is skipped
1560      * any state    | AUTO--&gt;CAF mode switch                 | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped</p>
1561      *
1562      * @see ACAMERA_CONTROL_AF_MODE
1563      * @see ACAMERA_CONTROL_MODE
1564      * @see ACAMERA_CONTROL_SCENE_MODE
1565      */
1566     ACAMERA_CONTROL_AF_STATE =                                  // byte (acamera_metadata_enum_android_control_af_state_t)
1567             ACAMERA_CONTROL_START + 32,
1568     /**
1569      * <p>Current state of auto-white balance (AWB) algorithm.</p>
1570      *
1571      * <p>Type: byte (acamera_metadata_enum_android_control_awb_state_t)</p>
1572      *
1573      * <p>This tag may appear in:
1574      * <ul>
1575      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1576      * </ul></p>
1577      *
1578      * <p>Switching between or enabling AWB modes (ACAMERA_CONTROL_AWB_MODE) always
1579      * resets the AWB state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1580      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1581      * the algorithm states to INACTIVE.</p>
1582      * <p>The camera device can do several state transitions between two results, if it is
1583      * allowed by the state transition table. So INACTIVE may never actually be seen in
1584      * a result.</p>
1585      * <p>The state in the result is the state for this image (in sync with this image): if
1586      * AWB state becomes CONVERGED, then the image data associated with this result should
1587      * be good to use.</p>
1588      * <p>Below are state transition tables for different AWB modes.</p>
1589      * <p>When <code>ACAMERA_CONTROL_AWB_MODE != AWB_MODE_AUTO</code>:</p>
1590      * <p>State       | Transition Cause | New State | Notes
1591      * :------------:|:----------------:|:---------:|:-----------------------:
1592      * INACTIVE      |                  |INACTIVE   |Camera device auto white balance algorithm is disabled</p>
1593      * <p>When ACAMERA_CONTROL_AWB_MODE is AWB_MODE_AUTO:</p>
1594      * <p>State        | Transition Cause                 | New State     | Notes
1595      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1596      * INACTIVE       | Camera device initiates AWB scan | SEARCHING     | Values changing
1597      * INACTIVE       | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1598      * SEARCHING      | Camera device finishes AWB scan  | CONVERGED     | Good values, not changing
1599      * SEARCHING      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1600      * CONVERGED      | Camera device initiates AWB scan | SEARCHING     | Values changing
1601      * CONVERGED      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1602      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | SEARCHING     | Values not good after unlock</p>
1603      * <p>For the above table, the camera device may skip reporting any state changes that happen
1604      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1605      * can be skipped in that manner is called a transient state.</p>
1606      * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1607      * listed in above table, it is also legal for the camera device to skip one or more
1608      * transient states between two results. See below table for examples:</p>
1609      * <p>State        | Transition Cause                 | New State     | Notes
1610      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1611      * INACTIVE       | Camera device finished AWB scan  | CONVERGED     | Values are already good, transient states are skipped by camera device.
1612      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | CONVERGED     | Values good after unlock, transient states are skipped by camera device.</p>
1613      *
1614      * @see ACAMERA_CONTROL_AWB_LOCK
1615      * @see ACAMERA_CONTROL_AWB_MODE
1616      * @see ACAMERA_CONTROL_MODE
1617      * @see ACAMERA_CONTROL_SCENE_MODE
1618      */
1619     ACAMERA_CONTROL_AWB_STATE =                                 // byte (acamera_metadata_enum_android_control_awb_state_t)
1620             ACAMERA_CONTROL_START + 34,
1621     /**
1622      * <p>Whether the camera device supports ACAMERA_CONTROL_AE_LOCK</p>
1623      *
1624      * @see ACAMERA_CONTROL_AE_LOCK
1625      *
1626      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_available_t)</p>
1627      *
1628      * <p>This tag may appear in:
1629      * <ul>
1630      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1631      * </ul></p>
1632      *
1633      * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1634      * list <code>true</code>. This includes FULL devices.</p>
1635      */
1636     ACAMERA_CONTROL_AE_LOCK_AVAILABLE =                         // byte (acamera_metadata_enum_android_control_ae_lock_available_t)
1637             ACAMERA_CONTROL_START + 36,
1638     /**
1639      * <p>Whether the camera device supports ACAMERA_CONTROL_AWB_LOCK</p>
1640      *
1641      * @see ACAMERA_CONTROL_AWB_LOCK
1642      *
1643      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_available_t)</p>
1644      *
1645      * <p>This tag may appear in:
1646      * <ul>
1647      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1648      * </ul></p>
1649      *
1650      * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1651      * always list <code>true</code>. This includes FULL devices.</p>
1652      */
1653     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE =                        // byte (acamera_metadata_enum_android_control_awb_lock_available_t)
1654             ACAMERA_CONTROL_START + 37,
1655     /**
1656      * <p>List of control modes for ACAMERA_CONTROL_MODE that are supported by this camera
1657      * device.</p>
1658      *
1659      * @see ACAMERA_CONTROL_MODE
1660      *
1661      * <p>Type: byte[n]</p>
1662      *
1663      * <p>This tag may appear in:
1664      * <ul>
1665      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1666      * </ul></p>
1667      *
1668      * <p>This list contains control modes that can be set for the camera device.
1669      * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1670      * devices will always support OFF, AUTO modes.</p>
1671      */
1672     ACAMERA_CONTROL_AVAILABLE_MODES =                           // byte[n]
1673             ACAMERA_CONTROL_START + 38,
1674     /**
1675      * <p>Range of boosts for ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST supported
1676      * by this camera device.</p>
1677      *
1678      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1679      *
1680      * <p>Type: int32[2]</p>
1681      *
1682      * <p>This tag may appear in:
1683      * <ul>
1684      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1685      * </ul></p>
1686      *
1687      * <p>Devices support post RAW sensitivity boost  will advertise
1688      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST key for controling
1689      * post RAW sensitivity boost.</p>
1690      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1691      * outputs. For devices that do support RAW format outputs, this key will always
1692      * present, and if a device does not support post RAW sensitivity boost, it will
1693      * list <code>(100, 100)</code> in this key.</p>
1694      *
1695      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1696      */
1697     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =          // int32[2]
1698             ACAMERA_CONTROL_START + 39,
1699     /**
1700      * <p>The amount of additional sensitivity boost applied to output images
1701      * after RAW sensor data is captured.</p>
1702      *
1703      * <p>Type: int32</p>
1704      *
1705      * <p>This tag may appear in:
1706      * <ul>
1707      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1708      *   <li>ACaptureRequest</li>
1709      * </ul></p>
1710      *
1711      * <p>Some camera devices support additional digital sensitivity boosting in the
1712      * camera processing pipeline after sensor RAW image is captured.
1713      * Such a boost will be applied to YUV/JPEG format output images but will not
1714      * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
1715      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1716      * outputs. For devices that do support RAW format outputs, this key will always
1717      * present, and if a device does not support post RAW sensitivity boost, it will
1718      * list <code>100</code> in this key.</p>
1719      * <p>If the camera device cannot apply the exact boost requested, it will reduce the
1720      * boost to the nearest supported value.
1721      * The final boost value used will be available in the output capture result.</p>
1722      * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
1723      * of such device will have the total sensitivity of
1724      * <code>ACAMERA_SENSOR_SENSITIVITY * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST / 100</code>
1725      * The sensitivity of RAW format images will always be <code>ACAMERA_SENSOR_SENSITIVITY</code></p>
1726      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
1727      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
1728      *
1729      * @see ACAMERA_CONTROL_AE_MODE
1730      * @see ACAMERA_CONTROL_MODE
1731      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1732      * @see ACAMERA_SENSOR_SENSITIVITY
1733      */
1734     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST =                // int32
1735             ACAMERA_CONTROL_START + 40,
1736     /**
1737      * <p>Allow camera device to enable zero-shutter-lag mode for requests with
1738      * ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE.</p>
1739      *
1740      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1741      *
1742      * <p>Type: byte (acamera_metadata_enum_android_control_enable_zsl_t)</p>
1743      *
1744      * <p>This tag may appear in:
1745      * <ul>
1746      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1747      *   <li>ACaptureRequest</li>
1748      * </ul></p>
1749      *
1750      * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
1751      * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
1752      * produce output images for a zero-shutter-lag request. The result metadata including the
1753      * ACAMERA_SENSOR_TIMESTAMP reflects the source frames used to produce output images.
1754      * Therefore, the contents of the output images and the result metadata may be out of order
1755      * compared to previous regular requests. enableZsl does not affect requests with other
1756      * capture intents.</p>
1757      * <p>For example, when requests are submitted in the following order:
1758      *   Request A: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is PREVIEW
1759      *   Request B: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is STILL_CAPTURE</p>
1760      * <p>The output images for request B may have contents captured before the output images for
1761      * request A, and the result metadata for request B may be older than the result metadata for
1762      * request A.</p>
1763      * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in
1764      * the past for requests with STILL_CAPTURE capture intent.</p>
1765      * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
1766      * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
1767      * <code>false</code> if present.</p>
1768      * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
1769      * capture templates is always <code>false</code> if present.</p>
1770      * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
1771      *
1772      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1773      * @see ACAMERA_SENSOR_TIMESTAMP
1774      */
1775     ACAMERA_CONTROL_ENABLE_ZSL =                                // byte (acamera_metadata_enum_android_control_enable_zsl_t)
1776             ACAMERA_CONTROL_START + 41,
1777     /**
1778      * <p>Whether a significant scene change is detected within the currently-set AF
1779      * region(s).</p>
1780      *
1781      * <p>Type: byte (acamera_metadata_enum_android_control_af_scene_change_t)</p>
1782      *
1783      * <p>This tag may appear in:
1784      * <ul>
1785      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1786      * </ul></p>
1787      *
1788      * <p>When the camera focus routine detects a change in the scene it is looking at,
1789      * such as a large shift in camera viewpoint, significant motion in the scene, or a
1790      * significant illumination change, this value will be set to DETECTED for a single capture
1791      * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
1792      * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.</p>
1793      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
1794      */
1795     ACAMERA_CONTROL_AF_SCENE_CHANGE =                           // byte (acamera_metadata_enum_android_control_af_scene_change_t)
1796             ACAMERA_CONTROL_START + 42,
1797     /**
1798      * <p>The list of extended scene modes for ACAMERA_CONTROL_EXTENDED_SCENE_MODE that are supported
1799      * by this camera device, and each extended scene mode's maximum streaming (non-stall) size
1800      * with  effect.</p>
1801      *
1802      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1803      *
1804      * <p>Type: int32[3*n]</p>
1805      *
1806      * <p>This tag may appear in:
1807      * <ul>
1808      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1809      * </ul></p>
1810      *
1811      * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p>
1812      * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
1813      * under which bokeh is effective when capture intent is PREVIEW. Note that when capture
1814      * intent is PREVIEW, the bokeh effect may not be as high in quality compared to
1815      * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming
1816      * dimension must be one of the YUV_420_888 or PRIVATE resolutions in
1817      * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the
1818      * application configures a stream larger than the maximum streaming dimension, bokeh
1819      * effect may not be applied for this stream for PREVIEW intent.</p>
1820      * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
1821      * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
1822      * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
1823      * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
1824      * If the application configures a stream with larger dimension, the stream may not have
1825      * bokeh effect applied.</p>
1826      */
1827     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES =   // int32[3*n]
1828             ACAMERA_CONTROL_START + 43,
1829     /**
1830      * <p>The ranges of supported zoom ratio for non-DISABLED ACAMERA_CONTROL_EXTENDED_SCENE_MODE.</p>
1831      *
1832      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1833      *
1834      * <p>Type: float[2*n]</p>
1835      *
1836      * <p>This tag may appear in:
1837      * <ul>
1838      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1839      * </ul></p>
1840      *
1841      * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios
1842      * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges
1843      * for all supported non-DISABLED extended scene modes, in the same order as in
1844      * android.control.availableExtended.</p>
1845      * <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p>
1846      */
1847     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES =
1848                                                                 // float[2*n]
1849             ACAMERA_CONTROL_START + 44,
1850     /**
1851      * <p>Whether extended scene mode is enabled for a particular capture request.</p>
1852      *
1853      * <p>Type: byte (acamera_metadata_enum_android_control_extended_scene_mode_t)</p>
1854      *
1855      * <p>This tag may appear in:
1856      * <ul>
1857      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1858      *   <li>ACaptureRequest</li>
1859      * </ul></p>
1860      *
1861      * <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
1862      * focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
1863      * <p>When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
1864      * processing needed for high quality bokeh effect, the stall may be longer than when
1865      * capture intent is not STILL_CAPTURE.</p>
1866      * <p>When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,</p>
1867      * <ul>
1868      * <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
1869      * BURST_CAPTURE must still be met.</li>
1870      * <li>All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
1871      * (queried via {@link ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES })
1872      * will have preview bokeh effect applied.</li>
1873      * </ul>
1874      * <p>When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
1875      * maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
1876      * be available for streams larger than the maximum streaming dimension.</p>
1877      * <p>Switching between different extended scene modes may involve reconfiguration of the camera
1878      * pipeline, resulting in long latency. The application should check this key against the
1879      * available session keys queried via
1880      * {@link ACameraManager_getCameraCharacteristics }.</p>
1881      * <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
1882      * with different field of view. As a result, when bokeh mode is enabled, the camera device
1883      * may override ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO, and the field of
1884      * view may be smaller than when bokeh mode is off.</p>
1885      *
1886      * @see ACAMERA_CONTROL_ZOOM_RATIO
1887      * @see ACAMERA_SCALER_CROP_REGION
1888      */
1889     ACAMERA_CONTROL_EXTENDED_SCENE_MODE =                       // byte (acamera_metadata_enum_android_control_extended_scene_mode_t)
1890             ACAMERA_CONTROL_START + 45,
1891     /**
1892      * <p>Minimum and maximum zoom ratios supported by this camera device.</p>
1893      *
1894      * <p>Type: float[2]</p>
1895      *
1896      * <p>This tag may appear in:
1897      * <ul>
1898      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1899      * </ul></p>
1900      *
1901      * <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
1902      * setting ACAMERA_CONTROL_ZOOM_RATIO to values less than 1.0 increases the camera's field
1903      * of view.</p>
1904      *
1905      * @see ACAMERA_CONTROL_ZOOM_RATIO
1906      */
1907     ACAMERA_CONTROL_ZOOM_RATIO_RANGE =                          // float[2]
1908             ACAMERA_CONTROL_START + 46,
1909     /**
1910      * <p>The desired zoom ratio</p>
1911      *
1912      * <p>Type: float</p>
1913      *
1914      * <p>This tag may appear in:
1915      * <ul>
1916      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1917      *   <li>ACaptureRequest</li>
1918      * </ul></p>
1919      *
1920      * <p>Instead of using ACAMERA_SCALER_CROP_REGION for zoom, the application can now choose to
1921      * use this tag to specify the desired zoom level.</p>
1922      * <p>By using this control, the application gains a simpler way to control zoom, which can
1923      * be a combination of optical and digital zoom. For example, a multi-camera system may
1924      * contain more than one lens with different focal lengths, and the user can use optical
1925      * zoom by switching between lenses. Using zoomRatio has benefits in the scenarios below:</p>
1926      * <ul>
1927      * <li>Zooming in from a wide-angle lens to a telephoto lens: A floating-point ratio provides
1928      *   better precision compared to an integer value of ACAMERA_SCALER_CROP_REGION.</li>
1929      * <li>Zooming out from a wide lens to an ultrawide lens: zoomRatio supports zoom-out whereas
1930      *   ACAMERA_SCALER_CROP_REGION doesn't.</li>
1931      * </ul>
1932      * <p>To illustrate, here are several scenarios of different zoom ratios, crop regions,
1933      * and output streams, for a hypothetical camera device with an active array of size
1934      * <code>(2000,1500)</code>.</p>
1935      * <ul>
1936      * <li>Camera Configuration:<ul>
1937      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
1938      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
1939      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
1940      * </ul>
1941      * </li>
1942      * <li>Case #1: 4:3 crop region with 2.0x zoom ratio<ul>
1943      * <li>Zoomed field of view: 1/4 of original field of view</li>
1944      * <li>Crop region: <code>Rect(0, 0, 2000, 1500) // (left, top, right, bottom)</code> (post zoom)</li>
1945      * </ul>
1946      * </li>
1947      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-43.png" /><ul>
1948      * <li><code>640x480</code> stream source area: <code>(0, 0, 2000, 1500)</code> (equal to crop region)</li>
1949      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (letterboxed)</li>
1950      * </ul>
1951      * </li>
1952      * <li>Case #2: 16:9 crop region with 2.0x zoom.<ul>
1953      * <li>Zoomed field of view: 1/4 of original field of view</li>
1954      * <li>Crop region: <code>Rect(0, 187, 2000, 1312)</code></li>
1955      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-169.png" /></li>
1956      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (pillarboxed)</li>
1957      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (equal to crop region)</li>
1958      * </ul>
1959      * </li>
1960      * <li>Case #3: 1:1 crop region with 0.5x zoom out to ultrawide lens.<ul>
1961      * <li>Zoomed field of view: 4x of original field of view (switched from wide lens to ultrawide lens)</li>
1962      * <li>Crop region: <code>Rect(250, 0, 1750, 1500)</code></li>
1963      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-0.5-crop-11.png" /></li>
1964      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (letterboxed)</li>
1965      * <li><code>1280x720</code> stream source area: <code>(250, 328, 1750, 1172)</code> (letterboxed)</li>
1966      * </ul>
1967      * </li>
1968      * </ul>
1969      * <p>As seen from the graphs above, the coordinate system of cropRegion now changes to the
1970      * effective after-zoom field-of-view, and is represented by the rectangle of (0, 0,
1971      * activeArrayWith, activeArrayHeight). The same applies to AE/AWB/AF regions, and faces.
1972      * This coordinate system change isn't applicable to RAW capture and its related
1973      * metadata such as intrinsicCalibration and lensShadingMap.</p>
1974      * <p>Using the same hypothetical example above, and assuming output stream #1 (640x480) is
1975      * the viewfinder stream, the application can achieve 2.0x zoom in one of two ways:</p>
1976      * <ul>
1977      * <li>zoomRatio = 2.0, scaler.cropRegion = (0, 0, 2000, 1500)</li>
1978      * <li>zoomRatio = 1.0 (default), scaler.cropRegion = (500, 375, 1500, 1125)</li>
1979      * </ul>
1980      * <p>If the application intends to set aeRegions to be top-left quarter of the viewfinder
1981      * field-of-view, the ACAMERA_CONTROL_AE_REGIONS should be set to (0, 0, 1000, 750) with
1982      * zoomRatio set to 2.0. Alternatively, the application can set aeRegions to the equivalent
1983      * region of (500, 375, 1000, 750) for zoomRatio of 1.0. If the application doesn't
1984      * explicitly set ACAMERA_CONTROL_ZOOM_RATIO, its value defaults to 1.0.</p>
1985      * <p>One limitation of controlling zoom using zoomRatio is that the ACAMERA_SCALER_CROP_REGION
1986      * must only be used for letterboxing or pillarboxing of the sensor active array, and no
1987      * FREEFORM cropping can be used with ACAMERA_CONTROL_ZOOM_RATIO other than 1.0. If
1988      * ACAMERA_CONTROL_ZOOM_RATIO is not 1.0, and ACAMERA_SCALER_CROP_REGION is set to be
1989      * windowboxing, the camera framework will override the ACAMERA_SCALER_CROP_REGION to be
1990      * the active array.</p>
1991      * <p>In the capture request, if the application sets ACAMERA_CONTROL_ZOOM_RATIO to a
1992      * value != 1.0, the ACAMERA_CONTROL_ZOOM_RATIO tag in the capture result reflects the
1993      * effective zoom ratio achieved by the camera device, and the ACAMERA_SCALER_CROP_REGION
1994      * adjusts for additional crops that are not zoom related. Otherwise, if the application
1995      * sets ACAMERA_CONTROL_ZOOM_RATIO to 1.0, or does not set it at all, the
1996      * ACAMERA_CONTROL_ZOOM_RATIO tag in the result metadata will also be 1.0.</p>
1997      * <p>When the application requests a physical stream for a logical multi-camera, the
1998      * ACAMERA_CONTROL_ZOOM_RATIO in the physical camera result metadata will be 1.0, and
1999      * the ACAMERA_SCALER_CROP_REGION tag reflects the amount of zoom and crop done by the
2000      * physical camera device.</p>
2001      *
2002      * @see ACAMERA_CONTROL_AE_REGIONS
2003      * @see ACAMERA_CONTROL_ZOOM_RATIO
2004      * @see ACAMERA_SCALER_CROP_REGION
2005      */
2006     ACAMERA_CONTROL_ZOOM_RATIO =                                // float
2007             ACAMERA_CONTROL_START + 47,
2008     ACAMERA_CONTROL_END,
2009 
2010     /**
2011      * <p>Operation mode for edge
2012      * enhancement.</p>
2013      *
2014      * <p>Type: byte (acamera_metadata_enum_android_edge_mode_t)</p>
2015      *
2016      * <p>This tag may appear in:
2017      * <ul>
2018      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2019      *   <li>ACaptureRequest</li>
2020      * </ul></p>
2021      *
2022      * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
2023      * no enhancement will be applied by the camera device.</p>
2024      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
2025      * will be applied. HIGH_QUALITY mode indicates that the
2026      * camera device will use the highest-quality enhancement algorithms,
2027      * even if it slows down capture rate. FAST means the camera device will
2028      * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
2029      * edge enhancement will slow down capture rate. Every output stream will have a similar
2030      * amount of enhancement applied.</p>
2031      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2032      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2033      * into a final capture when triggered by the user. In this mode, the camera device applies
2034      * edge enhancement to low-resolution streams (below maximum recording resolution) to
2035      * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
2036      * since those will be reprocessed later if necessary.</p>
2037      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
2038      * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
2039      * The camera device may adjust its internal edge enhancement parameters for best
2040      * image quality based on the android.reprocess.effectiveExposureFactor, if it is set.</p>
2041      */
2042     ACAMERA_EDGE_MODE =                                         // byte (acamera_metadata_enum_android_edge_mode_t)
2043             ACAMERA_EDGE_START,
2044     /**
2045      * <p>List of edge enhancement modes for ACAMERA_EDGE_MODE that are supported by this camera
2046      * device.</p>
2047      *
2048      * @see ACAMERA_EDGE_MODE
2049      *
2050      * <p>Type: byte[n]</p>
2051      *
2052      * <p>This tag may appear in:
2053      * <ul>
2054      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2055      * </ul></p>
2056      *
2057      * <p>Full-capability camera devices must always support OFF; camera devices that support
2058      * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
2059      * list FAST.</p>
2060      */
2061     ACAMERA_EDGE_AVAILABLE_EDGE_MODES =                         // byte[n]
2062             ACAMERA_EDGE_START + 2,
2063     ACAMERA_EDGE_END,
2064 
2065     /**
2066      * <p>The desired mode for for the camera device's flash control.</p>
2067      *
2068      * <p>Type: byte (acamera_metadata_enum_android_flash_mode_t)</p>
2069      *
2070      * <p>This tag may appear in:
2071      * <ul>
2072      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2073      *   <li>ACaptureRequest</li>
2074      * </ul></p>
2075      *
2076      * <p>This control is only effective when flash unit is available
2077      * (<code>ACAMERA_FLASH_INFO_AVAILABLE == true</code>).</p>
2078      * <p>When this control is used, the ACAMERA_CONTROL_AE_MODE must be set to ON or OFF.
2079      * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2080      * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2081      * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2082      * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2083      * device's auto-exposure routine's result. When used in still capture case, this
2084      * control should be used along with auto-exposure (AE) precapture metering sequence
2085      * (ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER), otherwise, the image may be incorrectly exposed.</p>
2086      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2087      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
2088      * <p>The flash status will be reported by ACAMERA_FLASH_STATE in the capture result metadata.</p>
2089      *
2090      * @see ACAMERA_CONTROL_AE_MODE
2091      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
2092      * @see ACAMERA_FLASH_INFO_AVAILABLE
2093      * @see ACAMERA_FLASH_STATE
2094      */
2095     ACAMERA_FLASH_MODE =                                        // byte (acamera_metadata_enum_android_flash_mode_t)
2096             ACAMERA_FLASH_START + 2,
2097     /**
2098      * <p>Current state of the flash
2099      * unit.</p>
2100      *
2101      * <p>Type: byte (acamera_metadata_enum_android_flash_state_t)</p>
2102      *
2103      * <p>This tag may appear in:
2104      * <ul>
2105      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2106      * </ul></p>
2107      *
2108      * <p>When the camera device doesn't have flash unit
2109      * (i.e. <code>ACAMERA_FLASH_INFO_AVAILABLE == false</code>), this state will always be UNAVAILABLE.
2110      * Other states indicate the current flash status.</p>
2111      * <p>In certain conditions, this will be available on LEGACY devices:</p>
2112      * <ul>
2113      * <li>Flash-less cameras always return UNAVAILABLE.</li>
2114      * <li>Using ACAMERA_CONTROL_AE_MODE <code>==</code> ON_ALWAYS_FLASH
2115      *    will always return FIRED.</li>
2116      * <li>Using ACAMERA_FLASH_MODE <code>==</code> TORCH
2117      *    will always return FIRED.</li>
2118      * </ul>
2119      * <p>In all other conditions the state will not be available on
2120      * LEGACY devices (i.e. it will be <code>null</code>).</p>
2121      *
2122      * @see ACAMERA_CONTROL_AE_MODE
2123      * @see ACAMERA_FLASH_INFO_AVAILABLE
2124      * @see ACAMERA_FLASH_MODE
2125      */
2126     ACAMERA_FLASH_STATE =                                       // byte (acamera_metadata_enum_android_flash_state_t)
2127             ACAMERA_FLASH_START + 5,
2128     ACAMERA_FLASH_END,
2129 
2130     /**
2131      * <p>Whether this camera device has a
2132      * flash unit.</p>
2133      *
2134      * <p>Type: byte (acamera_metadata_enum_android_flash_info_available_t)</p>
2135      *
2136      * <p>This tag may appear in:
2137      * <ul>
2138      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2139      * </ul></p>
2140      *
2141      * <p>Will be <code>false</code> if no flash is available.</p>
2142      * <p>If there is no flash unit, none of the flash controls do
2143      * anything.</p>
2144      */
2145     ACAMERA_FLASH_INFO_AVAILABLE =                              // byte (acamera_metadata_enum_android_flash_info_available_t)
2146             ACAMERA_FLASH_INFO_START,
2147     ACAMERA_FLASH_INFO_END,
2148 
2149     /**
2150      * <p>Operational mode for hot pixel correction.</p>
2151      *
2152      * <p>Type: byte (acamera_metadata_enum_android_hot_pixel_mode_t)</p>
2153      *
2154      * <p>This tag may appear in:
2155      * <ul>
2156      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2157      *   <li>ACaptureRequest</li>
2158      * </ul></p>
2159      *
2160      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
2161      * that do not accurately measure the incoming light (i.e. pixels that
2162      * are stuck at an arbitrary value or are oversensitive).</p>
2163      */
2164     ACAMERA_HOT_PIXEL_MODE =                                    // byte (acamera_metadata_enum_android_hot_pixel_mode_t)
2165             ACAMERA_HOT_PIXEL_START,
2166     /**
2167      * <p>List of hot pixel correction modes for ACAMERA_HOT_PIXEL_MODE that are supported by this
2168      * camera device.</p>
2169      *
2170      * @see ACAMERA_HOT_PIXEL_MODE
2171      *
2172      * <p>Type: byte[n]</p>
2173      *
2174      * <p>This tag may appear in:
2175      * <ul>
2176      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2177      * </ul></p>
2178      *
2179      * <p>FULL mode camera devices will always support FAST.</p>
2180      */
2181     ACAMERA_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =               // byte[n]
2182             ACAMERA_HOT_PIXEL_START + 1,
2183     ACAMERA_HOT_PIXEL_END,
2184 
2185     /**
2186      * <p>GPS coordinates to include in output JPEG
2187      * EXIF.</p>
2188      *
2189      * <p>Type: double[3]</p>
2190      *
2191      * <p>This tag may appear in:
2192      * <ul>
2193      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2194      *   <li>ACaptureRequest</li>
2195      * </ul></p>
2196      *
2197      * <p>This tag is also used for HEIC image capture.</p>
2198      */
2199     ACAMERA_JPEG_GPS_COORDINATES =                              // double[3]
2200             ACAMERA_JPEG_START,
2201     /**
2202      * <p>32 characters describing GPS algorithm to
2203      * include in EXIF.</p>
2204      *
2205      * <p>Type: byte</p>
2206      *
2207      * <p>This tag may appear in:
2208      * <ul>
2209      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2210      *   <li>ACaptureRequest</li>
2211      * </ul></p>
2212      *
2213      * <p>This tag is also used for HEIC image capture.</p>
2214      */
2215     ACAMERA_JPEG_GPS_PROCESSING_METHOD =                        // byte
2216             ACAMERA_JPEG_START + 1,
2217     /**
2218      * <p>Time GPS fix was made to include in
2219      * EXIF.</p>
2220      *
2221      * <p>Type: int64</p>
2222      *
2223      * <p>This tag may appear in:
2224      * <ul>
2225      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2226      *   <li>ACaptureRequest</li>
2227      * </ul></p>
2228      *
2229      * <p>This tag is also used for HEIC image capture.</p>
2230      */
2231     ACAMERA_JPEG_GPS_TIMESTAMP =                                // int64
2232             ACAMERA_JPEG_START + 2,
2233     /**
2234      * <p>The orientation for a JPEG image.</p>
2235      *
2236      * <p>Type: int32</p>
2237      *
2238      * <p>This tag may appear in:
2239      * <ul>
2240      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2241      *   <li>ACaptureRequest</li>
2242      * </ul></p>
2243      *
2244      * <p>The clockwise rotation angle in degrees, relative to the orientation
2245      * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2246      * upright.</p>
2247      * <p>Camera devices may either encode this value into the JPEG EXIF header, or
2248      * rotate the image data to match this orientation. When the image data is rotated,
2249      * the thumbnail data will also be rotated.</p>
2250      * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2251      * by ACAMERA_SENSOR_ORIENTATION.</p>
2252      * <p>To translate from the device orientation given by the Android sensor APIs for camera
2253      * sensors which are not EXTERNAL, the following sample code may be used:</p>
2254      * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2255      *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2256      *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2257      *
2258      *     // Round device orientation to a multiple of 90
2259      *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2260      *
2261      *     // Reverse device orientation for front-facing cameras
2262      *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2263      *     if (facingFront) deviceOrientation = -deviceOrientation;
2264      *
2265      *     // Calculate desired JPEG orientation relative to camera orientation to make
2266      *     // the image upright relative to the device orientation
2267      *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2268      *
2269      *     return jpegOrientation;
2270      * }
2271      * </code></pre>
2272      * <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
2273      * also be set to EXTERNAL. The above code is not relevant in such case.</p>
2274      * <p>This tag is also used to describe the orientation of the HEIC image capture, in which
2275      * case the rotation is reflected by
2276      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2277      * rotating the image data itself.</p>
2278      *
2279      * @see ACAMERA_SENSOR_ORIENTATION
2280      */
2281     ACAMERA_JPEG_ORIENTATION =                                  // int32
2282             ACAMERA_JPEG_START + 3,
2283     /**
2284      * <p>Compression quality of the final JPEG
2285      * image.</p>
2286      *
2287      * <p>Type: byte</p>
2288      *
2289      * <p>This tag may appear in:
2290      * <ul>
2291      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2292      *   <li>ACaptureRequest</li>
2293      * </ul></p>
2294      *
2295      * <p>85-95 is typical usage range. This tag is also used to describe the quality
2296      * of the HEIC image capture.</p>
2297      */
2298     ACAMERA_JPEG_QUALITY =                                      // byte
2299             ACAMERA_JPEG_START + 4,
2300     /**
2301      * <p>Compression quality of JPEG
2302      * thumbnail.</p>
2303      *
2304      * <p>Type: byte</p>
2305      *
2306      * <p>This tag may appear in:
2307      * <ul>
2308      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2309      *   <li>ACaptureRequest</li>
2310      * </ul></p>
2311      *
2312      * <p>This tag is also used to describe the quality of the HEIC image capture.</p>
2313      */
2314     ACAMERA_JPEG_THUMBNAIL_QUALITY =                            // byte
2315             ACAMERA_JPEG_START + 5,
2316     /**
2317      * <p>Resolution of embedded JPEG thumbnail.</p>
2318      *
2319      * <p>Type: int32[2]</p>
2320      *
2321      * <p>This tag may appear in:
2322      * <ul>
2323      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2324      *   <li>ACaptureRequest</li>
2325      * </ul></p>
2326      *
2327      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2328      * but the captured JPEG will still be a valid image.</p>
2329      * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2330      * should have the same aspect ratio as the main JPEG output.</p>
2331      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2332      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2333      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2334      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2335      * generate the thumbnail image. The thumbnail image will always have a smaller Field
2336      * Of View (FOV) than the primary image when aspect ratios differ.</p>
2337      * <p>When an ACAMERA_JPEG_ORIENTATION of non-zero degree is requested,
2338      * the camera device will handle thumbnail rotation in one of the following ways:</p>
2339      * <ul>
2340      * <li>Set the <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>
2341      *   and keep jpeg and thumbnail image data unrotated.</li>
2342      * <li>Rotate the jpeg and thumbnail image data and not set
2343      *   <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>. In this
2344      *   case, LIMITED or FULL hardware level devices will report rotated thumnail size in
2345      *   capture result, so the width and height will be interchanged if 90 or 270 degree
2346      *   orientation is requested. LEGACY device will always report unrotated thumbnail
2347      *   size.</li>
2348      * </ul>
2349      * <p>The tag is also used as thumbnail size for HEIC image format capture, in which case the
2350      * the thumbnail rotation is reflected by
2351      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2352      * rotating the thumbnail data itself.</p>
2353      *
2354      * @see ACAMERA_JPEG_ORIENTATION
2355      */
2356     ACAMERA_JPEG_THUMBNAIL_SIZE =                               // int32[2]
2357             ACAMERA_JPEG_START + 6,
2358     /**
2359      * <p>List of JPEG thumbnail sizes for ACAMERA_JPEG_THUMBNAIL_SIZE supported by this
2360      * camera device.</p>
2361      *
2362      * @see ACAMERA_JPEG_THUMBNAIL_SIZE
2363      *
2364      * <p>Type: int32[2*n]</p>
2365      *
2366      * <p>This tag may appear in:
2367      * <ul>
2368      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2369      * </ul></p>
2370      *
2371      * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
2372      * thumbnail should be generated.</p>
2373      * <p>Below condiditions will be satisfied for this size list:</p>
2374      * <ul>
2375      * <li>The sizes will be sorted by increasing pixel area (width x height).
2376      * If several resolutions have the same area, they will be sorted by increasing width.</li>
2377      * <li>The aspect ratio of the largest thumbnail size will be same as the
2378      * aspect ratio of largest JPEG output size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
2379      * The largest size is defined as the size that has the largest pixel area
2380      * in a given size list.</li>
2381      * <li>Each output JPEG size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS will have at least
2382      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
2383      * and vice versa.</li>
2384      * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
2385      * </ul>
2386      * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
2387      *
2388      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
2389      */
2390     ACAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES =                    // int32[2*n]
2391             ACAMERA_JPEG_START + 7,
2392     ACAMERA_JPEG_END,
2393 
2394     /**
2395      * <p>The desired lens aperture size, as a ratio of lens focal length to the
2396      * effective aperture diameter.</p>
2397      *
2398      * <p>Type: float</p>
2399      *
2400      * <p>This tag may appear in:
2401      * <ul>
2402      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2403      *   <li>ACaptureRequest</li>
2404      * </ul></p>
2405      *
2406      * <p>Setting this value is only supported on the camera devices that have a variable
2407      * aperture lens.</p>
2408      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is OFF,
2409      * this can be set along with ACAMERA_SENSOR_EXPOSURE_TIME,
2410      * ACAMERA_SENSOR_SENSITIVITY, and ACAMERA_SENSOR_FRAME_DURATION
2411      * to achieve manual exposure control.</p>
2412      * <p>The requested aperture value may take several frames to reach the
2413      * requested value; the camera device will report the current (intermediate)
2414      * aperture size in capture result metadata while the aperture is changing.
2415      * While the aperture is still changing, ACAMERA_LENS_STATE will be set to MOVING.</p>
2416      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is one of
2417      * the ON modes, this will be overridden by the camera device
2418      * auto-exposure algorithm, the overridden values are then provided
2419      * back to the user in the corresponding result.</p>
2420      *
2421      * @see ACAMERA_CONTROL_AE_MODE
2422      * @see ACAMERA_LENS_STATE
2423      * @see ACAMERA_SENSOR_EXPOSURE_TIME
2424      * @see ACAMERA_SENSOR_FRAME_DURATION
2425      * @see ACAMERA_SENSOR_SENSITIVITY
2426      */
2427     ACAMERA_LENS_APERTURE =                                     // float
2428             ACAMERA_LENS_START,
2429     /**
2430      * <p>The desired setting for the lens neutral density filter(s).</p>
2431      *
2432      * <p>Type: float</p>
2433      *
2434      * <p>This tag may appear in:
2435      * <ul>
2436      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2437      *   <li>ACaptureRequest</li>
2438      * </ul></p>
2439      *
2440      * <p>This control will not be supported on most camera devices.</p>
2441      * <p>Lens filters are typically used to lower the amount of light the
2442      * sensor is exposed to (measured in steps of EV). As used here, an EV
2443      * step is the standard logarithmic representation, which are
2444      * non-negative, and inversely proportional to the amount of light
2445      * hitting the sensor.  For example, setting this to 0 would result
2446      * in no reduction of the incoming light, and setting this to 2 would
2447      * mean that the filter is set to reduce incoming light by two stops
2448      * (allowing 1/4 of the prior amount of light to the sensor).</p>
2449      * <p>It may take several frames before the lens filter density changes
2450      * to the requested value. While the filter density is still changing,
2451      * ACAMERA_LENS_STATE will be set to MOVING.</p>
2452      *
2453      * @see ACAMERA_LENS_STATE
2454      */
2455     ACAMERA_LENS_FILTER_DENSITY =                               // float
2456             ACAMERA_LENS_START + 1,
2457     /**
2458      * <p>The desired lens focal length; used for optical zoom.</p>
2459      *
2460      * <p>Type: float</p>
2461      *
2462      * <p>This tag may appear in:
2463      * <ul>
2464      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2465      *   <li>ACaptureRequest</li>
2466      * </ul></p>
2467      *
2468      * <p>This setting controls the physical focal length of the camera
2469      * device's lens. Changing the focal length changes the field of
2470      * view of the camera device, and is usually used for optical zoom.</p>
2471      * <p>Like ACAMERA_LENS_FOCUS_DISTANCE and ACAMERA_LENS_APERTURE, this
2472      * setting won't be applied instantaneously, and it may take several
2473      * frames before the lens can change to the requested focal length.
2474      * While the focal length is still changing, ACAMERA_LENS_STATE will
2475      * be set to MOVING.</p>
2476      * <p>Optical zoom via this control will not be supported on most devices. Starting from API
2477      * level 30, the camera device may combine optical and digital zoom through the
2478      * ACAMERA_CONTROL_ZOOM_RATIO control.</p>
2479      *
2480      * @see ACAMERA_CONTROL_ZOOM_RATIO
2481      * @see ACAMERA_LENS_APERTURE
2482      * @see ACAMERA_LENS_FOCUS_DISTANCE
2483      * @see ACAMERA_LENS_STATE
2484      */
2485     ACAMERA_LENS_FOCAL_LENGTH =                                 // float
2486             ACAMERA_LENS_START + 2,
2487     /**
2488      * <p>Desired distance to plane of sharpest focus,
2489      * measured from frontmost surface of the lens.</p>
2490      *
2491      * <p>Type: float</p>
2492      *
2493      * <p>This tag may appear in:
2494      * <ul>
2495      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2496      *   <li>ACaptureRequest</li>
2497      * </ul></p>
2498      *
2499      * <p>Should be zero for fixed-focus cameras</p>
2500      */
2501     ACAMERA_LENS_FOCUS_DISTANCE =                               // float
2502             ACAMERA_LENS_START + 3,
2503     /**
2504      * <p>Sets whether the camera device uses optical image stabilization (OIS)
2505      * when capturing images.</p>
2506      *
2507      * <p>Type: byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)</p>
2508      *
2509      * <p>This tag may appear in:
2510      * <ul>
2511      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2512      *   <li>ACaptureRequest</li>
2513      * </ul></p>
2514      *
2515      * <p>OIS is used to compensate for motion blur due to small
2516      * movements of the camera during capture. Unlike digital image
2517      * stabilization (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), OIS
2518      * makes use of mechanical elements to stabilize the camera
2519      * sensor, and thus allows for longer exposure times before
2520      * camera shake becomes apparent.</p>
2521      * <p>Switching between different optical stabilization modes may take several
2522      * frames to initialize, the camera device will report the current mode in
2523      * capture result metadata. For example, When "ON" mode is requested, the
2524      * optical stabilization modes in the first several capture results may still
2525      * be "OFF", and it will become "ON" when the initialization is done.</p>
2526      * <p>If a camera device supports both OIS and digital image stabilization
2527      * (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), turning both modes on may produce undesirable
2528      * interaction, so it is recommended not to enable both at the same time.</p>
2529      * <p>Not all devices will support OIS; see
2530      * ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION for
2531      * available controls.</p>
2532      *
2533      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
2534      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
2535      */
2536     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE =                   // byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)
2537             ACAMERA_LENS_START + 4,
2538     /**
2539      * <p>Direction the camera faces relative to
2540      * device screen.</p>
2541      *
2542      * <p>Type: byte (acamera_metadata_enum_android_lens_facing_t)</p>
2543      *
2544      * <p>This tag may appear in:
2545      * <ul>
2546      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2547      * </ul></p>
2548      *
2549      */
2550     ACAMERA_LENS_FACING =                                       // byte (acamera_metadata_enum_android_lens_facing_t)
2551             ACAMERA_LENS_START + 5,
2552     /**
2553      * <p>The orientation of the camera relative to the sensor
2554      * coordinate system.</p>
2555      *
2556      * <p>Type: float[4]</p>
2557      *
2558      * <p>This tag may appear in:
2559      * <ul>
2560      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2561      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2562      * </ul></p>
2563      *
2564      * <p>The four coefficients that describe the quaternion
2565      * rotation from the Android sensor coordinate system to a
2566      * camera-aligned coordinate system where the X-axis is
2567      * aligned with the long side of the image sensor, the Y-axis
2568      * is aligned with the short side of the image sensor, and
2569      * the Z-axis is aligned with the optical axis of the sensor.</p>
2570      * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
2571      * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
2572      * amount <code>theta</code>, the following formulas can be used:</p>
2573      * <pre><code> theta = 2 * acos(w)
2574      * a_x = x / sin(theta/2)
2575      * a_y = y / sin(theta/2)
2576      * a_z = z / sin(theta/2)
2577      * </code></pre>
2578      * <p>To create a 3x3 rotation matrix that applies the rotation
2579      * defined by this quaternion, the following matrix can be
2580      * used:</p>
2581      * <pre><code>R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
2582      *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
2583      *            2xz - 2yw,       2yz + 2xw, 1 - 2x^2 - 2y^2 ]
2584      * </code></pre>
2585      * <p>This matrix can then be used to apply the rotation to a
2586      *  column vector point with</p>
2587      * <p><code>p' = Rp</code></p>
2588      * <p>where <code>p</code> is in the device sensor coordinate system, and
2589      *  <code>p'</code> is in the camera-oriented coordinate system.</p>
2590      * <p>If ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, the quaternion rotation cannot
2591      *  be accurately represented by the camera device, and will be represented by
2592      *  default values matching its default facing.</p>
2593      *
2594      * @see ACAMERA_LENS_POSE_REFERENCE
2595      */
2596     ACAMERA_LENS_POSE_ROTATION =                                // float[4]
2597             ACAMERA_LENS_START + 6,
2598     /**
2599      * <p>Position of the camera optical center.</p>
2600      *
2601      * <p>Type: float[3]</p>
2602      *
2603      * <p>This tag may appear in:
2604      * <ul>
2605      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2606      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2607      * </ul></p>
2608      *
2609      * <p>The position of the camera device's lens optical center,
2610      * as a three-dimensional vector <code>(x,y,z)</code>.</p>
2611      * <p>Prior to Android P, or when ACAMERA_LENS_POSE_REFERENCE is PRIMARY_CAMERA, this position
2612      * is relative to the optical center of the largest camera device facing in the same
2613      * direction as this camera, in the <a href="https://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor
2614      * coordinate axes</a>. Note that only the axis definitions are shared with the sensor
2615      * coordinate system, but not the origin.</p>
2616      * <p>If this device is the largest or only camera device with a given facing, then this
2617      * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
2618      * from the main sensor along the +X axis (to the right from the user's perspective) will
2619      * report <code>(0.03, 0, 0)</code>.  Note that this means that, for many computer vision
2620      * applications, the position needs to be negated to convert it to a translation from the
2621      * camera to the origin.</p>
2622      * <p>To transform a pixel coordinates between two cameras facing the same direction, first
2623      * the source camera ACAMERA_LENS_DISTORTION must be corrected for.  Then the source
2624      * camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs to be applied, followed by the
2625      * ACAMERA_LENS_POSE_ROTATION of the source camera, the translation of the source camera
2626      * relative to the destination camera, the ACAMERA_LENS_POSE_ROTATION of the destination
2627      * camera, and finally the inverse of ACAMERA_LENS_INTRINSIC_CALIBRATION of the destination
2628      * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
2629      * coordinates.</p>
2630      * <p>To compare this against a real image from the destination camera, the destination camera
2631      * image then needs to be corrected for radial distortion before comparison or sampling.</p>
2632      * <p>When ACAMERA_LENS_POSE_REFERENCE is GYROSCOPE, then this position is relative to
2633      * the center of the primary gyroscope on the device. The axis definitions are the same as
2634      * with PRIMARY_CAMERA.</p>
2635      * <p>When ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, this position cannot be accurately
2636      * represented by the camera device, and will be represented as <code>(0, 0, 0)</code>.</p>
2637      *
2638      * @see ACAMERA_LENS_DISTORTION
2639      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2640      * @see ACAMERA_LENS_POSE_REFERENCE
2641      * @see ACAMERA_LENS_POSE_ROTATION
2642      */
2643     ACAMERA_LENS_POSE_TRANSLATION =                             // float[3]
2644             ACAMERA_LENS_START + 7,
2645     /**
2646      * <p>The range of scene distances that are in
2647      * sharp focus (depth of field).</p>
2648      *
2649      * <p>Type: float[2]</p>
2650      *
2651      * <p>This tag may appear in:
2652      * <ul>
2653      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2654      * </ul></p>
2655      *
2656      * <p>If variable focus not supported, can still report
2657      * fixed depth of field range</p>
2658      */
2659     ACAMERA_LENS_FOCUS_RANGE =                                  // float[2]
2660             ACAMERA_LENS_START + 8,
2661     /**
2662      * <p>Current lens status.</p>
2663      *
2664      * <p>Type: byte (acamera_metadata_enum_android_lens_state_t)</p>
2665      *
2666      * <p>This tag may appear in:
2667      * <ul>
2668      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2669      * </ul></p>
2670      *
2671      * <p>For lens parameters ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
2672      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE, when changes are requested,
2673      * they may take several frames to reach the requested values. This state indicates
2674      * the current status of the lens parameters.</p>
2675      * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2676      * either because the parameters are all fixed, or because the lens has had enough
2677      * time to reach the most recently-requested values.
2678      * If all these lens parameters are not changable for a camera device, as listed below:</p>
2679      * <ul>
2680      * <li>Fixed focus (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE == 0</code>), which means
2681      * ACAMERA_LENS_FOCUS_DISTANCE parameter will always be 0.</li>
2682      * <li>Fixed focal length (ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS contains single value),
2683      * which means the optical zoom is not supported.</li>
2684      * <li>No ND filter (ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES contains only 0).</li>
2685      * <li>Fixed aperture (ACAMERA_LENS_INFO_AVAILABLE_APERTURES contains single value).</li>
2686      * </ul>
2687      * <p>Then this state will always be STATIONARY.</p>
2688      * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2689      * is changing.</p>
2690      *
2691      * @see ACAMERA_LENS_APERTURE
2692      * @see ACAMERA_LENS_FILTER_DENSITY
2693      * @see ACAMERA_LENS_FOCAL_LENGTH
2694      * @see ACAMERA_LENS_FOCUS_DISTANCE
2695      * @see ACAMERA_LENS_INFO_AVAILABLE_APERTURES
2696      * @see ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES
2697      * @see ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2698      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
2699      */
2700     ACAMERA_LENS_STATE =                                        // byte (acamera_metadata_enum_android_lens_state_t)
2701             ACAMERA_LENS_START + 9,
2702     /**
2703      * <p>The parameters for this camera device's intrinsic
2704      * calibration.</p>
2705      *
2706      * <p>Type: float[5]</p>
2707      *
2708      * <p>This tag may appear in:
2709      * <ul>
2710      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2711      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2712      * </ul></p>
2713      *
2714      * <p>The five calibration parameters that describe the
2715      * transform from camera-centric 3D coordinates to sensor
2716      * pixel coordinates:</p>
2717      * <pre><code>[f_x, f_y, c_x, c_y, s]
2718      * </code></pre>
2719      * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
2720      * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
2721      * axis, and <code>s</code> is a skew parameter for the sensor plane not
2722      * being aligned with the lens plane.</p>
2723      * <p>These are typically used within a transformation matrix K:</p>
2724      * <pre><code>K = [ f_x,   s, c_x,
2725      *        0, f_y, c_y,
2726      *        0    0,   1 ]
2727      * </code></pre>
2728      * <p>which can then be combined with the camera pose rotation
2729      * <code>R</code> and translation <code>t</code> (ACAMERA_LENS_POSE_ROTATION and
2730      * ACAMERA_LENS_POSE_TRANSLATION, respectively) to calculate the
2731      * complete transform from world coordinates to pixel
2732      * coordinates:</p>
2733      * <pre><code>P = [ K 0   * [ R -Rt
2734      *      0 1 ]      0 1 ]
2735      * </code></pre>
2736      * <p>(Note the negation of poseTranslation when mapping from camera
2737      * to world coordinates, and multiplication by the rotation).</p>
2738      * <p>With <code>p_w</code> being a point in the world coordinate system
2739      * and <code>p_s</code> being a point in the camera active pixel array
2740      * coordinate system, and with the mapping including the
2741      * homogeneous division by z:</p>
2742      * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
2743      * p_s = p_h / z_h
2744      * </code></pre>
2745      * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
2746      * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
2747      * (depth) in pixel coordinates.</p>
2748      * <p>Note that the coordinate system for this transform is the
2749      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE system,
2750      * where <code>(0,0)</code> is the top-left of the
2751      * preCorrectionActiveArraySize rectangle. Once the pose and
2752      * intrinsic calibration transforms have been applied to a
2753      * world point, then the ACAMERA_LENS_DISTORTION
2754      * transform needs to be applied, and the result adjusted to
2755      * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate
2756      * system (where <code>(0, 0)</code> is the top-left of the
2757      * activeArraySize rectangle), to determine the final pixel
2758      * coordinate of the world point for processed (non-RAW)
2759      * output buffers.</p>
2760      * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
2761      * coordinate <code>(x + 0.5, y + 0.5)</code>.  So on a device with a
2762      * precorrection active array of size <code>(10,10)</code>, the valid pixel
2763      * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
2764      * have an optical center at the exact center of the pixel grid, at
2765      * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
2766      * <code>(5,5)</code>.</p>
2767      *
2768      * @see ACAMERA_LENS_DISTORTION
2769      * @see ACAMERA_LENS_POSE_ROTATION
2770      * @see ACAMERA_LENS_POSE_TRANSLATION
2771      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2772      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
2773      */
2774     ACAMERA_LENS_INTRINSIC_CALIBRATION =                        // float[5]
2775             ACAMERA_LENS_START + 10,
2776     ACAMERA_LENS_RADIAL_DISTORTION =                            // Deprecated! DO NOT USE
2777             ACAMERA_LENS_START + 11,
2778     /**
2779      * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION, and the accuracy of
2780      * ACAMERA_LENS_POSE_TRANSLATION and ACAMERA_LENS_POSE_ROTATION.</p>
2781      *
2782      * @see ACAMERA_LENS_POSE_ROTATION
2783      * @see ACAMERA_LENS_POSE_TRANSLATION
2784      *
2785      * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p>
2786      *
2787      * <p>This tag may appear in:
2788      * <ul>
2789      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2790      * </ul></p>
2791      *
2792      * <p>Different calibration methods and use cases can produce better or worse results
2793      * depending on the selected coordinate origin.</p>
2794      */
2795     ACAMERA_LENS_POSE_REFERENCE =                               // byte (acamera_metadata_enum_android_lens_pose_reference_t)
2796             ACAMERA_LENS_START + 12,
2797     /**
2798      * <p>The correction coefficients to correct for this camera device's
2799      * radial and tangential lens distortion.</p>
2800      * <p>Replaces the deprecated ACAMERA_LENS_RADIAL_DISTORTION field, which was
2801      * inconsistently defined.</p>
2802      *
2803      * @see ACAMERA_LENS_RADIAL_DISTORTION
2804      *
2805      * <p>Type: float[5]</p>
2806      *
2807      * <p>This tag may appear in:
2808      * <ul>
2809      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2810      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2811      * </ul></p>
2812      *
2813      * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
2814      * kappa_3]</code> and two tangential distortion coefficients
2815      * <code>[kappa_4, kappa_5]</code> that can be used to correct the
2816      * lens's geometric distortion with the mapping equations:</p>
2817      * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2818      *        kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
2819      *  y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2820      *        kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
2821      * </code></pre>
2822      * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
2823      * input image that correspond to the pixel values in the
2824      * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
2825      * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
2826      * </code></pre>
2827      * <p>The pixel coordinates are defined in a coordinate system
2828      * related to the ACAMERA_LENS_INTRINSIC_CALIBRATION
2829      * calibration fields; see that entry for details of the mapping stages.
2830      * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
2831      * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
2832      * the range of the coordinates depends on the focal length
2833      * terms of the intrinsic calibration.</p>
2834      * <p>Finally, <code>r</code> represents the radial distance from the
2835      * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
2836      * <p>The distortion model used is the Brown-Conrady model.</p>
2837      *
2838      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2839      */
2840     ACAMERA_LENS_DISTORTION =                                   // float[5]
2841             ACAMERA_LENS_START + 13,
2842     /**
2843      * <p>The correction coefficients to correct for this camera device's
2844      * radial and tangential lens distortion for a
2845      * CaptureRequest with ACAMERA_SENSOR_PIXEL_MODE set to
2846      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
2847      *
2848      * @see ACAMERA_SENSOR_PIXEL_MODE
2849      *
2850      * <p>Type: float[5]</p>
2851      *
2852      * <p>This tag may appear in:
2853      * <ul>
2854      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2855      * </ul></p>
2856      *
2857      * <p>Analogous to ACAMERA_LENS_DISTORTION, when ACAMERA_SENSOR_PIXEL_MODE is set to
2858      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
2859      *
2860      * @see ACAMERA_LENS_DISTORTION
2861      * @see ACAMERA_SENSOR_PIXEL_MODE
2862      */
2863     ACAMERA_LENS_DISTORTION_MAXIMUM_RESOLUTION =                // float[5]
2864             ACAMERA_LENS_START + 14,
2865     /**
2866      * <p>The parameters for this camera device's intrinsic
2867      * calibration when ACAMERA_SENSOR_PIXEL_MODE is set to
2868      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
2869      *
2870      * @see ACAMERA_SENSOR_PIXEL_MODE
2871      *
2872      * <p>Type: float[5]</p>
2873      *
2874      * <p>This tag may appear in:
2875      * <ul>
2876      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2877      * </ul></p>
2878      *
2879      * <p>Analogous to ACAMERA_LENS_INTRINSIC_CALIBRATION, when ACAMERA_SENSOR_PIXEL_MODE is set to
2880      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
2881      *
2882      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2883      * @see ACAMERA_SENSOR_PIXEL_MODE
2884      */
2885     ACAMERA_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION =     // float[5]
2886             ACAMERA_LENS_START + 15,
2887     ACAMERA_LENS_END,
2888 
2889     /**
2890      * <p>List of aperture size values for ACAMERA_LENS_APERTURE that are
2891      * supported by this camera device.</p>
2892      *
2893      * @see ACAMERA_LENS_APERTURE
2894      *
2895      * <p>Type: float[n]</p>
2896      *
2897      * <p>This tag may appear in:
2898      * <ul>
2899      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2900      * </ul></p>
2901      *
2902      * <p>If the camera device doesn't support a variable lens aperture,
2903      * this list will contain only one value, which is the fixed aperture size.</p>
2904      * <p>If the camera device supports a variable aperture, the aperture values
2905      * in this list will be sorted in ascending order.</p>
2906      */
2907     ACAMERA_LENS_INFO_AVAILABLE_APERTURES =                     // float[n]
2908             ACAMERA_LENS_INFO_START,
2909     /**
2910      * <p>List of neutral density filter values for
2911      * ACAMERA_LENS_FILTER_DENSITY that are supported by this camera device.</p>
2912      *
2913      * @see ACAMERA_LENS_FILTER_DENSITY
2914      *
2915      * <p>Type: float[n]</p>
2916      *
2917      * <p>This tag may appear in:
2918      * <ul>
2919      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2920      * </ul></p>
2921      *
2922      * <p>If a neutral density filter is not supported by this camera device,
2923      * this list will contain only 0. Otherwise, this list will include every
2924      * filter density supported by the camera device, in ascending order.</p>
2925      */
2926     ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES =              // float[n]
2927             ACAMERA_LENS_INFO_START + 1,
2928     /**
2929      * <p>List of focal lengths for ACAMERA_LENS_FOCAL_LENGTH that are supported by this camera
2930      * device.</p>
2931      *
2932      * @see ACAMERA_LENS_FOCAL_LENGTH
2933      *
2934      * <p>Type: float[n]</p>
2935      *
2936      * <p>This tag may appear in:
2937      * <ul>
2938      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2939      * </ul></p>
2940      *
2941      * <p>If optical zoom is not supported, this list will only contain
2942      * a single value corresponding to the fixed focal length of the
2943      * device. Otherwise, this list will include every focal length supported
2944      * by the camera device, in ascending order.</p>
2945      */
2946     ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS =                 // float[n]
2947             ACAMERA_LENS_INFO_START + 2,
2948     /**
2949      * <p>List of optical image stabilization (OIS) modes for
2950      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE that are supported by this camera device.</p>
2951      *
2952      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
2953      *
2954      * <p>Type: byte[n]</p>
2955      *
2956      * <p>This tag may appear in:
2957      * <ul>
2958      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2959      * </ul></p>
2960      *
2961      * <p>If OIS is not supported by a given camera device, this list will
2962      * contain only OFF.</p>
2963      */
2964     ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =         // byte[n]
2965             ACAMERA_LENS_INFO_START + 3,
2966     /**
2967      * <p>Hyperfocal distance for this lens.</p>
2968      *
2969      * <p>Type: float</p>
2970      *
2971      * <p>This tag may appear in:
2972      * <ul>
2973      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2974      * </ul></p>
2975      *
2976      * <p>If the lens is not fixed focus, the camera device will report this
2977      * field when ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION is APPROXIMATE or CALIBRATED.</p>
2978      *
2979      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
2980      */
2981     ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE =                     // float
2982             ACAMERA_LENS_INFO_START + 4,
2983     /**
2984      * <p>Shortest distance from frontmost surface
2985      * of the lens that can be brought into sharp focus.</p>
2986      *
2987      * <p>Type: float</p>
2988      *
2989      * <p>This tag may appear in:
2990      * <ul>
2991      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2992      * </ul></p>
2993      *
2994      * <p>If the lens is fixed-focus, this will be
2995      * 0.</p>
2996      */
2997     ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE =                  // float
2998             ACAMERA_LENS_INFO_START + 5,
2999     /**
3000      * <p>Dimensions of lens shading map.</p>
3001      *
3002      * <p>Type: int32[2]</p>
3003      *
3004      * <p>This tag may appear in:
3005      * <ul>
3006      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3007      * </ul></p>
3008      *
3009      * <p>The map should be on the order of 30-40 rows and columns, and
3010      * must be smaller than 64x64.</p>
3011      */
3012     ACAMERA_LENS_INFO_SHADING_MAP_SIZE =                        // int32[2]
3013             ACAMERA_LENS_INFO_START + 6,
3014     /**
3015      * <p>The lens focus distance calibration quality.</p>
3016      *
3017      * <p>Type: byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)</p>
3018      *
3019      * <p>This tag may appear in:
3020      * <ul>
3021      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3022      * </ul></p>
3023      *
3024      * <p>The lens focus distance calibration quality determines the reliability of
3025      * focus related metadata entries, i.e. ACAMERA_LENS_FOCUS_DISTANCE,
3026      * ACAMERA_LENS_FOCUS_RANGE, ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE, and
3027      * ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE.</p>
3028      * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
3029      * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
3030      * and increasing positive numbers represent focusing closer and closer
3031      * to the camera device. The focus distance control also uses diopters
3032      * on these devices.</p>
3033      * <p>UNCALIBRATED devices do not use units that are directly comparable
3034      * to any real physical measurement, but <code>0.0f</code> still represents farthest
3035      * focus, and ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE represents the
3036      * nearest focus the device can achieve.</p>
3037      *
3038      * @see ACAMERA_LENS_FOCUS_DISTANCE
3039      * @see ACAMERA_LENS_FOCUS_RANGE
3040      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
3041      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
3042      */
3043     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION =              // byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)
3044             ACAMERA_LENS_INFO_START + 7,
3045     ACAMERA_LENS_INFO_END,
3046 
3047     /**
3048      * <p>Mode of operation for the noise reduction algorithm.</p>
3049      *
3050      * <p>Type: byte (acamera_metadata_enum_android_noise_reduction_mode_t)</p>
3051      *
3052      * <p>This tag may appear in:
3053      * <ul>
3054      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3055      *   <li>ACaptureRequest</li>
3056      * </ul></p>
3057      *
3058      * <p>The noise reduction algorithm attempts to improve image quality by removing
3059      * excessive noise added by the capture process, especially in dark conditions.</p>
3060      * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
3061      * YUV domain.</p>
3062      * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
3063      * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
3064      * This mode is optional, may not be support by all devices. The application should check
3065      * ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES before using it.</p>
3066      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
3067      * will be applied. HIGH_QUALITY mode indicates that the camera device
3068      * will use the highest-quality noise filtering algorithms,
3069      * even if it slows down capture rate. FAST means the camera device will not
3070      * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
3071      * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
3072      * Every output stream will have a similar amount of enhancement applied.</p>
3073      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
3074      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
3075      * into a final capture when triggered by the user. In this mode, the camera device applies
3076      * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
3077      * preview quality, but does not apply noise reduction to high-resolution streams, since
3078      * those will be reprocessed later if necessary.</p>
3079      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
3080      * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
3081      * may adjust the noise reduction parameters for best image quality based on the
3082      * android.reprocess.effectiveExposureFactor if it is set.</p>
3083      *
3084      * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
3085      */
3086     ACAMERA_NOISE_REDUCTION_MODE =                              // byte (acamera_metadata_enum_android_noise_reduction_mode_t)
3087             ACAMERA_NOISE_REDUCTION_START,
3088     /**
3089      * <p>List of noise reduction modes for ACAMERA_NOISE_REDUCTION_MODE that are supported
3090      * by this camera device.</p>
3091      *
3092      * @see ACAMERA_NOISE_REDUCTION_MODE
3093      *
3094      * <p>Type: byte[n]</p>
3095      *
3096      * <p>This tag may appear in:
3097      * <ul>
3098      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3099      * </ul></p>
3100      *
3101      * <p>Full-capability camera devices will always support OFF and FAST.</p>
3102      * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
3103      * ZERO_SHUTTER_LAG.</p>
3104      * <p>Legacy-capability camera devices will only support FAST mode.</p>
3105      */
3106     ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =   // byte[n]
3107             ACAMERA_NOISE_REDUCTION_START + 2,
3108     ACAMERA_NOISE_REDUCTION_END,
3109 
3110     /**
3111      * <p>The maximum numbers of different types of output streams
3112      * that can be configured and used simultaneously by a camera device.</p>
3113      *
3114      * <p>Type: int32[3]</p>
3115      *
3116      * <p>This tag may appear in:
3117      * <ul>
3118      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3119      * </ul></p>
3120      *
3121      * <p>This is a 3 element tuple that contains the max number of output simultaneous
3122      * streams for raw sensor, processed (but not stalling), and processed (and stalling)
3123      * formats respectively. For example, assuming that JPEG is typically a processed and
3124      * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
3125      * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
3126      * <p>This lists the upper bound of the number of output streams supported by
3127      * the camera device. Using more streams simultaneously may require more hardware and
3128      * CPU resources that will consume more power. The image format for an output stream can
3129      * be any supported format provided by ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
3130      * The formats defined in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS can be catergorized
3131      * into the 3 stream types as below:</p>
3132      * <ul>
3133      * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
3134      *   Typically {@link AIMAGE_FORMAT_JPEG JPEG format}.</li>
3135      * <li>Raw formats: {@link AIMAGE_FORMAT_RAW16 RAW_SENSOR}, {@link AIMAGE_FORMAT_RAW10 RAW10}, or
3136      *   {@link AIMAGE_FORMAT_RAW12 RAW12}.</li>
3137      * <li>Processed (but not-stalling): any non-RAW format without a stall duration.  Typically
3138      *   {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888},
3139      *   <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>
3140      * </ul>
3141      *
3142      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3143      */
3144     ACAMERA_REQUEST_MAX_NUM_OUTPUT_STREAMS =                    // int32[3]
3145             ACAMERA_REQUEST_START + 6,
3146     /**
3147      * <p>Specifies the number of pipeline stages the frame went
3148      * through from when it was exposed to when the final completed result
3149      * was available to the framework.</p>
3150      *
3151      * <p>Type: byte</p>
3152      *
3153      * <p>This tag may appear in:
3154      * <ul>
3155      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3156      * </ul></p>
3157      *
3158      * <p>Depending on what settings are used in the request, and
3159      * what streams are configured, the data may undergo less processing,
3160      * and some pipeline stages skipped.</p>
3161      * <p>See ACAMERA_REQUEST_PIPELINE_MAX_DEPTH for more details.</p>
3162      *
3163      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
3164      */
3165     ACAMERA_REQUEST_PIPELINE_DEPTH =                            // byte
3166             ACAMERA_REQUEST_START + 9,
3167     /**
3168      * <p>Specifies the number of maximum pipeline stages a frame
3169      * has to go through from when it's exposed to when it's available
3170      * to the framework.</p>
3171      *
3172      * <p>Type: byte</p>
3173      *
3174      * <p>This tag may appear in:
3175      * <ul>
3176      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3177      * </ul></p>
3178      *
3179      * <p>A typical minimum value for this is 2 (one stage to expose,
3180      * one stage to readout) from the sensor. The ISP then usually adds
3181      * its own stages to do custom HW processing. Further stages may be
3182      * added by SW processing.</p>
3183      * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
3184      * processing is enabled (e.g. face detection), the actual pipeline
3185      * depth (specified by ACAMERA_REQUEST_PIPELINE_DEPTH) may be less than
3186      * the max pipeline depth.</p>
3187      * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
3188      * X frame intervals.</p>
3189      * <p>This value will normally be 8 or less, however, for high speed capture session,
3190      * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
3191      *
3192      * @see ACAMERA_REQUEST_PIPELINE_DEPTH
3193      */
3194     ACAMERA_REQUEST_PIPELINE_MAX_DEPTH =                        // byte
3195             ACAMERA_REQUEST_START + 10,
3196     /**
3197      * <p>Defines how many sub-components
3198      * a result will be composed of.</p>
3199      *
3200      * <p>Type: int32</p>
3201      *
3202      * <p>This tag may appear in:
3203      * <ul>
3204      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3205      * </ul></p>
3206      *
3207      * <p>In order to combat the pipeline latency, partial results
3208      * may be delivered to the application layer from the camera device as
3209      * soon as they are available.</p>
3210      * <p>Optional; defaults to 1. A value of 1 means that partial
3211      * results are not supported, and only the final TotalCaptureResult will
3212      * be produced by the camera device.</p>
3213      * <p>A typical use case for this might be: after requesting an
3214      * auto-focus (AF) lock the new AF state might be available 50%
3215      * of the way through the pipeline.  The camera device could
3216      * then immediately dispatch this state via a partial result to
3217      * the application, and the rest of the metadata via later
3218      * partial results.</p>
3219      */
3220     ACAMERA_REQUEST_PARTIAL_RESULT_COUNT =                      // int32
3221             ACAMERA_REQUEST_START + 11,
3222     /**
3223      * <p>List of capabilities that this camera device
3224      * advertises as fully supporting.</p>
3225      *
3226      * <p>Type: byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)</p>
3227      *
3228      * <p>This tag may appear in:
3229      * <ul>
3230      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3231      * </ul></p>
3232      *
3233      * <p>A capability is a contract that the camera device makes in order
3234      * to be able to satisfy one or more use cases.</p>
3235      * <p>Listing a capability guarantees that the whole set of features
3236      * required to support a common use will all be available.</p>
3237      * <p>Using a subset of the functionality provided by an unsupported
3238      * capability may be possible on a specific camera device implementation;
3239      * to do this query each of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS,
3240      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS,
3241      * ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS.</p>
3242      * <p>The following capabilities are guaranteed to be available on
3243      * ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL <code>==</code> FULL devices:</p>
3244      * <ul>
3245      * <li>MANUAL_SENSOR</li>
3246      * <li>MANUAL_POST_PROCESSING</li>
3247      * </ul>
3248      * <p>Other capabilities may be available on either FULL or LIMITED
3249      * devices, but the application should query this key to be sure.</p>
3250      *
3251      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3252      * @see ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS
3253      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3254      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3255      */
3256     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES =                    // byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)
3257             ACAMERA_REQUEST_START + 12,
3258     /**
3259      * <p>A list of all keys that the camera device has available
3260      * to use with {@link ACaptureRequest }.</p>
3261      *
3262      * <p>Type: int32[n]</p>
3263      *
3264      * <p>This tag may appear in:
3265      * <ul>
3266      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3267      * </ul></p>
3268      *
3269      * <p>Attempting to set a key into a CaptureRequest that is not
3270      * listed here will result in an invalid request and will be rejected
3271      * by the camera device.</p>
3272      * <p>This field can be used to query the feature set of a camera device
3273      * at a more granular level than capabilities. This is especially
3274      * important for optional keys that are not listed under any capability
3275      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3276      *
3277      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3278      */
3279     ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS =                    // int32[n]
3280             ACAMERA_REQUEST_START + 13,
3281     /**
3282      * <p>A list of all keys that the camera device has available to use with {@link ACameraCaptureSession_captureCallback_result }.</p>
3283      *
3284      * <p>Type: int32[n]</p>
3285      *
3286      * <p>This tag may appear in:
3287      * <ul>
3288      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3289      * </ul></p>
3290      *
3291      * <p>Attempting to get a key from a CaptureResult that is not
3292      * listed here will always return a <code>null</code> value. Getting a key from
3293      * a CaptureResult that is listed here will generally never return a <code>null</code>
3294      * value.</p>
3295      * <p>The following keys may return <code>null</code> unless they are enabled:</p>
3296      * <ul>
3297      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP (non-null iff ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON)</li>
3298      * </ul>
3299      * <p>(Those sometimes-null keys will nevertheless be listed here
3300      * if they are available.)</p>
3301      * <p>This field can be used to query the feature set of a camera device
3302      * at a more granular level than capabilities. This is especially
3303      * important for optional keys that are not listed under any capability
3304      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3305      *
3306      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3307      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
3308      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
3309      */
3310     ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS =                     // int32[n]
3311             ACAMERA_REQUEST_START + 14,
3312     /**
3313      * <p>A list of all keys that the camera device has available to use with {@link ACameraManager_getCameraCharacteristics }.</p>
3314      *
3315      * <p>Type: int32[n]</p>
3316      *
3317      * <p>This tag may appear in:
3318      * <ul>
3319      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3320      * </ul></p>
3321      *
3322      * <p>This entry follows the same rules as
3323      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS (except that it applies for
3324      * CameraCharacteristics instead of CaptureResult). See above for more
3325      * details.</p>
3326      *
3327      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3328      */
3329     ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =            // int32[n]
3330             ACAMERA_REQUEST_START + 15,
3331     /**
3332      * <p>A subset of the available request keys that the camera device
3333      * can pass as part of the capture session initialization.</p>
3334      *
3335      * <p>Type: int32[n]</p>
3336      *
3337      * <p>This tag may appear in:
3338      * <ul>
3339      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3340      * </ul></p>
3341      *
3342      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which
3343      * contains a list of keys that are difficult to apply per-frame and
3344      * can result in unexpected delays when modified during the capture session
3345      * lifetime. Typical examples include parameters that require a
3346      * time-consuming hardware re-configuration or internal camera pipeline
3347      * change. For performance reasons we advise clients to pass their initial
3348      * values as part of
3349      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3350      * Once the camera capture session is enabled it is also recommended to avoid
3351      * changing them from their initial values set in
3352      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3353      * Control over session parameters can still be exerted in capture requests
3354      * but clients should be aware and expect delays during their application.
3355      * An example usage scenario could look like this:</p>
3356      * <ul>
3357      * <li>The camera client starts by quering the session parameter key list via
3358      *   {@link ACameraManager_getCameraCharacteristics }.</li>
3359      * <li>Before triggering the capture session create sequence, a capture request
3360      *   must be built via
3361      *   {@link ACameraDevice_createCaptureRequest }
3362      *   using an appropriate template matching the particular use case.</li>
3363      * <li>The client should go over the list of session parameters and check
3364      *   whether some of the keys listed matches with the parameters that
3365      *   they intend to modify as part of the first capture request.</li>
3366      * <li>If there is no such match, the capture request can be  passed
3367      *   unmodified to
3368      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3369      * <li>If matches do exist, the client should update the respective values
3370      *   and pass the request to
3371      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3372      * <li>After the capture session initialization completes the session parameter
3373      *   key list can continue to serve as reference when posting or updating
3374      *   further requests. As mentioned above further changes to session
3375      *   parameters should ideally be avoided, if updates are necessary
3376      *   however clients could expect a delay/glitch during the
3377      *   parameter switch.</li>
3378      * </ul>
3379      *
3380      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3381      */
3382     ACAMERA_REQUEST_AVAILABLE_SESSION_KEYS =                    // int32[n]
3383             ACAMERA_REQUEST_START + 16,
3384     /**
3385      * <p>A subset of the available request keys that can be overridden for
3386      * physical devices backing a logical multi-camera.</p>
3387      *
3388      * <p>Type: int32[n]</p>
3389      *
3390      * <p>This tag may appear in:
3391      * <ul>
3392      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3393      * </ul></p>
3394      *
3395      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which contains a list
3396      * of keys that can be overridden using <a href="https://developer.android.com/reference/CaptureRequest/Builder.html#setPhysicalCameraKey">Builder#setPhysicalCameraKey</a>.
3397      * The respective value of such request key can be obtained by calling
3398      * <a href="https://developer.android.com/reference/CaptureRequest/Builder.html#getPhysicalCameraKey">Builder#getPhysicalCameraKey</a>. Capture requests that contain
3399      * individual physical device requests must be built via
3400      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureRequest(int,">Set)</a>.</p>
3401      *
3402      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3403      */
3404     ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =    // int32[n]
3405             ACAMERA_REQUEST_START + 17,
3406     ACAMERA_REQUEST_END,
3407 
3408     /**
3409      * <p>The desired region of the sensor to read out for this capture.</p>
3410      *
3411      * <p>Type: int32[4]</p>
3412      *
3413      * <p>This tag may appear in:
3414      * <ul>
3415      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3416      *   <li>ACaptureRequest</li>
3417      * </ul></p>
3418      *
3419      * <p>This control can be used to implement digital zoom.</p>
3420      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
3421      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
3422      * the top-left pixel of the active array.</p>
3423      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate system
3424      * depends on the mode being set.  When the distortion correction mode is OFF, the
3425      * coordinate system follows ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with <code>(0,
3426      * 0)</code> being the top-left pixel of the pre-correction active array.  When the distortion
3427      * correction mode is not OFF, the coordinate system follows
3428      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being the top-left pixel of the
3429      * active array.</p>
3430      * <p>Output streams use this rectangle to produce their output, cropping to a smaller region
3431      * if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
3432      * match the output's configured resolution.</p>
3433      * <p>The crop region is applied after the RAW to other color space (e.g. YUV)
3434      * conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, they are not
3435      * croppable. The crop region will be ignored by raw streams.</p>
3436      * <p>For non-raw streams, any additional per-stream cropping will be done to maximize the
3437      * final pixel area of the stream.</p>
3438      * <p>For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
3439      * the exact crop region. 16:9 streams will further crop vertically (letterbox).</p>
3440      * <p>Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
3441      * (pillarbox), and 16:9 streams will match exactly. These additional crops will be
3442      * centered within the crop region.</p>
3443      * <p>To illustrate, here are several scenarios of different crop regions and output streams,
3444      * for a hypothetical camera device with an active array of size <code>(2000,1500)</code>.  Note that
3445      * several of these examples use non-centered crop regions for ease of illustration; such
3446      * regions are only supported on devices with FREEFORM capability
3447      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>), but this does not affect the way the crop
3448      * rules work otherwise.</p>
3449      * <ul>
3450      * <li>Camera Configuration:<ul>
3451      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
3452      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
3453      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
3454      * </ul>
3455      * </li>
3456      * <li>Case #1: 4:3 crop region with 2x digital zoom<ul>
3457      * <li>Crop region: <code>Rect(500, 375, 1500, 1125) // (left, top, right, bottom)</code></li>
3458      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-43-ratio.png" /></li>
3459      * <li><code>640x480</code> stream source area: <code>(500, 375, 1500, 1125)</code> (equal to crop region)</li>
3460      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3461      * </ul>
3462      * </li>
3463      * <li>Case #2: 16:9 crop region with ~1.5x digital zoom.<ul>
3464      * <li>Crop region: <code>Rect(500, 375, 1833, 1125)</code></li>
3465      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-169-ratio.png" /></li>
3466      * <li><code>640x480</code> stream source area: <code>(666, 375, 1666, 1125)</code> (pillarboxed)</li>
3467      * <li><code>1280x720</code> stream source area: <code>(500, 375, 1833, 1125)</code> (equal to crop region)</li>
3468      * </ul>
3469      * </li>
3470      * <li>Case #3: 1:1 crop region with ~2.6x digital zoom.<ul>
3471      * <li>Crop region: <code>Rect(500, 375, 1250, 1125)</code></li>
3472      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-11-ratio.png" /></li>
3473      * <li><code>640x480</code> stream source area: <code>(500, 469, 1250, 1031)</code> (letterboxed)</li>
3474      * <li><code>1280x720</code> stream source area: <code>(500, 543, 1250, 957)</code> (letterboxed)</li>
3475      * </ul>
3476      * </li>
3477      * <li>Case #4: Replace <code>640x480</code> stream with <code>1024x1024</code> stream, with 4:3 crop region:<ul>
3478      * <li>Crop region: <code>Rect(500, 375, 1500, 1125)</code></li>
3479      * <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>
3480      * <li><code>1024x1024</code> stream source area: <code>(625, 375, 1375, 1125)</code> (pillarboxed)</li>
3481      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3482      * <li>Note that in this case, neither of the two outputs is a subset of the other, with
3483      *   each containing image data the other doesn't have.</li>
3484      * </ul>
3485      * </li>
3486      * </ul>
3487      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, the width and height
3488      * of the crop region cannot be set to be smaller than
3489      * <code>floor( activeArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code> and
3490      * <code>floor( activeArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>, respectively.</p>
3491      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, the width
3492      * and height of the crop region cannot be set to be smaller than
3493      * <code>floor( preCorrectionActiveArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>
3494      * and
3495      * <code>floor( preCorrectionActiveArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>,
3496      * respectively.</p>
3497      * <p>The camera device may adjust the crop region to account for rounding and other hardware
3498      * requirements; the final crop region used will be included in the output capture result.</p>
3499      * <p>The camera sensor output aspect ratio depends on factors such as output stream
3500      * combination and ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, and shouldn't be adjusted by using
3501      * this control. And the camera device will treat different camera sensor output sizes
3502      * (potentially with in-sensor crop) as the same crop of
3503      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE. As a result, the application shouldn't assume the
3504      * maximum crop region always maps to the same aspect ratio or field of view for the
3505      * sensor output.</p>
3506      * <p>Starting from API level 30, it's strongly recommended to use ACAMERA_CONTROL_ZOOM_RATIO
3507      * to take advantage of better support for zoom with logical multi-camera. The benefits
3508      * include better precision with optical-digital zoom combination, and ability to do
3509      * zoom-out from 1.0x. When using ACAMERA_CONTROL_ZOOM_RATIO for zoom, the crop region in
3510      * the capture request should be left as the default activeArray size. The
3511      * coordinate system is post-zoom, meaning that the activeArraySize or
3512      * preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
3513      * ACAMERA_CONTROL_ZOOM_RATIO for details.</p>
3514      * <p>For camera devices with the
3515      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
3516      * capability, ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
3517      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
3518      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
3519      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
3520      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
3521      *
3522      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
3523      * @see ACAMERA_CONTROL_ZOOM_RATIO
3524      * @see ACAMERA_DISTORTION_CORRECTION_MODE
3525      * @see ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
3526      * @see ACAMERA_SCALER_CROPPING_TYPE
3527      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3528      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
3529      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3530      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
3531      * @see ACAMERA_SENSOR_PIXEL_MODE
3532      */
3533     ACAMERA_SCALER_CROP_REGION =                                // int32[4]
3534             ACAMERA_SCALER_START,
3535     /**
3536      * <p>The maximum ratio between both active area width
3537      * and crop region width, and active area height and
3538      * crop region height, for ACAMERA_SCALER_CROP_REGION.</p>
3539      *
3540      * @see ACAMERA_SCALER_CROP_REGION
3541      *
3542      * <p>Type: float</p>
3543      *
3544      * <p>This tag may appear in:
3545      * <ul>
3546      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3547      * </ul></p>
3548      *
3549      * <p>This represents the maximum amount of zooming possible by
3550      * the camera device, or equivalently, the minimum cropping
3551      * window size.</p>
3552      * <p>Crop regions that have a width or height that is smaller
3553      * than this ratio allows will be rounded up to the minimum
3554      * allowed size by the camera device.</p>
3555      * <p>Starting from API level 30, when using ACAMERA_CONTROL_ZOOM_RATIO to zoom in or out,
3556      * the application must use ACAMERA_CONTROL_ZOOM_RATIO_RANGE to query both the minimum and
3557      * maximum zoom ratio.</p>
3558      *
3559      * @see ACAMERA_CONTROL_ZOOM_RATIO
3560      * @see ACAMERA_CONTROL_ZOOM_RATIO_RANGE
3561      */
3562     ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =                 // float
3563             ACAMERA_SCALER_START + 4,
3564     /**
3565      * <p>The available stream configurations that this
3566      * camera device supports
3567      * (i.e. format, width, height, output/input stream).</p>
3568      *
3569      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)</p>
3570      *
3571      * <p>This tag may appear in:
3572      * <ul>
3573      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3574      * </ul></p>
3575      *
3576      * <p>The configurations are listed as <code>(format, width, height, input?)</code>
3577      * tuples.</p>
3578      * <p>For a given use case, the actual maximum supported resolution
3579      * may be lower than what is listed here, depending on the destination
3580      * Surface for the image data. For example, for recording video,
3581      * the video encoder chosen may have a maximum size limit (e.g. 1080p)
3582      * smaller than what the camera (e.g. maximum resolution is 3264x2448)
3583      * can provide.</p>
3584      * <p>Please reference the documentation for the image data destination to
3585      * check if it limits the maximum size for image data.</p>
3586      * <p>Not all output formats may be supported in a configuration with
3587      * an input stream of a particular format. For more details, see
3588      * android.scaler.availableInputOutputFormatsMap.</p>
3589      * <p>For applications targeting SDK version older than 31, the following table
3590      * describes the minimum required output stream configurations based on the hardware level
3591      * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL):</p>
3592      * <p>Format         | Size                                         | Hardware Level | Notes
3593      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
3594      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
3595      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
3596      * JPEG           | 1280x720 (720)                               | Any            | if 720p &lt;= activeArraySize
3597      * JPEG           | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
3598      * JPEG           | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
3599      * YUV_420_888    | all output sizes available for JPEG          | FULL           |
3600      * YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
3601      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
3602      * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
3603      * media performance class 12 or higher by setting
3604      * <a href="https://developer.android.com/reference/android/os/Build/VERSION_CDOES/MEDIA_PERFORMANCE_CLASS.html">MEDIA_PERFORMANCE_CLASS</a> to be 31 or larger,
3605      * the primary camera devices (first rear/front camera in the camera ID list) will not
3606      * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
3607      * smaller than 1080p, the camera device will round up the JPEG image size to at least
3608      * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
3609      * This new minimum required output stream configurations are illustrated by the table below:</p>
3610      * <p>Format         | Size                                         | Hardware Level | Notes
3611      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
3612      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
3613      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
3614      * YUV_420_888    | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | FULL           |
3615      * YUV_420_888    | 1920x1080 (1080p)                            | FULL           | if 1080p &lt;= activeArraySize
3616      * YUV_420_888    | 1280x720 (720)                               | FULL           | if 720p &lt;= activeArraySize
3617      * YUV_420_888    | 640x480 (480p)                               | FULL           | if 480p &lt;= activeArraySize
3618      * YUV_420_888    | 320x240 (240p)                               | FULL           | if 240p &lt;= activeArraySize
3619      * YUV_420_888    | all output sizes available for FULL hardware level, up to the maximum video size | LIMITED        |
3620      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
3621      * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
3622      * to be media performance class 12 or better by setting
3623      * <a href="https://developer.android.com/reference/android/os/Build/VERSION_CDOES/MEDIA_PERFORMANCE_CLASS.html">MEDIA_PERFORMANCE_CLASS</a> to be 31 or larger,
3624      * or if the camera device isn't a primary rear/front camera, the minimum required output
3625      * stream configurations are the same as for applications targeting SDK version older than
3626      * 31.</p>
3627      * <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
3628      * mandatory stream configurations on a per-capability basis.</p>
3629      * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
3630      * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
3631      * fully supported due to this limitation on devices with high-resolution image sensors.
3632      * Therefore, trying to configure a QCIF resolution stream together with any other
3633      * stream larger than 1920x1080 resolution (either width or height) might not be supported,
3634      * and capture session creation will fail if it is not.</p>
3635      *
3636      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3637      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3638      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3639      */
3640     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS =            // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)
3641             ACAMERA_SCALER_START + 10,
3642     /**
3643      * <p>This lists the minimum frame duration for each
3644      * format/size combination.</p>
3645      *
3646      * <p>Type: int64[4*n]</p>
3647      *
3648      * <p>This tag may appear in:
3649      * <ul>
3650      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3651      * </ul></p>
3652      *
3653      * <p>This should correspond to the frame duration when only that
3654      * stream is active, with all processing (typically in android.*.mode)
3655      * set to either OFF or FAST.</p>
3656      * <p>When multiple streams are used in a request, the minimum frame
3657      * duration will be max(individual stream min durations).</p>
3658      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
3659      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
3660      * calculating the max frame rate.</p>
3661      *
3662      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
3663      * @see ACAMERA_SENSOR_FRAME_DURATION
3664      */
3665     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS =              // int64[4*n]
3666             ACAMERA_SCALER_START + 11,
3667     /**
3668      * <p>This lists the maximum stall duration for each
3669      * output format/size combination.</p>
3670      *
3671      * <p>Type: int64[4*n]</p>
3672      *
3673      * <p>This tag may appear in:
3674      * <ul>
3675      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3676      * </ul></p>
3677      *
3678      * <p>A stall duration is how much extra time would get added
3679      * to the normal minimum frame duration for a repeating request
3680      * that has streams with non-zero stall.</p>
3681      * <p>For example, consider JPEG captures which have the following
3682      * characteristics:</p>
3683      * <ul>
3684      * <li>JPEG streams act like processed YUV streams in requests for which
3685      * they are not included; in requests in which they are directly
3686      * referenced, they act as JPEG streams. This is because supporting a
3687      * JPEG stream requires the underlying YUV data to always be ready for
3688      * use by a JPEG encoder, but the encoder will only be used (and impact
3689      * frame duration) on requests that actually reference a JPEG stream.</li>
3690      * <li>The JPEG processor can run concurrently to the rest of the camera
3691      * pipeline, but cannot process more than 1 capture at a time.</li>
3692      * </ul>
3693      * <p>In other words, using a repeating YUV request would result
3694      * in a steady frame rate (let's say it's 30 FPS). If a single
3695      * JPEG request is submitted periodically, the frame rate will stay
3696      * at 30 FPS (as long as we wait for the previous JPEG to return each
3697      * time). If we try to submit a repeating YUV + JPEG request, then
3698      * the frame rate will drop from 30 FPS.</p>
3699      * <p>In general, submitting a new request with a non-0 stall time
3700      * stream will <em>not</em> cause a frame rate drop unless there are still
3701      * outstanding buffers for that stream from previous requests.</p>
3702      * <p>Submitting a repeating request with streams (call this <code>S</code>)
3703      * is the same as setting the minimum frame duration from
3704      * the normal minimum frame duration corresponding to <code>S</code>, added with
3705      * the maximum stall duration for <code>S</code>.</p>
3706      * <p>If interleaving requests with and without a stall duration,
3707      * a request will stall by the maximum of the remaining times
3708      * for each can-stall stream with outstanding buffers.</p>
3709      * <p>This means that a stalling request will not have an exposure start
3710      * until the stall has completed.</p>
3711      * <p>This should correspond to the stall duration when only that stream is
3712      * active, with all processing (typically in android.*.mode) set to FAST
3713      * or OFF. Setting any of the processing modes to HIGH_QUALITY
3714      * effectively results in an indeterminate stall duration for all
3715      * streams in a request (the regular stall calculation rules are
3716      * ignored).</p>
3717      * <p>The following formats may always have a stall duration:</p>
3718      * <ul>
3719      * <li>{@link AIMAGE_FORMAT_JPEG }</li>
3720      * <li>{@link AIMAGE_FORMAT_RAW16 }</li>
3721      * </ul>
3722      * <p>The following formats will never have a stall duration:</p>
3723      * <ul>
3724      * <li>{@link AIMAGE_FORMAT_YUV_420_888 }</li>
3725      * <li>{@link AIMAGE_FORMAT_RAW10 }</li>
3726      * <li>{@link AIMAGE_FORMAT_RAW12 }</li>
3727      * <li>{@link AIMAGE_FORMAT_Y8 }</li>
3728      * </ul>
3729      * <p>All other formats may or may not have an allowed stall duration on
3730      * a per-capability basis; refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3731      * for more details.</p>
3732      * <p>See ACAMERA_SENSOR_FRAME_DURATION for more information about
3733      * calculating the max frame rate (absent stalls).</p>
3734      *
3735      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3736      * @see ACAMERA_SENSOR_FRAME_DURATION
3737      */
3738     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS =                  // int64[4*n]
3739             ACAMERA_SCALER_START + 12,
3740     /**
3741      * <p>The crop type that this camera device supports.</p>
3742      *
3743      * <p>Type: byte (acamera_metadata_enum_android_scaler_cropping_type_t)</p>
3744      *
3745      * <p>This tag may appear in:
3746      * <ul>
3747      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3748      * </ul></p>
3749      *
3750      * <p>When passing a non-centered crop region (ACAMERA_SCALER_CROP_REGION) to a camera
3751      * device that only supports CENTER_ONLY cropping, the camera device will move the
3752      * crop region to the center of the sensor active array (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE)
3753      * and keep the crop region width and height unchanged. The camera device will return the
3754      * final used crop region in metadata result ACAMERA_SCALER_CROP_REGION.</p>
3755      * <p>Camera devices that support FREEFORM cropping will support any crop region that
3756      * is inside of the active array. The camera device will apply the same crop region and
3757      * return the final used crop region in capture result metadata ACAMERA_SCALER_CROP_REGION.</p>
3758      * <p>Starting from API level 30,</p>
3759      * <ul>
3760      * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
3761      * application must set ACAMERA_CONTROL_ZOOM_RATIO to 1.0, and use ACAMERA_SCALER_CROP_REGION
3762      * for zoom.</li>
3763      * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol>
3764      * <li>Set ACAMERA_CONTROL_ZOOM_RATIO to 1.0; adjust zoom by ACAMERA_SCALER_CROP_REGION.</li>
3765      * <li>Adjust zoom by ACAMERA_CONTROL_ZOOM_RATIO; use ACAMERA_SCALER_CROP_REGION to crop
3766      * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
3767      * windowboxing.</li>
3768      * </ol>
3769      * </li>
3770      * <li>Setting ACAMERA_CONTROL_ZOOM_RATIO to values different than 1.0 and
3771      * ACAMERA_SCALER_CROP_REGION to be windowboxing at the same time are not supported. In this
3772      * case, the camera framework will override the ACAMERA_SCALER_CROP_REGION to be the active
3773      * array.</li>
3774      * </ul>
3775      * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
3776      *
3777      * @see ACAMERA_CONTROL_ZOOM_RATIO
3778      * @see ACAMERA_SCALER_CROP_REGION
3779      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3780      */
3781     ACAMERA_SCALER_CROPPING_TYPE =                              // byte (acamera_metadata_enum_android_scaler_cropping_type_t)
3782             ACAMERA_SCALER_START + 13,
3783     /**
3784      * <p>Recommended stream configurations for common client use cases.</p>
3785      *
3786      * <p>Type: int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)</p>
3787      *
3788      * <p>This tag may appear in:
3789      * <ul>
3790      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3791      * </ul></p>
3792      *
3793      * <p>Optional subset of the ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS that contains
3794      * similar tuples listed as
3795      * (i.e. width, height, format, output/input stream, usecase bit field).
3796      * Camera devices will be able to suggest particular stream configurations which are
3797      * power and performance efficient for specific use cases. For more information about
3798      * retrieving the suggestions see
3799      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
3800      * <p>The data representation is int[5], which maps to
3801      * (width, height, format, output/input stream, usecase bit field). The array can be
3802      * parsed using the following pseudo code:</p>
3803      * <p>struct StreamConfiguration {
3804      * int32_t format;
3805      * int32_t width;
3806      * int32_t height;
3807      * int32_t isInput; };</p>
3808      * <p>void getPreferredStreamConfigurations(
3809      *     int32_t *array, size_t count, int32_t usecaseId,
3810      *     Vector &lt; StreamConfiguration &gt; * scs) {
3811      *     const size_t STREAM_CONFIGURATION_SIZE = 5;
3812      *     const size_t STREAM_WIDTH_OFFSET = 0;
3813      *     const size_t STREAM_HEIGHT_OFFSET = 1;
3814      *     const size_t STREAM_FORMAT_OFFSET = 2;
3815      *     const size_t STREAM_IS_INPUT_OFFSET = 3;
3816      *     const size_t STREAM_USECASE_BITMAP_OFFSET = 4;</p>
3817      * <pre><code>for (size_t i = 0; i &lt; count; i+= STREAM_CONFIGURATION_SIZE) {
3818      *     int32_t width = array[i + STREAM_WIDTH_OFFSET];
3819      *     int32_t height = array[i + STREAM_HEIGHT_OFFSET];
3820      *     int32_t format = array[i + STREAM_FORMAT_OFFSET];
3821      *     int32_t isInput = array[i + STREAM_IS_INPUT_OFFSET];
3822      *     int32_t supportedUsecases = array[i + STREAM_USECASE_BITMAP_OFFSET];
3823      *     if (supportedUsecases &amp; (1 &lt;&lt; usecaseId)) {
3824      *         StreamConfiguration sc = {format, width, height, isInput};
3825      *         scs-&gt;add(sc);
3826      *     }
3827      * }
3828      * </code></pre>
3829      * <p>}</p>
3830      *
3831      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3832      */
3833     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
3834                                                                 // int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)
3835             ACAMERA_SCALER_START + 14,
3836     /**
3837      * <p>Recommended mappings of image formats that are supported by this
3838      * camera device for input streams, to their corresponding output formats.</p>
3839      *
3840      * <p>Type: int32</p>
3841      *
3842      * <p>This tag may appear in:
3843      * <ul>
3844      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3845      * </ul></p>
3846      *
3847      * <p>This is a recommended subset of the complete list of mappings found in
3848      * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
3849      * The list however doesn't need to contain all available and supported mappings. Instead of
3850      * this developers must list only recommended and efficient entries.
3851      * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
3852      * configuration see
3853      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
3854      */
3855     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
3856                                                                 // int32
3857             ACAMERA_SCALER_START + 15,
3858     /**
3859      * <p>List of rotate-and-crop modes for ACAMERA_SCALER_ROTATE_AND_CROP that are supported by this camera device.</p>
3860      *
3861      * @see ACAMERA_SCALER_ROTATE_AND_CROP
3862      *
3863      * <p>Type: byte[n]</p>
3864      *
3865      * <p>This tag may appear in:
3866      * <ul>
3867      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3868      * </ul></p>
3869      *
3870      * <p>This entry lists the valid modes for ACAMERA_SCALER_ROTATE_AND_CROP for this camera device.</p>
3871      * <p>Starting with API level 30, all devices will list at least <code>ROTATE_AND_CROP_NONE</code>.
3872      * Devices with support for rotate-and-crop will additionally list at least
3873      * <code>ROTATE_AND_CROP_AUTO</code> and <code>ROTATE_AND_CROP_90</code>.</p>
3874      *
3875      * @see ACAMERA_SCALER_ROTATE_AND_CROP
3876      */
3877     ACAMERA_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES =            // byte[n]
3878             ACAMERA_SCALER_START + 16,
3879     /**
3880      * <p>Whether a rotation-and-crop operation is applied to processed
3881      * outputs from the camera.</p>
3882      *
3883      * <p>Type: byte (acamera_metadata_enum_android_scaler_rotate_and_crop_t)</p>
3884      *
3885      * <p>This tag may appear in:
3886      * <ul>
3887      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3888      *   <li>ACaptureRequest</li>
3889      * </ul></p>
3890      *
3891      * <p>This control is primarily intended to help camera applications with no support for
3892      * multi-window modes to work correctly on devices where multi-window scenarios are
3893      * unavoidable, such as foldables or other devices with variable display geometry or more
3894      * free-form window placement (such as laptops, which often place portrait-orientation apps
3895      * in landscape with pillarboxing).</p>
3896      * <p>If supported, the default value is <code>ROTATE_AND_CROP_AUTO</code>, which allows the camera API
3897      * to enable backwards-compatibility support for applications that do not support resizing
3898      * / multi-window modes, when the device is in fact in a multi-window mode (such as inset
3899      * portrait on laptops, or on a foldable device in some fold states).  In addition,
3900      * <code>ROTATE_AND_CROP_NONE</code> and <code>ROTATE_AND_CROP_90</code> will always be available if this control
3901      * is supported by the device.  If not supported, devices API level 30 or higher will always
3902      * list only <code>ROTATE_AND_CROP_NONE</code>.</p>
3903      * <p>When <code>CROP_AUTO</code> is in use, and the camera API activates backward-compatibility mode,
3904      * several metadata fields will also be parsed differently to ensure that coordinates are
3905      * correctly handled for features like drawing face detection boxes or passing in
3906      * tap-to-focus coordinates.  The camera API will convert positions in the active array
3907      * coordinate system to/from the cropped-and-rotated coordinate system to make the
3908      * operation transparent for applications.  The following controls are affected:</p>
3909      * <ul>
3910      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
3911      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
3912      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
3913      * <li>android.statistics.faces</li>
3914      * </ul>
3915      * <p>Capture results will contain the actual value selected by the API;
3916      * <code>ROTATE_AND_CROP_AUTO</code> will never be seen in a capture result.</p>
3917      * <p>Applications can also select their preferred cropping mode, either to opt out of the
3918      * backwards-compatibility treatment, or to use the cropping feature themselves as needed.
3919      * In this case, no coordinate translation will be done automatically, and all controls
3920      * will continue to use the normal active array coordinates.</p>
3921      * <p>Cropping and rotating is done after the application of digital zoom (via either
3922      * ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO), but before each individual
3923      * output is further cropped and scaled. It only affects processed outputs such as
3924      * YUV, PRIVATE, and JPEG.  It has no effect on RAW outputs.</p>
3925      * <p>When <code>CROP_90</code> or <code>CROP_270</code> are selected, there is a significant loss to the field of
3926      * view. For example, with a 4:3 aspect ratio output of 1600x1200, <code>CROP_90</code> will still
3927      * produce 1600x1200 output, but these buffers are cropped from a vertical 3:4 slice at the
3928      * center of the 4:3 area, then rotated to be 4:3, and then upscaled to 1600x1200.  Only
3929      * 56.25% of the original FOV is still visible.  In general, for an aspect ratio of <code>w:h</code>,
3930      * the crop and rotate operation leaves <code>(h/w)^2</code> of the field of view visible. For 16:9,
3931      * this is ~31.6%.</p>
3932      * <p>As a visual example, the figure below shows the effect of <code>ROTATE_AND_CROP_90</code> on the
3933      * outputs for the following parameters:</p>
3934      * <ul>
3935      * <li>Sensor active array: <code>2000x1500</code></li>
3936      * <li>Crop region: top-left: <code>(500, 375)</code>, size: <code>(1000, 750)</code> (4:3 aspect ratio)</li>
3937      * <li>Output streams: YUV <code>640x480</code> and YUV <code>1280x720</code></li>
3938      * <li><code>ROTATE_AND_CROP_90</code></li>
3939      * </ul>
3940      * <p><img alt="Effect of ROTATE_AND_CROP_90" src="../images/camera2/metadata/android.scaler.rotateAndCrop/crop-region-rotate-90-43-ratio.png" /></p>
3941      * <p>With these settings, the regions of the active array covered by the output streams are:</p>
3942      * <ul>
3943      * <li>640x480 stream crop: top-left: <code>(219, 375)</code>, size: <code>(562, 750)</code></li>
3944      * <li>1280x720 stream crop: top-left: <code>(289, 375)</code>, size: <code>(422, 750)</code></li>
3945      * </ul>
3946      * <p>Since the buffers are rotated, the buffers as seen by the application are:</p>
3947      * <ul>
3948      * <li>640x480 stream: top-left: <code>(781, 375)</code> on active array, size: <code>(640, 480)</code>, downscaled 1.17x from sensor pixels</li>
3949      * <li>1280x720 stream: top-left: <code>(711, 375)</code> on active array, size: <code>(1280, 720)</code>, upscaled 1.71x from sensor pixels</li>
3950      * </ul>
3951      *
3952      * @see ACAMERA_CONTROL_AE_REGIONS
3953      * @see ACAMERA_CONTROL_AF_REGIONS
3954      * @see ACAMERA_CONTROL_AWB_REGIONS
3955      * @see ACAMERA_CONTROL_ZOOM_RATIO
3956      * @see ACAMERA_SCALER_CROP_REGION
3957      */
3958     ACAMERA_SCALER_ROTATE_AND_CROP =                            // byte (acamera_metadata_enum_android_scaler_rotate_and_crop_t)
3959             ACAMERA_SCALER_START + 17,
3960     /**
3961      * <p>Default YUV/PRIVATE size to use for requesting secure image buffers.</p>
3962      *
3963      * <p>Type: int32[2]</p>
3964      *
3965      * <p>This tag may appear in:
3966      * <ul>
3967      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3968      * </ul></p>
3969      *
3970      * <p>This entry lists the default size supported in the secure camera mode. This entry is
3971      * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null
3972      * if the camera device does not list SECURE_IMAGE_DATA capability.</p>
3973      * <p>When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed
3974      * to be supported by the camera HAL in the secure camera mode. Any other format or
3975      * resolutions might not be supported. Use
3976      * {@link ACameraDevice_isSessionConfigurationSupported }
3977      * API to query if a secure session configuration is supported if the device supports this
3978      * API.</p>
3979      * <p>If this key returns null on a device with SECURE_IMAGE_DATA capability, the application
3980      * can assume all output sizes listed in the
3981      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
3982      * are supported.</p>
3983      */
3984     ACAMERA_SCALER_DEFAULT_SECURE_IMAGE_SIZE =                  // int32[2]
3985             ACAMERA_SCALER_START + 18,
3986     /**
3987      * <p>The available multi-resolution stream configurations that this
3988      * physical camera device supports
3989      * (i.e. format, width, height, output/input stream).</p>
3990      *
3991      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t)</p>
3992      *
3993      * <p>This tag may appear in:
3994      * <ul>
3995      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3996      * </ul></p>
3997      *
3998      * <p>This list contains a subset of the parent logical camera's multi-resolution stream
3999      * configurations which belong to this physical camera, and it will advertise and will only
4000      * advertise the maximum supported resolutions for a particular format.</p>
4001      * <p>If this camera device isn't a physical camera device constituting a logical camera,
4002      * but a standalone <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
4003      * camera, this field represents the multi-resolution input/output stream configurations of
4004      * default mode and max resolution modes. The sizes will be the maximum resolution of a
4005      * particular format for default mode and max resolution mode.</p>
4006      * <p>This field will only be advertised if the device is a physical camera of a
4007      * logical multi-camera device or an ultra high resolution sensor camera. For a logical
4008      * multi-camera, the camera API will derive the logical camera’s multi-resolution stream
4009      * configurations from all physical cameras. For an ultra high resolution sensor camera, this
4010      * is used directly as the camera’s multi-resolution stream configurations.</p>
4011      */
4012     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS =
4013                                                                 // int32[n*4] (acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t)
4014             ACAMERA_SCALER_START + 19,
4015     /**
4016      * <p>The available stream configurations that this
4017      * camera device supports (i.e. format, width, height, output/input stream) for a
4018      * CaptureRequest with ACAMERA_SENSOR_PIXEL_MODE set to
4019      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
4020      *
4021      * @see ACAMERA_SENSOR_PIXEL_MODE
4022      *
4023      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t)</p>
4024      *
4025      * <p>This tag may appear in:
4026      * <ul>
4027      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4028      * </ul></p>
4029      *
4030      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, for configurations
4031      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4032      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
4033      * <p>Not all output formats may be supported in a configuration with
4034      * an input stream of a particular format. For more details, see
4035      * android.scaler.availableInputOutputFormatsMapMaximumResolution.</p>
4036      *
4037      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
4038      * @see ACAMERA_SENSOR_PIXEL_MODE
4039      */
4040     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
4041                                                                 // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t)
4042             ACAMERA_SCALER_START + 20,
4043     /**
4044      * <p>This lists the minimum frame duration for each
4045      * format/size combination when the camera device is sent a CaptureRequest with
4046      * ACAMERA_SENSOR_PIXEL_MODE set to
4047      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
4048      *
4049      * @see ACAMERA_SENSOR_PIXEL_MODE
4050      *
4051      * <p>Type: int64[4*n]</p>
4052      *
4053      * <p>This tag may appear in:
4054      * <ul>
4055      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4056      * </ul></p>
4057      *
4058      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, for configurations
4059      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4060      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
4061      * <p>When multiple streams are used in a request (if supported, when ACAMERA_SENSOR_PIXEL_MODE
4062      * is set to
4063      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>), the
4064      * minimum frame duration will be max(individual stream min durations).</p>
4065      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
4066      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION for more details about
4067      * calculating the max frame rate.</p>
4068      *
4069      * @see ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
4070      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION
4071      * @see ACAMERA_SENSOR_FRAME_DURATION
4072      * @see ACAMERA_SENSOR_PIXEL_MODE
4073      */
4074     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
4075                                                                 // int64[4*n]
4076             ACAMERA_SCALER_START + 21,
4077     /**
4078      * <p>This lists the maximum stall duration for each
4079      * output format/size combination when CaptureRequests are submitted with
4080      * ACAMERA_SENSOR_PIXEL_MODE set to
4081      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a></p>
4082      *
4083      * @see ACAMERA_SENSOR_PIXEL_MODE
4084      *
4085      * <p>Type: int64[4*n]</p>
4086      *
4087      * <p>This tag may appear in:
4088      * <ul>
4089      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4090      * </ul></p>
4091      *
4092      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, for configurations
4093      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4094      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
4095      *
4096      * @see ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
4097      * @see ACAMERA_SENSOR_PIXEL_MODE
4098      */
4099     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION =
4100                                                                 // int64[4*n]
4101             ACAMERA_SCALER_START + 22,
4102     /**
4103      * <p>Whether the camera device supports multi-resolution input or output streams</p>
4104      *
4105      * <p>Type: byte (acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t)</p>
4106      *
4107      * <p>This tag may appear in:
4108      * <ul>
4109      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4110      * </ul></p>
4111      *
4112      * <p>A logical multi-camera or an ultra high resolution camera may support multi-resolution
4113      * input or output streams. With multi-resolution output streams, the camera device is able
4114      * to output different resolution images depending on the current active physical camera or
4115      * pixel mode. With multi-resolution input streams, the camera device can reprocess images
4116      * of different resolutions from different physical cameras or sensor pixel modes.</p>
4117      * <p>When set to TRUE:
4118      * * For a logical multi-camera, the camera framework derives
4119      * android.scaler.multiResolutionStreamConfigurationMap by combining the
4120      * ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS from its physical
4121      * cameras.
4122      * * For an ultra-high resolution sensor camera, the camera framework directly copies
4123      * the value of ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS to
4124      * android.scaler.multiResolutionStreamConfigurationMap.</p>
4125      *
4126      * @see ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
4127      */
4128     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED =          // byte (acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t)
4129             ACAMERA_SCALER_START + 24,
4130     ACAMERA_SCALER_END,
4131 
4132     /**
4133      * <p>Duration each pixel is exposed to
4134      * light.</p>
4135      *
4136      * <p>Type: int64</p>
4137      *
4138      * <p>This tag may appear in:
4139      * <ul>
4140      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4141      *   <li>ACaptureRequest</li>
4142      * </ul></p>
4143      *
4144      * <p>If the sensor can't expose this exact duration, it will shorten the
4145      * duration exposed to the nearest possible value (rather than expose longer).
4146      * The final exposure time used will be available in the output capture result.</p>
4147      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4148      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4149      *
4150      * @see ACAMERA_CONTROL_AE_MODE
4151      * @see ACAMERA_CONTROL_MODE
4152      */
4153     ACAMERA_SENSOR_EXPOSURE_TIME =                              // int64
4154             ACAMERA_SENSOR_START,
4155     /**
4156      * <p>Duration from start of frame exposure to
4157      * start of next frame exposure.</p>
4158      *
4159      * <p>Type: int64</p>
4160      *
4161      * <p>This tag may appear in:
4162      * <ul>
4163      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4164      *   <li>ACaptureRequest</li>
4165      * </ul></p>
4166      *
4167      * <p>The maximum frame rate that can be supported by a camera subsystem is
4168      * a function of many factors:</p>
4169      * <ul>
4170      * <li>Requested resolutions of output image streams</li>
4171      * <li>Availability of binning / skipping modes on the imager</li>
4172      * <li>The bandwidth of the imager interface</li>
4173      * <li>The bandwidth of the various ISP processing blocks</li>
4174      * </ul>
4175      * <p>Since these factors can vary greatly between different ISPs and
4176      * sensors, the camera abstraction tries to represent the bandwidth
4177      * restrictions with as simple a model as possible.</p>
4178      * <p>The model presented has the following characteristics:</p>
4179      * <ul>
4180      * <li>The image sensor is always configured to output the smallest
4181      * resolution possible given the application's requested output stream
4182      * sizes.  The smallest resolution is defined as being at least as large
4183      * as the largest requested output stream size; the camera pipeline must
4184      * never digitally upsample sensor data when the crop region covers the
4185      * whole sensor. In general, this means that if only small output stream
4186      * resolutions are configured, the sensor can provide a higher frame
4187      * rate.</li>
4188      * <li>Since any request may use any or all the currently configured
4189      * output streams, the sensor and ISP must be configured to support
4190      * scaling a single capture to all the streams at the same time.  This
4191      * means the camera pipeline must be ready to produce the largest
4192      * requested output size without any delay.  Therefore, the overall
4193      * frame rate of a given configured stream set is governed only by the
4194      * largest requested stream resolution.</li>
4195      * <li>Using more than one output stream in a request does not affect the
4196      * frame duration.</li>
4197      * <li>Certain format-streams may need to do additional background processing
4198      * before data is consumed/produced by that stream. These processors
4199      * can run concurrently to the rest of the camera pipeline, but
4200      * cannot process more than 1 capture at a time.</li>
4201      * </ul>
4202      * <p>The necessary information for the application, given the model above, is provided via
4203      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }.
4204      * These are used to determine the maximum frame rate / minimum frame duration that is
4205      * possible for a given stream configuration.</p>
4206      * <p>Specifically, the application can use the following rules to
4207      * determine the minimum frame duration it can request from the camera
4208      * device:</p>
4209      * <ol>
4210      * <li>Let the set of currently configured input/output streams be called <code>S</code>.</li>
4211      * <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 }
4212      * (with its respective size/format). Let this set of frame durations be called <code>F</code>.</li>
4213      * <li>For any given request <code>R</code>, the minimum frame duration allowed for <code>R</code> is the maximum
4214      * out of all values in <code>F</code>. Let the streams used in <code>R</code> be called <code>S_r</code>.</li>
4215      * </ol>
4216      * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }
4217      * using its respective size/format), then the frame duration in <code>F</code> determines the steady
4218      * state frame rate that the application will get if it uses <code>R</code> as a repeating request. Let
4219      * this special kind of request be called <code>Rsimple</code>.</p>
4220      * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved by a single capture of a
4221      * new request <code>Rstall</code> (which has at least one in-use stream with a non-0 stall time) and if
4222      * <code>Rstall</code> has the same minimum frame duration this will not cause a frame rate loss if all
4223      * buffers from the previous <code>Rstall</code> have already been delivered.</p>
4224      * <p>For more details about stalling, see {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }.</p>
4225      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4226      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4227      *
4228      * @see ACAMERA_CONTROL_AE_MODE
4229      * @see ACAMERA_CONTROL_MODE
4230      */
4231     ACAMERA_SENSOR_FRAME_DURATION =                             // int64
4232             ACAMERA_SENSOR_START + 1,
4233     /**
4234      * <p>The amount of gain applied to sensor data
4235      * before processing.</p>
4236      *
4237      * <p>Type: int32</p>
4238      *
4239      * <p>This tag may appear in:
4240      * <ul>
4241      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4242      *   <li>ACaptureRequest</li>
4243      * </ul></p>
4244      *
4245      * <p>The sensitivity is the standard ISO sensitivity value,
4246      * as defined in ISO 12232:2006.</p>
4247      * <p>The sensitivity must be within ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE, and
4248      * if if it less than ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY, the camera device
4249      * is guaranteed to use only analog amplification for applying the gain.</p>
4250      * <p>If the camera device cannot apply the exact sensitivity
4251      * requested, it will reduce the gain to the nearest supported
4252      * value. The final sensitivity used will be available in the
4253      * output capture result.</p>
4254      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4255      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4256      * <p>Note that for devices supporting postRawSensitivityBoost, the total sensitivity applied
4257      * to the final processed image is the combination of ACAMERA_SENSOR_SENSITIVITY and
4258      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST. In case the application uses the sensor
4259      * sensitivity from last capture result of an auto request for a manual request, in order
4260      * to achieve the same brightness in the output image, the application should also
4261      * set postRawSensitivityBoost.</p>
4262      *
4263      * @see ACAMERA_CONTROL_AE_MODE
4264      * @see ACAMERA_CONTROL_MODE
4265      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
4266      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
4267      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
4268      * @see ACAMERA_SENSOR_SENSITIVITY
4269      */
4270     ACAMERA_SENSOR_SENSITIVITY =                                // int32
4271             ACAMERA_SENSOR_START + 2,
4272     /**
4273      * <p>The standard reference illuminant used as the scene light source when
4274      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM1,
4275      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
4276      * ACAMERA_SENSOR_FORWARD_MATRIX1 matrices.</p>
4277      *
4278      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
4279      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
4280      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
4281      *
4282      * <p>Type: byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)</p>
4283      *
4284      * <p>This tag may appear in:
4285      * <ul>
4286      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4287      * </ul></p>
4288      *
4289      * <p>The values in this key correspond to the values defined for the
4290      * EXIF LightSource tag. These illuminants are standard light sources
4291      * that are often used calibrating camera devices.</p>
4292      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM1,
4293      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
4294      * ACAMERA_SENSOR_FORWARD_MATRIX1 will also be present.</p>
4295      * <p>Some devices may choose to provide a second set of calibration
4296      * information for improved quality, including
4297      * ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 and its corresponding matrices.</p>
4298      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4299      * the camera device has RAW capability.</p>
4300      *
4301      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
4302      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
4303      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
4304      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4305      */
4306     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 =                      // byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)
4307             ACAMERA_SENSOR_START + 3,
4308     /**
4309      * <p>The standard reference illuminant used as the scene light source when
4310      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM2,
4311      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
4312      * ACAMERA_SENSOR_FORWARD_MATRIX2 matrices.</p>
4313      *
4314      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
4315      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
4316      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
4317      *
4318      * <p>Type: byte</p>
4319      *
4320      * <p>This tag may appear in:
4321      * <ul>
4322      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4323      * </ul></p>
4324      *
4325      * <p>See ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 for more details.</p>
4326      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM2,
4327      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
4328      * ACAMERA_SENSOR_FORWARD_MATRIX2 will also be present.</p>
4329      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4330      * the camera device has RAW capability.</p>
4331      *
4332      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
4333      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
4334      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
4335      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4336      */
4337     ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 =                      // byte
4338             ACAMERA_SENSOR_START + 4,
4339     /**
4340      * <p>A per-device calibration transform matrix that maps from the
4341      * reference sensor colorspace to the actual device sensor colorspace.</p>
4342      *
4343      * <p>Type: rational[3*3]</p>
4344      *
4345      * <p>This tag may appear in:
4346      * <ul>
4347      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4348      * </ul></p>
4349      *
4350      * <p>This matrix is used to correct for per-device variations in the
4351      * sensor colorspace, and is used for processing raw buffer data.</p>
4352      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4353      * contains a per-device calibration transform that maps colors
4354      * from reference sensor color space (i.e. the "golden module"
4355      * colorspace) into this camera device's native sensor color
4356      * space under the first reference illuminant
4357      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
4358      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4359      * the camera device has RAW capability.</p>
4360      *
4361      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4362      */
4363     ACAMERA_SENSOR_CALIBRATION_TRANSFORM1 =                     // rational[3*3]
4364             ACAMERA_SENSOR_START + 5,
4365     /**
4366      * <p>A per-device calibration transform matrix that maps from the
4367      * reference sensor colorspace to the actual device sensor colorspace
4368      * (this is the colorspace of the raw buffer data).</p>
4369      *
4370      * <p>Type: rational[3*3]</p>
4371      *
4372      * <p>This tag may appear in:
4373      * <ul>
4374      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4375      * </ul></p>
4376      *
4377      * <p>This matrix is used to correct for per-device variations in the
4378      * sensor colorspace, and is used for processing raw buffer data.</p>
4379      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4380      * contains a per-device calibration transform that maps colors
4381      * from reference sensor color space (i.e. the "golden module"
4382      * colorspace) into this camera device's native sensor color
4383      * space under the second reference illuminant
4384      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
4385      * <p>This matrix will only be present if the second reference
4386      * illuminant is present.</p>
4387      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4388      * the camera device has RAW capability.</p>
4389      *
4390      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4391      */
4392     ACAMERA_SENSOR_CALIBRATION_TRANSFORM2 =                     // rational[3*3]
4393             ACAMERA_SENSOR_START + 6,
4394     /**
4395      * <p>A matrix that transforms color values from CIE XYZ color space to
4396      * reference sensor color space.</p>
4397      *
4398      * <p>Type: rational[3*3]</p>
4399      *
4400      * <p>This tag may appear in:
4401      * <ul>
4402      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4403      * </ul></p>
4404      *
4405      * <p>This matrix is used to convert from the standard CIE XYZ color
4406      * space to the reference sensor colorspace, and is used when processing
4407      * raw buffer data.</p>
4408      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4409      * contains a color transform matrix that maps colors from the CIE
4410      * XYZ color space to the reference sensor color space (i.e. the
4411      * "golden module" colorspace) under the first reference illuminant
4412      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
4413      * <p>The white points chosen in both the reference sensor color space
4414      * and the CIE XYZ colorspace when calculating this transform will
4415      * match the standard white point for the first reference illuminant
4416      * (i.e. no chromatic adaptation will be applied by this transform).</p>
4417      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4418      * the camera device has RAW capability.</p>
4419      *
4420      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4421      */
4422     ACAMERA_SENSOR_COLOR_TRANSFORM1 =                           // rational[3*3]
4423             ACAMERA_SENSOR_START + 7,
4424     /**
4425      * <p>A matrix that transforms color values from CIE XYZ color space to
4426      * reference sensor color space.</p>
4427      *
4428      * <p>Type: rational[3*3]</p>
4429      *
4430      * <p>This tag may appear in:
4431      * <ul>
4432      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4433      * </ul></p>
4434      *
4435      * <p>This matrix is used to convert from the standard CIE XYZ color
4436      * space to the reference sensor colorspace, and is used when processing
4437      * raw buffer data.</p>
4438      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4439      * contains a color transform matrix that maps colors from the CIE
4440      * XYZ color space to the reference sensor color space (i.e. the
4441      * "golden module" colorspace) under the second reference illuminant
4442      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
4443      * <p>The white points chosen in both the reference sensor color space
4444      * and the CIE XYZ colorspace when calculating this transform will
4445      * match the standard white point for the second reference illuminant
4446      * (i.e. no chromatic adaptation will be applied by this transform).</p>
4447      * <p>This matrix will only be present if the second reference
4448      * illuminant is present.</p>
4449      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4450      * the camera device has RAW capability.</p>
4451      *
4452      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4453      */
4454     ACAMERA_SENSOR_COLOR_TRANSFORM2 =                           // rational[3*3]
4455             ACAMERA_SENSOR_START + 8,
4456     /**
4457      * <p>A matrix that transforms white balanced camera colors from the reference
4458      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4459      *
4460      * <p>Type: rational[3*3]</p>
4461      *
4462      * <p>This tag may appear in:
4463      * <ul>
4464      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4465      * </ul></p>
4466      *
4467      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4468      * is used when processing raw buffer data.</p>
4469      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4470      * a color transform matrix that maps white balanced colors from the
4471      * reference sensor color space to the CIE XYZ color space with a D50 white
4472      * point.</p>
4473      * <p>Under the first reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1)
4474      * this matrix is chosen so that the standard white point for this reference
4475      * illuminant in the reference sensor colorspace is mapped to D50 in the
4476      * CIE XYZ colorspace.</p>
4477      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4478      * the camera device has RAW capability.</p>
4479      *
4480      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4481      */
4482     ACAMERA_SENSOR_FORWARD_MATRIX1 =                            // rational[3*3]
4483             ACAMERA_SENSOR_START + 9,
4484     /**
4485      * <p>A matrix that transforms white balanced camera colors from the reference
4486      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4487      *
4488      * <p>Type: rational[3*3]</p>
4489      *
4490      * <p>This tag may appear in:
4491      * <ul>
4492      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4493      * </ul></p>
4494      *
4495      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4496      * is used when processing raw buffer data.</p>
4497      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4498      * a color transform matrix that maps white balanced colors from the
4499      * reference sensor color space to the CIE XYZ color space with a D50 white
4500      * point.</p>
4501      * <p>Under the second reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2)
4502      * this matrix is chosen so that the standard white point for this reference
4503      * illuminant in the reference sensor colorspace is mapped to D50 in the
4504      * CIE XYZ colorspace.</p>
4505      * <p>This matrix will only be present if the second reference
4506      * illuminant is present.</p>
4507      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4508      * the camera device has RAW capability.</p>
4509      *
4510      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4511      */
4512     ACAMERA_SENSOR_FORWARD_MATRIX2 =                            // rational[3*3]
4513             ACAMERA_SENSOR_START + 10,
4514     /**
4515      * <p>A fixed black level offset for each of the color filter arrangement
4516      * (CFA) mosaic channels.</p>
4517      *
4518      * <p>Type: int32[4]</p>
4519      *
4520      * <p>This tag may appear in:
4521      * <ul>
4522      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4523      * </ul></p>
4524      *
4525      * <p>This key specifies the zero light value for each of the CFA mosaic
4526      * channels in the camera sensor.  The maximal value output by the
4527      * sensor is represented by the value in ACAMERA_SENSOR_INFO_WHITE_LEVEL.</p>
4528      * <p>The values are given in the same order as channels listed for the CFA
4529      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
4530      * nth value given corresponds to the black level offset for the nth
4531      * color channel listed in the CFA.</p>
4532      * <p>The black level values of captured images may vary for different
4533      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
4534      * represents a coarse approximation for such case. It is recommended to
4535      * use ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL or use pixels from
4536      * ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS directly for captures when
4537      * supported by the camera device, which provides more accurate black
4538      * level values. For raw capture in particular, it is recommended to use
4539      * pixels from ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS to calculate black
4540      * level values for each frame.</p>
4541      * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p>
4542      *
4543      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
4544      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4545      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
4546      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4547      * @see ACAMERA_SENSOR_SENSITIVITY
4548      */
4549     ACAMERA_SENSOR_BLACK_LEVEL_PATTERN =                        // int32[4]
4550             ACAMERA_SENSOR_START + 12,
4551     /**
4552      * <p>Maximum sensitivity that is implemented
4553      * purely through analog gain.</p>
4554      *
4555      * <p>Type: int32</p>
4556      *
4557      * <p>This tag may appear in:
4558      * <ul>
4559      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4560      * </ul></p>
4561      *
4562      * <p>For ACAMERA_SENSOR_SENSITIVITY values less than or
4563      * equal to this, all applied gain must be analog. For
4564      * values above this, the gain applied can be a mix of analog and
4565      * digital.</p>
4566      *
4567      * @see ACAMERA_SENSOR_SENSITIVITY
4568      */
4569     ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY =                     // int32
4570             ACAMERA_SENSOR_START + 13,
4571     /**
4572      * <p>Clockwise angle through which the output image needs to be rotated to be
4573      * upright on the device screen in its native orientation.</p>
4574      *
4575      * <p>Type: int32</p>
4576      *
4577      * <p>This tag may appear in:
4578      * <ul>
4579      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4580      * </ul></p>
4581      *
4582      * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
4583      * the sensor's coordinate system.</p>
4584      * <p>Starting with Android API level 32, camera clients that query the orientation via
4585      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> on foldable devices which
4586      * include logical cameras can receive a value that can dynamically change depending on the
4587      * device/fold state.
4588      * Clients are advised to not cache or store the orientation value of such logical sensors.
4589      * In case repeated queries to CameraCharacteristics are not preferred, then clients can
4590      * also access the entire mapping from device state to sensor orientation in
4591      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/DeviceStateSensorOrientationMap.html">DeviceStateSensorOrientationMap</a>.
4592      * Do note that a dynamically changing sensor orientation value in camera characteristics
4593      * will not be the best way to establish the orientation per frame. Clients that want to
4594      * know the sensor orientation of a particular captured frame should query the
4595      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID from the corresponding capture result and
4596      * check the respective physical camera orientation.</p>
4597      * <p>Native camera clients must query ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS for the mapping
4598      * between device state and camera sensor orientation. Dynamic updates to the sensor
4599      * orientation are not supported in this code path.</p>
4600      *
4601      * @see ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS
4602      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
4603      */
4604     ACAMERA_SENSOR_ORIENTATION =                                // int32
4605             ACAMERA_SENSOR_START + 14,
4606     /**
4607      * <p>Time at start of exposure of first
4608      * row of the image sensor active array, in nanoseconds.</p>
4609      *
4610      * <p>Type: int64</p>
4611      *
4612      * <p>This tag may appear in:
4613      * <ul>
4614      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4615      * </ul></p>
4616      *
4617      * <p>The timestamps are also included in all image
4618      * buffers produced for the same capture, and will be identical
4619      * on all the outputs.</p>
4620      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> UNKNOWN,
4621      * the timestamps measure time since an unspecified starting point,
4622      * and are monotonically increasing. They can be compared with the
4623      * timestamps for other captures from the same camera device, but are
4624      * not guaranteed to be comparable to any other time source.</p>
4625      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME, the
4626      * 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
4627      * be compared to other timestamps from other subsystems that
4628      * are using that base.</p>
4629      * <p>For reprocessing, the timestamp will match the start of exposure of
4630      * the input image, i.e. <a href="https://developer.android.com/reference/CaptureResult.html#SENSOR_TIMESTAMP">the
4631      * timestamp</a> in the TotalCaptureResult that was used to create the
4632      * reprocess capture request.</p>
4633      *
4634      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
4635      */
4636     ACAMERA_SENSOR_TIMESTAMP =                                  // int64
4637             ACAMERA_SENSOR_START + 16,
4638     /**
4639      * <p>The estimated camera neutral color in the native sensor colorspace at
4640      * the time of capture.</p>
4641      *
4642      * <p>Type: rational[3]</p>
4643      *
4644      * <p>This tag may appear in:
4645      * <ul>
4646      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4647      * </ul></p>
4648      *
4649      * <p>This value gives the neutral color point encoded as an RGB value in the
4650      * native sensor color space.  The neutral color point indicates the
4651      * currently estimated white point of the scene illumination.  It can be
4652      * used to interpolate between the provided color transforms when
4653      * processing raw sensor data.</p>
4654      * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
4655      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4656      * the camera device has RAW capability.</p>
4657      */
4658     ACAMERA_SENSOR_NEUTRAL_COLOR_POINT =                        // rational[3]
4659             ACAMERA_SENSOR_START + 18,
4660     /**
4661      * <p>Noise model coefficients for each CFA mosaic channel.</p>
4662      *
4663      * <p>Type: double[2*CFA Channels]</p>
4664      *
4665      * <p>This tag may appear in:
4666      * <ul>
4667      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4668      * </ul></p>
4669      *
4670      * <p>This key contains two noise model coefficients for each CFA channel
4671      * corresponding to the sensor amplification (S) and sensor readout
4672      * noise (O).  These are given as pairs of coefficients for each channel
4673      * in the same order as channels listed for the CFA layout key
4674      * (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT).  This is
4675      * represented as an array of Pair&lt;Double, Double&gt;, where
4676      * the first member of the Pair at index n is the S coefficient and the
4677      * second member is the O coefficient for the nth color channel in the CFA.</p>
4678      * <p>These coefficients are used in a two parameter noise model to describe
4679      * the amount of noise present in the image for each CFA channel.  The
4680      * noise model used here is:</p>
4681      * <p>N(x) = sqrt(Sx + O)</p>
4682      * <p>Where x represents the recorded signal of a CFA channel normalized to
4683      * the range [0, 1], and S and O are the noise model coeffiecients for
4684      * that channel.</p>
4685      * <p>A more detailed description of the noise model can be found in the
4686      * Adobe DNG specification for the NoiseProfile tag.</p>
4687      * <p>For a MONOCHROME camera, there is only one color channel. So the noise model coefficients
4688      * will only contain one S and one O.</p>
4689      *
4690      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4691      */
4692     ACAMERA_SENSOR_NOISE_PROFILE =                              // double[2*CFA Channels]
4693             ACAMERA_SENSOR_START + 19,
4694     /**
4695      * <p>The worst-case divergence between Bayer green channels.</p>
4696      *
4697      * <p>Type: float</p>
4698      *
4699      * <p>This tag may appear in:
4700      * <ul>
4701      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4702      * </ul></p>
4703      *
4704      * <p>This value is an estimate of the worst case split between the
4705      * Bayer green channels in the red and blue rows in the sensor color
4706      * filter array.</p>
4707      * <p>The green split is calculated as follows:</p>
4708      * <ol>
4709      * <li>A 5x5 pixel (or larger) window W within the active sensor array is
4710      * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
4711      * mosaic channels (R, Gr, Gb, B).  The location and size of the window
4712      * chosen is implementation defined, and should be chosen to provide a
4713      * green split estimate that is both representative of the entire image
4714      * for this camera sensor, and can be calculated quickly.</li>
4715      * <li>The arithmetic mean of the green channels from the red
4716      * rows (mean_Gr) within W is computed.</li>
4717      * <li>The arithmetic mean of the green channels from the blue
4718      * rows (mean_Gb) within W is computed.</li>
4719      * <li>The maximum ratio R of the two means is computed as follows:
4720      * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
4721      * </ol>
4722      * <p>The ratio R is the green split divergence reported for this property,
4723      * which represents how much the green channels differ in the mosaic
4724      * pattern.  This value is typically used to determine the treatment of
4725      * the green mosaic channels when demosaicing.</p>
4726      * <p>The green split value can be roughly interpreted as follows:</p>
4727      * <ul>
4728      * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
4729      * <li>1.20 &lt;= R &gt;= 1.03 will require some software
4730      * correction to avoid demosaic errors (3-20% divergence).</li>
4731      * <li>R &gt; 1.20 will require strong software correction to produce
4732      * a usuable image (&gt;20% divergence).</li>
4733      * </ul>
4734      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4735      * the camera device has RAW capability.</p>
4736      */
4737     ACAMERA_SENSOR_GREEN_SPLIT =                                // float
4738             ACAMERA_SENSOR_START + 22,
4739     /**
4740      * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
4741      * when ACAMERA_SENSOR_TEST_PATTERN_MODE is SOLID_COLOR.</p>
4742      *
4743      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
4744      *
4745      * <p>Type: int32[4]</p>
4746      *
4747      * <p>This tag may appear in:
4748      * <ul>
4749      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4750      *   <li>ACaptureRequest</li>
4751      * </ul></p>
4752      *
4753      * <p>Each color channel is treated as an unsigned 32-bit integer.
4754      * The camera device then uses the most significant X bits
4755      * that correspond to how many bits are in its Bayer raw sensor
4756      * output.</p>
4757      * <p>For example, a sensor with RAW10 Bayer output would use the
4758      * 10 most significant bits from each color channel.</p>
4759      */
4760     ACAMERA_SENSOR_TEST_PATTERN_DATA =                          // int32[4]
4761             ACAMERA_SENSOR_START + 23,
4762     /**
4763      * <p>When enabled, the sensor sends a test pattern instead of
4764      * doing a real exposure from the camera.</p>
4765      *
4766      * <p>Type: int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)</p>
4767      *
4768      * <p>This tag may appear in:
4769      * <ul>
4770      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4771      *   <li>ACaptureRequest</li>
4772      * </ul></p>
4773      *
4774      * <p>When a test pattern is enabled, all manual sensor controls specified
4775      * by ACAMERA_SENSOR_* will be ignored. All other controls should
4776      * work as normal.</p>
4777      * <p>For example, if manual flash is enabled, flash firing should still
4778      * occur (and that the test pattern remain unmodified, since the flash
4779      * would not actually affect it).</p>
4780      * <p>Defaults to OFF.</p>
4781      */
4782     ACAMERA_SENSOR_TEST_PATTERN_MODE =                          // int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)
4783             ACAMERA_SENSOR_START + 24,
4784     /**
4785      * <p>List of sensor test pattern modes for ACAMERA_SENSOR_TEST_PATTERN_MODE
4786      * supported by this camera device.</p>
4787      *
4788      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
4789      *
4790      * <p>Type: int32[n]</p>
4791      *
4792      * <p>This tag may appear in:
4793      * <ul>
4794      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4795      * </ul></p>
4796      *
4797      * <p>Defaults to OFF, and always includes OFF if defined.</p>
4798      */
4799     ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES =               // int32[n]
4800             ACAMERA_SENSOR_START + 25,
4801     /**
4802      * <p>Duration between the start of exposure for the first row of the image sensor,
4803      * and the start of exposure for one past the last row of the image sensor.</p>
4804      *
4805      * <p>Type: int64</p>
4806      *
4807      * <p>This tag may appear in:
4808      * <ul>
4809      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4810      * </ul></p>
4811      *
4812      * <p>This is the exposure time skew between the first and <code>(last+1)</code> row exposure start times. The
4813      * first row and the last row are the first and last rows inside of the
4814      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4815      * <p>For typical camera sensors that use rolling shutters, this is also equivalent to the frame
4816      * readout time.</p>
4817      * <p>If the image sensor is operating in a binned or cropped mode due to the current output
4818      * target resolutions, it's possible this skew is reported to be larger than the exposure
4819      * time, for example, since it is based on the full array even if a partial array is read
4820      * out. Be sure to scale the number to cover the section of the sensor actually being used
4821      * for the outputs you care about. So if your output covers N rows of the active array of
4822      * height H, scale this value by N/H to get the total skew for that viewport.</p>
4823      * <p><em>Note:</em> Prior to Android 11, this field was described as measuring duration from
4824      * first to last row of the image sensor, which is not equal to the frame readout time for a
4825      * rolling shutter sensor. Implementations generally reported the latter value, so to resolve
4826      * the inconsistency, the description has been updated to range from (first, last+1) row
4827      * exposure start, instead.</p>
4828      *
4829      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4830      */
4831     ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW =                       // int64
4832             ACAMERA_SENSOR_START + 26,
4833     /**
4834      * <p>List of disjoint rectangles indicating the sensor
4835      * optically shielded black pixel regions.</p>
4836      *
4837      * <p>Type: int32[4*num_regions]</p>
4838      *
4839      * <p>This tag may appear in:
4840      * <ul>
4841      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4842      * </ul></p>
4843      *
4844      * <p>In most camera sensors, the active array is surrounded by some
4845      * optically shielded pixel areas. By blocking light, these pixels
4846      * provides a reliable black reference for black level compensation
4847      * in active array region.</p>
4848      * <p>This key provides a list of disjoint rectangles specifying the
4849      * regions of optically shielded (with metal shield) black pixel
4850      * regions if the camera device is capable of reading out these black
4851      * pixels in the output raw images. In comparison to the fixed black
4852      * level values reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN, this key
4853      * may provide a more accurate way for the application to calculate
4854      * black level of each captured raw images.</p>
4855      * <p>When this key is reported, the ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL and
4856      * ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL will also be reported.</p>
4857      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
4858      *
4859      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4860      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
4861      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
4862      */
4863     ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS =                      // int32[4*num_regions]
4864             ACAMERA_SENSOR_START + 27,
4865     /**
4866      * <p>A per-frame dynamic black level offset for each of the color filter
4867      * arrangement (CFA) mosaic channels.</p>
4868      *
4869      * <p>Type: float[4]</p>
4870      *
4871      * <p>This tag may appear in:
4872      * <ul>
4873      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4874      * </ul></p>
4875      *
4876      * <p>Camera sensor black levels may vary dramatically for different
4877      * capture settings (e.g. ACAMERA_SENSOR_SENSITIVITY). The fixed black
4878      * level reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may be too
4879      * inaccurate to represent the actual value on a per-frame basis. The
4880      * camera device internal pipeline relies on reliable black level values
4881      * to process the raw images appropriately. To get the best image
4882      * quality, the camera device may choose to estimate the per frame black
4883      * level values either based on optically shielded black regions
4884      * (ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS) or its internal model.</p>
4885      * <p>This key reports the camera device estimated per-frame zero light
4886      * value for each of the CFA mosaic channels in the camera sensor. The
4887      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may only represent a coarse
4888      * approximation of the actual black level values. This value is the
4889      * black level used in camera device internal image processing pipeline
4890      * and generally more accurate than the fixed black level values.
4891      * However, since they are estimated values by the camera device, they
4892      * may not be as accurate as the black level values calculated from the
4893      * optical black pixels reported by ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS.</p>
4894      * <p>The values are given in the same order as channels listed for the CFA
4895      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
4896      * nth value given corresponds to the black level offset for the nth
4897      * color channel listed in the CFA.</p>
4898      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values.</p>
4899      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is available or the
4900      * camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
4901      *
4902      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4903      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4904      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4905      * @see ACAMERA_SENSOR_SENSITIVITY
4906      */
4907     ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL =                        // float[4]
4908             ACAMERA_SENSOR_START + 28,
4909     /**
4910      * <p>Maximum raw value output by sensor for this frame.</p>
4911      *
4912      * <p>Type: int32</p>
4913      *
4914      * <p>This tag may appear in:
4915      * <ul>
4916      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4917      * </ul></p>
4918      *
4919      * <p>Since the ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may change for different
4920      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY), the white
4921      * level will change accordingly. This key is similar to
4922      * ACAMERA_SENSOR_INFO_WHITE_LEVEL, but specifies the camera device
4923      * estimated white level for each frame.</p>
4924      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is
4925      * available or the camera device advertises this key via
4926      * {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
4927      *
4928      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
4929      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
4930      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4931      * @see ACAMERA_SENSOR_SENSITIVITY
4932      */
4933     ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL =                        // int32
4934             ACAMERA_SENSOR_START + 29,
4935     /**
4936      * <p>Switches sensor pixel mode between maximum resolution mode and default mode.</p>
4937      *
4938      * <p>Type: byte (acamera_metadata_enum_android_sensor_pixel_mode_t)</p>
4939      *
4940      * <p>This tag may appear in:
4941      * <ul>
4942      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4943      *   <li>ACaptureRequest</li>
4944      * </ul></p>
4945      *
4946      * <p>This key controls whether the camera sensor operates in
4947      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
4948      * mode or not. By default, all camera devices operate in
4949      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode.
4950      * When operating in
4951      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode, sensors
4952      * with <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
4953      * capability would typically perform pixel binning in order to improve low light
4954      * performance, noise reduction etc. However, in
4955      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
4956      * mode (supported only
4957      * by <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
4958      * sensors), sensors typically operate in unbinned mode allowing for a larger image size.
4959      * The stream configurations supported in
4960      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
4961      * mode are also different from those of
4962      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode.
4963      * They can be queried through
4964      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> with
4965      * <a href="https://developer.android.com/reference/CameraCharacteristics.html#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)">CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)</a>.
4966      * Unless reported by both
4967      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a>s, the outputs from
4968      * <code>android.scaler.streamConfigurationMapMaximumResolution</code> and
4969      * <code>android.scaler.streamConfigurationMap</code>
4970      * must not be mixed in the same CaptureRequest. In other words, these outputs are
4971      * exclusive to each other.
4972      * This key does not need to be set for reprocess requests.</p>
4973      */
4974     ACAMERA_SENSOR_PIXEL_MODE =                                 // byte (acamera_metadata_enum_android_sensor_pixel_mode_t)
4975             ACAMERA_SENSOR_START + 32,
4976     /**
4977      * <p>Whether <code>RAW</code> images requested have their bayer pattern as described by
4978      * ACAMERA_SENSOR_INFO_BINNING_FACTOR.</p>
4979      *
4980      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
4981      *
4982      * <p>Type: byte (acamera_metadata_enum_android_sensor_raw_binning_factor_used_t)</p>
4983      *
4984      * <p>This tag may appear in:
4985      * <ul>
4986      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4987      * </ul></p>
4988      *
4989      * <p>This key will only be present in devices advertisting the
4990      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
4991      * capability which also advertise <code>REMOSAIC_REPROCESSING</code> capability. On all other devices
4992      * RAW targets will have a regular bayer pattern.</p>
4993      */
4994     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED =                    // byte (acamera_metadata_enum_android_sensor_raw_binning_factor_used_t)
4995             ACAMERA_SENSOR_START + 33,
4996     ACAMERA_SENSOR_END,
4997 
4998     /**
4999      * <p>The area of the image sensor which corresponds to active pixels after any geometric
5000      * distortion correction has been applied.</p>
5001      *
5002      * <p>Type: int32[4]</p>
5003      *
5004      * <p>This tag may appear in:
5005      * <ul>
5006      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5007      * </ul></p>
5008      *
5009      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
5010      * the region that actually receives light from the scene) after any geometric correction
5011      * has been applied, and should be treated as the maximum size in pixels of any of the
5012      * image output formats aside from the raw formats.</p>
5013      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
5014      * the full pixel array, and the size of the full pixel array is given by
5015      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5016      * <p>The coordinate system for most other keys that list pixel coordinates, including
5017      * ACAMERA_SCALER_CROP_REGION, is defined relative to the active array rectangle given in
5018      * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
5019      * <p>The active array may be smaller than the full pixel array, since the full array may
5020      * include black calibration pixels or other inactive regions.</p>
5021      * <p>For devices that do not support ACAMERA_DISTORTION_CORRECTION_MODE control, the active
5022      * array must be the same as ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
5023      * <p>For devices that support ACAMERA_DISTORTION_CORRECTION_MODE control, the active array must
5024      * be enclosed by ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. The difference between
5025      * pre-correction active array and active array accounts for scaling or cropping caused
5026      * by lens geometric distortion correction.</p>
5027      * <p>In general, application should always refer to active array size for controls like
5028      * metering regions or crop region. Two exceptions are when the application is dealing with
5029      * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
5030      * ACAMERA_DISTORTION_CORRECTION_MODE to OFF. In these cases, application should refer
5031      * to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
5032      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5033      *
5034      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5035      * @see ACAMERA_SCALER_CROP_REGION
5036      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5037      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5038      */
5039     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE =                     // int32[4]
5040             ACAMERA_SENSOR_INFO_START,
5041     /**
5042      * <p>Range of sensitivities for ACAMERA_SENSOR_SENSITIVITY supported by this
5043      * camera device.</p>
5044      *
5045      * @see ACAMERA_SENSOR_SENSITIVITY
5046      *
5047      * <p>Type: int32[2]</p>
5048      *
5049      * <p>This tag may appear in:
5050      * <ul>
5051      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5052      * </ul></p>
5053      *
5054      * <p>The values are the standard ISO sensitivity values,
5055      * as defined in ISO 12232:2006.</p>
5056      */
5057     ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE =                     // int32[2]
5058             ACAMERA_SENSOR_INFO_START + 1,
5059     /**
5060      * <p>The arrangement of color filters on sensor;
5061      * represents the colors in the top-left 2x2 section of
5062      * the sensor, in reading order, for a Bayer camera, or the
5063      * light spectrum it captures for MONOCHROME camera.</p>
5064      *
5065      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)</p>
5066      *
5067      * <p>This tag may appear in:
5068      * <ul>
5069      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5070      * </ul></p>
5071      *
5072      */
5073     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =              // byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)
5074             ACAMERA_SENSOR_INFO_START + 2,
5075     /**
5076      * <p>The range of image exposure times for ACAMERA_SENSOR_EXPOSURE_TIME supported
5077      * by this camera device.</p>
5078      *
5079      * @see ACAMERA_SENSOR_EXPOSURE_TIME
5080      *
5081      * <p>Type: int64[2]</p>
5082      *
5083      * <p>This tag may appear in:
5084      * <ul>
5085      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5086      * </ul></p>
5087      *
5088      */
5089     ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE =                   // int64[2]
5090             ACAMERA_SENSOR_INFO_START + 3,
5091     /**
5092      * <p>The maximum possible frame duration (minimum frame rate) for
5093      * ACAMERA_SENSOR_FRAME_DURATION that is supported this camera device.</p>
5094      *
5095      * @see ACAMERA_SENSOR_FRAME_DURATION
5096      *
5097      * <p>Type: int64</p>
5098      *
5099      * <p>This tag may appear in:
5100      * <ul>
5101      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5102      * </ul></p>
5103      *
5104      * <p>Attempting to use frame durations beyond the maximum will result in the frame
5105      * duration being clipped to the maximum. See that control for a full definition of frame
5106      * durations.</p>
5107      * <p>Refer to {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
5108      * for the minimum frame duration values.</p>
5109      */
5110     ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION =                    // int64
5111             ACAMERA_SENSOR_INFO_START + 4,
5112     /**
5113      * <p>The physical dimensions of the full pixel
5114      * array.</p>
5115      *
5116      * <p>Type: float[2]</p>
5117      *
5118      * <p>This tag may appear in:
5119      * <ul>
5120      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5121      * </ul></p>
5122      *
5123      * <p>This is the physical size of the sensor pixel
5124      * array defined by ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5125      *
5126      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5127      */
5128     ACAMERA_SENSOR_INFO_PHYSICAL_SIZE =                         // float[2]
5129             ACAMERA_SENSOR_INFO_START + 5,
5130     /**
5131      * <p>Dimensions of the full pixel array, possibly
5132      * including black calibration pixels.</p>
5133      *
5134      * <p>Type: int32[2]</p>
5135      *
5136      * <p>This tag may appear in:
5137      * <ul>
5138      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5139      * </ul></p>
5140      *
5141      * <p>The pixel count of the full pixel array of the image sensor, which covers
5142      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area.  This represents the full pixel dimensions of
5143      * the raw buffers produced by this sensor.</p>
5144      * <p>If a camera device supports raw sensor formats, either this or
5145      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is the maximum dimensions for the raw
5146      * output formats listed in {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
5147      * (this depends on whether or not the image sensor returns buffers containing pixels that
5148      * are not part of the active array region for blacklevel calibration or other purposes).</p>
5149      * <p>Some parts of the full pixel array may not receive light from the scene,
5150      * or be otherwise inactive.  The ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE key
5151      * defines the rectangle of active pixels that will be included in processed image
5152      * formats.</p>
5153      *
5154      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
5155      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5156      */
5157     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE =                      // int32[2]
5158             ACAMERA_SENSOR_INFO_START + 6,
5159     /**
5160      * <p>Maximum raw value output by sensor.</p>
5161      *
5162      * <p>Type: int32</p>
5163      *
5164      * <p>This tag may appear in:
5165      * <ul>
5166      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5167      * </ul></p>
5168      *
5169      * <p>This specifies the fully-saturated encoding level for the raw
5170      * sample values from the sensor.  This is typically caused by the
5171      * sensor becoming highly non-linear or clipping. The minimum for
5172      * each channel is specified by the offset in the
5173      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN key.</p>
5174      * <p>The white level is typically determined either by sensor bit depth
5175      * (8-14 bits is expected), or by the point where the sensor response
5176      * becomes too non-linear to be useful.  The default value for this is
5177      * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
5178      * <p>The white level values of captured images may vary for different
5179      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
5180      * represents a coarse approximation for such case. It is recommended
5181      * to use ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL for captures when supported
5182      * by the camera device, which provides more accurate white level values.</p>
5183      *
5184      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5185      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
5186      * @see ACAMERA_SENSOR_SENSITIVITY
5187      */
5188     ACAMERA_SENSOR_INFO_WHITE_LEVEL =                           // int32
5189             ACAMERA_SENSOR_INFO_START + 7,
5190     /**
5191      * <p>The time base source for sensor capture start timestamps.</p>
5192      *
5193      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)</p>
5194      *
5195      * <p>This tag may appear in:
5196      * <ul>
5197      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5198      * </ul></p>
5199      *
5200      * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
5201      * may not based on a time source that can be compared to other system time sources.</p>
5202      * <p>This characteristic defines the source for the timestamps, and therefore whether they
5203      * can be compared against other system time sources/timestamps.</p>
5204      */
5205     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE =                      // byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)
5206             ACAMERA_SENSOR_INFO_START + 8,
5207     /**
5208      * <p>Whether the RAW images output from this camera device are subject to
5209      * lens shading correction.</p>
5210      *
5211      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)</p>
5212      *
5213      * <p>This tag may appear in:
5214      * <ul>
5215      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5216      * </ul></p>
5217      *
5218      * <p>If TRUE, all images produced by the camera device in the RAW image formats will
5219      * have lens shading correction already applied to it. If FALSE, the images will
5220      * not be adjusted for lens shading correction.
5221      * See android.request.maxNumOutputRaw for a list of RAW image formats.</p>
5222      * <p>This key will be <code>null</code> for all devices do not report this information.
5223      * Devices with RAW capability will always report this information in this key.</p>
5224      */
5225     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED =                  // byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)
5226             ACAMERA_SENSOR_INFO_START + 9,
5227     /**
5228      * <p>The area of the image sensor which corresponds to active pixels prior to the
5229      * application of any geometric distortion correction.</p>
5230      *
5231      * <p>Type: int32[4]</p>
5232      *
5233      * <p>This tag may appear in:
5234      * <ul>
5235      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5236      * </ul></p>
5237      *
5238      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
5239      * the region that actually receives light from the scene) before any geometric correction
5240      * has been applied, and should be treated as the active region rectangle for any of the
5241      * raw formats.  All metadata associated with raw processing (e.g. the lens shading
5242      * correction map, and radial distortion fields) treats the top, left of this rectangle as
5243      * the origin, (0,0).</p>
5244      * <p>The size of this region determines the maximum field of view and the maximum number of
5245      * pixels that an image from this sensor can contain, prior to the application of
5246      * geometric distortion correction. The effective maximum pixel dimensions of a
5247      * post-distortion-corrected image is given by the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5248      * field, and the effective maximum field of view for a post-distortion-corrected image
5249      * can be calculated by applying the geometric distortion correction fields to this
5250      * rectangle, and cropping to the rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5251      * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
5252      * dimensions in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE given the position of a pixel,
5253      * (x', y'), in the raw pixel array with dimensions given in
5254      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE:</p>
5255      * <ol>
5256      * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
5257      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, otherwise this pixel is considered
5258      * to be outside of the FOV, and will not be shown in the processed output image.</li>
5259      * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
5260      * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
5261      * buffers is defined relative to the top, left of the
5262      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE rectangle.</li>
5263      * <li>If the resulting corrected pixel coordinate is within the region given in
5264      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, then the position of this pixel in the
5265      * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
5266      * when the top, left coordinate of that buffer is treated as (0, 0).</li>
5267      * </ol>
5268      * <p>Thus, for pixel x',y' = (25, 25) on a sensor where ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5269      * is (100,100), ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is (10, 10, 100, 100),
5270      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE is (20, 20, 80, 80), and the geometric distortion
5271      * correction doesn't change the pixel coordinate, the resulting pixel selected in
5272      * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
5273      * with dimensions given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, and would be (5, 5)
5274      * relative to the top,left of post-processed YUV output buffer with dimensions given in
5275      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5276      * <p>The currently supported fields that correct for geometric distortion are:</p>
5277      * <ol>
5278      * <li>ACAMERA_LENS_DISTORTION.</li>
5279      * </ol>
5280      * <p>If the camera device doesn't support geometric distortion correction, or all of the
5281      * geometric distortion fields are no-ops, this rectangle will be the same as the
5282      * post-distortion-corrected rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5283      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
5284      * the full pixel array, and the size of the full pixel array is given by
5285      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5286      * <p>The pre-correction active array may be smaller than the full pixel array, since the
5287      * full array may include black calibration pixels or other inactive regions.</p>
5288      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5289      *
5290      * @see ACAMERA_LENS_DISTORTION
5291      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5292      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5293      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5294      */
5295     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =      // int32[4]
5296             ACAMERA_SENSOR_INFO_START + 10,
5297     /**
5298      * <p>The area of the image sensor which corresponds to active pixels after any geometric
5299      * distortion correction has been applied, when the sensor runs in maximum resolution mode.</p>
5300      *
5301      * <p>Type: int32[4]</p>
5302      *
5303      * <p>This tag may appear in:
5304      * <ul>
5305      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5306      * </ul></p>
5307      *
5308      * <p>Analogous to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, when ACAMERA_SENSOR_PIXEL_MODE
5309      * is set to
5310      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5311      * Refer to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE for details, with sensor array related keys
5312      * replaced with their
5313      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5314      * counterparts.
5315      * This key will only be present for devices which advertise the
5316      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
5317      * capability.</p>
5318      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5319      *
5320      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5321      * @see ACAMERA_SENSOR_PIXEL_MODE
5322      */
5323     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =  // int32[4]
5324             ACAMERA_SENSOR_INFO_START + 11,
5325     /**
5326      * <p>Dimensions of the full pixel array, possibly
5327      * including black calibration pixels, when the sensor runs in maximum resolution mode.
5328      * Analogous to ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, when ACAMERA_SENSOR_PIXEL_MODE is
5329      * set to
5330      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
5331      *
5332      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5333      * @see ACAMERA_SENSOR_PIXEL_MODE
5334      *
5335      * <p>Type: int32[2]</p>
5336      *
5337      * <p>This tag may appear in:
5338      * <ul>
5339      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5340      * </ul></p>
5341      *
5342      * <p>The pixel count of the full pixel array of the image sensor, which covers
5343      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area. This represents the full pixel dimensions of
5344      * the raw buffers produced by this sensor, when it runs in maximum resolution mode. That
5345      * is, when ACAMERA_SENSOR_PIXEL_MODE is set to
5346      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5347      * This key will only be present for devices which advertise the
5348      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
5349      * capability.</p>
5350      *
5351      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
5352      * @see ACAMERA_SENSOR_PIXEL_MODE
5353      */
5354     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION =   // int32[2]
5355             ACAMERA_SENSOR_INFO_START + 12,
5356     /**
5357      * <p>The area of the image sensor which corresponds to active pixels prior to the
5358      * application of any geometric distortion correction, when the sensor runs in maximum
5359      * resolution mode. This key must be used for crop / metering regions, only when
5360      * ACAMERA_SENSOR_PIXEL_MODE is set to
5361      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
5362      *
5363      * @see ACAMERA_SENSOR_PIXEL_MODE
5364      *
5365      * <p>Type: int32[4]</p>
5366      *
5367      * <p>This tag may appear in:
5368      * <ul>
5369      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5370      * </ul></p>
5371      *
5372      * <p>Analogous to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
5373      * when ACAMERA_SENSOR_PIXEL_MODE is set to
5374      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5375      * This key will only be present for devices which advertise the
5376      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
5377      * capability.</p>
5378      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5379      *
5380      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5381      * @see ACAMERA_SENSOR_PIXEL_MODE
5382      */
5383     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =
5384                                                                 // int32[4]
5385             ACAMERA_SENSOR_INFO_START + 13,
5386     /**
5387      * <p>Dimensions of the group of pixels which are under the same color filter.
5388      * This specifies the width and height (pair of integers) of the group of pixels which fall
5389      * under the same color filter for ULTRA_HIGH_RESOLUTION sensors.</p>
5390      *
5391      * <p>Type: int32[2]</p>
5392      *
5393      * <p>This tag may appear in:
5394      * <ul>
5395      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5396      * </ul></p>
5397      *
5398      * <p>Sensors can have pixels grouped together under the same color filter in order
5399      * to improve various aspects of imaging such as noise reduction, low light
5400      * performance etc. These groups can be of various sizes such as 2X2 (quad bayer),
5401      * 3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under
5402      * the same color filter.</p>
5403      * <p>This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW images
5404      * will have a regular bayer pattern.</p>
5405      * <p>This key will not be present for sensors which don't have the
5406      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
5407      * capability.</p>
5408      */
5409     ACAMERA_SENSOR_INFO_BINNING_FACTOR =                        // int32[2]
5410             ACAMERA_SENSOR_INFO_START + 14,
5411     ACAMERA_SENSOR_INFO_END,
5412 
5413     /**
5414      * <p>Quality of lens shading correction applied
5415      * to the image data.</p>
5416      *
5417      * <p>Type: byte (acamera_metadata_enum_android_shading_mode_t)</p>
5418      *
5419      * <p>This tag may appear in:
5420      * <ul>
5421      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5422      *   <li>ACaptureRequest</li>
5423      * </ul></p>
5424      *
5425      * <p>When set to OFF mode, no lens shading correction will be applied by the
5426      * camera device, and an identity lens shading map data will be provided
5427      * if <code>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON</code>. For example, for lens
5428      * shading map with size of <code>[ 4, 3 ]</code>,
5429      * the output android.statistics.lensShadingCorrectionMap for this case will be an identity
5430      * map shown below:</p>
5431      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5432      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5433      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5434      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5435      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5436      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
5437      * </code></pre>
5438      * <p>When set to other modes, lens shading correction will be applied by the camera
5439      * device. Applications can request lens shading map data by setting
5440      * ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE to ON, and then the camera device will provide lens
5441      * shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
5442      * data will be the one applied by the camera device for this capture request.</p>
5443      * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
5444      * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
5445      * AWB are in AUTO modes(ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF and ACAMERA_CONTROL_AWB_MODE <code>!=</code>
5446      * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
5447      * to be converged before using the returned shading map data.</p>
5448      *
5449      * @see ACAMERA_CONTROL_AE_MODE
5450      * @see ACAMERA_CONTROL_AWB_MODE
5451      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
5452      */
5453     ACAMERA_SHADING_MODE =                                      // byte (acamera_metadata_enum_android_shading_mode_t)
5454             ACAMERA_SHADING_START,
5455     /**
5456      * <p>List of lens shading modes for ACAMERA_SHADING_MODE that are supported by this camera device.</p>
5457      *
5458      * @see ACAMERA_SHADING_MODE
5459      *
5460      * <p>Type: byte[n]</p>
5461      *
5462      * <p>This tag may appear in:
5463      * <ul>
5464      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5465      * </ul></p>
5466      *
5467      * <p>This list contains lens shading modes that can be set for the camera device.
5468      * Camera devices that support the MANUAL_POST_PROCESSING capability will always
5469      * list OFF and FAST mode. This includes all FULL level devices.
5470      * LEGACY devices will always only support FAST mode.</p>
5471      */
5472     ACAMERA_SHADING_AVAILABLE_MODES =                           // byte[n]
5473             ACAMERA_SHADING_START + 2,
5474     ACAMERA_SHADING_END,
5475 
5476     /**
5477      * <p>Operating mode for the face detector
5478      * unit.</p>
5479      *
5480      * <p>Type: byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)</p>
5481      *
5482      * <p>This tag may appear in:
5483      * <ul>
5484      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5485      *   <li>ACaptureRequest</li>
5486      * </ul></p>
5487      *
5488      * <p>Whether face detection is enabled, and whether it
5489      * should output just the basic fields or the full set of
5490      * fields.</p>
5491      */
5492     ACAMERA_STATISTICS_FACE_DETECT_MODE =                       // byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)
5493             ACAMERA_STATISTICS_START,
5494     /**
5495      * <p>Operating mode for hot pixel map generation.</p>
5496      *
5497      * <p>Type: byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)</p>
5498      *
5499      * <p>This tag may appear in:
5500      * <ul>
5501      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5502      *   <li>ACaptureRequest</li>
5503      * </ul></p>
5504      *
5505      * <p>If set to <code>true</code>, a hot pixel map is returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.
5506      * If set to <code>false</code>, no hot pixel map will be returned.</p>
5507      *
5508      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
5509      */
5510     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE =                     // byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)
5511             ACAMERA_STATISTICS_START + 3,
5512     /**
5513      * <p>List of unique IDs for detected faces.</p>
5514      *
5515      * <p>Type: int32[n]</p>
5516      *
5517      * <p>This tag may appear in:
5518      * <ul>
5519      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5520      * </ul></p>
5521      *
5522      * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
5523      * to the camera device.  A face that leaves the field of view and later returns may be
5524      * assigned a new ID.</p>
5525      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL</p>
5526      *
5527      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5528      */
5529     ACAMERA_STATISTICS_FACE_IDS =                               // int32[n]
5530             ACAMERA_STATISTICS_START + 4,
5531     /**
5532      * <p>List of landmarks for detected
5533      * faces.</p>
5534      *
5535      * <p>Type: int32[n*6]</p>
5536      *
5537      * <p>This tag may appear in:
5538      * <ul>
5539      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5540      * </ul></p>
5541      *
5542      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5543      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
5544      * the top-left pixel of the active array.</p>
5545      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5546      * system depends on the mode being set.
5547      * When the distortion correction mode is OFF, the coordinate system follows
5548      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
5549      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
5550      * When the distortion correction mode is not OFF, the coordinate system follows
5551      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
5552      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
5553      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL.</p>
5554      * <p>Starting from API level 30, the coordinate system of activeArraySize or
5555      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
5556      * pre-zoomRatio field of view. This means that if the relative position of faces and
5557      * the camera device doesn't change, when zooming in by increasing
5558      * ACAMERA_CONTROL_ZOOM_RATIO, the face landmarks move farther away from the center of the
5559      * activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0
5560      * (default), the face landmarks coordinates won't change as ACAMERA_SCALER_CROP_REGION
5561      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
5562      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
5563      *
5564      * @see ACAMERA_CONTROL_ZOOM_RATIO
5565      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5566      * @see ACAMERA_SCALER_CROP_REGION
5567      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5568      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5569      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5570      */
5571     ACAMERA_STATISTICS_FACE_LANDMARKS =                         // int32[n*6]
5572             ACAMERA_STATISTICS_START + 5,
5573     /**
5574      * <p>List of the bounding rectangles for detected
5575      * faces.</p>
5576      *
5577      * <p>Type: int32[n*4]</p>
5578      *
5579      * <p>This tag may appear in:
5580      * <ul>
5581      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5582      * </ul></p>
5583      *
5584      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5585      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
5586      * the top-left pixel of the active array.</p>
5587      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5588      * system depends on the mode being set.
5589      * When the distortion correction mode is OFF, the coordinate system follows
5590      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
5591      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
5592      * When the distortion correction mode is not OFF, the coordinate system follows
5593      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
5594      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
5595      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
5596      * <p>Starting from API level 30, the coordinate system of activeArraySize or
5597      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
5598      * pre-zoomRatio field of view. This means that if the relative position of faces and
5599      * the camera device doesn't change, when zooming in by increasing
5600      * ACAMERA_CONTROL_ZOOM_RATIO, the face rectangles grow larger and move farther away from
5601      * the center of the activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO
5602      * is set to 1.0 (default), the face rectangles won't change as ACAMERA_SCALER_CROP_REGION
5603      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
5604      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
5605      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, right, bottom)</code>.</p>
5606      *
5607      * @see ACAMERA_CONTROL_ZOOM_RATIO
5608      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5609      * @see ACAMERA_SCALER_CROP_REGION
5610      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5611      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5612      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5613      */
5614     ACAMERA_STATISTICS_FACE_RECTANGLES =                        // int32[n*4]
5615             ACAMERA_STATISTICS_START + 6,
5616     /**
5617      * <p>List of the face confidence scores for
5618      * detected faces</p>
5619      *
5620      * <p>Type: byte[n]</p>
5621      *
5622      * <p>This tag may appear in:
5623      * <ul>
5624      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5625      * </ul></p>
5626      *
5627      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
5628      *
5629      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5630      */
5631     ACAMERA_STATISTICS_FACE_SCORES =                            // byte[n]
5632             ACAMERA_STATISTICS_START + 7,
5633     /**
5634      * <p>The shading map is a low-resolution floating-point map
5635      * that lists the coefficients used to correct for vignetting and color shading,
5636      * for each Bayer color channel of RAW image data.</p>
5637      *
5638      * <p>Type: float[4*n*m]</p>
5639      *
5640      * <p>This tag may appear in:
5641      * <ul>
5642      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5643      * </ul></p>
5644      *
5645      * <p>The map provided here is the same map that is used by the camera device to
5646      * correct both color shading and vignetting for output non-RAW images.</p>
5647      * <p>When there is no lens shading correction applied to RAW
5648      * output images (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED <code>==</code>
5649      * false), this map is the complete lens shading correction
5650      * map; when there is some lens shading correction applied to
5651      * the RAW output image (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED<code>==</code> true), this map reports the remaining lens shading
5652      * correction map that needs to be applied to get shading
5653      * corrected images that match the camera device's output for
5654      * non-RAW formats.</p>
5655      * <p>For a complete shading correction map, the least shaded
5656      * section of the image will have a gain factor of 1; all
5657      * other sections will have gains above 1.</p>
5658      * <p>When ACAMERA_COLOR_CORRECTION_MODE = TRANSFORM_MATRIX, the map
5659      * will take into account the colorCorrection settings.</p>
5660      * <p>The shading map is for the entire active pixel array, and is not
5661      * affected by the crop region specified in the request. Each shading map
5662      * entry is the value of the shading compensation map over a specific
5663      * pixel on the sensor.  Specifically, with a (N x M) resolution shading
5664      * map, and an active pixel array size (W x H), shading map entry
5665      * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
5666      * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
5667      * The map is assumed to be bilinearly interpolated between the sample points.</p>
5668      * <p>For a Bayer camera, the channel order is [R, Geven, Godd, B], where Geven is
5669      * the green channel for the even rows of a Bayer pattern, and Godd is the odd rows.
5670      * The shading map is stored in a fully interleaved format, and its size
5671      * is provided in the camera static metadata by ACAMERA_LENS_INFO_SHADING_MAP_SIZE.</p>
5672      * <p>The shading map will generally have on the order of 30-40 rows and columns,
5673      * and will be smaller than 64x64.</p>
5674      * <p>As an example, given a very small map for a Bayer camera defined as:</p>
5675      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
5676      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
5677      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
5678      *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
5679      *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
5680      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
5681      *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
5682      *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
5683      * </code></pre>
5684      * <p>The low-resolution scaling map images for each channel are
5685      * (displayed using nearest-neighbor interpolation):</p>
5686      * <p><img alt="Red lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
5687      * <img alt="Green (even rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
5688      * <img alt="Green (odd rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
5689      * <img alt="Blue lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
5690      * <p>As a visualization only, inverting the full-color map to recover an
5691      * image of a gray wall (using bicubic interpolation for visual quality)
5692      * as captured by the sensor gives:</p>
5693      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
5694      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
5695      * shading map for such a camera is defined as:</p>
5696      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
5697      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
5698      * [ 1.3, 1.3, 1.3, 1.3,  1.2, 1.2, 1.2, 1.2,
5699      *     1.1, 1.1, 1.1, 1.1,  1.3, 1.3, 1.3, 1.3,
5700      *   1.2, 1.2, 1.2, 1.2,  1.1, 1.1, 1.1, 1.1,
5701      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.2, 1.2, 1.2,
5702      *   1.3, 1.3, 1.3, 1.3,   1.2, 1.2, 1.2, 1.2,
5703      *     1.2, 1.2, 1.2, 1.2,  1.3, 1.3, 1.3, 1.3 ]
5704      * </code></pre>
5705      * <p>Note that the RAW image data might be subject to lens shading
5706      * correction not reported on this map. Query
5707      * ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED to see if RAW image data has subject
5708      * to lens shading correction. If ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
5709      * is TRUE, the RAW image data is subject to partial or full lens shading
5710      * correction. In the case full lens shading correction is applied to RAW
5711      * images, the gain factor map reported in this key will contain all 1.0 gains.
5712      * In other words, the map reported in this key is the remaining lens shading
5713      * that needs to be applied on the RAW image to get images without lens shading
5714      * artifacts. See android.request.maxNumOutputRaw for a list of RAW image
5715      * formats.</p>
5716      *
5717      * @see ACAMERA_COLOR_CORRECTION_MODE
5718      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
5719      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
5720      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
5721      */
5722     ACAMERA_STATISTICS_LENS_SHADING_MAP =                       // float[4*n*m]
5723             ACAMERA_STATISTICS_START + 11,
5724     /**
5725      * <p>The camera device estimated scene illumination lighting
5726      * frequency.</p>
5727      *
5728      * <p>Type: byte (acamera_metadata_enum_android_statistics_scene_flicker_t)</p>
5729      *
5730      * <p>This tag may appear in:
5731      * <ul>
5732      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5733      * </ul></p>
5734      *
5735      * <p>Many light sources, such as most fluorescent lights, flicker at a rate
5736      * that depends on the local utility power standards. This flicker must be
5737      * accounted for by auto-exposure routines to avoid artifacts in captured images.
5738      * The camera device uses this entry to tell the application what the scene
5739      * illuminant frequency is.</p>
5740      * <p>When manual exposure control is enabled
5741      * (<code>ACAMERA_CONTROL_AE_MODE == OFF</code> or <code>ACAMERA_CONTROL_MODE ==
5742      * OFF</code>), the ACAMERA_CONTROL_AE_ANTIBANDING_MODE doesn't perform
5743      * antibanding, and the application can ensure it selects
5744      * exposure times that do not cause banding issues by looking
5745      * into this metadata field. See
5746      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE for more details.</p>
5747      * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
5748      *
5749      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
5750      * @see ACAMERA_CONTROL_AE_MODE
5751      * @see ACAMERA_CONTROL_MODE
5752      */
5753     ACAMERA_STATISTICS_SCENE_FLICKER =                          // byte (acamera_metadata_enum_android_statistics_scene_flicker_t)
5754             ACAMERA_STATISTICS_START + 14,
5755     /**
5756      * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
5757      *
5758      * <p>Type: int32[2*n]</p>
5759      *
5760      * <p>This tag may appear in:
5761      * <ul>
5762      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5763      * </ul></p>
5764      *
5765      * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
5766      * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
5767      * bottom-right of the pixel array, respectively. The width and
5768      * height dimensions are given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.
5769      * This may include hot pixels that lie outside of the active array
5770      * bounds given by ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5771      *
5772      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5773      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5774      */
5775     ACAMERA_STATISTICS_HOT_PIXEL_MAP =                          // int32[2*n]
5776             ACAMERA_STATISTICS_START + 15,
5777     /**
5778      * <p>Whether the camera device will output the lens
5779      * shading map in output result metadata.</p>
5780      *
5781      * <p>Type: byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)</p>
5782      *
5783      * <p>This tag may appear in:
5784      * <ul>
5785      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5786      *   <li>ACaptureRequest</li>
5787      * </ul></p>
5788      *
5789      * <p>When set to ON,
5790      * ACAMERA_STATISTICS_LENS_SHADING_MAP will be provided in
5791      * the output result metadata.</p>
5792      * <p>ON is always supported on devices with the RAW capability.</p>
5793      *
5794      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
5795      */
5796     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE =                  // byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)
5797             ACAMERA_STATISTICS_START + 16,
5798     /**
5799      * <p>A control for selecting whether optical stabilization (OIS) position
5800      * information is included in output result metadata.</p>
5801      *
5802      * <p>Type: byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)</p>
5803      *
5804      * <p>This tag may appear in:
5805      * <ul>
5806      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5807      *   <li>ACaptureRequest</li>
5808      * </ul></p>
5809      *
5810      * <p>Since optical image stabilization generally involves motion much faster than the duration
5811      * of individual image exposure, multiple OIS samples can be included for a single capture
5812      * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
5813      * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
5814      * with the rolling shutter skew to account for lens motion during image exposure in
5815      * post-processing algorithms.</p>
5816      */
5817     ACAMERA_STATISTICS_OIS_DATA_MODE =                          // byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)
5818             ACAMERA_STATISTICS_START + 17,
5819     /**
5820      * <p>An array of timestamps of OIS samples, in nanoseconds.</p>
5821      *
5822      * <p>Type: int64[n]</p>
5823      *
5824      * <p>This tag may appear in:
5825      * <ul>
5826      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5827      * </ul></p>
5828      *
5829      * <p>The array contains the timestamps of OIS samples. The timestamps are in the same
5830      * timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.</p>
5831      *
5832      * @see ACAMERA_SENSOR_TIMESTAMP
5833      */
5834     ACAMERA_STATISTICS_OIS_TIMESTAMPS =                         // int64[n]
5835             ACAMERA_STATISTICS_START + 18,
5836     /**
5837      * <p>An array of shifts of OIS samples, in x direction.</p>
5838      *
5839      * <p>Type: float[n]</p>
5840      *
5841      * <p>This tag may appear in:
5842      * <ul>
5843      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5844      * </ul></p>
5845      *
5846      * <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
5847      * A positive value is a shift from left to right in the pre-correction active array
5848      * coordinate system. For example, if the optical center is (1000, 500) in pre-correction
5849      * active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
5850      * <p>The number of shifts must match the number of timestamps in
5851      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
5852      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
5853      * supporting devices). They are always reported in pre-correction active array coordinates,
5854      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
5855      * is needed.</p>
5856      *
5857      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
5858      */
5859     ACAMERA_STATISTICS_OIS_X_SHIFTS =                           // float[n]
5860             ACAMERA_STATISTICS_START + 19,
5861     /**
5862      * <p>An array of shifts of OIS samples, in y direction.</p>
5863      *
5864      * <p>Type: float[n]</p>
5865      *
5866      * <p>This tag may appear in:
5867      * <ul>
5868      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5869      * </ul></p>
5870      *
5871      * <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
5872      * A positive value is a shift from top to bottom in pre-correction active array coordinate
5873      * system. For example, if the optical center is (1000, 500) in active array coordinates, a
5874      * shift of (0, 5) puts the new optical center at (1000, 505).</p>
5875      * <p>The number of shifts must match the number of timestamps in
5876      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
5877      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
5878      * supporting devices). They are always reported in pre-correction active array coordinates,
5879      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
5880      * is needed.</p>
5881      *
5882      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
5883      */
5884     ACAMERA_STATISTICS_OIS_Y_SHIFTS =                           // float[n]
5885             ACAMERA_STATISTICS_START + 20,
5886     ACAMERA_STATISTICS_END,
5887 
5888     /**
5889      * <p>List of face detection modes for ACAMERA_STATISTICS_FACE_DETECT_MODE that are
5890      * supported by this camera device.</p>
5891      *
5892      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5893      *
5894      * <p>Type: byte[n]</p>
5895      *
5896      * <p>This tag may appear in:
5897      * <ul>
5898      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5899      * </ul></p>
5900      *
5901      * <p>OFF is always supported.</p>
5902      */
5903     ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =       // byte[n]
5904             ACAMERA_STATISTICS_INFO_START,
5905     /**
5906      * <p>The maximum number of simultaneously detectable
5907      * faces.</p>
5908      *
5909      * <p>Type: int32</p>
5910      *
5911      * <p>This tag may appear in:
5912      * <ul>
5913      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5914      * </ul></p>
5915      *
5916      */
5917     ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT =                    // int32
5918             ACAMERA_STATISTICS_INFO_START + 2,
5919     /**
5920      * <p>List of hot pixel map output modes for ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE that are
5921      * supported by this camera device.</p>
5922      *
5923      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
5924      *
5925      * <p>Type: byte[n]</p>
5926      *
5927      * <p>This tag may appear in:
5928      * <ul>
5929      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5930      * </ul></p>
5931      *
5932      * <p>If no hotpixel map output is available for this camera device, this will contain only
5933      * <code>false</code>.</p>
5934      * <p>ON is always supported on devices with the RAW capability.</p>
5935      */
5936     ACAMERA_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =     // byte[n]
5937             ACAMERA_STATISTICS_INFO_START + 6,
5938     /**
5939      * <p>List of lens shading map output modes for ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE that
5940      * are supported by this camera device.</p>
5941      *
5942      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
5943      *
5944      * <p>Type: byte[n]</p>
5945      *
5946      * <p>This tag may appear in:
5947      * <ul>
5948      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5949      * </ul></p>
5950      *
5951      * <p>If no lens shading map output is available for this camera device, this key will
5952      * contain only OFF.</p>
5953      * <p>ON is always supported on devices with the RAW capability.
5954      * LEGACY mode devices will always only support OFF.</p>
5955      */
5956     ACAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =  // byte[n]
5957             ACAMERA_STATISTICS_INFO_START + 7,
5958     /**
5959      * <p>List of OIS data output modes for ACAMERA_STATISTICS_OIS_DATA_MODE that
5960      * are supported by this camera device.</p>
5961      *
5962      * @see ACAMERA_STATISTICS_OIS_DATA_MODE
5963      *
5964      * <p>Type: byte[n]</p>
5965      *
5966      * <p>This tag may appear in:
5967      * <ul>
5968      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5969      * </ul></p>
5970      *
5971      * <p>If no OIS data output is available for this camera device, this key will
5972      * contain only OFF.</p>
5973      */
5974     ACAMERA_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =          // byte[n]
5975             ACAMERA_STATISTICS_INFO_START + 8,
5976     ACAMERA_STATISTICS_INFO_END,
5977 
5978     /**
5979      * <p>Tonemapping / contrast / gamma curve for the blue
5980      * channel, to use when ACAMERA_TONEMAP_MODE is
5981      * CONTRAST_CURVE.</p>
5982      *
5983      * @see ACAMERA_TONEMAP_MODE
5984      *
5985      * <p>Type: float[n*2]</p>
5986      *
5987      * <p>This tag may appear in:
5988      * <ul>
5989      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5990      *   <li>ACaptureRequest</li>
5991      * </ul></p>
5992      *
5993      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
5994      *
5995      * @see ACAMERA_TONEMAP_CURVE_RED
5996      */
5997     ACAMERA_TONEMAP_CURVE_BLUE =                                // float[n*2]
5998             ACAMERA_TONEMAP_START,
5999     /**
6000      * <p>Tonemapping / contrast / gamma curve for the green
6001      * channel, to use when ACAMERA_TONEMAP_MODE is
6002      * CONTRAST_CURVE.</p>
6003      *
6004      * @see ACAMERA_TONEMAP_MODE
6005      *
6006      * <p>Type: float[n*2]</p>
6007      *
6008      * <p>This tag may appear in:
6009      * <ul>
6010      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6011      *   <li>ACaptureRequest</li>
6012      * </ul></p>
6013      *
6014      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
6015      *
6016      * @see ACAMERA_TONEMAP_CURVE_RED
6017      */
6018     ACAMERA_TONEMAP_CURVE_GREEN =                               // float[n*2]
6019             ACAMERA_TONEMAP_START + 1,
6020     /**
6021      * <p>Tonemapping / contrast / gamma curve for the red
6022      * channel, to use when ACAMERA_TONEMAP_MODE is
6023      * CONTRAST_CURVE.</p>
6024      *
6025      * @see ACAMERA_TONEMAP_MODE
6026      *
6027      * <p>Type: float[n*2]</p>
6028      *
6029      * <p>This tag may appear in:
6030      * <ul>
6031      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6032      *   <li>ACaptureRequest</li>
6033      * </ul></p>
6034      *
6035      * <p>Each channel's curve is defined by an array of control points:</p>
6036      * <pre><code>ACAMERA_TONEMAP_CURVE_RED =
6037      *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
6038      * 2 &lt;= N &lt;= ACAMERA_TONEMAP_MAX_CURVE_POINTS</code></pre>
6039      * <p>These are sorted in order of increasing <code>Pin</code>; it is
6040      * required that input values 0.0 and 1.0 are included in the list to
6041      * define a complete mapping. For input values between control points,
6042      * the camera device must linearly interpolate between the control
6043      * points.</p>
6044      * <p>Each curve can have an independent number of points, and the number
6045      * of points can be less than max (that is, the request doesn't have to
6046      * always provide a curve with number of points equivalent to
6047      * ACAMERA_TONEMAP_MAX_CURVE_POINTS).</p>
6048      * <p>For devices with MONOCHROME capability, all three channels must have the same set of
6049      * control points.</p>
6050      * <p>A few examples, and their corresponding graphical mappings; these
6051      * only specify the red channel and the precision is limited to 4
6052      * digits, for conciseness.</p>
6053      * <p>Linear mapping:</p>
6054      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 0, 1.0, 1.0 ]
6055      * </code></pre>
6056      * <p><img alt="Linear mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
6057      * <p>Invert mapping:</p>
6058      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 1.0, 1.0, 0 ]
6059      * </code></pre>
6060      * <p><img alt="Inverting mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
6061      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
6062      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
6063      *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
6064      *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
6065      *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
6066      *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
6067      * </code></pre>
6068      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
6069      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
6070      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
6071      *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
6072      *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
6073      *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
6074      *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
6075      * </code></pre>
6076      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
6077      *
6078      * @see ACAMERA_TONEMAP_CURVE_RED
6079      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
6080      */
6081     ACAMERA_TONEMAP_CURVE_RED =                                 // float[n*2]
6082             ACAMERA_TONEMAP_START + 2,
6083     /**
6084      * <p>High-level global contrast/gamma/tonemapping control.</p>
6085      *
6086      * <p>Type: byte (acamera_metadata_enum_android_tonemap_mode_t)</p>
6087      *
6088      * <p>This tag may appear in:
6089      * <ul>
6090      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6091      *   <li>ACaptureRequest</li>
6092      * </ul></p>
6093      *
6094      * <p>When switching to an application-defined contrast curve by setting
6095      * ACAMERA_TONEMAP_MODE to CONTRAST_CURVE, the curve is defined
6096      * per-channel with a set of <code>(in, out)</code> points that specify the
6097      * mapping from input high-bit-depth pixel value to the output
6098      * low-bit-depth value.  Since the actual pixel ranges of both input
6099      * and output may change depending on the camera pipeline, the values
6100      * are specified by normalized floating-point numbers.</p>
6101      * <p>More-complex color mapping operations such as 3D color look-up
6102      * tables, selective chroma enhancement, or other non-linear color
6103      * transforms will be disabled when ACAMERA_TONEMAP_MODE is
6104      * CONTRAST_CURVE.</p>
6105      * <p>When using either FAST or HIGH_QUALITY, the camera device will
6106      * emit its own tonemap curve in android.tonemap.curve.
6107      * These values are always available, and as close as possible to the
6108      * actually used nonlinear/nonglobal transforms.</p>
6109      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
6110      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
6111      * roughly the same.</p>
6112      *
6113      * @see ACAMERA_TONEMAP_MODE
6114      */
6115     ACAMERA_TONEMAP_MODE =                                      // byte (acamera_metadata_enum_android_tonemap_mode_t)
6116             ACAMERA_TONEMAP_START + 3,
6117     /**
6118      * <p>Maximum number of supported points in the
6119      * tonemap curve that can be used for android.tonemap.curve.</p>
6120      *
6121      * <p>Type: int32</p>
6122      *
6123      * <p>This tag may appear in:
6124      * <ul>
6125      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6126      * </ul></p>
6127      *
6128      * <p>If the actual number of points provided by the application (in ACAMERA_TONEMAPCURVE_*) is
6129      * less than this maximum, the camera device will resample the curve to its internal
6130      * representation, using linear interpolation.</p>
6131      * <p>The output curves in the result metadata may have a different number
6132      * of points than the input curves, and will represent the actual
6133      * hardware curves used as closely as possible when linearly interpolated.</p>
6134      */
6135     ACAMERA_TONEMAP_MAX_CURVE_POINTS =                          // int32
6136             ACAMERA_TONEMAP_START + 4,
6137     /**
6138      * <p>List of tonemapping modes for ACAMERA_TONEMAP_MODE that are supported by this camera
6139      * device.</p>
6140      *
6141      * @see ACAMERA_TONEMAP_MODE
6142      *
6143      * <p>Type: byte[n]</p>
6144      *
6145      * <p>This tag may appear in:
6146      * <ul>
6147      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6148      * </ul></p>
6149      *
6150      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
6151      * at least one of below mode combinations:</p>
6152      * <ul>
6153      * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
6154      * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
6155      * </ul>
6156      * <p>This includes all FULL level devices.</p>
6157      */
6158     ACAMERA_TONEMAP_AVAILABLE_TONE_MAP_MODES =                  // byte[n]
6159             ACAMERA_TONEMAP_START + 5,
6160     /**
6161      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
6162      * GAMMA_VALUE</p>
6163      *
6164      * @see ACAMERA_TONEMAP_MODE
6165      *
6166      * <p>Type: float</p>
6167      *
6168      * <p>This tag may appear in:
6169      * <ul>
6170      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6171      *   <li>ACaptureRequest</li>
6172      * </ul></p>
6173      *
6174      * <p>The tonemap curve will be defined the following formula:
6175      * * OUT = pow(IN, 1.0 / gamma)
6176      * where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
6177      * pow is the power function and gamma is the gamma value specified by this
6178      * key.</p>
6179      * <p>The same curve will be applied to all color channels. The camera device
6180      * may clip the input gamma value to its supported range. The actual applied
6181      * value will be returned in capture result.</p>
6182      * <p>The valid range of gamma value varies on different devices, but values
6183      * within [1.0, 5.0] are guaranteed not to be clipped.</p>
6184      */
6185     ACAMERA_TONEMAP_GAMMA =                                     // float
6186             ACAMERA_TONEMAP_START + 6,
6187     /**
6188      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
6189      * PRESET_CURVE</p>
6190      *
6191      * @see ACAMERA_TONEMAP_MODE
6192      *
6193      * <p>Type: byte (acamera_metadata_enum_android_tonemap_preset_curve_t)</p>
6194      *
6195      * <p>This tag may appear in:
6196      * <ul>
6197      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6198      *   <li>ACaptureRequest</li>
6199      * </ul></p>
6200      *
6201      * <p>The tonemap curve will be defined by specified standard.</p>
6202      * <p>sRGB (approximated by 16 control points):</p>
6203      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
6204      * <p>Rec. 709 (approximated by 16 control points):</p>
6205      * <p><img alt="Rec. 709 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
6206      * <p>Note that above figures show a 16 control points approximation of preset
6207      * curves. Camera devices may apply a different approximation to the curve.</p>
6208      */
6209     ACAMERA_TONEMAP_PRESET_CURVE =                              // byte (acamera_metadata_enum_android_tonemap_preset_curve_t)
6210             ACAMERA_TONEMAP_START + 7,
6211     ACAMERA_TONEMAP_END,
6212 
6213     /**
6214      * <p>Generally classifies the overall set of the camera device functionality.</p>
6215      *
6216      * <p>Type: byte (acamera_metadata_enum_android_info_supported_hardware_level_t)</p>
6217      *
6218      * <p>This tag may appear in:
6219      * <ul>
6220      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6221      * </ul></p>
6222      *
6223      * <p>The supported hardware level is a high-level description of the camera device's
6224      * capabilities, summarizing several capabilities into one field.  Each level adds additional
6225      * features to the previous one, and is always a strict superset of the previous level.
6226      * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
6227      * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
6228      * numerical value as well. To check if a given device is at least at a given hardware level,
6229      * the following code snippet can be used:</p>
6230      * <pre><code>// Returns true if the device supports the required hardware level, or better.
6231      * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
6232      *     final int[] sortedHwLevels = {
6233      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
6234      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
6235      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
6236      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
6237      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
6238      *     };
6239      *     int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
6240      *     if (requiredLevel == deviceLevel) {
6241      *         return true;
6242      *     }
6243      *
6244      *     for (int sortedlevel : sortedHwLevels) {
6245      *         if (sortedlevel == requiredLevel) {
6246      *             return true;
6247      *         } else if (sortedlevel == deviceLevel) {
6248      *             return false;
6249      *         }
6250      *     }
6251      *     return false; // Should never reach here
6252      * }
6253      * </code></pre>
6254      * <p>At a high level, the levels are:</p>
6255      * <ul>
6256      * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
6257      *   Android devices, and have very limited capabilities.</li>
6258      * <li><code>LIMITED</code> devices represent the
6259      *   baseline feature set, and may also include additional capabilities that are
6260      *   subsets of <code>FULL</code>.</li>
6261      * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
6262      *   post-processing settings, and image capture at a high rate.</li>
6263      * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
6264      *   with additional output stream configurations.</li>
6265      * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
6266      *   lens information not reported or less stable framerates.</li>
6267      * </ul>
6268      * <p>See the individual level enums for full descriptions of the supported capabilities.  The
6269      * ACAMERA_REQUEST_AVAILABLE_CAPABILITIES entry describes the device's capabilities at a
6270      * finer-grain level, if needed. In addition, many controls have their available settings or
6271      * ranges defined in individual entries from {@link ACameraManager_getCameraCharacteristics }.</p>
6272      * <p>Some features are not part of any particular hardware level or capability and must be
6273      * queried separately. These include:</p>
6274      * <ul>
6275      * <li>Calibrated timestamps (ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME)</li>
6276      * <li>Precision lens control (ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION <code>==</code> CALIBRATED)</li>
6277      * <li>Face detection (ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES)</li>
6278      * <li>Optical or electrical image stabilization
6279      *   (ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
6280      *    ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)</li>
6281      * </ul>
6282      *
6283      * @see ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
6284      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
6285      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
6286      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6287      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
6288      * @see ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
6289      */
6290     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL =                     // byte (acamera_metadata_enum_android_info_supported_hardware_level_t)
6291             ACAMERA_INFO_START,
6292     /**
6293      * <p>A short string for manufacturer version information about the camera device, such as
6294      * ISP hardware, sensors, etc.</p>
6295      *
6296      * <p>Type: byte</p>
6297      *
6298      * <p>This tag may appear in:
6299      * <ul>
6300      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6301      * </ul></p>
6302      *
6303      * <p>This can be used in <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_IMAGE_DESCRIPTION">TAG_IMAGE_DESCRIPTION</a>
6304      * in jpeg EXIF. This key may be absent if no version information is available on the
6305      * device.</p>
6306      */
6307     ACAMERA_INFO_VERSION =                                      // byte
6308             ACAMERA_INFO_START + 1,
6309     /**
6310      *
6311      * <p>Type: int64[2*n]</p>
6312      *
6313      * <p>This tag may appear in:
6314      * <ul>
6315      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6316      * </ul></p>
6317      *
6318      * <p>HAL must populate the array with
6319      * (hardware::camera::provider::V2_5::DeviceState, sensorOrientation) pairs for each
6320      * supported device state bitwise combination.</p>
6321      */
6322     ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS =                    // int64[2*n]
6323             ACAMERA_INFO_START + 3,
6324     ACAMERA_INFO_END,
6325 
6326     /**
6327      * <p>Whether black-level compensation is locked
6328      * to its current values, or is free to vary.</p>
6329      *
6330      * <p>Type: byte (acamera_metadata_enum_android_black_level_lock_t)</p>
6331      *
6332      * <p>This tag may appear in:
6333      * <ul>
6334      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6335      *   <li>ACaptureRequest</li>
6336      * </ul></p>
6337      *
6338      * <p>Whether the black level offset was locked for this frame.  Should be
6339      * ON if ACAMERA_BLACK_LEVEL_LOCK was ON in the capture request, unless
6340      * a change in other capture settings forced the camera device to
6341      * perform a black level reset.</p>
6342      *
6343      * @see ACAMERA_BLACK_LEVEL_LOCK
6344      */
6345     ACAMERA_BLACK_LEVEL_LOCK =                                  // byte (acamera_metadata_enum_android_black_level_lock_t)
6346             ACAMERA_BLACK_LEVEL_START,
6347     ACAMERA_BLACK_LEVEL_END,
6348 
6349     /**
6350      * <p>The frame number corresponding to the last request
6351      * with which the output result (metadata + buffers) has been fully
6352      * synchronized.</p>
6353      *
6354      * <p>Type: int64 (acamera_metadata_enum_android_sync_frame_number_t)</p>
6355      *
6356      * <p>This tag may appear in:
6357      * <ul>
6358      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6359      * </ul></p>
6360      *
6361      * <p>When a request is submitted to the camera device, there is usually a
6362      * delay of several frames before the controls get applied. A camera
6363      * device may either choose to account for this delay by implementing a
6364      * pipeline and carefully submit well-timed atomic control updates, or
6365      * it may start streaming control changes that span over several frame
6366      * boundaries.</p>
6367      * <p>In the latter case, whenever a request's settings change relative to
6368      * the previous submitted request, the full set of changes may take
6369      * multiple frame durations to fully take effect. Some settings may
6370      * take effect sooner (in less frame durations) than others.</p>
6371      * <p>While a set of control changes are being propagated, this value
6372      * will be CONVERGING.</p>
6373      * <p>Once it is fully known that a set of control changes have been
6374      * finished propagating, and the resulting updated control settings
6375      * have been read back by the camera device, this value will be set
6376      * to a non-negative frame number (corresponding to the request to
6377      * which the results have synchronized to).</p>
6378      * <p>Older camera device implementations may not have a way to detect
6379      * when all camera controls have been applied, and will always set this
6380      * value to UNKNOWN.</p>
6381      * <p>FULL capability devices will always have this value set to the
6382      * frame number of the request corresponding to this result.</p>
6383      * <p><em>Further details</em>:</p>
6384      * <ul>
6385      * <li>Whenever a request differs from the last request, any future
6386      * results not yet returned may have this value set to CONVERGING (this
6387      * could include any in-progress captures not yet returned by the camera
6388      * device, for more details see pipeline considerations below).</li>
6389      * <li>Submitting a series of multiple requests that differ from the
6390      * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
6391      * moves the new synchronization frame to the last non-repeating
6392      * request (using the smallest frame number from the contiguous list of
6393      * repeating requests).</li>
6394      * <li>Submitting the same request repeatedly will not change this value
6395      * to CONVERGING, if it was already a non-negative value.</li>
6396      * <li>When this value changes to non-negative, that means that all of the
6397      * metadata controls from the request have been applied, all of the
6398      * metadata controls from the camera device have been read to the
6399      * updated values (into the result), and all of the graphics buffers
6400      * corresponding to this result are also synchronized to the request.</li>
6401      * </ul>
6402      * <p><em>Pipeline considerations</em>:</p>
6403      * <p>Submitting a request with updated controls relative to the previously
6404      * submitted requests may also invalidate the synchronization state
6405      * of all the results corresponding to currently in-flight requests.</p>
6406      * <p>In other words, results for this current request and up to
6407      * ACAMERA_REQUEST_PIPELINE_MAX_DEPTH prior requests may have their
6408      * ACAMERA_SYNC_FRAME_NUMBER change to CONVERGING.</p>
6409      *
6410      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
6411      * @see ACAMERA_SYNC_FRAME_NUMBER
6412      */
6413     ACAMERA_SYNC_FRAME_NUMBER =                                 // int64 (acamera_metadata_enum_android_sync_frame_number_t)
6414             ACAMERA_SYNC_START,
6415     /**
6416      * <p>The maximum number of frames that can occur after a request
6417      * (different than the previous) has been submitted, and before the
6418      * result's state becomes synchronized.</p>
6419      *
6420      * <p>Type: int32 (acamera_metadata_enum_android_sync_max_latency_t)</p>
6421      *
6422      * <p>This tag may appear in:
6423      * <ul>
6424      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6425      * </ul></p>
6426      *
6427      * <p>This defines the maximum distance (in number of metadata results),
6428      * between the frame number of the request that has new controls to apply
6429      * and the frame number of the result that has all the controls applied.</p>
6430      * <p>In other words this acts as an upper boundary for how many frames
6431      * must occur before the camera device knows for a fact that the new
6432      * submitted camera settings have been applied in outgoing frames.</p>
6433      */
6434     ACAMERA_SYNC_MAX_LATENCY =                                  // int32 (acamera_metadata_enum_android_sync_max_latency_t)
6435             ACAMERA_SYNC_START + 1,
6436     ACAMERA_SYNC_END,
6437 
6438     /**
6439      * <p>The available depth dataspace stream
6440      * configurations that this camera device supports
6441      * (i.e. format, width, height, output/input stream).</p>
6442      *
6443      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)</p>
6444      *
6445      * <p>This tag may appear in:
6446      * <ul>
6447      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6448      * </ul></p>
6449      *
6450      * <p>These are output stream configurations for use with
6451      * dataSpace HAL_DATASPACE_DEPTH. The configurations are
6452      * listed as <code>(format, width, height, input?)</code> tuples.</p>
6453      * <p>Only devices that support depth output for at least
6454      * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
6455      * this entry.</p>
6456      * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
6457      * sparse depth point cloud must report a single entry for
6458      * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
6459      * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
6460      * the entries for HAL_PIXEL_FORMAT_Y16.</p>
6461      */
6462     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =       // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)
6463             ACAMERA_DEPTH_START + 1,
6464     /**
6465      * <p>This lists the minimum frame duration for each
6466      * format/size combination for depth output formats.</p>
6467      *
6468      * <p>Type: int64[4*n]</p>
6469      *
6470      * <p>This tag may appear in:
6471      * <ul>
6472      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6473      * </ul></p>
6474      *
6475      * <p>This should correspond to the frame duration when only that
6476      * stream is active, with all processing (typically in android.*.mode)
6477      * set to either OFF or FAST.</p>
6478      * <p>When multiple streams are used in a request, the minimum frame
6479      * duration will be max(individual stream min durations).</p>
6480      * <p>The minimum frame duration of a stream (of a particular format, size)
6481      * is the same regardless of whether the stream is input or output.</p>
6482      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
6483      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
6484      * calculating the max frame rate.</p>
6485      *
6486      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6487      * @see ACAMERA_SENSOR_FRAME_DURATION
6488      */
6489     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =         // int64[4*n]
6490             ACAMERA_DEPTH_START + 2,
6491     /**
6492      * <p>This lists the maximum stall duration for each
6493      * output format/size combination for depth streams.</p>
6494      *
6495      * <p>Type: int64[4*n]</p>
6496      *
6497      * <p>This tag may appear in:
6498      * <ul>
6499      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6500      * </ul></p>
6501      *
6502      * <p>A stall duration is how much extra time would get added
6503      * to the normal minimum frame duration for a repeating request
6504      * that has streams with non-zero stall.</p>
6505      * <p>This functions similarly to
6506      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for depth
6507      * streams.</p>
6508      * <p>All depth output stream formats may have a nonzero stall
6509      * duration.</p>
6510      *
6511      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6512      */
6513     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =             // int64[4*n]
6514             ACAMERA_DEPTH_START + 3,
6515     /**
6516      * <p>Indicates whether a capture request may target both a
6517      * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
6518      * YUV_420_888, JPEG, or RAW) simultaneously.</p>
6519      *
6520      * <p>Type: byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)</p>
6521      *
6522      * <p>This tag may appear in:
6523      * <ul>
6524      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6525      * </ul></p>
6526      *
6527      * <p>If TRUE, including both depth and color outputs in a single
6528      * capture request is not supported. An application must interleave color
6529      * and depth requests.  If FALSE, a single request can target both types
6530      * of output.</p>
6531      * <p>Typically, this restriction exists on camera devices that
6532      * need to emit a specific pattern or wavelength of light to
6533      * measure depth values, which causes the color image to be
6534      * corrupted during depth measurement.</p>
6535      */
6536     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE =                          // byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)
6537             ACAMERA_DEPTH_START + 4,
6538     /**
6539      * <p>Recommended depth stream configurations for common client use cases.</p>
6540      *
6541      * <p>Type: int32[n*5]</p>
6542      *
6543      * <p>This tag may appear in:
6544      * <ul>
6545      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6546      * </ul></p>
6547      *
6548      * <p>Optional subset of the ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS that
6549      * contains similar tuples listed as
6550      * (i.e. width, height, format, output/input stream, usecase bit field).
6551      * Camera devices will be able to suggest particular depth stream configurations which are
6552      * power and performance efficient for specific use cases. For more information about
6553      * retrieving the suggestions see
6554      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
6555      * <p>For data representation please refer to
6556      * ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS</p>
6557      *
6558      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
6559      * @see ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
6560      */
6561     ACAMERA_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
6562                                                                 // int32[n*5]
6563             ACAMERA_DEPTH_START + 5,
6564     /**
6565      * <p>The available dynamic depth dataspace stream
6566      * configurations that this camera device supports
6567      * (i.e. format, width, height, output/input stream).</p>
6568      *
6569      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)</p>
6570      *
6571      * <p>This tag may appear in:
6572      * <ul>
6573      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6574      * </ul></p>
6575      *
6576      * <p>These are output stream configurations for use with
6577      * dataSpace DYNAMIC_DEPTH. The configurations are
6578      * listed as <code>(format, width, height, input?)</code> tuples.</p>
6579      * <p>Only devices that support depth output for at least
6580      * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
6581      * HAL_PIXEL_FORMAT_BLOB with the same size or size with
6582      * the same aspect ratio can have dynamic depth dataspace
6583      * stream configuration. ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE also
6584      * needs to be set to FALSE.</p>
6585      *
6586      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
6587      */
6588     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
6589                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)
6590             ACAMERA_DEPTH_START + 6,
6591     /**
6592      * <p>This lists the minimum frame duration for each
6593      * format/size combination for dynamic depth output streams.</p>
6594      *
6595      * <p>Type: int64[4*n]</p>
6596      *
6597      * <p>This tag may appear in:
6598      * <ul>
6599      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6600      * </ul></p>
6601      *
6602      * <p>This should correspond to the frame duration when only that
6603      * stream is active, with all processing (typically in android.*.mode)
6604      * set to either OFF or FAST.</p>
6605      * <p>When multiple streams are used in a request, the minimum frame
6606      * duration will be max(individual stream min durations).</p>
6607      * <p>The minimum frame duration of a stream (of a particular format, size)
6608      * is the same regardless of whether the stream is input or output.</p>
6609      */
6610     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = // int64[4*n]
6611             ACAMERA_DEPTH_START + 7,
6612     /**
6613      * <p>This lists the maximum stall duration for each
6614      * output format/size combination for dynamic depth streams.</p>
6615      *
6616      * <p>Type: int64[4*n]</p>
6617      *
6618      * <p>This tag may appear in:
6619      * <ul>
6620      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6621      * </ul></p>
6622      *
6623      * <p>A stall duration is how much extra time would get added
6624      * to the normal minimum frame duration for a repeating request
6625      * that has streams with non-zero stall.</p>
6626      * <p>All dynamic depth output streams may have a nonzero stall
6627      * duration.</p>
6628      */
6629     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =     // int64[4*n]
6630             ACAMERA_DEPTH_START + 8,
6631     /**
6632      * <p>The available depth dataspace stream
6633      * configurations that this camera device supports
6634      * (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with
6635      * ACAMERA_SENSOR_PIXEL_MODE set to
6636      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6637      *
6638      * @see ACAMERA_SENSOR_PIXEL_MODE
6639      *
6640      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t)</p>
6641      *
6642      * <p>This tag may appear in:
6643      * <ul>
6644      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6645      * </ul></p>
6646      *
6647      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, for configurations which
6648      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6649      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6650      *
6651      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
6652      * @see ACAMERA_SENSOR_PIXEL_MODE
6653      */
6654     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
6655                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t)
6656             ACAMERA_DEPTH_START + 9,
6657     /**
6658      * <p>This lists the minimum frame duration for each
6659      * format/size combination for depth output formats when a CaptureRequest is submitted with
6660      * ACAMERA_SENSOR_PIXEL_MODE set to
6661      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6662      *
6663      * @see ACAMERA_SENSOR_PIXEL_MODE
6664      *
6665      * <p>Type: int64[4*n]</p>
6666      *
6667      * <p>This tag may appear in:
6668      * <ul>
6669      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6670      * </ul></p>
6671      *
6672      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS, for configurations which
6673      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6674      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6675      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
6676      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION for more details about
6677      * calculating the max frame rate.</p>
6678      *
6679      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS
6680      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION
6681      * @see ACAMERA_SENSOR_FRAME_DURATION
6682      * @see ACAMERA_SENSOR_PIXEL_MODE
6683      */
6684     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
6685                                                                 // int64[4*n]
6686             ACAMERA_DEPTH_START + 10,
6687     /**
6688      * <p>This lists the maximum stall duration for each
6689      * output format/size combination for depth streams for CaptureRequests where
6690      * ACAMERA_SENSOR_PIXEL_MODE is set to
6691      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6692      *
6693      * @see ACAMERA_SENSOR_PIXEL_MODE
6694      *
6695      * <p>Type: int64[4*n]</p>
6696      *
6697      * <p>This tag may appear in:
6698      * <ul>
6699      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6700      * </ul></p>
6701      *
6702      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS, for configurations which
6703      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6704      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6705      *
6706      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS
6707      * @see ACAMERA_SENSOR_PIXEL_MODE
6708      */
6709     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
6710                                                                 // int64[4*n]
6711             ACAMERA_DEPTH_START + 11,
6712     /**
6713      * <p>The available dynamic depth dataspace stream
6714      * configurations that this camera device supports (i.e. format, width, height,
6715      * output/input stream) for CaptureRequests where ACAMERA_SENSOR_PIXEL_MODE is set to
6716      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6717      *
6718      * @see ACAMERA_SENSOR_PIXEL_MODE
6719      *
6720      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t)</p>
6721      *
6722      * <p>This tag may appear in:
6723      * <ul>
6724      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6725      * </ul></p>
6726      *
6727      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS, for configurations
6728      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6729      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6730      *
6731      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
6732      * @see ACAMERA_SENSOR_PIXEL_MODE
6733      */
6734     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
6735                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t)
6736             ACAMERA_DEPTH_START + 12,
6737     /**
6738      * <p>This lists the minimum frame duration for each
6739      * format/size combination for dynamic depth output streams  for CaptureRequests where
6740      * ACAMERA_SENSOR_PIXEL_MODE is set to
6741      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6742      *
6743      * @see ACAMERA_SENSOR_PIXEL_MODE
6744      *
6745      * <p>Type: int64[4*n]</p>
6746      *
6747      * <p>This tag may appear in:
6748      * <ul>
6749      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6750      * </ul></p>
6751      *
6752      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS, for configurations
6753      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6754      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6755      *
6756      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS
6757      * @see ACAMERA_SENSOR_PIXEL_MODE
6758      */
6759     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
6760                                                                 // int64[4*n]
6761             ACAMERA_DEPTH_START + 13,
6762     /**
6763      * <p>This lists the maximum stall duration for each
6764      * output format/size combination for dynamic depth streams for CaptureRequests where
6765      * ACAMERA_SENSOR_PIXEL_MODE is set to
6766      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6767      *
6768      * @see ACAMERA_SENSOR_PIXEL_MODE
6769      *
6770      * <p>Type: int64[4*n]</p>
6771      *
6772      * <p>This tag may appear in:
6773      * <ul>
6774      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6775      * </ul></p>
6776      *
6777      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS, for configurations
6778      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6779      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
6780      *
6781      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS
6782      * @see ACAMERA_SENSOR_PIXEL_MODE
6783      */
6784     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
6785                                                                 // int64[4*n]
6786             ACAMERA_DEPTH_START + 14,
6787     ACAMERA_DEPTH_END,
6788 
6789     /**
6790      * <p>String containing the ids of the underlying physical cameras.</p>
6791      *
6792      * <p>Type: byte[n]</p>
6793      *
6794      * <p>This tag may appear in:
6795      * <ul>
6796      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6797      * </ul></p>
6798      *
6799      * <p>For a logical camera, this is concatenation of all underlying physical camera IDs.
6800      * The null terminator for physical camera ID must be preserved so that the whole string
6801      * can be tokenized using '\0' to generate list of physical camera IDs.</p>
6802      * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
6803      * value of this tag will be ['2', '\0', '3', '\0'].</p>
6804      * <p>The number of physical camera IDs must be no less than 2.</p>
6805      */
6806     ACAMERA_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =                 // byte[n]
6807             ACAMERA_LOGICAL_MULTI_CAMERA_START,
6808     /**
6809      * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
6810      *
6811      * <p>Type: byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)</p>
6812      *
6813      * <p>This tag may appear in:
6814      * <ul>
6815      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6816      * </ul></p>
6817      *
6818      * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
6819      * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the
6820      * physical camera sensors usually run in leader/follower mode where one sensor generates a
6821      * timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE
6822      * sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors
6823      * use their own timing generator, and there could be offset between their start of exposure.</p>
6824      * <p>In both cases, all images generated for a particular capture request still carry the same
6825      * timestamps, so that they can be used to look up the matching frame number and
6826      * onCaptureStarted callback.</p>
6827      * <p>This tag is only applicable if the logical camera device supports concurrent physical
6828      * streams from different physical cameras.</p>
6829      */
6830     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =             // byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)
6831             ACAMERA_LOGICAL_MULTI_CAMERA_START + 1,
6832     /**
6833      * <p>String containing the ID of the underlying active physical camera.</p>
6834      *
6835      * <p>Type: byte</p>
6836      *
6837      * <p>This tag may appear in:
6838      * <ul>
6839      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6840      * </ul></p>
6841      *
6842      * <p>The ID of the active physical camera that's backing the logical camera. All camera
6843      * streams and metadata that are not physical camera specific will be originating from this
6844      * physical camera.</p>
6845      * <p>For a logical camera made up of physical cameras where each camera's lenses have
6846      * different characteristics, the camera device may choose to switch between the physical
6847      * cameras when application changes FOCAL_LENGTH or SCALER_CROP_REGION.
6848      * At the time of lens switch, this result metadata reflects the new active physical camera
6849      * ID.</p>
6850      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.
6851      * When available, this must be one of valid physical IDs backing this logical multi-camera.
6852      * If this key is not available for a logical multi-camera, the camera device implementation
6853      * may still switch between different active physical cameras based on use case, but the
6854      * current active physical camera information won't be available to the application.</p>
6855      */
6856     ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID =           // byte
6857             ACAMERA_LOGICAL_MULTI_CAMERA_START + 2,
6858     ACAMERA_LOGICAL_MULTI_CAMERA_END,
6859 
6860     /**
6861      * <p>Mode of operation for the lens distortion correction block.</p>
6862      *
6863      * <p>Type: byte (acamera_metadata_enum_android_distortion_correction_mode_t)</p>
6864      *
6865      * <p>This tag may appear in:
6866      * <ul>
6867      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6868      *   <li>ACaptureRequest</li>
6869      * </ul></p>
6870      *
6871      * <p>The lens distortion correction block attempts to improve image quality by fixing
6872      * radial, tangential, or other geometric aberrations in the camera device's optics.  If
6873      * available, the ACAMERA_LENS_DISTORTION field documents the lens's distortion parameters.</p>
6874      * <p>OFF means no distortion correction is done.</p>
6875      * <p>FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
6876      * applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
6877      * correction algorithms, even if it slows down capture rate. FAST means the camera device
6878      * will not slow down capture rate when applying correction. FAST may be the same as OFF if
6879      * any correction at all would slow down capture rate.  Every output stream will have a
6880      * similar amount of enhancement applied.</p>
6881      * <p>The correction only applies to processed outputs such as YUV, Y8, JPEG, or DEPTH16; it is
6882      * not applied to any RAW output.</p>
6883      * <p>This control will be on by default on devices that support this control. Applications
6884      * disabling distortion correction need to pay extra attention with the coordinate system of
6885      * metering regions, crop region, and face rectangles. When distortion correction is OFF,
6886      * metadata coordinates follow the coordinate system of
6887      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. When distortion is not OFF, metadata
6888      * coordinates follow the coordinate system of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.  The
6889      * camera device will map these metadata fields to match the corrected image produced by the
6890      * camera device, for both capture requests and results.  However, this mapping is not very
6891      * precise, since rectangles do not generally map to rectangles when corrected.  Only linear
6892      * scaling between the active array and precorrection active array coordinates is
6893      * performed. Applications that require precise correction of metadata need to undo that
6894      * linear scaling, and apply a more complete correction that takes into the account the app's
6895      * own requirements.</p>
6896      * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
6897      * <ul>
6898      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
6899      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
6900      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
6901      * <li>ACAMERA_SCALER_CROP_REGION</li>
6902      * <li>android.statistics.faces</li>
6903      * </ul>
6904      *
6905      * @see ACAMERA_CONTROL_AE_REGIONS
6906      * @see ACAMERA_CONTROL_AF_REGIONS
6907      * @see ACAMERA_CONTROL_AWB_REGIONS
6908      * @see ACAMERA_LENS_DISTORTION
6909      * @see ACAMERA_SCALER_CROP_REGION
6910      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
6911      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
6912      */
6913     ACAMERA_DISTORTION_CORRECTION_MODE =                        // byte (acamera_metadata_enum_android_distortion_correction_mode_t)
6914             ACAMERA_DISTORTION_CORRECTION_START,
6915     /**
6916      * <p>List of distortion correction modes for ACAMERA_DISTORTION_CORRECTION_MODE that are
6917      * supported by this camera device.</p>
6918      *
6919      * @see ACAMERA_DISTORTION_CORRECTION_MODE
6920      *
6921      * <p>Type: byte[n]</p>
6922      *
6923      * <p>This tag may appear in:
6924      * <ul>
6925      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6926      * </ul></p>
6927      *
6928      * <p>No device is required to support this API; such devices will always list only 'OFF'.
6929      * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
6930      */
6931     ACAMERA_DISTORTION_CORRECTION_AVAILABLE_MODES =             // byte[n]
6932             ACAMERA_DISTORTION_CORRECTION_START + 1,
6933     ACAMERA_DISTORTION_CORRECTION_END,
6934 
6935     /**
6936      * <p>The available HEIC (ISO/IEC 23008-12) stream
6937      * configurations that this camera device supports
6938      * (i.e. format, width, height, output/input stream).</p>
6939      *
6940      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)</p>
6941      *
6942      * <p>This tag may appear in:
6943      * <ul>
6944      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6945      * </ul></p>
6946      *
6947      * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
6948      * <p>If the camera device supports HEIC image format, it will support identical set of stream
6949      * combinations involving HEIC image format, compared to the combinations involving JPEG
6950      * image format as required by the device's hardware level and capabilities.</p>
6951      * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
6952      * Configuring JPEG and HEIC streams at the same time is not supported.</p>
6953      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
6954      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
6955      */
6956     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =         // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)
6957             ACAMERA_HEIC_START,
6958     /**
6959      * <p>This lists the minimum frame duration for each
6960      * format/size combination for HEIC output formats.</p>
6961      *
6962      * <p>Type: int64[4*n]</p>
6963      *
6964      * <p>This tag may appear in:
6965      * <ul>
6966      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6967      * </ul></p>
6968      *
6969      * <p>This should correspond to the frame duration when only that
6970      * stream is active, with all processing (typically in android.*.mode)
6971      * set to either OFF or FAST.</p>
6972      * <p>When multiple streams are used in a request, the minimum frame
6973      * duration will be max(individual stream min durations).</p>
6974      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
6975      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
6976      * calculating the max frame rate.</p>
6977      *
6978      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6979      * @see ACAMERA_SENSOR_FRAME_DURATION
6980      */
6981     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =           // int64[4*n]
6982             ACAMERA_HEIC_START + 1,
6983     /**
6984      * <p>This lists the maximum stall duration for each
6985      * output format/size combination for HEIC streams.</p>
6986      *
6987      * <p>Type: int64[4*n]</p>
6988      *
6989      * <p>This tag may appear in:
6990      * <ul>
6991      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6992      * </ul></p>
6993      *
6994      * <p>A stall duration is how much extra time would get added
6995      * to the normal minimum frame duration for a repeating request
6996      * that has streams with non-zero stall.</p>
6997      * <p>This functions similarly to
6998      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for HEIC
6999      * streams.</p>
7000      * <p>All HEIC output stream formats may have a nonzero stall
7001      * duration.</p>
7002      *
7003      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7004      */
7005     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS =               // int64[4*n]
7006             ACAMERA_HEIC_START + 2,
7007     /**
7008      * <p>The available HEIC (ISO/IEC 23008-12) stream
7009      * configurations that this camera device supports
7010      * (i.e. format, width, height, output/input stream).</p>
7011      *
7012      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t)</p>
7013      *
7014      * <p>This tag may appear in:
7015      * <ul>
7016      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7017      * </ul></p>
7018      *
7019      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS for details.</p>
7020      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
7021      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
7022      *
7023      * @see ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
7024      */
7025     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
7026                                                                 // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t)
7027             ACAMERA_HEIC_START + 3,
7028     /**
7029      * <p>This lists the minimum frame duration for each
7030      * format/size combination for HEIC output formats for CaptureRequests where
7031      * ACAMERA_SENSOR_PIXEL_MODE is set to
7032      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
7033      *
7034      * @see ACAMERA_SENSOR_PIXEL_MODE
7035      *
7036      * <p>Type: int64[4*n]</p>
7037      *
7038      * <p>This tag may appear in:
7039      * <ul>
7040      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7041      * </ul></p>
7042      *
7043      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS for details.</p>
7044      *
7045      * @see ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS
7046      */
7047     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
7048                                                                 // int64[4*n]
7049             ACAMERA_HEIC_START + 4,
7050     /**
7051      * <p>This lists the maximum stall duration for each
7052      * output format/size combination for HEIC streams for CaptureRequests where
7053      * ACAMERA_SENSOR_PIXEL_MODE is set to
7054      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</p>
7055      *
7056      * @see ACAMERA_SENSOR_PIXEL_MODE
7057      *
7058      * <p>Type: int64[4*n]</p>
7059      *
7060      * <p>This tag may appear in:
7061      * <ul>
7062      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7063      * </ul></p>
7064      *
7065      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS for details.</p>
7066      *
7067      * @see ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS
7068      */
7069     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION =
7070                                                                 // int64[4*n]
7071             ACAMERA_HEIC_START + 5,
7072     ACAMERA_HEIC_END,
7073 
7074 } acamera_metadata_tag_t;
7075 
7076 /**
7077  * Enumeration definitions for the various entries that need them
7078  */
7079 
7080 // ACAMERA_COLOR_CORRECTION_MODE
7081 typedef enum acamera_metadata_enum_acamera_color_correction_mode {
7082     /**
7083      * <p>Use the ACAMERA_COLOR_CORRECTION_TRANSFORM matrix
7084      * and ACAMERA_COLOR_CORRECTION_GAINS to do color conversion.</p>
7085      * <p>All advanced white balance adjustments (not specified
7086      * by our white balance pipeline) must be disabled.</p>
7087      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
7088      * TRANSFORM_MATRIX is ignored. The camera device will override
7089      * this value to either FAST or HIGH_QUALITY.</p>
7090      *
7091      * @see ACAMERA_COLOR_CORRECTION_GAINS
7092      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7093      * @see ACAMERA_CONTROL_AWB_MODE
7094      */
7095     ACAMERA_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX                   = 0,
7096 
7097     /**
7098      * <p>Color correction processing must not slow down
7099      * capture rate relative to sensor raw output.</p>
7100      * <p>Advanced white balance adjustments above and beyond
7101      * the specified white balance pipeline may be applied.</p>
7102      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
7103      * the camera device uses the last frame's AWB values
7104      * (or defaults if AWB has never been run).</p>
7105      *
7106      * @see ACAMERA_CONTROL_AWB_MODE
7107      */
7108     ACAMERA_COLOR_CORRECTION_MODE_FAST                               = 1,
7109 
7110     /**
7111      * <p>Color correction processing operates at improved
7112      * quality but the capture rate might be reduced (relative to sensor
7113      * raw output rate)</p>
7114      * <p>Advanced white balance adjustments above and beyond
7115      * the specified white balance pipeline may be applied.</p>
7116      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
7117      * the camera device uses the last frame's AWB values
7118      * (or defaults if AWB has never been run).</p>
7119      *
7120      * @see ACAMERA_CONTROL_AWB_MODE
7121      */
7122     ACAMERA_COLOR_CORRECTION_MODE_HIGH_QUALITY                       = 2,
7123 
7124 } acamera_metadata_enum_android_color_correction_mode_t;
7125 
7126 // ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
7127 typedef enum acamera_metadata_enum_acamera_color_correction_aberration_mode {
7128     /**
7129      * <p>No aberration correction is applied.</p>
7130      */
7131     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_OFF                     = 0,
7132 
7133     /**
7134      * <p>Aberration correction will not slow down capture rate
7135      * relative to sensor raw output.</p>
7136      */
7137     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_FAST                    = 1,
7138 
7139     /**
7140      * <p>Aberration correction operates at improved quality but the capture rate might be
7141      * reduced (relative to sensor raw output rate)</p>
7142      */
7143     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY            = 2,
7144 
7145 } acamera_metadata_enum_android_color_correction_aberration_mode_t;
7146 
7147 
7148 // ACAMERA_CONTROL_AE_ANTIBANDING_MODE
7149 typedef enum acamera_metadata_enum_acamera_control_ae_antibanding_mode {
7150     /**
7151      * <p>The camera device will not adjust exposure duration to
7152      * avoid banding problems.</p>
7153      */
7154     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_OFF                          = 0,
7155 
7156     /**
7157      * <p>The camera device will adjust exposure duration to
7158      * avoid banding problems with 50Hz illumination sources.</p>
7159      */
7160     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_50HZ                         = 1,
7161 
7162     /**
7163      * <p>The camera device will adjust exposure duration to
7164      * avoid banding problems with 60Hz illumination
7165      * sources.</p>
7166      */
7167     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_60HZ                         = 2,
7168 
7169     /**
7170      * <p>The camera device will automatically adapt its
7171      * antibanding routine to the current illumination
7172      * condition. This is the default mode if AUTO is
7173      * available on given camera device.</p>
7174      */
7175     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_AUTO                         = 3,
7176 
7177 } acamera_metadata_enum_android_control_ae_antibanding_mode_t;
7178 
7179 // ACAMERA_CONTROL_AE_LOCK
7180 typedef enum acamera_metadata_enum_acamera_control_ae_lock {
7181     /**
7182      * <p>Auto-exposure lock is disabled; the AE algorithm
7183      * is free to update its parameters.</p>
7184      */
7185     ACAMERA_CONTROL_AE_LOCK_OFF                                      = 0,
7186 
7187     /**
7188      * <p>Auto-exposure lock is enabled; the AE algorithm
7189      * must not update the exposure and sensitivity parameters
7190      * while the lock is active.</p>
7191      * <p>ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION setting changes
7192      * will still take effect while auto-exposure is locked.</p>
7193      * <p>Some rare LEGACY devices may not support
7194      * this, in which case the value will always be overridden to OFF.</p>
7195      *
7196      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
7197      */
7198     ACAMERA_CONTROL_AE_LOCK_ON                                       = 1,
7199 
7200 } acamera_metadata_enum_android_control_ae_lock_t;
7201 
7202 // ACAMERA_CONTROL_AE_MODE
7203 typedef enum acamera_metadata_enum_acamera_control_ae_mode {
7204     /**
7205      * <p>The camera device's autoexposure routine is disabled.</p>
7206      * <p>The application-selected ACAMERA_SENSOR_EXPOSURE_TIME,
7207      * ACAMERA_SENSOR_SENSITIVITY and
7208      * ACAMERA_SENSOR_FRAME_DURATION are used by the camera
7209      * device, along with ACAMERA_FLASH_* fields, if there's
7210      * a flash unit for this camera device.</p>
7211      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
7212      * behavior is device dependent when AE is in OFF mode.
7213      * To have consistent behavior across different devices,
7214      * it is recommended to either set AWB and AF to OFF mode
7215      * or lock AWB and AF before setting AE to OFF.
7216      * See ACAMERA_CONTROL_AWB_MODE, ACAMERA_CONTROL_AF_MODE,
7217      * ACAMERA_CONTROL_AWB_LOCK, and ACAMERA_CONTROL_AF_TRIGGER
7218      * for more details.</p>
7219      * <p>LEGACY devices do not support the OFF mode and will
7220      * override attempts to use this value to ON.</p>
7221      *
7222      * @see ACAMERA_CONTROL_AF_MODE
7223      * @see ACAMERA_CONTROL_AF_TRIGGER
7224      * @see ACAMERA_CONTROL_AWB_LOCK
7225      * @see ACAMERA_CONTROL_AWB_MODE
7226      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7227      * @see ACAMERA_SENSOR_FRAME_DURATION
7228      * @see ACAMERA_SENSOR_SENSITIVITY
7229      */
7230     ACAMERA_CONTROL_AE_MODE_OFF                                      = 0,
7231 
7232     /**
7233      * <p>The camera device's autoexposure routine is active,
7234      * with no flash control.</p>
7235      * <p>The application's values for
7236      * ACAMERA_SENSOR_EXPOSURE_TIME,
7237      * ACAMERA_SENSOR_SENSITIVITY, and
7238      * ACAMERA_SENSOR_FRAME_DURATION are ignored. The
7239      * application has control over the various
7240      * ACAMERA_FLASH_* fields.</p>
7241      *
7242      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7243      * @see ACAMERA_SENSOR_FRAME_DURATION
7244      * @see ACAMERA_SENSOR_SENSITIVITY
7245      */
7246     ACAMERA_CONTROL_AE_MODE_ON                                       = 1,
7247 
7248     /**
7249      * <p>Like ON, except that the camera device also controls
7250      * the camera's flash unit, firing it in low-light
7251      * conditions.</p>
7252      * <p>The flash may be fired during a precapture sequence
7253      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
7254      * may be fired for captures for which the
7255      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
7256      * STILL_CAPTURE</p>
7257      *
7258      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7259      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7260      */
7261     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH                            = 2,
7262 
7263     /**
7264      * <p>Like ON, except that the camera device also controls
7265      * the camera's flash unit, always firing it for still
7266      * captures.</p>
7267      * <p>The flash may be fired during a precapture sequence
7268      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
7269      * will always be fired for captures for which the
7270      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
7271      * STILL_CAPTURE</p>
7272      *
7273      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7274      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7275      */
7276     ACAMERA_CONTROL_AE_MODE_ON_ALWAYS_FLASH                          = 3,
7277 
7278     /**
7279      * <p>Like ON_AUTO_FLASH, but with automatic red eye
7280      * reduction.</p>
7281      * <p>If deemed necessary by the camera device, a red eye
7282      * reduction flash will fire during the precapture
7283      * sequence.</p>
7284      */
7285     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE                     = 4,
7286 
7287     /**
7288      * <p>An external flash has been turned on.</p>
7289      * <p>It informs the camera device that an external flash has been turned on, and that
7290      * metering (and continuous focus if active) should be quickly recaculated to account
7291      * for the external flash. Otherwise, this mode acts like ON.</p>
7292      * <p>When the external flash is turned off, AE mode should be changed to one of the
7293      * other available AE modes.</p>
7294      * <p>If the camera device supports AE external flash mode, ACAMERA_CONTROL_AE_STATE must
7295      * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
7296      * flash.</p>
7297      *
7298      * @see ACAMERA_CONTROL_AE_STATE
7299      */
7300     ACAMERA_CONTROL_AE_MODE_ON_EXTERNAL_FLASH                        = 5,
7301 
7302 } acamera_metadata_enum_android_control_ae_mode_t;
7303 
7304 // ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7305 typedef enum acamera_metadata_enum_acamera_control_ae_precapture_trigger {
7306     /**
7307      * <p>The trigger is idle.</p>
7308      */
7309     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE                       = 0,
7310 
7311     /**
7312      * <p>The precapture metering sequence will be started
7313      * by the camera device.</p>
7314      * <p>The exact effect of the precapture trigger depends on
7315      * the current AE mode and state.</p>
7316      */
7317     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_START                      = 1,
7318 
7319     /**
7320      * <p>The camera device will cancel any currently active or completed
7321      * precapture metering sequence, the auto-exposure routine will return to its
7322      * initial state.</p>
7323      */
7324     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL                     = 2,
7325 
7326 } acamera_metadata_enum_android_control_ae_precapture_trigger_t;
7327 
7328 // ACAMERA_CONTROL_AF_MODE
7329 typedef enum acamera_metadata_enum_acamera_control_af_mode {
7330     /**
7331      * <p>The auto-focus routine does not control the lens;
7332      * ACAMERA_LENS_FOCUS_DISTANCE is controlled by the
7333      * application.</p>
7334      *
7335      * @see ACAMERA_LENS_FOCUS_DISTANCE
7336      */
7337     ACAMERA_CONTROL_AF_MODE_OFF                                      = 0,
7338 
7339     /**
7340      * <p>Basic automatic focus mode.</p>
7341      * <p>In this mode, the lens does not move unless
7342      * the autofocus trigger action is called. When that trigger
7343      * is activated, AF will transition to ACTIVE_SCAN, then to
7344      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
7345      * <p>Always supported if lens is not fixed focus.</p>
7346      * <p>Use ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE to determine if lens
7347      * is fixed-focus.</p>
7348      * <p>Triggering AF_CANCEL resets the lens position to default,
7349      * and sets the AF state to INACTIVE.</p>
7350      *
7351      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
7352      */
7353     ACAMERA_CONTROL_AF_MODE_AUTO                                     = 1,
7354 
7355     /**
7356      * <p>Close-up focusing mode.</p>
7357      * <p>In this mode, the lens does not move unless the
7358      * autofocus trigger action is called. When that trigger is
7359      * activated, AF will transition to ACTIVE_SCAN, then to
7360      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
7361      * mode is optimized for focusing on objects very close to
7362      * the camera.</p>
7363      * <p>When that trigger is activated, AF will transition to
7364      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
7365      * NOT_FOCUSED). Triggering cancel AF resets the lens
7366      * position to default, and sets the AF state to
7367      * INACTIVE.</p>
7368      */
7369     ACAMERA_CONTROL_AF_MODE_MACRO                                    = 2,
7370 
7371     /**
7372      * <p>In this mode, the AF algorithm modifies the lens
7373      * position continually to attempt to provide a
7374      * constantly-in-focus image stream.</p>
7375      * <p>The focusing behavior should be suitable for good quality
7376      * video recording; typically this means slower focus
7377      * movement and no overshoots. When the AF trigger is not
7378      * involved, the AF algorithm should start in INACTIVE state,
7379      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
7380      * states as appropriate. When the AF trigger is activated,
7381      * the algorithm should immediately transition into
7382      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
7383      * lens position until a cancel AF trigger is received.</p>
7384      * <p>Once cancel is received, the algorithm should transition
7385      * back to INACTIVE and resume passive scan. Note that this
7386      * behavior is not identical to CONTINUOUS_PICTURE, since an
7387      * ongoing PASSIVE_SCAN must immediately be
7388      * canceled.</p>
7389      */
7390     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_VIDEO                         = 3,
7391 
7392     /**
7393      * <p>In this mode, the AF algorithm modifies the lens
7394      * position continually to attempt to provide a
7395      * constantly-in-focus image stream.</p>
7396      * <p>The focusing behavior should be suitable for still image
7397      * capture; typically this means focusing as fast as
7398      * possible. When the AF trigger is not involved, the AF
7399      * algorithm should start in INACTIVE state, and then
7400      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
7401      * appropriate as it attempts to maintain focus. When the AF
7402      * trigger is activated, the algorithm should finish its
7403      * PASSIVE_SCAN if active, and then transition into
7404      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
7405      * lens position until a cancel AF trigger is received.</p>
7406      * <p>When the AF cancel trigger is activated, the algorithm
7407      * should transition back to INACTIVE and then act as if it
7408      * has just been started.</p>
7409      */
7410     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_PICTURE                       = 4,
7411 
7412     /**
7413      * <p>Extended depth of field (digital focus) mode.</p>
7414      * <p>The camera device will produce images with an extended
7415      * depth of field automatically; no special focusing
7416      * operations need to be done before taking a picture.</p>
7417      * <p>AF triggers are ignored, and the AF state will always be
7418      * INACTIVE.</p>
7419      */
7420     ACAMERA_CONTROL_AF_MODE_EDOF                                     = 5,
7421 
7422 } acamera_metadata_enum_android_control_af_mode_t;
7423 
7424 // ACAMERA_CONTROL_AF_TRIGGER
7425 typedef enum acamera_metadata_enum_acamera_control_af_trigger {
7426     /**
7427      * <p>The trigger is idle.</p>
7428      */
7429     ACAMERA_CONTROL_AF_TRIGGER_IDLE                                  = 0,
7430 
7431     /**
7432      * <p>Autofocus will trigger now.</p>
7433      */
7434     ACAMERA_CONTROL_AF_TRIGGER_START                                 = 1,
7435 
7436     /**
7437      * <p>Autofocus will return to its initial
7438      * state, and cancel any currently active trigger.</p>
7439      */
7440     ACAMERA_CONTROL_AF_TRIGGER_CANCEL                                = 2,
7441 
7442 } acamera_metadata_enum_android_control_af_trigger_t;
7443 
7444 // ACAMERA_CONTROL_AWB_LOCK
7445 typedef enum acamera_metadata_enum_acamera_control_awb_lock {
7446     /**
7447      * <p>Auto-white balance lock is disabled; the AWB
7448      * algorithm is free to update its parameters if in AUTO
7449      * mode.</p>
7450      */
7451     ACAMERA_CONTROL_AWB_LOCK_OFF                                     = 0,
7452 
7453     /**
7454      * <p>Auto-white balance lock is enabled; the AWB
7455      * algorithm will not update its parameters while the lock
7456      * is active.</p>
7457      */
7458     ACAMERA_CONTROL_AWB_LOCK_ON                                      = 1,
7459 
7460 } acamera_metadata_enum_android_control_awb_lock_t;
7461 
7462 // ACAMERA_CONTROL_AWB_MODE
7463 typedef enum acamera_metadata_enum_acamera_control_awb_mode {
7464     /**
7465      * <p>The camera device's auto-white balance routine is disabled.</p>
7466      * <p>The application-selected color transform matrix
7467      * (ACAMERA_COLOR_CORRECTION_TRANSFORM) and gains
7468      * (ACAMERA_COLOR_CORRECTION_GAINS) are used by the camera
7469      * device for manual white balance control.</p>
7470      *
7471      * @see ACAMERA_COLOR_CORRECTION_GAINS
7472      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7473      */
7474     ACAMERA_CONTROL_AWB_MODE_OFF                                     = 0,
7475 
7476     /**
7477      * <p>The camera device's auto-white balance routine is active.</p>
7478      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7479      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7480      * For devices that support the MANUAL_POST_PROCESSING capability, the
7481      * values used by the camera device for the transform and gains
7482      * will be available in the capture result for this request.</p>
7483      *
7484      * @see ACAMERA_COLOR_CORRECTION_GAINS
7485      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7486      */
7487     ACAMERA_CONTROL_AWB_MODE_AUTO                                    = 1,
7488 
7489     /**
7490      * <p>The camera device's auto-white balance routine is disabled;
7491      * the camera device uses incandescent light as the assumed scene
7492      * illumination for white balance.</p>
7493      * <p>While the exact white balance transforms are up to the
7494      * camera device, they will approximately match the CIE
7495      * standard illuminant A.</p>
7496      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7497      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7498      * For devices that support the MANUAL_POST_PROCESSING capability, the
7499      * values used by the camera device for the transform and gains
7500      * will be available in the capture result for this request.</p>
7501      *
7502      * @see ACAMERA_COLOR_CORRECTION_GAINS
7503      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7504      */
7505     ACAMERA_CONTROL_AWB_MODE_INCANDESCENT                            = 2,
7506 
7507     /**
7508      * <p>The camera device's auto-white balance routine is disabled;
7509      * the camera device uses fluorescent light as the assumed scene
7510      * illumination for white balance.</p>
7511      * <p>While the exact white balance transforms are up to the
7512      * camera device, they will approximately match the CIE
7513      * standard illuminant F2.</p>
7514      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7515      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7516      * For devices that support the MANUAL_POST_PROCESSING capability, the
7517      * values used by the camera device for the transform and gains
7518      * will be available in the capture result for this request.</p>
7519      *
7520      * @see ACAMERA_COLOR_CORRECTION_GAINS
7521      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7522      */
7523     ACAMERA_CONTROL_AWB_MODE_FLUORESCENT                             = 3,
7524 
7525     /**
7526      * <p>The camera device's auto-white balance routine is disabled;
7527      * the camera device uses warm fluorescent light as the assumed scene
7528      * illumination for white balance.</p>
7529      * <p>While the exact white balance transforms are up to the
7530      * camera device, they will approximately match the CIE
7531      * standard illuminant F4.</p>
7532      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7533      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7534      * For devices that support the MANUAL_POST_PROCESSING capability, the
7535      * values used by the camera device for the transform and gains
7536      * will be available in the capture result for this request.</p>
7537      *
7538      * @see ACAMERA_COLOR_CORRECTION_GAINS
7539      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7540      */
7541     ACAMERA_CONTROL_AWB_MODE_WARM_FLUORESCENT                        = 4,
7542 
7543     /**
7544      * <p>The camera device's auto-white balance routine is disabled;
7545      * the camera device uses daylight light as the assumed scene
7546      * illumination for white balance.</p>
7547      * <p>While the exact white balance transforms are up to the
7548      * camera device, they will approximately match the CIE
7549      * standard illuminant D65.</p>
7550      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7551      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7552      * For devices that support the MANUAL_POST_PROCESSING capability, the
7553      * values used by the camera device for the transform and gains
7554      * will be available in the capture result for this request.</p>
7555      *
7556      * @see ACAMERA_COLOR_CORRECTION_GAINS
7557      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7558      */
7559     ACAMERA_CONTROL_AWB_MODE_DAYLIGHT                                = 5,
7560 
7561     /**
7562      * <p>The camera device's auto-white balance routine is disabled;
7563      * the camera device uses cloudy daylight light as the assumed scene
7564      * illumination for white balance.</p>
7565      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7566      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7567      * For devices that support the MANUAL_POST_PROCESSING capability, the
7568      * values used by the camera device for the transform and gains
7569      * will be available in the capture result for this request.</p>
7570      *
7571      * @see ACAMERA_COLOR_CORRECTION_GAINS
7572      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7573      */
7574     ACAMERA_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT                         = 6,
7575 
7576     /**
7577      * <p>The camera device's auto-white balance routine is disabled;
7578      * the camera device uses twilight light as the assumed scene
7579      * illumination for white balance.</p>
7580      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7581      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7582      * For devices that support the MANUAL_POST_PROCESSING capability, the
7583      * values used by the camera device for the transform and gains
7584      * will be available in the capture result for this request.</p>
7585      *
7586      * @see ACAMERA_COLOR_CORRECTION_GAINS
7587      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7588      */
7589     ACAMERA_CONTROL_AWB_MODE_TWILIGHT                                = 7,
7590 
7591     /**
7592      * <p>The camera device's auto-white balance routine is disabled;
7593      * the camera device uses shade light as the assumed scene
7594      * illumination for white balance.</p>
7595      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7596      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7597      * For devices that support the MANUAL_POST_PROCESSING capability, the
7598      * values used by the camera device for the transform and gains
7599      * will be available in the capture result for this request.</p>
7600      *
7601      * @see ACAMERA_COLOR_CORRECTION_GAINS
7602      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7603      */
7604     ACAMERA_CONTROL_AWB_MODE_SHADE                                   = 8,
7605 
7606 } acamera_metadata_enum_android_control_awb_mode_t;
7607 
7608 // ACAMERA_CONTROL_CAPTURE_INTENT
7609 typedef enum acamera_metadata_enum_acamera_control_capture_intent {
7610     /**
7611      * <p>The goal of this request doesn't fall into the other
7612      * categories. The camera device will default to preview-like
7613      * behavior.</p>
7614      */
7615     ACAMERA_CONTROL_CAPTURE_INTENT_CUSTOM                            = 0,
7616 
7617     /**
7618      * <p>This request is for a preview-like use case.</p>
7619      * <p>The precapture trigger may be used to start off a metering
7620      * w/flash sequence.</p>
7621      */
7622     ACAMERA_CONTROL_CAPTURE_INTENT_PREVIEW                           = 1,
7623 
7624     /**
7625      * <p>This request is for a still capture-type
7626      * use case.</p>
7627      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
7628      */
7629     ACAMERA_CONTROL_CAPTURE_INTENT_STILL_CAPTURE                     = 2,
7630 
7631     /**
7632      * <p>This request is for a video recording
7633      * use case.</p>
7634      */
7635     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_RECORD                      = 3,
7636 
7637     /**
7638      * <p>This request is for a video snapshot (still
7639      * image while recording video) use case.</p>
7640      * <p>The camera device should take the highest-quality image
7641      * possible (given the other settings) without disrupting the
7642      * frame rate of video recording.  </p>
7643      */
7644     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT                    = 4,
7645 
7646     /**
7647      * <p>This request is for a ZSL usecase; the
7648      * application will stream full-resolution images and
7649      * reprocess one or several later for a final
7650      * capture.</p>
7651      */
7652     ACAMERA_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG                  = 5,
7653 
7654     /**
7655      * <p>This request is for manual capture use case where
7656      * the applications want to directly control the capture parameters.</p>
7657      * <p>For example, the application may wish to manually control
7658      * ACAMERA_SENSOR_EXPOSURE_TIME, ACAMERA_SENSOR_SENSITIVITY, etc.</p>
7659      *
7660      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7661      * @see ACAMERA_SENSOR_SENSITIVITY
7662      */
7663     ACAMERA_CONTROL_CAPTURE_INTENT_MANUAL                            = 6,
7664 
7665     /**
7666      * <p>This request is for a motion tracking use case, where
7667      * the application will use camera and inertial sensor data to
7668      * locate and track objects in the world.</p>
7669      * <p>The camera device auto-exposure routine will limit the exposure time
7670      * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
7671      */
7672     ACAMERA_CONTROL_CAPTURE_INTENT_MOTION_TRACKING                   = 7,
7673 
7674 } acamera_metadata_enum_android_control_capture_intent_t;
7675 
7676 // ACAMERA_CONTROL_EFFECT_MODE
7677 typedef enum acamera_metadata_enum_acamera_control_effect_mode {
7678     /**
7679      * <p>No color effect will be applied.</p>
7680      */
7681     ACAMERA_CONTROL_EFFECT_MODE_OFF                                  = 0,
7682 
7683     /**
7684      * <p>A "monocolor" effect where the image is mapped into
7685      * a single color.</p>
7686      * <p>This will typically be grayscale.</p>
7687      */
7688     ACAMERA_CONTROL_EFFECT_MODE_MONO                                 = 1,
7689 
7690     /**
7691      * <p>A "photo-negative" effect where the image's colors
7692      * are inverted.</p>
7693      */
7694     ACAMERA_CONTROL_EFFECT_MODE_NEGATIVE                             = 2,
7695 
7696     /**
7697      * <p>A "solarisation" effect (Sabattier effect) where the
7698      * image is wholly or partially reversed in
7699      * tone.</p>
7700      */
7701     ACAMERA_CONTROL_EFFECT_MODE_SOLARIZE                             = 3,
7702 
7703     /**
7704      * <p>A "sepia" effect where the image is mapped into warm
7705      * gray, red, and brown tones.</p>
7706      */
7707     ACAMERA_CONTROL_EFFECT_MODE_SEPIA                                = 4,
7708 
7709     /**
7710      * <p>A "posterization" effect where the image uses
7711      * discrete regions of tone rather than a continuous
7712      * gradient of tones.</p>
7713      */
7714     ACAMERA_CONTROL_EFFECT_MODE_POSTERIZE                            = 5,
7715 
7716     /**
7717      * <p>A "whiteboard" effect where the image is typically displayed
7718      * as regions of white, with black or grey details.</p>
7719      */
7720     ACAMERA_CONTROL_EFFECT_MODE_WHITEBOARD                           = 6,
7721 
7722     /**
7723      * <p>A "blackboard" effect where the image is typically displayed
7724      * as regions of black, with white or grey details.</p>
7725      */
7726     ACAMERA_CONTROL_EFFECT_MODE_BLACKBOARD                           = 7,
7727 
7728     /**
7729      * <p>An "aqua" effect where a blue hue is added to the image.</p>
7730      */
7731     ACAMERA_CONTROL_EFFECT_MODE_AQUA                                 = 8,
7732 
7733 } acamera_metadata_enum_android_control_effect_mode_t;
7734 
7735 // ACAMERA_CONTROL_MODE
7736 typedef enum acamera_metadata_enum_acamera_control_mode {
7737     /**
7738      * <p>Full application control of pipeline.</p>
7739      * <p>All control by the device's metering and focusing (3A)
7740      * routines is disabled, and no other settings in
7741      * ACAMERA_CONTROL_* have any effect, except that
7742      * ACAMERA_CONTROL_CAPTURE_INTENT may be used by the camera
7743      * device to select post-processing values for processing
7744      * blocks that do not allow for manual control, or are not
7745      * exposed by the camera API.</p>
7746      * <p>However, the camera device's 3A routines may continue to
7747      * collect statistics and update their internal state so that
7748      * when control is switched to AUTO mode, good control values
7749      * can be immediately applied.</p>
7750      *
7751      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7752      */
7753     ACAMERA_CONTROL_MODE_OFF                                         = 0,
7754 
7755     /**
7756      * <p>Use settings for each individual 3A routine.</p>
7757      * <p>Manual control of capture parameters is disabled. All
7758      * controls in ACAMERA_CONTROL_* besides sceneMode take
7759      * effect.</p>
7760      */
7761     ACAMERA_CONTROL_MODE_AUTO                                        = 1,
7762 
7763     /**
7764      * <p>Use a specific scene mode.</p>
7765      * <p>Enabling this disables control.aeMode, control.awbMode and
7766      * control.afMode controls; the camera device will ignore
7767      * those settings while USE_SCENE_MODE is active (except for
7768      * FACE_PRIORITY scene mode). Other control entries are still active.
7769      * This setting can only be used if scene mode is supported (i.e.
7770      * ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
7771      * contain some modes other than DISABLED).</p>
7772      * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p>
7773      *
7774      * @see ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
7775      */
7776     ACAMERA_CONTROL_MODE_USE_SCENE_MODE                              = 2,
7777 
7778     /**
7779      * <p>Same as OFF mode, except that this capture will not be
7780      * used by camera device background auto-exposure, auto-white balance and
7781      * auto-focus algorithms (3A) to update their statistics.</p>
7782      * <p>Specifically, the 3A routines are locked to the last
7783      * values set from a request with AUTO, OFF, or
7784      * USE_SCENE_MODE, and any statistics or state updates
7785      * collected from manual captures with OFF_KEEP_STATE will be
7786      * discarded by the camera device.</p>
7787      */
7788     ACAMERA_CONTROL_MODE_OFF_KEEP_STATE                              = 3,
7789 
7790     /**
7791      * <p>Use a specific extended scene mode.</p>
7792      * <p>When extended scene mode is on, the camera device may override certain control
7793      * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
7794      * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
7795      * are guaranteed.</p>
7796      * <p>This setting can only be used if extended scene mode is supported (i.e.
7797      * android.control.availableExtendedSceneModes
7798      * contains some modes other than DISABLED).</p>
7799      */
7800     ACAMERA_CONTROL_MODE_USE_EXTENDED_SCENE_MODE                     = 4,
7801 
7802 } acamera_metadata_enum_android_control_mode_t;
7803 
7804 // ACAMERA_CONTROL_SCENE_MODE
7805 typedef enum acamera_metadata_enum_acamera_control_scene_mode {
7806     /**
7807      * <p>Indicates that no scene modes are set for a given capture request.</p>
7808      */
7809     ACAMERA_CONTROL_SCENE_MODE_DISABLED                              = 0,
7810 
7811     /**
7812      * <p>If face detection support exists, use face
7813      * detection data for auto-focus, auto-white balance, and
7814      * auto-exposure routines.</p>
7815      * <p>If face detection statistics are disabled
7816      * (i.e. ACAMERA_STATISTICS_FACE_DETECT_MODE is set to OFF),
7817      * this should still operate correctly (but will not return
7818      * face detection statistics to the framework).</p>
7819      * <p>Unlike the other scene modes, ACAMERA_CONTROL_AE_MODE,
7820      * ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
7821      * remain active when FACE_PRIORITY is set.</p>
7822      *
7823      * @see ACAMERA_CONTROL_AE_MODE
7824      * @see ACAMERA_CONTROL_AF_MODE
7825      * @see ACAMERA_CONTROL_AWB_MODE
7826      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
7827      */
7828     ACAMERA_CONTROL_SCENE_MODE_FACE_PRIORITY                         = 1,
7829 
7830     /**
7831      * <p>Optimized for photos of quickly moving objects.</p>
7832      * <p>Similar to SPORTS.</p>
7833      */
7834     ACAMERA_CONTROL_SCENE_MODE_ACTION                                = 2,
7835 
7836     /**
7837      * <p>Optimized for still photos of people.</p>
7838      */
7839     ACAMERA_CONTROL_SCENE_MODE_PORTRAIT                              = 3,
7840 
7841     /**
7842      * <p>Optimized for photos of distant macroscopic objects.</p>
7843      */
7844     ACAMERA_CONTROL_SCENE_MODE_LANDSCAPE                             = 4,
7845 
7846     /**
7847      * <p>Optimized for low-light settings.</p>
7848      */
7849     ACAMERA_CONTROL_SCENE_MODE_NIGHT                                 = 5,
7850 
7851     /**
7852      * <p>Optimized for still photos of people in low-light
7853      * settings.</p>
7854      */
7855     ACAMERA_CONTROL_SCENE_MODE_NIGHT_PORTRAIT                        = 6,
7856 
7857     /**
7858      * <p>Optimized for dim, indoor settings where flash must
7859      * remain off.</p>
7860      */
7861     ACAMERA_CONTROL_SCENE_MODE_THEATRE                               = 7,
7862 
7863     /**
7864      * <p>Optimized for bright, outdoor beach settings.</p>
7865      */
7866     ACAMERA_CONTROL_SCENE_MODE_BEACH                                 = 8,
7867 
7868     /**
7869      * <p>Optimized for bright, outdoor settings containing snow.</p>
7870      */
7871     ACAMERA_CONTROL_SCENE_MODE_SNOW                                  = 9,
7872 
7873     /**
7874      * <p>Optimized for scenes of the setting sun.</p>
7875      */
7876     ACAMERA_CONTROL_SCENE_MODE_SUNSET                                = 10,
7877 
7878     /**
7879      * <p>Optimized to avoid blurry photos due to small amounts of
7880      * device motion (for example: due to hand shake).</p>
7881      */
7882     ACAMERA_CONTROL_SCENE_MODE_STEADYPHOTO                           = 11,
7883 
7884     /**
7885      * <p>Optimized for nighttime photos of fireworks.</p>
7886      */
7887     ACAMERA_CONTROL_SCENE_MODE_FIREWORKS                             = 12,
7888 
7889     /**
7890      * <p>Optimized for photos of quickly moving people.</p>
7891      * <p>Similar to ACTION.</p>
7892      */
7893     ACAMERA_CONTROL_SCENE_MODE_SPORTS                                = 13,
7894 
7895     /**
7896      * <p>Optimized for dim, indoor settings with multiple moving
7897      * people.</p>
7898      */
7899     ACAMERA_CONTROL_SCENE_MODE_PARTY                                 = 14,
7900 
7901     /**
7902      * <p>Optimized for dim settings where the main light source
7903      * is a candle.</p>
7904      */
7905     ACAMERA_CONTROL_SCENE_MODE_CANDLELIGHT                           = 15,
7906 
7907     /**
7908      * <p>Optimized for accurately capturing a photo of barcode
7909      * for use by camera applications that wish to read the
7910      * barcode value.</p>
7911      */
7912     ACAMERA_CONTROL_SCENE_MODE_BARCODE                               = 16,
7913 
7914     /**
7915      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
7916      * <p>In this scene mode, the camera device captures images
7917      * that keep a larger range of scene illumination levels
7918      * visible in the final image. For example, when taking a
7919      * picture of a object in front of a bright window, both
7920      * the object and the scene through the window may be
7921      * visible when using HDR mode, while in normal AUTO mode,
7922      * one or the other may be poorly exposed. As a tradeoff,
7923      * HDR mode generally takes much longer to capture a single
7924      * image, has no user control, and may have other artifacts
7925      * depending on the HDR method used.</p>
7926      * <p>Therefore, HDR captures operate at a much slower rate
7927      * than regular captures.</p>
7928      * <p>In this mode, on LIMITED or FULL devices, when a request
7929      * is made with a ACAMERA_CONTROL_CAPTURE_INTENT of
7930      * STILL_CAPTURE, the camera device will capture an image
7931      * using a high dynamic range capture technique.  On LEGACY
7932      * devices, captures that target a JPEG-format output will
7933      * be captured with HDR, and the capture intent is not
7934      * relevant.</p>
7935      * <p>The HDR capture may involve the device capturing a burst
7936      * of images internally and combining them into one, or it
7937      * may involve the device using specialized high dynamic
7938      * range capture hardware. In all cases, a single image is
7939      * produced in response to a capture request submitted
7940      * while in HDR mode.</p>
7941      * <p>Since substantial post-processing is generally needed to
7942      * produce an HDR image, only YUV, PRIVATE, and JPEG
7943      * outputs are supported for LIMITED/FULL device HDR
7944      * captures, and only JPEG outputs are supported for LEGACY
7945      * HDR captures. Using a RAW output for HDR capture is not
7946      * supported.</p>
7947      * <p>Some devices may also support always-on HDR, which
7948      * applies HDR processing at full frame rate.  For these
7949      * devices, intents other than STILL_CAPTURE will also
7950      * produce an HDR output with no frame rate impact compared
7951      * to normal operation, though the quality may be lower
7952      * than for STILL_CAPTURE intents.</p>
7953      * <p>If SCENE_MODE_HDR is used with unsupported output types
7954      * or capture intents, the images captured will be as if
7955      * the SCENE_MODE was not enabled at all.</p>
7956      *
7957      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7958      */
7959     ACAMERA_CONTROL_SCENE_MODE_HDR                                   = 18,
7960 
7961 } acamera_metadata_enum_android_control_scene_mode_t;
7962 
7963 // ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
7964 typedef enum acamera_metadata_enum_acamera_control_video_stabilization_mode {
7965     /**
7966      * <p>Video stabilization is disabled.</p>
7967      */
7968     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_OFF                     = 0,
7969 
7970     /**
7971      * <p>Video stabilization is enabled.</p>
7972      */
7973     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_ON                      = 1,
7974 
7975 } acamera_metadata_enum_android_control_video_stabilization_mode_t;
7976 
7977 // ACAMERA_CONTROL_AE_STATE
7978 typedef enum acamera_metadata_enum_acamera_control_ae_state {
7979     /**
7980      * <p>AE is off or recently reset.</p>
7981      * <p>When a camera device is opened, it starts in
7982      * this state. This is a transient state, the camera device may skip reporting
7983      * this state in capture result.</p>
7984      */
7985     ACAMERA_CONTROL_AE_STATE_INACTIVE                                = 0,
7986 
7987     /**
7988      * <p>AE doesn't yet have a good set of control values
7989      * for the current scene.</p>
7990      * <p>This is a transient state, the camera device may skip
7991      * reporting this state in capture result.</p>
7992      */
7993     ACAMERA_CONTROL_AE_STATE_SEARCHING                               = 1,
7994 
7995     /**
7996      * <p>AE has a good set of control values for the
7997      * current scene.</p>
7998      */
7999     ACAMERA_CONTROL_AE_STATE_CONVERGED                               = 2,
8000 
8001     /**
8002      * <p>AE has been locked.</p>
8003      */
8004     ACAMERA_CONTROL_AE_STATE_LOCKED                                  = 3,
8005 
8006     /**
8007      * <p>AE has a good set of control values, but flash
8008      * needs to be fired for good quality still
8009      * capture.</p>
8010      */
8011     ACAMERA_CONTROL_AE_STATE_FLASH_REQUIRED                          = 4,
8012 
8013     /**
8014      * <p>AE has been asked to do a precapture sequence
8015      * and is currently executing it.</p>
8016      * <p>Precapture can be triggered through setting
8017      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to START. Currently
8018      * active and completed (if it causes camera device internal AE lock) precapture
8019      * metering sequence can be canceled through setting
8020      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to CANCEL.</p>
8021      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
8022      * or FLASH_REQUIRED as appropriate. This is a transient
8023      * state, the camera device may skip reporting this state in
8024      * capture result.</p>
8025      *
8026      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8027      */
8028     ACAMERA_CONTROL_AE_STATE_PRECAPTURE                              = 5,
8029 
8030 } acamera_metadata_enum_android_control_ae_state_t;
8031 
8032 // ACAMERA_CONTROL_AF_STATE
8033 typedef enum acamera_metadata_enum_acamera_control_af_state {
8034     /**
8035      * <p>AF is off or has not yet tried to scan/been asked
8036      * to scan.</p>
8037      * <p>When a camera device is opened, it starts in this
8038      * state. This is a transient state, the camera device may
8039      * skip reporting this state in capture
8040      * result.</p>
8041      */
8042     ACAMERA_CONTROL_AF_STATE_INACTIVE                                = 0,
8043 
8044     /**
8045      * <p>AF is currently performing an AF scan initiated the
8046      * camera device in a continuous autofocus mode.</p>
8047      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
8048      * state, the camera device may skip reporting this state in
8049      * capture result.</p>
8050      */
8051     ACAMERA_CONTROL_AF_STATE_PASSIVE_SCAN                            = 1,
8052 
8053     /**
8054      * <p>AF currently believes it is in focus, but may
8055      * restart scanning at any time.</p>
8056      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
8057      * state, the camera device may skip reporting this state in
8058      * capture result.</p>
8059      */
8060     ACAMERA_CONTROL_AF_STATE_PASSIVE_FOCUSED                         = 2,
8061 
8062     /**
8063      * <p>AF is performing an AF scan because it was
8064      * triggered by AF trigger.</p>
8065      * <p>Only used by AUTO or MACRO AF modes. This is a transient
8066      * state, the camera device may skip reporting this state in
8067      * capture result.</p>
8068      */
8069     ACAMERA_CONTROL_AF_STATE_ACTIVE_SCAN                             = 3,
8070 
8071     /**
8072      * <p>AF believes it is focused correctly and has locked
8073      * focus.</p>
8074      * <p>This state is reached only after an explicit START AF trigger has been
8075      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus has been obtained.</p>
8076      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
8077      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
8078      *
8079      * @see ACAMERA_CONTROL_AF_MODE
8080      * @see ACAMERA_CONTROL_AF_TRIGGER
8081      */
8082     ACAMERA_CONTROL_AF_STATE_FOCUSED_LOCKED                          = 4,
8083 
8084     /**
8085      * <p>AF has failed to focus successfully and has locked
8086      * focus.</p>
8087      * <p>This state is reached only after an explicit START AF trigger has been
8088      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus cannot be obtained.</p>
8089      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
8090      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
8091      *
8092      * @see ACAMERA_CONTROL_AF_MODE
8093      * @see ACAMERA_CONTROL_AF_TRIGGER
8094      */
8095     ACAMERA_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED                      = 5,
8096 
8097     /**
8098      * <p>AF finished a passive scan without finding focus,
8099      * and may restart scanning at any time.</p>
8100      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
8101      * device may skip reporting this state in capture result.</p>
8102      * <p>LEGACY camera devices do not support this state. When a passive
8103      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
8104      */
8105     ACAMERA_CONTROL_AF_STATE_PASSIVE_UNFOCUSED                       = 6,
8106 
8107 } acamera_metadata_enum_android_control_af_state_t;
8108 
8109 // ACAMERA_CONTROL_AWB_STATE
8110 typedef enum acamera_metadata_enum_acamera_control_awb_state {
8111     /**
8112      * <p>AWB is not in auto mode, or has not yet started metering.</p>
8113      * <p>When a camera device is opened, it starts in this
8114      * state. This is a transient state, the camera device may
8115      * skip reporting this state in capture
8116      * result.</p>
8117      */
8118     ACAMERA_CONTROL_AWB_STATE_INACTIVE                               = 0,
8119 
8120     /**
8121      * <p>AWB doesn't yet have a good set of control
8122      * values for the current scene.</p>
8123      * <p>This is a transient state, the camera device
8124      * may skip reporting this state in capture result.</p>
8125      */
8126     ACAMERA_CONTROL_AWB_STATE_SEARCHING                              = 1,
8127 
8128     /**
8129      * <p>AWB has a good set of control values for the
8130      * current scene.</p>
8131      */
8132     ACAMERA_CONTROL_AWB_STATE_CONVERGED                              = 2,
8133 
8134     /**
8135      * <p>AWB has been locked.</p>
8136      */
8137     ACAMERA_CONTROL_AWB_STATE_LOCKED                                 = 3,
8138 
8139 } acamera_metadata_enum_android_control_awb_state_t;
8140 
8141 // ACAMERA_CONTROL_AE_LOCK_AVAILABLE
8142 typedef enum acamera_metadata_enum_acamera_control_ae_lock_available {
8143     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_FALSE                          = 0,
8144 
8145     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_TRUE                           = 1,
8146 
8147 } acamera_metadata_enum_android_control_ae_lock_available_t;
8148 
8149 // ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
8150 typedef enum acamera_metadata_enum_acamera_control_awb_lock_available {
8151     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_FALSE                         = 0,
8152 
8153     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_TRUE                          = 1,
8154 
8155 } acamera_metadata_enum_android_control_awb_lock_available_t;
8156 
8157 // ACAMERA_CONTROL_ENABLE_ZSL
8158 typedef enum acamera_metadata_enum_acamera_control_enable_zsl {
8159     /**
8160      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE must be captured
8161      * after previous requests.</p>
8162      *
8163      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8164      */
8165     ACAMERA_CONTROL_ENABLE_ZSL_FALSE                                 = 0,
8166 
8167     /**
8168      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may or may not be
8169      * captured before previous requests.</p>
8170      *
8171      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8172      */
8173     ACAMERA_CONTROL_ENABLE_ZSL_TRUE                                  = 1,
8174 
8175 } acamera_metadata_enum_android_control_enable_zsl_t;
8176 
8177 // ACAMERA_CONTROL_AF_SCENE_CHANGE
8178 typedef enum acamera_metadata_enum_acamera_control_af_scene_change {
8179     /**
8180      * <p>Scene change is not detected within the AF region(s).</p>
8181      */
8182     ACAMERA_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED                     = 0,
8183 
8184     /**
8185      * <p>Scene change is detected within the AF region(s).</p>
8186      */
8187     ACAMERA_CONTROL_AF_SCENE_CHANGE_DETECTED                         = 1,
8188 
8189 } acamera_metadata_enum_android_control_af_scene_change_t;
8190 
8191 // ACAMERA_CONTROL_EXTENDED_SCENE_MODE
8192 typedef enum acamera_metadata_enum_acamera_control_extended_scene_mode {
8193     /**
8194      * <p>Extended scene mode is disabled.</p>
8195      */
8196     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_DISABLED                     = 0,
8197 
8198     /**
8199      * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
8200      * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
8201      * extra image processing, this mode may introduce additional stall to non-raw streams.
8202      * This mode should be used in high quality still capture use case.</p>
8203      */
8204     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE          = 1,
8205 
8206     /**
8207      * <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
8208      * and the effect is applied to all processed streams no larger than the maximum
8209      * streaming dimension. This mode should be used if performance and power are a
8210      * priority, such as video recording.</p>
8211      */
8212     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS             = 2,
8213 
8214 } acamera_metadata_enum_android_control_extended_scene_mode_t;
8215 
8216 
8217 
8218 // ACAMERA_EDGE_MODE
8219 typedef enum acamera_metadata_enum_acamera_edge_mode {
8220     /**
8221      * <p>No edge enhancement is applied.</p>
8222      */
8223     ACAMERA_EDGE_MODE_OFF                                            = 0,
8224 
8225     /**
8226      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
8227      * relative to sensor output. It may be the same as OFF if edge enhancement will
8228      * slow down frame rate relative to sensor.</p>
8229      */
8230     ACAMERA_EDGE_MODE_FAST                                           = 1,
8231 
8232     /**
8233      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
8234      */
8235     ACAMERA_EDGE_MODE_HIGH_QUALITY                                   = 2,
8236 
8237     /**
8238      * <p>Edge enhancement is applied at different
8239      * levels for different output streams, based on resolution. Streams at maximum recording
8240      * resolution (see {@link ACameraDevice_createCaptureSession })
8241      * or below have edge enhancement applied, while higher-resolution streams have no edge
8242      * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
8243      * so that frame rate is not impacted, and the quality is equal to or better than FAST
8244      * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
8245      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
8246      * with YUV or PRIVATE reprocessing, where the application continuously captures
8247      * high-resolution intermediate buffers into a circular buffer, from which a final image is
8248      * produced via reprocessing when a user takes a picture.  For such a use case, the
8249      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
8250      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
8251      * buffers (used for recording or preview, generally) need edge enhancement applied for
8252      * reasonable preview quality.</p>
8253      * <p>This mode is guaranteed to be supported by devices that support either the
8254      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
8255      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
8256      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
8257      *
8258      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8259      */
8260     ACAMERA_EDGE_MODE_ZERO_SHUTTER_LAG                               = 3,
8261 
8262 } acamera_metadata_enum_android_edge_mode_t;
8263 
8264 
8265 // ACAMERA_FLASH_MODE
8266 typedef enum acamera_metadata_enum_acamera_flash_mode {
8267     /**
8268      * <p>Do not fire the flash for this capture.</p>
8269      */
8270     ACAMERA_FLASH_MODE_OFF                                           = 0,
8271 
8272     /**
8273      * <p>If the flash is available and charged, fire flash
8274      * for this capture.</p>
8275      */
8276     ACAMERA_FLASH_MODE_SINGLE                                        = 1,
8277 
8278     /**
8279      * <p>Transition flash to continuously on.</p>
8280      */
8281     ACAMERA_FLASH_MODE_TORCH                                         = 2,
8282 
8283 } acamera_metadata_enum_android_flash_mode_t;
8284 
8285 // ACAMERA_FLASH_STATE
8286 typedef enum acamera_metadata_enum_acamera_flash_state {
8287     /**
8288      * <p>No flash on camera.</p>
8289      */
8290     ACAMERA_FLASH_STATE_UNAVAILABLE                                  = 0,
8291 
8292     /**
8293      * <p>Flash is charging and cannot be fired.</p>
8294      */
8295     ACAMERA_FLASH_STATE_CHARGING                                     = 1,
8296 
8297     /**
8298      * <p>Flash is ready to fire.</p>
8299      */
8300     ACAMERA_FLASH_STATE_READY                                        = 2,
8301 
8302     /**
8303      * <p>Flash fired for this capture.</p>
8304      */
8305     ACAMERA_FLASH_STATE_FIRED                                        = 3,
8306 
8307     /**
8308      * <p>Flash partially illuminated this frame.</p>
8309      * <p>This is usually due to the next or previous frame having
8310      * the flash fire, and the flash spilling into this capture
8311      * due to hardware limitations.</p>
8312      */
8313     ACAMERA_FLASH_STATE_PARTIAL                                      = 4,
8314 
8315 } acamera_metadata_enum_android_flash_state_t;
8316 
8317 
8318 // ACAMERA_FLASH_INFO_AVAILABLE
8319 typedef enum acamera_metadata_enum_acamera_flash_info_available {
8320     ACAMERA_FLASH_INFO_AVAILABLE_FALSE                               = 0,
8321 
8322     ACAMERA_FLASH_INFO_AVAILABLE_TRUE                                = 1,
8323 
8324 } acamera_metadata_enum_android_flash_info_available_t;
8325 
8326 
8327 // ACAMERA_HOT_PIXEL_MODE
8328 typedef enum acamera_metadata_enum_acamera_hot_pixel_mode {
8329     /**
8330      * <p>No hot pixel correction is applied.</p>
8331      * <p>The frame rate must not be reduced relative to sensor raw output
8332      * for this option.</p>
8333      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
8334      *
8335      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
8336      */
8337     ACAMERA_HOT_PIXEL_MODE_OFF                                       = 0,
8338 
8339     /**
8340      * <p>Hot pixel correction is applied, without reducing frame
8341      * rate relative to sensor raw output.</p>
8342      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
8343      *
8344      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
8345      */
8346     ACAMERA_HOT_PIXEL_MODE_FAST                                      = 1,
8347 
8348     /**
8349      * <p>High-quality hot pixel correction is applied, at a cost
8350      * of possibly reduced frame rate relative to sensor raw output.</p>
8351      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
8352      *
8353      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
8354      */
8355     ACAMERA_HOT_PIXEL_MODE_HIGH_QUALITY                              = 2,
8356 
8357 } acamera_metadata_enum_android_hot_pixel_mode_t;
8358 
8359 
8360 
8361 // ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
8362 typedef enum acamera_metadata_enum_acamera_lens_optical_stabilization_mode {
8363     /**
8364      * <p>Optical stabilization is unavailable.</p>
8365      */
8366     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_OFF                      = 0,
8367 
8368     /**
8369      * <p>Optical stabilization is enabled.</p>
8370      */
8371     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_ON                       = 1,
8372 
8373 } acamera_metadata_enum_android_lens_optical_stabilization_mode_t;
8374 
8375 // ACAMERA_LENS_FACING
8376 typedef enum acamera_metadata_enum_acamera_lens_facing {
8377     /**
8378      * <p>The camera device faces the same direction as the device's screen.</p>
8379      */
8380     ACAMERA_LENS_FACING_FRONT                                        = 0,
8381 
8382     /**
8383      * <p>The camera device faces the opposite direction as the device's screen.</p>
8384      */
8385     ACAMERA_LENS_FACING_BACK                                         = 1,
8386 
8387     /**
8388      * <p>The camera device is an external camera, and has no fixed facing relative to the
8389      * device's screen.</p>
8390      */
8391     ACAMERA_LENS_FACING_EXTERNAL                                     = 2,
8392 
8393 } acamera_metadata_enum_android_lens_facing_t;
8394 
8395 // ACAMERA_LENS_STATE
8396 typedef enum acamera_metadata_enum_acamera_lens_state {
8397     /**
8398      * <p>The lens parameters (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
8399      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE) are not changing.</p>
8400      *
8401      * @see ACAMERA_LENS_APERTURE
8402      * @see ACAMERA_LENS_FILTER_DENSITY
8403      * @see ACAMERA_LENS_FOCAL_LENGTH
8404      * @see ACAMERA_LENS_FOCUS_DISTANCE
8405      */
8406     ACAMERA_LENS_STATE_STATIONARY                                    = 0,
8407 
8408     /**
8409      * <p>One or several of the lens parameters
8410      * (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
8411      * ACAMERA_LENS_FILTER_DENSITY or ACAMERA_LENS_APERTURE) is
8412      * currently changing.</p>
8413      *
8414      * @see ACAMERA_LENS_APERTURE
8415      * @see ACAMERA_LENS_FILTER_DENSITY
8416      * @see ACAMERA_LENS_FOCAL_LENGTH
8417      * @see ACAMERA_LENS_FOCUS_DISTANCE
8418      */
8419     ACAMERA_LENS_STATE_MOVING                                        = 1,
8420 
8421 } acamera_metadata_enum_android_lens_state_t;
8422 
8423 // ACAMERA_LENS_POSE_REFERENCE
8424 typedef enum acamera_metadata_enum_acamera_lens_pose_reference {
8425     /**
8426      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the optical center of
8427      * the largest camera device facing the same direction as this camera.</p>
8428      * <p>This is the default value for API levels before Android P.</p>
8429      *
8430      * @see ACAMERA_LENS_POSE_TRANSLATION
8431      */
8432     ACAMERA_LENS_POSE_REFERENCE_PRIMARY_CAMERA                       = 0,
8433 
8434     /**
8435      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the position of the
8436      * primary gyroscope of this Android device.</p>
8437      *
8438      * @see ACAMERA_LENS_POSE_TRANSLATION
8439      */
8440     ACAMERA_LENS_POSE_REFERENCE_GYROSCOPE                            = 1,
8441 
8442     /**
8443      * <p>The camera device cannot represent the values of ACAMERA_LENS_POSE_TRANSLATION
8444      * and ACAMERA_LENS_POSE_ROTATION accurately enough. One such example is a camera device
8445      * on the cover of a foldable phone: in order to measure the pose translation and rotation,
8446      * some kind of hinge position sensor would be needed.</p>
8447      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION must be all zeros, and
8448      * ACAMERA_LENS_POSE_ROTATION must be values matching its default facing.</p>
8449      *
8450      * @see ACAMERA_LENS_POSE_ROTATION
8451      * @see ACAMERA_LENS_POSE_TRANSLATION
8452      */
8453     ACAMERA_LENS_POSE_REFERENCE_UNDEFINED                            = 2,
8454 
8455 } acamera_metadata_enum_android_lens_pose_reference_t;
8456 
8457 
8458 // ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
8459 typedef enum acamera_metadata_enum_acamera_lens_info_focus_distance_calibration {
8460     /**
8461      * <p>The lens focus distance is not accurate, and the units used for
8462      * ACAMERA_LENS_FOCUS_DISTANCE do not correspond to any physical units.</p>
8463      * <p>Setting the lens to the same focus distance on separate occasions may
8464      * result in a different real focus distance, depending on factors such
8465      * as the orientation of the device, the age of the focusing mechanism,
8466      * and the device temperature. The focus distance value will still be
8467      * in the range of <code>[0, ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE]</code>, where 0
8468      * represents the farthest focus.</p>
8469      *
8470      * @see ACAMERA_LENS_FOCUS_DISTANCE
8471      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
8472      */
8473     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED        = 0,
8474 
8475     /**
8476      * <p>The lens focus distance is measured in diopters.</p>
8477      * <p>However, setting the lens to the same focus distance
8478      * on separate occasions may result in a different real
8479      * focus distance, depending on factors such as the
8480      * orientation of the device, the age of the focusing
8481      * mechanism, and the device temperature.</p>
8482      */
8483     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE         = 1,
8484 
8485     /**
8486      * <p>The lens focus distance is measured in diopters, and
8487      * is calibrated.</p>
8488      * <p>The lens mechanism is calibrated so that setting the
8489      * same focus distance is repeatable on multiple
8490      * occasions with good accuracy, and the focus distance
8491      * corresponds to the real physical distance to the plane
8492      * of best focus.</p>
8493      */
8494     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED          = 2,
8495 
8496 } acamera_metadata_enum_android_lens_info_focus_distance_calibration_t;
8497 
8498 
8499 // ACAMERA_NOISE_REDUCTION_MODE
8500 typedef enum acamera_metadata_enum_acamera_noise_reduction_mode {
8501     /**
8502      * <p>No noise reduction is applied.</p>
8503      */
8504     ACAMERA_NOISE_REDUCTION_MODE_OFF                                 = 0,
8505 
8506     /**
8507      * <p>Noise reduction is applied without reducing frame rate relative to sensor
8508      * output. It may be the same as OFF if noise reduction will reduce frame rate
8509      * relative to sensor.</p>
8510      */
8511     ACAMERA_NOISE_REDUCTION_MODE_FAST                                = 1,
8512 
8513     /**
8514      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
8515      * rate relative to sensor output.</p>
8516      */
8517     ACAMERA_NOISE_REDUCTION_MODE_HIGH_QUALITY                        = 2,
8518 
8519     /**
8520      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
8521      * sensor output. </p>
8522      */
8523     ACAMERA_NOISE_REDUCTION_MODE_MINIMAL                             = 3,
8524 
8525     /**
8526      * <p>Noise reduction is applied at different levels for different output streams,
8527      * based on resolution. Streams at maximum recording resolution (see {@link ACameraDevice_createCaptureSession })
8528      * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
8529      * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
8530      * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
8531      * and the quality is equal to or better than FAST (since it is only applied to
8532      * lower-resolution outputs, quality may improve from FAST).</p>
8533      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
8534      * with YUV or PRIVATE reprocessing, where the application continuously captures
8535      * high-resolution intermediate buffers into a circular buffer, from which a final image is
8536      * produced via reprocessing when a user takes a picture.  For such a use case, the
8537      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
8538      * preview and to avoid over-applying noise filtering when reprocessing, while
8539      * low-resolution buffers (used for recording or preview, generally) need noise reduction
8540      * applied for reasonable preview quality.</p>
8541      * <p>This mode is guaranteed to be supported by devices that support either the
8542      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
8543      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
8544      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
8545      *
8546      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8547      */
8548     ACAMERA_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG                    = 4,
8549 
8550 } acamera_metadata_enum_android_noise_reduction_mode_t;
8551 
8552 
8553 
8554 // ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8555 typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
8556     /**
8557      * <p>The minimal set of capabilities that every camera
8558      * device (regardless of ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL)
8559      * supports.</p>
8560      * <p>This capability is listed by all normal devices, and
8561      * indicates that the camera device has a feature set
8562      * that's comparable to the baseline requirements for the
8563      * older android.hardware.Camera API.</p>
8564      * <p>Devices with the DEPTH_OUTPUT capability might not list this
8565      * capability, indicating that they support only depth measurement,
8566      * not standard color output.</p>
8567      *
8568      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
8569      */
8570     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE       = 0,
8571 
8572     /**
8573      * <p>The camera device can be manually controlled (3A algorithms such
8574      * as auto-exposure, and auto-focus can be bypassed).
8575      * The camera device supports basic manual control of the sensor image
8576      * acquisition related stages. This means the following controls are
8577      * guaranteed to be supported:</p>
8578      * <ul>
8579      * <li>Manual frame duration control<ul>
8580      * <li>ACAMERA_SENSOR_FRAME_DURATION</li>
8581      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
8582      * </ul>
8583      * </li>
8584      * <li>Manual exposure control<ul>
8585      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
8586      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
8587      * </ul>
8588      * </li>
8589      * <li>Manual sensitivity control<ul>
8590      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
8591      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
8592      * </ul>
8593      * </li>
8594      * <li>Manual lens control (if the lens is adjustable)<ul>
8595      * <li>ACAMERA_LENS_*</li>
8596      * </ul>
8597      * </li>
8598      * <li>Manual flash control (if a flash unit is present)<ul>
8599      * <li>ACAMERA_FLASH_*</li>
8600      * </ul>
8601      * </li>
8602      * <li>Manual black level locking<ul>
8603      * <li>ACAMERA_BLACK_LEVEL_LOCK</li>
8604      * </ul>
8605      * </li>
8606      * <li>Auto exposure lock<ul>
8607      * <li>ACAMERA_CONTROL_AE_LOCK</li>
8608      * </ul>
8609      * </li>
8610      * </ul>
8611      * <p>If any of the above 3A algorithms are enabled, then the camera
8612      * device will accurately report the values applied by 3A in the
8613      * result.</p>
8614      * <p>A given camera device may also support additional manual sensor controls,
8615      * but this capability only covers the above list of controls.</p>
8616      * <p>If this is supported, android.scaler.streamConfigurationMap will
8617      * additionally return a min frame duration that is greater than
8618      * zero for each supported size-format combination.</p>
8619      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
8620      * physical camera switches, exposureTime, sensitivity, and lens properties may change
8621      * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
8622      * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
8623      *
8624      * @see ACAMERA_BLACK_LEVEL_LOCK
8625      * @see ACAMERA_CONTROL_AE_LOCK
8626      * @see ACAMERA_SENSOR_EXPOSURE_TIME
8627      * @see ACAMERA_SENSOR_FRAME_DURATION
8628      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
8629      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
8630      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
8631      * @see ACAMERA_SENSOR_SENSITIVITY
8632      */
8633     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR             = 1,
8634 
8635     /**
8636      * <p>The camera device post-processing stages can be manually controlled.
8637      * The camera device supports basic manual control of the image post-processing
8638      * stages. This means the following controls are guaranteed to be supported:</p>
8639      * <ul>
8640      * <li>
8641      * <p>Manual tonemap control</p>
8642      * <ul>
8643      * <li>android.tonemap.curve</li>
8644      * <li>ACAMERA_TONEMAP_MODE</li>
8645      * <li>ACAMERA_TONEMAP_MAX_CURVE_POINTS</li>
8646      * <li>ACAMERA_TONEMAP_GAMMA</li>
8647      * <li>ACAMERA_TONEMAP_PRESET_CURVE</li>
8648      * </ul>
8649      * </li>
8650      * <li>
8651      * <p>Manual white balance control</p>
8652      * <ul>
8653      * <li>ACAMERA_COLOR_CORRECTION_TRANSFORM</li>
8654      * <li>ACAMERA_COLOR_CORRECTION_GAINS</li>
8655      * </ul>
8656      * </li>
8657      * <li>Manual lens shading map control<ul>
8658      * <li>ACAMERA_SHADING_MODE</li>
8659      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE</li>
8660      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP</li>
8661      * <li>ACAMERA_LENS_INFO_SHADING_MAP_SIZE</li>
8662      * </ul>
8663      * </li>
8664      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
8665      * <li>ACAMERA_COLOR_CORRECTION_ABERRATION_MODE</li>
8666      * <li>ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES</li>
8667      * </ul>
8668      * </li>
8669      * <li>Auto white balance lock<ul>
8670      * <li>ACAMERA_CONTROL_AWB_LOCK</li>
8671      * </ul>
8672      * </li>
8673      * </ul>
8674      * <p>If auto white balance is enabled, then the camera device
8675      * will accurately report the values applied by AWB in the result.</p>
8676      * <p>A given camera device may also support additional post-processing
8677      * controls, but this capability only covers the above list of controls.</p>
8678      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
8679      * physical camera switches, tonemap, white balance, and shading map may change even if
8680      * awb is locked. However, the overall post-processing experience for users will be
8681      * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
8682      *
8683      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
8684      * @see ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
8685      * @see ACAMERA_COLOR_CORRECTION_GAINS
8686      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8687      * @see ACAMERA_CONTROL_AWB_LOCK
8688      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
8689      * @see ACAMERA_SHADING_MODE
8690      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
8691      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
8692      * @see ACAMERA_TONEMAP_GAMMA
8693      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
8694      * @see ACAMERA_TONEMAP_MODE
8695      * @see ACAMERA_TONEMAP_PRESET_CURVE
8696      */
8697     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING    = 2,
8698 
8699     /**
8700      * <p>The camera device supports outputting RAW buffers and
8701      * metadata for interpreting them.</p>
8702      * <p>Devices supporting the RAW capability allow both for
8703      * saving DNG files, and for direct application processing of
8704      * raw sensor images.</p>
8705      * <ul>
8706      * <li>RAW_SENSOR is supported as an output format.</li>
8707      * <li>The maximum available resolution for RAW_SENSOR streams
8708      *   will match either the value in
8709      *   ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE or
8710      *   ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</li>
8711      * <li>All DNG-related optional metadata entries are provided
8712      *   by the camera device.</li>
8713      * </ul>
8714      *
8715      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
8716      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
8717      */
8718     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_RAW                       = 3,
8719 
8720     /**
8721      * <p>The camera device supports accurately reporting the sensor settings for many of
8722      * the sensor controls while the built-in 3A algorithm is running.  This allows
8723      * reporting of sensor settings even when these settings cannot be manually changed.</p>
8724      * <p>The values reported for the following controls are guaranteed to be available
8725      * in the CaptureResult, including when 3A is enabled:</p>
8726      * <ul>
8727      * <li>Exposure control<ul>
8728      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
8729      * </ul>
8730      * </li>
8731      * <li>Sensitivity control<ul>
8732      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
8733      * </ul>
8734      * </li>
8735      * <li>Lens controls (if the lens is adjustable)<ul>
8736      * <li>ACAMERA_LENS_FOCUS_DISTANCE</li>
8737      * <li>ACAMERA_LENS_APERTURE</li>
8738      * </ul>
8739      * </li>
8740      * </ul>
8741      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
8742      * always be included if the MANUAL_SENSOR capability is available.</p>
8743      *
8744      * @see ACAMERA_LENS_APERTURE
8745      * @see ACAMERA_LENS_FOCUS_DISTANCE
8746      * @see ACAMERA_SENSOR_EXPOSURE_TIME
8747      * @see ACAMERA_SENSOR_SENSITIVITY
8748      */
8749     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS      = 5,
8750 
8751     /**
8752      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
8753      * second, in at least the uncompressed YUV format, when post-processing settings are
8754      * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
8755      * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
8756      * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
8757      * <p>More specifically, this means that at least one output {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
8758      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
8759      * is larger or equal to the 'high resolution' defined above, and can be captured at at
8760      * least 20 fps.  For the largest {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
8761      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS },
8762      * camera device can capture this size for at least 10 frames per second if the size is
8763      * less than 24 megapixels. Also the ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES entry
8764      * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
8765      * for the largest YUV_420_888 size.</p>
8766      * <p>If the device supports the {@link AIMAGE_FORMAT_RAW10 }, {@link AIMAGE_FORMAT_RAW12 }, {@link AIMAGE_FORMAT_Y8 }, then those can also be
8767      * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
8768      * <p>In addition, the ACAMERA_SYNC_MAX_LATENCY field is guaranted to have a value between 0
8769      * and 4, inclusive. ACAMERA_CONTROL_AE_LOCK_AVAILABLE and ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
8770      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
8771      * consistent image output.</p>
8772      *
8773      * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
8774      * @see ACAMERA_CONTROL_AE_LOCK_AVAILABLE
8775      * @see ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
8776      * @see ACAMERA_SYNC_MAX_LATENCY
8777      */
8778     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE             = 6,
8779 
8780     /**
8781      * <p>The camera device can produce depth measurements from its field of view.</p>
8782      * <p>This capability requires the camera device to support the following:</p>
8783      * <ul>
8784      * <li>{@link AIMAGE_FORMAT_DEPTH16 } is supported as
8785      *   an output format.</li>
8786      * <li>{@link AIMAGE_FORMAT_DEPTH_POINT_CLOUD } is
8787      *   optionally supported as an output format.</li>
8788      * <li>This camera device, and all camera devices with the same ACAMERA_LENS_FACING, will
8789      *   list the following calibration metadata entries in both {@link ACameraManager_getCameraCharacteristics }
8790      *   and {@link ACameraCaptureSession_captureCallback_result }:<ul>
8791      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
8792      * <li>ACAMERA_LENS_POSE_ROTATION</li>
8793      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
8794      * <li>ACAMERA_LENS_DISTORTION</li>
8795      * </ul>
8796      * </li>
8797      * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li>
8798      * <li>As of Android P, the ACAMERA_LENS_POSE_REFERENCE entry is listed by this device.</li>
8799      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
8800      *   normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
8801      *   DEPTH16 format.</li>
8802      * </ul>
8803      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
8804      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
8805      * should be accounted for (see {@link ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS }).
8806      * On a device that supports both depth and color-based output, to enable smooth preview,
8807      * using a repeating burst is recommended, where a depth-output target is only included
8808      * once every N frames, where N is the ratio between preview output rate and depth output
8809      * rate, including depth stall time.</p>
8810      *
8811      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
8812      * @see ACAMERA_LENS_DISTORTION
8813      * @see ACAMERA_LENS_FACING
8814      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
8815      * @see ACAMERA_LENS_POSE_REFERENCE
8816      * @see ACAMERA_LENS_POSE_ROTATION
8817      * @see ACAMERA_LENS_POSE_TRANSLATION
8818      */
8819     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT              = 8,
8820 
8821     /**
8822      * <p>The camera device supports the MOTION_TRACKING value for
8823      * ACAMERA_CONTROL_CAPTURE_INTENT, which limits maximum exposure time to 20 ms.</p>
8824      * <p>This limits the motion blur of capture images, resulting in better image tracking
8825      * results for use cases such as image stabilization or augmented reality.</p>
8826      *
8827      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8828      */
8829     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING           = 10,
8830 
8831     /**
8832      * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
8833      * <p>In API level 28, the physical cameras must also be exposed to the application via
8834      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>.</p>
8835      * <p>Starting from API level 29:</p>
8836      * <ul>
8837      * <li>Some or all physical cameras may not be independently exposed to the application,
8838      * in which case the physical camera IDs will not be available in
8839      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>. But the
8840      * application can still query the physical cameras' characteristics by calling
8841      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraCharacteristics">CameraManager#getCameraCharacteristics</a>.</li>
8842      * <li>If a physical camera is hidden from camera ID list, the mandatory stream
8843      * combinations for that physical camera must be supported through the logical camera
8844      * using physical streams. One exception is that in API level 30, a physical camera
8845      * may become unavailable via
8846      * {@link ACameraManager_PhysicalCameraAvailabilityCallback }
8847      * callback.</li>
8848      * </ul>
8849      * <p>Combinations of logical and physical streams, or physical streams from different
8850      * physical cameras are not guaranteed. However, if the camera device supports
8851      * {@link ACameraDevice_isSessionConfigurationSupported },
8852      * application must be able to query whether a stream combination involving physical
8853      * streams is supported by calling
8854      * {@link ACameraDevice_isSessionConfigurationSupported }.</p>
8855      * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
8856      * camera in the system. For an application that switches between front and back cameras,
8857      * the recommendation is to switch between the first rear camera and the first front
8858      * camera in the list of supported camera devices.</p>
8859      * <p>This capability requires the camera device to support the following:</p>
8860      * <ul>
8861      * <li>The IDs of underlying physical cameras are returned via
8862      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getPhysicalCameraIds">CameraCharacteristics#getPhysicalCameraIds</a>.</li>
8863      * <li>This camera device must list static metadata
8864      *   ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE in
8865      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html">CameraCharacteristics</a>.</li>
8866      * <li>The underlying physical cameras' static metadata must list the following entries,
8867      *   so that the application can correlate pixels from the physical streams:<ul>
8868      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
8869      * <li>ACAMERA_LENS_POSE_ROTATION</li>
8870      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
8871      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
8872      * <li>ACAMERA_LENS_DISTORTION</li>
8873      * </ul>
8874      * </li>
8875      * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
8876      *   the same.</li>
8877      * <li>The logical camera must be LIMITED or higher device.</li>
8878      * </ul>
8879      * <p>A logical camera device's dynamic metadata may contain
8880      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID to notify the application of the current
8881      * active physical camera Id. An active physical camera is the physical camera from which
8882      * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
8883      * In addition, this serves as an indication which physical camera is used to output to
8884      * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
8885      * the application should request.</p>
8886      * <p>Logical camera's static metadata tags below describe the default active physical
8887      * camera. An active physical camera is default if it's used when application directly
8888      * uses requests built from a template. All templates will default to the same active
8889      * physical camera.</p>
8890      * <ul>
8891      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
8892      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
8893      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
8894      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
8895      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
8896      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
8897      * <li>ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED</li>
8898      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT1</li>
8899      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT2</li>
8900      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM1</li>
8901      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM2</li>
8902      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM1</li>
8903      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM2</li>
8904      * <li>ACAMERA_SENSOR_FORWARD_MATRIX1</li>
8905      * <li>ACAMERA_SENSOR_FORWARD_MATRIX2</li>
8906      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
8907      * <li>ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY</li>
8908      * <li>ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS</li>
8909      * <li>ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES</li>
8910      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
8911      * <li>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE</li>
8912      * <li>ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION</li>
8913      * <li>ACAMERA_LENS_POSE_ROTATION</li>
8914      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
8915      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
8916      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
8917      * <li>ACAMERA_LENS_DISTORTION</li>
8918      * </ul>
8919      * <p>The field of view of non-RAW physical streams must not be smaller than that of the
8920      * non-RAW logical streams, or the maximum field-of-view of the physical camera,
8921      * whichever is smaller. The application should check the physical capture result
8922      * metadata for how the physical streams are cropped or zoomed. More specifically, given
8923      * the physical camera result metadata, the effective horizontal field-of-view of the
8924      * physical camera is:</p>
8925      * <pre><code>fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength)
8926      * </code></pre>
8927      * <p>where the equation parameters are the physical camera's crop region width, physical
8928      * sensor width, zoom ratio, active array width, and focal length respectively. Typically
8929      * the physical stream of active physical camera has the same field-of-view as the
8930      * logical streams. However, the same may not be true for physical streams from
8931      * non-active physical cameras. For example, if the logical camera has a wide-ultrawide
8932      * configuration where the wide lens is the default, when the crop region is set to the
8933      * logical camera's active array size, (and the zoom ratio set to 1.0 starting from
8934      * Android 11), a physical stream for the ultrawide camera may prefer outputing images
8935      * with larger field-of-view than that of the wide camera for better stereo matching
8936      * margin or more robust motion tracking. At the same time, the physical non-RAW streams'
8937      * field of view must not be smaller than the requested crop region and zoom ratio, as
8938      * long as it's within the physical lens' capability. For example, for a logical camera
8939      * with wide-tele lens configuration where the wide lens is the default, if the logical
8940      * camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical
8941      * stream for the tele lens will be configured to its maximum size crop region (no zoom).</p>
8942      * <p><em>Deprecated:</em> Prior to Android 11, the field of view of all non-RAW physical streams
8943      * cannot be larger than that of non-RAW logical streams. If the logical camera has a
8944      * wide-ultrawide lens configuration where the wide lens is the default, when the logical
8945      * camera's crop region is set to maximum size, the FOV of the physical streams for the
8946      * ultrawide lens will be the same as the logical stream, by making the crop region
8947      * smaller than its active array size to compensate for the smaller focal length.</p>
8948      * <p>There are two ways for the application to capture RAW images from a logical camera
8949      * with RAW capability:</p>
8950      * <ul>
8951      * <li>Because the underlying physical cameras may have different RAW capabilities (such
8952      * as resolution or CFA pattern), to maintain backward compatibility, when a RAW stream
8953      * is configured, the camera device makes sure the default active physical camera remains
8954      * active and does not switch to other physical cameras. (One exception is that, if the
8955      * logical camera consists of identical image sensors and advertises multiple focalLength
8956      * due to different lenses, the camera device may generate RAW images from different
8957      * physical cameras based on the focalLength being set by the application.) This
8958      * backward-compatible approach usually results in loss of optical zoom, to telephoto
8959      * lens or to ultrawide lens.</li>
8960      * <li>Alternatively, to take advantage of the full zoomRatio range of the logical camera,
8961      * the application should use <a href="https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader.html">MultiResolutionImageReader</a>
8962      * to capture RAW images from the currently active physical camera. Because different
8963      * physical camera may have different RAW characteristics, the application needs to use
8964      * the characteristics and result metadata of the active physical camera for the
8965      * relevant RAW metadata.</li>
8966      * </ul>
8967      * <p>The capture request and result metadata tags required for backward compatible camera
8968      * functionalities will be solely based on the logical camera capability. On the other
8969      * hand, the use of manual capture controls (sensor or post-processing) with a
8970      * logical camera may result in unexpected behavior when the HAL decides to switch
8971      * between physical cameras with different characteristics under the hood. For example,
8972      * when the application manually sets exposure time and sensitivity while zooming in,
8973      * the brightness of the camera images may suddenly change because HAL switches from one
8974      * physical camera to the other.</p>
8975      *
8976      * @see ACAMERA_LENS_DISTORTION
8977      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
8978      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
8979      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
8980      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
8981      * @see ACAMERA_LENS_POSE_REFERENCE
8982      * @see ACAMERA_LENS_POSE_ROTATION
8983      * @see ACAMERA_LENS_POSE_TRANSLATION
8984      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
8985      * @see ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
8986      * @see ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES
8987      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
8988      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
8989      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
8990      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
8991      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
8992      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
8993      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
8994      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
8995      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
8996      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
8997      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
8998      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
8999      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
9000      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
9001      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
9002      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
9003      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
9004      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
9005      */
9006     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA      = 11,
9007 
9008     /**
9009      * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
9010      * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p>
9011      * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
9012      * its device level and capabilities. Additionally, if the monochrome camera device
9013      * supports Y8 format, all mandatory stream combination requirements related to {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888} apply
9014      * to {@link AIMAGE_FORMAT_Y8 Y8} as well. There are no
9015      * mandatory stream combination requirements with regard to
9016      * {@link AIMAGE_FORMAT_Y8 Y8} for Bayer camera devices.</p>
9017      * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
9018      * camera will be either MONO or NIR.</p>
9019      */
9020     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME                = 12,
9021 
9022     /**
9023      * <p>The camera device is capable of writing image data into a region of memory
9024      * inaccessible to Android userspace or the Android kernel, and only accessible to
9025      * trusted execution environments (TEE).</p>
9026      */
9027     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA         = 13,
9028 
9029     /**
9030      * <p>The camera device is only accessible by Android's system components and privileged
9031      * applications. Processes need to have the android.permission.SYSTEM_CAMERA in
9032      * addition to android.permission.CAMERA in order to connect to this camera device.</p>
9033      */
9034     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA             = 14,
9035 
9036     /**
9037      * <p>This camera device is capable of producing ultra high resolution images in
9038      * addition to the image sizes described in the
9039      * android.scaler.streamConfigurationMap.
9040      * It can operate in 'default' mode and 'max resolution' mode. It generally does this
9041      * by binning pixels in 'default' mode and not binning them in 'max resolution' mode.
9042      * <code>android.scaler.streamConfigurationMap</code> describes the streams supported in 'default'
9043      * mode.
9044      * The stream configurations supported in 'max resolution' mode are described by
9045      * <code>android.scaler.streamConfigurationMapMaximumResolution</code>.
9046      * The maximum resolution mode pixel array size of a camera device
9047      * (<code>ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE</code>) with this capability,
9048      * will be at least 24 megapixels.</p>
9049      *
9050      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
9051      */
9052     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR
9053                                                                       = 16,
9054 
9055 } acamera_metadata_enum_android_request_available_capabilities_t;
9056 
9057 
9058 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
9059 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations {
9060     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT            = 0,
9061 
9062     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT             = 1,
9063 
9064 } acamera_metadata_enum_android_scaler_available_stream_configurations_t;
9065 
9066 // ACAMERA_SCALER_CROPPING_TYPE
9067 typedef enum acamera_metadata_enum_acamera_scaler_cropping_type {
9068     /**
9069      * <p>The camera device only supports centered crop regions.</p>
9070      */
9071     ACAMERA_SCALER_CROPPING_TYPE_CENTER_ONLY                         = 0,
9072 
9073     /**
9074      * <p>The camera device supports arbitrarily chosen crop regions.</p>
9075      */
9076     ACAMERA_SCALER_CROPPING_TYPE_FREEFORM                            = 1,
9077 
9078 } acamera_metadata_enum_android_scaler_cropping_type_t;
9079 
9080 // ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
9081 typedef enum acamera_metadata_enum_acamera_scaler_available_recommended_stream_configurations {
9082     /**
9083      * <p>Preview must only include non-stalling processed stream configurations with
9084      * output formats like
9085      * {@link AIMAGE_FORMAT_YUV_420_888 },
9086      * {@link AIMAGE_FORMAT_PRIVATE }, etc.</p>
9087      */
9088     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW
9089                                                                       = 0x0,
9090 
9091     /**
9092      * <p>Video record must include stream configurations that match the advertised
9093      * supported media profiles <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> with
9094      * IMPLEMENTATION_DEFINED format.</p>
9095      */
9096     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD
9097                                                                       = 0x1,
9098 
9099     /**
9100      * <p>Video snapshot must include stream configurations at least as big as
9101      * the maximum RECORD resolutions and only with
9102      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
9103      * Additionally the configurations shouldn't cause preview glitches and also be able to
9104      * run at 30 fps.</p>
9105      */
9106     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT
9107                                                                       = 0x2,
9108 
9109     /**
9110      * <p>Recommended snapshot stream configurations must include at least one with
9111      * size close to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE and
9112      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
9113      * Taking into account restrictions on aspect ratio, alignment etc. the area of the
9114      * maximum suggested size shouldn’t be less than 97% of the sensor array size area.</p>
9115      *
9116      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
9117      */
9118     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT
9119                                                                       = 0x3,
9120 
9121     /**
9122      * <p>If supported, recommended input stream configurations must only be advertised with
9123      * ZSL along with other processed and/or stalling output formats.</p>
9124      */
9125     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL   = 0x4,
9126 
9127     /**
9128      * <p>If supported, recommended raw stream configurations must only include RAW based
9129      * output formats.</p>
9130      */
9131     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW   = 0x5,
9132 
9133     /**
9134      * <p>If supported, the recommended low latency stream configurations must have
9135      * end-to-end latency that does not exceed 200 ms. under standard operating conditions
9136      * (reasonable light levels, not loaded system) and using template
9137      * TEMPLATE_STILL_CAPTURE. This is primarily for listing configurations for the
9138      * {@link AIMAGE_FORMAT_JPEG JPEG output format}
9139      * however other supported output formats can be added as well.</p>
9140      */
9141     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT
9142                                                                       = 0x6,
9143 
9144     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END
9145                                                                       = 0x7,
9146 
9147     /**
9148      * <p>Vendor defined use cases. These depend on the vendor implementation.</p>
9149      */
9150     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START
9151                                                                       = 0x18,
9152 
9153 } acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t;
9154 
9155 // ACAMERA_SCALER_ROTATE_AND_CROP
9156 typedef enum acamera_metadata_enum_acamera_scaler_rotate_and_crop {
9157     /**
9158      * <p>No rotate and crop is applied. Processed outputs are in the sensor orientation.</p>
9159      */
9160     ACAMERA_SCALER_ROTATE_AND_CROP_NONE                              = 0,
9161 
9162     /**
9163      * <p>Processed images are rotated by 90 degrees clockwise, and then cropped
9164      * to the original aspect ratio.</p>
9165      */
9166     ACAMERA_SCALER_ROTATE_AND_CROP_90                                = 1,
9167 
9168     /**
9169      * <p>Processed images are rotated by 180 degrees.  Since the aspect ratio does not
9170      * change, no cropping is performed.</p>
9171      */
9172     ACAMERA_SCALER_ROTATE_AND_CROP_180                               = 2,
9173 
9174     /**
9175      * <p>Processed images are rotated by 270 degrees clockwise, and then cropped
9176      * to the original aspect ratio.</p>
9177      */
9178     ACAMERA_SCALER_ROTATE_AND_CROP_270                               = 3,
9179 
9180     /**
9181      * <p>The camera API automatically selects the best concrete value for
9182      * rotate-and-crop based on the application's support for resizability and the current
9183      * multi-window mode.</p>
9184      * <p>If the application does not support resizing but the display mode for its main
9185      * Activity is not in a typical orientation, the camera API will set <code>ROTATE_AND_CROP_90</code>
9186      * or some other supported rotation value, depending on device configuration,
9187      * to ensure preview and captured images are correctly shown to the user. Otherwise,
9188      * <code>ROTATE_AND_CROP_NONE</code> will be selected.</p>
9189      * <p>When a value other than NONE is selected, several metadata fields will also be parsed
9190      * differently to ensure that coordinates are correctly handled for features like drawing
9191      * face detection boxes or passing in tap-to-focus coordinates.  The camera API will
9192      * convert positions in the active array coordinate system to/from the cropped-and-rotated
9193      * coordinate system to make the operation transparent for applications.</p>
9194      * <p>No coordinate mapping will be done when the application selects a non-AUTO mode.</p>
9195      */
9196     ACAMERA_SCALER_ROTATE_AND_CROP_AUTO                              = 4,
9197 
9198 } acamera_metadata_enum_android_scaler_rotate_and_crop_t;
9199 
9200 // ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
9201 typedef enum acamera_metadata_enum_acamera_scaler_physical_camera_multi_resolution_stream_configurations {
9202     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT
9203                                                                       = 0,
9204 
9205     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT
9206                                                                       = 1,
9207 
9208 } acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t;
9209 
9210 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
9211 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations_maximum_resolution {
9212     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
9213                                                                       = 0,
9214 
9215     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
9216                                                                       = 1,
9217 
9218 } acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t;
9219 
9220 // ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED
9221 typedef enum acamera_metadata_enum_acamera_scaler_multi_resolution_stream_supported {
9222     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE           = 0,
9223 
9224     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE            = 1,
9225 
9226 } acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t;
9227 
9228 
9229 // ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
9230 typedef enum acamera_metadata_enum_acamera_sensor_reference_illuminant1 {
9231     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT                    = 1,
9232 
9233     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT                 = 2,
9234 
9235     /**
9236      * <p>Incandescent light</p>
9237      */
9238     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN                    = 3,
9239 
9240     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLASH                       = 4,
9241 
9242     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER                = 9,
9243 
9244     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER              = 10,
9245 
9246     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_SHADE                       = 11,
9247 
9248     /**
9249      * <p>D 5700 - 7100K</p>
9250      */
9251     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT        = 12,
9252 
9253     /**
9254      * <p>N 4600 - 5400K</p>
9255      */
9256     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT       = 13,
9257 
9258     /**
9259      * <p>W 3900 - 4500K</p>
9260      */
9261     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT      = 14,
9262 
9263     /**
9264      * <p>WW 3200 - 3700K</p>
9265      */
9266     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT           = 15,
9267 
9268     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A                  = 17,
9269 
9270     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B                  = 18,
9271 
9272     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C                  = 19,
9273 
9274     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D55                         = 20,
9275 
9276     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D65                         = 21,
9277 
9278     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D75                         = 22,
9279 
9280     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D50                         = 23,
9281 
9282     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN         = 24,
9283 
9284 } acamera_metadata_enum_android_sensor_reference_illuminant1_t;
9285 
9286 // ACAMERA_SENSOR_TEST_PATTERN_MODE
9287 typedef enum acamera_metadata_enum_acamera_sensor_test_pattern_mode {
9288     /**
9289      * <p>No test pattern mode is used, and the camera
9290      * device returns captures from the image sensor.</p>
9291      * <p>This is the default if the key is not set.</p>
9292      */
9293     ACAMERA_SENSOR_TEST_PATTERN_MODE_OFF                             = 0,
9294 
9295     /**
9296      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
9297      * respective color channel provided in
9298      * ACAMERA_SENSOR_TEST_PATTERN_DATA.</p>
9299      * <p>For example:</p>
9300      * <pre><code>ACAMERA_SENSOR_TEST_PATTERN_DATA = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
9301      * </code></pre>
9302      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
9303      * <pre><code>ACAMERA_SENSOR_TEST_PATTERN_DATA = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
9304      * </code></pre>
9305      * <p>All red pixels are 100% red. Only the odd green pixels
9306      * are 100% green. All blue pixels are 100% black.</p>
9307      *
9308      * @see ACAMERA_SENSOR_TEST_PATTERN_DATA
9309      */
9310     ACAMERA_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR                     = 1,
9311 
9312     /**
9313      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
9314      * <p>The vertical bars (left-to-right) are as follows:</p>
9315      * <ul>
9316      * <li>100% white</li>
9317      * <li>yellow</li>
9318      * <li>cyan</li>
9319      * <li>green</li>
9320      * <li>magenta</li>
9321      * <li>red</li>
9322      * <li>blue</li>
9323      * <li>black</li>
9324      * </ul>
9325      * <p>In general the image would look like the following:</p>
9326      * <pre><code>W Y C G M R B K
9327      * W Y C G M R B K
9328      * W Y C G M R B K
9329      * W Y C G M R B K
9330      * W Y C G M R B K
9331      * . . . . . . . .
9332      * . . . . . . . .
9333      * . . . . . . . .
9334      *
9335      * (B = Blue, K = Black)
9336      * </code></pre>
9337      * <p>Each bar should take up 1/8 of the sensor pixel array width.
9338      * When this is not possible, the bar size should be rounded
9339      * down to the nearest integer and the pattern can repeat
9340      * on the right side.</p>
9341      * <p>Each bar's height must always take up the full sensor
9342      * pixel array height.</p>
9343      * <p>Each pixel in this test pattern must be set to either
9344      * 0% intensity or 100% intensity.</p>
9345      */
9346     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS                      = 2,
9347 
9348     /**
9349      * <p>The test pattern is similar to COLOR_BARS, except that
9350      * each bar should start at its specified color at the top,
9351      * and fade to gray at the bottom.</p>
9352      * <p>Furthermore each bar is further subdivided into a left and
9353      * right half. The left half should have a smooth gradient,
9354      * and the right half should have a quantized gradient.</p>
9355      * <p>In particular, the right half's should consist of blocks of the
9356      * same color for 1/16th active sensor pixel array width.</p>
9357      * <p>The least significant bits in the quantized gradient should
9358      * be copied from the most significant bits of the smooth gradient.</p>
9359      * <p>The height of each bar should always be a multiple of 128.
9360      * When this is not the case, the pattern should repeat at the bottom
9361      * of the image.</p>
9362      */
9363     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY         = 3,
9364 
9365     /**
9366      * <p>All pixel data is replaced by a pseudo-random sequence
9367      * generated from a PN9 512-bit sequence (typically implemented
9368      * in hardware with a linear feedback shift register).</p>
9369      * <p>The generator should be reset at the beginning of each frame,
9370      * and thus each subsequent raw frame with this test pattern should
9371      * be exactly the same as the last.</p>
9372      */
9373     ACAMERA_SENSOR_TEST_PATTERN_MODE_PN9                             = 4,
9374 
9375     /**
9376      * <p>The first custom test pattern. All custom patterns that are
9377      * available only on this camera device are at least this numeric
9378      * value.</p>
9379      * <p>All of the custom test patterns will be static
9380      * (that is the raw image must not vary from frame to frame).</p>
9381      */
9382     ACAMERA_SENSOR_TEST_PATTERN_MODE_CUSTOM1                         = 256,
9383 
9384 } acamera_metadata_enum_android_sensor_test_pattern_mode_t;
9385 
9386 // ACAMERA_SENSOR_PIXEL_MODE
9387 typedef enum acamera_metadata_enum_acamera_sensor_pixel_mode {
9388     /**
9389      * <p>This is the default sensor pixel mode. This is the only sensor pixel mode
9390      * supported unless a camera device advertises
9391      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>.</p>
9392      */
9393     ACAMERA_SENSOR_PIXEL_MODE_DEFAULT                                = 0,
9394 
9395     /**
9396      * <p>This sensor pixel mode is offered by devices with capability
9397      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>.
9398      * In this mode, sensors typically do not bin pixels, as a result can offer larger
9399      * image sizes.</p>
9400      */
9401     ACAMERA_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION                     = 1,
9402 
9403 } acamera_metadata_enum_android_sensor_pixel_mode_t;
9404 
9405 // ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED
9406 typedef enum acamera_metadata_enum_acamera_sensor_raw_binning_factor_used {
9407     /**
9408      * <p>The <code>RAW</code> targets in this capture have ACAMERA_SENSOR_INFO_BINNING_FACTOR as the
9409      * bayer pattern.</p>
9410      *
9411      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
9412      */
9413     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED_TRUE                      = 0,
9414 
9415     /**
9416      * <p>The <code>RAW</code> targets have a regular bayer pattern in this capture.</p>
9417      */
9418     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED_FALSE                     = 1,
9419 
9420 } acamera_metadata_enum_android_sensor_raw_binning_factor_used_t;
9421 
9422 
9423 // ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
9424 typedef enum acamera_metadata_enum_acamera_sensor_info_color_filter_arrangement {
9425     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB                = 0,
9426 
9427     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG                = 1,
9428 
9429     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG                = 2,
9430 
9431     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR                = 3,
9432 
9433     /**
9434      * <p>Sensor is not Bayer; output has 3 16-bit
9435      * values for each pixel, instead of just 1 16-bit value
9436      * per pixel.</p>
9437      */
9438     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB                 = 4,
9439 
9440     /**
9441      * <p>Sensor doesn't have any Bayer color filter.
9442      * Such sensor captures visible light in monochrome. The exact weighting and
9443      * wavelengths captured is not specified, but generally only includes the visible
9444      * frequencies. This value implies a MONOCHROME camera.</p>
9445      */
9446     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO                = 5,
9447 
9448     /**
9449      * <p>Sensor has a near infrared filter capturing light with wavelength between
9450      * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
9451      * value implies a MONOCHROME camera.</p>
9452      */
9453     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR                 = 6,
9454 
9455 } acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
9456 
9457 // ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
9458 typedef enum acamera_metadata_enum_acamera_sensor_info_timestamp_source {
9459     /**
9460      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in nanoseconds and monotonic, but can
9461      * not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.),
9462      * or other instances of the same or different camera devices in the same system with
9463      * accuracy. However, the timestamps are roughly in the same timebase as
9464      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#uptimeMillis">SystemClock#uptimeMillis</a>.  The accuracy is sufficient for tasks
9465      * like A/V synchronization for video recording, at least, and the timestamps can be
9466      * directly used together with timestamps from the audio subsystem for that task.</p>
9467      * <p>Timestamps between streams and results for a single camera instance are comparable,
9468      * and the timestamps for all buffers and the result metadata generated by a single
9469      * capture are identical.</p>
9470      *
9471      * @see ACAMERA_SENSOR_TIMESTAMP
9472      */
9473     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN                     = 0,
9474 
9475     /**
9476      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in the same timebase as
9477      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">SystemClock#elapsedRealtimeNanos</a>,
9478      * and they can be compared to other timestamps using that base.</p>
9479      * <p>When buffers from a REALTIME device are passed directly to a video encoder from the
9480      * camera, automatic compensation is done to account for differing timebases of the
9481      * audio and camera subsystems.  If the application is receiving buffers and then later
9482      * sending them to a video encoder or other application where they are compared with
9483      * audio subsystem timestamps or similar, this compensation is not present.  In those
9484      * 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
9485      * offset between the two sources can be measured once per active session and applied
9486      * to timestamps for sufficient accuracy for A/V sync.</p>
9487      *
9488      * @see ACAMERA_SENSOR_TIMESTAMP
9489      */
9490     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME                    = 1,
9491 
9492 } acamera_metadata_enum_android_sensor_info_timestamp_source_t;
9493 
9494 // ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
9495 typedef enum acamera_metadata_enum_acamera_sensor_info_lens_shading_applied {
9496     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE                   = 0,
9497 
9498     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE                    = 1,
9499 
9500 } acamera_metadata_enum_android_sensor_info_lens_shading_applied_t;
9501 
9502 
9503 // ACAMERA_SHADING_MODE
9504 typedef enum acamera_metadata_enum_acamera_shading_mode {
9505     /**
9506      * <p>No lens shading correction is applied.</p>
9507      */
9508     ACAMERA_SHADING_MODE_OFF                                         = 0,
9509 
9510     /**
9511      * <p>Apply lens shading corrections, without slowing
9512      * frame rate relative to sensor raw output</p>
9513      */
9514     ACAMERA_SHADING_MODE_FAST                                        = 1,
9515 
9516     /**
9517      * <p>Apply high-quality lens shading correction, at the
9518      * cost of possibly reduced frame rate.</p>
9519      */
9520     ACAMERA_SHADING_MODE_HIGH_QUALITY                                = 2,
9521 
9522 } acamera_metadata_enum_android_shading_mode_t;
9523 
9524 
9525 // ACAMERA_STATISTICS_FACE_DETECT_MODE
9526 typedef enum acamera_metadata_enum_acamera_statistics_face_detect_mode {
9527     /**
9528      * <p>Do not include face detection statistics in capture
9529      * results.</p>
9530      */
9531     ACAMERA_STATISTICS_FACE_DETECT_MODE_OFF                          = 0,
9532 
9533     /**
9534      * <p>Return face rectangle and confidence values only.</p>
9535      */
9536     ACAMERA_STATISTICS_FACE_DETECT_MODE_SIMPLE                       = 1,
9537 
9538     /**
9539      * <p>Return all face
9540      * metadata.</p>
9541      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
9542      */
9543     ACAMERA_STATISTICS_FACE_DETECT_MODE_FULL                         = 2,
9544 
9545 } acamera_metadata_enum_android_statistics_face_detect_mode_t;
9546 
9547 // ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
9548 typedef enum acamera_metadata_enum_acamera_statistics_hot_pixel_map_mode {
9549     /**
9550      * <p>Hot pixel map production is disabled.</p>
9551      */
9552     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_OFF                        = 0,
9553 
9554     /**
9555      * <p>Hot pixel map production is enabled.</p>
9556      */
9557     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_ON                         = 1,
9558 
9559 } acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t;
9560 
9561 // ACAMERA_STATISTICS_SCENE_FLICKER
9562 typedef enum acamera_metadata_enum_acamera_statistics_scene_flicker {
9563     /**
9564      * <p>The camera device does not detect any flickering illumination
9565      * in the current scene.</p>
9566      */
9567     ACAMERA_STATISTICS_SCENE_FLICKER_NONE                            = 0,
9568 
9569     /**
9570      * <p>The camera device detects illumination flickering at 50Hz
9571      * in the current scene.</p>
9572      */
9573     ACAMERA_STATISTICS_SCENE_FLICKER_50HZ                            = 1,
9574 
9575     /**
9576      * <p>The camera device detects illumination flickering at 60Hz
9577      * in the current scene.</p>
9578      */
9579     ACAMERA_STATISTICS_SCENE_FLICKER_60HZ                            = 2,
9580 
9581 } acamera_metadata_enum_android_statistics_scene_flicker_t;
9582 
9583 // ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
9584 typedef enum acamera_metadata_enum_acamera_statistics_lens_shading_map_mode {
9585     /**
9586      * <p>Do not include a lens shading map in the capture result.</p>
9587      */
9588     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_OFF                     = 0,
9589 
9590     /**
9591      * <p>Include a lens shading map in the capture result.</p>
9592      */
9593     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_ON                      = 1,
9594 
9595 } acamera_metadata_enum_android_statistics_lens_shading_map_mode_t;
9596 
9597 // ACAMERA_STATISTICS_OIS_DATA_MODE
9598 typedef enum acamera_metadata_enum_acamera_statistics_ois_data_mode {
9599     /**
9600      * <p>Do not include OIS data in the capture result.</p>
9601      */
9602     ACAMERA_STATISTICS_OIS_DATA_MODE_OFF                             = 0,
9603 
9604     /**
9605      * <p>Include OIS data in the capture result.</p>
9606      * <p>ACAMERA_STATISTICS_OIS_TIMESTAMPS, ACAMERA_STATISTICS_OIS_X_SHIFTS,
9607      * and ACAMERA_STATISTICS_OIS_Y_SHIFTS provide OIS data in the output result metadata.</p>
9608      *
9609      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
9610      * @see ACAMERA_STATISTICS_OIS_X_SHIFTS
9611      * @see ACAMERA_STATISTICS_OIS_Y_SHIFTS
9612      */
9613     ACAMERA_STATISTICS_OIS_DATA_MODE_ON                              = 1,
9614 
9615 } acamera_metadata_enum_android_statistics_ois_data_mode_t;
9616 
9617 
9618 
9619 // ACAMERA_TONEMAP_MODE
9620 typedef enum acamera_metadata_enum_acamera_tonemap_mode {
9621     /**
9622      * <p>Use the tone mapping curve specified in
9623      * the ACAMERA_TONEMAPCURVE_* entries.</p>
9624      * <p>All color enhancement and tonemapping must be disabled, except
9625      * for applying the tonemapping curve specified by
9626      * android.tonemap.curve.</p>
9627      * <p>Must not slow down frame rate relative to raw
9628      * sensor output.</p>
9629      */
9630     ACAMERA_TONEMAP_MODE_CONTRAST_CURVE                              = 0,
9631 
9632     /**
9633      * <p>Advanced gamma mapping and color enhancement may be applied, without
9634      * reducing frame rate compared to raw sensor output.</p>
9635      */
9636     ACAMERA_TONEMAP_MODE_FAST                                        = 1,
9637 
9638     /**
9639      * <p>High-quality gamma mapping and color enhancement will be applied, at
9640      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
9641      */
9642     ACAMERA_TONEMAP_MODE_HIGH_QUALITY                                = 2,
9643 
9644     /**
9645      * <p>Use the gamma value specified in ACAMERA_TONEMAP_GAMMA to peform
9646      * tonemapping.</p>
9647      * <p>All color enhancement and tonemapping must be disabled, except
9648      * for applying the tonemapping curve specified by ACAMERA_TONEMAP_GAMMA.</p>
9649      * <p>Must not slow down frame rate relative to raw sensor output.</p>
9650      *
9651      * @see ACAMERA_TONEMAP_GAMMA
9652      */
9653     ACAMERA_TONEMAP_MODE_GAMMA_VALUE                                 = 3,
9654 
9655     /**
9656      * <p>Use the preset tonemapping curve specified in
9657      * ACAMERA_TONEMAP_PRESET_CURVE to peform tonemapping.</p>
9658      * <p>All color enhancement and tonemapping must be disabled, except
9659      * for applying the tonemapping curve specified by
9660      * ACAMERA_TONEMAP_PRESET_CURVE.</p>
9661      * <p>Must not slow down frame rate relative to raw sensor output.</p>
9662      *
9663      * @see ACAMERA_TONEMAP_PRESET_CURVE
9664      */
9665     ACAMERA_TONEMAP_MODE_PRESET_CURVE                                = 4,
9666 
9667 } acamera_metadata_enum_android_tonemap_mode_t;
9668 
9669 // ACAMERA_TONEMAP_PRESET_CURVE
9670 typedef enum acamera_metadata_enum_acamera_tonemap_preset_curve {
9671     /**
9672      * <p>Tonemapping curve is defined by sRGB</p>
9673      */
9674     ACAMERA_TONEMAP_PRESET_CURVE_SRGB                                = 0,
9675 
9676     /**
9677      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
9678      */
9679     ACAMERA_TONEMAP_PRESET_CURVE_REC709                              = 1,
9680 
9681 } acamera_metadata_enum_android_tonemap_preset_curve_t;
9682 
9683 
9684 
9685 // ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
9686 typedef enum acamera_metadata_enum_acamera_info_supported_hardware_level {
9687     /**
9688      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
9689      * better.</p>
9690      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
9691      * {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
9692      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
9693      * support for color image capture. The only exception is that the device may
9694      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
9695      * measurements and not color images.</p>
9696      * <p><code>LIMITED</code> devices and above require the use of ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
9697      * to lock exposure metering (and calculate flash power, for cameras with flash) before
9698      * capturing a high-quality still image.</p>
9699      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
9700      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
9701      * supported for ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AF_MODE, or
9702      * ACAMERA_CONTROL_AWB_MODE)</p>
9703      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
9704      * can be checked for in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
9705      *
9706      * @see ACAMERA_CONTROL_AE_MODE
9707      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
9708      * @see ACAMERA_CONTROL_AF_MODE
9709      * @see ACAMERA_CONTROL_AWB_MODE
9710      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9711      */
9712     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED                    = 0,
9713 
9714     /**
9715      * <p>This camera device is capable of supporting advanced imaging applications.</p>
9716      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
9717      * {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
9718      * <p>A <code>FULL</code> device will support below capabilities:</p>
9719      * <ul>
9720      * <li><code>BURST_CAPTURE</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
9721      *   <code>BURST_CAPTURE</code>)</li>
9722      * <li>Per frame control (ACAMERA_SYNC_MAX_LATENCY <code>==</code> PER_FRAME_CONTROL)</li>
9723      * <li>Manual sensor control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains <code>MANUAL_SENSOR</code>)</li>
9724      * <li>Manual post-processing control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
9725      *   <code>MANUAL_POST_PROCESSING</code>)</li>
9726      * <li>The required exposure time range defined in ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
9727      * <li>The required maxFrameDuration defined in ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
9728      * </ul>
9729      * <p>Note:
9730      * Pre-API level 23, FULL devices also supported arbitrary cropping region
9731      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>); this requirement was relaxed in API level
9732      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
9733      *
9734      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9735      * @see ACAMERA_SCALER_CROPPING_TYPE
9736      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
9737      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
9738      * @see ACAMERA_SYNC_MAX_LATENCY
9739      */
9740     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_FULL                       = 1,
9741 
9742     /**
9743      * <p>This camera device is running in backward compatibility mode.</p>
9744      * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are supported.</p>
9745      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
9746      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
9747      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
9748      * <code>LEGACY</code> device in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
9749      * <p>In addition, the ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is not functional on <code>LEGACY</code>
9750      * devices. Instead, every request that includes a JPEG-format output target is treated
9751      * as triggering a still capture, internally executing a precapture trigger.  This may
9752      * fire the flash for flash power metering during precapture, and then fire the flash
9753      * for the final capture, if a flash is available on the device and the AE mode is set to
9754      * enable the flash.</p>
9755      * <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>
9756      *
9757      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
9758      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9759      */
9760     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY                     = 2,
9761 
9762     /**
9763      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
9764      * FULL-level capabilities.</p>
9765      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
9766      * <code>LIMITED</code> tables in the {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
9767      * <p>The following additional capabilities are guaranteed to be supported:</p>
9768      * <ul>
9769      * <li><code>YUV_REPROCESSING</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
9770      *   <code>YUV_REPROCESSING</code>)</li>
9771      * <li><code>RAW</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
9772      *   <code>RAW</code>)</li>
9773      * </ul>
9774      *
9775      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9776      */
9777     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_3                          = 3,
9778 
9779     /**
9780      * <p>This camera device is backed by an external camera connected to this Android device.</p>
9781      * <p>The device has capability identical to a LIMITED level device, with the following
9782      * exceptions:</p>
9783      * <ul>
9784      * <li>The device may not report lens/sensor related information such as<ul>
9785      * <li>ACAMERA_LENS_FOCAL_LENGTH</li>
9786      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
9787      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
9788      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
9789      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
9790      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
9791      * <li>ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW</li>
9792      * </ul>
9793      * </li>
9794      * <li>The device will report 0 for ACAMERA_SENSOR_ORIENTATION</li>
9795      * <li>The device has less guarantee on stable framerate, as the framerate partly depends
9796      *   on the external camera being used.</li>
9797      * </ul>
9798      *
9799      * @see ACAMERA_LENS_FOCAL_LENGTH
9800      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
9801      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
9802      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
9803      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
9804      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
9805      * @see ACAMERA_SENSOR_ORIENTATION
9806      * @see ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW
9807      */
9808     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL                   = 4,
9809 
9810 } acamera_metadata_enum_android_info_supported_hardware_level_t;
9811 
9812 
9813 // ACAMERA_BLACK_LEVEL_LOCK
9814 typedef enum acamera_metadata_enum_acamera_black_level_lock {
9815     ACAMERA_BLACK_LEVEL_LOCK_OFF                                     = 0,
9816 
9817     ACAMERA_BLACK_LEVEL_LOCK_ON                                      = 1,
9818 
9819 } acamera_metadata_enum_android_black_level_lock_t;
9820 
9821 
9822 // ACAMERA_SYNC_FRAME_NUMBER
9823 typedef enum acamera_metadata_enum_acamera_sync_frame_number {
9824     /**
9825      * <p>The current result is not yet fully synchronized to any request.</p>
9826      * <p>Synchronization is in progress, and reading metadata from this
9827      * result may include a mix of data that have taken effect since the
9828      * last synchronization time.</p>
9829      * <p>In some future result, within ACAMERA_SYNC_MAX_LATENCY frames,
9830      * this value will update to the actual frame number frame number
9831      * the result is guaranteed to be synchronized to (as long as the
9832      * request settings remain constant).</p>
9833      *
9834      * @see ACAMERA_SYNC_MAX_LATENCY
9835      */
9836     ACAMERA_SYNC_FRAME_NUMBER_CONVERGING                             = -1,
9837 
9838     /**
9839      * <p>The current result's synchronization status is unknown.</p>
9840      * <p>The result may have already converged, or it may be in
9841      * progress.  Reading from this result may include some mix
9842      * of settings from past requests.</p>
9843      * <p>After a settings change, the new settings will eventually all
9844      * take effect for the output buffers and results. However, this
9845      * value will not change when that happens. Altering settings
9846      * rapidly may provide outcomes using mixes of settings from recent
9847      * requests.</p>
9848      * <p>This value is intended primarily for backwards compatibility with
9849      * the older camera implementations (for android.hardware.Camera).</p>
9850      */
9851     ACAMERA_SYNC_FRAME_NUMBER_UNKNOWN                                = -2,
9852 
9853 } acamera_metadata_enum_android_sync_frame_number_t;
9854 
9855 // ACAMERA_SYNC_MAX_LATENCY
9856 typedef enum acamera_metadata_enum_acamera_sync_max_latency {
9857     /**
9858      * <p>Every frame has the requests immediately applied.</p>
9859      * <p>Changing controls over multiple requests one after another will
9860      * produce results that have those controls applied atomically
9861      * each frame.</p>
9862      * <p>All FULL capability devices will have this as their maxLatency.</p>
9863      */
9864     ACAMERA_SYNC_MAX_LATENCY_PER_FRAME_CONTROL                       = 0,
9865 
9866     /**
9867      * <p>Each new frame has some subset (potentially the entire set)
9868      * of the past requests applied to the camera settings.</p>
9869      * <p>By submitting a series of identical requests, the camera device
9870      * will eventually have the camera settings applied, but it is
9871      * unknown when that exact point will be.</p>
9872      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
9873      */
9874     ACAMERA_SYNC_MAX_LATENCY_UNKNOWN                                 = -1,
9875 
9876 } acamera_metadata_enum_android_sync_max_latency_t;
9877 
9878 
9879 
9880 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
9881 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations {
9882     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT       = 0,
9883 
9884     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT        = 1,
9885 
9886 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_t;
9887 
9888 // ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
9889 typedef enum acamera_metadata_enum_acamera_depth_depth_is_exclusive {
9890     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE                           = 0,
9891 
9892     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE                            = 1,
9893 
9894 } acamera_metadata_enum_android_depth_depth_is_exclusive_t;
9895 
9896 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
9897 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations {
9898     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT
9899                                                                       = 0,
9900 
9901     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT
9902                                                                       = 1,
9903 
9904 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t;
9905 
9906 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
9907 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations_maximum_resolution {
9908     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
9909                                                                       = 0,
9910 
9911     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
9912                                                                       = 1,
9913 
9914 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t;
9915 
9916 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
9917 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations_maximum_resolution {
9918     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
9919                                                                       = 0,
9920 
9921     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
9922                                                                       = 1,
9923 
9924 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t;
9925 
9926 
9927 // ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
9928 typedef enum acamera_metadata_enum_acamera_logical_multi_camera_sensor_sync_type {
9929     /**
9930      * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
9931      * the timestamp of an image from a physical stream is only an approximation of the
9932      * image sensor start-of-exposure time.</p>
9933      */
9934     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE        = 0,
9935 
9936     /**
9937      * <p>The camera device supports frame timestamp synchronization at the hardware level,
9938      * and the timestamp of a physical stream image accurately reflects its
9939      * start-of-exposure time.</p>
9940      */
9941     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED         = 1,
9942 
9943 } acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t;
9944 
9945 
9946 // ACAMERA_DISTORTION_CORRECTION_MODE
9947 typedef enum acamera_metadata_enum_acamera_distortion_correction_mode {
9948     /**
9949      * <p>No distortion correction is applied.</p>
9950      */
9951     ACAMERA_DISTORTION_CORRECTION_MODE_OFF                           = 0,
9952 
9953     /**
9954      * <p>Lens distortion correction is applied without reducing frame rate
9955      * relative to sensor output. It may be the same as OFF if distortion correction would
9956      * reduce frame rate relative to sensor.</p>
9957      */
9958     ACAMERA_DISTORTION_CORRECTION_MODE_FAST                          = 1,
9959 
9960     /**
9961      * <p>High-quality distortion correction is applied, at the cost of
9962      * possibly reduced frame rate relative to sensor output.</p>
9963      */
9964     ACAMERA_DISTORTION_CORRECTION_MODE_HIGH_QUALITY                  = 2,
9965 
9966 } acamera_metadata_enum_android_distortion_correction_mode_t;
9967 
9968 
9969 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
9970 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations {
9971     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT         = 0,
9972 
9973     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT          = 1,
9974 
9975 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_t;
9976 
9977 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
9978 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations_maximum_resolution {
9979     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
9980                                                                       = 0,
9981 
9982     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
9983                                                                       = 1,
9984 
9985 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t;
9986 
9987 
9988 
9989 
9990 __END_DECLS
9991 
9992 #endif /* _NDK_CAMERA_METADATA_TAGS_H */
9993 
9994 /** @} */
9995