• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_AUTOMOTIVE,
76     ACAMERA_AUTOMOTIVE_LENS,
77     ACAMERA_SECTION_COUNT,
78 
79     ACAMERA_VENDOR = 0x8000
80 } acamera_metadata_section_t;
81 
82 /**
83  * Hierarchy positions in enum space.
84  */
85 typedef enum acamera_metadata_section_start {
86     ACAMERA_COLOR_CORRECTION_START = ACAMERA_COLOR_CORRECTION  << 16,
87     ACAMERA_CONTROL_START          = ACAMERA_CONTROL           << 16,
88     ACAMERA_DEMOSAIC_START         = ACAMERA_DEMOSAIC          << 16,
89     ACAMERA_EDGE_START             = ACAMERA_EDGE              << 16,
90     ACAMERA_FLASH_START            = ACAMERA_FLASH             << 16,
91     ACAMERA_FLASH_INFO_START       = ACAMERA_FLASH_INFO        << 16,
92     ACAMERA_HOT_PIXEL_START        = ACAMERA_HOT_PIXEL         << 16,
93     ACAMERA_JPEG_START             = ACAMERA_JPEG              << 16,
94     ACAMERA_LENS_START             = ACAMERA_LENS              << 16,
95     ACAMERA_LENS_INFO_START        = ACAMERA_LENS_INFO         << 16,
96     ACAMERA_NOISE_REDUCTION_START  = ACAMERA_NOISE_REDUCTION   << 16,
97     ACAMERA_QUIRKS_START           = ACAMERA_QUIRKS            << 16,
98     ACAMERA_REQUEST_START          = ACAMERA_REQUEST           << 16,
99     ACAMERA_SCALER_START           = ACAMERA_SCALER            << 16,
100     ACAMERA_SENSOR_START           = ACAMERA_SENSOR            << 16,
101     ACAMERA_SENSOR_INFO_START      = ACAMERA_SENSOR_INFO       << 16,
102     ACAMERA_SHADING_START          = ACAMERA_SHADING           << 16,
103     ACAMERA_STATISTICS_START       = ACAMERA_STATISTICS        << 16,
104     ACAMERA_STATISTICS_INFO_START  = ACAMERA_STATISTICS_INFO   << 16,
105     ACAMERA_TONEMAP_START          = ACAMERA_TONEMAP           << 16,
106     ACAMERA_LED_START              = ACAMERA_LED               << 16,
107     ACAMERA_INFO_START             = ACAMERA_INFO              << 16,
108     ACAMERA_BLACK_LEVEL_START      = ACAMERA_BLACK_LEVEL       << 16,
109     ACAMERA_SYNC_START             = ACAMERA_SYNC              << 16,
110     ACAMERA_REPROCESS_START        = ACAMERA_REPROCESS         << 16,
111     ACAMERA_DEPTH_START            = ACAMERA_DEPTH             << 16,
112     ACAMERA_LOGICAL_MULTI_CAMERA_START
113                                    = ACAMERA_LOGICAL_MULTI_CAMERA
114                                                                 << 16,
115     ACAMERA_DISTORTION_CORRECTION_START
116                                    = ACAMERA_DISTORTION_CORRECTION
117                                                                 << 16,
118     ACAMERA_HEIC_START             = ACAMERA_HEIC              << 16,
119     ACAMERA_HEIC_INFO_START        = ACAMERA_HEIC_INFO         << 16,
120     ACAMERA_AUTOMOTIVE_START       = ACAMERA_AUTOMOTIVE        << 16,
121     ACAMERA_AUTOMOTIVE_LENS_START  = ACAMERA_AUTOMOTIVE_LENS   << 16,
122     ACAMERA_VENDOR_START           = ACAMERA_VENDOR            << 16
123 } acamera_metadata_section_start_t;
124 
125 /**
126  * Main enum for camera metadata tags.
127  */
128 typedef enum acamera_metadata_tag {
129     /**
130      * <p>The mode control selects how the image data is converted from the
131      * sensor's native color into linear sRGB color.</p>
132      *
133      * <p>Type: byte (acamera_metadata_enum_android_color_correction_mode_t)</p>
134      *
135      * <p>This tag may appear in:
136      * <ul>
137      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
138      *   <li>ACaptureRequest</li>
139      * </ul></p>
140      *
141      * <p>When auto-white balance (AWB) is enabled with ACAMERA_CONTROL_AWB_MODE, this
142      * control is overridden by the AWB routine. When AWB is disabled, the
143      * application controls how the color mapping is performed.</p>
144      * <p>We define the expected processing pipeline below. For consistency
145      * across devices, this is always the case with TRANSFORM_MATRIX.</p>
146      * <p>When either FAST or HIGH_QUALITY is used, the camera device may
147      * do additional processing but ACAMERA_COLOR_CORRECTION_GAINS and
148      * ACAMERA_COLOR_CORRECTION_TRANSFORM will still be provided by the
149      * camera device (in the results) and be roughly correct.</p>
150      * <p>Switching to TRANSFORM_MATRIX and using the data provided from
151      * FAST or HIGH_QUALITY will yield a picture with the same white point
152      * as what was produced by the camera device in the earlier frame.</p>
153      * <p>The expected processing pipeline is as follows:</p>
154      * <p><img alt="White balance processing pipeline" src="../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
155      * <p>The white balance is encoded by two values, a 4-channel white-balance
156      * gain vector (applied in the Bayer domain), and a 3x3 color transform
157      * matrix (applied after demosaic).</p>
158      * <p>The 4-channel white-balance gains are defined as:</p>
159      * <pre><code>ACAMERA_COLOR_CORRECTION_GAINS = [ R G_even G_odd B ]
160      * </code></pre>
161      * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
162      * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
163      * These may be identical for a given camera device implementation; if
164      * the camera device does not support a separate gain for even/odd green
165      * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
166      * <code>G_even</code> in the output result metadata.</p>
167      * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
168      * <pre><code>ACAMERA_COLOR_CORRECTION_TRANSFORM = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
169      * </code></pre>
170      * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
171      * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
172      * <p>with colors as follows:</p>
173      * <pre><code>r' = I0r + I1g + I2b
174      * g' = I3r + I4g + I5b
175      * b' = I6r + I7g + I8b
176      * </code></pre>
177      * <p>Both the input and output value ranges must match. Overflow/underflow
178      * values are clipped to fit within the range.</p>
179      *
180      * @see ACAMERA_COLOR_CORRECTION_GAINS
181      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
182      * @see ACAMERA_CONTROL_AWB_MODE
183      */
184     ACAMERA_COLOR_CORRECTION_MODE =                             // byte (acamera_metadata_enum_android_color_correction_mode_t)
185             ACAMERA_COLOR_CORRECTION_START,
186     /**
187      * <p>A color transform matrix to use to transform
188      * from sensor RGB color space to output linear sRGB color space.</p>
189      *
190      * <p>Type: rational[3*3]</p>
191      *
192      * <p>This tag may appear in:
193      * <ul>
194      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
195      *   <li>ACaptureRequest</li>
196      * </ul></p>
197      *
198      * <p>This matrix is either set by the camera device when the request
199      * ACAMERA_COLOR_CORRECTION_MODE is not TRANSFORM_MATRIX, or
200      * directly by the application in the request when the
201      * ACAMERA_COLOR_CORRECTION_MODE is TRANSFORM_MATRIX.</p>
202      * <p>In the latter case, the camera device may round the matrix to account
203      * for precision issues; the final rounded matrix should be reported back
204      * in this matrix result metadata. The transform should keep the magnitude
205      * of the output color values within <code>[0, 1.0]</code> (assuming input color
206      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
207      * <p>The valid range of each matrix element varies on different devices, but
208      * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
209      *
210      * @see ACAMERA_COLOR_CORRECTION_MODE
211      */
212     ACAMERA_COLOR_CORRECTION_TRANSFORM =                        // rational[3*3]
213             ACAMERA_COLOR_CORRECTION_START + 1,
214     /**
215      * <p>Gains applying to Bayer raw color channels for
216      * white-balance.</p>
217      *
218      * <p>Type: float[4]</p>
219      *
220      * <p>This tag may appear in:
221      * <ul>
222      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
223      *   <li>ACaptureRequest</li>
224      * </ul></p>
225      *
226      * <p>These per-channel gains are either set by the camera device
227      * when the request ACAMERA_COLOR_CORRECTION_MODE is not
228      * TRANSFORM_MATRIX, or directly by the application in the
229      * request when the ACAMERA_COLOR_CORRECTION_MODE is
230      * TRANSFORM_MATRIX.</p>
231      * <p>The gains in the result metadata are the gains actually
232      * applied by the camera device to the current frame.</p>
233      * <p>The valid range of gains varies on different devices, but gains
234      * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
235      * device allows gains below 1.0, this is usually not recommended because
236      * this can create color artifacts.</p>
237      *
238      * @see ACAMERA_COLOR_CORRECTION_MODE
239      */
240     ACAMERA_COLOR_CORRECTION_GAINS =                            // float[4]
241             ACAMERA_COLOR_CORRECTION_START + 2,
242     /**
243      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
244      *
245      * <p>Type: byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)</p>
246      *
247      * <p>This tag may appear in:
248      * <ul>
249      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
250      *   <li>ACaptureRequest</li>
251      * </ul></p>
252      *
253      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
254      * can not focus on the same point after exiting from the lens. This metadata defines
255      * the high level control of chromatic aberration correction algorithm, which aims to
256      * minimize the chromatic artifacts that may occur along the object boundaries in an
257      * image.</p>
258      * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
259      * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
260      * use the highest-quality aberration correction algorithms, even if it slows down
261      * capture rate. FAST means the camera device will not slow down capture rate when
262      * applying aberration correction.</p>
263      * <p>LEGACY devices will always be in FAST mode.</p>
264      */
265     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE =                  // byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)
266             ACAMERA_COLOR_CORRECTION_START + 3,
267     /**
268      * <p>List of aberration correction modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE that are
269      * supported by this camera device.</p>
270      *
271      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
272      *
273      * <p>Type: byte[n]</p>
274      *
275      * <p>This tag may appear in:
276      * <ul>
277      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
278      * </ul></p>
279      *
280      * <p>This key lists the valid modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE.  If no
281      * aberration correction modes are available for a device, this list will solely include
282      * OFF mode. All camera devices will support either OFF or FAST mode.</p>
283      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
284      * OFF mode. This includes all FULL level devices.</p>
285      * <p>LEGACY devices will always only support FAST mode.</p>
286      *
287      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
288      */
289     ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =       // byte[n]
290             ACAMERA_COLOR_CORRECTION_START + 4,
291     ACAMERA_COLOR_CORRECTION_END,
292 
293     /**
294      * <p>The desired setting for the camera device's auto-exposure
295      * algorithm's antibanding compensation.</p>
296      *
297      * <p>Type: byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)</p>
298      *
299      * <p>This tag may appear in:
300      * <ul>
301      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
302      *   <li>ACaptureRequest</li>
303      * </ul></p>
304      *
305      * <p>Some kinds of lighting fixtures, such as some fluorescent
306      * lights, flicker at the rate of the power supply frequency
307      * (60Hz or 50Hz, depending on country). While this is
308      * typically not noticeable to a person, it can be visible to
309      * a camera device. If a camera sets its exposure time to the
310      * wrong value, the flicker may become visible in the
311      * viewfinder as flicker or in a final captured image, as a
312      * set of variable-brightness bands across the image.</p>
313      * <p>Therefore, the auto-exposure routines of camera devices
314      * include antibanding routines that ensure that the chosen
315      * exposure value will not cause such banding. The choice of
316      * exposure time depends on the rate of flicker, which the
317      * camera device can detect automatically, or the expected
318      * rate can be selected by the application using this
319      * control.</p>
320      * <p>A given camera device may not support all of the possible
321      * options for the antibanding mode. The
322      * ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES key contains
323      * the available modes for a given camera device.</p>
324      * <p>AUTO mode is the default if it is available on given
325      * camera device. When AUTO mode is not available, the
326      * default will be either 50HZ or 60HZ, and both 50HZ
327      * and 60HZ will be available.</p>
328      * <p>If manual exposure control is enabled (by setting
329      * ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE to OFF),
330      * then this setting has no effect, and the application must
331      * ensure it selects exposure times that do not cause banding
332      * issues. The ACAMERA_STATISTICS_SCENE_FLICKER key can assist
333      * the application in this.</p>
334      *
335      * @see ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
336      * @see ACAMERA_CONTROL_AE_MODE
337      * @see ACAMERA_CONTROL_MODE
338      * @see ACAMERA_STATISTICS_SCENE_FLICKER
339      */
340     ACAMERA_CONTROL_AE_ANTIBANDING_MODE =                       // byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)
341             ACAMERA_CONTROL_START,
342     /**
343      * <p>Adjustment to auto-exposure (AE) target image
344      * brightness.</p>
345      *
346      * <p>Type: int32</p>
347      *
348      * <p>This tag may appear in:
349      * <ul>
350      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
351      *   <li>ACaptureRequest</li>
352      * </ul></p>
353      *
354      * <p>The adjustment is measured as a count of steps, with the
355      * step size defined by ACAMERA_CONTROL_AE_COMPENSATION_STEP and the
356      * allowed range by ACAMERA_CONTROL_AE_COMPENSATION_RANGE.</p>
357      * <p>For example, if the exposure value (EV) step is 0.333, '6'
358      * will mean an exposure compensation of +2 EV; -3 will mean an
359      * exposure compensation of -1 EV. One EV represents a doubling
360      * of image brightness. Note that this control will only be
361      * effective if ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF. This control
362      * will take effect even when ACAMERA_CONTROL_AE_LOCK <code>== true</code>.</p>
363      * <p>In the event of exposure compensation value being changed, camera device
364      * may take several frames to reach the newly requested exposure target.
365      * During that time, ACAMERA_CONTROL_AE_STATE field will be in the SEARCHING
366      * state. Once the new exposure target is reached, ACAMERA_CONTROL_AE_STATE will
367      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
368      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
369      *
370      * @see ACAMERA_CONTROL_AE_COMPENSATION_RANGE
371      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
372      * @see ACAMERA_CONTROL_AE_LOCK
373      * @see ACAMERA_CONTROL_AE_MODE
374      * @see ACAMERA_CONTROL_AE_STATE
375      */
376     ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION =                  // int32
377             ACAMERA_CONTROL_START + 1,
378     /**
379      * <p>Whether auto-exposure (AE) is currently locked to its latest
380      * calculated values.</p>
381      *
382      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_t)</p>
383      *
384      * <p>This tag may appear in:
385      * <ul>
386      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
387      *   <li>ACaptureRequest</li>
388      * </ul></p>
389      *
390      * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
391      * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
392      * <p>Note that even when AE is locked, the flash may be fired if
393      * the ACAMERA_CONTROL_AE_MODE is ON_AUTO_FLASH /
394      * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
395      * <p>When ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION is changed, even if the AE lock
396      * is ON, the camera device will still adjust its exposure value.</p>
397      * <p>If AE precapture is triggered (see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER)
398      * when AE is already locked, the camera device will not change the exposure time
399      * (ACAMERA_SENSOR_EXPOSURE_TIME) and sensitivity (ACAMERA_SENSOR_SENSITIVITY)
400      * parameters. The flash may be fired if the ACAMERA_CONTROL_AE_MODE
401      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
402      * ACAMERA_CONTROL_AE_MODE is ON_ALWAYS_FLASH, the scene may become overexposed.
403      * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
404      * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
405      * the AE if AE is locked by the camera device internally during precapture metering
406      * sequence In other words, submitting requests with AE unlock has no effect for an
407      * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
408      * will never succeed in a sequence of preview requests where AE lock is always set
409      * to <code>false</code>.</p>
410      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
411      * get locked do not necessarily correspond to the settings that were present in the
412      * latest capture result received from the camera device, since additional captures
413      * and AE updates may have occurred even before the result was sent out. If an
414      * application is switching between automatic and manual control and wishes to eliminate
415      * any flicker during the switch, the following procedure is recommended:</p>
416      * <ol>
417      * <li>Starting in auto-AE mode:</li>
418      * <li>Lock AE</li>
419      * <li>Wait for the first result to be output that has the AE locked</li>
420      * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
421      * <li>Submit the capture request, proceed to run manual AE as desired.</li>
422      * </ol>
423      * <p>See ACAMERA_CONTROL_AE_STATE for AE lock related state transition details.</p>
424      *
425      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
426      * @see ACAMERA_CONTROL_AE_MODE
427      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
428      * @see ACAMERA_CONTROL_AE_STATE
429      * @see ACAMERA_SENSOR_EXPOSURE_TIME
430      * @see ACAMERA_SENSOR_SENSITIVITY
431      */
432     ACAMERA_CONTROL_AE_LOCK =                                   // byte (acamera_metadata_enum_android_control_ae_lock_t)
433             ACAMERA_CONTROL_START + 2,
434     /**
435      * <p>The desired mode for the camera device's
436      * auto-exposure routine.</p>
437      *
438      * <p>Type: byte (acamera_metadata_enum_android_control_ae_mode_t)</p>
439      *
440      * <p>This tag may appear in:
441      * <ul>
442      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
443      *   <li>ACaptureRequest</li>
444      * </ul></p>
445      *
446      * <p>This control is only effective if ACAMERA_CONTROL_MODE is
447      * AUTO.</p>
448      * <p>When set to any of the ON modes, the camera device's
449      * auto-exposure routine is enabled, overriding the
450      * application's selected exposure time, sensor sensitivity,
451      * and frame duration (ACAMERA_SENSOR_EXPOSURE_TIME,
452      * ACAMERA_SENSOR_SENSITIVITY, and
453      * ACAMERA_SENSOR_FRAME_DURATION). If one of the FLASH modes
454      * is selected, the camera device's flash unit controls are
455      * also overridden.</p>
456      * <p>The FLASH modes are only available if the camera device
457      * has a flash unit (ACAMERA_FLASH_INFO_AVAILABLE is <code>true</code>).</p>
458      * <p>If flash TORCH mode is desired, this field must be set to
459      * ON or OFF, and ACAMERA_FLASH_MODE set to TORCH.</p>
460      * <p>When set to any of the ON modes, the values chosen by the
461      * camera device auto-exposure routine for the overridden
462      * fields for a given capture will be available in its
463      * CaptureResult.</p>
464      *
465      * @see ACAMERA_CONTROL_MODE
466      * @see ACAMERA_FLASH_INFO_AVAILABLE
467      * @see ACAMERA_FLASH_MODE
468      * @see ACAMERA_SENSOR_EXPOSURE_TIME
469      * @see ACAMERA_SENSOR_FRAME_DURATION
470      * @see ACAMERA_SENSOR_SENSITIVITY
471      */
472     ACAMERA_CONTROL_AE_MODE =                                   // byte (acamera_metadata_enum_android_control_ae_mode_t)
473             ACAMERA_CONTROL_START + 3,
474     /**
475      * <p>List of metering areas to use for auto-exposure adjustment.</p>
476      *
477      * <p>Type: int32[5*area_count]</p>
478      *
479      * <p>This tag may appear in:
480      * <ul>
481      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
482      *   <li>ACaptureRequest</li>
483      * </ul></p>
484      *
485      * <p>Not available if android.control.maxRegionsAe is 0.
486      * Otherwise will always be present.</p>
487      * <p>The maximum number of regions supported by the device is determined by the value
488      * of android.control.maxRegionsAe.</p>
489      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
490      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
491      * the top-left pixel in the active pixel array, and
492      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
493      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
494      * active pixel array.</p>
495      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
496      * system depends on the mode being set.
497      * When the distortion correction mode is OFF, the coordinate system follows
498      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
499      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
500      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
501      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
502      * pixel in the pre-correction active pixel array.
503      * When the distortion correction mode is not OFF, the coordinate system follows
504      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
505      * <code>(0, 0)</code> being the top-left pixel of the active array, and
506      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
507      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
508      * active pixel array.</p>
509      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
510      * for every pixel in the area. This means that a large metering area
511      * with the same weight as a smaller area will have more effect in
512      * the metering result. Metering areas can partially overlap and the
513      * camera device will add the weights in the overlap region.</p>
514      * <p>The weights are relative to weights of other exposure metering regions, so if only one
515      * region is used, all non-zero weights will have the same effect. A region with 0
516      * weight is ignored.</p>
517      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
518      * camera device.</p>
519      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
520      * capture result metadata, the camera device will ignore the sections outside the crop
521      * region and output only the intersection rectangle as the metering region in the result
522      * metadata.  If the region is entirely outside the crop region, it will be ignored and
523      * not reported in the result metadata.</p>
524      * <p>When setting the AE metering regions, the application must consider the additional
525      * crop resulted from the aspect ratio differences between the preview stream and
526      * ACAMERA_SCALER_CROP_REGION. For example, if the ACAMERA_SCALER_CROP_REGION is the full
527      * active array size with 4:3 aspect ratio, and the preview stream is 16:9,
528      * the boundary of AE regions will be [0, y_crop] and
529      * [active_width, active_height - 2 * y_crop] rather than [0, 0] and
530      * [active_width, active_height], where y_crop is the additional crop due to aspect ratio
531      * mismatch.</p>
532      * <p>Starting from API level 30, the coordinate system of activeArraySize or
533      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
534      * pre-zoom field of view. This means that the same aeRegions values at different
535      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The aeRegions
536      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
537      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
538      * aeRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
539      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
540      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
541      * mode.</p>
542      * <p>For camera devices with the
543      * <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>
544      * capability,
545      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
546      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
547      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
548      * <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>
549      * <p>The data representation is <code>int[5 * area_count]</code>.
550      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
551      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
552      * ymax.</p>
553      *
554      * @see ACAMERA_CONTROL_ZOOM_RATIO
555      * @see ACAMERA_DISTORTION_CORRECTION_MODE
556      * @see ACAMERA_SCALER_CROP_REGION
557      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
558      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
559      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
560      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
561      * @see ACAMERA_SENSOR_PIXEL_MODE
562      */
563     ACAMERA_CONTROL_AE_REGIONS =                                // int32[5*area_count]
564             ACAMERA_CONTROL_START + 4,
565     /**
566      * <p>Range over which the auto-exposure routine can
567      * adjust the capture frame rate to maintain good
568      * exposure.</p>
569      *
570      * <p>Type: int32[2]</p>
571      *
572      * <p>This tag may appear in:
573      * <ul>
574      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
575      *   <li>ACaptureRequest</li>
576      * </ul></p>
577      *
578      * <p>Only constrains auto-exposure (AE) algorithm, not
579      * manual control of ACAMERA_SENSOR_EXPOSURE_TIME and
580      * ACAMERA_SENSOR_FRAME_DURATION.</p>
581      *
582      * @see ACAMERA_SENSOR_EXPOSURE_TIME
583      * @see ACAMERA_SENSOR_FRAME_DURATION
584      */
585     ACAMERA_CONTROL_AE_TARGET_FPS_RANGE =                       // int32[2]
586             ACAMERA_CONTROL_START + 5,
587     /**
588      * <p>Whether the camera device will trigger a precapture
589      * metering sequence when it processes this request.</p>
590      *
591      * <p>Type: byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)</p>
592      *
593      * <p>This tag may appear in:
594      * <ul>
595      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
596      *   <li>ACaptureRequest</li>
597      * </ul></p>
598      *
599      * <p>This entry is normally set to IDLE, or is not
600      * included at all in the request settings. When included and
601      * set to START, the camera device will trigger the auto-exposure (AE)
602      * precapture metering sequence.</p>
603      * <p>When set to CANCEL, the camera device will cancel any active
604      * precapture metering trigger, and return to its initial AE state.
605      * If a precapture metering sequence is already completed, and the camera
606      * device has implicitly locked the AE for subsequent still capture, the
607      * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
608      * <p>The precapture sequence should be triggered before starting a
609      * high-quality still capture for final metering decisions to
610      * be made, and for firing pre-capture flash pulses to estimate
611      * scene brightness and required final capture flash power, when
612      * the flash is enabled.</p>
613      * <p>Normally, this entry should be set to START for only a
614      * single request, and the application should wait until the
615      * sequence completes before starting a new one.</p>
616      * <p>When a precapture metering sequence is finished, the camera device
617      * may lock the auto-exposure routine internally to be able to accurately expose the
618      * subsequent still capture image (<code>ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE</code>).
619      * For this case, the AE may not resume normal scan if no subsequent still capture is
620      * submitted. To ensure that the AE routine restarts normal scan, the application should
621      * submit a request with <code>ACAMERA_CONTROL_AE_LOCK == true</code>, followed by a request
622      * with <code>ACAMERA_CONTROL_AE_LOCK == false</code>, if the application decides not to submit a
623      * still capture request after the precapture sequence completes. Alternatively, for
624      * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
625      * internally locked AE if the application doesn't submit a still capture request after
626      * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
627      * be used in devices that have earlier API levels.</p>
628      * <p>The exact effect of auto-exposure (AE) precapture trigger
629      * depends on the current AE mode and state; see
630      * ACAMERA_CONTROL_AE_STATE for AE precapture state transition
631      * details.</p>
632      * <p>On LEGACY-level devices, the precapture trigger is not supported;
633      * capturing a high-resolution JPEG image will automatically trigger a
634      * precapture sequence before the high-resolution capture, including
635      * potentially firing a pre-capture flash.</p>
636      * <p>Using the precapture trigger and the auto-focus trigger ACAMERA_CONTROL_AF_TRIGGER
637      * simultaneously is allowed. However, since these triggers often require cooperation between
638      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
639      * focus sweep), the camera device may delay acting on a later trigger until the previous
640      * trigger has been fully handled. This may lead to longer intervals between the trigger and
641      * changes to ACAMERA_CONTROL_AE_STATE indicating the start of the precapture sequence, for
642      * example.</p>
643      * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
644      * the camera device will complete them in the optimal order for that device.</p>
645      *
646      * @see ACAMERA_CONTROL_AE_LOCK
647      * @see ACAMERA_CONTROL_AE_STATE
648      * @see ACAMERA_CONTROL_AF_TRIGGER
649      * @see ACAMERA_CONTROL_CAPTURE_INTENT
650      */
651     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER =                     // byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)
652             ACAMERA_CONTROL_START + 6,
653     /**
654      * <p>Whether auto-focus (AF) is currently enabled, and what
655      * mode it is set to.</p>
656      *
657      * <p>Type: byte (acamera_metadata_enum_android_control_af_mode_t)</p>
658      *
659      * <p>This tag may appear in:
660      * <ul>
661      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
662      *   <li>ACaptureRequest</li>
663      * </ul></p>
664      *
665      * <p>Only effective if ACAMERA_CONTROL_MODE = AUTO and the lens is not fixed focus
666      * (i.e. <code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>). Also note that
667      * when ACAMERA_CONTROL_AE_MODE is OFF, the behavior of AF is device
668      * dependent. It is recommended to lock AF by using ACAMERA_CONTROL_AF_TRIGGER before
669      * setting ACAMERA_CONTROL_AE_MODE to OFF, or set AF mode to OFF when AE is OFF.</p>
670      * <p>If the lens is controlled by the camera device auto-focus algorithm,
671      * the camera device will report the current AF status in ACAMERA_CONTROL_AF_STATE
672      * in result metadata.</p>
673      *
674      * @see ACAMERA_CONTROL_AE_MODE
675      * @see ACAMERA_CONTROL_AF_STATE
676      * @see ACAMERA_CONTROL_AF_TRIGGER
677      * @see ACAMERA_CONTROL_MODE
678      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
679      */
680     ACAMERA_CONTROL_AF_MODE =                                   // byte (acamera_metadata_enum_android_control_af_mode_t)
681             ACAMERA_CONTROL_START + 7,
682     /**
683      * <p>List of metering areas to use for auto-focus.</p>
684      *
685      * <p>Type: int32[5*area_count]</p>
686      *
687      * <p>This tag may appear in:
688      * <ul>
689      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
690      *   <li>ACaptureRequest</li>
691      * </ul></p>
692      *
693      * <p>Not available if android.control.maxRegionsAf is 0.
694      * Otherwise will always be present.</p>
695      * <p>The maximum number of focus areas supported by the device is determined by the value
696      * of android.control.maxRegionsAf.</p>
697      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
698      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
699      * the top-left pixel in the active pixel array, and
700      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
701      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
702      * active pixel array.</p>
703      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
704      * system depends on the mode being set.
705      * When the distortion correction mode is OFF, the coordinate system follows
706      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
707      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
708      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
709      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
710      * pixel in the pre-correction active pixel array.
711      * When the distortion correction mode is not OFF, the coordinate system follows
712      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
713      * <code>(0, 0)</code> being the top-left pixel of the active array, and
714      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
715      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
716      * active pixel array.</p>
717      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
718      * for every pixel in the area. This means that a large metering area
719      * with the same weight as a smaller area will have more effect in
720      * the metering result. Metering areas can partially overlap and the
721      * camera device will add the weights in the overlap region.</p>
722      * <p>The weights are relative to weights of other metering regions, so if only one region
723      * is used, all non-zero weights will have the same effect. A region with 0 weight is
724      * ignored.</p>
725      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
726      * camera device. The capture result will either be a zero weight region as well, or
727      * the region selected by the camera device as the focus area of interest.</p>
728      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
729      * capture result metadata, the camera device will ignore the sections outside the crop
730      * region and output only the intersection rectangle as the metering region in the result
731      * metadata. If the region is entirely outside the crop region, it will be ignored and
732      * not reported in the result metadata.</p>
733      * <p>When setting the AF metering regions, the application must consider the additional
734      * crop resulted from the aspect ratio differences between the preview stream and
735      * ACAMERA_SCALER_CROP_REGION. For example, if the ACAMERA_SCALER_CROP_REGION is the full
736      * active array size with 4:3 aspect ratio, and the preview stream is 16:9,
737      * the boundary of AF regions will be [0, y_crop] and
738      * [active_width, active_height - 2 * y_crop] rather than [0, 0] and
739      * [active_width, active_height], where y_crop is the additional crop due to aspect ratio
740      * mismatch.</p>
741      * <p>Starting from API level 30, the coordinate system of activeArraySize or
742      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
743      * pre-zoom field of view. This means that the same afRegions values at different
744      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The afRegions
745      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
746      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
747      * afRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
748      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
749      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
750      * mode.</p>
751      * <p>For camera devices with the
752      * <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>
753      * capability, ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
754      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
755      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
756      * <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>
757      * <p>The data representation is <code>int[5 * area_count]</code>.
758      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
759      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
760      * ymax.</p>
761      *
762      * @see ACAMERA_CONTROL_ZOOM_RATIO
763      * @see ACAMERA_DISTORTION_CORRECTION_MODE
764      * @see ACAMERA_SCALER_CROP_REGION
765      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
766      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
767      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
768      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
769      * @see ACAMERA_SENSOR_PIXEL_MODE
770      */
771     ACAMERA_CONTROL_AF_REGIONS =                                // int32[5*area_count]
772             ACAMERA_CONTROL_START + 8,
773     /**
774      * <p>Whether the camera device will trigger autofocus for this request.</p>
775      *
776      * <p>Type: byte (acamera_metadata_enum_android_control_af_trigger_t)</p>
777      *
778      * <p>This tag may appear in:
779      * <ul>
780      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
781      *   <li>ACaptureRequest</li>
782      * </ul></p>
783      *
784      * <p>This entry is normally set to IDLE, or is not
785      * included at all in the request settings.</p>
786      * <p>When included and set to START, the camera device will trigger the
787      * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
788      * <p>When set to CANCEL, the camera device will cancel any active trigger,
789      * and return to its initial AF state.</p>
790      * <p>Generally, applications should set this entry to START or CANCEL for only a
791      * single capture, and then return it to IDLE (or not set at all). Specifying
792      * START for multiple captures in a row means restarting the AF operation over
793      * and over again.</p>
794      * <p>See ACAMERA_CONTROL_AF_STATE for what the trigger means for each AF mode.</p>
795      * <p>Using the autofocus trigger and the precapture trigger ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
796      * simultaneously is allowed. However, since these triggers often require cooperation between
797      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
798      * focus sweep), the camera device may delay acting on a later trigger until the previous
799      * trigger has been fully handled. This may lead to longer intervals between the trigger and
800      * changes to ACAMERA_CONTROL_AF_STATE, for example.</p>
801      *
802      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
803      * @see ACAMERA_CONTROL_AF_STATE
804      */
805     ACAMERA_CONTROL_AF_TRIGGER =                                // byte (acamera_metadata_enum_android_control_af_trigger_t)
806             ACAMERA_CONTROL_START + 9,
807     /**
808      * <p>Whether auto-white balance (AWB) is currently locked to its
809      * latest calculated values.</p>
810      *
811      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_t)</p>
812      *
813      * <p>This tag may appear in:
814      * <ul>
815      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
816      *   <li>ACaptureRequest</li>
817      * </ul></p>
818      *
819      * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
820      * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
821      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
822      * get locked do not necessarily correspond to the settings that were present in the
823      * latest capture result received from the camera device, since additional captures
824      * and AWB updates may have occurred even before the result was sent out. If an
825      * application is switching between automatic and manual control and wishes to eliminate
826      * any flicker during the switch, the following procedure is recommended:</p>
827      * <ol>
828      * <li>Starting in auto-AWB mode:</li>
829      * <li>Lock AWB</li>
830      * <li>Wait for the first result to be output that has the AWB locked</li>
831      * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
832      * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
833      * </ol>
834      * <p>Note that AWB lock is only meaningful when
835      * ACAMERA_CONTROL_AWB_MODE is in the AUTO mode; in other modes,
836      * AWB is already fixed to a specific setting.</p>
837      * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
838      *
839      * @see ACAMERA_CONTROL_AWB_MODE
840      */
841     ACAMERA_CONTROL_AWB_LOCK =                                  // byte (acamera_metadata_enum_android_control_awb_lock_t)
842             ACAMERA_CONTROL_START + 10,
843     /**
844      * <p>Whether auto-white balance (AWB) is currently setting the color
845      * transform fields, and what its illumination target
846      * is.</p>
847      *
848      * <p>Type: byte (acamera_metadata_enum_android_control_awb_mode_t)</p>
849      *
850      * <p>This tag may appear in:
851      * <ul>
852      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
853      *   <li>ACaptureRequest</li>
854      * </ul></p>
855      *
856      * <p>This control is only effective if ACAMERA_CONTROL_MODE is AUTO.</p>
857      * <p>When set to the AUTO mode, the camera device's auto-white balance
858      * routine is enabled, overriding the application's selected
859      * ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS and
860      * ACAMERA_COLOR_CORRECTION_MODE. Note that when ACAMERA_CONTROL_AE_MODE
861      * is OFF, the behavior of AWB is device dependent. It is recommended to
862      * also set AWB mode to OFF or lock AWB by using ACAMERA_CONTROL_AWB_LOCK before
863      * setting AE mode to OFF.</p>
864      * <p>When set to the OFF mode, the camera device's auto-white balance
865      * routine is disabled. The application manually controls the white
866      * balance by ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS
867      * and ACAMERA_COLOR_CORRECTION_MODE.</p>
868      * <p>When set to any other modes, the camera device's auto-white
869      * balance routine is disabled. The camera device uses each
870      * particular illumination target for white balance
871      * adjustment. The application's values for
872      * ACAMERA_COLOR_CORRECTION_TRANSFORM,
873      * ACAMERA_COLOR_CORRECTION_GAINS and
874      * ACAMERA_COLOR_CORRECTION_MODE are ignored.</p>
875      *
876      * @see ACAMERA_COLOR_CORRECTION_GAINS
877      * @see ACAMERA_COLOR_CORRECTION_MODE
878      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
879      * @see ACAMERA_CONTROL_AE_MODE
880      * @see ACAMERA_CONTROL_AWB_LOCK
881      * @see ACAMERA_CONTROL_MODE
882      */
883     ACAMERA_CONTROL_AWB_MODE =                                  // byte (acamera_metadata_enum_android_control_awb_mode_t)
884             ACAMERA_CONTROL_START + 11,
885     /**
886      * <p>List of metering areas to use for auto-white-balance illuminant
887      * estimation.</p>
888      *
889      * <p>Type: int32[5*area_count]</p>
890      *
891      * <p>This tag may appear in:
892      * <ul>
893      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
894      *   <li>ACaptureRequest</li>
895      * </ul></p>
896      *
897      * <p>Not available if android.control.maxRegionsAwb is 0.
898      * Otherwise will always be present.</p>
899      * <p>The maximum number of regions supported by the device is determined by the value
900      * of android.control.maxRegionsAwb.</p>
901      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
902      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
903      * the top-left pixel in the active pixel array, and
904      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
905      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
906      * active pixel array.</p>
907      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
908      * system depends on the mode being set.
909      * When the distortion correction mode is OFF, the coordinate system follows
910      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
911      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
912      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
913      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
914      * pixel in the pre-correction active pixel array.
915      * When the distortion correction mode is not OFF, the coordinate system follows
916      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
917      * <code>(0, 0)</code> being the top-left pixel of the active array, and
918      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
919      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
920      * active pixel array.</p>
921      * <p>The weight must range from 0 to 1000, and represents a weight
922      * for every pixel in the area. This means that a large metering area
923      * with the same weight as a smaller area will have more effect in
924      * the metering result. Metering areas can partially overlap and the
925      * camera device will add the weights in the overlap region.</p>
926      * <p>The weights are relative to weights of other white balance metering regions, so if
927      * only one region is used, all non-zero weights will have the same effect. A region with
928      * 0 weight is ignored.</p>
929      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
930      * camera device.</p>
931      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
932      * capture result metadata, the camera device will ignore the sections outside the crop
933      * region and output only the intersection rectangle as the metering region in the result
934      * metadata.  If the region is entirely outside the crop region, it will be ignored and
935      * not reported in the result metadata.</p>
936      * <p>When setting the AWB metering regions, the application must consider the additional
937      * crop resulted from the aspect ratio differences between the preview stream and
938      * ACAMERA_SCALER_CROP_REGION. For example, if the ACAMERA_SCALER_CROP_REGION is the full
939      * active array size with 4:3 aspect ratio, and the preview stream is 16:9,
940      * the boundary of AWB regions will be [0, y_crop] and
941      * [active_width, active_height - 2 * y_crop] rather than [0, 0] and
942      * [active_width, active_height], where y_crop is the additional crop due to aspect ratio
943      * mismatch.</p>
944      * <p>Starting from API level 30, the coordinate system of activeArraySize or
945      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
946      * pre-zoom field of view. This means that the same awbRegions values at different
947      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The awbRegions
948      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
949      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
950      * awbRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of
951      * the scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
952      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
953      * mode.</p>
954      * <p>For camera devices with the
955      * <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>
956      * capability, ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
957      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
958      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
959      * <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>
960      * <p>The data representation is <code>int[5 * area_count]</code>.
961      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
962      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
963      * ymax.</p>
964      *
965      * @see ACAMERA_CONTROL_ZOOM_RATIO
966      * @see ACAMERA_DISTORTION_CORRECTION_MODE
967      * @see ACAMERA_SCALER_CROP_REGION
968      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
969      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
970      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
971      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
972      * @see ACAMERA_SENSOR_PIXEL_MODE
973      */
974     ACAMERA_CONTROL_AWB_REGIONS =                               // int32[5*area_count]
975             ACAMERA_CONTROL_START + 12,
976     /**
977      * <p>Information to the camera device 3A (auto-exposure,
978      * auto-focus, auto-white balance) routines about the purpose
979      * of this capture, to help the camera device to decide optimal 3A
980      * strategy.</p>
981      *
982      * <p>Type: byte (acamera_metadata_enum_android_control_capture_intent_t)</p>
983      *
984      * <p>This tag may appear in:
985      * <ul>
986      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
987      *   <li>ACaptureRequest</li>
988      * </ul></p>
989      *
990      * <p>This control (except for MANUAL) is only effective if
991      * <code>ACAMERA_CONTROL_MODE != OFF</code> and any 3A routine is active.</p>
992      * <p>All intents are supported by all devices, except that:</p>
993      * <ul>
994      * <li>ZERO_SHUTTER_LAG will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
995      * PRIVATE_REPROCESSING or YUV_REPROCESSING.</li>
996      * <li>MANUAL will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
997      * MANUAL_SENSOR.</li>
998      * <li>MOTION_TRACKING will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
999      * MOTION_TRACKING.</li>
1000      * </ul>
1001      *
1002      * @see ACAMERA_CONTROL_MODE
1003      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
1004      */
1005     ACAMERA_CONTROL_CAPTURE_INTENT =                            // byte (acamera_metadata_enum_android_control_capture_intent_t)
1006             ACAMERA_CONTROL_START + 13,
1007     /**
1008      * <p>A special color effect to apply.</p>
1009      *
1010      * <p>Type: byte (acamera_metadata_enum_android_control_effect_mode_t)</p>
1011      *
1012      * <p>This tag may appear in:
1013      * <ul>
1014      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1015      *   <li>ACaptureRequest</li>
1016      * </ul></p>
1017      *
1018      * <p>When this mode is set, a color effect will be applied
1019      * to images produced by the camera device. The interpretation
1020      * and implementation of these color effects is left to the
1021      * implementor of the camera device, and should not be
1022      * depended on to be consistent (or present) across all
1023      * devices.</p>
1024      */
1025     ACAMERA_CONTROL_EFFECT_MODE =                               // byte (acamera_metadata_enum_android_control_effect_mode_t)
1026             ACAMERA_CONTROL_START + 14,
1027     /**
1028      * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
1029      * routines.</p>
1030      *
1031      * <p>Type: byte (acamera_metadata_enum_android_control_mode_t)</p>
1032      *
1033      * <p>This tag may appear in:
1034      * <ul>
1035      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1036      *   <li>ACaptureRequest</li>
1037      * </ul></p>
1038      *
1039      * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
1040      * by the camera device is disabled. The application must set the fields for
1041      * capture parameters itself.</p>
1042      * <p>When set to AUTO, the individual algorithm controls in
1043      * ACAMERA_CONTROL_* are in effect, such as ACAMERA_CONTROL_AF_MODE.</p>
1044      * <p>When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
1045      * ACAMERA_CONTROL_* are mostly disabled, and the camera device
1046      * implements one of the scene mode or extended scene mode settings (such as ACTION,
1047      * SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
1048      * 3A settings are provided by {@link ACameraCaptureSession_captureCallback_result capture results}.</p>
1049      * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1050      * is that this frame will not be used by camera device background 3A statistics
1051      * update, as if this frame is never captured. This mode can be used in the scenario
1052      * where the application doesn't want a 3A manual control capture to affect
1053      * the subsequent auto 3A capture results.</p>
1054      *
1055      * @see ACAMERA_CONTROL_AF_MODE
1056      */
1057     ACAMERA_CONTROL_MODE =                                      // byte (acamera_metadata_enum_android_control_mode_t)
1058             ACAMERA_CONTROL_START + 15,
1059     /**
1060      * <p>Control for which scene mode is currently active.</p>
1061      *
1062      * <p>Type: byte (acamera_metadata_enum_android_control_scene_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>Scene modes are custom camera modes optimized for a certain set of conditions and
1071      * capture settings.</p>
1072      * <p>This is the mode that that is active when
1073      * <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
1074      * disable ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
1075      * while in use.</p>
1076      * <p>The interpretation and implementation of these scene modes is left
1077      * to the implementor of the camera device. Their behavior will not be
1078      * consistent across all devices, and any given device may only implement
1079      * a subset of these modes.</p>
1080      *
1081      * @see ACAMERA_CONTROL_AE_MODE
1082      * @see ACAMERA_CONTROL_AF_MODE
1083      * @see ACAMERA_CONTROL_AWB_MODE
1084      * @see ACAMERA_CONTROL_MODE
1085      */
1086     ACAMERA_CONTROL_SCENE_MODE =                                // byte (acamera_metadata_enum_android_control_scene_mode_t)
1087             ACAMERA_CONTROL_START + 16,
1088     /**
1089      * <p>Whether video stabilization is
1090      * active.</p>
1091      *
1092      * <p>Type: byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)</p>
1093      *
1094      * <p>This tag may appear in:
1095      * <ul>
1096      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1097      *   <li>ACaptureRequest</li>
1098      * </ul></p>
1099      *
1100      * <p>Video stabilization automatically warps images from
1101      * the camera in order to stabilize motion between consecutive frames.</p>
1102      * <p>If enabled, video stabilization can modify the
1103      * ACAMERA_SCALER_CROP_REGION to keep the video stream stabilized.</p>
1104      * <p>Switching between different video stabilization modes may take several
1105      * frames to initialize, the camera device will report the current mode
1106      * in capture result metadata. For example, When "ON" mode is requested,
1107      * the video stabilization modes in the first several capture results may
1108      * still be "OFF", and it will become "ON" when the initialization is
1109      * done.</p>
1110      * <p>In addition, not all recording sizes or frame rates may be supported for
1111      * stabilization by a device that reports stabilization support. It is guaranteed
1112      * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
1113      * the recording resolution is less than or equal to 1920 x 1080 (width less than
1114      * or equal to 1920, height less than or equal to 1080), and the recording
1115      * frame rate is less than or equal to 30fps.  At other sizes, the CaptureResult
1116      * ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE field will return
1117      * OFF if the recording output is not stabilized, or if there are no output
1118      * Surface types that can be stabilized.</p>
1119      * <p>If a camera device supports both this mode and OIS
1120      * (ACAMERA_LENS_OPTICAL_STABILIZATION_MODE), turning both modes on may
1121      * produce undesirable interaction, so it is recommended not to enable
1122      * both at the same time.</p>
1123      * <p>If video stabilization is set to "PREVIEW_STABILIZATION",
1124      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE is overridden. The camera sub-system may choose
1125      * to turn on hardware based image stabilization in addition to software based stabilization
1126      * if it deems that appropriate.
1127      * This key may be a part of the available session keys, which camera clients may
1128      * query via
1129      * {@link ACameraManager_getCameraCharacteristics }.
1130      * If this is the case, changing this key over the life-time of a capture session may
1131      * cause delays / glitches.</p>
1132      *
1133      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1134      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
1135      * @see ACAMERA_SCALER_CROP_REGION
1136      */
1137     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE =                  // byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)
1138             ACAMERA_CONTROL_START + 17,
1139     /**
1140      * <p>List of auto-exposure antibanding modes for ACAMERA_CONTROL_AE_ANTIBANDING_MODE that are
1141      * supported by this camera device.</p>
1142      *
1143      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1144      *
1145      * <p>Type: byte[n]</p>
1146      *
1147      * <p>This tag may appear in:
1148      * <ul>
1149      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1150      * </ul></p>
1151      *
1152      * <p>Not all of the auto-exposure anti-banding modes may be
1153      * supported by a given camera device. This field lists the
1154      * valid anti-banding modes that the application may request
1155      * for this camera device with the
1156      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE control.</p>
1157      *
1158      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1159      */
1160     ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =            // byte[n]
1161             ACAMERA_CONTROL_START + 18,
1162     /**
1163      * <p>List of auto-exposure modes for ACAMERA_CONTROL_AE_MODE that are supported by this camera
1164      * device.</p>
1165      *
1166      * @see ACAMERA_CONTROL_AE_MODE
1167      *
1168      * <p>Type: byte[n]</p>
1169      *
1170      * <p>This tag may appear in:
1171      * <ul>
1172      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1173      * </ul></p>
1174      *
1175      * <p>Not all the auto-exposure modes may be supported by a
1176      * given camera device, especially if no flash unit is
1177      * available. This entry lists the valid modes for
1178      * ACAMERA_CONTROL_AE_MODE for this camera device.</p>
1179      * <p>All camera devices support ON, and all camera devices with flash
1180      * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
1181      * <p>FULL mode camera devices always support OFF mode,
1182      * which enables application control of camera exposure time,
1183      * sensitivity, and frame duration.</p>
1184      * <p>LEGACY mode camera devices never support OFF mode.
1185      * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
1186      * capability.</p>
1187      *
1188      * @see ACAMERA_CONTROL_AE_MODE
1189      */
1190     ACAMERA_CONTROL_AE_AVAILABLE_MODES =                        // byte[n]
1191             ACAMERA_CONTROL_START + 19,
1192     /**
1193      * <p>List of frame rate ranges for ACAMERA_CONTROL_AE_TARGET_FPS_RANGE supported by
1194      * this camera device.</p>
1195      *
1196      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
1197      *
1198      * <p>Type: int32[2*n]</p>
1199      *
1200      * <p>This tag may appear in:
1201      * <ul>
1202      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1203      * </ul></p>
1204      *
1205      * <p>For devices at the LEGACY level or above:</p>
1206      * <ul>
1207      * <li>
1208      * <p>For constant-framerate recording, for each normal
1209      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>, that is, a
1210      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1211      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#quality">quality</a> in
1212      * the range [<a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_LOW">QUALITY_LOW</a>,
1213      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_2160P">QUALITY_2160P</a>], if the profile is
1214      * supported by the device and has
1215      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code>, this list will
1216      * always include (<code>x</code>,<code>x</code>).</p>
1217      * </li>
1218      * <li>
1219      * <p>Also, a camera device must either not support any
1220      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>,
1221      * or support at least one
1222      * normal <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1223      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code> &gt;= 24.</p>
1224      * </li>
1225      * </ul>
1226      * <p>For devices at the LIMITED level or above:</p>
1227      * <ul>
1228      * <li>For devices that advertise NIR color filter arrangement in
1229      * ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, this list will always include
1230      * (<code>max</code>, <code>max</code>) where <code>max</code> = the maximum output frame rate of the maximum YUV_420_888
1231      * output size.</li>
1232      * <li>For devices advertising any color filter arrangement other than NIR, or devices not
1233      * advertising color filter arrangement, this list will always include (<code>min</code>, <code>max</code>) and
1234      * (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
1235      * maximum YUV_420_888 output size.</li>
1236      * </ul>
1237      *
1238      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1239      */
1240     ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =            // int32[2*n]
1241             ACAMERA_CONTROL_START + 20,
1242     /**
1243      * <p>Maximum and minimum exposure compensation values for
1244      * ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION, in counts of ACAMERA_CONTROL_AE_COMPENSATION_STEP,
1245      * that are supported by this camera device.</p>
1246      *
1247      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
1248      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1249      *
1250      * <p>Type: int32[2]</p>
1251      *
1252      * <p>This tag may appear in:
1253      * <ul>
1254      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1255      * </ul></p>
1256      *
1257      */
1258     ACAMERA_CONTROL_AE_COMPENSATION_RANGE =                     // int32[2]
1259             ACAMERA_CONTROL_START + 21,
1260     /**
1261      * <p>Smallest step by which the exposure compensation
1262      * can be changed.</p>
1263      *
1264      * <p>Type: rational</p>
1265      *
1266      * <p>This tag may appear in:
1267      * <ul>
1268      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1269      * </ul></p>
1270      *
1271      * <p>This is the unit for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION. For example, if this key has
1272      * a value of <code>1/2</code>, then a setting of <code>-2</code> for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION means
1273      * that the target EV offset for the auto-exposure routine is -1 EV.</p>
1274      * <p>One unit of EV compensation changes the brightness of the captured image by a factor
1275      * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
1276      *
1277      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1278      */
1279     ACAMERA_CONTROL_AE_COMPENSATION_STEP =                      // rational
1280             ACAMERA_CONTROL_START + 22,
1281     /**
1282      * <p>List of auto-focus (AF) modes for ACAMERA_CONTROL_AF_MODE that are
1283      * supported by this camera device.</p>
1284      *
1285      * @see ACAMERA_CONTROL_AF_MODE
1286      *
1287      * <p>Type: byte[n]</p>
1288      *
1289      * <p>This tag may appear in:
1290      * <ul>
1291      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1292      * </ul></p>
1293      *
1294      * <p>Not all the auto-focus modes may be supported by a
1295      * given camera device. This entry lists the valid modes for
1296      * ACAMERA_CONTROL_AF_MODE for this camera device.</p>
1297      * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
1298      * camera devices with adjustable focuser units
1299      * (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>) will support AUTO mode.</p>
1300      * <p>LEGACY devices will support OFF mode only if they support
1301      * focusing to infinity (by also setting ACAMERA_LENS_FOCUS_DISTANCE to
1302      * <code>0.0f</code>).</p>
1303      *
1304      * @see ACAMERA_CONTROL_AF_MODE
1305      * @see ACAMERA_LENS_FOCUS_DISTANCE
1306      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
1307      */
1308     ACAMERA_CONTROL_AF_AVAILABLE_MODES =                        // byte[n]
1309             ACAMERA_CONTROL_START + 23,
1310     /**
1311      * <p>List of color effects for ACAMERA_CONTROL_EFFECT_MODE that are supported by this camera
1312      * device.</p>
1313      *
1314      * @see ACAMERA_CONTROL_EFFECT_MODE
1315      *
1316      * <p>Type: byte[n]</p>
1317      *
1318      * <p>This tag may appear in:
1319      * <ul>
1320      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1321      * </ul></p>
1322      *
1323      * <p>This list contains the color effect modes that can be applied to
1324      * images produced by the camera device.
1325      * Implementations are not expected to be consistent across all devices.
1326      * If no color effect modes are available for a device, this will only list
1327      * OFF.</p>
1328      * <p>A color effect will only be applied if
1329      * ACAMERA_CONTROL_MODE != OFF.  OFF is always included in this list.</p>
1330      * <p>This control has no effect on the operation of other control routines such
1331      * as auto-exposure, white balance, or focus.</p>
1332      *
1333      * @see ACAMERA_CONTROL_MODE
1334      */
1335     ACAMERA_CONTROL_AVAILABLE_EFFECTS =                         // byte[n]
1336             ACAMERA_CONTROL_START + 24,
1337     /**
1338      * <p>List of scene modes for ACAMERA_CONTROL_SCENE_MODE that are supported by this camera
1339      * device.</p>
1340      *
1341      * @see ACAMERA_CONTROL_SCENE_MODE
1342      *
1343      * <p>Type: byte[n]</p>
1344      *
1345      * <p>This tag may appear in:
1346      * <ul>
1347      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1348      * </ul></p>
1349      *
1350      * <p>This list contains scene modes that can be set for the camera device.
1351      * Only scene modes that have been fully implemented for the
1352      * camera device may be included here. Implementations are not expected
1353      * to be consistent across all devices.</p>
1354      * <p>If no scene modes are supported by the camera device, this
1355      * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
1356      * <p>FACE_PRIORITY is always listed if face detection is
1357      * supported (i.e.<code>ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT &gt;
1358      * 0</code>).</p>
1359      *
1360      * @see ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT
1361      */
1362     ACAMERA_CONTROL_AVAILABLE_SCENE_MODES =                     // byte[n]
1363             ACAMERA_CONTROL_START + 25,
1364     /**
1365      * <p>List of video stabilization modes for ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1366      * that are supported by this camera device.</p>
1367      *
1368      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1369      *
1370      * <p>Type: byte[n]</p>
1371      *
1372      * <p>This tag may appear in:
1373      * <ul>
1374      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1375      * </ul></p>
1376      *
1377      * <p>OFF will always be listed.</p>
1378      */
1379     ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =       // byte[n]
1380             ACAMERA_CONTROL_START + 26,
1381     /**
1382      * <p>List of auto-white-balance modes for ACAMERA_CONTROL_AWB_MODE that are supported by this
1383      * camera device.</p>
1384      *
1385      * @see ACAMERA_CONTROL_AWB_MODE
1386      *
1387      * <p>Type: byte[n]</p>
1388      *
1389      * <p>This tag may appear in:
1390      * <ul>
1391      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1392      * </ul></p>
1393      *
1394      * <p>Not all the auto-white-balance modes may be supported by a
1395      * given camera device. This entry lists the valid modes for
1396      * ACAMERA_CONTROL_AWB_MODE for this camera device.</p>
1397      * <p>All camera devices will support ON mode.</p>
1398      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
1399      * mode, which enables application control of white balance, by using
1400      * ACAMERA_COLOR_CORRECTION_TRANSFORM and ACAMERA_COLOR_CORRECTION_GAINS(ACAMERA_COLOR_CORRECTION_MODE must be set to TRANSFORM_MATRIX). This includes all FULL
1401      * mode camera devices.</p>
1402      *
1403      * @see ACAMERA_COLOR_CORRECTION_GAINS
1404      * @see ACAMERA_COLOR_CORRECTION_MODE
1405      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
1406      * @see ACAMERA_CONTROL_AWB_MODE
1407      */
1408     ACAMERA_CONTROL_AWB_AVAILABLE_MODES =                       // byte[n]
1409             ACAMERA_CONTROL_START + 27,
1410     /**
1411      * <p>List of the maximum number of regions that can be used for metering in
1412      * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
1413      * this corresponds to the maximum number of elements in
1414      * ACAMERA_CONTROL_AE_REGIONS, ACAMERA_CONTROL_AWB_REGIONS,
1415      * and ACAMERA_CONTROL_AF_REGIONS.</p>
1416      *
1417      * @see ACAMERA_CONTROL_AE_REGIONS
1418      * @see ACAMERA_CONTROL_AF_REGIONS
1419      * @see ACAMERA_CONTROL_AWB_REGIONS
1420      *
1421      * <p>Type: int32[3]</p>
1422      *
1423      * <p>This tag may appear in:
1424      * <ul>
1425      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1426      * </ul></p>
1427      *
1428      */
1429     ACAMERA_CONTROL_MAX_REGIONS =                               // int32[3]
1430             ACAMERA_CONTROL_START + 28,
1431     /**
1432      * <p>Current state of the auto-exposure (AE) algorithm.</p>
1433      *
1434      * <p>Type: byte (acamera_metadata_enum_android_control_ae_state_t)</p>
1435      *
1436      * <p>This tag may appear in:
1437      * <ul>
1438      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1439      * </ul></p>
1440      *
1441      * <p>Switching between or enabling AE modes (ACAMERA_CONTROL_AE_MODE) always
1442      * resets the AE state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1443      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1444      * the algorithm states to INACTIVE.</p>
1445      * <p>The camera device can do several state transitions between two results, if it is
1446      * allowed by the state transition table. For example: INACTIVE may never actually be
1447      * seen in a result.</p>
1448      * <p>The state in the result is the state for this image (in sync with this image): if
1449      * AE state becomes CONVERGED, then the image data associated with this result should
1450      * be good to use.</p>
1451      * <p>Below are state transition tables for different AE modes.</p>
1452      * <p>State       | Transition Cause | New State | Notes
1453      * :------------:|:----------------:|:---------:|:-----------------------:
1454      * INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled</p>
1455      * <p>When ACAMERA_CONTROL_AE_MODE is AE_MODE_ON*:</p>
1456      * <p>State        | Transition Cause                             | New State      | Notes
1457      * :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
1458      * INACTIVE       | Camera device initiates AE scan              | SEARCHING      | Values changing
1459      * INACTIVE       | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1460      * SEARCHING      | Camera device finishes AE scan               | CONVERGED      | Good values, not changing
1461      * SEARCHING      | Camera device finishes AE scan               | FLASH_REQUIRED | Converged but too dark w/o flash
1462      * SEARCHING      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1463      * CONVERGED      | Camera device initiates AE scan              | SEARCHING      | Values changing
1464      * CONVERGED      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1465      * FLASH_REQUIRED | Camera device initiates AE scan              | SEARCHING      | Values changing
1466      * FLASH_REQUIRED | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1467      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | SEARCHING      | Values not good after unlock
1468      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | CONVERGED      | Values good after unlock
1469      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | FLASH_REQUIRED | Exposure good, but too dark
1470      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is OFF | CONVERGED      | Ready for high-quality capture
1471      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is ON  | LOCKED         | Ready for high-quality capture
1472      * LOCKED         | aeLock is ON and aePrecaptureTrigger is START | LOCKED        | Precapture trigger is ignored when AE is already locked
1473      * LOCKED         | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED        | Precapture trigger is ignored when AE is already locked
1474      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START | PRECAPTURE     | Start AE precapture metering sequence
1475      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled</p>
1476      * <p>If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
1477      * ACAMERA_CONTROL_AE_AVAILABLE_MODES), ACAMERA_CONTROL_AE_STATE must be FLASH_REQUIRED after
1478      * the camera device finishes AE scan and it's too dark without flash.</p>
1479      * <p>For the above table, the camera device may skip reporting any state changes that happen
1480      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1481      * can be skipped in that manner is called a transient state.</p>
1482      * <p>For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
1483      * listed in above table, it is also legal for the camera device to skip one or more
1484      * transient states between two results. See below table for examples:</p>
1485      * <p>State        | Transition Cause                                            | New State      | Notes
1486      * :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
1487      * INACTIVE       | Camera device finished AE scan                              | CONVERGED      | Values are already good, transient states are skipped by camera device.
1488      * 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.
1489      * 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.
1490      * 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.
1491      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL, converged    | CONVERGED      | Converged after a precapture sequences canceled, transient states are skipped by camera device.
1492      * 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.
1493      * FLASH_REQUIRED | Camera device finished AE scan                              | CONVERGED      | Converged after a new scan, transient states are skipped by camera device.</p>
1494      *
1495      * @see ACAMERA_CONTROL_AE_AVAILABLE_MODES
1496      * @see ACAMERA_CONTROL_AE_LOCK
1497      * @see ACAMERA_CONTROL_AE_MODE
1498      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
1499      * @see ACAMERA_CONTROL_AE_STATE
1500      * @see ACAMERA_CONTROL_MODE
1501      * @see ACAMERA_CONTROL_SCENE_MODE
1502      */
1503     ACAMERA_CONTROL_AE_STATE =                                  // byte (acamera_metadata_enum_android_control_ae_state_t)
1504             ACAMERA_CONTROL_START + 31,
1505     /**
1506      * <p>Current state of auto-focus (AF) algorithm.</p>
1507      *
1508      * <p>Type: byte (acamera_metadata_enum_android_control_af_state_t)</p>
1509      *
1510      * <p>This tag may appear in:
1511      * <ul>
1512      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1513      * </ul></p>
1514      *
1515      * <p>Switching between or enabling AF modes (ACAMERA_CONTROL_AF_MODE) always
1516      * resets the AF state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1517      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1518      * the algorithm states to INACTIVE.</p>
1519      * <p>The camera device can do several state transitions between two results, if it is
1520      * allowed by the state transition table. For example: INACTIVE may never actually be
1521      * seen in a result.</p>
1522      * <p>The state in the result is the state for this image (in sync with this image): if
1523      * AF state becomes FOCUSED, then the image data associated with this result should
1524      * be sharp.</p>
1525      * <p>Below are state transition tables for different AF modes.</p>
1526      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_OFF or AF_MODE_EDOF:</p>
1527      * <p>State       | Transition Cause | New State | Notes
1528      * :------------:|:----------------:|:---------:|:-----------:
1529      * INACTIVE      |                  | INACTIVE  | Never changes</p>
1530      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1531      * <p>State            | Transition Cause | New State          | Notes
1532      * :-----------------:|:----------------:|:------------------:|:--------------:
1533      * INACTIVE           | AF_TRIGGER       | ACTIVE_SCAN        | Start AF sweep, Lens now moving
1534      * ACTIVE_SCAN        | AF sweep done    | FOCUSED_LOCKED     | Focused, Lens now locked
1535      * ACTIVE_SCAN        | AF sweep done    | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
1536      * ACTIVE_SCAN        | AF_CANCEL        | INACTIVE           | Cancel/reset AF, Lens now locked
1537      * FOCUSED_LOCKED     | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1538      * FOCUSED_LOCKED     | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1539      * NOT_FOCUSED_LOCKED | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1540      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1541      * Any state          | Mode change      | INACTIVE           |</p>
1542      * <p>For the above table, the camera device may skip reporting any state changes that happen
1543      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1544      * can be skipped in that manner is called a transient state.</p>
1545      * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1546      * state transitions listed in above table, it is also legal for the camera device to skip
1547      * one or more transient states between two results. See below table for examples:</p>
1548      * <p>State            | Transition Cause | New State          | Notes
1549      * :-----------------:|:----------------:|:------------------:|:--------------:
1550      * INACTIVE           | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1551      * INACTIVE           | AF_TRIGGER       | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
1552      * FOCUSED_LOCKED     | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1553      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is good after a scan, lens is not locked.</p>
1554      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_VIDEO:</p>
1555      * <p>State            | Transition Cause                    | New State          | Notes
1556      * :-----------------:|:-----------------------------------:|:------------------:|:--------------:
1557      * INACTIVE           | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1558      * INACTIVE           | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1559      * PASSIVE_SCAN       | Camera device completes current scan| PASSIVE_FOCUSED    | End AF scan, Lens now locked
1560      * PASSIVE_SCAN       | Camera device fails current scan    | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1561      * PASSIVE_SCAN       | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, if focus is good. Lens now locked
1562      * PASSIVE_SCAN       | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
1563      * PASSIVE_SCAN       | AF_CANCEL                           | INACTIVE           | Reset lens position, Lens now locked
1564      * PASSIVE_FOCUSED    | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1565      * PASSIVE_UNFOCUSED  | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1566      * PASSIVE_FOCUSED    | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, lens now locked
1567      * PASSIVE_UNFOCUSED  | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
1568      * FOCUSED_LOCKED     | AF_TRIGGER                          | FOCUSED_LOCKED     | No effect
1569      * FOCUSED_LOCKED     | AF_CANCEL                           | INACTIVE           | Restart AF scan
1570      * NOT_FOCUSED_LOCKED | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | No effect
1571      * NOT_FOCUSED_LOCKED | AF_CANCEL                           | INACTIVE           | Restart AF scan</p>
1572      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_PICTURE:</p>
1573      * <p>State            | Transition Cause                     | New State          | Notes
1574      * :-----------------:|:------------------------------------:|:------------------:|:--------------:
1575      * INACTIVE           | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1576      * INACTIVE           | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1577      * PASSIVE_SCAN       | Camera device completes current scan | PASSIVE_FOCUSED    | End AF scan, Lens now locked
1578      * PASSIVE_SCAN       | Camera device fails current scan     | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1579      * PASSIVE_SCAN       | AF_TRIGGER                           | FOCUSED_LOCKED     | Eventual transition once the focus is good. Lens now locked
1580      * PASSIVE_SCAN       | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
1581      * PASSIVE_SCAN       | AF_CANCEL                            | INACTIVE           | Reset lens position, Lens now locked
1582      * PASSIVE_FOCUSED    | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1583      * PASSIVE_UNFOCUSED  | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1584      * PASSIVE_FOCUSED    | AF_TRIGGER                           | FOCUSED_LOCKED     | Immediate trans. Lens now locked
1585      * PASSIVE_UNFOCUSED  | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
1586      * FOCUSED_LOCKED     | AF_TRIGGER                           | FOCUSED_LOCKED     | No effect
1587      * FOCUSED_LOCKED     | AF_CANCEL                            | INACTIVE           | Restart AF scan
1588      * NOT_FOCUSED_LOCKED | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | No effect
1589      * NOT_FOCUSED_LOCKED | AF_CANCEL                            | INACTIVE           | Restart AF scan</p>
1590      * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1591      * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1592      * camera device. When a trigger is included in a mode switch request, the trigger
1593      * will be evaluated in the context of the new mode in the request.
1594      * See below table for examples:</p>
1595      * <p>State      | Transition Cause                       | New State                                | Notes
1596      * :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
1597      * any state    | CAF--&gt;AUTO mode switch                 | INACTIVE                                 | Mode switch without trigger, initial state must be INACTIVE
1598      * any state    | CAF--&gt;AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE   | Mode switch with trigger, INACTIVE is skipped
1599      * any state    | AUTO--&gt;CAF mode switch                 | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped</p>
1600      *
1601      * @see ACAMERA_CONTROL_AF_MODE
1602      * @see ACAMERA_CONTROL_MODE
1603      * @see ACAMERA_CONTROL_SCENE_MODE
1604      */
1605     ACAMERA_CONTROL_AF_STATE =                                  // byte (acamera_metadata_enum_android_control_af_state_t)
1606             ACAMERA_CONTROL_START + 32,
1607     /**
1608      * <p>Current state of auto-white balance (AWB) algorithm.</p>
1609      *
1610      * <p>Type: byte (acamera_metadata_enum_android_control_awb_state_t)</p>
1611      *
1612      * <p>This tag may appear in:
1613      * <ul>
1614      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1615      * </ul></p>
1616      *
1617      * <p>Switching between or enabling AWB modes (ACAMERA_CONTROL_AWB_MODE) always
1618      * resets the AWB state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1619      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1620      * the algorithm states to INACTIVE.</p>
1621      * <p>The camera device can do several state transitions between two results, if it is
1622      * allowed by the state transition table. So INACTIVE may never actually be seen in
1623      * a result.</p>
1624      * <p>The state in the result is the state for this image (in sync with this image): if
1625      * AWB state becomes CONVERGED, then the image data associated with this result should
1626      * be good to use.</p>
1627      * <p>Below are state transition tables for different AWB modes.</p>
1628      * <p>When <code>ACAMERA_CONTROL_AWB_MODE != AWB_MODE_AUTO</code>:</p>
1629      * <p>State       | Transition Cause | New State | Notes
1630      * :------------:|:----------------:|:---------:|:-----------------------:
1631      * INACTIVE      |                  |INACTIVE   |Camera device auto white balance algorithm is disabled</p>
1632      * <p>When ACAMERA_CONTROL_AWB_MODE is AWB_MODE_AUTO:</p>
1633      * <p>State        | Transition Cause                 | New State     | Notes
1634      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1635      * INACTIVE       | Camera device initiates AWB scan | SEARCHING     | Values changing
1636      * INACTIVE       | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1637      * SEARCHING      | Camera device finishes AWB scan  | CONVERGED     | Good values, not changing
1638      * SEARCHING      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1639      * CONVERGED      | Camera device initiates AWB scan | SEARCHING     | Values changing
1640      * CONVERGED      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1641      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | SEARCHING     | Values not good after unlock</p>
1642      * <p>For the above table, the camera device may skip reporting any state changes that happen
1643      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1644      * can be skipped in that manner is called a transient state.</p>
1645      * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1646      * listed in above table, it is also legal for the camera device to skip one or more
1647      * transient states between two results. See below table for examples:</p>
1648      * <p>State        | Transition Cause                 | New State     | Notes
1649      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1650      * INACTIVE       | Camera device finished AWB scan  | CONVERGED     | Values are already good, transient states are skipped by camera device.
1651      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | CONVERGED     | Values good after unlock, transient states are skipped by camera device.</p>
1652      *
1653      * @see ACAMERA_CONTROL_AWB_LOCK
1654      * @see ACAMERA_CONTROL_AWB_MODE
1655      * @see ACAMERA_CONTROL_MODE
1656      * @see ACAMERA_CONTROL_SCENE_MODE
1657      */
1658     ACAMERA_CONTROL_AWB_STATE =                                 // byte (acamera_metadata_enum_android_control_awb_state_t)
1659             ACAMERA_CONTROL_START + 34,
1660     /**
1661      * <p>Whether the camera device supports ACAMERA_CONTROL_AE_LOCK</p>
1662      *
1663      * @see ACAMERA_CONTROL_AE_LOCK
1664      *
1665      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_available_t)</p>
1666      *
1667      * <p>This tag may appear in:
1668      * <ul>
1669      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1670      * </ul></p>
1671      *
1672      * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1673      * list <code>true</code>. This includes FULL devices.</p>
1674      */
1675     ACAMERA_CONTROL_AE_LOCK_AVAILABLE =                         // byte (acamera_metadata_enum_android_control_ae_lock_available_t)
1676             ACAMERA_CONTROL_START + 36,
1677     /**
1678      * <p>Whether the camera device supports ACAMERA_CONTROL_AWB_LOCK</p>
1679      *
1680      * @see ACAMERA_CONTROL_AWB_LOCK
1681      *
1682      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_available_t)</p>
1683      *
1684      * <p>This tag may appear in:
1685      * <ul>
1686      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1687      * </ul></p>
1688      *
1689      * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1690      * always list <code>true</code>. This includes FULL devices.</p>
1691      */
1692     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE =                        // byte (acamera_metadata_enum_android_control_awb_lock_available_t)
1693             ACAMERA_CONTROL_START + 37,
1694     /**
1695      * <p>List of control modes for ACAMERA_CONTROL_MODE that are supported by this camera
1696      * device.</p>
1697      *
1698      * @see ACAMERA_CONTROL_MODE
1699      *
1700      * <p>Type: byte[n]</p>
1701      *
1702      * <p>This tag may appear in:
1703      * <ul>
1704      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1705      * </ul></p>
1706      *
1707      * <p>This list contains control modes that can be set for the camera device.
1708      * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1709      * devices will always support OFF, AUTO modes.</p>
1710      */
1711     ACAMERA_CONTROL_AVAILABLE_MODES =                           // byte[n]
1712             ACAMERA_CONTROL_START + 38,
1713     /**
1714      * <p>Range of boosts for ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST supported
1715      * by this camera device.</p>
1716      *
1717      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1718      *
1719      * <p>Type: int32[2]</p>
1720      *
1721      * <p>This tag may appear in:
1722      * <ul>
1723      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1724      * </ul></p>
1725      *
1726      * <p>Devices support post RAW sensitivity boost  will advertise
1727      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST key for controlling
1728      * post RAW sensitivity boost.</p>
1729      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1730      * outputs. For devices that do support RAW format outputs, this key will always
1731      * present, and if a device does not support post RAW sensitivity boost, it will
1732      * list <code>(100, 100)</code> in this key.</p>
1733      *
1734      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1735      */
1736     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =          // int32[2]
1737             ACAMERA_CONTROL_START + 39,
1738     /**
1739      * <p>The amount of additional sensitivity boost applied to output images
1740      * after RAW sensor data is captured.</p>
1741      *
1742      * <p>Type: int32</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>Some camera devices support additional digital sensitivity boosting in the
1751      * camera processing pipeline after sensor RAW image is captured.
1752      * Such a boost will be applied to YUV/JPEG format output images but will not
1753      * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
1754      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1755      * outputs. For devices that do support RAW format outputs, this key will always
1756      * present, and if a device does not support post RAW sensitivity boost, it will
1757      * list <code>100</code> in this key.</p>
1758      * <p>If the camera device cannot apply the exact boost requested, it will reduce the
1759      * boost to the nearest supported value.
1760      * The final boost value used will be available in the output capture result.</p>
1761      * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
1762      * of such device will have the total sensitivity of
1763      * <code>ACAMERA_SENSOR_SENSITIVITY * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST / 100</code>
1764      * The sensitivity of RAW format images will always be <code>ACAMERA_SENSOR_SENSITIVITY</code></p>
1765      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
1766      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
1767      *
1768      * @see ACAMERA_CONTROL_AE_MODE
1769      * @see ACAMERA_CONTROL_MODE
1770      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1771      * @see ACAMERA_SENSOR_SENSITIVITY
1772      */
1773     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST =                // int32
1774             ACAMERA_CONTROL_START + 40,
1775     /**
1776      * <p>Allow camera device to enable zero-shutter-lag mode for requests with
1777      * ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE.</p>
1778      *
1779      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1780      *
1781      * <p>Type: byte (acamera_metadata_enum_android_control_enable_zsl_t)</p>
1782      *
1783      * <p>This tag may appear in:
1784      * <ul>
1785      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1786      *   <li>ACaptureRequest</li>
1787      * </ul></p>
1788      *
1789      * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
1790      * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
1791      * produce output images for a zero-shutter-lag request. The result metadata including the
1792      * ACAMERA_SENSOR_TIMESTAMP reflects the source frames used to produce output images.
1793      * Therefore, the contents of the output images and the result metadata may be out of order
1794      * compared to previous regular requests. enableZsl does not affect requests with other
1795      * capture intents.</p>
1796      * <p>For example, when requests are submitted in the following order:
1797      *   Request A: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is PREVIEW
1798      *   Request B: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is STILL_CAPTURE</p>
1799      * <p>The output images for request B may have contents captured before the output images for
1800      * request A, and the result metadata for request B may be older than the result metadata for
1801      * request A.</p>
1802      * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in
1803      * the past for requests with STILL_CAPTURE capture intent.</p>
1804      * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
1805      * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
1806      * <code>false</code> if present.</p>
1807      * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
1808      * capture templates is always <code>false</code> if present.</p>
1809      * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
1810      *
1811      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1812      * @see ACAMERA_SENSOR_TIMESTAMP
1813      */
1814     ACAMERA_CONTROL_ENABLE_ZSL =                                // byte (acamera_metadata_enum_android_control_enable_zsl_t)
1815             ACAMERA_CONTROL_START + 41,
1816     /**
1817      * <p>Whether a significant scene change is detected within the currently-set AF
1818      * region(s).</p>
1819      *
1820      * <p>Type: byte (acamera_metadata_enum_android_control_af_scene_change_t)</p>
1821      *
1822      * <p>This tag may appear in:
1823      * <ul>
1824      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1825      * </ul></p>
1826      *
1827      * <p>When the camera focus routine detects a change in the scene it is looking at,
1828      * such as a large shift in camera viewpoint, significant motion in the scene, or a
1829      * significant illumination change, this value will be set to DETECTED for a single capture
1830      * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
1831      * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.</p>
1832      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
1833      */
1834     ACAMERA_CONTROL_AF_SCENE_CHANGE =                           // byte (acamera_metadata_enum_android_control_af_scene_change_t)
1835             ACAMERA_CONTROL_START + 42,
1836     /**
1837      * <p>The list of extended scene modes for ACAMERA_CONTROL_EXTENDED_SCENE_MODE that are supported
1838      * by this camera device, and each extended scene mode's maximum streaming (non-stall) size
1839      * with  effect.</p>
1840      *
1841      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1842      *
1843      * <p>Type: int32[3*n]</p>
1844      *
1845      * <p>This tag may appear in:
1846      * <ul>
1847      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1848      * </ul></p>
1849      *
1850      * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p>
1851      * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
1852      * under which bokeh is effective when capture intent is PREVIEW. Note that when capture
1853      * intent is PREVIEW, the bokeh effect may not be as high in quality compared to
1854      * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming
1855      * dimension must be one of the YUV_420_888 or PRIVATE resolutions in
1856      * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the
1857      * application configures a stream larger than the maximum streaming dimension, bokeh
1858      * effect may not be applied for this stream for PREVIEW intent.</p>
1859      * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
1860      * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
1861      * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
1862      * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
1863      * If the application configures a stream with larger dimension, the stream may not have
1864      * bokeh effect applied.</p>
1865      */
1866     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES =   // int32[3*n]
1867             ACAMERA_CONTROL_START + 43,
1868     /**
1869      * <p>The ranges of supported zoom ratio for non-DISABLED ACAMERA_CONTROL_EXTENDED_SCENE_MODE.</p>
1870      *
1871      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1872      *
1873      * <p>Type: float[2*n]</p>
1874      *
1875      * <p>This tag may appear in:
1876      * <ul>
1877      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1878      * </ul></p>
1879      *
1880      * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios
1881      * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges
1882      * for all supported non-DISABLED extended scene modes, in the same order as in
1883      * android.control.availableExtended.</p>
1884      * <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p>
1885      */
1886     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES =
1887                                                                 // float[2*n]
1888             ACAMERA_CONTROL_START + 44,
1889     /**
1890      * <p>Whether extended scene mode is enabled for a particular capture request.</p>
1891      *
1892      * <p>Type: byte (acamera_metadata_enum_android_control_extended_scene_mode_t)</p>
1893      *
1894      * <p>This tag may appear in:
1895      * <ul>
1896      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1897      *   <li>ACaptureRequest</li>
1898      * </ul></p>
1899      *
1900      * <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
1901      * focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
1902      * <p>When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
1903      * processing needed for high quality bokeh effect, the stall may be longer than when
1904      * capture intent is not STILL_CAPTURE.</p>
1905      * <p>When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,</p>
1906      * <ul>
1907      * <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
1908      * BURST_CAPTURE must still be met.</li>
1909      * <li>All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
1910      * (queried via {@link ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES })
1911      * will have preview bokeh effect applied.</li>
1912      * </ul>
1913      * <p>When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
1914      * maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
1915      * be available for streams larger than the maximum streaming dimension.</p>
1916      * <p>Switching between different extended scene modes may involve reconfiguration of the camera
1917      * pipeline, resulting in long latency. The application should check this key against the
1918      * available session keys queried via
1919      * {@link ACameraManager_getCameraCharacteristics }.</p>
1920      * <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
1921      * with different field of view. As a result, when bokeh mode is enabled, the camera device
1922      * may override ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO, and the field of
1923      * view may be smaller than when bokeh mode is off.</p>
1924      *
1925      * @see ACAMERA_CONTROL_ZOOM_RATIO
1926      * @see ACAMERA_SCALER_CROP_REGION
1927      */
1928     ACAMERA_CONTROL_EXTENDED_SCENE_MODE =                       // byte (acamera_metadata_enum_android_control_extended_scene_mode_t)
1929             ACAMERA_CONTROL_START + 45,
1930     /**
1931      * <p>Minimum and maximum zoom ratios supported by this camera device.</p>
1932      *
1933      * <p>Type: float[2]</p>
1934      *
1935      * <p>This tag may appear in:
1936      * <ul>
1937      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1938      * </ul></p>
1939      *
1940      * <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
1941      * setting ACAMERA_CONTROL_ZOOM_RATIO to values less than 1.0 increases the camera's field
1942      * of view.</p>
1943      *
1944      * @see ACAMERA_CONTROL_ZOOM_RATIO
1945      */
1946     ACAMERA_CONTROL_ZOOM_RATIO_RANGE =                          // float[2]
1947             ACAMERA_CONTROL_START + 46,
1948     /**
1949      * <p>The desired zoom ratio</p>
1950      *
1951      * <p>Type: float</p>
1952      *
1953      * <p>This tag may appear in:
1954      * <ul>
1955      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1956      *   <li>ACaptureRequest</li>
1957      * </ul></p>
1958      *
1959      * <p>Instead of using ACAMERA_SCALER_CROP_REGION for zoom, the application can now choose to
1960      * use this tag to specify the desired zoom level.</p>
1961      * <p>By using this control, the application gains a simpler way to control zoom, which can
1962      * be a combination of optical and digital zoom. For example, a multi-camera system may
1963      * contain more than one lens with different focal lengths, and the user can use optical
1964      * zoom by switching between lenses. Using zoomRatio has benefits in the scenarios below:</p>
1965      * <ul>
1966      * <li>Zooming in from a wide-angle lens to a telephoto lens: A floating-point ratio provides
1967      *   better precision compared to an integer value of ACAMERA_SCALER_CROP_REGION.</li>
1968      * <li>Zooming out from a wide lens to an ultrawide lens: zoomRatio supports zoom-out whereas
1969      *   ACAMERA_SCALER_CROP_REGION doesn't.</li>
1970      * </ul>
1971      * <p>To illustrate, here are several scenarios of different zoom ratios, crop regions,
1972      * and output streams, for a hypothetical camera device with an active array of size
1973      * <code>(2000,1500)</code>.</p>
1974      * <ul>
1975      * <li>Camera Configuration:<ul>
1976      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
1977      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
1978      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
1979      * </ul>
1980      * </li>
1981      * <li>Case #1: 4:3 crop region with 2.0x zoom ratio<ul>
1982      * <li>Zoomed field of view: 1/4 of original field of view</li>
1983      * <li>Crop region: <code>Rect(0, 0, 2000, 1500) // (left, top, right, bottom)</code> (post zoom)</li>
1984      * </ul>
1985      * </li>
1986      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-43.png" /><ul>
1987      * <li><code>640x480</code> stream source area: <code>(0, 0, 2000, 1500)</code> (equal to crop region)</li>
1988      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (letterboxed)</li>
1989      * </ul>
1990      * </li>
1991      * <li>Case #2: 16:9 crop region with 2.0x zoom.<ul>
1992      * <li>Zoomed field of view: 1/4 of original field of view</li>
1993      * <li>Crop region: <code>Rect(0, 187, 2000, 1312)</code></li>
1994      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-169.png" /></li>
1995      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (pillarboxed)</li>
1996      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (equal to crop region)</li>
1997      * </ul>
1998      * </li>
1999      * <li>Case #3: 1:1 crop region with 0.5x zoom out to ultrawide lens.<ul>
2000      * <li>Zoomed field of view: 4x of original field of view (switched from wide lens to ultrawide lens)</li>
2001      * <li>Crop region: <code>Rect(250, 0, 1750, 1500)</code></li>
2002      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-0.5-crop-11.png" /></li>
2003      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (letterboxed)</li>
2004      * <li><code>1280x720</code> stream source area: <code>(250, 328, 1750, 1172)</code> (letterboxed)</li>
2005      * </ul>
2006      * </li>
2007      * </ul>
2008      * <p>As seen from the graphs above, the coordinate system of cropRegion now changes to the
2009      * effective after-zoom field-of-view, and is represented by the rectangle of (0, 0,
2010      * activeArrayWith, activeArrayHeight). The same applies to AE/AWB/AF regions, and faces.
2011      * This coordinate system change isn't applicable to RAW capture and its related
2012      * metadata such as intrinsicCalibration and lensShadingMap.</p>
2013      * <p>Using the same hypothetical example above, and assuming output stream #1 (640x480) is
2014      * the viewfinder stream, the application can achieve 2.0x zoom in one of two ways:</p>
2015      * <ul>
2016      * <li>zoomRatio = 2.0, scaler.cropRegion = (0, 0, 2000, 1500)</li>
2017      * <li>zoomRatio = 1.0 (default), scaler.cropRegion = (500, 375, 1500, 1125)</li>
2018      * </ul>
2019      * <p>If the application intends to set aeRegions to be top-left quarter of the viewfinder
2020      * field-of-view, the ACAMERA_CONTROL_AE_REGIONS should be set to (0, 0, 1000, 750) with
2021      * zoomRatio set to 2.0. Alternatively, the application can set aeRegions to the equivalent
2022      * region of (500, 375, 1000, 750) for zoomRatio of 1.0. If the application doesn't
2023      * explicitly set ACAMERA_CONTROL_ZOOM_RATIO, its value defaults to 1.0.</p>
2024      * <p>One limitation of controlling zoom using zoomRatio is that the ACAMERA_SCALER_CROP_REGION
2025      * must only be used for letterboxing or pillarboxing of the sensor active array, and no
2026      * FREEFORM cropping can be used with ACAMERA_CONTROL_ZOOM_RATIO other than 1.0. If
2027      * ACAMERA_CONTROL_ZOOM_RATIO is not 1.0, and ACAMERA_SCALER_CROP_REGION is set to be
2028      * windowboxing, the camera framework will override the ACAMERA_SCALER_CROP_REGION to be
2029      * the active array.</p>
2030      * <p>In the capture request, if the application sets ACAMERA_CONTROL_ZOOM_RATIO to a
2031      * value != 1.0, the ACAMERA_CONTROL_ZOOM_RATIO tag in the capture result reflects the
2032      * effective zoom ratio achieved by the camera device, and the ACAMERA_SCALER_CROP_REGION
2033      * adjusts for additional crops that are not zoom related. Otherwise, if the application
2034      * sets ACAMERA_CONTROL_ZOOM_RATIO to 1.0, or does not set it at all, the
2035      * ACAMERA_CONTROL_ZOOM_RATIO tag in the result metadata will also be 1.0.</p>
2036      * <p>When the application requests a physical stream for a logical multi-camera, the
2037      * ACAMERA_CONTROL_ZOOM_RATIO in the physical camera result metadata will be 1.0, and
2038      * the ACAMERA_SCALER_CROP_REGION tag reflects the amount of zoom and crop done by the
2039      * physical camera device.</p>
2040      *
2041      * @see ACAMERA_CONTROL_AE_REGIONS
2042      * @see ACAMERA_CONTROL_ZOOM_RATIO
2043      * @see ACAMERA_SCALER_CROP_REGION
2044      */
2045     ACAMERA_CONTROL_ZOOM_RATIO =                                // float
2046             ACAMERA_CONTROL_START + 47,
2047     ACAMERA_CONTROL_END,
2048 
2049     /**
2050      * <p>Operation mode for edge
2051      * enhancement.</p>
2052      *
2053      * <p>Type: byte (acamera_metadata_enum_android_edge_mode_t)</p>
2054      *
2055      * <p>This tag may appear in:
2056      * <ul>
2057      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2058      *   <li>ACaptureRequest</li>
2059      * </ul></p>
2060      *
2061      * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
2062      * no enhancement will be applied by the camera device.</p>
2063      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
2064      * will be applied. HIGH_QUALITY mode indicates that the
2065      * camera device will use the highest-quality enhancement algorithms,
2066      * even if it slows down capture rate. FAST means the camera device will
2067      * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
2068      * edge enhancement will slow down capture rate. Every output stream will have a similar
2069      * amount of enhancement applied.</p>
2070      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2071      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2072      * into a final capture when triggered by the user. In this mode, the camera device applies
2073      * edge enhancement to low-resolution streams (below maximum recording resolution) to
2074      * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
2075      * since those will be reprocessed later if necessary.</p>
2076      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
2077      * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
2078      * The camera device may adjust its internal edge enhancement parameters for best
2079      * image quality based on the android.reprocess.effectiveExposureFactor, if it is set.</p>
2080      */
2081     ACAMERA_EDGE_MODE =                                         // byte (acamera_metadata_enum_android_edge_mode_t)
2082             ACAMERA_EDGE_START,
2083     /**
2084      * <p>List of edge enhancement modes for ACAMERA_EDGE_MODE that are supported by this camera
2085      * device.</p>
2086      *
2087      * @see ACAMERA_EDGE_MODE
2088      *
2089      * <p>Type: byte[n]</p>
2090      *
2091      * <p>This tag may appear in:
2092      * <ul>
2093      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2094      * </ul></p>
2095      *
2096      * <p>Full-capability camera devices must always support OFF; camera devices that support
2097      * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
2098      * list FAST.</p>
2099      */
2100     ACAMERA_EDGE_AVAILABLE_EDGE_MODES =                         // byte[n]
2101             ACAMERA_EDGE_START + 2,
2102     ACAMERA_EDGE_END,
2103 
2104     /**
2105      * <p>The desired mode for for the camera device's flash control.</p>
2106      *
2107      * <p>Type: byte (acamera_metadata_enum_android_flash_mode_t)</p>
2108      *
2109      * <p>This tag may appear in:
2110      * <ul>
2111      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2112      *   <li>ACaptureRequest</li>
2113      * </ul></p>
2114      *
2115      * <p>This control is only effective when flash unit is available
2116      * (<code>ACAMERA_FLASH_INFO_AVAILABLE == true</code>).</p>
2117      * <p>When this control is used, the ACAMERA_CONTROL_AE_MODE must be set to ON or OFF.
2118      * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2119      * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2120      * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2121      * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2122      * device's auto-exposure routine's result. When used in still capture case, this
2123      * control should be used along with auto-exposure (AE) precapture metering sequence
2124      * (ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER), otherwise, the image may be incorrectly exposed.</p>
2125      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2126      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
2127      * <p>The flash status will be reported by ACAMERA_FLASH_STATE in the capture result metadata.</p>
2128      *
2129      * @see ACAMERA_CONTROL_AE_MODE
2130      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
2131      * @see ACAMERA_FLASH_INFO_AVAILABLE
2132      * @see ACAMERA_FLASH_STATE
2133      */
2134     ACAMERA_FLASH_MODE =                                        // byte (acamera_metadata_enum_android_flash_mode_t)
2135             ACAMERA_FLASH_START + 2,
2136     /**
2137      * <p>Current state of the flash
2138      * unit.</p>
2139      *
2140      * <p>Type: byte (acamera_metadata_enum_android_flash_state_t)</p>
2141      *
2142      * <p>This tag may appear in:
2143      * <ul>
2144      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2145      * </ul></p>
2146      *
2147      * <p>When the camera device doesn't have flash unit
2148      * (i.e. <code>ACAMERA_FLASH_INFO_AVAILABLE == false</code>), this state will always be UNAVAILABLE.
2149      * Other states indicate the current flash status.</p>
2150      * <p>In certain conditions, this will be available on LEGACY devices:</p>
2151      * <ul>
2152      * <li>Flash-less cameras always return UNAVAILABLE.</li>
2153      * <li>Using ACAMERA_CONTROL_AE_MODE <code>==</code> ON_ALWAYS_FLASH
2154      *    will always return FIRED.</li>
2155      * <li>Using ACAMERA_FLASH_MODE <code>==</code> TORCH
2156      *    will always return FIRED.</li>
2157      * </ul>
2158      * <p>In all other conditions the state will not be available on
2159      * LEGACY devices (i.e. it will be <code>null</code>).</p>
2160      *
2161      * @see ACAMERA_CONTROL_AE_MODE
2162      * @see ACAMERA_FLASH_INFO_AVAILABLE
2163      * @see ACAMERA_FLASH_MODE
2164      */
2165     ACAMERA_FLASH_STATE =                                       // byte (acamera_metadata_enum_android_flash_state_t)
2166             ACAMERA_FLASH_START + 5,
2167     ACAMERA_FLASH_END,
2168 
2169     /**
2170      * <p>Whether this camera device has a
2171      * flash unit.</p>
2172      *
2173      * <p>Type: byte (acamera_metadata_enum_android_flash_info_available_t)</p>
2174      *
2175      * <p>This tag may appear in:
2176      * <ul>
2177      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2178      * </ul></p>
2179      *
2180      * <p>Will be <code>false</code> if no flash is available.</p>
2181      * <p>If there is no flash unit, none of the flash controls do
2182      * anything.</p>
2183      */
2184     ACAMERA_FLASH_INFO_AVAILABLE =                              // byte (acamera_metadata_enum_android_flash_info_available_t)
2185             ACAMERA_FLASH_INFO_START,
2186     /**
2187      * <p>Maximum flashlight brightness level.</p>
2188      *
2189      * <p>Type: int32</p>
2190      *
2191      * <p>This tag may appear in:
2192      * <ul>
2193      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2194      * </ul></p>
2195      *
2196      * <p>If this value is greater than 1, then the device supports controlling the
2197      * flashlight brightness level via
2198      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#turnOnTorchWithStrengthLevel">CameraManager#turnOnTorchWithStrengthLevel</a>.
2199      * If this value is equal to 1, flashlight brightness control is not supported.
2200      * The value for this key will be null for devices with no flash unit.</p>
2201      * <p>The maximum value is guaranteed to be safe to use for an indefinite duration in
2202      * terms of device flashlight lifespan, but may be too bright for comfort for many
2203      * use cases. Use the default torch brightness value to avoid problems with an
2204      * over-bright flashlight.</p>
2205      */
2206     ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL =                 // int32
2207             ACAMERA_FLASH_INFO_START + 2,
2208     /**
2209      * <p>Default flashlight brightness level to be set via
2210      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#turnOnTorchWithStrengthLevel">CameraManager#turnOnTorchWithStrengthLevel</a>.</p>
2211      *
2212      * <p>Type: int32</p>
2213      *
2214      * <p>This tag may appear in:
2215      * <ul>
2216      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2217      * </ul></p>
2218      *
2219      * <p>If flash unit is available this will be greater than or equal to 1 and less
2220      * or equal to <code>ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL</code>.</p>
2221      * <p>Setting flashlight brightness above the default level
2222      * (i.e.<code>ACAMERA_FLASH_INFO_STRENGTH_DEFAULT_LEVEL</code>) may make the device more
2223      * likely to reach thermal throttling conditions and slow down, or drain the
2224      * battery quicker than normal. To minimize such issues, it is recommended to
2225      * start the flashlight at this default brightness until a user explicitly requests
2226      * a brighter level.
2227      * Note that the value for this key will be null for devices with no flash unit.
2228      * The default level should always be &gt; 0.</p>
2229      *
2230      * @see ACAMERA_FLASH_INFO_STRENGTH_DEFAULT_LEVEL
2231      * @see ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL
2232      */
2233     ACAMERA_FLASH_INFO_STRENGTH_DEFAULT_LEVEL =                 // int32
2234             ACAMERA_FLASH_INFO_START + 3,
2235     ACAMERA_FLASH_INFO_END,
2236 
2237     /**
2238      * <p>Operational mode for hot pixel correction.</p>
2239      *
2240      * <p>Type: byte (acamera_metadata_enum_android_hot_pixel_mode_t)</p>
2241      *
2242      * <p>This tag may appear in:
2243      * <ul>
2244      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2245      *   <li>ACaptureRequest</li>
2246      * </ul></p>
2247      *
2248      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
2249      * that do not accurately measure the incoming light (i.e. pixels that
2250      * are stuck at an arbitrary value or are oversensitive).</p>
2251      */
2252     ACAMERA_HOT_PIXEL_MODE =                                    // byte (acamera_metadata_enum_android_hot_pixel_mode_t)
2253             ACAMERA_HOT_PIXEL_START,
2254     /**
2255      * <p>List of hot pixel correction modes for ACAMERA_HOT_PIXEL_MODE that are supported by this
2256      * camera device.</p>
2257      *
2258      * @see ACAMERA_HOT_PIXEL_MODE
2259      *
2260      * <p>Type: byte[n]</p>
2261      *
2262      * <p>This tag may appear in:
2263      * <ul>
2264      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2265      * </ul></p>
2266      *
2267      * <p>FULL mode camera devices will always support FAST.</p>
2268      */
2269     ACAMERA_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =               // byte[n]
2270             ACAMERA_HOT_PIXEL_START + 1,
2271     ACAMERA_HOT_PIXEL_END,
2272 
2273     /**
2274      * <p>GPS coordinates to include in output JPEG
2275      * EXIF.</p>
2276      *
2277      * <p>Type: double[3]</p>
2278      *
2279      * <p>This tag may appear in:
2280      * <ul>
2281      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2282      *   <li>ACaptureRequest</li>
2283      * </ul></p>
2284      *
2285      * <p>This tag is also used for HEIC image capture.</p>
2286      */
2287     ACAMERA_JPEG_GPS_COORDINATES =                              // double[3]
2288             ACAMERA_JPEG_START,
2289     /**
2290      * <p>32 characters describing GPS algorithm to
2291      * include in EXIF.</p>
2292      *
2293      * <p>Type: byte</p>
2294      *
2295      * <p>This tag may appear in:
2296      * <ul>
2297      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2298      *   <li>ACaptureRequest</li>
2299      * </ul></p>
2300      *
2301      * <p>This tag is also used for HEIC image capture.</p>
2302      */
2303     ACAMERA_JPEG_GPS_PROCESSING_METHOD =                        // byte
2304             ACAMERA_JPEG_START + 1,
2305     /**
2306      * <p>Time GPS fix was made to include in
2307      * EXIF.</p>
2308      *
2309      * <p>Type: int64</p>
2310      *
2311      * <p>This tag may appear in:
2312      * <ul>
2313      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2314      *   <li>ACaptureRequest</li>
2315      * </ul></p>
2316      *
2317      * <p>This tag is also used for HEIC image capture.</p>
2318      */
2319     ACAMERA_JPEG_GPS_TIMESTAMP =                                // int64
2320             ACAMERA_JPEG_START + 2,
2321     /**
2322      * <p>The orientation for a JPEG image.</p>
2323      *
2324      * <p>Type: int32</p>
2325      *
2326      * <p>This tag may appear in:
2327      * <ul>
2328      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2329      *   <li>ACaptureRequest</li>
2330      * </ul></p>
2331      *
2332      * <p>The clockwise rotation angle in degrees, relative to the orientation
2333      * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2334      * upright.</p>
2335      * <p>Camera devices may either encode this value into the JPEG EXIF header, or
2336      * rotate the image data to match this orientation. When the image data is rotated,
2337      * the thumbnail data will also be rotated.</p>
2338      * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2339      * by ACAMERA_SENSOR_ORIENTATION.</p>
2340      * <p>To translate from the device orientation given by the Android sensor APIs for camera
2341      * sensors which are not EXTERNAL, the following sample code may be used:</p>
2342      * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2343      *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2344      *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2345      *
2346      *     // Round device orientation to a multiple of 90
2347      *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2348      *
2349      *     // Reverse device orientation for front-facing cameras
2350      *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2351      *     if (facingFront) deviceOrientation = -deviceOrientation;
2352      *
2353      *     // Calculate desired JPEG orientation relative to camera orientation to make
2354      *     // the image upright relative to the device orientation
2355      *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2356      *
2357      *     return jpegOrientation;
2358      * }
2359      * </code></pre>
2360      * <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
2361      * also be set to EXTERNAL. The above code is not relevant in such case.</p>
2362      * <p>This tag is also used to describe the orientation of the HEIC image capture, in which
2363      * case the rotation is reflected by
2364      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2365      * rotating the image data itself.</p>
2366      *
2367      * @see ACAMERA_SENSOR_ORIENTATION
2368      */
2369     ACAMERA_JPEG_ORIENTATION =                                  // int32
2370             ACAMERA_JPEG_START + 3,
2371     /**
2372      * <p>Compression quality of the final JPEG
2373      * image.</p>
2374      *
2375      * <p>Type: byte</p>
2376      *
2377      * <p>This tag may appear in:
2378      * <ul>
2379      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2380      *   <li>ACaptureRequest</li>
2381      * </ul></p>
2382      *
2383      * <p>85-95 is typical usage range. This tag is also used to describe the quality
2384      * of the HEIC image capture.</p>
2385      */
2386     ACAMERA_JPEG_QUALITY =                                      // byte
2387             ACAMERA_JPEG_START + 4,
2388     /**
2389      * <p>Compression quality of JPEG
2390      * thumbnail.</p>
2391      *
2392      * <p>Type: byte</p>
2393      *
2394      * <p>This tag may appear in:
2395      * <ul>
2396      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2397      *   <li>ACaptureRequest</li>
2398      * </ul></p>
2399      *
2400      * <p>This tag is also used to describe the quality of the HEIC image capture.</p>
2401      */
2402     ACAMERA_JPEG_THUMBNAIL_QUALITY =                            // byte
2403             ACAMERA_JPEG_START + 5,
2404     /**
2405      * <p>Resolution of embedded JPEG thumbnail.</p>
2406      *
2407      * <p>Type: int32[2]</p>
2408      *
2409      * <p>This tag may appear in:
2410      * <ul>
2411      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2412      *   <li>ACaptureRequest</li>
2413      * </ul></p>
2414      *
2415      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2416      * but the captured JPEG will still be a valid image.</p>
2417      * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2418      * should have the same aspect ratio as the main JPEG output.</p>
2419      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2420      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2421      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2422      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2423      * generate the thumbnail image. The thumbnail image will always have a smaller Field
2424      * Of View (FOV) than the primary image when aspect ratios differ.</p>
2425      * <p>When an ACAMERA_JPEG_ORIENTATION of non-zero degree is requested,
2426      * the camera device will handle thumbnail rotation in one of the following ways:</p>
2427      * <ul>
2428      * <li>Set the <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>
2429      *   and keep jpeg and thumbnail image data unrotated.</li>
2430      * <li>Rotate the jpeg and thumbnail image data and not set
2431      *   <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>. In this
2432      *   case, LIMITED or FULL hardware level devices will report rotated thumbnail size in
2433      *   capture result, so the width and height will be interchanged if 90 or 270 degree
2434      *   orientation is requested. LEGACY device will always report unrotated thumbnail
2435      *   size.</li>
2436      * </ul>
2437      * <p>The tag is also used as thumbnail size for HEIC image format capture, in which case the
2438      * the thumbnail rotation is reflected by
2439      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2440      * rotating the thumbnail data itself.</p>
2441      *
2442      * @see ACAMERA_JPEG_ORIENTATION
2443      */
2444     ACAMERA_JPEG_THUMBNAIL_SIZE =                               // int32[2]
2445             ACAMERA_JPEG_START + 6,
2446     /**
2447      * <p>List of JPEG thumbnail sizes for ACAMERA_JPEG_THUMBNAIL_SIZE supported by this
2448      * camera device.</p>
2449      *
2450      * @see ACAMERA_JPEG_THUMBNAIL_SIZE
2451      *
2452      * <p>Type: int32[2*n]</p>
2453      *
2454      * <p>This tag may appear in:
2455      * <ul>
2456      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2457      * </ul></p>
2458      *
2459      * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
2460      * thumbnail should be generated.</p>
2461      * <p>Below conditions will be satisfied for this size list:</p>
2462      * <ul>
2463      * <li>The sizes will be sorted by increasing pixel area (width x height).
2464      * If several resolutions have the same area, they will be sorted by increasing width.</li>
2465      * <li>The aspect ratio of the largest thumbnail size will be same as the
2466      * aspect ratio of largest JPEG output size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
2467      * The largest size is defined as the size that has the largest pixel area
2468      * in a given size list.</li>
2469      * <li>Each output JPEG size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS will have at least
2470      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
2471      * and vice versa.</li>
2472      * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
2473      * </ul>
2474      * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
2475      *
2476      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
2477      */
2478     ACAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES =                    // int32[2*n]
2479             ACAMERA_JPEG_START + 7,
2480     ACAMERA_JPEG_END,
2481 
2482     /**
2483      * <p>The desired lens aperture size, as a ratio of lens focal length to the
2484      * effective aperture diameter.</p>
2485      *
2486      * <p>Type: float</p>
2487      *
2488      * <p>This tag may appear in:
2489      * <ul>
2490      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2491      *   <li>ACaptureRequest</li>
2492      * </ul></p>
2493      *
2494      * <p>Setting this value is only supported on the camera devices that have a variable
2495      * aperture lens.</p>
2496      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is OFF,
2497      * this can be set along with ACAMERA_SENSOR_EXPOSURE_TIME,
2498      * ACAMERA_SENSOR_SENSITIVITY, and ACAMERA_SENSOR_FRAME_DURATION
2499      * to achieve manual exposure control.</p>
2500      * <p>The requested aperture value may take several frames to reach the
2501      * requested value; the camera device will report the current (intermediate)
2502      * aperture size in capture result metadata while the aperture is changing.
2503      * While the aperture is still changing, ACAMERA_LENS_STATE will be set to MOVING.</p>
2504      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is one of
2505      * the ON modes, this will be overridden by the camera device
2506      * auto-exposure algorithm, the overridden values are then provided
2507      * back to the user in the corresponding result.</p>
2508      *
2509      * @see ACAMERA_CONTROL_AE_MODE
2510      * @see ACAMERA_LENS_STATE
2511      * @see ACAMERA_SENSOR_EXPOSURE_TIME
2512      * @see ACAMERA_SENSOR_FRAME_DURATION
2513      * @see ACAMERA_SENSOR_SENSITIVITY
2514      */
2515     ACAMERA_LENS_APERTURE =                                     // float
2516             ACAMERA_LENS_START,
2517     /**
2518      * <p>The desired setting for the lens neutral density filter(s).</p>
2519      *
2520      * <p>Type: float</p>
2521      *
2522      * <p>This tag may appear in:
2523      * <ul>
2524      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2525      *   <li>ACaptureRequest</li>
2526      * </ul></p>
2527      *
2528      * <p>This control will not be supported on most camera devices.</p>
2529      * <p>Lens filters are typically used to lower the amount of light the
2530      * sensor is exposed to (measured in steps of EV). As used here, an EV
2531      * step is the standard logarithmic representation, which are
2532      * non-negative, and inversely proportional to the amount of light
2533      * hitting the sensor.  For example, setting this to 0 would result
2534      * in no reduction of the incoming light, and setting this to 2 would
2535      * mean that the filter is set to reduce incoming light by two stops
2536      * (allowing 1/4 of the prior amount of light to the sensor).</p>
2537      * <p>It may take several frames before the lens filter density changes
2538      * to the requested value. While the filter density is still changing,
2539      * ACAMERA_LENS_STATE will be set to MOVING.</p>
2540      *
2541      * @see ACAMERA_LENS_STATE
2542      */
2543     ACAMERA_LENS_FILTER_DENSITY =                               // float
2544             ACAMERA_LENS_START + 1,
2545     /**
2546      * <p>The desired lens focal length; used for optical zoom.</p>
2547      *
2548      * <p>Type: float</p>
2549      *
2550      * <p>This tag may appear in:
2551      * <ul>
2552      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2553      *   <li>ACaptureRequest</li>
2554      * </ul></p>
2555      *
2556      * <p>This setting controls the physical focal length of the camera
2557      * device's lens. Changing the focal length changes the field of
2558      * view of the camera device, and is usually used for optical zoom.</p>
2559      * <p>Like ACAMERA_LENS_FOCUS_DISTANCE and ACAMERA_LENS_APERTURE, this
2560      * setting won't be applied instantaneously, and it may take several
2561      * frames before the lens can change to the requested focal length.
2562      * While the focal length is still changing, ACAMERA_LENS_STATE will
2563      * be set to MOVING.</p>
2564      * <p>Optical zoom via this control will not be supported on most devices. Starting from API
2565      * level 30, the camera device may combine optical and digital zoom through the
2566      * ACAMERA_CONTROL_ZOOM_RATIO control.</p>
2567      *
2568      * @see ACAMERA_CONTROL_ZOOM_RATIO
2569      * @see ACAMERA_LENS_APERTURE
2570      * @see ACAMERA_LENS_FOCUS_DISTANCE
2571      * @see ACAMERA_LENS_STATE
2572      */
2573     ACAMERA_LENS_FOCAL_LENGTH =                                 // float
2574             ACAMERA_LENS_START + 2,
2575     /**
2576      * <p>Desired distance to plane of sharpest focus,
2577      * measured from frontmost surface of the lens.</p>
2578      *
2579      * <p>Type: float</p>
2580      *
2581      * <p>This tag may appear in:
2582      * <ul>
2583      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2584      *   <li>ACaptureRequest</li>
2585      * </ul></p>
2586      *
2587      * <p>Should be zero for fixed-focus cameras</p>
2588      */
2589     ACAMERA_LENS_FOCUS_DISTANCE =                               // float
2590             ACAMERA_LENS_START + 3,
2591     /**
2592      * <p>Sets whether the camera device uses optical image stabilization (OIS)
2593      * when capturing images.</p>
2594      *
2595      * <p>Type: byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)</p>
2596      *
2597      * <p>This tag may appear in:
2598      * <ul>
2599      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2600      *   <li>ACaptureRequest</li>
2601      * </ul></p>
2602      *
2603      * <p>OIS is used to compensate for motion blur due to small
2604      * movements of the camera during capture. Unlike digital image
2605      * stabilization (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), OIS
2606      * makes use of mechanical elements to stabilize the camera
2607      * sensor, and thus allows for longer exposure times before
2608      * camera shake becomes apparent.</p>
2609      * <p>Switching between different optical stabilization modes may take several
2610      * frames to initialize, the camera device will report the current mode in
2611      * capture result metadata. For example, When "ON" mode is requested, the
2612      * optical stabilization modes in the first several capture results may still
2613      * be "OFF", and it will become "ON" when the initialization is done.</p>
2614      * <p>If a camera device supports both OIS and digital image stabilization
2615      * (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), turning both modes on may produce undesirable
2616      * interaction, so it is recommended not to enable both at the same time.</p>
2617      * <p>If ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE is set to "PREVIEW_STABILIZATION",
2618      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE is overridden. The camera sub-system may choose
2619      * to turn on hardware based image stabilization in addition to software based stabilization
2620      * if it deems that appropriate. This key's value in the capture result will reflect which
2621      * OIS mode was chosen.</p>
2622      * <p>Not all devices will support OIS; see
2623      * ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION for
2624      * available controls.</p>
2625      *
2626      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
2627      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
2628      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
2629      */
2630     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE =                   // byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)
2631             ACAMERA_LENS_START + 4,
2632     /**
2633      * <p>Direction the camera faces relative to
2634      * device screen.</p>
2635      *
2636      * <p>Type: byte (acamera_metadata_enum_android_lens_facing_t)</p>
2637      *
2638      * <p>This tag may appear in:
2639      * <ul>
2640      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2641      * </ul></p>
2642      *
2643      */
2644     ACAMERA_LENS_FACING =                                       // byte (acamera_metadata_enum_android_lens_facing_t)
2645             ACAMERA_LENS_START + 5,
2646     /**
2647      * <p>The orientation of the camera relative to the sensor
2648      * coordinate system.</p>
2649      *
2650      * <p>Type: float[4]</p>
2651      *
2652      * <p>This tag may appear in:
2653      * <ul>
2654      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2655      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2656      * </ul></p>
2657      *
2658      * <p>The four coefficients that describe the quaternion
2659      * rotation from the Android sensor coordinate system to a
2660      * camera-aligned coordinate system where the X-axis is
2661      * aligned with the long side of the image sensor, the Y-axis
2662      * is aligned with the short side of the image sensor, and
2663      * the Z-axis is aligned with the optical axis of the sensor.</p>
2664      * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
2665      * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
2666      * amount <code>theta</code>, the following formulas can be used:</p>
2667      * <pre><code> theta = 2 * acos(w)
2668      * a_x = x / sin(theta/2)
2669      * a_y = y / sin(theta/2)
2670      * a_z = z / sin(theta/2)
2671      * </code></pre>
2672      * <p>To create a 3x3 rotation matrix that applies the rotation
2673      * defined by this quaternion, the following matrix can be
2674      * used:</p>
2675      * <pre><code>R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
2676      *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
2677      *            2xz - 2yw,       2yz + 2xw, 1 - 2x^2 - 2y^2 ]
2678      * </code></pre>
2679      * <p>This matrix can then be used to apply the rotation to a
2680      *  column vector point with</p>
2681      * <p><code>p' = Rp</code></p>
2682      * <p>where <code>p</code> is in the device sensor coordinate system, and
2683      *  <code>p'</code> is in the camera-oriented coordinate system.</p>
2684      * <p>If ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, the quaternion rotation cannot
2685      *  be accurately represented by the camera device, and will be represented by
2686      *  default values matching its default facing.</p>
2687      *
2688      * @see ACAMERA_LENS_POSE_REFERENCE
2689      */
2690     ACAMERA_LENS_POSE_ROTATION =                                // float[4]
2691             ACAMERA_LENS_START + 6,
2692     /**
2693      * <p>Position of the camera optical center.</p>
2694      *
2695      * <p>Type: float[3]</p>
2696      *
2697      * <p>This tag may appear in:
2698      * <ul>
2699      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2700      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2701      * </ul></p>
2702      *
2703      * <p>The position of the camera device's lens optical center,
2704      * as a three-dimensional vector <code>(x,y,z)</code>.</p>
2705      * <p>Prior to Android P, or when ACAMERA_LENS_POSE_REFERENCE is PRIMARY_CAMERA, this position
2706      * is relative to the optical center of the largest camera device facing in the same
2707      * direction as this camera, in the <a href="https://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor
2708      * coordinate axes</a>. Note that only the axis definitions are shared with the sensor
2709      * coordinate system, but not the origin.</p>
2710      * <p>If this device is the largest or only camera device with a given facing, then this
2711      * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
2712      * from the main sensor along the +X axis (to the right from the user's perspective) will
2713      * report <code>(0.03, 0, 0)</code>.  Note that this means that, for many computer vision
2714      * applications, the position needs to be negated to convert it to a translation from the
2715      * camera to the origin.</p>
2716      * <p>To transform a pixel coordinates between two cameras facing the same direction, first
2717      * the source camera ACAMERA_LENS_DISTORTION must be corrected for.  Then the source
2718      * camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs to be applied, followed by the
2719      * ACAMERA_LENS_POSE_ROTATION of the source camera, the translation of the source camera
2720      * relative to the destination camera, the ACAMERA_LENS_POSE_ROTATION of the destination
2721      * camera, and finally the inverse of ACAMERA_LENS_INTRINSIC_CALIBRATION of the destination
2722      * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
2723      * coordinates.</p>
2724      * <p>To compare this against a real image from the destination camera, the destination camera
2725      * image then needs to be corrected for radial distortion before comparison or sampling.</p>
2726      * <p>When ACAMERA_LENS_POSE_REFERENCE is GYROSCOPE, then this position is relative to
2727      * the center of the primary gyroscope on the device. The axis definitions are the same as
2728      * with PRIMARY_CAMERA.</p>
2729      * <p>When ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, this position cannot be accurately
2730      * represented by the camera device, and will be represented as <code>(0, 0, 0)</code>.</p>
2731      * <p>When ACAMERA_LENS_POSE_REFERENCE is AUTOMOTIVE, then this position is relative to the
2732      * origin of the automotive sensor coordinate system, which is at the center of the rear
2733      * axle.</p>
2734      *
2735      * @see ACAMERA_LENS_DISTORTION
2736      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2737      * @see ACAMERA_LENS_POSE_REFERENCE
2738      * @see ACAMERA_LENS_POSE_ROTATION
2739      */
2740     ACAMERA_LENS_POSE_TRANSLATION =                             // float[3]
2741             ACAMERA_LENS_START + 7,
2742     /**
2743      * <p>The range of scene distances that are in
2744      * sharp focus (depth of field).</p>
2745      *
2746      * <p>Type: float[2]</p>
2747      *
2748      * <p>This tag may appear in:
2749      * <ul>
2750      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2751      * </ul></p>
2752      *
2753      * <p>If variable focus not supported, can still report
2754      * fixed depth of field range</p>
2755      */
2756     ACAMERA_LENS_FOCUS_RANGE =                                  // float[2]
2757             ACAMERA_LENS_START + 8,
2758     /**
2759      * <p>Current lens status.</p>
2760      *
2761      * <p>Type: byte (acamera_metadata_enum_android_lens_state_t)</p>
2762      *
2763      * <p>This tag may appear in:
2764      * <ul>
2765      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2766      * </ul></p>
2767      *
2768      * <p>For lens parameters ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
2769      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE, when changes are requested,
2770      * they may take several frames to reach the requested values. This state indicates
2771      * the current status of the lens parameters.</p>
2772      * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
2773      * either because the parameters are all fixed, or because the lens has had enough
2774      * time to reach the most recently-requested values.
2775      * If all these lens parameters are not changeable for a camera device, as listed below:</p>
2776      * <ul>
2777      * <li>Fixed focus (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE == 0</code>), which means
2778      * ACAMERA_LENS_FOCUS_DISTANCE parameter will always be 0.</li>
2779      * <li>Fixed focal length (ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS contains single value),
2780      * which means the optical zoom is not supported.</li>
2781      * <li>No ND filter (ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES contains only 0).</li>
2782      * <li>Fixed aperture (ACAMERA_LENS_INFO_AVAILABLE_APERTURES contains single value).</li>
2783      * </ul>
2784      * <p>Then this state will always be STATIONARY.</p>
2785      * <p>When the state is MOVING, it indicates that at least one of the lens parameters
2786      * is changing.</p>
2787      *
2788      * @see ACAMERA_LENS_APERTURE
2789      * @see ACAMERA_LENS_FILTER_DENSITY
2790      * @see ACAMERA_LENS_FOCAL_LENGTH
2791      * @see ACAMERA_LENS_FOCUS_DISTANCE
2792      * @see ACAMERA_LENS_INFO_AVAILABLE_APERTURES
2793      * @see ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES
2794      * @see ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS
2795      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
2796      */
2797     ACAMERA_LENS_STATE =                                        // byte (acamera_metadata_enum_android_lens_state_t)
2798             ACAMERA_LENS_START + 9,
2799     /**
2800      * <p>The parameters for this camera device's intrinsic
2801      * calibration.</p>
2802      *
2803      * <p>Type: float[5]</p>
2804      *
2805      * <p>This tag may appear in:
2806      * <ul>
2807      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2808      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2809      * </ul></p>
2810      *
2811      * <p>The five calibration parameters that describe the
2812      * transform from camera-centric 3D coordinates to sensor
2813      * pixel coordinates:</p>
2814      * <pre><code>[f_x, f_y, c_x, c_y, s]
2815      * </code></pre>
2816      * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
2817      * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
2818      * axis, and <code>s</code> is a skew parameter for the sensor plane not
2819      * being aligned with the lens plane.</p>
2820      * <p>These are typically used within a transformation matrix K:</p>
2821      * <pre><code>K = [ f_x,   s, c_x,
2822      *        0, f_y, c_y,
2823      *        0    0,   1 ]
2824      * </code></pre>
2825      * <p>which can then be combined with the camera pose rotation
2826      * <code>R</code> and translation <code>t</code> (ACAMERA_LENS_POSE_ROTATION and
2827      * ACAMERA_LENS_POSE_TRANSLATION, respectively) to calculate the
2828      * complete transform from world coordinates to pixel
2829      * coordinates:</p>
2830      * <pre><code>P = [ K 0   * [ R -Rt
2831      *      0 1 ]      0 1 ]
2832      * </code></pre>
2833      * <p>(Note the negation of poseTranslation when mapping from camera
2834      * to world coordinates, and multiplication by the rotation).</p>
2835      * <p>With <code>p_w</code> being a point in the world coordinate system
2836      * and <code>p_s</code> being a point in the camera active pixel array
2837      * coordinate system, and with the mapping including the
2838      * homogeneous division by z:</p>
2839      * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
2840      * p_s = p_h / z_h
2841      * </code></pre>
2842      * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
2843      * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
2844      * (depth) in pixel coordinates.</p>
2845      * <p>Note that the coordinate system for this transform is the
2846      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE system,
2847      * where <code>(0,0)</code> is the top-left of the
2848      * preCorrectionActiveArraySize rectangle. Once the pose and
2849      * intrinsic calibration transforms have been applied to a
2850      * world point, then the ACAMERA_LENS_DISTORTION
2851      * transform needs to be applied, and the result adjusted to
2852      * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate
2853      * system (where <code>(0, 0)</code> is the top-left of the
2854      * activeArraySize rectangle), to determine the final pixel
2855      * coordinate of the world point for processed (non-RAW)
2856      * output buffers.</p>
2857      * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
2858      * coordinate <code>(x + 0.5, y + 0.5)</code>.  So on a device with a
2859      * precorrection active array of size <code>(10,10)</code>, the valid pixel
2860      * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
2861      * have an optical center at the exact center of the pixel grid, at
2862      * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
2863      * <code>(5,5)</code>.</p>
2864      *
2865      * @see ACAMERA_LENS_DISTORTION
2866      * @see ACAMERA_LENS_POSE_ROTATION
2867      * @see ACAMERA_LENS_POSE_TRANSLATION
2868      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
2869      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
2870      */
2871     ACAMERA_LENS_INTRINSIC_CALIBRATION =                        // float[5]
2872             ACAMERA_LENS_START + 10,
2873     ACAMERA_LENS_RADIAL_DISTORTION =                            // Deprecated! DO NOT USE
2874             ACAMERA_LENS_START + 11,
2875     /**
2876      * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION, and the accuracy of
2877      * ACAMERA_LENS_POSE_TRANSLATION and ACAMERA_LENS_POSE_ROTATION.</p>
2878      *
2879      * @see ACAMERA_LENS_POSE_ROTATION
2880      * @see ACAMERA_LENS_POSE_TRANSLATION
2881      *
2882      * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p>
2883      *
2884      * <p>This tag may appear in:
2885      * <ul>
2886      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2887      * </ul></p>
2888      *
2889      * <p>Different calibration methods and use cases can produce better or worse results
2890      * depending on the selected coordinate origin.</p>
2891      */
2892     ACAMERA_LENS_POSE_REFERENCE =                               // byte (acamera_metadata_enum_android_lens_pose_reference_t)
2893             ACAMERA_LENS_START + 12,
2894     /**
2895      * <p>The correction coefficients to correct for this camera device's
2896      * radial and tangential lens distortion.</p>
2897      * <p>Replaces the deprecated ACAMERA_LENS_RADIAL_DISTORTION field, which was
2898      * inconsistently defined.</p>
2899      *
2900      * @see ACAMERA_LENS_RADIAL_DISTORTION
2901      *
2902      * <p>Type: float[5]</p>
2903      *
2904      * <p>This tag may appear in:
2905      * <ul>
2906      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2907      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2908      * </ul></p>
2909      *
2910      * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
2911      * kappa_3]</code> and two tangential distortion coefficients
2912      * <code>[kappa_4, kappa_5]</code> that can be used to correct the
2913      * lens's geometric distortion with the mapping equations:</p>
2914      * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2915      *        kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
2916      *  y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
2917      *        kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
2918      * </code></pre>
2919      * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
2920      * input image that correspond to the pixel values in the
2921      * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
2922      * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
2923      * </code></pre>
2924      * <p>The pixel coordinates are defined in a coordinate system
2925      * related to the ACAMERA_LENS_INTRINSIC_CALIBRATION
2926      * calibration fields; see that entry for details of the mapping stages.
2927      * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
2928      * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
2929      * the range of the coordinates depends on the focal length
2930      * terms of the intrinsic calibration.</p>
2931      * <p>Finally, <code>r</code> represents the radial distance from the
2932      * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
2933      * <p>The distortion model used is the Brown-Conrady model.</p>
2934      *
2935      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2936      */
2937     ACAMERA_LENS_DISTORTION =                                   // float[5]
2938             ACAMERA_LENS_START + 13,
2939     /**
2940      * <p>The correction coefficients to correct for this camera device's
2941      * radial and tangential lens distortion for a
2942      * CaptureRequest with ACAMERA_SENSOR_PIXEL_MODE set to
2943      * <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>
2944      *
2945      * @see ACAMERA_SENSOR_PIXEL_MODE
2946      *
2947      * <p>Type: float[5]</p>
2948      *
2949      * <p>This tag may appear in:
2950      * <ul>
2951      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2952      * </ul></p>
2953      *
2954      * <p>Analogous to ACAMERA_LENS_DISTORTION, when ACAMERA_SENSOR_PIXEL_MODE is set to
2955      * <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>
2956      *
2957      * @see ACAMERA_LENS_DISTORTION
2958      * @see ACAMERA_SENSOR_PIXEL_MODE
2959      */
2960     ACAMERA_LENS_DISTORTION_MAXIMUM_RESOLUTION =                // float[5]
2961             ACAMERA_LENS_START + 14,
2962     /**
2963      * <p>The parameters for this camera device's intrinsic
2964      * calibration when ACAMERA_SENSOR_PIXEL_MODE is set to
2965      * <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>
2966      *
2967      * @see ACAMERA_SENSOR_PIXEL_MODE
2968      *
2969      * <p>Type: float[5]</p>
2970      *
2971      * <p>This tag may appear in:
2972      * <ul>
2973      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2974      * </ul></p>
2975      *
2976      * <p>Analogous to ACAMERA_LENS_INTRINSIC_CALIBRATION, when ACAMERA_SENSOR_PIXEL_MODE is set to
2977      * <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>
2978      *
2979      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
2980      * @see ACAMERA_SENSOR_PIXEL_MODE
2981      */
2982     ACAMERA_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION =     // float[5]
2983             ACAMERA_LENS_START + 15,
2984     ACAMERA_LENS_END,
2985 
2986     /**
2987      * <p>List of aperture size values for ACAMERA_LENS_APERTURE that are
2988      * supported by this camera device.</p>
2989      *
2990      * @see ACAMERA_LENS_APERTURE
2991      *
2992      * <p>Type: float[n]</p>
2993      *
2994      * <p>This tag may appear in:
2995      * <ul>
2996      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2997      * </ul></p>
2998      *
2999      * <p>If the camera device doesn't support a variable lens aperture,
3000      * this list will contain only one value, which is the fixed aperture size.</p>
3001      * <p>If the camera device supports a variable aperture, the aperture values
3002      * in this list will be sorted in ascending order.</p>
3003      */
3004     ACAMERA_LENS_INFO_AVAILABLE_APERTURES =                     // float[n]
3005             ACAMERA_LENS_INFO_START,
3006     /**
3007      * <p>List of neutral density filter values for
3008      * ACAMERA_LENS_FILTER_DENSITY that are supported by this camera device.</p>
3009      *
3010      * @see ACAMERA_LENS_FILTER_DENSITY
3011      *
3012      * <p>Type: float[n]</p>
3013      *
3014      * <p>This tag may appear in:
3015      * <ul>
3016      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3017      * </ul></p>
3018      *
3019      * <p>If a neutral density filter is not supported by this camera device,
3020      * this list will contain only 0. Otherwise, this list will include every
3021      * filter density supported by the camera device, in ascending order.</p>
3022      */
3023     ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES =              // float[n]
3024             ACAMERA_LENS_INFO_START + 1,
3025     /**
3026      * <p>List of focal lengths for ACAMERA_LENS_FOCAL_LENGTH that are supported by this camera
3027      * device.</p>
3028      *
3029      * @see ACAMERA_LENS_FOCAL_LENGTH
3030      *
3031      * <p>Type: float[n]</p>
3032      *
3033      * <p>This tag may appear in:
3034      * <ul>
3035      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3036      * </ul></p>
3037      *
3038      * <p>If optical zoom is not supported, this list will only contain
3039      * a single value corresponding to the fixed focal length of the
3040      * device. Otherwise, this list will include every focal length supported
3041      * by the camera device, in ascending order.</p>
3042      */
3043     ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS =                 // float[n]
3044             ACAMERA_LENS_INFO_START + 2,
3045     /**
3046      * <p>List of optical image stabilization (OIS) modes for
3047      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE that are supported by this camera device.</p>
3048      *
3049      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
3050      *
3051      * <p>Type: byte[n]</p>
3052      *
3053      * <p>This tag may appear in:
3054      * <ul>
3055      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3056      * </ul></p>
3057      *
3058      * <p>If OIS is not supported by a given camera device, this list will
3059      * contain only OFF.</p>
3060      */
3061     ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =         // byte[n]
3062             ACAMERA_LENS_INFO_START + 3,
3063     /**
3064      * <p>Hyperfocal distance for this lens.</p>
3065      *
3066      * <p>Type: float</p>
3067      *
3068      * <p>This tag may appear in:
3069      * <ul>
3070      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3071      * </ul></p>
3072      *
3073      * <p>If the lens is not fixed focus, the camera device will report this
3074      * field when ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION is APPROXIMATE or CALIBRATED.</p>
3075      *
3076      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
3077      */
3078     ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE =                     // float
3079             ACAMERA_LENS_INFO_START + 4,
3080     /**
3081      * <p>Shortest distance from frontmost surface
3082      * of the lens that can be brought into sharp focus.</p>
3083      *
3084      * <p>Type: float</p>
3085      *
3086      * <p>This tag may appear in:
3087      * <ul>
3088      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3089      * </ul></p>
3090      *
3091      * <p>If the lens is fixed-focus, this will be
3092      * 0.</p>
3093      */
3094     ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE =                  // float
3095             ACAMERA_LENS_INFO_START + 5,
3096     /**
3097      * <p>Dimensions of lens shading map.</p>
3098      *
3099      * <p>Type: int32[2]</p>
3100      *
3101      * <p>This tag may appear in:
3102      * <ul>
3103      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3104      * </ul></p>
3105      *
3106      * <p>The map should be on the order of 30-40 rows and columns, and
3107      * must be smaller than 64x64.</p>
3108      */
3109     ACAMERA_LENS_INFO_SHADING_MAP_SIZE =                        // int32[2]
3110             ACAMERA_LENS_INFO_START + 6,
3111     /**
3112      * <p>The lens focus distance calibration quality.</p>
3113      *
3114      * <p>Type: byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)</p>
3115      *
3116      * <p>This tag may appear in:
3117      * <ul>
3118      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3119      * </ul></p>
3120      *
3121      * <p>The lens focus distance calibration quality determines the reliability of
3122      * focus related metadata entries, i.e. ACAMERA_LENS_FOCUS_DISTANCE,
3123      * ACAMERA_LENS_FOCUS_RANGE, ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE, and
3124      * ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE.</p>
3125      * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
3126      * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
3127      * and increasing positive numbers represent focusing closer and closer
3128      * to the camera device. The focus distance control also uses diopters
3129      * on these devices.</p>
3130      * <p>UNCALIBRATED devices do not use units that are directly comparable
3131      * to any real physical measurement, but <code>0.0f</code> still represents farthest
3132      * focus, and ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE represents the
3133      * nearest focus the device can achieve.</p>
3134      *
3135      * @see ACAMERA_LENS_FOCUS_DISTANCE
3136      * @see ACAMERA_LENS_FOCUS_RANGE
3137      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
3138      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
3139      */
3140     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION =              // byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)
3141             ACAMERA_LENS_INFO_START + 7,
3142     ACAMERA_LENS_INFO_END,
3143 
3144     /**
3145      * <p>Mode of operation for the noise reduction algorithm.</p>
3146      *
3147      * <p>Type: byte (acamera_metadata_enum_android_noise_reduction_mode_t)</p>
3148      *
3149      * <p>This tag may appear in:
3150      * <ul>
3151      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3152      *   <li>ACaptureRequest</li>
3153      * </ul></p>
3154      *
3155      * <p>The noise reduction algorithm attempts to improve image quality by removing
3156      * excessive noise added by the capture process, especially in dark conditions.</p>
3157      * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
3158      * YUV domain.</p>
3159      * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
3160      * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
3161      * This mode is optional, may not be support by all devices. The application should check
3162      * ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES before using it.</p>
3163      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
3164      * will be applied. HIGH_QUALITY mode indicates that the camera device
3165      * will use the highest-quality noise filtering algorithms,
3166      * even if it slows down capture rate. FAST means the camera device will not
3167      * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
3168      * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
3169      * Every output stream will have a similar amount of enhancement applied.</p>
3170      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
3171      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
3172      * into a final capture when triggered by the user. In this mode, the camera device applies
3173      * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
3174      * preview quality, but does not apply noise reduction to high-resolution streams, since
3175      * those will be reprocessed later if necessary.</p>
3176      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
3177      * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
3178      * may adjust the noise reduction parameters for best image quality based on the
3179      * android.reprocess.effectiveExposureFactor if it is set.</p>
3180      *
3181      * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
3182      */
3183     ACAMERA_NOISE_REDUCTION_MODE =                              // byte (acamera_metadata_enum_android_noise_reduction_mode_t)
3184             ACAMERA_NOISE_REDUCTION_START,
3185     /**
3186      * <p>List of noise reduction modes for ACAMERA_NOISE_REDUCTION_MODE that are supported
3187      * by this camera device.</p>
3188      *
3189      * @see ACAMERA_NOISE_REDUCTION_MODE
3190      *
3191      * <p>Type: byte[n]</p>
3192      *
3193      * <p>This tag may appear in:
3194      * <ul>
3195      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3196      * </ul></p>
3197      *
3198      * <p>Full-capability camera devices will always support OFF and FAST.</p>
3199      * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
3200      * ZERO_SHUTTER_LAG.</p>
3201      * <p>Legacy-capability camera devices will only support FAST mode.</p>
3202      */
3203     ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =   // byte[n]
3204             ACAMERA_NOISE_REDUCTION_START + 2,
3205     ACAMERA_NOISE_REDUCTION_END,
3206 
3207     /**
3208      * <p>The maximum numbers of different types of output streams
3209      * that can be configured and used simultaneously by a camera device.</p>
3210      *
3211      * <p>Type: int32[3]</p>
3212      *
3213      * <p>This tag may appear in:
3214      * <ul>
3215      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3216      * </ul></p>
3217      *
3218      * <p>This is a 3 element tuple that contains the max number of output simultaneous
3219      * streams for raw sensor, processed (but not stalling), and processed (and stalling)
3220      * formats respectively. For example, assuming that JPEG is typically a processed and
3221      * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
3222      * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
3223      * <p>This lists the upper bound of the number of output streams supported by
3224      * the camera device. Using more streams simultaneously may require more hardware and
3225      * CPU resources that will consume more power. The image format for an output stream can
3226      * be any supported format provided by ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
3227      * The formats defined in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS can be categorized
3228      * into the 3 stream types as below:</p>
3229      * <ul>
3230      * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
3231      *   Typically {@link AIMAGE_FORMAT_JPEG JPEG format}.</li>
3232      * <li>Raw formats: {@link AIMAGE_FORMAT_RAW16 RAW_SENSOR}, {@link AIMAGE_FORMAT_RAW10 RAW10}, or
3233      *   {@link AIMAGE_FORMAT_RAW12 RAW12}.</li>
3234      * <li>Processed (but not-stalling): any non-RAW format without a stall duration.  Typically
3235      *   {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888},
3236      *   <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>
3237      * </ul>
3238      *
3239      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3240      */
3241     ACAMERA_REQUEST_MAX_NUM_OUTPUT_STREAMS =                    // int32[3]
3242             ACAMERA_REQUEST_START + 6,
3243     /**
3244      * <p>Specifies the number of pipeline stages the frame went
3245      * through from when it was exposed to when the final completed result
3246      * was available to the framework.</p>
3247      *
3248      * <p>Type: byte</p>
3249      *
3250      * <p>This tag may appear in:
3251      * <ul>
3252      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3253      * </ul></p>
3254      *
3255      * <p>Depending on what settings are used in the request, and
3256      * what streams are configured, the data may undergo less processing,
3257      * and some pipeline stages skipped.</p>
3258      * <p>See ACAMERA_REQUEST_PIPELINE_MAX_DEPTH for more details.</p>
3259      *
3260      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
3261      */
3262     ACAMERA_REQUEST_PIPELINE_DEPTH =                            // byte
3263             ACAMERA_REQUEST_START + 9,
3264     /**
3265      * <p>Specifies the number of maximum pipeline stages a frame
3266      * has to go through from when it's exposed to when it's available
3267      * to the framework.</p>
3268      *
3269      * <p>Type: byte</p>
3270      *
3271      * <p>This tag may appear in:
3272      * <ul>
3273      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3274      * </ul></p>
3275      *
3276      * <p>A typical minimum value for this is 2 (one stage to expose,
3277      * one stage to readout) from the sensor. The ISP then usually adds
3278      * its own stages to do custom HW processing. Further stages may be
3279      * added by SW processing.</p>
3280      * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
3281      * processing is enabled (e.g. face detection), the actual pipeline
3282      * depth (specified by ACAMERA_REQUEST_PIPELINE_DEPTH) may be less than
3283      * the max pipeline depth.</p>
3284      * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
3285      * X frame intervals.</p>
3286      * <p>This value will normally be 8 or less, however, for high speed capture session,
3287      * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
3288      *
3289      * @see ACAMERA_REQUEST_PIPELINE_DEPTH
3290      */
3291     ACAMERA_REQUEST_PIPELINE_MAX_DEPTH =                        // byte
3292             ACAMERA_REQUEST_START + 10,
3293     /**
3294      * <p>Defines how many sub-components
3295      * a result will be composed of.</p>
3296      *
3297      * <p>Type: int32</p>
3298      *
3299      * <p>This tag may appear in:
3300      * <ul>
3301      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3302      * </ul></p>
3303      *
3304      * <p>In order to combat the pipeline latency, partial results
3305      * may be delivered to the application layer from the camera device as
3306      * soon as they are available.</p>
3307      * <p>Optional; defaults to 1. A value of 1 means that partial
3308      * results are not supported, and only the final TotalCaptureResult will
3309      * be produced by the camera device.</p>
3310      * <p>A typical use case for this might be: after requesting an
3311      * auto-focus (AF) lock the new AF state might be available 50%
3312      * of the way through the pipeline.  The camera device could
3313      * then immediately dispatch this state via a partial result to
3314      * the application, and the rest of the metadata via later
3315      * partial results.</p>
3316      */
3317     ACAMERA_REQUEST_PARTIAL_RESULT_COUNT =                      // int32
3318             ACAMERA_REQUEST_START + 11,
3319     /**
3320      * <p>List of capabilities that this camera device
3321      * advertises as fully supporting.</p>
3322      *
3323      * <p>Type: byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)</p>
3324      *
3325      * <p>This tag may appear in:
3326      * <ul>
3327      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3328      * </ul></p>
3329      *
3330      * <p>A capability is a contract that the camera device makes in order
3331      * to be able to satisfy one or more use cases.</p>
3332      * <p>Listing a capability guarantees that the whole set of features
3333      * required to support a common use will all be available.</p>
3334      * <p>Using a subset of the functionality provided by an unsupported
3335      * capability may be possible on a specific camera device implementation;
3336      * to do this query each of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS,
3337      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS,
3338      * ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS.</p>
3339      * <p>The following capabilities are guaranteed to be available on
3340      * ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL <code>==</code> FULL devices:</p>
3341      * <ul>
3342      * <li>MANUAL_SENSOR</li>
3343      * <li>MANUAL_POST_PROCESSING</li>
3344      * </ul>
3345      * <p>Other capabilities may be available on either FULL or LIMITED
3346      * devices, but the application should query this key to be sure.</p>
3347      *
3348      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3349      * @see ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS
3350      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3351      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3352      */
3353     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES =                    // byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)
3354             ACAMERA_REQUEST_START + 12,
3355     /**
3356      * <p>A list of all keys that the camera device has available
3357      * to use with {@link ACaptureRequest }.</p>
3358      *
3359      * <p>Type: int32[n]</p>
3360      *
3361      * <p>This tag may appear in:
3362      * <ul>
3363      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3364      * </ul></p>
3365      *
3366      * <p>Attempting to set a key into a CaptureRequest that is not
3367      * listed here will result in an invalid request and will be rejected
3368      * by the camera device.</p>
3369      * <p>This field can be used to query the feature set of a camera device
3370      * at a more granular level than capabilities. This is especially
3371      * important for optional keys that are not listed under any capability
3372      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3373      *
3374      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3375      */
3376     ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS =                    // int32[n]
3377             ACAMERA_REQUEST_START + 13,
3378     /**
3379      * <p>A list of all keys that the camera device has available to use with {@link ACameraCaptureSession_captureCallback_result }.</p>
3380      *
3381      * <p>Type: int32[n]</p>
3382      *
3383      * <p>This tag may appear in:
3384      * <ul>
3385      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3386      * </ul></p>
3387      *
3388      * <p>Attempting to get a key from a CaptureResult that is not
3389      * listed here will always return a <code>null</code> value. Getting a key from
3390      * a CaptureResult that is listed here will generally never return a <code>null</code>
3391      * value.</p>
3392      * <p>The following keys may return <code>null</code> unless they are enabled:</p>
3393      * <ul>
3394      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP (non-null iff ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON)</li>
3395      * </ul>
3396      * <p>(Those sometimes-null keys will nevertheless be listed here
3397      * if they are available.)</p>
3398      * <p>This field can be used to query the feature set of a camera device
3399      * at a more granular level than capabilities. This is especially
3400      * important for optional keys that are not listed under any capability
3401      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3402      *
3403      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3404      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
3405      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
3406      */
3407     ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS =                     // int32[n]
3408             ACAMERA_REQUEST_START + 14,
3409     /**
3410      * <p>A list of all keys that the camera device has available to use with {@link ACameraManager_getCameraCharacteristics }.</p>
3411      *
3412      * <p>Type: int32[n]</p>
3413      *
3414      * <p>This tag may appear in:
3415      * <ul>
3416      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3417      * </ul></p>
3418      *
3419      * <p>This entry follows the same rules as
3420      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS (except that it applies for
3421      * CameraCharacteristics instead of CaptureResult). See above for more
3422      * details.</p>
3423      *
3424      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3425      */
3426     ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =            // int32[n]
3427             ACAMERA_REQUEST_START + 15,
3428     /**
3429      * <p>A subset of the available request keys that the camera device
3430      * can pass as part of the capture session initialization.</p>
3431      *
3432      * <p>Type: int32[n]</p>
3433      *
3434      * <p>This tag may appear in:
3435      * <ul>
3436      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3437      * </ul></p>
3438      *
3439      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which
3440      * contains a list of keys that are difficult to apply per-frame and
3441      * can result in unexpected delays when modified during the capture session
3442      * lifetime. Typical examples include parameters that require a
3443      * time-consuming hardware re-configuration or internal camera pipeline
3444      * change. For performance reasons we advise clients to pass their initial
3445      * values as part of
3446      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3447      * Once the camera capture session is enabled it is also recommended to avoid
3448      * changing them from their initial values set in
3449      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3450      * Control over session parameters can still be exerted in capture requests
3451      * but clients should be aware and expect delays during their application.
3452      * An example usage scenario could look like this:</p>
3453      * <ul>
3454      * <li>The camera client starts by querying the session parameter key list via
3455      *   {@link ACameraManager_getCameraCharacteristics }.</li>
3456      * <li>Before triggering the capture session create sequence, a capture request
3457      *   must be built via
3458      *   {@link ACameraDevice_createCaptureRequest }
3459      *   using an appropriate template matching the particular use case.</li>
3460      * <li>The client should go over the list of session parameters and check
3461      *   whether some of the keys listed matches with the parameters that
3462      *   they intend to modify as part of the first capture request.</li>
3463      * <li>If there is no such match, the capture request can be  passed
3464      *   unmodified to
3465      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3466      * <li>If matches do exist, the client should update the respective values
3467      *   and pass the request to
3468      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3469      * <li>After the capture session initialization completes the session parameter
3470      *   key list can continue to serve as reference when posting or updating
3471      *   further requests. As mentioned above further changes to session
3472      *   parameters should ideally be avoided, if updates are necessary
3473      *   however clients could expect a delay/glitch during the
3474      *   parameter switch.</li>
3475      * </ul>
3476      *
3477      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3478      */
3479     ACAMERA_REQUEST_AVAILABLE_SESSION_KEYS =                    // int32[n]
3480             ACAMERA_REQUEST_START + 16,
3481     /**
3482      * <p>A subset of the available request keys that can be overridden for
3483      * physical devices backing a logical multi-camera.</p>
3484      *
3485      * <p>Type: int32[n]</p>
3486      *
3487      * <p>This tag may appear in:
3488      * <ul>
3489      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3490      * </ul></p>
3491      *
3492      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which contains a list
3493      * of keys that can be overridden using
3494      * <a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Builder.html#setPhysicalCameraKey">Builder#setPhysicalCameraKey</a>.
3495      * The respective value of such request key can be obtained by calling
3496      * <a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Builder.html#getPhysicalCameraKey">Builder#getPhysicalCameraKey</a>.
3497      * Capture requests that contain individual physical device requests must be built via
3498      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureRequest(int,">Set)</a>.</p>
3499      *
3500      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3501      */
3502     ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =    // int32[n]
3503             ACAMERA_REQUEST_START + 17,
3504     /**
3505      * <p>A map of all available 10-bit dynamic range profiles along with their
3506      * capture request constraints.</p>
3507      *
3508      * <p>Type: int64[n*3] (acamera_metadata_enum_android_request_available_dynamic_range_profiles_map_t)</p>
3509      *
3510      * <p>This tag may appear in:
3511      * <ul>
3512      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3513      * </ul></p>
3514      *
3515      * <p>Devices supporting the 10-bit output capability
3516      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT">CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT</a>
3517      * must list their supported dynamic range profiles. In case the camera is not able to
3518      * support every possible profile combination within a single capture request, then the
3519      * constraints must be listed here as well.</p>
3520      */
3521     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP =      // int64[n*3] (acamera_metadata_enum_android_request_available_dynamic_range_profiles_map_t)
3522             ACAMERA_REQUEST_START + 19,
3523     ACAMERA_REQUEST_END,
3524 
3525     /**
3526      * <p>The desired region of the sensor to read out for this capture.</p>
3527      *
3528      * <p>Type: int32[4]</p>
3529      *
3530      * <p>This tag may appear in:
3531      * <ul>
3532      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3533      *   <li>ACaptureRequest</li>
3534      * </ul></p>
3535      *
3536      * <p>This control can be used to implement digital zoom.</p>
3537      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
3538      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
3539      * the top-left pixel of the active array.</p>
3540      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate system
3541      * depends on the mode being set.  When the distortion correction mode is OFF, the
3542      * coordinate system follows ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with <code>(0,
3543      * 0)</code> being the top-left pixel of the pre-correction active array.  When the distortion
3544      * correction mode is not OFF, the coordinate system follows
3545      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being the top-left pixel of the
3546      * active array.</p>
3547      * <p>Output streams use this rectangle to produce their output, cropping to a smaller region
3548      * if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
3549      * match the output's configured resolution.</p>
3550      * <p>The crop region is applied after the RAW to other color space (e.g. YUV)
3551      * conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, they are not
3552      * croppable. The crop region will be ignored by raw streams.</p>
3553      * <p>For non-raw streams, any additional per-stream cropping will be done to maximize the
3554      * final pixel area of the stream.</p>
3555      * <p>For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
3556      * the exact crop region. 16:9 streams will further crop vertically (letterbox).</p>
3557      * <p>Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
3558      * (pillarbox), and 16:9 streams will match exactly. These additional crops will be
3559      * centered within the crop region.</p>
3560      * <p>To illustrate, here are several scenarios of different crop regions and output streams,
3561      * for a hypothetical camera device with an active array of size <code>(2000,1500)</code>.  Note that
3562      * several of these examples use non-centered crop regions for ease of illustration; such
3563      * regions are only supported on devices with FREEFORM capability
3564      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>), but this does not affect the way the crop
3565      * rules work otherwise.</p>
3566      * <ul>
3567      * <li>Camera Configuration:<ul>
3568      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
3569      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
3570      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
3571      * </ul>
3572      * </li>
3573      * <li>Case #1: 4:3 crop region with 2x digital zoom<ul>
3574      * <li>Crop region: <code>Rect(500, 375, 1500, 1125) // (left, top, right, bottom)</code></li>
3575      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-43-ratio.png" /></li>
3576      * <li><code>640x480</code> stream source area: <code>(500, 375, 1500, 1125)</code> (equal to crop region)</li>
3577      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3578      * </ul>
3579      * </li>
3580      * <li>Case #2: 16:9 crop region with ~1.5x digital zoom.<ul>
3581      * <li>Crop region: <code>Rect(500, 375, 1833, 1125)</code></li>
3582      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-169-ratio.png" /></li>
3583      * <li><code>640x480</code> stream source area: <code>(666, 375, 1666, 1125)</code> (pillarboxed)</li>
3584      * <li><code>1280x720</code> stream source area: <code>(500, 375, 1833, 1125)</code> (equal to crop region)</li>
3585      * </ul>
3586      * </li>
3587      * <li>Case #3: 1:1 crop region with ~2.6x digital zoom.<ul>
3588      * <li>Crop region: <code>Rect(500, 375, 1250, 1125)</code></li>
3589      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-11-ratio.png" /></li>
3590      * <li><code>640x480</code> stream source area: <code>(500, 469, 1250, 1031)</code> (letterboxed)</li>
3591      * <li><code>1280x720</code> stream source area: <code>(500, 543, 1250, 957)</code> (letterboxed)</li>
3592      * </ul>
3593      * </li>
3594      * <li>Case #4: Replace <code>640x480</code> stream with <code>1024x1024</code> stream, with 4:3 crop region:<ul>
3595      * <li>Crop region: <code>Rect(500, 375, 1500, 1125)</code></li>
3596      * <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>
3597      * <li><code>1024x1024</code> stream source area: <code>(625, 375, 1375, 1125)</code> (pillarboxed)</li>
3598      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3599      * <li>Note that in this case, neither of the two outputs is a subset of the other, with
3600      *   each containing image data the other doesn't have.</li>
3601      * </ul>
3602      * </li>
3603      * </ul>
3604      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, the width and height
3605      * of the crop region cannot be set to be smaller than
3606      * <code>floor( activeArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code> and
3607      * <code>floor( activeArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>, respectively.</p>
3608      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, the width
3609      * and height of the crop region cannot be set to be smaller than
3610      * <code>floor( preCorrectionActiveArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>
3611      * and
3612      * <code>floor( preCorrectionActiveArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>,
3613      * respectively.</p>
3614      * <p>The camera device may adjust the crop region to account for rounding and other hardware
3615      * requirements; the final crop region used will be included in the output capture result.</p>
3616      * <p>The camera sensor output aspect ratio depends on factors such as output stream
3617      * combination and ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, and shouldn't be adjusted by using
3618      * this control. And the camera device will treat different camera sensor output sizes
3619      * (potentially with in-sensor crop) as the same crop of
3620      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE. As a result, the application shouldn't assume the
3621      * maximum crop region always maps to the same aspect ratio or field of view for the
3622      * sensor output.</p>
3623      * <p>Starting from API level 30, it's strongly recommended to use ACAMERA_CONTROL_ZOOM_RATIO
3624      * to take advantage of better support for zoom with logical multi-camera. The benefits
3625      * include better precision with optical-digital zoom combination, and ability to do
3626      * zoom-out from 1.0x. When using ACAMERA_CONTROL_ZOOM_RATIO for zoom, the crop region in
3627      * the capture request should be left as the default activeArray size. The
3628      * coordinate system is post-zoom, meaning that the activeArraySize or
3629      * preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
3630      * ACAMERA_CONTROL_ZOOM_RATIO for details.</p>
3631      * <p>For camera devices with the
3632      * <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>
3633      * capability, ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
3634      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
3635      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
3636      * <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>
3637      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
3638      *
3639      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
3640      * @see ACAMERA_CONTROL_ZOOM_RATIO
3641      * @see ACAMERA_DISTORTION_CORRECTION_MODE
3642      * @see ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
3643      * @see ACAMERA_SCALER_CROPPING_TYPE
3644      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3645      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
3646      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3647      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
3648      * @see ACAMERA_SENSOR_PIXEL_MODE
3649      */
3650     ACAMERA_SCALER_CROP_REGION =                                // int32[4]
3651             ACAMERA_SCALER_START,
3652     /**
3653      * <p>The maximum ratio between both active area width
3654      * and crop region width, and active area height and
3655      * crop region height, for ACAMERA_SCALER_CROP_REGION.</p>
3656      *
3657      * @see ACAMERA_SCALER_CROP_REGION
3658      *
3659      * <p>Type: float</p>
3660      *
3661      * <p>This tag may appear in:
3662      * <ul>
3663      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3664      * </ul></p>
3665      *
3666      * <p>This represents the maximum amount of zooming possible by
3667      * the camera device, or equivalently, the minimum cropping
3668      * window size.</p>
3669      * <p>Crop regions that have a width or height that is smaller
3670      * than this ratio allows will be rounded up to the minimum
3671      * allowed size by the camera device.</p>
3672      * <p>Starting from API level 30, when using ACAMERA_CONTROL_ZOOM_RATIO to zoom in or out,
3673      * the application must use ACAMERA_CONTROL_ZOOM_RATIO_RANGE to query both the minimum and
3674      * maximum zoom ratio.</p>
3675      *
3676      * @see ACAMERA_CONTROL_ZOOM_RATIO
3677      * @see ACAMERA_CONTROL_ZOOM_RATIO_RANGE
3678      */
3679     ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =                 // float
3680             ACAMERA_SCALER_START + 4,
3681     /**
3682      * <p>The available stream configurations that this
3683      * camera device supports
3684      * (i.e. format, width, height, output/input stream).</p>
3685      *
3686      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)</p>
3687      *
3688      * <p>This tag may appear in:
3689      * <ul>
3690      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3691      * </ul></p>
3692      *
3693      * <p>The configurations are listed as <code>(format, width, height, input?)</code>
3694      * tuples.</p>
3695      * <p>For a given use case, the actual maximum supported resolution
3696      * may be lower than what is listed here, depending on the destination
3697      * Surface for the image data. For example, for recording video,
3698      * the video encoder chosen may have a maximum size limit (e.g. 1080p)
3699      * smaller than what the camera (e.g. maximum resolution is 3264x2448)
3700      * can provide.</p>
3701      * <p>Please reference the documentation for the image data destination to
3702      * check if it limits the maximum size for image data.</p>
3703      * <p>Not all output formats may be supported in a configuration with
3704      * an input stream of a particular format. For more details, see
3705      * android.scaler.availableInputOutputFormatsMap.</p>
3706      * <p>For applications targeting SDK version older than 31, the following table
3707      * describes the minimum required output stream configurations based on the hardware level
3708      * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL):</p>
3709      * <p>Format         | Size                                         | Hardware Level | Notes
3710      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
3711      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
3712      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
3713      * JPEG           | 1280x720 (720)                               | Any            | if 720p &lt;= activeArraySize
3714      * JPEG           | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
3715      * JPEG           | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
3716      * YUV_420_888    | all output sizes available for JPEG          | FULL           |
3717      * YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
3718      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
3719      * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
3720      * media performance class 12 or higher by setting
3721      * <a href="https://developer.android.com/reference/android/os/Build.VERSION.html#MEDIA_PERFORMANCE_CLASS">VERSION#MEDIA_PERFORMANCE_CLASS</a> to be 31 or larger,
3722      * the primary camera devices (first rear/front camera in the camera ID list) will not
3723      * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
3724      * smaller than 1080p, the camera device will round up the JPEG image size to at least
3725      * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
3726      * This new minimum required output stream configurations are illustrated by the table below:</p>
3727      * <p>Format         | Size                                         | Hardware Level | Notes
3728      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
3729      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
3730      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
3731      * YUV_420_888    | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | FULL           |
3732      * YUV_420_888    | 1920x1080 (1080p)                            | FULL           | if 1080p &lt;= activeArraySize
3733      * YUV_420_888    | 1280x720 (720)                               | FULL           | if 720p &lt;= activeArraySize
3734      * YUV_420_888    | 640x480 (480p)                               | FULL           | if 480p &lt;= activeArraySize
3735      * YUV_420_888    | 320x240 (240p)                               | FULL           | if 240p &lt;= activeArraySize
3736      * YUV_420_888    | all output sizes available for FULL hardware level, up to the maximum video size | LIMITED        |
3737      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
3738      * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
3739      * to be media performance class 12 or better by setting
3740      * <a href="https://developer.android.com/reference/android/os/Build.VERSION.html#MEDIA_PERFORMANCE_CLASS">VERSION#MEDIA_PERFORMANCE_CLASS</a> to be 31 or larger,
3741      * or if the camera device isn't a primary rear/front camera, the minimum required output
3742      * stream configurations are the same as for applications targeting SDK version older than
3743      * 31.</p>
3744      * <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
3745      * mandatory stream configurations on a per-capability basis.</p>
3746      * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
3747      * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
3748      * fully supported due to this limitation on devices with high-resolution image sensors.
3749      * Therefore, trying to configure a QCIF resolution stream together with any other
3750      * stream larger than 1920x1080 resolution (either width or height) might not be supported,
3751      * and capture session creation will fail if it is not.</p>
3752      *
3753      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3754      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3755      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3756      */
3757     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS =            // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)
3758             ACAMERA_SCALER_START + 10,
3759     /**
3760      * <p>This lists the minimum frame duration for each
3761      * format/size combination.</p>
3762      *
3763      * <p>Type: int64[4*n]</p>
3764      *
3765      * <p>This tag may appear in:
3766      * <ul>
3767      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3768      * </ul></p>
3769      *
3770      * <p>This should correspond to the frame duration when only that
3771      * stream is active, with all processing (typically in android.*.mode)
3772      * set to either OFF or FAST.</p>
3773      * <p>When multiple streams are used in a request, the minimum frame
3774      * duration will be max(individual stream min durations).</p>
3775      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
3776      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
3777      * calculating the max frame rate.</p>
3778      *
3779      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
3780      * @see ACAMERA_SENSOR_FRAME_DURATION
3781      */
3782     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS =              // int64[4*n]
3783             ACAMERA_SCALER_START + 11,
3784     /**
3785      * <p>This lists the maximum stall duration for each
3786      * output format/size combination.</p>
3787      *
3788      * <p>Type: int64[4*n]</p>
3789      *
3790      * <p>This tag may appear in:
3791      * <ul>
3792      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3793      * </ul></p>
3794      *
3795      * <p>A stall duration is how much extra time would get added
3796      * to the normal minimum frame duration for a repeating request
3797      * that has streams with non-zero stall.</p>
3798      * <p>For example, consider JPEG captures which have the following
3799      * characteristics:</p>
3800      * <ul>
3801      * <li>JPEG streams act like processed YUV streams in requests for which
3802      * they are not included; in requests in which they are directly
3803      * referenced, they act as JPEG streams. This is because supporting a
3804      * JPEG stream requires the underlying YUV data to always be ready for
3805      * use by a JPEG encoder, but the encoder will only be used (and impact
3806      * frame duration) on requests that actually reference a JPEG stream.</li>
3807      * <li>The JPEG processor can run concurrently to the rest of the camera
3808      * pipeline, but cannot process more than 1 capture at a time.</li>
3809      * </ul>
3810      * <p>In other words, using a repeating YUV request would result
3811      * in a steady frame rate (let's say it's 30 FPS). If a single
3812      * JPEG request is submitted periodically, the frame rate will stay
3813      * at 30 FPS (as long as we wait for the previous JPEG to return each
3814      * time). If we try to submit a repeating YUV + JPEG request, then
3815      * the frame rate will drop from 30 FPS.</p>
3816      * <p>In general, submitting a new request with a non-0 stall time
3817      * stream will <em>not</em> cause a frame rate drop unless there are still
3818      * outstanding buffers for that stream from previous requests.</p>
3819      * <p>Submitting a repeating request with streams (call this <code>S</code>)
3820      * is the same as setting the minimum frame duration from
3821      * the normal minimum frame duration corresponding to <code>S</code>, added with
3822      * the maximum stall duration for <code>S</code>.</p>
3823      * <p>If interleaving requests with and without a stall duration,
3824      * a request will stall by the maximum of the remaining times
3825      * for each can-stall stream with outstanding buffers.</p>
3826      * <p>This means that a stalling request will not have an exposure start
3827      * until the stall has completed.</p>
3828      * <p>This should correspond to the stall duration when only that stream is
3829      * active, with all processing (typically in android.*.mode) set to FAST
3830      * or OFF. Setting any of the processing modes to HIGH_QUALITY
3831      * effectively results in an indeterminate stall duration for all
3832      * streams in a request (the regular stall calculation rules are
3833      * ignored).</p>
3834      * <p>The following formats may always have a stall duration:</p>
3835      * <ul>
3836      * <li>{@link AIMAGE_FORMAT_JPEG }</li>
3837      * <li>{@link AIMAGE_FORMAT_RAW16 }</li>
3838      * </ul>
3839      * <p>The following formats will never have a stall duration:</p>
3840      * <ul>
3841      * <li>{@link AIMAGE_FORMAT_YUV_420_888 }</li>
3842      * <li>{@link AIMAGE_FORMAT_RAW10 }</li>
3843      * <li>{@link AIMAGE_FORMAT_RAW12 }</li>
3844      * <li>{@link AIMAGE_FORMAT_Y8 }</li>
3845      * </ul>
3846      * <p>All other formats may or may not have an allowed stall duration on
3847      * a per-capability basis; refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3848      * for more details.</p>
3849      * <p>See ACAMERA_SENSOR_FRAME_DURATION for more information about
3850      * calculating the max frame rate (absent stalls).</p>
3851      *
3852      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3853      * @see ACAMERA_SENSOR_FRAME_DURATION
3854      */
3855     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS =                  // int64[4*n]
3856             ACAMERA_SCALER_START + 12,
3857     /**
3858      * <p>The crop type that this camera device supports.</p>
3859      *
3860      * <p>Type: byte (acamera_metadata_enum_android_scaler_cropping_type_t)</p>
3861      *
3862      * <p>This tag may appear in:
3863      * <ul>
3864      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3865      * </ul></p>
3866      *
3867      * <p>When passing a non-centered crop region (ACAMERA_SCALER_CROP_REGION) to a camera
3868      * device that only supports CENTER_ONLY cropping, the camera device will move the
3869      * crop region to the center of the sensor active array (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE)
3870      * and keep the crop region width and height unchanged. The camera device will return the
3871      * final used crop region in metadata result ACAMERA_SCALER_CROP_REGION.</p>
3872      * <p>Camera devices that support FREEFORM cropping will support any crop region that
3873      * is inside of the active array. The camera device will apply the same crop region and
3874      * return the final used crop region in capture result metadata ACAMERA_SCALER_CROP_REGION.</p>
3875      * <p>Starting from API level 30,</p>
3876      * <ul>
3877      * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
3878      * application must set ACAMERA_CONTROL_ZOOM_RATIO to 1.0, and use ACAMERA_SCALER_CROP_REGION
3879      * for zoom.</li>
3880      * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol>
3881      * <li>Set ACAMERA_CONTROL_ZOOM_RATIO to 1.0; adjust zoom by ACAMERA_SCALER_CROP_REGION.</li>
3882      * <li>Adjust zoom by ACAMERA_CONTROL_ZOOM_RATIO; use ACAMERA_SCALER_CROP_REGION to crop
3883      * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
3884      * windowboxing.</li>
3885      * </ol>
3886      * </li>
3887      * <li>Setting ACAMERA_CONTROL_ZOOM_RATIO to values different than 1.0 and
3888      * ACAMERA_SCALER_CROP_REGION to be windowboxing at the same time are not supported. In this
3889      * case, the camera framework will override the ACAMERA_SCALER_CROP_REGION to be the active
3890      * array.</li>
3891      * </ul>
3892      * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
3893      *
3894      * @see ACAMERA_CONTROL_ZOOM_RATIO
3895      * @see ACAMERA_SCALER_CROP_REGION
3896      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3897      */
3898     ACAMERA_SCALER_CROPPING_TYPE =                              // byte (acamera_metadata_enum_android_scaler_cropping_type_t)
3899             ACAMERA_SCALER_START + 13,
3900     /**
3901      * <p>Recommended stream configurations for common client use cases.</p>
3902      *
3903      * <p>Type: int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)</p>
3904      *
3905      * <p>This tag may appear in:
3906      * <ul>
3907      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3908      * </ul></p>
3909      *
3910      * <p>Optional subset of the ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS that contains
3911      * similar tuples listed as
3912      * (i.e. width, height, format, output/input stream, usecase bit field).
3913      * Camera devices will be able to suggest particular stream configurations which are
3914      * power and performance efficient for specific use cases. For more information about
3915      * retrieving the suggestions see
3916      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
3917      * <p>The data representation is int[5], which maps to
3918      * (width, height, format, output/input stream, usecase bit field). The array can be
3919      * parsed using the following pseudo code:</p>
3920      * <p>struct StreamConfiguration {
3921      * int32_t format;
3922      * int32_t width;
3923      * int32_t height;
3924      * int32_t isInput; };</p>
3925      * <p>void getPreferredStreamConfigurations(
3926      *     int32_t *array, size_t count, int32_t usecaseId,
3927      *     Vector &lt; StreamConfiguration &gt; * scs) {
3928      *     const size_t STREAM_CONFIGURATION_SIZE = 5;
3929      *     const size_t STREAM_WIDTH_OFFSET = 0;
3930      *     const size_t STREAM_HEIGHT_OFFSET = 1;
3931      *     const size_t STREAM_FORMAT_OFFSET = 2;
3932      *     const size_t STREAM_IS_INPUT_OFFSET = 3;
3933      *     const size_t STREAM_USECASE_BITMAP_OFFSET = 4;</p>
3934      * <pre><code>for (size_t i = 0; i &lt; count; i+= STREAM_CONFIGURATION_SIZE) {
3935      *     int32_t width = array[i + STREAM_WIDTH_OFFSET];
3936      *     int32_t height = array[i + STREAM_HEIGHT_OFFSET];
3937      *     int32_t format = array[i + STREAM_FORMAT_OFFSET];
3938      *     int32_t isInput = array[i + STREAM_IS_INPUT_OFFSET];
3939      *     int32_t supportedUsecases = array[i + STREAM_USECASE_BITMAP_OFFSET];
3940      *     if (supportedUsecases &amp; (1 &lt;&lt; usecaseId)) {
3941      *         StreamConfiguration sc = {format, width, height, isInput};
3942      *         scs-&gt;add(sc);
3943      *     }
3944      * }
3945      * </code></pre>
3946      * <p>}</p>
3947      *
3948      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3949      */
3950     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
3951                                                                 // int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)
3952             ACAMERA_SCALER_START + 14,
3953     /**
3954      * <p>Recommended mappings of image formats that are supported by this
3955      * camera device for input streams, to their corresponding output formats.</p>
3956      *
3957      * <p>Type: int32</p>
3958      *
3959      * <p>This tag may appear in:
3960      * <ul>
3961      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3962      * </ul></p>
3963      *
3964      * <p>This is a recommended subset of the complete list of mappings found in
3965      * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
3966      * The list however doesn't need to contain all available and supported mappings. Instead of
3967      * this developers must list only recommended and efficient entries.
3968      * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
3969      * configuration see
3970      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
3971      */
3972     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
3973                                                                 // int32
3974             ACAMERA_SCALER_START + 15,
3975     /**
3976      * <p>List of rotate-and-crop modes for ACAMERA_SCALER_ROTATE_AND_CROP that are supported by this camera device.</p>
3977      *
3978      * @see ACAMERA_SCALER_ROTATE_AND_CROP
3979      *
3980      * <p>Type: byte[n]</p>
3981      *
3982      * <p>This tag may appear in:
3983      * <ul>
3984      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3985      * </ul></p>
3986      *
3987      * <p>This entry lists the valid modes for ACAMERA_SCALER_ROTATE_AND_CROP for this camera device.</p>
3988      * <p>Starting with API level 30, all devices will list at least <code>ROTATE_AND_CROP_NONE</code>.
3989      * Devices with support for rotate-and-crop will additionally list at least
3990      * <code>ROTATE_AND_CROP_AUTO</code> and <code>ROTATE_AND_CROP_90</code>.</p>
3991      *
3992      * @see ACAMERA_SCALER_ROTATE_AND_CROP
3993      */
3994     ACAMERA_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES =            // byte[n]
3995             ACAMERA_SCALER_START + 16,
3996     /**
3997      * <p>Whether a rotation-and-crop operation is applied to processed
3998      * outputs from the camera.</p>
3999      *
4000      * <p>Type: byte (acamera_metadata_enum_android_scaler_rotate_and_crop_t)</p>
4001      *
4002      * <p>This tag may appear in:
4003      * <ul>
4004      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4005      *   <li>ACaptureRequest</li>
4006      * </ul></p>
4007      *
4008      * <p>This control is primarily intended to help camera applications with no support for
4009      * multi-window modes to work correctly on devices where multi-window scenarios are
4010      * unavoidable, such as foldables or other devices with variable display geometry or more
4011      * free-form window placement (such as laptops, which often place portrait-orientation apps
4012      * in landscape with pillarboxing).</p>
4013      * <p>If supported, the default value is <code>ROTATE_AND_CROP_AUTO</code>, which allows the camera API
4014      * to enable backwards-compatibility support for applications that do not support resizing
4015      * / multi-window modes, when the device is in fact in a multi-window mode (such as inset
4016      * portrait on laptops, or on a foldable device in some fold states).  In addition,
4017      * <code>ROTATE_AND_CROP_NONE</code> and <code>ROTATE_AND_CROP_90</code> will always be available if this control
4018      * is supported by the device.  If not supported, devices API level 30 or higher will always
4019      * list only <code>ROTATE_AND_CROP_NONE</code>.</p>
4020      * <p>When <code>CROP_AUTO</code> is in use, and the camera API activates backward-compatibility mode,
4021      * several metadata fields will also be parsed differently to ensure that coordinates are
4022      * correctly handled for features like drawing face detection boxes or passing in
4023      * tap-to-focus coordinates.  The camera API will convert positions in the active array
4024      * coordinate system to/from the cropped-and-rotated coordinate system to make the
4025      * operation transparent for applications.  The following controls are affected:</p>
4026      * <ul>
4027      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
4028      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
4029      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
4030      * <li>android.statistics.faces</li>
4031      * </ul>
4032      * <p>Capture results will contain the actual value selected by the API;
4033      * <code>ROTATE_AND_CROP_AUTO</code> will never be seen in a capture result.</p>
4034      * <p>Applications can also select their preferred cropping mode, either to opt out of the
4035      * backwards-compatibility treatment, or to use the cropping feature themselves as needed.
4036      * In this case, no coordinate translation will be done automatically, and all controls
4037      * will continue to use the normal active array coordinates.</p>
4038      * <p>Cropping and rotating is done after the application of digital zoom (via either
4039      * ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO), but before each individual
4040      * output is further cropped and scaled. It only affects processed outputs such as
4041      * YUV, PRIVATE, and JPEG.  It has no effect on RAW outputs.</p>
4042      * <p>When <code>CROP_90</code> or <code>CROP_270</code> are selected, there is a significant loss to the field of
4043      * view. For example, with a 4:3 aspect ratio output of 1600x1200, <code>CROP_90</code> will still
4044      * produce 1600x1200 output, but these buffers are cropped from a vertical 3:4 slice at the
4045      * center of the 4:3 area, then rotated to be 4:3, and then upscaled to 1600x1200.  Only
4046      * 56.25% of the original FOV is still visible.  In general, for an aspect ratio of <code>w:h</code>,
4047      * the crop and rotate operation leaves <code>(h/w)^2</code> of the field of view visible. For 16:9,
4048      * this is ~31.6%.</p>
4049      * <p>As a visual example, the figure below shows the effect of <code>ROTATE_AND_CROP_90</code> on the
4050      * outputs for the following parameters:</p>
4051      * <ul>
4052      * <li>Sensor active array: <code>2000x1500</code></li>
4053      * <li>Crop region: top-left: <code>(500, 375)</code>, size: <code>(1000, 750)</code> (4:3 aspect ratio)</li>
4054      * <li>Output streams: YUV <code>640x480</code> and YUV <code>1280x720</code></li>
4055      * <li><code>ROTATE_AND_CROP_90</code></li>
4056      * </ul>
4057      * <p><img alt="Effect of ROTATE_AND_CROP_90" src="../images/camera2/metadata/android.scaler.rotateAndCrop/crop-region-rotate-90-43-ratio.png" /></p>
4058      * <p>With these settings, the regions of the active array covered by the output streams are:</p>
4059      * <ul>
4060      * <li>640x480 stream crop: top-left: <code>(219, 375)</code>, size: <code>(562, 750)</code></li>
4061      * <li>1280x720 stream crop: top-left: <code>(289, 375)</code>, size: <code>(422, 750)</code></li>
4062      * </ul>
4063      * <p>Since the buffers are rotated, the buffers as seen by the application are:</p>
4064      * <ul>
4065      * <li>640x480 stream: top-left: <code>(781, 375)</code> on active array, size: <code>(640, 480)</code>, downscaled 1.17x from sensor pixels</li>
4066      * <li>1280x720 stream: top-left: <code>(711, 375)</code> on active array, size: <code>(1280, 720)</code>, upscaled 1.71x from sensor pixels</li>
4067      * </ul>
4068      *
4069      * @see ACAMERA_CONTROL_AE_REGIONS
4070      * @see ACAMERA_CONTROL_AF_REGIONS
4071      * @see ACAMERA_CONTROL_AWB_REGIONS
4072      * @see ACAMERA_CONTROL_ZOOM_RATIO
4073      * @see ACAMERA_SCALER_CROP_REGION
4074      */
4075     ACAMERA_SCALER_ROTATE_AND_CROP =                            // byte (acamera_metadata_enum_android_scaler_rotate_and_crop_t)
4076             ACAMERA_SCALER_START + 17,
4077     /**
4078      * <p>Default YUV/PRIVATE size to use for requesting secure image buffers.</p>
4079      *
4080      * <p>Type: int32[2]</p>
4081      *
4082      * <p>This tag may appear in:
4083      * <ul>
4084      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4085      * </ul></p>
4086      *
4087      * <p>This entry lists the default size supported in the secure camera mode. This entry is
4088      * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null
4089      * if the camera device does not list SECURE_IMAGE_DATA capability.</p>
4090      * <p>When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed
4091      * to be supported by the camera HAL in the secure camera mode. Any other format or
4092      * resolutions might not be supported. Use
4093      * {@link ACameraDevice_isSessionConfigurationSupported }
4094      * API to query if a secure session configuration is supported if the device supports this
4095      * API.</p>
4096      * <p>If this key returns null on a device with SECURE_IMAGE_DATA capability, the application
4097      * can assume all output sizes listed in the
4098      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
4099      * are supported.</p>
4100      */
4101     ACAMERA_SCALER_DEFAULT_SECURE_IMAGE_SIZE =                  // int32[2]
4102             ACAMERA_SCALER_START + 18,
4103     /**
4104      * <p>The available multi-resolution stream configurations that this
4105      * physical camera device supports
4106      * (i.e. format, width, height, output/input stream).</p>
4107      *
4108      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t)</p>
4109      *
4110      * <p>This tag may appear in:
4111      * <ul>
4112      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4113      * </ul></p>
4114      *
4115      * <p>This list contains a subset of the parent logical camera's multi-resolution stream
4116      * configurations which belong to this physical camera, and it will advertise and will only
4117      * advertise the maximum supported resolutions for a particular format.</p>
4118      * <p>If this camera device isn't a physical camera device constituting a logical camera,
4119      * 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>
4120      * camera, this field represents the multi-resolution input/output stream configurations of
4121      * default mode and max resolution modes. The sizes will be the maximum resolution of a
4122      * particular format for default mode and max resolution mode.</p>
4123      * <p>This field will only be advertised if the device is a physical camera of a
4124      * logical multi-camera device or an ultra high resolution sensor camera. For a logical
4125      * multi-camera, the camera API will derive the logical camera’s multi-resolution stream
4126      * configurations from all physical cameras. For an ultra high resolution sensor camera, this
4127      * is used directly as the camera’s multi-resolution stream configurations.</p>
4128      */
4129     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS =
4130                                                                 // int32[n*4] (acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t)
4131             ACAMERA_SCALER_START + 19,
4132     /**
4133      * <p>The available stream configurations that this
4134      * camera device supports (i.e. format, width, height, output/input stream) for a
4135      * CaptureRequest with ACAMERA_SENSOR_PIXEL_MODE set to
4136      * <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>
4137      *
4138      * @see ACAMERA_SENSOR_PIXEL_MODE
4139      *
4140      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t)</p>
4141      *
4142      * <p>This tag may appear in:
4143      * <ul>
4144      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4145      * </ul></p>
4146      *
4147      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, for configurations
4148      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4149      * <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>
4150      * <p>Not all output formats may be supported in a configuration with
4151      * an input stream of a particular format. For more details, see
4152      * android.scaler.availableInputOutputFormatsMapMaximumResolution.</p>
4153      *
4154      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
4155      * @see ACAMERA_SENSOR_PIXEL_MODE
4156      */
4157     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
4158                                                                 // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t)
4159             ACAMERA_SCALER_START + 20,
4160     /**
4161      * <p>This lists the minimum frame duration for each
4162      * format/size combination when the camera device is sent a CaptureRequest with
4163      * ACAMERA_SENSOR_PIXEL_MODE set to
4164      * <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>
4165      *
4166      * @see ACAMERA_SENSOR_PIXEL_MODE
4167      *
4168      * <p>Type: int64[4*n]</p>
4169      *
4170      * <p>This tag may appear in:
4171      * <ul>
4172      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4173      * </ul></p>
4174      *
4175      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, for configurations
4176      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4177      * <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>
4178      * <p>When multiple streams are used in a request (if supported, when ACAMERA_SENSOR_PIXEL_MODE
4179      * is set to
4180      * <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
4181      * minimum frame duration will be max(individual stream min durations).</p>
4182      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
4183      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION for more details about
4184      * calculating the max frame rate.</p>
4185      *
4186      * @see ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
4187      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION
4188      * @see ACAMERA_SENSOR_FRAME_DURATION
4189      * @see ACAMERA_SENSOR_PIXEL_MODE
4190      */
4191     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
4192                                                                 // int64[4*n]
4193             ACAMERA_SCALER_START + 21,
4194     /**
4195      * <p>This lists the maximum stall duration for each
4196      * output format/size combination when CaptureRequests are submitted with
4197      * ACAMERA_SENSOR_PIXEL_MODE set to
4198      * <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>
4199      *
4200      * @see ACAMERA_SENSOR_PIXEL_MODE
4201      *
4202      * <p>Type: int64[4*n]</p>
4203      *
4204      * <p>This tag may appear in:
4205      * <ul>
4206      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4207      * </ul></p>
4208      *
4209      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, for configurations
4210      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4211      * <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>
4212      *
4213      * @see ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
4214      * @see ACAMERA_SENSOR_PIXEL_MODE
4215      */
4216     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION =
4217                                                                 // int64[4*n]
4218             ACAMERA_SCALER_START + 22,
4219     /**
4220      * <p>Whether the camera device supports multi-resolution input or output streams</p>
4221      *
4222      * <p>Type: byte (acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t)</p>
4223      *
4224      * <p>This tag may appear in:
4225      * <ul>
4226      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4227      * </ul></p>
4228      *
4229      * <p>A logical multi-camera or an ultra high resolution camera may support multi-resolution
4230      * input or output streams. With multi-resolution output streams, the camera device is able
4231      * to output different resolution images depending on the current active physical camera or
4232      * pixel mode. With multi-resolution input streams, the camera device can reprocess images
4233      * of different resolutions from different physical cameras or sensor pixel modes.</p>
4234      * <p>When set to TRUE:</p>
4235      * <ul>
4236      * <li>For a logical multi-camera, the camera framework derives
4237      * android.scaler.multiResolutionStreamConfigurationMap by combining the
4238      * ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS from its physical
4239      * cameras.</li>
4240      * <li>For an ultra-high resolution sensor camera, the camera framework directly copies
4241      * the value of ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS to
4242      * android.scaler.multiResolutionStreamConfigurationMap.</li>
4243      * </ul>
4244      *
4245      * @see ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
4246      */
4247     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED =          // byte (acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t)
4248             ACAMERA_SCALER_START + 24,
4249     /**
4250      * <p>The stream use cases supported by this camera device.</p>
4251      *
4252      * <p>Type: int64[n] (acamera_metadata_enum_android_scaler_available_stream_use_cases_t)</p>
4253      *
4254      * <p>This tag may appear in:
4255      * <ul>
4256      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4257      * </ul></p>
4258      *
4259      * <p>The stream use case indicates the purpose of a particular camera stream from
4260      * the end-user perspective. Some examples of camera use cases are: preview stream for
4261      * live viewfinder shown to the user, still capture for generating high quality photo
4262      * capture, video record for encoding the camera output for the purpose of future playback,
4263      * and video call for live realtime video conferencing.</p>
4264      * <p>With this flag, the camera device can optimize the image processing pipeline
4265      * parameters, such as tuning, sensor mode, and ISP settings, independent of
4266      * the properties of the immediate camera output surface. For example, if the output
4267      * surface is a SurfaceTexture, the stream use case flag can be used to indicate whether
4268      * the camera frames eventually go to display, video encoder,
4269      * still image capture, or all of them combined.</p>
4270      * <p>The application sets the use case of a camera stream by calling
4271      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration.html#setStreamUseCase">OutputConfiguration#setStreamUseCase</a>.</p>
4272      * <p>A camera device with
4273      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE">CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE</a>
4274      * capability must support the following stream use cases:</p>
4275      * <ul>
4276      * <li>DEFAULT</li>
4277      * <li>PREVIEW</li>
4278      * <li>STILL_CAPTURE</li>
4279      * <li>VIDEO_RECORD</li>
4280      * <li>PREVIEW_VIDEO_STILL</li>
4281      * <li>VIDEO_CALL</li>
4282      * </ul>
4283      * <p>The guaranteed stream combinations related to stream use case for a camera device with
4284      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE">CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE</a>
4285      * capability is documented in the camera device
4286      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession">guideline</a>. The
4287      * application is strongly recommended to use one of the guaranteed stream combinations.
4288      * If the application creates a session with a stream combination not in the guaranteed
4289      * list, or with mixed DEFAULT and non-DEFAULT use cases within the same session,
4290      * the camera device may ignore some stream use cases due to hardware constraints
4291      * and implementation details.</p>
4292      * <p>For stream combinations not covered by the stream use case mandatory lists, such as
4293      * reprocessable session, constrained high speed session, or RAW stream combinations, the
4294      * application should leave stream use cases within the session as DEFAULT.</p>
4295      */
4296     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES =                 // int64[n] (acamera_metadata_enum_android_scaler_available_stream_use_cases_t)
4297             ACAMERA_SCALER_START + 25,
4298     ACAMERA_SCALER_END,
4299 
4300     /**
4301      * <p>Duration each pixel is exposed to
4302      * light.</p>
4303      *
4304      * <p>Type: int64</p>
4305      *
4306      * <p>This tag may appear in:
4307      * <ul>
4308      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4309      *   <li>ACaptureRequest</li>
4310      * </ul></p>
4311      *
4312      * <p>If the sensor can't expose this exact duration, it will shorten the
4313      * duration exposed to the nearest possible value (rather than expose longer).
4314      * The final exposure time used will be available in the output capture result.</p>
4315      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4316      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4317      *
4318      * @see ACAMERA_CONTROL_AE_MODE
4319      * @see ACAMERA_CONTROL_MODE
4320      */
4321     ACAMERA_SENSOR_EXPOSURE_TIME =                              // int64
4322             ACAMERA_SENSOR_START,
4323     /**
4324      * <p>Duration from start of frame exposure to
4325      * start of next frame exposure.</p>
4326      *
4327      * <p>Type: int64</p>
4328      *
4329      * <p>This tag may appear in:
4330      * <ul>
4331      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4332      *   <li>ACaptureRequest</li>
4333      * </ul></p>
4334      *
4335      * <p>The maximum frame rate that can be supported by a camera subsystem is
4336      * a function of many factors:</p>
4337      * <ul>
4338      * <li>Requested resolutions of output image streams</li>
4339      * <li>Availability of binning / skipping modes on the imager</li>
4340      * <li>The bandwidth of the imager interface</li>
4341      * <li>The bandwidth of the various ISP processing blocks</li>
4342      * </ul>
4343      * <p>Since these factors can vary greatly between different ISPs and
4344      * sensors, the camera abstraction tries to represent the bandwidth
4345      * restrictions with as simple a model as possible.</p>
4346      * <p>The model presented has the following characteristics:</p>
4347      * <ul>
4348      * <li>The image sensor is always configured to output the smallest
4349      * resolution possible given the application's requested output stream
4350      * sizes.  The smallest resolution is defined as being at least as large
4351      * as the largest requested output stream size; the camera pipeline must
4352      * never digitally upsample sensor data when the crop region covers the
4353      * whole sensor. In general, this means that if only small output stream
4354      * resolutions are configured, the sensor can provide a higher frame
4355      * rate.</li>
4356      * <li>Since any request may use any or all the currently configured
4357      * output streams, the sensor and ISP must be configured to support
4358      * scaling a single capture to all the streams at the same time.  This
4359      * means the camera pipeline must be ready to produce the largest
4360      * requested output size without any delay.  Therefore, the overall
4361      * frame rate of a given configured stream set is governed only by the
4362      * largest requested stream resolution.</li>
4363      * <li>Using more than one output stream in a request does not affect the
4364      * frame duration.</li>
4365      * <li>Certain format-streams may need to do additional background processing
4366      * before data is consumed/produced by that stream. These processors
4367      * can run concurrently to the rest of the camera pipeline, but
4368      * cannot process more than 1 capture at a time.</li>
4369      * </ul>
4370      * <p>The necessary information for the application, given the model above, is provided via
4371      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }.
4372      * These are used to determine the maximum frame rate / minimum frame duration that is
4373      * possible for a given stream configuration.</p>
4374      * <p>Specifically, the application can use the following rules to
4375      * determine the minimum frame duration it can request from the camera
4376      * device:</p>
4377      * <ol>
4378      * <li>Let the set of currently configured input/output streams be called <code>S</code>.</li>
4379      * <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 }
4380      * (with its respective size/format). Let this set of frame durations be called <code>F</code>.</li>
4381      * <li>For any given request <code>R</code>, the minimum frame duration allowed for <code>R</code> is the maximum
4382      * out of all values in <code>F</code>. Let the streams used in <code>R</code> be called <code>S_r</code>.</li>
4383      * </ol>
4384      * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }
4385      * using its respective size/format), then the frame duration in <code>F</code> determines the steady
4386      * state frame rate that the application will get if it uses <code>R</code> as a repeating request. Let
4387      * this special kind of request be called <code>Rsimple</code>.</p>
4388      * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved by a single capture of a
4389      * new request <code>Rstall</code> (which has at least one in-use stream with a non-0 stall time) and if
4390      * <code>Rstall</code> has the same minimum frame duration this will not cause a frame rate loss if all
4391      * buffers from the previous <code>Rstall</code> have already been delivered.</p>
4392      * <p>For more details about stalling, see {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }.</p>
4393      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4394      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4395      *
4396      * @see ACAMERA_CONTROL_AE_MODE
4397      * @see ACAMERA_CONTROL_MODE
4398      */
4399     ACAMERA_SENSOR_FRAME_DURATION =                             // int64
4400             ACAMERA_SENSOR_START + 1,
4401     /**
4402      * <p>The amount of gain applied to sensor data
4403      * before processing.</p>
4404      *
4405      * <p>Type: int32</p>
4406      *
4407      * <p>This tag may appear in:
4408      * <ul>
4409      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4410      *   <li>ACaptureRequest</li>
4411      * </ul></p>
4412      *
4413      * <p>The sensitivity is the standard ISO sensitivity value,
4414      * as defined in ISO 12232:2006.</p>
4415      * <p>The sensitivity must be within ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE, and
4416      * if if it less than ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY, the camera device
4417      * is guaranteed to use only analog amplification for applying the gain.</p>
4418      * <p>If the camera device cannot apply the exact sensitivity
4419      * requested, it will reduce the gain to the nearest supported
4420      * value. The final sensitivity used will be available in the
4421      * output capture result.</p>
4422      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4423      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4424      * <p>Note that for devices supporting postRawSensitivityBoost, the total sensitivity applied
4425      * to the final processed image is the combination of ACAMERA_SENSOR_SENSITIVITY and
4426      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST. In case the application uses the sensor
4427      * sensitivity from last capture result of an auto request for a manual request, in order
4428      * to achieve the same brightness in the output image, the application should also
4429      * set postRawSensitivityBoost.</p>
4430      *
4431      * @see ACAMERA_CONTROL_AE_MODE
4432      * @see ACAMERA_CONTROL_MODE
4433      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
4434      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
4435      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
4436      * @see ACAMERA_SENSOR_SENSITIVITY
4437      */
4438     ACAMERA_SENSOR_SENSITIVITY =                                // int32
4439             ACAMERA_SENSOR_START + 2,
4440     /**
4441      * <p>The standard reference illuminant used as the scene light source when
4442      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM1,
4443      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
4444      * ACAMERA_SENSOR_FORWARD_MATRIX1 matrices.</p>
4445      *
4446      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
4447      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
4448      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
4449      *
4450      * <p>Type: byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)</p>
4451      *
4452      * <p>This tag may appear in:
4453      * <ul>
4454      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4455      * </ul></p>
4456      *
4457      * <p>The values in this key correspond to the values defined for the
4458      * EXIF LightSource tag. These illuminants are standard light sources
4459      * that are often used calibrating camera devices.</p>
4460      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM1,
4461      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
4462      * ACAMERA_SENSOR_FORWARD_MATRIX1 will also be present.</p>
4463      * <p>Some devices may choose to provide a second set of calibration
4464      * information for improved quality, including
4465      * ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 and its corresponding matrices.</p>
4466      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4467      * the camera device has RAW capability.</p>
4468      *
4469      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
4470      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
4471      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
4472      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4473      */
4474     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 =                      // byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)
4475             ACAMERA_SENSOR_START + 3,
4476     /**
4477      * <p>The standard reference illuminant used as the scene light source when
4478      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM2,
4479      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
4480      * ACAMERA_SENSOR_FORWARD_MATRIX2 matrices.</p>
4481      *
4482      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
4483      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
4484      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
4485      *
4486      * <p>Type: byte</p>
4487      *
4488      * <p>This tag may appear in:
4489      * <ul>
4490      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4491      * </ul></p>
4492      *
4493      * <p>See ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 for more details.</p>
4494      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM2,
4495      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
4496      * ACAMERA_SENSOR_FORWARD_MATRIX2 will also be present.</p>
4497      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4498      * the camera device has RAW capability.</p>
4499      *
4500      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
4501      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
4502      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
4503      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4504      */
4505     ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 =                      // byte
4506             ACAMERA_SENSOR_START + 4,
4507     /**
4508      * <p>A per-device calibration transform matrix that maps from the
4509      * reference sensor colorspace to the actual device sensor colorspace.</p>
4510      *
4511      * <p>Type: rational[3*3]</p>
4512      *
4513      * <p>This tag may appear in:
4514      * <ul>
4515      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4516      * </ul></p>
4517      *
4518      * <p>This matrix is used to correct for per-device variations in the
4519      * sensor colorspace, and is used for processing raw buffer data.</p>
4520      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4521      * contains a per-device calibration transform that maps colors
4522      * from reference sensor color space (i.e. the "golden module"
4523      * colorspace) into this camera device's native sensor color
4524      * space under the first reference illuminant
4525      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
4526      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4527      * the camera device has RAW capability.</p>
4528      *
4529      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4530      */
4531     ACAMERA_SENSOR_CALIBRATION_TRANSFORM1 =                     // rational[3*3]
4532             ACAMERA_SENSOR_START + 5,
4533     /**
4534      * <p>A per-device calibration transform matrix that maps from the
4535      * reference sensor colorspace to the actual device sensor colorspace
4536      * (this is the colorspace of the raw buffer data).</p>
4537      *
4538      * <p>Type: rational[3*3]</p>
4539      *
4540      * <p>This tag may appear in:
4541      * <ul>
4542      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4543      * </ul></p>
4544      *
4545      * <p>This matrix is used to correct for per-device variations in the
4546      * sensor colorspace, and is used for processing raw buffer data.</p>
4547      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4548      * contains a per-device calibration transform that maps colors
4549      * from reference sensor color space (i.e. the "golden module"
4550      * colorspace) into this camera device's native sensor color
4551      * space under the second reference illuminant
4552      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
4553      * <p>This matrix will only be present if the second reference
4554      * illuminant is present.</p>
4555      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4556      * the camera device has RAW capability.</p>
4557      *
4558      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4559      */
4560     ACAMERA_SENSOR_CALIBRATION_TRANSFORM2 =                     // rational[3*3]
4561             ACAMERA_SENSOR_START + 6,
4562     /**
4563      * <p>A matrix that transforms color values from CIE XYZ color space to
4564      * reference sensor color space.</p>
4565      *
4566      * <p>Type: rational[3*3]</p>
4567      *
4568      * <p>This tag may appear in:
4569      * <ul>
4570      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4571      * </ul></p>
4572      *
4573      * <p>This matrix is used to convert from the standard CIE XYZ color
4574      * space to the reference sensor colorspace, and is used when processing
4575      * raw buffer data.</p>
4576      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4577      * contains a color transform matrix that maps colors from the CIE
4578      * XYZ color space to the reference sensor color space (i.e. the
4579      * "golden module" colorspace) under the first reference illuminant
4580      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
4581      * <p>The white points chosen in both the reference sensor color space
4582      * and the CIE XYZ colorspace when calculating this transform will
4583      * match the standard white point for the first reference illuminant
4584      * (i.e. no chromatic adaptation will be applied by this transform).</p>
4585      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4586      * the camera device has RAW capability.</p>
4587      *
4588      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4589      */
4590     ACAMERA_SENSOR_COLOR_TRANSFORM1 =                           // rational[3*3]
4591             ACAMERA_SENSOR_START + 7,
4592     /**
4593      * <p>A matrix that transforms color values from CIE XYZ color space to
4594      * reference sensor color space.</p>
4595      *
4596      * <p>Type: rational[3*3]</p>
4597      *
4598      * <p>This tag may appear in:
4599      * <ul>
4600      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4601      * </ul></p>
4602      *
4603      * <p>This matrix is used to convert from the standard CIE XYZ color
4604      * space to the reference sensor colorspace, and is used when processing
4605      * raw buffer data.</p>
4606      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4607      * contains a color transform matrix that maps colors from the CIE
4608      * XYZ color space to the reference sensor color space (i.e. the
4609      * "golden module" colorspace) under the second reference illuminant
4610      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
4611      * <p>The white points chosen in both the reference sensor color space
4612      * and the CIE XYZ colorspace when calculating this transform will
4613      * match the standard white point for the second reference illuminant
4614      * (i.e. no chromatic adaptation will be applied by this transform).</p>
4615      * <p>This matrix will only be present if the second reference
4616      * illuminant is present.</p>
4617      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4618      * the camera device has RAW capability.</p>
4619      *
4620      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4621      */
4622     ACAMERA_SENSOR_COLOR_TRANSFORM2 =                           // rational[3*3]
4623             ACAMERA_SENSOR_START + 8,
4624     /**
4625      * <p>A matrix that transforms white balanced camera colors from the reference
4626      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4627      *
4628      * <p>Type: rational[3*3]</p>
4629      *
4630      * <p>This tag may appear in:
4631      * <ul>
4632      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4633      * </ul></p>
4634      *
4635      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4636      * is used when processing raw buffer data.</p>
4637      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4638      * a color transform matrix that maps white balanced colors from the
4639      * reference sensor color space to the CIE XYZ color space with a D50 white
4640      * point.</p>
4641      * <p>Under the first reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1)
4642      * this matrix is chosen so that the standard white point for this reference
4643      * illuminant in the reference sensor colorspace is mapped to D50 in the
4644      * CIE XYZ colorspace.</p>
4645      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4646      * the camera device has RAW capability.</p>
4647      *
4648      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4649      */
4650     ACAMERA_SENSOR_FORWARD_MATRIX1 =                            // rational[3*3]
4651             ACAMERA_SENSOR_START + 9,
4652     /**
4653      * <p>A matrix that transforms white balanced camera colors from the reference
4654      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
4655      *
4656      * <p>Type: rational[3*3]</p>
4657      *
4658      * <p>This tag may appear in:
4659      * <ul>
4660      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4661      * </ul></p>
4662      *
4663      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
4664      * is used when processing raw buffer data.</p>
4665      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
4666      * a color transform matrix that maps white balanced colors from the
4667      * reference sensor color space to the CIE XYZ color space with a D50 white
4668      * point.</p>
4669      * <p>Under the second reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2)
4670      * this matrix is chosen so that the standard white point for this reference
4671      * illuminant in the reference sensor colorspace is mapped to D50 in the
4672      * CIE XYZ colorspace.</p>
4673      * <p>This matrix will only be present if the second reference
4674      * illuminant is present.</p>
4675      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4676      * the camera device has RAW capability.</p>
4677      *
4678      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4679      */
4680     ACAMERA_SENSOR_FORWARD_MATRIX2 =                            // rational[3*3]
4681             ACAMERA_SENSOR_START + 10,
4682     /**
4683      * <p>A fixed black level offset for each of the color filter arrangement
4684      * (CFA) mosaic channels.</p>
4685      *
4686      * <p>Type: int32[4]</p>
4687      *
4688      * <p>This tag may appear in:
4689      * <ul>
4690      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4691      * </ul></p>
4692      *
4693      * <p>This key specifies the zero light value for each of the CFA mosaic
4694      * channels in the camera sensor.  The maximal value output by the
4695      * sensor is represented by the value in ACAMERA_SENSOR_INFO_WHITE_LEVEL.</p>
4696      * <p>The values are given in the same order as channels listed for the CFA
4697      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
4698      * nth value given corresponds to the black level offset for the nth
4699      * color channel listed in the CFA.</p>
4700      * <p>The black level values of captured images may vary for different
4701      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
4702      * represents a coarse approximation for such case. It is recommended to
4703      * use ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL or use pixels from
4704      * ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS directly for captures when
4705      * supported by the camera device, which provides more accurate black
4706      * level values. For raw capture in particular, it is recommended to use
4707      * pixels from ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS to calculate black
4708      * level values for each frame.</p>
4709      * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p>
4710      *
4711      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
4712      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4713      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
4714      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
4715      * @see ACAMERA_SENSOR_SENSITIVITY
4716      */
4717     ACAMERA_SENSOR_BLACK_LEVEL_PATTERN =                        // int32[4]
4718             ACAMERA_SENSOR_START + 12,
4719     /**
4720      * <p>Maximum sensitivity that is implemented
4721      * purely through analog gain.</p>
4722      *
4723      * <p>Type: int32</p>
4724      *
4725      * <p>This tag may appear in:
4726      * <ul>
4727      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4728      * </ul></p>
4729      *
4730      * <p>For ACAMERA_SENSOR_SENSITIVITY values less than or
4731      * equal to this, all applied gain must be analog. For
4732      * values above this, the gain applied can be a mix of analog and
4733      * digital.</p>
4734      *
4735      * @see ACAMERA_SENSOR_SENSITIVITY
4736      */
4737     ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY =                     // int32
4738             ACAMERA_SENSOR_START + 13,
4739     /**
4740      * <p>Clockwise angle through which the output image needs to be rotated to be
4741      * upright on the device screen in its native orientation.</p>
4742      *
4743      * <p>Type: int32</p>
4744      *
4745      * <p>This tag may appear in:
4746      * <ul>
4747      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4748      * </ul></p>
4749      *
4750      * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
4751      * the sensor's coordinate system.</p>
4752      * <p>Starting with Android API level 32, camera clients that query the orientation via
4753      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> on foldable devices which
4754      * include logical cameras can receive a value that can dynamically change depending on the
4755      * device/fold state.
4756      * Clients are advised to not cache or store the orientation value of such logical sensors.
4757      * In case repeated queries to CameraCharacteristics are not preferred, then clients can
4758      * also access the entire mapping from device state to sensor orientation in
4759      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/DeviceStateSensorOrientationMap.html">DeviceStateSensorOrientationMap</a>.
4760      * Do note that a dynamically changing sensor orientation value in camera characteristics
4761      * will not be the best way to establish the orientation per frame. Clients that want to
4762      * know the sensor orientation of a particular captured frame should query the
4763      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID from the corresponding capture result and
4764      * check the respective physical camera orientation.</p>
4765      * <p>Native camera clients must query ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS for the mapping
4766      * between device state and camera sensor orientation. Dynamic updates to the sensor
4767      * orientation are not supported in this code path.</p>
4768      *
4769      * @see ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS
4770      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
4771      */
4772     ACAMERA_SENSOR_ORIENTATION =                                // int32
4773             ACAMERA_SENSOR_START + 14,
4774     /**
4775      * <p>Time at start of exposure of first
4776      * row of the image sensor active array, in nanoseconds.</p>
4777      *
4778      * <p>Type: int64</p>
4779      *
4780      * <p>This tag may appear in:
4781      * <ul>
4782      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4783      * </ul></p>
4784      *
4785      * <p>The timestamps are also included in all image
4786      * buffers produced for the same capture, and will be identical
4787      * on all the outputs.</p>
4788      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> UNKNOWN,
4789      * the timestamps measure time since an unspecified starting point,
4790      * and are monotonically increasing. They can be compared with the
4791      * timestamps for other captures from the same camera device, but are
4792      * not guaranteed to be comparable to any other time source.</p>
4793      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME, the
4794      * 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
4795      * be compared to other timestamps from other subsystems that
4796      * are using that base.</p>
4797      * <p>For reprocessing, the timestamp will match the start of exposure of
4798      * the input image, i.e. <a href="https://developer.android.com/reference/CaptureResult.html#SENSOR_TIMESTAMP">the
4799      * timestamp</a> in the TotalCaptureResult that was used to create the
4800      * reprocess capture request.</p>
4801      *
4802      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
4803      */
4804     ACAMERA_SENSOR_TIMESTAMP =                                  // int64
4805             ACAMERA_SENSOR_START + 16,
4806     /**
4807      * <p>The estimated camera neutral color in the native sensor colorspace at
4808      * the time of capture.</p>
4809      *
4810      * <p>Type: rational[3]</p>
4811      *
4812      * <p>This tag may appear in:
4813      * <ul>
4814      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4815      * </ul></p>
4816      *
4817      * <p>This value gives the neutral color point encoded as an RGB value in the
4818      * native sensor color space.  The neutral color point indicates the
4819      * currently estimated white point of the scene illumination.  It can be
4820      * used to interpolate between the provided color transforms when
4821      * processing raw sensor data.</p>
4822      * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
4823      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4824      * the camera device has RAW capability.</p>
4825      */
4826     ACAMERA_SENSOR_NEUTRAL_COLOR_POINT =                        // rational[3]
4827             ACAMERA_SENSOR_START + 18,
4828     /**
4829      * <p>Noise model coefficients for each CFA mosaic channel.</p>
4830      *
4831      * <p>Type: double[2*CFA Channels]</p>
4832      *
4833      * <p>This tag may appear in:
4834      * <ul>
4835      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4836      * </ul></p>
4837      *
4838      * <p>This key contains two noise model coefficients for each CFA channel
4839      * corresponding to the sensor amplification (S) and sensor readout
4840      * noise (O).  These are given as pairs of coefficients for each channel
4841      * in the same order as channels listed for the CFA layout key
4842      * (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT).  This is
4843      * represented as an array of Pair&lt;Double, Double&gt;, where
4844      * the first member of the Pair at index n is the S coefficient and the
4845      * second member is the O coefficient for the nth color channel in the CFA.</p>
4846      * <p>These coefficients are used in a two parameter noise model to describe
4847      * the amount of noise present in the image for each CFA channel.  The
4848      * noise model used here is:</p>
4849      * <p>N(x) = sqrt(Sx + O)</p>
4850      * <p>Where x represents the recorded signal of a CFA channel normalized to
4851      * the range [0, 1], and S and O are the noise model coefficients for
4852      * that channel.</p>
4853      * <p>A more detailed description of the noise model can be found in the
4854      * Adobe DNG specification for the NoiseProfile tag.</p>
4855      * <p>For a MONOCHROME camera, there is only one color channel. So the noise model coefficients
4856      * will only contain one S and one O.</p>
4857      *
4858      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
4859      */
4860     ACAMERA_SENSOR_NOISE_PROFILE =                              // double[2*CFA Channels]
4861             ACAMERA_SENSOR_START + 19,
4862     /**
4863      * <p>The worst-case divergence between Bayer green channels.</p>
4864      *
4865      * <p>Type: float</p>
4866      *
4867      * <p>This tag may appear in:
4868      * <ul>
4869      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4870      * </ul></p>
4871      *
4872      * <p>This value is an estimate of the worst case split between the
4873      * Bayer green channels in the red and blue rows in the sensor color
4874      * filter array.</p>
4875      * <p>The green split is calculated as follows:</p>
4876      * <ol>
4877      * <li>A 5x5 pixel (or larger) window W within the active sensor array is
4878      * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
4879      * mosaic channels (R, Gr, Gb, B).  The location and size of the window
4880      * chosen is implementation defined, and should be chosen to provide a
4881      * green split estimate that is both representative of the entire image
4882      * for this camera sensor, and can be calculated quickly.</li>
4883      * <li>The arithmetic mean of the green channels from the red
4884      * rows (mean_Gr) within W is computed.</li>
4885      * <li>The arithmetic mean of the green channels from the blue
4886      * rows (mean_Gb) within W is computed.</li>
4887      * <li>The maximum ratio R of the two means is computed as follows:
4888      * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
4889      * </ol>
4890      * <p>The ratio R is the green split divergence reported for this property,
4891      * which represents how much the green channels differ in the mosaic
4892      * pattern.  This value is typically used to determine the treatment of
4893      * the green mosaic channels when demosaicing.</p>
4894      * <p>The green split value can be roughly interpreted as follows:</p>
4895      * <ul>
4896      * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
4897      * <li>1.20 &lt;= R &gt;= 1.03 will require some software
4898      * correction to avoid demosaic errors (3-20% divergence).</li>
4899      * <li>R &gt; 1.20 will require strong software correction to produce
4900      * a usable image (&gt;20% divergence).</li>
4901      * </ul>
4902      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4903      * the camera device has RAW capability.</p>
4904      */
4905     ACAMERA_SENSOR_GREEN_SPLIT =                                // float
4906             ACAMERA_SENSOR_START + 22,
4907     /**
4908      * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
4909      * when ACAMERA_SENSOR_TEST_PATTERN_MODE is SOLID_COLOR.</p>
4910      *
4911      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
4912      *
4913      * <p>Type: int32[4]</p>
4914      *
4915      * <p>This tag may appear in:
4916      * <ul>
4917      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4918      *   <li>ACaptureRequest</li>
4919      * </ul></p>
4920      *
4921      * <p>Each color channel is treated as an unsigned 32-bit integer.
4922      * The camera device then uses the most significant X bits
4923      * that correspond to how many bits are in its Bayer raw sensor
4924      * output.</p>
4925      * <p>For example, a sensor with RAW10 Bayer output would use the
4926      * 10 most significant bits from each color channel.</p>
4927      */
4928     ACAMERA_SENSOR_TEST_PATTERN_DATA =                          // int32[4]
4929             ACAMERA_SENSOR_START + 23,
4930     /**
4931      * <p>When enabled, the sensor sends a test pattern instead of
4932      * doing a real exposure from the camera.</p>
4933      *
4934      * <p>Type: int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)</p>
4935      *
4936      * <p>This tag may appear in:
4937      * <ul>
4938      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4939      *   <li>ACaptureRequest</li>
4940      * </ul></p>
4941      *
4942      * <p>When a test pattern is enabled, all manual sensor controls specified
4943      * by ACAMERA_SENSOR_* will be ignored. All other controls should
4944      * work as normal.</p>
4945      * <p>For example, if manual flash is enabled, flash firing should still
4946      * occur (and that the test pattern remain unmodified, since the flash
4947      * would not actually affect it).</p>
4948      * <p>Defaults to OFF.</p>
4949      */
4950     ACAMERA_SENSOR_TEST_PATTERN_MODE =                          // int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)
4951             ACAMERA_SENSOR_START + 24,
4952     /**
4953      * <p>List of sensor test pattern modes for ACAMERA_SENSOR_TEST_PATTERN_MODE
4954      * supported by this camera device.</p>
4955      *
4956      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
4957      *
4958      * <p>Type: int32[n]</p>
4959      *
4960      * <p>This tag may appear in:
4961      * <ul>
4962      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4963      * </ul></p>
4964      *
4965      * <p>Defaults to OFF, and always includes OFF if defined.</p>
4966      */
4967     ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES =               // int32[n]
4968             ACAMERA_SENSOR_START + 25,
4969     /**
4970      * <p>Duration between the start of exposure for the first row of the image sensor,
4971      * and the start of exposure for one past the last row of the image sensor.</p>
4972      *
4973      * <p>Type: int64</p>
4974      *
4975      * <p>This tag may appear in:
4976      * <ul>
4977      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4978      * </ul></p>
4979      *
4980      * <p>This is the exposure time skew between the first and <code>(last+1)</code> row exposure start times. The
4981      * first row and the last row are the first and last rows inside of the
4982      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
4983      * <p>For typical camera sensors that use rolling shutters, this is also equivalent to the frame
4984      * readout time.</p>
4985      * <p>If the image sensor is operating in a binned or cropped mode due to the current output
4986      * target resolutions, it's possible this skew is reported to be larger than the exposure
4987      * time, for example, since it is based on the full array even if a partial array is read
4988      * out. Be sure to scale the number to cover the section of the sensor actually being used
4989      * for the outputs you care about. So if your output covers N rows of the active array of
4990      * height H, scale this value by N/H to get the total skew for that viewport.</p>
4991      * <p><em>Note:</em> Prior to Android 11, this field was described as measuring duration from
4992      * first to last row of the image sensor, which is not equal to the frame readout time for a
4993      * rolling shutter sensor. Implementations generally reported the latter value, so to resolve
4994      * the inconsistency, the description has been updated to range from (first, last+1) row
4995      * exposure start, instead.</p>
4996      *
4997      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4998      */
4999     ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW =                       // int64
5000             ACAMERA_SENSOR_START + 26,
5001     /**
5002      * <p>List of disjoint rectangles indicating the sensor
5003      * optically shielded black pixel regions.</p>
5004      *
5005      * <p>Type: int32[4*num_regions]</p>
5006      *
5007      * <p>This tag may appear in:
5008      * <ul>
5009      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5010      * </ul></p>
5011      *
5012      * <p>In most camera sensors, the active array is surrounded by some
5013      * optically shielded pixel areas. By blocking light, these pixels
5014      * provides a reliable black reference for black level compensation
5015      * in active array region.</p>
5016      * <p>This key provides a list of disjoint rectangles specifying the
5017      * regions of optically shielded (with metal shield) black pixel
5018      * regions if the camera device is capable of reading out these black
5019      * pixels in the output raw images. In comparison to the fixed black
5020      * level values reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN, this key
5021      * may provide a more accurate way for the application to calculate
5022      * black level of each captured raw images.</p>
5023      * <p>When this key is reported, the ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL and
5024      * ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL will also be reported.</p>
5025      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5026      *
5027      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5028      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
5029      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
5030      */
5031     ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS =                      // int32[4*num_regions]
5032             ACAMERA_SENSOR_START + 27,
5033     /**
5034      * <p>A per-frame dynamic black level offset for each of the color filter
5035      * arrangement (CFA) mosaic channels.</p>
5036      *
5037      * <p>Type: float[4]</p>
5038      *
5039      * <p>This tag may appear in:
5040      * <ul>
5041      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5042      * </ul></p>
5043      *
5044      * <p>Camera sensor black levels may vary dramatically for different
5045      * capture settings (e.g. ACAMERA_SENSOR_SENSITIVITY). The fixed black
5046      * level reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may be too
5047      * inaccurate to represent the actual value on a per-frame basis. The
5048      * camera device internal pipeline relies on reliable black level values
5049      * to process the raw images appropriately. To get the best image
5050      * quality, the camera device may choose to estimate the per frame black
5051      * level values either based on optically shielded black regions
5052      * (ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS) or its internal model.</p>
5053      * <p>This key reports the camera device estimated per-frame zero light
5054      * value for each of the CFA mosaic channels in the camera sensor. The
5055      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may only represent a coarse
5056      * approximation of the actual black level values. This value is the
5057      * black level used in camera device internal image processing pipeline
5058      * and generally more accurate than the fixed black level values.
5059      * However, since they are estimated values by the camera device, they
5060      * may not be as accurate as the black level values calculated from the
5061      * optical black pixels reported by ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS.</p>
5062      * <p>The values are given in the same order as channels listed for the CFA
5063      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
5064      * nth value given corresponds to the black level offset for the nth
5065      * color channel listed in the CFA.</p>
5066      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values.</p>
5067      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is available or the
5068      * camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
5069      *
5070      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5071      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
5072      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
5073      * @see ACAMERA_SENSOR_SENSITIVITY
5074      */
5075     ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL =                        // float[4]
5076             ACAMERA_SENSOR_START + 28,
5077     /**
5078      * <p>Maximum raw value output by sensor for this frame.</p>
5079      *
5080      * <p>Type: int32</p>
5081      *
5082      * <p>This tag may appear in:
5083      * <ul>
5084      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5085      * </ul></p>
5086      *
5087      * <p>Since the ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may change for different
5088      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY), the white
5089      * level will change accordingly. This key is similar to
5090      * ACAMERA_SENSOR_INFO_WHITE_LEVEL, but specifies the camera device
5091      * estimated white level for each frame.</p>
5092      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is
5093      * available or the camera device advertises this key via
5094      * {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
5095      *
5096      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5097      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
5098      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
5099      * @see ACAMERA_SENSOR_SENSITIVITY
5100      */
5101     ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL =                        // int32
5102             ACAMERA_SENSOR_START + 29,
5103     /**
5104      * <p>Switches sensor pixel mode between maximum resolution mode and default mode.</p>
5105      *
5106      * <p>Type: byte (acamera_metadata_enum_android_sensor_pixel_mode_t)</p>
5107      *
5108      * <p>This tag may appear in:
5109      * <ul>
5110      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5111      *   <li>ACaptureRequest</li>
5112      * </ul></p>
5113      *
5114      * <p>This key controls whether the camera sensor operates in
5115      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5116      * mode or not. By default, all camera devices operate in
5117      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode.
5118      * When operating in
5119      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode, sensors
5120      * 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>
5121      * capability would typically perform pixel binning in order to improve low light
5122      * performance, noise reduction etc. However, in
5123      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5124      * mode (supported only
5125      * 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>
5126      * sensors), sensors typically operate in unbinned mode allowing for a larger image size.
5127      * The stream configurations supported in
5128      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5129      * mode are also different from those of
5130      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode.
5131      * They can be queried through
5132      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> with
5133      * <a href="https://developer.android.com/reference/CameraCharacteristics.html#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)">CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)</a>.
5134      * Unless reported by both
5135      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a>s, the outputs from
5136      * <code>android.scaler.streamConfigurationMapMaximumResolution</code> and
5137      * <code>android.scaler.streamConfigurationMap</code>
5138      * must not be mixed in the same CaptureRequest. In other words, these outputs are
5139      * exclusive to each other.
5140      * This key does not need to be set for reprocess requests.</p>
5141      */
5142     ACAMERA_SENSOR_PIXEL_MODE =                                 // byte (acamera_metadata_enum_android_sensor_pixel_mode_t)
5143             ACAMERA_SENSOR_START + 32,
5144     /**
5145      * <p>Whether <code>RAW</code> images requested have their bayer pattern as described by
5146      * ACAMERA_SENSOR_INFO_BINNING_FACTOR.</p>
5147      *
5148      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
5149      *
5150      * <p>Type: byte (acamera_metadata_enum_android_sensor_raw_binning_factor_used_t)</p>
5151      *
5152      * <p>This tag may appear in:
5153      * <ul>
5154      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5155      * </ul></p>
5156      *
5157      * <p>This key will only be present in devices advertising the
5158      * <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>
5159      * capability which also advertise <code>REMOSAIC_REPROCESSING</code> capability. On all other devices
5160      * RAW targets will have a regular bayer pattern.</p>
5161      */
5162     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED =                    // byte (acamera_metadata_enum_android_sensor_raw_binning_factor_used_t)
5163             ACAMERA_SENSOR_START + 33,
5164     ACAMERA_SENSOR_END,
5165 
5166     /**
5167      * <p>The area of the image sensor which corresponds to active pixels after any geometric
5168      * distortion correction has been applied.</p>
5169      *
5170      * <p>Type: int32[4]</p>
5171      *
5172      * <p>This tag may appear in:
5173      * <ul>
5174      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5175      * </ul></p>
5176      *
5177      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
5178      * the region that actually receives light from the scene) after any geometric correction
5179      * has been applied, and should be treated as the maximum size in pixels of any of the
5180      * image output formats aside from the raw formats.</p>
5181      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
5182      * the full pixel array, and the size of the full pixel array is given by
5183      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5184      * <p>The coordinate system for most other keys that list pixel coordinates, including
5185      * ACAMERA_SCALER_CROP_REGION, is defined relative to the active array rectangle given in
5186      * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
5187      * <p>The active array may be smaller than the full pixel array, since the full array may
5188      * include black calibration pixels or other inactive regions.</p>
5189      * <p>For devices that do not support ACAMERA_DISTORTION_CORRECTION_MODE control, the active
5190      * array must be the same as ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
5191      * <p>For devices that support ACAMERA_DISTORTION_CORRECTION_MODE control, the active array must
5192      * be enclosed by ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. The difference between
5193      * pre-correction active array and active array accounts for scaling or cropping caused
5194      * by lens geometric distortion correction.</p>
5195      * <p>In general, application should always refer to active array size for controls like
5196      * metering regions or crop region. Two exceptions are when the application is dealing with
5197      * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
5198      * ACAMERA_DISTORTION_CORRECTION_MODE to OFF. In these cases, application should refer
5199      * to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
5200      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5201      *
5202      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5203      * @see ACAMERA_SCALER_CROP_REGION
5204      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5205      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5206      */
5207     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE =                     // int32[4]
5208             ACAMERA_SENSOR_INFO_START,
5209     /**
5210      * <p>Range of sensitivities for ACAMERA_SENSOR_SENSITIVITY supported by this
5211      * camera device.</p>
5212      *
5213      * @see ACAMERA_SENSOR_SENSITIVITY
5214      *
5215      * <p>Type: int32[2]</p>
5216      *
5217      * <p>This tag may appear in:
5218      * <ul>
5219      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5220      * </ul></p>
5221      *
5222      * <p>The values are the standard ISO sensitivity values,
5223      * as defined in ISO 12232:2006.</p>
5224      */
5225     ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE =                     // int32[2]
5226             ACAMERA_SENSOR_INFO_START + 1,
5227     /**
5228      * <p>The arrangement of color filters on sensor;
5229      * represents the colors in the top-left 2x2 section of
5230      * the sensor, in reading order, for a Bayer camera, or the
5231      * light spectrum it captures for MONOCHROME camera.</p>
5232      *
5233      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)</p>
5234      *
5235      * <p>This tag may appear in:
5236      * <ul>
5237      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5238      * </ul></p>
5239      *
5240      */
5241     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =              // byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)
5242             ACAMERA_SENSOR_INFO_START + 2,
5243     /**
5244      * <p>The range of image exposure times for ACAMERA_SENSOR_EXPOSURE_TIME supported
5245      * by this camera device.</p>
5246      *
5247      * @see ACAMERA_SENSOR_EXPOSURE_TIME
5248      *
5249      * <p>Type: int64[2]</p>
5250      *
5251      * <p>This tag may appear in:
5252      * <ul>
5253      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5254      * </ul></p>
5255      *
5256      */
5257     ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE =                   // int64[2]
5258             ACAMERA_SENSOR_INFO_START + 3,
5259     /**
5260      * <p>The maximum possible frame duration (minimum frame rate) for
5261      * ACAMERA_SENSOR_FRAME_DURATION that is supported this camera device.</p>
5262      *
5263      * @see ACAMERA_SENSOR_FRAME_DURATION
5264      *
5265      * <p>Type: int64</p>
5266      *
5267      * <p>This tag may appear in:
5268      * <ul>
5269      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5270      * </ul></p>
5271      *
5272      * <p>Attempting to use frame durations beyond the maximum will result in the frame
5273      * duration being clipped to the maximum. See that control for a full definition of frame
5274      * durations.</p>
5275      * <p>Refer to {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
5276      * for the minimum frame duration values.</p>
5277      */
5278     ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION =                    // int64
5279             ACAMERA_SENSOR_INFO_START + 4,
5280     /**
5281      * <p>The physical dimensions of the full pixel
5282      * array.</p>
5283      *
5284      * <p>Type: float[2]</p>
5285      *
5286      * <p>This tag may appear in:
5287      * <ul>
5288      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5289      * </ul></p>
5290      *
5291      * <p>This is the physical size of the sensor pixel
5292      * array defined by ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5293      *
5294      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5295      */
5296     ACAMERA_SENSOR_INFO_PHYSICAL_SIZE =                         // float[2]
5297             ACAMERA_SENSOR_INFO_START + 5,
5298     /**
5299      * <p>Dimensions of the full pixel array, possibly
5300      * including black calibration pixels.</p>
5301      *
5302      * <p>Type: int32[2]</p>
5303      *
5304      * <p>This tag may appear in:
5305      * <ul>
5306      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5307      * </ul></p>
5308      *
5309      * <p>The pixel count of the full pixel array of the image sensor, which covers
5310      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area.  This represents the full pixel dimensions of
5311      * the raw buffers produced by this sensor.</p>
5312      * <p>If a camera device supports raw sensor formats, either this or
5313      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is the maximum dimensions for the raw
5314      * output formats listed in {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
5315      * (this depends on whether or not the image sensor returns buffers containing pixels that
5316      * are not part of the active array region for blacklevel calibration or other purposes).</p>
5317      * <p>Some parts of the full pixel array may not receive light from the scene,
5318      * or be otherwise inactive.  The ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE key
5319      * defines the rectangle of active pixels that will be included in processed image
5320      * formats.</p>
5321      *
5322      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
5323      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5324      */
5325     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE =                      // int32[2]
5326             ACAMERA_SENSOR_INFO_START + 6,
5327     /**
5328      * <p>Maximum raw value output by sensor.</p>
5329      *
5330      * <p>Type: int32</p>
5331      *
5332      * <p>This tag may appear in:
5333      * <ul>
5334      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5335      * </ul></p>
5336      *
5337      * <p>This specifies the fully-saturated encoding level for the raw
5338      * sample values from the sensor.  This is typically caused by the
5339      * sensor becoming highly non-linear or clipping. The minimum for
5340      * each channel is specified by the offset in the
5341      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN key.</p>
5342      * <p>The white level is typically determined either by sensor bit depth
5343      * (8-14 bits is expected), or by the point where the sensor response
5344      * becomes too non-linear to be useful.  The default value for this is
5345      * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
5346      * <p>The white level values of captured images may vary for different
5347      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
5348      * represents a coarse approximation for such case. It is recommended
5349      * to use ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL for captures when supported
5350      * by the camera device, which provides more accurate white level values.</p>
5351      *
5352      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5353      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
5354      * @see ACAMERA_SENSOR_SENSITIVITY
5355      */
5356     ACAMERA_SENSOR_INFO_WHITE_LEVEL =                           // int32
5357             ACAMERA_SENSOR_INFO_START + 7,
5358     /**
5359      * <p>The time base source for sensor capture start timestamps.</p>
5360      *
5361      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)</p>
5362      *
5363      * <p>This tag may appear in:
5364      * <ul>
5365      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5366      * </ul></p>
5367      *
5368      * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
5369      * may not based on a time source that can be compared to other system time sources.</p>
5370      * <p>This characteristic defines the source for the timestamps, and therefore whether they
5371      * can be compared against other system time sources/timestamps.</p>
5372      */
5373     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE =                      // byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)
5374             ACAMERA_SENSOR_INFO_START + 8,
5375     /**
5376      * <p>Whether the RAW images output from this camera device are subject to
5377      * lens shading correction.</p>
5378      *
5379      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)</p>
5380      *
5381      * <p>This tag may appear in:
5382      * <ul>
5383      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5384      * </ul></p>
5385      *
5386      * <p>If TRUE, all images produced by the camera device in the RAW image formats will
5387      * have lens shading correction already applied to it. If FALSE, the images will
5388      * not be adjusted for lens shading correction.
5389      * See android.request.maxNumOutputRaw for a list of RAW image formats.</p>
5390      * <p>This key will be <code>null</code> for all devices do not report this information.
5391      * Devices with RAW capability will always report this information in this key.</p>
5392      */
5393     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED =                  // byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)
5394             ACAMERA_SENSOR_INFO_START + 9,
5395     /**
5396      * <p>The area of the image sensor which corresponds to active pixels prior to the
5397      * application of any geometric distortion correction.</p>
5398      *
5399      * <p>Type: int32[4]</p>
5400      *
5401      * <p>This tag may appear in:
5402      * <ul>
5403      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5404      * </ul></p>
5405      *
5406      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
5407      * the region that actually receives light from the scene) before any geometric correction
5408      * has been applied, and should be treated as the active region rectangle for any of the
5409      * raw formats.  All metadata associated with raw processing (e.g. the lens shading
5410      * correction map, and radial distortion fields) treats the top, left of this rectangle as
5411      * the origin, (0,0).</p>
5412      * <p>The size of this region determines the maximum field of view and the maximum number of
5413      * pixels that an image from this sensor can contain, prior to the application of
5414      * geometric distortion correction. The effective maximum pixel dimensions of a
5415      * post-distortion-corrected image is given by the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5416      * field, and the effective maximum field of view for a post-distortion-corrected image
5417      * can be calculated by applying the geometric distortion correction fields to this
5418      * rectangle, and cropping to the rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5419      * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
5420      * dimensions in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE given the position of a pixel,
5421      * (x', y'), in the raw pixel array with dimensions given in
5422      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE:</p>
5423      * <ol>
5424      * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
5425      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, otherwise this pixel is considered
5426      * to be outside of the FOV, and will not be shown in the processed output image.</li>
5427      * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
5428      * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
5429      * buffers is defined relative to the top, left of the
5430      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE rectangle.</li>
5431      * <li>If the resulting corrected pixel coordinate is within the region given in
5432      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, then the position of this pixel in the
5433      * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
5434      * when the top, left coordinate of that buffer is treated as (0, 0).</li>
5435      * </ol>
5436      * <p>Thus, for pixel x',y' = (25, 25) on a sensor where ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5437      * is (100,100), ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is (10, 10, 100, 100),
5438      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE is (20, 20, 80, 80), and the geometric distortion
5439      * correction doesn't change the pixel coordinate, the resulting pixel selected in
5440      * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
5441      * with dimensions given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, and would be (5, 5)
5442      * relative to the top,left of post-processed YUV output buffer with dimensions given in
5443      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5444      * <p>The currently supported fields that correct for geometric distortion are:</p>
5445      * <ol>
5446      * <li>ACAMERA_LENS_DISTORTION.</li>
5447      * </ol>
5448      * <p>If the camera device doesn't support geometric distortion correction, or all of the
5449      * geometric distortion fields are no-ops, this rectangle will be the same as the
5450      * post-distortion-corrected rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5451      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
5452      * the full pixel array, and the size of the full pixel array is given by
5453      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5454      * <p>The pre-correction active array may be smaller than the full pixel array, since the
5455      * full array may include black calibration pixels or other inactive regions.</p>
5456      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5457      *
5458      * @see ACAMERA_LENS_DISTORTION
5459      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5460      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5461      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5462      */
5463     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =      // int32[4]
5464             ACAMERA_SENSOR_INFO_START + 10,
5465     /**
5466      * <p>The area of the image sensor which corresponds to active pixels after any geometric
5467      * distortion correction has been applied, when the sensor runs in maximum resolution mode.</p>
5468      *
5469      * <p>Type: int32[4]</p>
5470      *
5471      * <p>This tag may appear in:
5472      * <ul>
5473      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5474      * </ul></p>
5475      *
5476      * <p>Analogous to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, when ACAMERA_SENSOR_PIXEL_MODE
5477      * is set to
5478      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5479      * Refer to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE for details, with sensor array related keys
5480      * replaced with their
5481      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5482      * counterparts.
5483      * This key will only be present for devices which advertise the
5484      * <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>
5485      * capability.</p>
5486      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5487      *
5488      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5489      * @see ACAMERA_SENSOR_PIXEL_MODE
5490      */
5491     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =  // int32[4]
5492             ACAMERA_SENSOR_INFO_START + 11,
5493     /**
5494      * <p>Dimensions of the full pixel array, possibly
5495      * including black calibration pixels, when the sensor runs in maximum resolution mode.
5496      * Analogous to ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, when ACAMERA_SENSOR_PIXEL_MODE is
5497      * set to
5498      * <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>
5499      *
5500      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5501      * @see ACAMERA_SENSOR_PIXEL_MODE
5502      *
5503      * <p>Type: int32[2]</p>
5504      *
5505      * <p>This tag may appear in:
5506      * <ul>
5507      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5508      * </ul></p>
5509      *
5510      * <p>The pixel count of the full pixel array of the image sensor, which covers
5511      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area. This represents the full pixel dimensions of
5512      * the raw buffers produced by this sensor, when it runs in maximum resolution mode. That
5513      * is, when ACAMERA_SENSOR_PIXEL_MODE is set to
5514      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5515      * This key will only be present for devices which advertise the
5516      * <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>
5517      * capability.</p>
5518      *
5519      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
5520      * @see ACAMERA_SENSOR_PIXEL_MODE
5521      */
5522     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION =   // int32[2]
5523             ACAMERA_SENSOR_INFO_START + 12,
5524     /**
5525      * <p>The area of the image sensor which corresponds to active pixels prior to the
5526      * application of any geometric distortion correction, when the sensor runs in maximum
5527      * resolution mode. This key must be used for crop / metering regions, only when
5528      * ACAMERA_SENSOR_PIXEL_MODE is set to
5529      * <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>
5530      *
5531      * @see ACAMERA_SENSOR_PIXEL_MODE
5532      *
5533      * <p>Type: int32[4]</p>
5534      *
5535      * <p>This tag may appear in:
5536      * <ul>
5537      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5538      * </ul></p>
5539      *
5540      * <p>Analogous to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
5541      * when ACAMERA_SENSOR_PIXEL_MODE is set to
5542      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5543      * This key will only be present for devices which advertise the
5544      * <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>
5545      * capability.</p>
5546      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5547      *
5548      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5549      * @see ACAMERA_SENSOR_PIXEL_MODE
5550      */
5551     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =
5552                                                                 // int32[4]
5553             ACAMERA_SENSOR_INFO_START + 13,
5554     /**
5555      * <p>Dimensions of the group of pixels which are under the same color filter.
5556      * This specifies the width and height (pair of integers) of the group of pixels which fall
5557      * under the same color filter for ULTRA_HIGH_RESOLUTION sensors.</p>
5558      *
5559      * <p>Type: int32[2]</p>
5560      *
5561      * <p>This tag may appear in:
5562      * <ul>
5563      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5564      * </ul></p>
5565      *
5566      * <p>Sensors can have pixels grouped together under the same color filter in order
5567      * to improve various aspects of imaging such as noise reduction, low light
5568      * performance etc. These groups can be of various sizes such as 2X2 (quad bayer),
5569      * 3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under
5570      * the same color filter.</p>
5571      * <p>This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW images
5572      * will have a regular bayer pattern.</p>
5573      * <p>This key will not be present for sensors which don't have the
5574      * <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>
5575      * capability.</p>
5576      */
5577     ACAMERA_SENSOR_INFO_BINNING_FACTOR =                        // int32[2]
5578             ACAMERA_SENSOR_INFO_START + 14,
5579     ACAMERA_SENSOR_INFO_END,
5580 
5581     /**
5582      * <p>Quality of lens shading correction applied
5583      * to the image data.</p>
5584      *
5585      * <p>Type: byte (acamera_metadata_enum_android_shading_mode_t)</p>
5586      *
5587      * <p>This tag may appear in:
5588      * <ul>
5589      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5590      *   <li>ACaptureRequest</li>
5591      * </ul></p>
5592      *
5593      * <p>When set to OFF mode, no lens shading correction will be applied by the
5594      * camera device, and an identity lens shading map data will be provided
5595      * if <code>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON</code>. For example, for lens
5596      * shading map with size of <code>[ 4, 3 ]</code>,
5597      * the output android.statistics.lensShadingCorrectionMap for this case will be an identity
5598      * map shown below:</p>
5599      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5600      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5601      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5602      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5603      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
5604      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
5605      * </code></pre>
5606      * <p>When set to other modes, lens shading correction will be applied by the camera
5607      * device. Applications can request lens shading map data by setting
5608      * ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE to ON, and then the camera device will provide lens
5609      * shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
5610      * data will be the one applied by the camera device for this capture request.</p>
5611      * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
5612      * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
5613      * AWB are in AUTO modes(ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF and ACAMERA_CONTROL_AWB_MODE <code>!=</code>
5614      * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
5615      * to be converged before using the returned shading map data.</p>
5616      *
5617      * @see ACAMERA_CONTROL_AE_MODE
5618      * @see ACAMERA_CONTROL_AWB_MODE
5619      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
5620      */
5621     ACAMERA_SHADING_MODE =                                      // byte (acamera_metadata_enum_android_shading_mode_t)
5622             ACAMERA_SHADING_START,
5623     /**
5624      * <p>List of lens shading modes for ACAMERA_SHADING_MODE that are supported by this camera device.</p>
5625      *
5626      * @see ACAMERA_SHADING_MODE
5627      *
5628      * <p>Type: byte[n]</p>
5629      *
5630      * <p>This tag may appear in:
5631      * <ul>
5632      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5633      * </ul></p>
5634      *
5635      * <p>This list contains lens shading modes that can be set for the camera device.
5636      * Camera devices that support the MANUAL_POST_PROCESSING capability will always
5637      * list OFF and FAST mode. This includes all FULL level devices.
5638      * LEGACY devices will always only support FAST mode.</p>
5639      */
5640     ACAMERA_SHADING_AVAILABLE_MODES =                           // byte[n]
5641             ACAMERA_SHADING_START + 2,
5642     ACAMERA_SHADING_END,
5643 
5644     /**
5645      * <p>Operating mode for the face detector
5646      * unit.</p>
5647      *
5648      * <p>Type: byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)</p>
5649      *
5650      * <p>This tag may appear in:
5651      * <ul>
5652      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5653      *   <li>ACaptureRequest</li>
5654      * </ul></p>
5655      *
5656      * <p>Whether face detection is enabled, and whether it
5657      * should output just the basic fields or the full set of
5658      * fields.</p>
5659      */
5660     ACAMERA_STATISTICS_FACE_DETECT_MODE =                       // byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)
5661             ACAMERA_STATISTICS_START,
5662     /**
5663      * <p>Operating mode for hot pixel map generation.</p>
5664      *
5665      * <p>Type: byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)</p>
5666      *
5667      * <p>This tag may appear in:
5668      * <ul>
5669      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5670      *   <li>ACaptureRequest</li>
5671      * </ul></p>
5672      *
5673      * <p>If set to <code>true</code>, a hot pixel map is returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.
5674      * If set to <code>false</code>, no hot pixel map will be returned.</p>
5675      *
5676      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
5677      */
5678     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE =                     // byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)
5679             ACAMERA_STATISTICS_START + 3,
5680     /**
5681      * <p>List of unique IDs for detected faces.</p>
5682      *
5683      * <p>Type: int32[n]</p>
5684      *
5685      * <p>This tag may appear in:
5686      * <ul>
5687      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5688      * </ul></p>
5689      *
5690      * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
5691      * to the camera device.  A face that leaves the field of view and later returns may be
5692      * assigned a new ID.</p>
5693      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL</p>
5694      *
5695      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5696      */
5697     ACAMERA_STATISTICS_FACE_IDS =                               // int32[n]
5698             ACAMERA_STATISTICS_START + 4,
5699     /**
5700      * <p>List of landmarks for detected
5701      * faces.</p>
5702      *
5703      * <p>Type: int32[n*6]</p>
5704      *
5705      * <p>This tag may appear in:
5706      * <ul>
5707      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5708      * </ul></p>
5709      *
5710      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5711      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
5712      * the top-left pixel of the active array.</p>
5713      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5714      * system depends on the mode being set.
5715      * When the distortion correction mode is OFF, the coordinate system follows
5716      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
5717      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
5718      * When the distortion correction mode is not OFF, the coordinate system follows
5719      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
5720      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
5721      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL.</p>
5722      * <p>Starting from API level 30, the coordinate system of activeArraySize or
5723      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
5724      * pre-zoomRatio field of view. This means that if the relative position of faces and
5725      * the camera device doesn't change, when zooming in by increasing
5726      * ACAMERA_CONTROL_ZOOM_RATIO, the face landmarks move farther away from the center of the
5727      * activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0
5728      * (default), the face landmarks coordinates won't change as ACAMERA_SCALER_CROP_REGION
5729      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
5730      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
5731      *
5732      * @see ACAMERA_CONTROL_ZOOM_RATIO
5733      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5734      * @see ACAMERA_SCALER_CROP_REGION
5735      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5736      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5737      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5738      */
5739     ACAMERA_STATISTICS_FACE_LANDMARKS =                         // int32[n*6]
5740             ACAMERA_STATISTICS_START + 5,
5741     /**
5742      * <p>List of the bounding rectangles for detected
5743      * faces.</p>
5744      *
5745      * <p>Type: int32[n*4]</p>
5746      *
5747      * <p>This tag may appear in:
5748      * <ul>
5749      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5750      * </ul></p>
5751      *
5752      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5753      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
5754      * the top-left pixel of the active array.</p>
5755      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
5756      * system depends on the mode being set.
5757      * When the distortion correction mode is OFF, the coordinate system follows
5758      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
5759      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
5760      * When the distortion correction mode is not OFF, the coordinate system follows
5761      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
5762      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
5763      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
5764      * <p>Starting from API level 30, the coordinate system of activeArraySize or
5765      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
5766      * pre-zoomRatio field of view. This means that if the relative position of faces and
5767      * the camera device doesn't change, when zooming in by increasing
5768      * ACAMERA_CONTROL_ZOOM_RATIO, the face rectangles grow larger and move farther away from
5769      * the center of the activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO
5770      * is set to 1.0 (default), the face rectangles won't change as ACAMERA_SCALER_CROP_REGION
5771      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
5772      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
5773      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, right, bottom)</code>.</p>
5774      *
5775      * @see ACAMERA_CONTROL_ZOOM_RATIO
5776      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5777      * @see ACAMERA_SCALER_CROP_REGION
5778      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5779      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5780      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5781      */
5782     ACAMERA_STATISTICS_FACE_RECTANGLES =                        // int32[n*4]
5783             ACAMERA_STATISTICS_START + 6,
5784     /**
5785      * <p>List of the face confidence scores for
5786      * detected faces</p>
5787      *
5788      * <p>Type: byte[n]</p>
5789      *
5790      * <p>This tag may appear in:
5791      * <ul>
5792      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5793      * </ul></p>
5794      *
5795      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
5796      *
5797      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
5798      */
5799     ACAMERA_STATISTICS_FACE_SCORES =                            // byte[n]
5800             ACAMERA_STATISTICS_START + 7,
5801     /**
5802      * <p>The shading map is a low-resolution floating-point map
5803      * that lists the coefficients used to correct for vignetting and color shading,
5804      * for each Bayer color channel of RAW image data.</p>
5805      *
5806      * <p>Type: float[4*n*m]</p>
5807      *
5808      * <p>This tag may appear in:
5809      * <ul>
5810      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5811      * </ul></p>
5812      *
5813      * <p>The map provided here is the same map that is used by the camera device to
5814      * correct both color shading and vignetting for output non-RAW images.</p>
5815      * <p>When there is no lens shading correction applied to RAW
5816      * output images (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED <code>==</code>
5817      * false), this map is the complete lens shading correction
5818      * map; when there is some lens shading correction applied to
5819      * the RAW output image (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED<code>==</code> true), this map reports the remaining lens shading
5820      * correction map that needs to be applied to get shading
5821      * corrected images that match the camera device's output for
5822      * non-RAW formats.</p>
5823      * <p>For a complete shading correction map, the least shaded
5824      * section of the image will have a gain factor of 1; all
5825      * other sections will have gains above 1.</p>
5826      * <p>When ACAMERA_COLOR_CORRECTION_MODE = TRANSFORM_MATRIX, the map
5827      * will take into account the colorCorrection settings.</p>
5828      * <p>The shading map is for the entire active pixel array, and is not
5829      * affected by the crop region specified in the request. Each shading map
5830      * entry is the value of the shading compensation map over a specific
5831      * pixel on the sensor.  Specifically, with a (N x M) resolution shading
5832      * map, and an active pixel array size (W x H), shading map entry
5833      * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
5834      * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
5835      * The map is assumed to be bilinearly interpolated between the sample points.</p>
5836      * <p>For a Bayer camera, the channel order is [R, Geven, Godd, B], where Geven is
5837      * the green channel for the even rows of a Bayer pattern, and Godd is the odd rows.
5838      * The shading map is stored in a fully interleaved format, and its size
5839      * is provided in the camera static metadata by ACAMERA_LENS_INFO_SHADING_MAP_SIZE.</p>
5840      * <p>The shading map will generally have on the order of 30-40 rows and columns,
5841      * and will be smaller than 64x64.</p>
5842      * <p>As an example, given a very small map for a Bayer camera defined as:</p>
5843      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
5844      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
5845      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
5846      *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
5847      *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
5848      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
5849      *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
5850      *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
5851      * </code></pre>
5852      * <p>The low-resolution scaling map images for each channel are
5853      * (displayed using nearest-neighbor interpolation):</p>
5854      * <p><img alt="Red lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
5855      * <img alt="Green (even rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
5856      * <img alt="Green (odd rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
5857      * <img alt="Blue lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
5858      * <p>As a visualization only, inverting the full-color map to recover an
5859      * image of a gray wall (using bicubic interpolation for visual quality)
5860      * as captured by the sensor gives:</p>
5861      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
5862      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
5863      * shading map for such a camera is defined as:</p>
5864      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
5865      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
5866      * [ 1.3, 1.3, 1.3, 1.3,  1.2, 1.2, 1.2, 1.2,
5867      *     1.1, 1.1, 1.1, 1.1,  1.3, 1.3, 1.3, 1.3,
5868      *   1.2, 1.2, 1.2, 1.2,  1.1, 1.1, 1.1, 1.1,
5869      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.2, 1.2, 1.2,
5870      *   1.3, 1.3, 1.3, 1.3,   1.2, 1.2, 1.2, 1.2,
5871      *     1.2, 1.2, 1.2, 1.2,  1.3, 1.3, 1.3, 1.3 ]
5872      * </code></pre>
5873      * <p>Note that the RAW image data might be subject to lens shading
5874      * correction not reported on this map. Query
5875      * ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED to see if RAW image data has subject
5876      * to lens shading correction. If ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
5877      * is TRUE, the RAW image data is subject to partial or full lens shading
5878      * correction. In the case full lens shading correction is applied to RAW
5879      * images, the gain factor map reported in this key will contain all 1.0 gains.
5880      * In other words, the map reported in this key is the remaining lens shading
5881      * that needs to be applied on the RAW image to get images without lens shading
5882      * artifacts. See android.request.maxNumOutputRaw for a list of RAW image
5883      * formats.</p>
5884      *
5885      * @see ACAMERA_COLOR_CORRECTION_MODE
5886      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
5887      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
5888      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
5889      */
5890     ACAMERA_STATISTICS_LENS_SHADING_MAP =                       // float[4*n*m]
5891             ACAMERA_STATISTICS_START + 11,
5892     /**
5893      * <p>The camera device estimated scene illumination lighting
5894      * frequency.</p>
5895      *
5896      * <p>Type: byte (acamera_metadata_enum_android_statistics_scene_flicker_t)</p>
5897      *
5898      * <p>This tag may appear in:
5899      * <ul>
5900      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5901      * </ul></p>
5902      *
5903      * <p>Many light sources, such as most fluorescent lights, flicker at a rate
5904      * that depends on the local utility power standards. This flicker must be
5905      * accounted for by auto-exposure routines to avoid artifacts in captured images.
5906      * The camera device uses this entry to tell the application what the scene
5907      * illuminant frequency is.</p>
5908      * <p>When manual exposure control is enabled
5909      * (<code>ACAMERA_CONTROL_AE_MODE == OFF</code> or <code>ACAMERA_CONTROL_MODE ==
5910      * OFF</code>), the ACAMERA_CONTROL_AE_ANTIBANDING_MODE doesn't perform
5911      * antibanding, and the application can ensure it selects
5912      * exposure times that do not cause banding issues by looking
5913      * into this metadata field. See
5914      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE for more details.</p>
5915      * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
5916      *
5917      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
5918      * @see ACAMERA_CONTROL_AE_MODE
5919      * @see ACAMERA_CONTROL_MODE
5920      */
5921     ACAMERA_STATISTICS_SCENE_FLICKER =                          // byte (acamera_metadata_enum_android_statistics_scene_flicker_t)
5922             ACAMERA_STATISTICS_START + 14,
5923     /**
5924      * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
5925      *
5926      * <p>Type: int32[2*n]</p>
5927      *
5928      * <p>This tag may appear in:
5929      * <ul>
5930      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5931      * </ul></p>
5932      *
5933      * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
5934      * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
5935      * bottom-right of the pixel array, respectively. The width and
5936      * height dimensions are given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.
5937      * This may include hot pixels that lie outside of the active array
5938      * bounds given by ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5939      *
5940      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5941      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5942      */
5943     ACAMERA_STATISTICS_HOT_PIXEL_MAP =                          // int32[2*n]
5944             ACAMERA_STATISTICS_START + 15,
5945     /**
5946      * <p>Whether the camera device will output the lens
5947      * shading map in output result metadata.</p>
5948      *
5949      * <p>Type: byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)</p>
5950      *
5951      * <p>This tag may appear in:
5952      * <ul>
5953      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5954      *   <li>ACaptureRequest</li>
5955      * </ul></p>
5956      *
5957      * <p>When set to ON,
5958      * ACAMERA_STATISTICS_LENS_SHADING_MAP will be provided in
5959      * the output result metadata.</p>
5960      * <p>ON is always supported on devices with the RAW capability.</p>
5961      *
5962      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
5963      */
5964     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE =                  // byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)
5965             ACAMERA_STATISTICS_START + 16,
5966     /**
5967      * <p>A control for selecting whether optical stabilization (OIS) position
5968      * information is included in output result metadata.</p>
5969      *
5970      * <p>Type: byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)</p>
5971      *
5972      * <p>This tag may appear in:
5973      * <ul>
5974      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5975      *   <li>ACaptureRequest</li>
5976      * </ul></p>
5977      *
5978      * <p>Since optical image stabilization generally involves motion much faster than the duration
5979      * of individual image exposure, multiple OIS samples can be included for a single capture
5980      * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
5981      * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
5982      * with the rolling shutter skew to account for lens motion during image exposure in
5983      * post-processing algorithms.</p>
5984      */
5985     ACAMERA_STATISTICS_OIS_DATA_MODE =                          // byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)
5986             ACAMERA_STATISTICS_START + 17,
5987     /**
5988      * <p>An array of timestamps of OIS samples, in nanoseconds.</p>
5989      *
5990      * <p>Type: int64[n]</p>
5991      *
5992      * <p>This tag may appear in:
5993      * <ul>
5994      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5995      * </ul></p>
5996      *
5997      * <p>The array contains the timestamps of OIS samples. The timestamps are in the same
5998      * timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.</p>
5999      *
6000      * @see ACAMERA_SENSOR_TIMESTAMP
6001      */
6002     ACAMERA_STATISTICS_OIS_TIMESTAMPS =                         // int64[n]
6003             ACAMERA_STATISTICS_START + 18,
6004     /**
6005      * <p>An array of shifts of OIS samples, in x direction.</p>
6006      *
6007      * <p>Type: float[n]</p>
6008      *
6009      * <p>This tag may appear in:
6010      * <ul>
6011      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6012      * </ul></p>
6013      *
6014      * <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
6015      * A positive value is a shift from left to right in the pre-correction active array
6016      * coordinate system. For example, if the optical center is (1000, 500) in pre-correction
6017      * active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
6018      * <p>The number of shifts must match the number of timestamps in
6019      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
6020      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
6021      * supporting devices). They are always reported in pre-correction active array coordinates,
6022      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
6023      * is needed.</p>
6024      *
6025      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
6026      */
6027     ACAMERA_STATISTICS_OIS_X_SHIFTS =                           // float[n]
6028             ACAMERA_STATISTICS_START + 19,
6029     /**
6030      * <p>An array of shifts of OIS samples, in y direction.</p>
6031      *
6032      * <p>Type: float[n]</p>
6033      *
6034      * <p>This tag may appear in:
6035      * <ul>
6036      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6037      * </ul></p>
6038      *
6039      * <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
6040      * A positive value is a shift from top to bottom in pre-correction active array coordinate
6041      * system. For example, if the optical center is (1000, 500) in active array coordinates, a
6042      * shift of (0, 5) puts the new optical center at (1000, 505).</p>
6043      * <p>The number of shifts must match the number of timestamps in
6044      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
6045      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
6046      * supporting devices). They are always reported in pre-correction active array coordinates,
6047      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
6048      * is needed.</p>
6049      *
6050      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
6051      */
6052     ACAMERA_STATISTICS_OIS_Y_SHIFTS =                           // float[n]
6053             ACAMERA_STATISTICS_START + 20,
6054     ACAMERA_STATISTICS_END,
6055 
6056     /**
6057      * <p>List of face detection modes for ACAMERA_STATISTICS_FACE_DETECT_MODE that are
6058      * supported by this camera device.</p>
6059      *
6060      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
6061      *
6062      * <p>Type: byte[n]</p>
6063      *
6064      * <p>This tag may appear in:
6065      * <ul>
6066      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6067      * </ul></p>
6068      *
6069      * <p>OFF is always supported.</p>
6070      */
6071     ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =       // byte[n]
6072             ACAMERA_STATISTICS_INFO_START,
6073     /**
6074      * <p>The maximum number of simultaneously detectable
6075      * faces.</p>
6076      *
6077      * <p>Type: int32</p>
6078      *
6079      * <p>This tag may appear in:
6080      * <ul>
6081      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6082      * </ul></p>
6083      *
6084      */
6085     ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT =                    // int32
6086             ACAMERA_STATISTICS_INFO_START + 2,
6087     /**
6088      * <p>List of hot pixel map output modes for ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE that are
6089      * supported by this camera device.</p>
6090      *
6091      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
6092      *
6093      * <p>Type: byte[n]</p>
6094      *
6095      * <p>This tag may appear in:
6096      * <ul>
6097      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6098      * </ul></p>
6099      *
6100      * <p>If no hotpixel map output is available for this camera device, this will contain only
6101      * <code>false</code>.</p>
6102      * <p>ON is always supported on devices with the RAW capability.</p>
6103      */
6104     ACAMERA_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =     // byte[n]
6105             ACAMERA_STATISTICS_INFO_START + 6,
6106     /**
6107      * <p>List of lens shading map output modes for ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE that
6108      * are supported by this camera device.</p>
6109      *
6110      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
6111      *
6112      * <p>Type: byte[n]</p>
6113      *
6114      * <p>This tag may appear in:
6115      * <ul>
6116      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6117      * </ul></p>
6118      *
6119      * <p>If no lens shading map output is available for this camera device, this key will
6120      * contain only OFF.</p>
6121      * <p>ON is always supported on devices with the RAW capability.
6122      * LEGACY mode devices will always only support OFF.</p>
6123      */
6124     ACAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =  // byte[n]
6125             ACAMERA_STATISTICS_INFO_START + 7,
6126     /**
6127      * <p>List of OIS data output modes for ACAMERA_STATISTICS_OIS_DATA_MODE that
6128      * are supported by this camera device.</p>
6129      *
6130      * @see ACAMERA_STATISTICS_OIS_DATA_MODE
6131      *
6132      * <p>Type: byte[n]</p>
6133      *
6134      * <p>This tag may appear in:
6135      * <ul>
6136      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6137      * </ul></p>
6138      *
6139      * <p>If no OIS data output is available for this camera device, this key will
6140      * contain only OFF.</p>
6141      */
6142     ACAMERA_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =          // byte[n]
6143             ACAMERA_STATISTICS_INFO_START + 8,
6144     ACAMERA_STATISTICS_INFO_END,
6145 
6146     /**
6147      * <p>Tonemapping / contrast / gamma curve for the blue
6148      * channel, to use when ACAMERA_TONEMAP_MODE is
6149      * CONTRAST_CURVE.</p>
6150      *
6151      * @see ACAMERA_TONEMAP_MODE
6152      *
6153      * <p>Type: float[n*2]</p>
6154      *
6155      * <p>This tag may appear in:
6156      * <ul>
6157      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6158      *   <li>ACaptureRequest</li>
6159      * </ul></p>
6160      *
6161      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
6162      *
6163      * @see ACAMERA_TONEMAP_CURVE_RED
6164      */
6165     ACAMERA_TONEMAP_CURVE_BLUE =                                // float[n*2]
6166             ACAMERA_TONEMAP_START,
6167     /**
6168      * <p>Tonemapping / contrast / gamma curve for the green
6169      * channel, to use when ACAMERA_TONEMAP_MODE is
6170      * CONTRAST_CURVE.</p>
6171      *
6172      * @see ACAMERA_TONEMAP_MODE
6173      *
6174      * <p>Type: float[n*2]</p>
6175      *
6176      * <p>This tag may appear in:
6177      * <ul>
6178      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6179      *   <li>ACaptureRequest</li>
6180      * </ul></p>
6181      *
6182      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
6183      *
6184      * @see ACAMERA_TONEMAP_CURVE_RED
6185      */
6186     ACAMERA_TONEMAP_CURVE_GREEN =                               // float[n*2]
6187             ACAMERA_TONEMAP_START + 1,
6188     /**
6189      * <p>Tonemapping / contrast / gamma curve for the red
6190      * channel, to use when ACAMERA_TONEMAP_MODE is
6191      * CONTRAST_CURVE.</p>
6192      *
6193      * @see ACAMERA_TONEMAP_MODE
6194      *
6195      * <p>Type: float[n*2]</p>
6196      *
6197      * <p>This tag may appear in:
6198      * <ul>
6199      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6200      *   <li>ACaptureRequest</li>
6201      * </ul></p>
6202      *
6203      * <p>Each channel's curve is defined by an array of control points:</p>
6204      * <pre><code>ACAMERA_TONEMAP_CURVE_RED =
6205      *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
6206      * 2 &lt;= N &lt;= ACAMERA_TONEMAP_MAX_CURVE_POINTS</code></pre>
6207      * <p>These are sorted in order of increasing <code>Pin</code>; it is
6208      * required that input values 0.0 and 1.0 are included in the list to
6209      * define a complete mapping. For input values between control points,
6210      * the camera device must linearly interpolate between the control
6211      * points.</p>
6212      * <p>Each curve can have an independent number of points, and the number
6213      * of points can be less than max (that is, the request doesn't have to
6214      * always provide a curve with number of points equivalent to
6215      * ACAMERA_TONEMAP_MAX_CURVE_POINTS).</p>
6216      * <p>For devices with MONOCHROME capability, all three channels must have the same set of
6217      * control points.</p>
6218      * <p>A few examples, and their corresponding graphical mappings; these
6219      * only specify the red channel and the precision is limited to 4
6220      * digits, for conciseness.</p>
6221      * <p>Linear mapping:</p>
6222      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 0, 1.0, 1.0 ]
6223      * </code></pre>
6224      * <p><img alt="Linear mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
6225      * <p>Invert mapping:</p>
6226      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 1.0, 1.0, 0 ]
6227      * </code></pre>
6228      * <p><img alt="Inverting mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
6229      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
6230      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
6231      *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
6232      *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
6233      *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
6234      *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
6235      * </code></pre>
6236      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
6237      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
6238      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
6239      *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
6240      *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
6241      *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
6242      *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
6243      * </code></pre>
6244      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
6245      *
6246      * @see ACAMERA_TONEMAP_CURVE_RED
6247      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
6248      */
6249     ACAMERA_TONEMAP_CURVE_RED =                                 // float[n*2]
6250             ACAMERA_TONEMAP_START + 2,
6251     /**
6252      * <p>High-level global contrast/gamma/tonemapping control.</p>
6253      *
6254      * <p>Type: byte (acamera_metadata_enum_android_tonemap_mode_t)</p>
6255      *
6256      * <p>This tag may appear in:
6257      * <ul>
6258      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6259      *   <li>ACaptureRequest</li>
6260      * </ul></p>
6261      *
6262      * <p>When switching to an application-defined contrast curve by setting
6263      * ACAMERA_TONEMAP_MODE to CONTRAST_CURVE, the curve is defined
6264      * per-channel with a set of <code>(in, out)</code> points that specify the
6265      * mapping from input high-bit-depth pixel value to the output
6266      * low-bit-depth value.  Since the actual pixel ranges of both input
6267      * and output may change depending on the camera pipeline, the values
6268      * are specified by normalized floating-point numbers.</p>
6269      * <p>More-complex color mapping operations such as 3D color look-up
6270      * tables, selective chroma enhancement, or other non-linear color
6271      * transforms will be disabled when ACAMERA_TONEMAP_MODE is
6272      * CONTRAST_CURVE.</p>
6273      * <p>When using either FAST or HIGH_QUALITY, the camera device will
6274      * emit its own tonemap curve in android.tonemap.curve.
6275      * These values are always available, and as close as possible to the
6276      * actually used nonlinear/nonglobal transforms.</p>
6277      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
6278      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
6279      * roughly the same.</p>
6280      *
6281      * @see ACAMERA_TONEMAP_MODE
6282      */
6283     ACAMERA_TONEMAP_MODE =                                      // byte (acamera_metadata_enum_android_tonemap_mode_t)
6284             ACAMERA_TONEMAP_START + 3,
6285     /**
6286      * <p>Maximum number of supported points in the
6287      * tonemap curve that can be used for android.tonemap.curve.</p>
6288      *
6289      * <p>Type: int32</p>
6290      *
6291      * <p>This tag may appear in:
6292      * <ul>
6293      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6294      * </ul></p>
6295      *
6296      * <p>If the actual number of points provided by the application (in ACAMERA_TONEMAPCURVE_*) is
6297      * less than this maximum, the camera device will resample the curve to its internal
6298      * representation, using linear interpolation.</p>
6299      * <p>The output curves in the result metadata may have a different number
6300      * of points than the input curves, and will represent the actual
6301      * hardware curves used as closely as possible when linearly interpolated.</p>
6302      */
6303     ACAMERA_TONEMAP_MAX_CURVE_POINTS =                          // int32
6304             ACAMERA_TONEMAP_START + 4,
6305     /**
6306      * <p>List of tonemapping modes for ACAMERA_TONEMAP_MODE that are supported by this camera
6307      * device.</p>
6308      *
6309      * @see ACAMERA_TONEMAP_MODE
6310      *
6311      * <p>Type: byte[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>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
6319      * at least one of below mode combinations:</p>
6320      * <ul>
6321      * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
6322      * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
6323      * </ul>
6324      * <p>This includes all FULL level devices.</p>
6325      */
6326     ACAMERA_TONEMAP_AVAILABLE_TONE_MAP_MODES =                  // byte[n]
6327             ACAMERA_TONEMAP_START + 5,
6328     /**
6329      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
6330      * GAMMA_VALUE</p>
6331      *
6332      * @see ACAMERA_TONEMAP_MODE
6333      *
6334      * <p>Type: float</p>
6335      *
6336      * <p>This tag may appear in:
6337      * <ul>
6338      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6339      *   <li>ACaptureRequest</li>
6340      * </ul></p>
6341      *
6342      * <p>The tonemap curve will be defined the following formula:</p>
6343      * <ul>
6344      * <li>OUT = pow(IN, 1.0 / gamma)</li>
6345      * </ul>
6346      * <p>where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
6347      * pow is the power function and gamma is the gamma value specified by this
6348      * key.</p>
6349      * <p>The same curve will be applied to all color channels. The camera device
6350      * may clip the input gamma value to its supported range. The actual applied
6351      * value will be returned in capture result.</p>
6352      * <p>The valid range of gamma value varies on different devices, but values
6353      * within [1.0, 5.0] are guaranteed not to be clipped.</p>
6354      */
6355     ACAMERA_TONEMAP_GAMMA =                                     // float
6356             ACAMERA_TONEMAP_START + 6,
6357     /**
6358      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
6359      * PRESET_CURVE</p>
6360      *
6361      * @see ACAMERA_TONEMAP_MODE
6362      *
6363      * <p>Type: byte (acamera_metadata_enum_android_tonemap_preset_curve_t)</p>
6364      *
6365      * <p>This tag may appear in:
6366      * <ul>
6367      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6368      *   <li>ACaptureRequest</li>
6369      * </ul></p>
6370      *
6371      * <p>The tonemap curve will be defined by specified standard.</p>
6372      * <p>sRGB (approximated by 16 control points):</p>
6373      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
6374      * <p>Rec. 709 (approximated by 16 control points):</p>
6375      * <p><img alt="Rec. 709 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
6376      * <p>Note that above figures show a 16 control points approximation of preset
6377      * curves. Camera devices may apply a different approximation to the curve.</p>
6378      */
6379     ACAMERA_TONEMAP_PRESET_CURVE =                              // byte (acamera_metadata_enum_android_tonemap_preset_curve_t)
6380             ACAMERA_TONEMAP_START + 7,
6381     ACAMERA_TONEMAP_END,
6382 
6383     /**
6384      * <p>Generally classifies the overall set of the camera device functionality.</p>
6385      *
6386      * <p>Type: byte (acamera_metadata_enum_android_info_supported_hardware_level_t)</p>
6387      *
6388      * <p>This tag may appear in:
6389      * <ul>
6390      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6391      * </ul></p>
6392      *
6393      * <p>The supported hardware level is a high-level description of the camera device's
6394      * capabilities, summarizing several capabilities into one field.  Each level adds additional
6395      * features to the previous one, and is always a strict superset of the previous level.
6396      * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
6397      * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
6398      * numerical value as well. To check if a given device is at least at a given hardware level,
6399      * the following code snippet can be used:</p>
6400      * <pre><code>// Returns true if the device supports the required hardware level, or better.
6401      * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
6402      *     final int[] sortedHwLevels = {
6403      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
6404      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
6405      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
6406      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
6407      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
6408      *     };
6409      *     int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
6410      *     if (requiredLevel == deviceLevel) {
6411      *         return true;
6412      *     }
6413      *
6414      *     for (int sortedlevel : sortedHwLevels) {
6415      *         if (sortedlevel == requiredLevel) {
6416      *             return true;
6417      *         } else if (sortedlevel == deviceLevel) {
6418      *             return false;
6419      *         }
6420      *     }
6421      *     return false; // Should never reach here
6422      * }
6423      * </code></pre>
6424      * <p>At a high level, the levels are:</p>
6425      * <ul>
6426      * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
6427      *   Android devices, and have very limited capabilities.</li>
6428      * <li><code>LIMITED</code> devices represent the
6429      *   baseline feature set, and may also include additional capabilities that are
6430      *   subsets of <code>FULL</code>.</li>
6431      * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
6432      *   post-processing settings, and image capture at a high rate.</li>
6433      * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
6434      *   with additional output stream configurations.</li>
6435      * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
6436      *   lens information not reported or less stable framerates.</li>
6437      * </ul>
6438      * <p>See the individual level enums for full descriptions of the supported capabilities.  The
6439      * ACAMERA_REQUEST_AVAILABLE_CAPABILITIES entry describes the device's capabilities at a
6440      * finer-grain level, if needed. In addition, many controls have their available settings or
6441      * ranges defined in individual entries from {@link ACameraManager_getCameraCharacteristics }.</p>
6442      * <p>Some features are not part of any particular hardware level or capability and must be
6443      * queried separately. These include:</p>
6444      * <ul>
6445      * <li>Calibrated timestamps (ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME)</li>
6446      * <li>Precision lens control (ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION <code>==</code> CALIBRATED)</li>
6447      * <li>Face detection (ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES)</li>
6448      * <li>Optical or electrical image stabilization
6449      *   (ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
6450      *    ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)</li>
6451      * </ul>
6452      *
6453      * @see ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
6454      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
6455      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
6456      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
6457      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
6458      * @see ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
6459      */
6460     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL =                     // byte (acamera_metadata_enum_android_info_supported_hardware_level_t)
6461             ACAMERA_INFO_START,
6462     /**
6463      * <p>A short string for manufacturer version information about the camera device, such as
6464      * ISP hardware, sensors, etc.</p>
6465      *
6466      * <p>Type: byte</p>
6467      *
6468      * <p>This tag may appear in:
6469      * <ul>
6470      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6471      * </ul></p>
6472      *
6473      * <p>This can be used in <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_IMAGE_DESCRIPTION">TAG_IMAGE_DESCRIPTION</a>
6474      * in jpeg EXIF. This key may be absent if no version information is available on the
6475      * device.</p>
6476      */
6477     ACAMERA_INFO_VERSION =                                      // byte
6478             ACAMERA_INFO_START + 1,
6479     /**
6480      *
6481      * <p>Type: int64[2*n]</p>
6482      *
6483      * <p>This tag may appear in:
6484      * <ul>
6485      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6486      * </ul></p>
6487      *
6488      * <p>HAL must populate the array with
6489      * (hardware::camera::provider::V2_5::DeviceState, sensorOrientation) pairs for each
6490      * supported device state bitwise combination.</p>
6491      */
6492     ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS =                    // int64[2*n]
6493             ACAMERA_INFO_START + 3,
6494     ACAMERA_INFO_END,
6495 
6496     /**
6497      * <p>Whether black-level compensation is locked
6498      * to its current values, or is free to vary.</p>
6499      *
6500      * <p>Type: byte (acamera_metadata_enum_android_black_level_lock_t)</p>
6501      *
6502      * <p>This tag may appear in:
6503      * <ul>
6504      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6505      *   <li>ACaptureRequest</li>
6506      * </ul></p>
6507      *
6508      * <p>Whether the black level offset was locked for this frame.  Should be
6509      * ON if ACAMERA_BLACK_LEVEL_LOCK was ON in the capture request, unless
6510      * a change in other capture settings forced the camera device to
6511      * perform a black level reset.</p>
6512      *
6513      * @see ACAMERA_BLACK_LEVEL_LOCK
6514      */
6515     ACAMERA_BLACK_LEVEL_LOCK =                                  // byte (acamera_metadata_enum_android_black_level_lock_t)
6516             ACAMERA_BLACK_LEVEL_START,
6517     ACAMERA_BLACK_LEVEL_END,
6518 
6519     /**
6520      * <p>The frame number corresponding to the last request
6521      * with which the output result (metadata + buffers) has been fully
6522      * synchronized.</p>
6523      *
6524      * <p>Type: int64 (acamera_metadata_enum_android_sync_frame_number_t)</p>
6525      *
6526      * <p>This tag may appear in:
6527      * <ul>
6528      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6529      * </ul></p>
6530      *
6531      * <p>When a request is submitted to the camera device, there is usually a
6532      * delay of several frames before the controls get applied. A camera
6533      * device may either choose to account for this delay by implementing a
6534      * pipeline and carefully submit well-timed atomic control updates, or
6535      * it may start streaming control changes that span over several frame
6536      * boundaries.</p>
6537      * <p>In the latter case, whenever a request's settings change relative to
6538      * the previous submitted request, the full set of changes may take
6539      * multiple frame durations to fully take effect. Some settings may
6540      * take effect sooner (in less frame durations) than others.</p>
6541      * <p>While a set of control changes are being propagated, this value
6542      * will be CONVERGING.</p>
6543      * <p>Once it is fully known that a set of control changes have been
6544      * finished propagating, and the resulting updated control settings
6545      * have been read back by the camera device, this value will be set
6546      * to a non-negative frame number (corresponding to the request to
6547      * which the results have synchronized to).</p>
6548      * <p>Older camera device implementations may not have a way to detect
6549      * when all camera controls have been applied, and will always set this
6550      * value to UNKNOWN.</p>
6551      * <p>FULL capability devices will always have this value set to the
6552      * frame number of the request corresponding to this result.</p>
6553      * <p><em>Further details</em>:</p>
6554      * <ul>
6555      * <li>Whenever a request differs from the last request, any future
6556      * results not yet returned may have this value set to CONVERGING (this
6557      * could include any in-progress captures not yet returned by the camera
6558      * device, for more details see pipeline considerations below).</li>
6559      * <li>Submitting a series of multiple requests that differ from the
6560      * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
6561      * moves the new synchronization frame to the last non-repeating
6562      * request (using the smallest frame number from the contiguous list of
6563      * repeating requests).</li>
6564      * <li>Submitting the same request repeatedly will not change this value
6565      * to CONVERGING, if it was already a non-negative value.</li>
6566      * <li>When this value changes to non-negative, that means that all of the
6567      * metadata controls from the request have been applied, all of the
6568      * metadata controls from the camera device have been read to the
6569      * updated values (into the result), and all of the graphics buffers
6570      * corresponding to this result are also synchronized to the request.</li>
6571      * </ul>
6572      * <p><em>Pipeline considerations</em>:</p>
6573      * <p>Submitting a request with updated controls relative to the previously
6574      * submitted requests may also invalidate the synchronization state
6575      * of all the results corresponding to currently in-flight requests.</p>
6576      * <p>In other words, results for this current request and up to
6577      * ACAMERA_REQUEST_PIPELINE_MAX_DEPTH prior requests may have their
6578      * ACAMERA_SYNC_FRAME_NUMBER change to CONVERGING.</p>
6579      *
6580      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
6581      * @see ACAMERA_SYNC_FRAME_NUMBER
6582      */
6583     ACAMERA_SYNC_FRAME_NUMBER =                                 // int64 (acamera_metadata_enum_android_sync_frame_number_t)
6584             ACAMERA_SYNC_START,
6585     /**
6586      * <p>The maximum number of frames that can occur after a request
6587      * (different than the previous) has been submitted, and before the
6588      * result's state becomes synchronized.</p>
6589      *
6590      * <p>Type: int32 (acamera_metadata_enum_android_sync_max_latency_t)</p>
6591      *
6592      * <p>This tag may appear in:
6593      * <ul>
6594      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6595      * </ul></p>
6596      *
6597      * <p>This defines the maximum distance (in number of metadata results),
6598      * between the frame number of the request that has new controls to apply
6599      * and the frame number of the result that has all the controls applied.</p>
6600      * <p>In other words this acts as an upper boundary for how many frames
6601      * must occur before the camera device knows for a fact that the new
6602      * submitted camera settings have been applied in outgoing frames.</p>
6603      */
6604     ACAMERA_SYNC_MAX_LATENCY =                                  // int32 (acamera_metadata_enum_android_sync_max_latency_t)
6605             ACAMERA_SYNC_START + 1,
6606     ACAMERA_SYNC_END,
6607 
6608     /**
6609      * <p>The available depth dataspace stream
6610      * configurations that this camera device supports
6611      * (i.e. format, width, height, output/input stream).</p>
6612      *
6613      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)</p>
6614      *
6615      * <p>This tag may appear in:
6616      * <ul>
6617      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6618      * </ul></p>
6619      *
6620      * <p>These are output stream configurations for use with
6621      * dataSpace HAL_DATASPACE_DEPTH. The configurations are
6622      * listed as <code>(format, width, height, input?)</code> tuples.</p>
6623      * <p>Only devices that support depth output for at least
6624      * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
6625      * this entry.</p>
6626      * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
6627      * sparse depth point cloud must report a single entry for
6628      * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
6629      * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
6630      * the entries for HAL_PIXEL_FORMAT_Y16.</p>
6631      */
6632     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =       // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)
6633             ACAMERA_DEPTH_START + 1,
6634     /**
6635      * <p>This lists the minimum frame duration for each
6636      * format/size combination for depth output formats.</p>
6637      *
6638      * <p>Type: int64[4*n]</p>
6639      *
6640      * <p>This tag may appear in:
6641      * <ul>
6642      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6643      * </ul></p>
6644      *
6645      * <p>This should correspond to the frame duration when only that
6646      * stream is active, with all processing (typically in android.*.mode)
6647      * set to either OFF or FAST.</p>
6648      * <p>When multiple streams are used in a request, the minimum frame
6649      * duration will be max(individual stream min durations).</p>
6650      * <p>The minimum frame duration of a stream (of a particular format, size)
6651      * is the same regardless of whether the stream is input or output.</p>
6652      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
6653      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
6654      * calculating the max frame rate.</p>
6655      *
6656      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6657      * @see ACAMERA_SENSOR_FRAME_DURATION
6658      */
6659     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =         // int64[4*n]
6660             ACAMERA_DEPTH_START + 2,
6661     /**
6662      * <p>This lists the maximum stall duration for each
6663      * output format/size combination for depth streams.</p>
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>A stall duration is how much extra time would get added
6673      * to the normal minimum frame duration for a repeating request
6674      * that has streams with non-zero stall.</p>
6675      * <p>This functions similarly to
6676      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for depth
6677      * streams.</p>
6678      * <p>All depth output stream formats may have a nonzero stall
6679      * duration.</p>
6680      *
6681      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
6682      */
6683     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =             // int64[4*n]
6684             ACAMERA_DEPTH_START + 3,
6685     /**
6686      * <p>Indicates whether a capture request may target both a
6687      * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
6688      * YUV_420_888, JPEG, or RAW) simultaneously.</p>
6689      *
6690      * <p>Type: byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)</p>
6691      *
6692      * <p>This tag may appear in:
6693      * <ul>
6694      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6695      * </ul></p>
6696      *
6697      * <p>If TRUE, including both depth and color outputs in a single
6698      * capture request is not supported. An application must interleave color
6699      * and depth requests.  If FALSE, a single request can target both types
6700      * of output.</p>
6701      * <p>Typically, this restriction exists on camera devices that
6702      * need to emit a specific pattern or wavelength of light to
6703      * measure depth values, which causes the color image to be
6704      * corrupted during depth measurement.</p>
6705      */
6706     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE =                          // byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)
6707             ACAMERA_DEPTH_START + 4,
6708     /**
6709      * <p>Recommended depth stream configurations for common client use cases.</p>
6710      *
6711      * <p>Type: int32[n*5]</p>
6712      *
6713      * <p>This tag may appear in:
6714      * <ul>
6715      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6716      * </ul></p>
6717      *
6718      * <p>Optional subset of the ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS that
6719      * contains similar tuples listed as
6720      * (i.e. width, height, format, output/input stream, usecase bit field).
6721      * Camera devices will be able to suggest particular depth stream configurations which are
6722      * power and performance efficient for specific use cases. For more information about
6723      * retrieving the suggestions see
6724      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
6725      * <p>For data representation please refer to
6726      * ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS</p>
6727      *
6728      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
6729      * @see ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
6730      */
6731     ACAMERA_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
6732                                                                 // int32[n*5]
6733             ACAMERA_DEPTH_START + 5,
6734     /**
6735      * <p>The available dynamic depth dataspace stream
6736      * configurations that this camera device supports
6737      * (i.e. format, width, height, output/input stream).</p>
6738      *
6739      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)</p>
6740      *
6741      * <p>This tag may appear in:
6742      * <ul>
6743      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6744      * </ul></p>
6745      *
6746      * <p>These are output stream configurations for use with
6747      * dataSpace DYNAMIC_DEPTH. The configurations are
6748      * listed as <code>(format, width, height, input?)</code> tuples.</p>
6749      * <p>Only devices that support depth output for at least
6750      * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
6751      * HAL_PIXEL_FORMAT_BLOB with the same size or size with
6752      * the same aspect ratio can have dynamic depth dataspace
6753      * stream configuration. ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE also
6754      * needs to be set to FALSE.</p>
6755      *
6756      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
6757      */
6758     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
6759                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)
6760             ACAMERA_DEPTH_START + 6,
6761     /**
6762      * <p>This lists the minimum frame duration for each
6763      * format/size combination for dynamic depth output streams.</p>
6764      *
6765      * <p>Type: int64[4*n]</p>
6766      *
6767      * <p>This tag may appear in:
6768      * <ul>
6769      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6770      * </ul></p>
6771      *
6772      * <p>This should correspond to the frame duration when only that
6773      * stream is active, with all processing (typically in android.*.mode)
6774      * set to either OFF or FAST.</p>
6775      * <p>When multiple streams are used in a request, the minimum frame
6776      * duration will be max(individual stream min durations).</p>
6777      * <p>The minimum frame duration of a stream (of a particular format, size)
6778      * is the same regardless of whether the stream is input or output.</p>
6779      */
6780     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = // int64[4*n]
6781             ACAMERA_DEPTH_START + 7,
6782     /**
6783      * <p>This lists the maximum stall duration for each
6784      * output format/size combination for dynamic depth streams.</p>
6785      *
6786      * <p>Type: int64[4*n]</p>
6787      *
6788      * <p>This tag may appear in:
6789      * <ul>
6790      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6791      * </ul></p>
6792      *
6793      * <p>A stall duration is how much extra time would get added
6794      * to the normal minimum frame duration for a repeating request
6795      * that has streams with non-zero stall.</p>
6796      * <p>All dynamic depth output streams may have a nonzero stall
6797      * duration.</p>
6798      */
6799     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =     // int64[4*n]
6800             ACAMERA_DEPTH_START + 8,
6801     /**
6802      * <p>The available depth dataspace stream
6803      * configurations that this camera device supports
6804      * (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with
6805      * ACAMERA_SENSOR_PIXEL_MODE set to
6806      * <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>
6807      *
6808      * @see ACAMERA_SENSOR_PIXEL_MODE
6809      *
6810      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t)</p>
6811      *
6812      * <p>This tag may appear in:
6813      * <ul>
6814      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6815      * </ul></p>
6816      *
6817      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, for configurations which
6818      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6819      * <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>
6820      *
6821      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
6822      * @see ACAMERA_SENSOR_PIXEL_MODE
6823      */
6824     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
6825                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t)
6826             ACAMERA_DEPTH_START + 9,
6827     /**
6828      * <p>This lists the minimum frame duration for each
6829      * format/size combination for depth output formats when a CaptureRequest is submitted with
6830      * ACAMERA_SENSOR_PIXEL_MODE set to
6831      * <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>
6832      *
6833      * @see ACAMERA_SENSOR_PIXEL_MODE
6834      *
6835      * <p>Type: int64[4*n]</p>
6836      *
6837      * <p>This tag may appear in:
6838      * <ul>
6839      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6840      * </ul></p>
6841      *
6842      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS, for configurations which
6843      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6844      * <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>
6845      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
6846      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION for more details about
6847      * calculating the max frame rate.</p>
6848      *
6849      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS
6850      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION
6851      * @see ACAMERA_SENSOR_FRAME_DURATION
6852      * @see ACAMERA_SENSOR_PIXEL_MODE
6853      */
6854     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
6855                                                                 // int64[4*n]
6856             ACAMERA_DEPTH_START + 10,
6857     /**
6858      * <p>This lists the maximum stall duration for each
6859      * output format/size combination for depth streams for CaptureRequests where
6860      * ACAMERA_SENSOR_PIXEL_MODE is set to
6861      * <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>
6862      *
6863      * @see ACAMERA_SENSOR_PIXEL_MODE
6864      *
6865      * <p>Type: int64[4*n]</p>
6866      *
6867      * <p>This tag may appear in:
6868      * <ul>
6869      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6870      * </ul></p>
6871      *
6872      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS, for configurations which
6873      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6874      * <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>
6875      *
6876      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS
6877      * @see ACAMERA_SENSOR_PIXEL_MODE
6878      */
6879     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
6880                                                                 // int64[4*n]
6881             ACAMERA_DEPTH_START + 11,
6882     /**
6883      * <p>The available dynamic depth dataspace stream
6884      * configurations that this camera device supports (i.e. format, width, height,
6885      * output/input stream) for CaptureRequests where ACAMERA_SENSOR_PIXEL_MODE is set to
6886      * <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>
6887      *
6888      * @see ACAMERA_SENSOR_PIXEL_MODE
6889      *
6890      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t)</p>
6891      *
6892      * <p>This tag may appear in:
6893      * <ul>
6894      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6895      * </ul></p>
6896      *
6897      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS, for configurations
6898      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6899      * <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>
6900      *
6901      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
6902      * @see ACAMERA_SENSOR_PIXEL_MODE
6903      */
6904     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
6905                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t)
6906             ACAMERA_DEPTH_START + 12,
6907     /**
6908      * <p>This lists the minimum frame duration for each
6909      * format/size combination for dynamic depth output streams  for CaptureRequests where
6910      * ACAMERA_SENSOR_PIXEL_MODE is set to
6911      * <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>
6912      *
6913      * @see ACAMERA_SENSOR_PIXEL_MODE
6914      *
6915      * <p>Type: int64[4*n]</p>
6916      *
6917      * <p>This tag may appear in:
6918      * <ul>
6919      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6920      * </ul></p>
6921      *
6922      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS, for configurations
6923      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6924      * <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>
6925      *
6926      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS
6927      * @see ACAMERA_SENSOR_PIXEL_MODE
6928      */
6929     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
6930                                                                 // int64[4*n]
6931             ACAMERA_DEPTH_START + 13,
6932     /**
6933      * <p>This lists the maximum stall duration for each
6934      * output format/size combination for dynamic depth streams for CaptureRequests where
6935      * ACAMERA_SENSOR_PIXEL_MODE is set to
6936      * <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>
6937      *
6938      * @see ACAMERA_SENSOR_PIXEL_MODE
6939      *
6940      * <p>Type: int64[4*n]</p>
6941      *
6942      * <p>This tag may appear in:
6943      * <ul>
6944      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6945      * </ul></p>
6946      *
6947      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS, for configurations
6948      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
6949      * <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>
6950      *
6951      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS
6952      * @see ACAMERA_SENSOR_PIXEL_MODE
6953      */
6954     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
6955                                                                 // int64[4*n]
6956             ACAMERA_DEPTH_START + 14,
6957     ACAMERA_DEPTH_END,
6958 
6959     /**
6960      * <p>String containing the ids of the underlying physical cameras.</p>
6961      *
6962      * <p>Type: byte[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>For a logical camera, this is concatenation of all underlying physical camera IDs.
6970      * The null terminator for physical camera ID must be preserved so that the whole string
6971      * can be tokenized using '\0' to generate list of physical camera IDs.</p>
6972      * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
6973      * value of this tag will be ['2', '\0', '3', '\0'].</p>
6974      * <p>The number of physical camera IDs must be no less than 2.</p>
6975      */
6976     ACAMERA_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =                 // byte[n]
6977             ACAMERA_LOGICAL_MULTI_CAMERA_START,
6978     /**
6979      * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
6980      *
6981      * <p>Type: byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)</p>
6982      *
6983      * <p>This tag may appear in:
6984      * <ul>
6985      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6986      * </ul></p>
6987      *
6988      * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
6989      * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the
6990      * physical camera sensors usually run in leader/follower mode where one sensor generates a
6991      * timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE
6992      * sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors
6993      * use their own timing generator, and there could be offset between their start of exposure.</p>
6994      * <p>In both cases, all images generated for a particular capture request still carry the same
6995      * timestamps, so that they can be used to look up the matching frame number and
6996      * onCaptureStarted callback.</p>
6997      * <p>This tag is only applicable if the logical camera device supports concurrent physical
6998      * streams from different physical cameras.</p>
6999      */
7000     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =             // byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)
7001             ACAMERA_LOGICAL_MULTI_CAMERA_START + 1,
7002     /**
7003      * <p>String containing the ID of the underlying active physical camera.</p>
7004      *
7005      * <p>Type: byte</p>
7006      *
7007      * <p>This tag may appear in:
7008      * <ul>
7009      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7010      * </ul></p>
7011      *
7012      * <p>The ID of the active physical camera that's backing the logical camera. All camera
7013      * streams and metadata that are not physical camera specific will be originating from this
7014      * physical camera.</p>
7015      * <p>For a logical camera made up of physical cameras where each camera's lenses have
7016      * different characteristics, the camera device may choose to switch between the physical
7017      * cameras when application changes FOCAL_LENGTH or SCALER_CROP_REGION.
7018      * At the time of lens switch, this result metadata reflects the new active physical camera
7019      * ID.</p>
7020      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.
7021      * When available, this must be one of valid physical IDs backing this logical multi-camera.
7022      * If this key is not available for a logical multi-camera, the camera device implementation
7023      * may still switch between different active physical cameras based on use case, but the
7024      * current active physical camera information won't be available to the application.</p>
7025      */
7026     ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID =           // byte
7027             ACAMERA_LOGICAL_MULTI_CAMERA_START + 2,
7028     ACAMERA_LOGICAL_MULTI_CAMERA_END,
7029 
7030     /**
7031      * <p>Mode of operation for the lens distortion correction block.</p>
7032      *
7033      * <p>Type: byte (acamera_metadata_enum_android_distortion_correction_mode_t)</p>
7034      *
7035      * <p>This tag may appear in:
7036      * <ul>
7037      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7038      *   <li>ACaptureRequest</li>
7039      * </ul></p>
7040      *
7041      * <p>The lens distortion correction block attempts to improve image quality by fixing
7042      * radial, tangential, or other geometric aberrations in the camera device's optics.  If
7043      * available, the ACAMERA_LENS_DISTORTION field documents the lens's distortion parameters.</p>
7044      * <p>OFF means no distortion correction is done.</p>
7045      * <p>FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
7046      * applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
7047      * correction algorithms, even if it slows down capture rate. FAST means the camera device
7048      * will not slow down capture rate when applying correction. FAST may be the same as OFF if
7049      * any correction at all would slow down capture rate.  Every output stream will have a
7050      * similar amount of enhancement applied.</p>
7051      * <p>The correction only applies to processed outputs such as YUV, Y8, JPEG, or DEPTH16; it is
7052      * not applied to any RAW output.</p>
7053      * <p>This control will be on by default on devices that support this control. Applications
7054      * disabling distortion correction need to pay extra attention with the coordinate system of
7055      * metering regions, crop region, and face rectangles. When distortion correction is OFF,
7056      * metadata coordinates follow the coordinate system of
7057      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. When distortion is not OFF, metadata
7058      * coordinates follow the coordinate system of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.  The
7059      * camera device will map these metadata fields to match the corrected image produced by the
7060      * camera device, for both capture requests and results.  However, this mapping is not very
7061      * precise, since rectangles do not generally map to rectangles when corrected.  Only linear
7062      * scaling between the active array and precorrection active array coordinates is
7063      * performed. Applications that require precise correction of metadata need to undo that
7064      * linear scaling, and apply a more complete correction that takes into the account the app's
7065      * own requirements.</p>
7066      * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
7067      * <ul>
7068      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
7069      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
7070      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
7071      * <li>ACAMERA_SCALER_CROP_REGION</li>
7072      * <li>android.statistics.faces</li>
7073      * </ul>
7074      *
7075      * @see ACAMERA_CONTROL_AE_REGIONS
7076      * @see ACAMERA_CONTROL_AF_REGIONS
7077      * @see ACAMERA_CONTROL_AWB_REGIONS
7078      * @see ACAMERA_LENS_DISTORTION
7079      * @see ACAMERA_SCALER_CROP_REGION
7080      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
7081      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
7082      */
7083     ACAMERA_DISTORTION_CORRECTION_MODE =                        // byte (acamera_metadata_enum_android_distortion_correction_mode_t)
7084             ACAMERA_DISTORTION_CORRECTION_START,
7085     /**
7086      * <p>List of distortion correction modes for ACAMERA_DISTORTION_CORRECTION_MODE that are
7087      * supported by this camera device.</p>
7088      *
7089      * @see ACAMERA_DISTORTION_CORRECTION_MODE
7090      *
7091      * <p>Type: byte[n]</p>
7092      *
7093      * <p>This tag may appear in:
7094      * <ul>
7095      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7096      * </ul></p>
7097      *
7098      * <p>No device is required to support this API; such devices will always list only 'OFF'.
7099      * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
7100      */
7101     ACAMERA_DISTORTION_CORRECTION_AVAILABLE_MODES =             // byte[n]
7102             ACAMERA_DISTORTION_CORRECTION_START + 1,
7103     ACAMERA_DISTORTION_CORRECTION_END,
7104 
7105     /**
7106      * <p>The available HEIC (ISO/IEC 23008-12) stream
7107      * configurations that this camera device supports
7108      * (i.e. format, width, height, output/input stream).</p>
7109      *
7110      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)</p>
7111      *
7112      * <p>This tag may appear in:
7113      * <ul>
7114      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7115      * </ul></p>
7116      *
7117      * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
7118      * <p>If the camera device supports HEIC image format, it will support identical set of stream
7119      * combinations involving HEIC image format, compared to the combinations involving JPEG
7120      * image format as required by the device's hardware level and capabilities.</p>
7121      * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
7122      * Configuring JPEG and HEIC streams at the same time is not supported.</p>
7123      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
7124      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
7125      */
7126     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =         // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)
7127             ACAMERA_HEIC_START,
7128     /**
7129      * <p>This lists the minimum frame duration for each
7130      * format/size combination for HEIC output formats.</p>
7131      *
7132      * <p>Type: int64[4*n]</p>
7133      *
7134      * <p>This tag may appear in:
7135      * <ul>
7136      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7137      * </ul></p>
7138      *
7139      * <p>This should correspond to the frame duration when only that
7140      * stream is active, with all processing (typically in android.*.mode)
7141      * set to either OFF or FAST.</p>
7142      * <p>When multiple streams are used in a request, the minimum frame
7143      * duration will be max(individual stream min durations).</p>
7144      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
7145      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
7146      * calculating the max frame rate.</p>
7147      *
7148      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7149      * @see ACAMERA_SENSOR_FRAME_DURATION
7150      */
7151     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =           // int64[4*n]
7152             ACAMERA_HEIC_START + 1,
7153     /**
7154      * <p>This lists the maximum stall duration for each
7155      * output format/size combination for HEIC streams.</p>
7156      *
7157      * <p>Type: int64[4*n]</p>
7158      *
7159      * <p>This tag may appear in:
7160      * <ul>
7161      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7162      * </ul></p>
7163      *
7164      * <p>A stall duration is how much extra time would get added
7165      * to the normal minimum frame duration for a repeating request
7166      * that has streams with non-zero stall.</p>
7167      * <p>This functions similarly to
7168      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for HEIC
7169      * streams.</p>
7170      * <p>All HEIC output stream formats may have a nonzero stall
7171      * duration.</p>
7172      *
7173      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7174      */
7175     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS =               // int64[4*n]
7176             ACAMERA_HEIC_START + 2,
7177     /**
7178      * <p>The available HEIC (ISO/IEC 23008-12) stream
7179      * configurations that this camera device supports
7180      * (i.e. format, width, height, output/input stream).</p>
7181      *
7182      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t)</p>
7183      *
7184      * <p>This tag may appear in:
7185      * <ul>
7186      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7187      * </ul></p>
7188      *
7189      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS for details.</p>
7190      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
7191      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
7192      *
7193      * @see ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
7194      */
7195     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
7196                                                                 // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t)
7197             ACAMERA_HEIC_START + 3,
7198     /**
7199      * <p>This lists the minimum frame duration for each
7200      * format/size combination for HEIC output formats for CaptureRequests where
7201      * ACAMERA_SENSOR_PIXEL_MODE is set to
7202      * <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>
7203      *
7204      * @see ACAMERA_SENSOR_PIXEL_MODE
7205      *
7206      * <p>Type: int64[4*n]</p>
7207      *
7208      * <p>This tag may appear in:
7209      * <ul>
7210      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7211      * </ul></p>
7212      *
7213      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS for details.</p>
7214      *
7215      * @see ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS
7216      */
7217     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
7218                                                                 // int64[4*n]
7219             ACAMERA_HEIC_START + 4,
7220     /**
7221      * <p>This lists the maximum stall duration for each
7222      * output format/size combination for HEIC streams for CaptureRequests where
7223      * ACAMERA_SENSOR_PIXEL_MODE is set to
7224      * <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>
7225      *
7226      * @see ACAMERA_SENSOR_PIXEL_MODE
7227      *
7228      * <p>Type: int64[4*n]</p>
7229      *
7230      * <p>This tag may appear in:
7231      * <ul>
7232      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7233      * </ul></p>
7234      *
7235      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS for details.</p>
7236      *
7237      * @see ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS
7238      */
7239     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION =
7240                                                                 // int64[4*n]
7241             ACAMERA_HEIC_START + 5,
7242     ACAMERA_HEIC_END,
7243 
7244     /**
7245      * <p>Location of the cameras on the automotive devices.</p>
7246      *
7247      * <p>Type: byte (acamera_metadata_enum_android_automotive_location_t)</p>
7248      *
7249      * <p>This tag may appear in:
7250      * <ul>
7251      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7252      * </ul></p>
7253      *
7254      * <p>This enum defines the locations of the cameras relative to the vehicle body frame on
7255      * <a href="https://source.android.com/devices/sensors/sensor-types#auto_axes">the automotive sensor coordinate system</a>.
7256      * If the system has FEATURE_AUTOMOTIVE, the camera will have this entry in its static
7257      * metadata.</p>
7258      * <ul>
7259      * <li>INTERIOR is the inside of the vehicle body frame (or the passenger cabin).</li>
7260      * <li>EXTERIOR is the outside of the vehicle body frame.</li>
7261      * <li>EXTRA is the extra vehicle such as a trailer.</li>
7262      * </ul>
7263      * <p>Each side of the vehicle body frame on this coordinate system is defined as below:</p>
7264      * <ul>
7265      * <li>FRONT is where the Y-axis increases toward.</li>
7266      * <li>REAR is where the Y-axis decreases toward.</li>
7267      * <li>LEFT is where the X-axis decreases toward.</li>
7268      * <li>RIGHT is where the X-axis increases toward.</li>
7269      * </ul>
7270      * <p>If the camera has either EXTERIOR_OTHER or EXTRA_OTHER, its static metadata will list
7271      * the following entries, so that applications can determine the camera's exact location:</p>
7272      * <ul>
7273      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
7274      * <li>ACAMERA_LENS_POSE_ROTATION</li>
7275      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
7276      * </ul>
7277      *
7278      * @see ACAMERA_LENS_POSE_REFERENCE
7279      * @see ACAMERA_LENS_POSE_ROTATION
7280      * @see ACAMERA_LENS_POSE_TRANSLATION
7281      */
7282     ACAMERA_AUTOMOTIVE_LOCATION =                               // byte (acamera_metadata_enum_android_automotive_location_t)
7283             ACAMERA_AUTOMOTIVE_START,
7284     ACAMERA_AUTOMOTIVE_END,
7285 
7286     /**
7287      * <p>The direction of the camera faces relative to the vehicle body frame and the
7288      * passenger seats.</p>
7289      *
7290      * <p>Type: byte[n] (acamera_metadata_enum_android_automotive_lens_facing_t)</p>
7291      *
7292      * <p>This tag may appear in:
7293      * <ul>
7294      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7295      * </ul></p>
7296      *
7297      * <p>This enum defines the lens facing characteristic of the cameras on the automotive
7298      * devices with locations ACAMERA_AUTOMOTIVE_LOCATION defines.  If the system has
7299      * FEATURE_AUTOMOTIVE, the camera will have this entry in its static metadata.</p>
7300      * <p>When ACAMERA_AUTOMOTIVE_LOCATION is INTERIOR, this has one or more INTERIOR_*
7301      * values or a single EXTERIOR_* value.  When this has more than one INTERIOR_*,
7302      * the first value must be the one for the seat closest to the optical axis. If this
7303      * contains INTERIOR_OTHER, all other values will be ineffective.</p>
7304      * <p>When ACAMERA_AUTOMOTIVE_LOCATION is EXTERIOR_* or EXTRA, this has a single
7305      * EXTERIOR_* value.</p>
7306      * <p>If a camera has INTERIOR_OTHER or EXTERIOR_OTHER, or more than one camera is at the
7307      * same location and facing the same direction, their static metadata will list the
7308      * following entries, so that applications can determine their lenses' exact facing
7309      * directions:</p>
7310      * <ul>
7311      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
7312      * <li>ACAMERA_LENS_POSE_ROTATION</li>
7313      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
7314      * </ul>
7315      *
7316      * @see ACAMERA_AUTOMOTIVE_LOCATION
7317      * @see ACAMERA_LENS_POSE_REFERENCE
7318      * @see ACAMERA_LENS_POSE_ROTATION
7319      * @see ACAMERA_LENS_POSE_TRANSLATION
7320      */
7321     ACAMERA_AUTOMOTIVE_LENS_FACING =                            // byte[n] (acamera_metadata_enum_android_automotive_lens_facing_t)
7322             ACAMERA_AUTOMOTIVE_LENS_START,
7323     ACAMERA_AUTOMOTIVE_LENS_END,
7324 
7325 } acamera_metadata_tag_t;
7326 
7327 /**
7328  * Enumeration definitions for the various entries that need them
7329  */
7330 
7331 // ACAMERA_COLOR_CORRECTION_MODE
7332 typedef enum acamera_metadata_enum_acamera_color_correction_mode {
7333     /**
7334      * <p>Use the ACAMERA_COLOR_CORRECTION_TRANSFORM matrix
7335      * and ACAMERA_COLOR_CORRECTION_GAINS to do color conversion.</p>
7336      * <p>All advanced white balance adjustments (not specified
7337      * by our white balance pipeline) must be disabled.</p>
7338      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
7339      * TRANSFORM_MATRIX is ignored. The camera device will override
7340      * this value to either FAST or HIGH_QUALITY.</p>
7341      *
7342      * @see ACAMERA_COLOR_CORRECTION_GAINS
7343      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7344      * @see ACAMERA_CONTROL_AWB_MODE
7345      */
7346     ACAMERA_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX                   = 0,
7347 
7348     /**
7349      * <p>Color correction processing must not slow down
7350      * capture rate relative to sensor raw output.</p>
7351      * <p>Advanced white balance adjustments above and beyond
7352      * the specified white balance pipeline may be applied.</p>
7353      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
7354      * the camera device uses the last frame's AWB values
7355      * (or defaults if AWB has never been run).</p>
7356      *
7357      * @see ACAMERA_CONTROL_AWB_MODE
7358      */
7359     ACAMERA_COLOR_CORRECTION_MODE_FAST                               = 1,
7360 
7361     /**
7362      * <p>Color correction processing operates at improved
7363      * quality but the capture rate might be reduced (relative to sensor
7364      * raw output rate)</p>
7365      * <p>Advanced white balance adjustments above and beyond
7366      * the specified white balance pipeline may be applied.</p>
7367      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
7368      * the camera device uses the last frame's AWB values
7369      * (or defaults if AWB has never been run).</p>
7370      *
7371      * @see ACAMERA_CONTROL_AWB_MODE
7372      */
7373     ACAMERA_COLOR_CORRECTION_MODE_HIGH_QUALITY                       = 2,
7374 
7375 } acamera_metadata_enum_android_color_correction_mode_t;
7376 
7377 // ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
7378 typedef enum acamera_metadata_enum_acamera_color_correction_aberration_mode {
7379     /**
7380      * <p>No aberration correction is applied.</p>
7381      */
7382     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_OFF                     = 0,
7383 
7384     /**
7385      * <p>Aberration correction will not slow down capture rate
7386      * relative to sensor raw output.</p>
7387      */
7388     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_FAST                    = 1,
7389 
7390     /**
7391      * <p>Aberration correction operates at improved quality but the capture rate might be
7392      * reduced (relative to sensor raw output rate)</p>
7393      */
7394     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY            = 2,
7395 
7396 } acamera_metadata_enum_android_color_correction_aberration_mode_t;
7397 
7398 
7399 // ACAMERA_CONTROL_AE_ANTIBANDING_MODE
7400 typedef enum acamera_metadata_enum_acamera_control_ae_antibanding_mode {
7401     /**
7402      * <p>The camera device will not adjust exposure duration to
7403      * avoid banding problems.</p>
7404      */
7405     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_OFF                          = 0,
7406 
7407     /**
7408      * <p>The camera device will adjust exposure duration to
7409      * avoid banding problems with 50Hz illumination sources.</p>
7410      */
7411     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_50HZ                         = 1,
7412 
7413     /**
7414      * <p>The camera device will adjust exposure duration to
7415      * avoid banding problems with 60Hz illumination
7416      * sources.</p>
7417      */
7418     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_60HZ                         = 2,
7419 
7420     /**
7421      * <p>The camera device will automatically adapt its
7422      * antibanding routine to the current illumination
7423      * condition. This is the default mode if AUTO is
7424      * available on given camera device.</p>
7425      */
7426     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_AUTO                         = 3,
7427 
7428 } acamera_metadata_enum_android_control_ae_antibanding_mode_t;
7429 
7430 // ACAMERA_CONTROL_AE_LOCK
7431 typedef enum acamera_metadata_enum_acamera_control_ae_lock {
7432     /**
7433      * <p>Auto-exposure lock is disabled; the AE algorithm
7434      * is free to update its parameters.</p>
7435      */
7436     ACAMERA_CONTROL_AE_LOCK_OFF                                      = 0,
7437 
7438     /**
7439      * <p>Auto-exposure lock is enabled; the AE algorithm
7440      * must not update the exposure and sensitivity parameters
7441      * while the lock is active.</p>
7442      * <p>ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION setting changes
7443      * will still take effect while auto-exposure is locked.</p>
7444      * <p>Some rare LEGACY devices may not support
7445      * this, in which case the value will always be overridden to OFF.</p>
7446      *
7447      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
7448      */
7449     ACAMERA_CONTROL_AE_LOCK_ON                                       = 1,
7450 
7451 } acamera_metadata_enum_android_control_ae_lock_t;
7452 
7453 // ACAMERA_CONTROL_AE_MODE
7454 typedef enum acamera_metadata_enum_acamera_control_ae_mode {
7455     /**
7456      * <p>The camera device's autoexposure routine is disabled.</p>
7457      * <p>The application-selected ACAMERA_SENSOR_EXPOSURE_TIME,
7458      * ACAMERA_SENSOR_SENSITIVITY and
7459      * ACAMERA_SENSOR_FRAME_DURATION are used by the camera
7460      * device, along with ACAMERA_FLASH_* fields, if there's
7461      * a flash unit for this camera device.</p>
7462      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
7463      * behavior is device dependent when AE is in OFF mode.
7464      * To have consistent behavior across different devices,
7465      * it is recommended to either set AWB and AF to OFF mode
7466      * or lock AWB and AF before setting AE to OFF.
7467      * See ACAMERA_CONTROL_AWB_MODE, ACAMERA_CONTROL_AF_MODE,
7468      * ACAMERA_CONTROL_AWB_LOCK, and ACAMERA_CONTROL_AF_TRIGGER
7469      * for more details.</p>
7470      * <p>LEGACY devices do not support the OFF mode and will
7471      * override attempts to use this value to ON.</p>
7472      *
7473      * @see ACAMERA_CONTROL_AF_MODE
7474      * @see ACAMERA_CONTROL_AF_TRIGGER
7475      * @see ACAMERA_CONTROL_AWB_LOCK
7476      * @see ACAMERA_CONTROL_AWB_MODE
7477      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7478      * @see ACAMERA_SENSOR_FRAME_DURATION
7479      * @see ACAMERA_SENSOR_SENSITIVITY
7480      */
7481     ACAMERA_CONTROL_AE_MODE_OFF                                      = 0,
7482 
7483     /**
7484      * <p>The camera device's autoexposure routine is active,
7485      * with no flash control.</p>
7486      * <p>The application's values for
7487      * ACAMERA_SENSOR_EXPOSURE_TIME,
7488      * ACAMERA_SENSOR_SENSITIVITY, and
7489      * ACAMERA_SENSOR_FRAME_DURATION are ignored. The
7490      * application has control over the various
7491      * ACAMERA_FLASH_* fields.</p>
7492      *
7493      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7494      * @see ACAMERA_SENSOR_FRAME_DURATION
7495      * @see ACAMERA_SENSOR_SENSITIVITY
7496      */
7497     ACAMERA_CONTROL_AE_MODE_ON                                       = 1,
7498 
7499     /**
7500      * <p>Like ON, except that the camera device also controls
7501      * the camera's flash unit, firing it in low-light
7502      * conditions.</p>
7503      * <p>The flash may be fired during a precapture sequence
7504      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
7505      * may be fired for captures for which the
7506      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
7507      * STILL_CAPTURE</p>
7508      *
7509      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7510      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7511      */
7512     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH                            = 2,
7513 
7514     /**
7515      * <p>Like ON, except that the camera device also controls
7516      * the camera's flash unit, always firing it for still
7517      * captures.</p>
7518      * <p>The flash may be fired during a precapture sequence
7519      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
7520      * will always be fired for captures for which the
7521      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
7522      * STILL_CAPTURE</p>
7523      *
7524      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7525      * @see ACAMERA_CONTROL_CAPTURE_INTENT
7526      */
7527     ACAMERA_CONTROL_AE_MODE_ON_ALWAYS_FLASH                          = 3,
7528 
7529     /**
7530      * <p>Like ON_AUTO_FLASH, but with automatic red eye
7531      * reduction.</p>
7532      * <p>If deemed necessary by the camera device, a red eye
7533      * reduction flash will fire during the precapture
7534      * sequence.</p>
7535      */
7536     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE                     = 4,
7537 
7538     /**
7539      * <p>An external flash has been turned on.</p>
7540      * <p>It informs the camera device that an external flash has been turned on, and that
7541      * metering (and continuous focus if active) should be quickly recaculated to account
7542      * for the external flash. Otherwise, this mode acts like ON.</p>
7543      * <p>When the external flash is turned off, AE mode should be changed to one of the
7544      * other available AE modes.</p>
7545      * <p>If the camera device supports AE external flash mode, ACAMERA_CONTROL_AE_STATE must
7546      * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
7547      * flash.</p>
7548      *
7549      * @see ACAMERA_CONTROL_AE_STATE
7550      */
7551     ACAMERA_CONTROL_AE_MODE_ON_EXTERNAL_FLASH                        = 5,
7552 
7553 } acamera_metadata_enum_android_control_ae_mode_t;
7554 
7555 // ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
7556 typedef enum acamera_metadata_enum_acamera_control_ae_precapture_trigger {
7557     /**
7558      * <p>The trigger is idle.</p>
7559      */
7560     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE                       = 0,
7561 
7562     /**
7563      * <p>The precapture metering sequence will be started
7564      * by the camera device.</p>
7565      * <p>The exact effect of the precapture trigger depends on
7566      * the current AE mode and state.</p>
7567      */
7568     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_START                      = 1,
7569 
7570     /**
7571      * <p>The camera device will cancel any currently active or completed
7572      * precapture metering sequence, the auto-exposure routine will return to its
7573      * initial state.</p>
7574      */
7575     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL                     = 2,
7576 
7577 } acamera_metadata_enum_android_control_ae_precapture_trigger_t;
7578 
7579 // ACAMERA_CONTROL_AF_MODE
7580 typedef enum acamera_metadata_enum_acamera_control_af_mode {
7581     /**
7582      * <p>The auto-focus routine does not control the lens;
7583      * ACAMERA_LENS_FOCUS_DISTANCE is controlled by the
7584      * application.</p>
7585      *
7586      * @see ACAMERA_LENS_FOCUS_DISTANCE
7587      */
7588     ACAMERA_CONTROL_AF_MODE_OFF                                      = 0,
7589 
7590     /**
7591      * <p>Basic automatic focus mode.</p>
7592      * <p>In this mode, the lens does not move unless
7593      * the autofocus trigger action is called. When that trigger
7594      * is activated, AF will transition to ACTIVE_SCAN, then to
7595      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
7596      * <p>Always supported if lens is not fixed focus.</p>
7597      * <p>Use ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE to determine if lens
7598      * is fixed-focus.</p>
7599      * <p>Triggering AF_CANCEL resets the lens position to default,
7600      * and sets the AF state to INACTIVE.</p>
7601      *
7602      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
7603      */
7604     ACAMERA_CONTROL_AF_MODE_AUTO                                     = 1,
7605 
7606     /**
7607      * <p>Close-up focusing mode.</p>
7608      * <p>In this mode, the lens does not move unless the
7609      * autofocus trigger action is called. When that trigger is
7610      * activated, AF will transition to ACTIVE_SCAN, then to
7611      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
7612      * mode is optimized for focusing on objects very close to
7613      * the camera.</p>
7614      * <p>When that trigger is activated, AF will transition to
7615      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
7616      * NOT_FOCUSED). Triggering cancel AF resets the lens
7617      * position to default, and sets the AF state to
7618      * INACTIVE.</p>
7619      */
7620     ACAMERA_CONTROL_AF_MODE_MACRO                                    = 2,
7621 
7622     /**
7623      * <p>In this mode, the AF algorithm modifies the lens
7624      * position continually to attempt to provide a
7625      * constantly-in-focus image stream.</p>
7626      * <p>The focusing behavior should be suitable for good quality
7627      * video recording; typically this means slower focus
7628      * movement and no overshoots. When the AF trigger is not
7629      * involved, the AF algorithm should start in INACTIVE state,
7630      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
7631      * states as appropriate. When the AF trigger is activated,
7632      * the algorithm should immediately transition into
7633      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
7634      * lens position until a cancel AF trigger is received.</p>
7635      * <p>Once cancel is received, the algorithm should transition
7636      * back to INACTIVE and resume passive scan. Note that this
7637      * behavior is not identical to CONTINUOUS_PICTURE, since an
7638      * ongoing PASSIVE_SCAN must immediately be
7639      * canceled.</p>
7640      */
7641     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_VIDEO                         = 3,
7642 
7643     /**
7644      * <p>In this mode, the AF algorithm modifies the lens
7645      * position continually to attempt to provide a
7646      * constantly-in-focus image stream.</p>
7647      * <p>The focusing behavior should be suitable for still image
7648      * capture; typically this means focusing as fast as
7649      * possible. When the AF trigger is not involved, the AF
7650      * algorithm should start in INACTIVE state, and then
7651      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
7652      * appropriate as it attempts to maintain focus. When the AF
7653      * trigger is activated, the algorithm should finish its
7654      * PASSIVE_SCAN if active, and then transition into
7655      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
7656      * lens position until a cancel AF trigger is received.</p>
7657      * <p>When the AF cancel trigger is activated, the algorithm
7658      * should transition back to INACTIVE and then act as if it
7659      * has just been started.</p>
7660      */
7661     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_PICTURE                       = 4,
7662 
7663     /**
7664      * <p>Extended depth of field (digital focus) mode.</p>
7665      * <p>The camera device will produce images with an extended
7666      * depth of field automatically; no special focusing
7667      * operations need to be done before taking a picture.</p>
7668      * <p>AF triggers are ignored, and the AF state will always be
7669      * INACTIVE.</p>
7670      */
7671     ACAMERA_CONTROL_AF_MODE_EDOF                                     = 5,
7672 
7673 } acamera_metadata_enum_android_control_af_mode_t;
7674 
7675 // ACAMERA_CONTROL_AF_TRIGGER
7676 typedef enum acamera_metadata_enum_acamera_control_af_trigger {
7677     /**
7678      * <p>The trigger is idle.</p>
7679      */
7680     ACAMERA_CONTROL_AF_TRIGGER_IDLE                                  = 0,
7681 
7682     /**
7683      * <p>Autofocus will trigger now.</p>
7684      */
7685     ACAMERA_CONTROL_AF_TRIGGER_START                                 = 1,
7686 
7687     /**
7688      * <p>Autofocus will return to its initial
7689      * state, and cancel any currently active trigger.</p>
7690      */
7691     ACAMERA_CONTROL_AF_TRIGGER_CANCEL                                = 2,
7692 
7693 } acamera_metadata_enum_android_control_af_trigger_t;
7694 
7695 // ACAMERA_CONTROL_AWB_LOCK
7696 typedef enum acamera_metadata_enum_acamera_control_awb_lock {
7697     /**
7698      * <p>Auto-white balance lock is disabled; the AWB
7699      * algorithm is free to update its parameters if in AUTO
7700      * mode.</p>
7701      */
7702     ACAMERA_CONTROL_AWB_LOCK_OFF                                     = 0,
7703 
7704     /**
7705      * <p>Auto-white balance lock is enabled; the AWB
7706      * algorithm will not update its parameters while the lock
7707      * is active.</p>
7708      */
7709     ACAMERA_CONTROL_AWB_LOCK_ON                                      = 1,
7710 
7711 } acamera_metadata_enum_android_control_awb_lock_t;
7712 
7713 // ACAMERA_CONTROL_AWB_MODE
7714 typedef enum acamera_metadata_enum_acamera_control_awb_mode {
7715     /**
7716      * <p>The camera device's auto-white balance routine is disabled.</p>
7717      * <p>The application-selected color transform matrix
7718      * (ACAMERA_COLOR_CORRECTION_TRANSFORM) and gains
7719      * (ACAMERA_COLOR_CORRECTION_GAINS) are used by the camera
7720      * device for manual white balance control.</p>
7721      *
7722      * @see ACAMERA_COLOR_CORRECTION_GAINS
7723      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7724      */
7725     ACAMERA_CONTROL_AWB_MODE_OFF                                     = 0,
7726 
7727     /**
7728      * <p>The camera device's auto-white balance routine is active.</p>
7729      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7730      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7731      * For devices that support the MANUAL_POST_PROCESSING capability, the
7732      * values used by the camera device for the transform and gains
7733      * will be available in the capture result for this request.</p>
7734      *
7735      * @see ACAMERA_COLOR_CORRECTION_GAINS
7736      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7737      */
7738     ACAMERA_CONTROL_AWB_MODE_AUTO                                    = 1,
7739 
7740     /**
7741      * <p>The camera device's auto-white balance routine is disabled;
7742      * the camera device uses incandescent light as the assumed scene
7743      * illumination for white balance.</p>
7744      * <p>While the exact white balance transforms are up to the
7745      * camera device, they will approximately match the CIE
7746      * standard illuminant A.</p>
7747      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7748      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7749      * For devices that support the MANUAL_POST_PROCESSING capability, the
7750      * values used by the camera device for the transform and gains
7751      * will be available in the capture result for this request.</p>
7752      *
7753      * @see ACAMERA_COLOR_CORRECTION_GAINS
7754      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7755      */
7756     ACAMERA_CONTROL_AWB_MODE_INCANDESCENT                            = 2,
7757 
7758     /**
7759      * <p>The camera device's auto-white balance routine is disabled;
7760      * the camera device uses fluorescent light as the assumed scene
7761      * illumination for white balance.</p>
7762      * <p>While the exact white balance transforms are up to the
7763      * camera device, they will approximately match the CIE
7764      * standard illuminant F2.</p>
7765      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7766      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7767      * For devices that support the MANUAL_POST_PROCESSING capability, the
7768      * values used by the camera device for the transform and gains
7769      * will be available in the capture result for this request.</p>
7770      *
7771      * @see ACAMERA_COLOR_CORRECTION_GAINS
7772      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7773      */
7774     ACAMERA_CONTROL_AWB_MODE_FLUORESCENT                             = 3,
7775 
7776     /**
7777      * <p>The camera device's auto-white balance routine is disabled;
7778      * the camera device uses warm fluorescent light as the assumed scene
7779      * illumination for white balance.</p>
7780      * <p>While the exact white balance transforms are up to the
7781      * camera device, they will approximately match the CIE
7782      * standard illuminant F4.</p>
7783      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7784      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7785      * For devices that support the MANUAL_POST_PROCESSING capability, the
7786      * values used by the camera device for the transform and gains
7787      * will be available in the capture result for this request.</p>
7788      *
7789      * @see ACAMERA_COLOR_CORRECTION_GAINS
7790      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7791      */
7792     ACAMERA_CONTROL_AWB_MODE_WARM_FLUORESCENT                        = 4,
7793 
7794     /**
7795      * <p>The camera device's auto-white balance routine is disabled;
7796      * the camera device uses daylight light as the assumed scene
7797      * illumination for white balance.</p>
7798      * <p>While the exact white balance transforms are up to the
7799      * camera device, they will approximately match the CIE
7800      * standard illuminant D65.</p>
7801      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7802      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7803      * For devices that support the MANUAL_POST_PROCESSING capability, the
7804      * values used by the camera device for the transform and gains
7805      * will be available in the capture result for this request.</p>
7806      *
7807      * @see ACAMERA_COLOR_CORRECTION_GAINS
7808      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7809      */
7810     ACAMERA_CONTROL_AWB_MODE_DAYLIGHT                                = 5,
7811 
7812     /**
7813      * <p>The camera device's auto-white balance routine is disabled;
7814      * the camera device uses cloudy daylight light as the assumed scene
7815      * illumination for white balance.</p>
7816      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7817      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7818      * For devices that support the MANUAL_POST_PROCESSING capability, the
7819      * values used by the camera device for the transform and gains
7820      * will be available in the capture result for this request.</p>
7821      *
7822      * @see ACAMERA_COLOR_CORRECTION_GAINS
7823      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7824      */
7825     ACAMERA_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT                         = 6,
7826 
7827     /**
7828      * <p>The camera device's auto-white balance routine is disabled;
7829      * the camera device uses twilight light as the assumed scene
7830      * illumination for white balance.</p>
7831      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7832      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7833      * For devices that support the MANUAL_POST_PROCESSING capability, the
7834      * values used by the camera device for the transform and gains
7835      * will be available in the capture result for this request.</p>
7836      *
7837      * @see ACAMERA_COLOR_CORRECTION_GAINS
7838      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7839      */
7840     ACAMERA_CONTROL_AWB_MODE_TWILIGHT                                = 7,
7841 
7842     /**
7843      * <p>The camera device's auto-white balance routine is disabled;
7844      * the camera device uses shade light as the assumed scene
7845      * illumination for white balance.</p>
7846      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
7847      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
7848      * For devices that support the MANUAL_POST_PROCESSING capability, the
7849      * values used by the camera device for the transform and gains
7850      * will be available in the capture result for this request.</p>
7851      *
7852      * @see ACAMERA_COLOR_CORRECTION_GAINS
7853      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
7854      */
7855     ACAMERA_CONTROL_AWB_MODE_SHADE                                   = 8,
7856 
7857 } acamera_metadata_enum_android_control_awb_mode_t;
7858 
7859 // ACAMERA_CONTROL_CAPTURE_INTENT
7860 typedef enum acamera_metadata_enum_acamera_control_capture_intent {
7861     /**
7862      * <p>The goal of this request doesn't fall into the other
7863      * categories. The camera device will default to preview-like
7864      * behavior.</p>
7865      */
7866     ACAMERA_CONTROL_CAPTURE_INTENT_CUSTOM                            = 0,
7867 
7868     /**
7869      * <p>This request is for a preview-like use case.</p>
7870      * <p>The precapture trigger may be used to start off a metering
7871      * w/flash sequence.</p>
7872      */
7873     ACAMERA_CONTROL_CAPTURE_INTENT_PREVIEW                           = 1,
7874 
7875     /**
7876      * <p>This request is for a still capture-type
7877      * use case.</p>
7878      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
7879      */
7880     ACAMERA_CONTROL_CAPTURE_INTENT_STILL_CAPTURE                     = 2,
7881 
7882     /**
7883      * <p>This request is for a video recording
7884      * use case.</p>
7885      */
7886     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_RECORD                      = 3,
7887 
7888     /**
7889      * <p>This request is for a video snapshot (still
7890      * image while recording video) use case.</p>
7891      * <p>The camera device should take the highest-quality image
7892      * possible (given the other settings) without disrupting the
7893      * frame rate of video recording.  </p>
7894      */
7895     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT                    = 4,
7896 
7897     /**
7898      * <p>This request is for a ZSL usecase; the
7899      * application will stream full-resolution images and
7900      * reprocess one or several later for a final
7901      * capture.</p>
7902      */
7903     ACAMERA_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG                  = 5,
7904 
7905     /**
7906      * <p>This request is for manual capture use case where
7907      * the applications want to directly control the capture parameters.</p>
7908      * <p>For example, the application may wish to manually control
7909      * ACAMERA_SENSOR_EXPOSURE_TIME, ACAMERA_SENSOR_SENSITIVITY, etc.</p>
7910      *
7911      * @see ACAMERA_SENSOR_EXPOSURE_TIME
7912      * @see ACAMERA_SENSOR_SENSITIVITY
7913      */
7914     ACAMERA_CONTROL_CAPTURE_INTENT_MANUAL                            = 6,
7915 
7916     /**
7917      * <p>This request is for a motion tracking use case, where
7918      * the application will use camera and inertial sensor data to
7919      * locate and track objects in the world.</p>
7920      * <p>The camera device auto-exposure routine will limit the exposure time
7921      * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
7922      */
7923     ACAMERA_CONTROL_CAPTURE_INTENT_MOTION_TRACKING                   = 7,
7924 
7925 } acamera_metadata_enum_android_control_capture_intent_t;
7926 
7927 // ACAMERA_CONTROL_EFFECT_MODE
7928 typedef enum acamera_metadata_enum_acamera_control_effect_mode {
7929     /**
7930      * <p>No color effect will be applied.</p>
7931      */
7932     ACAMERA_CONTROL_EFFECT_MODE_OFF                                  = 0,
7933 
7934     /**
7935      * <p>A "monocolor" effect where the image is mapped into
7936      * a single color.</p>
7937      * <p>This will typically be grayscale.</p>
7938      */
7939     ACAMERA_CONTROL_EFFECT_MODE_MONO                                 = 1,
7940 
7941     /**
7942      * <p>A "photo-negative" effect where the image's colors
7943      * are inverted.</p>
7944      */
7945     ACAMERA_CONTROL_EFFECT_MODE_NEGATIVE                             = 2,
7946 
7947     /**
7948      * <p>A "solarisation" effect (Sabattier effect) where the
7949      * image is wholly or partially reversed in
7950      * tone.</p>
7951      */
7952     ACAMERA_CONTROL_EFFECT_MODE_SOLARIZE                             = 3,
7953 
7954     /**
7955      * <p>A "sepia" effect where the image is mapped into warm
7956      * gray, red, and brown tones.</p>
7957      */
7958     ACAMERA_CONTROL_EFFECT_MODE_SEPIA                                = 4,
7959 
7960     /**
7961      * <p>A "posterization" effect where the image uses
7962      * discrete regions of tone rather than a continuous
7963      * gradient of tones.</p>
7964      */
7965     ACAMERA_CONTROL_EFFECT_MODE_POSTERIZE                            = 5,
7966 
7967     /**
7968      * <p>A "whiteboard" effect where the image is typically displayed
7969      * as regions of white, with black or grey details.</p>
7970      */
7971     ACAMERA_CONTROL_EFFECT_MODE_WHITEBOARD                           = 6,
7972 
7973     /**
7974      * <p>A "blackboard" effect where the image is typically displayed
7975      * as regions of black, with white or grey details.</p>
7976      */
7977     ACAMERA_CONTROL_EFFECT_MODE_BLACKBOARD                           = 7,
7978 
7979     /**
7980      * <p>An "aqua" effect where a blue hue is added to the image.</p>
7981      */
7982     ACAMERA_CONTROL_EFFECT_MODE_AQUA                                 = 8,
7983 
7984 } acamera_metadata_enum_android_control_effect_mode_t;
7985 
7986 // ACAMERA_CONTROL_MODE
7987 typedef enum acamera_metadata_enum_acamera_control_mode {
7988     /**
7989      * <p>Full application control of pipeline.</p>
7990      * <p>All control by the device's metering and focusing (3A)
7991      * routines is disabled, and no other settings in
7992      * ACAMERA_CONTROL_* have any effect, except that
7993      * ACAMERA_CONTROL_CAPTURE_INTENT may be used by the camera
7994      * device to select post-processing values for processing
7995      * blocks that do not allow for manual control, or are not
7996      * exposed by the camera API.</p>
7997      * <p>However, the camera device's 3A routines may continue to
7998      * collect statistics and update their internal state so that
7999      * when control is switched to AUTO mode, good control values
8000      * can be immediately applied.</p>
8001      *
8002      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8003      */
8004     ACAMERA_CONTROL_MODE_OFF                                         = 0,
8005 
8006     /**
8007      * <p>Use settings for each individual 3A routine.</p>
8008      * <p>Manual control of capture parameters is disabled. All
8009      * controls in ACAMERA_CONTROL_* besides sceneMode take
8010      * effect.</p>
8011      */
8012     ACAMERA_CONTROL_MODE_AUTO                                        = 1,
8013 
8014     /**
8015      * <p>Use a specific scene mode.</p>
8016      * <p>Enabling this disables control.aeMode, control.awbMode and
8017      * control.afMode controls; the camera device will ignore
8018      * those settings while USE_SCENE_MODE is active (except for
8019      * FACE_PRIORITY scene mode). Other control entries are still active.
8020      * This setting can only be used if scene mode is supported (i.e.
8021      * ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
8022      * contain some modes other than DISABLED).</p>
8023      * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p>
8024      *
8025      * @see ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
8026      */
8027     ACAMERA_CONTROL_MODE_USE_SCENE_MODE                              = 2,
8028 
8029     /**
8030      * <p>Same as OFF mode, except that this capture will not be
8031      * used by camera device background auto-exposure, auto-white balance and
8032      * auto-focus algorithms (3A) to update their statistics.</p>
8033      * <p>Specifically, the 3A routines are locked to the last
8034      * values set from a request with AUTO, OFF, or
8035      * USE_SCENE_MODE, and any statistics or state updates
8036      * collected from manual captures with OFF_KEEP_STATE will be
8037      * discarded by the camera device.</p>
8038      */
8039     ACAMERA_CONTROL_MODE_OFF_KEEP_STATE                              = 3,
8040 
8041     /**
8042      * <p>Use a specific extended scene mode.</p>
8043      * <p>When extended scene mode is on, the camera device may override certain control
8044      * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
8045      * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
8046      * are guaranteed.</p>
8047      * <p>This setting can only be used if extended scene mode is supported (i.e.
8048      * android.control.availableExtendedSceneModes
8049      * contains some modes other than DISABLED).</p>
8050      */
8051     ACAMERA_CONTROL_MODE_USE_EXTENDED_SCENE_MODE                     = 4,
8052 
8053 } acamera_metadata_enum_android_control_mode_t;
8054 
8055 // ACAMERA_CONTROL_SCENE_MODE
8056 typedef enum acamera_metadata_enum_acamera_control_scene_mode {
8057     /**
8058      * <p>Indicates that no scene modes are set for a given capture request.</p>
8059      */
8060     ACAMERA_CONTROL_SCENE_MODE_DISABLED                              = 0,
8061 
8062     /**
8063      * <p>If face detection support exists, use face
8064      * detection data for auto-focus, auto-white balance, and
8065      * auto-exposure routines.</p>
8066      * <p>If face detection statistics are disabled
8067      * (i.e. ACAMERA_STATISTICS_FACE_DETECT_MODE is set to OFF),
8068      * this should still operate correctly (but will not return
8069      * face detection statistics to the framework).</p>
8070      * <p>Unlike the other scene modes, ACAMERA_CONTROL_AE_MODE,
8071      * ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
8072      * remain active when FACE_PRIORITY is set.</p>
8073      *
8074      * @see ACAMERA_CONTROL_AE_MODE
8075      * @see ACAMERA_CONTROL_AF_MODE
8076      * @see ACAMERA_CONTROL_AWB_MODE
8077      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
8078      */
8079     ACAMERA_CONTROL_SCENE_MODE_FACE_PRIORITY                         = 1,
8080 
8081     /**
8082      * <p>Optimized for photos of quickly moving objects.</p>
8083      * <p>Similar to SPORTS.</p>
8084      */
8085     ACAMERA_CONTROL_SCENE_MODE_ACTION                                = 2,
8086 
8087     /**
8088      * <p>Optimized for still photos of people.</p>
8089      */
8090     ACAMERA_CONTROL_SCENE_MODE_PORTRAIT                              = 3,
8091 
8092     /**
8093      * <p>Optimized for photos of distant macroscopic objects.</p>
8094      */
8095     ACAMERA_CONTROL_SCENE_MODE_LANDSCAPE                             = 4,
8096 
8097     /**
8098      * <p>Optimized for low-light settings.</p>
8099      */
8100     ACAMERA_CONTROL_SCENE_MODE_NIGHT                                 = 5,
8101 
8102     /**
8103      * <p>Optimized for still photos of people in low-light
8104      * settings.</p>
8105      */
8106     ACAMERA_CONTROL_SCENE_MODE_NIGHT_PORTRAIT                        = 6,
8107 
8108     /**
8109      * <p>Optimized for dim, indoor settings where flash must
8110      * remain off.</p>
8111      */
8112     ACAMERA_CONTROL_SCENE_MODE_THEATRE                               = 7,
8113 
8114     /**
8115      * <p>Optimized for bright, outdoor beach settings.</p>
8116      */
8117     ACAMERA_CONTROL_SCENE_MODE_BEACH                                 = 8,
8118 
8119     /**
8120      * <p>Optimized for bright, outdoor settings containing snow.</p>
8121      */
8122     ACAMERA_CONTROL_SCENE_MODE_SNOW                                  = 9,
8123 
8124     /**
8125      * <p>Optimized for scenes of the setting sun.</p>
8126      */
8127     ACAMERA_CONTROL_SCENE_MODE_SUNSET                                = 10,
8128 
8129     /**
8130      * <p>Optimized to avoid blurry photos due to small amounts of
8131      * device motion (for example: due to hand shake).</p>
8132      */
8133     ACAMERA_CONTROL_SCENE_MODE_STEADYPHOTO                           = 11,
8134 
8135     /**
8136      * <p>Optimized for nighttime photos of fireworks.</p>
8137      */
8138     ACAMERA_CONTROL_SCENE_MODE_FIREWORKS                             = 12,
8139 
8140     /**
8141      * <p>Optimized for photos of quickly moving people.</p>
8142      * <p>Similar to ACTION.</p>
8143      */
8144     ACAMERA_CONTROL_SCENE_MODE_SPORTS                                = 13,
8145 
8146     /**
8147      * <p>Optimized for dim, indoor settings with multiple moving
8148      * people.</p>
8149      */
8150     ACAMERA_CONTROL_SCENE_MODE_PARTY                                 = 14,
8151 
8152     /**
8153      * <p>Optimized for dim settings where the main light source
8154      * is a candle.</p>
8155      */
8156     ACAMERA_CONTROL_SCENE_MODE_CANDLELIGHT                           = 15,
8157 
8158     /**
8159      * <p>Optimized for accurately capturing a photo of barcode
8160      * for use by camera applications that wish to read the
8161      * barcode value.</p>
8162      */
8163     ACAMERA_CONTROL_SCENE_MODE_BARCODE                               = 16,
8164 
8165     /**
8166      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
8167      * <p>In this scene mode, the camera device captures images
8168      * that keep a larger range of scene illumination levels
8169      * visible in the final image. For example, when taking a
8170      * picture of a object in front of a bright window, both
8171      * the object and the scene through the window may be
8172      * visible when using HDR mode, while in normal AUTO mode,
8173      * one or the other may be poorly exposed. As a tradeoff,
8174      * HDR mode generally takes much longer to capture a single
8175      * image, has no user control, and may have other artifacts
8176      * depending on the HDR method used.</p>
8177      * <p>Therefore, HDR captures operate at a much slower rate
8178      * than regular captures.</p>
8179      * <p>In this mode, on LIMITED or FULL devices, when a request
8180      * is made with a ACAMERA_CONTROL_CAPTURE_INTENT of
8181      * STILL_CAPTURE, the camera device will capture an image
8182      * using a high dynamic range capture technique.  On LEGACY
8183      * devices, captures that target a JPEG-format output will
8184      * be captured with HDR, and the capture intent is not
8185      * relevant.</p>
8186      * <p>The HDR capture may involve the device capturing a burst
8187      * of images internally and combining them into one, or it
8188      * may involve the device using specialized high dynamic
8189      * range capture hardware. In all cases, a single image is
8190      * produced in response to a capture request submitted
8191      * while in HDR mode.</p>
8192      * <p>Since substantial post-processing is generally needed to
8193      * produce an HDR image, only YUV, PRIVATE, and JPEG
8194      * outputs are supported for LIMITED/FULL device HDR
8195      * captures, and only JPEG outputs are supported for LEGACY
8196      * HDR captures. Using a RAW output for HDR capture is not
8197      * supported.</p>
8198      * <p>Some devices may also support always-on HDR, which
8199      * applies HDR processing at full frame rate.  For these
8200      * devices, intents other than STILL_CAPTURE will also
8201      * produce an HDR output with no frame rate impact compared
8202      * to normal operation, though the quality may be lower
8203      * than for STILL_CAPTURE intents.</p>
8204      * <p>If SCENE_MODE_HDR is used with unsupported output types
8205      * or capture intents, the images captured will be as if
8206      * the SCENE_MODE was not enabled at all.</p>
8207      *
8208      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8209      */
8210     ACAMERA_CONTROL_SCENE_MODE_HDR                                   = 18,
8211 
8212 } acamera_metadata_enum_android_control_scene_mode_t;
8213 
8214 // ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
8215 typedef enum acamera_metadata_enum_acamera_control_video_stabilization_mode {
8216     /**
8217      * <p>Video stabilization is disabled.</p>
8218      */
8219     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_OFF                     = 0,
8220 
8221     /**
8222      * <p>Video stabilization is enabled.</p>
8223      */
8224     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_ON                      = 1,
8225 
8226     /**
8227      * <p>Preview stabilization, where the preview in addition to all other non-RAW streams are
8228      * stabilized with the same quality of stabilization, is enabled. This mode aims to give
8229      * clients a 'what you see is what you get' effect. In this mode, the FoV reduction will
8230      * be a maximum of 20 % both horizontally and vertically
8231      * (10% from left, right, top, bottom) for the given zoom ratio / crop region.
8232      * The resultant FoV will also be the same across all processed streams
8233      * (that have the same aspect ratio).</p>
8234      */
8235     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION   = 2,
8236 
8237 } acamera_metadata_enum_android_control_video_stabilization_mode_t;
8238 
8239 // ACAMERA_CONTROL_AE_STATE
8240 typedef enum acamera_metadata_enum_acamera_control_ae_state {
8241     /**
8242      * <p>AE is off or recently reset.</p>
8243      * <p>When a camera device is opened, it starts in
8244      * this state. This is a transient state, the camera device may skip reporting
8245      * this state in capture result.</p>
8246      */
8247     ACAMERA_CONTROL_AE_STATE_INACTIVE                                = 0,
8248 
8249     /**
8250      * <p>AE doesn't yet have a good set of control values
8251      * for the current scene.</p>
8252      * <p>This is a transient state, the camera device may skip
8253      * reporting this state in capture result.</p>
8254      */
8255     ACAMERA_CONTROL_AE_STATE_SEARCHING                               = 1,
8256 
8257     /**
8258      * <p>AE has a good set of control values for the
8259      * current scene.</p>
8260      */
8261     ACAMERA_CONTROL_AE_STATE_CONVERGED                               = 2,
8262 
8263     /**
8264      * <p>AE has been locked.</p>
8265      */
8266     ACAMERA_CONTROL_AE_STATE_LOCKED                                  = 3,
8267 
8268     /**
8269      * <p>AE has a good set of control values, but flash
8270      * needs to be fired for good quality still
8271      * capture.</p>
8272      */
8273     ACAMERA_CONTROL_AE_STATE_FLASH_REQUIRED                          = 4,
8274 
8275     /**
8276      * <p>AE has been asked to do a precapture sequence
8277      * and is currently executing it.</p>
8278      * <p>Precapture can be triggered through setting
8279      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to START. Currently
8280      * active and completed (if it causes camera device internal AE lock) precapture
8281      * metering sequence can be canceled through setting
8282      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to CANCEL.</p>
8283      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
8284      * or FLASH_REQUIRED as appropriate. This is a transient
8285      * state, the camera device may skip reporting this state in
8286      * capture result.</p>
8287      *
8288      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8289      */
8290     ACAMERA_CONTROL_AE_STATE_PRECAPTURE                              = 5,
8291 
8292 } acamera_metadata_enum_android_control_ae_state_t;
8293 
8294 // ACAMERA_CONTROL_AF_STATE
8295 typedef enum acamera_metadata_enum_acamera_control_af_state {
8296     /**
8297      * <p>AF is off or has not yet tried to scan/been asked
8298      * to scan.</p>
8299      * <p>When a camera device is opened, it starts in this
8300      * state. This is a transient state, the camera device may
8301      * skip reporting this state in capture
8302      * result.</p>
8303      */
8304     ACAMERA_CONTROL_AF_STATE_INACTIVE                                = 0,
8305 
8306     /**
8307      * <p>AF is currently performing an AF scan initiated the
8308      * camera device in a continuous autofocus mode.</p>
8309      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
8310      * state, the camera device may skip reporting this state in
8311      * capture result.</p>
8312      */
8313     ACAMERA_CONTROL_AF_STATE_PASSIVE_SCAN                            = 1,
8314 
8315     /**
8316      * <p>AF currently believes it is in focus, but may
8317      * restart scanning at any time.</p>
8318      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
8319      * state, the camera device may skip reporting this state in
8320      * capture result.</p>
8321      */
8322     ACAMERA_CONTROL_AF_STATE_PASSIVE_FOCUSED                         = 2,
8323 
8324     /**
8325      * <p>AF is performing an AF scan because it was
8326      * triggered by AF trigger.</p>
8327      * <p>Only used by AUTO or MACRO AF modes. This is a transient
8328      * state, the camera device may skip reporting this state in
8329      * capture result.</p>
8330      */
8331     ACAMERA_CONTROL_AF_STATE_ACTIVE_SCAN                             = 3,
8332 
8333     /**
8334      * <p>AF believes it is focused correctly and has locked
8335      * focus.</p>
8336      * <p>This state is reached only after an explicit START AF trigger has been
8337      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus has been obtained.</p>
8338      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
8339      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
8340      *
8341      * @see ACAMERA_CONTROL_AF_MODE
8342      * @see ACAMERA_CONTROL_AF_TRIGGER
8343      */
8344     ACAMERA_CONTROL_AF_STATE_FOCUSED_LOCKED                          = 4,
8345 
8346     /**
8347      * <p>AF has failed to focus successfully and has locked
8348      * focus.</p>
8349      * <p>This state is reached only after an explicit START AF trigger has been
8350      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus cannot be obtained.</p>
8351      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
8352      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
8353      *
8354      * @see ACAMERA_CONTROL_AF_MODE
8355      * @see ACAMERA_CONTROL_AF_TRIGGER
8356      */
8357     ACAMERA_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED                      = 5,
8358 
8359     /**
8360      * <p>AF finished a passive scan without finding focus,
8361      * and may restart scanning at any time.</p>
8362      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
8363      * device may skip reporting this state in capture result.</p>
8364      * <p>LEGACY camera devices do not support this state. When a passive
8365      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
8366      */
8367     ACAMERA_CONTROL_AF_STATE_PASSIVE_UNFOCUSED                       = 6,
8368 
8369 } acamera_metadata_enum_android_control_af_state_t;
8370 
8371 // ACAMERA_CONTROL_AWB_STATE
8372 typedef enum acamera_metadata_enum_acamera_control_awb_state {
8373     /**
8374      * <p>AWB is not in auto mode, or has not yet started metering.</p>
8375      * <p>When a camera device is opened, it starts in this
8376      * state. This is a transient state, the camera device may
8377      * skip reporting this state in capture
8378      * result.</p>
8379      */
8380     ACAMERA_CONTROL_AWB_STATE_INACTIVE                               = 0,
8381 
8382     /**
8383      * <p>AWB doesn't yet have a good set of control
8384      * values for the current scene.</p>
8385      * <p>This is a transient state, the camera device
8386      * may skip reporting this state in capture result.</p>
8387      */
8388     ACAMERA_CONTROL_AWB_STATE_SEARCHING                              = 1,
8389 
8390     /**
8391      * <p>AWB has a good set of control values for the
8392      * current scene.</p>
8393      */
8394     ACAMERA_CONTROL_AWB_STATE_CONVERGED                              = 2,
8395 
8396     /**
8397      * <p>AWB has been locked.</p>
8398      */
8399     ACAMERA_CONTROL_AWB_STATE_LOCKED                                 = 3,
8400 
8401 } acamera_metadata_enum_android_control_awb_state_t;
8402 
8403 // ACAMERA_CONTROL_AE_LOCK_AVAILABLE
8404 typedef enum acamera_metadata_enum_acamera_control_ae_lock_available {
8405     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_FALSE                          = 0,
8406 
8407     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_TRUE                           = 1,
8408 
8409 } acamera_metadata_enum_android_control_ae_lock_available_t;
8410 
8411 // ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
8412 typedef enum acamera_metadata_enum_acamera_control_awb_lock_available {
8413     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_FALSE                         = 0,
8414 
8415     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_TRUE                          = 1,
8416 
8417 } acamera_metadata_enum_android_control_awb_lock_available_t;
8418 
8419 // ACAMERA_CONTROL_ENABLE_ZSL
8420 typedef enum acamera_metadata_enum_acamera_control_enable_zsl {
8421     /**
8422      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE must be captured
8423      * after previous requests.</p>
8424      *
8425      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8426      */
8427     ACAMERA_CONTROL_ENABLE_ZSL_FALSE                                 = 0,
8428 
8429     /**
8430      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may or may not be
8431      * captured before previous requests.</p>
8432      *
8433      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8434      */
8435     ACAMERA_CONTROL_ENABLE_ZSL_TRUE                                  = 1,
8436 
8437 } acamera_metadata_enum_android_control_enable_zsl_t;
8438 
8439 // ACAMERA_CONTROL_AF_SCENE_CHANGE
8440 typedef enum acamera_metadata_enum_acamera_control_af_scene_change {
8441     /**
8442      * <p>Scene change is not detected within the AF region(s).</p>
8443      */
8444     ACAMERA_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED                     = 0,
8445 
8446     /**
8447      * <p>Scene change is detected within the AF region(s).</p>
8448      */
8449     ACAMERA_CONTROL_AF_SCENE_CHANGE_DETECTED                         = 1,
8450 
8451 } acamera_metadata_enum_android_control_af_scene_change_t;
8452 
8453 // ACAMERA_CONTROL_EXTENDED_SCENE_MODE
8454 typedef enum acamera_metadata_enum_acamera_control_extended_scene_mode {
8455     /**
8456      * <p>Extended scene mode is disabled.</p>
8457      */
8458     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_DISABLED                     = 0,
8459 
8460     /**
8461      * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
8462      * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
8463      * extra image processing, this mode may introduce additional stall to non-raw streams.
8464      * This mode should be used in high quality still capture use case.</p>
8465      */
8466     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE          = 1,
8467 
8468     /**
8469      * <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
8470      * and the effect is applied to all processed streams no larger than the maximum
8471      * streaming dimension. This mode should be used if performance and power are a
8472      * priority, such as video recording.</p>
8473      */
8474     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS             = 2,
8475 
8476 } acamera_metadata_enum_android_control_extended_scene_mode_t;
8477 
8478 
8479 
8480 // ACAMERA_EDGE_MODE
8481 typedef enum acamera_metadata_enum_acamera_edge_mode {
8482     /**
8483      * <p>No edge enhancement is applied.</p>
8484      */
8485     ACAMERA_EDGE_MODE_OFF                                            = 0,
8486 
8487     /**
8488      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
8489      * relative to sensor output. It may be the same as OFF if edge enhancement will
8490      * slow down frame rate relative to sensor.</p>
8491      */
8492     ACAMERA_EDGE_MODE_FAST                                           = 1,
8493 
8494     /**
8495      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
8496      */
8497     ACAMERA_EDGE_MODE_HIGH_QUALITY                                   = 2,
8498 
8499     /**
8500      * <p>Edge enhancement is applied at different
8501      * levels for different output streams, based on resolution. Streams at maximum recording
8502      * resolution (see {@link ACameraDevice_createCaptureSession })
8503      * or below have edge enhancement applied, while higher-resolution streams have no edge
8504      * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
8505      * so that frame rate is not impacted, and the quality is equal to or better than FAST
8506      * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
8507      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
8508      * with YUV or PRIVATE reprocessing, where the application continuously captures
8509      * high-resolution intermediate buffers into a circular buffer, from which a final image is
8510      * produced via reprocessing when a user takes a picture.  For such a use case, the
8511      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
8512      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
8513      * buffers (used for recording or preview, generally) need edge enhancement applied for
8514      * reasonable preview quality.</p>
8515      * <p>This mode is guaranteed to be supported by devices that support either the
8516      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
8517      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
8518      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
8519      *
8520      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8521      */
8522     ACAMERA_EDGE_MODE_ZERO_SHUTTER_LAG                               = 3,
8523 
8524 } acamera_metadata_enum_android_edge_mode_t;
8525 
8526 
8527 // ACAMERA_FLASH_MODE
8528 typedef enum acamera_metadata_enum_acamera_flash_mode {
8529     /**
8530      * <p>Do not fire the flash for this capture.</p>
8531      */
8532     ACAMERA_FLASH_MODE_OFF                                           = 0,
8533 
8534     /**
8535      * <p>If the flash is available and charged, fire flash
8536      * for this capture.</p>
8537      */
8538     ACAMERA_FLASH_MODE_SINGLE                                        = 1,
8539 
8540     /**
8541      * <p>Transition flash to continuously on.</p>
8542      */
8543     ACAMERA_FLASH_MODE_TORCH                                         = 2,
8544 
8545 } acamera_metadata_enum_android_flash_mode_t;
8546 
8547 // ACAMERA_FLASH_STATE
8548 typedef enum acamera_metadata_enum_acamera_flash_state {
8549     /**
8550      * <p>No flash on camera.</p>
8551      */
8552     ACAMERA_FLASH_STATE_UNAVAILABLE                                  = 0,
8553 
8554     /**
8555      * <p>Flash is charging and cannot be fired.</p>
8556      */
8557     ACAMERA_FLASH_STATE_CHARGING                                     = 1,
8558 
8559     /**
8560      * <p>Flash is ready to fire.</p>
8561      */
8562     ACAMERA_FLASH_STATE_READY                                        = 2,
8563 
8564     /**
8565      * <p>Flash fired for this capture.</p>
8566      */
8567     ACAMERA_FLASH_STATE_FIRED                                        = 3,
8568 
8569     /**
8570      * <p>Flash partially illuminated this frame.</p>
8571      * <p>This is usually due to the next or previous frame having
8572      * the flash fire, and the flash spilling into this capture
8573      * due to hardware limitations.</p>
8574      */
8575     ACAMERA_FLASH_STATE_PARTIAL                                      = 4,
8576 
8577 } acamera_metadata_enum_android_flash_state_t;
8578 
8579 
8580 // ACAMERA_FLASH_INFO_AVAILABLE
8581 typedef enum acamera_metadata_enum_acamera_flash_info_available {
8582     ACAMERA_FLASH_INFO_AVAILABLE_FALSE                               = 0,
8583 
8584     ACAMERA_FLASH_INFO_AVAILABLE_TRUE                                = 1,
8585 
8586 } acamera_metadata_enum_android_flash_info_available_t;
8587 
8588 
8589 // ACAMERA_HOT_PIXEL_MODE
8590 typedef enum acamera_metadata_enum_acamera_hot_pixel_mode {
8591     /**
8592      * <p>No hot pixel correction is applied.</p>
8593      * <p>The frame rate must not be reduced relative to sensor raw output
8594      * for this option.</p>
8595      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
8596      *
8597      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
8598      */
8599     ACAMERA_HOT_PIXEL_MODE_OFF                                       = 0,
8600 
8601     /**
8602      * <p>Hot pixel correction is applied, without reducing frame
8603      * rate relative to sensor raw output.</p>
8604      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
8605      *
8606      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
8607      */
8608     ACAMERA_HOT_PIXEL_MODE_FAST                                      = 1,
8609 
8610     /**
8611      * <p>High-quality hot pixel correction is applied, at a cost
8612      * of possibly reduced frame rate relative to sensor raw output.</p>
8613      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
8614      *
8615      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
8616      */
8617     ACAMERA_HOT_PIXEL_MODE_HIGH_QUALITY                              = 2,
8618 
8619 } acamera_metadata_enum_android_hot_pixel_mode_t;
8620 
8621 
8622 
8623 // ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
8624 typedef enum acamera_metadata_enum_acamera_lens_optical_stabilization_mode {
8625     /**
8626      * <p>Optical stabilization is unavailable.</p>
8627      */
8628     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_OFF                      = 0,
8629 
8630     /**
8631      * <p>Optical stabilization is enabled.</p>
8632      */
8633     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_ON                       = 1,
8634 
8635 } acamera_metadata_enum_android_lens_optical_stabilization_mode_t;
8636 
8637 // ACAMERA_LENS_FACING
8638 typedef enum acamera_metadata_enum_acamera_lens_facing {
8639     /**
8640      * <p>The camera device faces the same direction as the device's screen.</p>
8641      */
8642     ACAMERA_LENS_FACING_FRONT                                        = 0,
8643 
8644     /**
8645      * <p>The camera device faces the opposite direction as the device's screen.</p>
8646      */
8647     ACAMERA_LENS_FACING_BACK                                         = 1,
8648 
8649     /**
8650      * <p>The camera device is an external camera, and has no fixed facing relative to the
8651      * device's screen.</p>
8652      */
8653     ACAMERA_LENS_FACING_EXTERNAL                                     = 2,
8654 
8655 } acamera_metadata_enum_android_lens_facing_t;
8656 
8657 // ACAMERA_LENS_STATE
8658 typedef enum acamera_metadata_enum_acamera_lens_state {
8659     /**
8660      * <p>The lens parameters (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
8661      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE) are not changing.</p>
8662      *
8663      * @see ACAMERA_LENS_APERTURE
8664      * @see ACAMERA_LENS_FILTER_DENSITY
8665      * @see ACAMERA_LENS_FOCAL_LENGTH
8666      * @see ACAMERA_LENS_FOCUS_DISTANCE
8667      */
8668     ACAMERA_LENS_STATE_STATIONARY                                    = 0,
8669 
8670     /**
8671      * <p>One or several of the lens parameters
8672      * (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
8673      * ACAMERA_LENS_FILTER_DENSITY or ACAMERA_LENS_APERTURE) is
8674      * currently changing.</p>
8675      *
8676      * @see ACAMERA_LENS_APERTURE
8677      * @see ACAMERA_LENS_FILTER_DENSITY
8678      * @see ACAMERA_LENS_FOCAL_LENGTH
8679      * @see ACAMERA_LENS_FOCUS_DISTANCE
8680      */
8681     ACAMERA_LENS_STATE_MOVING                                        = 1,
8682 
8683 } acamera_metadata_enum_android_lens_state_t;
8684 
8685 // ACAMERA_LENS_POSE_REFERENCE
8686 typedef enum acamera_metadata_enum_acamera_lens_pose_reference {
8687     /**
8688      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the optical center of
8689      * the largest camera device facing the same direction as this camera.</p>
8690      * <p>This is the default value for API levels before Android P.</p>
8691      *
8692      * @see ACAMERA_LENS_POSE_TRANSLATION
8693      */
8694     ACAMERA_LENS_POSE_REFERENCE_PRIMARY_CAMERA                       = 0,
8695 
8696     /**
8697      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the position of the
8698      * primary gyroscope of this Android device.</p>
8699      *
8700      * @see ACAMERA_LENS_POSE_TRANSLATION
8701      */
8702     ACAMERA_LENS_POSE_REFERENCE_GYROSCOPE                            = 1,
8703 
8704     /**
8705      * <p>The camera device cannot represent the values of ACAMERA_LENS_POSE_TRANSLATION
8706      * and ACAMERA_LENS_POSE_ROTATION accurately enough. One such example is a camera device
8707      * on the cover of a foldable phone: in order to measure the pose translation and rotation,
8708      * some kind of hinge position sensor would be needed.</p>
8709      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION must be all zeros, and
8710      * ACAMERA_LENS_POSE_ROTATION must be values matching its default facing.</p>
8711      *
8712      * @see ACAMERA_LENS_POSE_ROTATION
8713      * @see ACAMERA_LENS_POSE_TRANSLATION
8714      */
8715     ACAMERA_LENS_POSE_REFERENCE_UNDEFINED                            = 2,
8716 
8717     /**
8718      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the origin of the
8719      * automotive sensor coordinate system, which is at the center of the rear axle.</p>
8720      *
8721      * @see ACAMERA_LENS_POSE_TRANSLATION
8722      */
8723     ACAMERA_LENS_POSE_REFERENCE_AUTOMOTIVE                           = 3,
8724 
8725 } acamera_metadata_enum_android_lens_pose_reference_t;
8726 
8727 
8728 // ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
8729 typedef enum acamera_metadata_enum_acamera_lens_info_focus_distance_calibration {
8730     /**
8731      * <p>The lens focus distance is not accurate, and the units used for
8732      * ACAMERA_LENS_FOCUS_DISTANCE do not correspond to any physical units.</p>
8733      * <p>Setting the lens to the same focus distance on separate occasions may
8734      * result in a different real focus distance, depending on factors such
8735      * as the orientation of the device, the age of the focusing mechanism,
8736      * and the device temperature. The focus distance value will still be
8737      * in the range of <code>[0, ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE]</code>, where 0
8738      * represents the farthest focus.</p>
8739      *
8740      * @see ACAMERA_LENS_FOCUS_DISTANCE
8741      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
8742      */
8743     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED        = 0,
8744 
8745     /**
8746      * <p>The lens focus distance is measured in diopters.</p>
8747      * <p>However, setting the lens to the same focus distance
8748      * on separate occasions may result in a different real
8749      * focus distance, depending on factors such as the
8750      * orientation of the device, the age of the focusing
8751      * mechanism, and the device temperature.</p>
8752      */
8753     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE         = 1,
8754 
8755     /**
8756      * <p>The lens focus distance is measured in diopters, and
8757      * is calibrated.</p>
8758      * <p>The lens mechanism is calibrated so that setting the
8759      * same focus distance is repeatable on multiple
8760      * occasions with good accuracy, and the focus distance
8761      * corresponds to the real physical distance to the plane
8762      * of best focus.</p>
8763      */
8764     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED          = 2,
8765 
8766 } acamera_metadata_enum_android_lens_info_focus_distance_calibration_t;
8767 
8768 
8769 // ACAMERA_NOISE_REDUCTION_MODE
8770 typedef enum acamera_metadata_enum_acamera_noise_reduction_mode {
8771     /**
8772      * <p>No noise reduction is applied.</p>
8773      */
8774     ACAMERA_NOISE_REDUCTION_MODE_OFF                                 = 0,
8775 
8776     /**
8777      * <p>Noise reduction is applied without reducing frame rate relative to sensor
8778      * output. It may be the same as OFF if noise reduction will reduce frame rate
8779      * relative to sensor.</p>
8780      */
8781     ACAMERA_NOISE_REDUCTION_MODE_FAST                                = 1,
8782 
8783     /**
8784      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
8785      * rate relative to sensor output.</p>
8786      */
8787     ACAMERA_NOISE_REDUCTION_MODE_HIGH_QUALITY                        = 2,
8788 
8789     /**
8790      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
8791      * sensor output. </p>
8792      */
8793     ACAMERA_NOISE_REDUCTION_MODE_MINIMAL                             = 3,
8794 
8795     /**
8796      * <p>Noise reduction is applied at different levels for different output streams,
8797      * based on resolution. Streams at maximum recording resolution (see {@link ACameraDevice_createCaptureSession })
8798      * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
8799      * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
8800      * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
8801      * and the quality is equal to or better than FAST (since it is only applied to
8802      * lower-resolution outputs, quality may improve from FAST).</p>
8803      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
8804      * with YUV or PRIVATE reprocessing, where the application continuously captures
8805      * high-resolution intermediate buffers into a circular buffer, from which a final image is
8806      * produced via reprocessing when a user takes a picture.  For such a use case, the
8807      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
8808      * preview and to avoid over-applying noise filtering when reprocessing, while
8809      * low-resolution buffers (used for recording or preview, generally) need noise reduction
8810      * applied for reasonable preview quality.</p>
8811      * <p>This mode is guaranteed to be supported by devices that support either the
8812      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
8813      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
8814      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
8815      *
8816      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8817      */
8818     ACAMERA_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG                    = 4,
8819 
8820 } acamera_metadata_enum_android_noise_reduction_mode_t;
8821 
8822 
8823 
8824 // ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
8825 typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
8826     /**
8827      * <p>The minimal set of capabilities that every camera
8828      * device (regardless of ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL)
8829      * supports.</p>
8830      * <p>This capability is listed by all normal devices, and
8831      * indicates that the camera device has a feature set
8832      * that's comparable to the baseline requirements for the
8833      * older android.hardware.Camera API.</p>
8834      * <p>Devices with the DEPTH_OUTPUT capability might not list this
8835      * capability, indicating that they support only depth measurement,
8836      * not standard color output.</p>
8837      *
8838      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
8839      */
8840     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE       = 0,
8841 
8842     /**
8843      * <p>The camera device can be manually controlled (3A algorithms such
8844      * as auto-exposure, and auto-focus can be bypassed).
8845      * The camera device supports basic manual control of the sensor image
8846      * acquisition related stages. This means the following controls are
8847      * guaranteed to be supported:</p>
8848      * <ul>
8849      * <li>Manual frame duration control<ul>
8850      * <li>ACAMERA_SENSOR_FRAME_DURATION</li>
8851      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
8852      * </ul>
8853      * </li>
8854      * <li>Manual exposure control<ul>
8855      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
8856      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
8857      * </ul>
8858      * </li>
8859      * <li>Manual sensitivity control<ul>
8860      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
8861      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
8862      * </ul>
8863      * </li>
8864      * <li>Manual lens control (if the lens is adjustable)<ul>
8865      * <li>ACAMERA_LENS_*</li>
8866      * </ul>
8867      * </li>
8868      * <li>Manual flash control (if a flash unit is present)<ul>
8869      * <li>ACAMERA_FLASH_*</li>
8870      * </ul>
8871      * </li>
8872      * <li>Manual black level locking<ul>
8873      * <li>ACAMERA_BLACK_LEVEL_LOCK</li>
8874      * </ul>
8875      * </li>
8876      * <li>Auto exposure lock<ul>
8877      * <li>ACAMERA_CONTROL_AE_LOCK</li>
8878      * </ul>
8879      * </li>
8880      * </ul>
8881      * <p>If any of the above 3A algorithms are enabled, then the camera
8882      * device will accurately report the values applied by 3A in the
8883      * result.</p>
8884      * <p>A given camera device may also support additional manual sensor controls,
8885      * but this capability only covers the above list of controls.</p>
8886      * <p>If this is supported, android.scaler.streamConfigurationMap will
8887      * additionally return a min frame duration that is greater than
8888      * zero for each supported size-format combination.</p>
8889      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
8890      * physical camera switches, exposureTime, sensitivity, and lens properties may change
8891      * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
8892      * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
8893      *
8894      * @see ACAMERA_BLACK_LEVEL_LOCK
8895      * @see ACAMERA_CONTROL_AE_LOCK
8896      * @see ACAMERA_SENSOR_EXPOSURE_TIME
8897      * @see ACAMERA_SENSOR_FRAME_DURATION
8898      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
8899      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
8900      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
8901      * @see ACAMERA_SENSOR_SENSITIVITY
8902      */
8903     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR             = 1,
8904 
8905     /**
8906      * <p>The camera device post-processing stages can be manually controlled.
8907      * The camera device supports basic manual control of the image post-processing
8908      * stages. This means the following controls are guaranteed to be supported:</p>
8909      * <ul>
8910      * <li>
8911      * <p>Manual tonemap control</p>
8912      * <ul>
8913      * <li>android.tonemap.curve</li>
8914      * <li>ACAMERA_TONEMAP_MODE</li>
8915      * <li>ACAMERA_TONEMAP_MAX_CURVE_POINTS</li>
8916      * <li>ACAMERA_TONEMAP_GAMMA</li>
8917      * <li>ACAMERA_TONEMAP_PRESET_CURVE</li>
8918      * </ul>
8919      * </li>
8920      * <li>
8921      * <p>Manual white balance control</p>
8922      * <ul>
8923      * <li>ACAMERA_COLOR_CORRECTION_TRANSFORM</li>
8924      * <li>ACAMERA_COLOR_CORRECTION_GAINS</li>
8925      * </ul>
8926      * </li>
8927      * <li>Manual lens shading map control<ul>
8928      * <li>ACAMERA_SHADING_MODE</li>
8929      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE</li>
8930      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP</li>
8931      * <li>ACAMERA_LENS_INFO_SHADING_MAP_SIZE</li>
8932      * </ul>
8933      * </li>
8934      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
8935      * <li>ACAMERA_COLOR_CORRECTION_ABERRATION_MODE</li>
8936      * <li>ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES</li>
8937      * </ul>
8938      * </li>
8939      * <li>Auto white balance lock<ul>
8940      * <li>ACAMERA_CONTROL_AWB_LOCK</li>
8941      * </ul>
8942      * </li>
8943      * </ul>
8944      * <p>If auto white balance is enabled, then the camera device
8945      * will accurately report the values applied by AWB in the result.</p>
8946      * <p>A given camera device may also support additional post-processing
8947      * controls, but this capability only covers the above list of controls.</p>
8948      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
8949      * physical camera switches, tonemap, white balance, and shading map may change even if
8950      * awb is locked. However, the overall post-processing experience for users will be
8951      * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
8952      *
8953      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
8954      * @see ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
8955      * @see ACAMERA_COLOR_CORRECTION_GAINS
8956      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8957      * @see ACAMERA_CONTROL_AWB_LOCK
8958      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
8959      * @see ACAMERA_SHADING_MODE
8960      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
8961      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
8962      * @see ACAMERA_TONEMAP_GAMMA
8963      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
8964      * @see ACAMERA_TONEMAP_MODE
8965      * @see ACAMERA_TONEMAP_PRESET_CURVE
8966      */
8967     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING    = 2,
8968 
8969     /**
8970      * <p>The camera device supports outputting RAW buffers and
8971      * metadata for interpreting them.</p>
8972      * <p>Devices supporting the RAW capability allow both for
8973      * saving DNG files, and for direct application processing of
8974      * raw sensor images.</p>
8975      * <ul>
8976      * <li>RAW_SENSOR is supported as an output format.</li>
8977      * <li>The maximum available resolution for RAW_SENSOR streams
8978      *   will match either the value in
8979      *   ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE or
8980      *   ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</li>
8981      * <li>All DNG-related optional metadata entries are provided
8982      *   by the camera device.</li>
8983      * </ul>
8984      *
8985      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
8986      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
8987      */
8988     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_RAW                       = 3,
8989 
8990     /**
8991      * <p>The camera device supports accurately reporting the sensor settings for many of
8992      * the sensor controls while the built-in 3A algorithm is running.  This allows
8993      * reporting of sensor settings even when these settings cannot be manually changed.</p>
8994      * <p>The values reported for the following controls are guaranteed to be available
8995      * in the CaptureResult, including when 3A is enabled:</p>
8996      * <ul>
8997      * <li>Exposure control<ul>
8998      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
8999      * </ul>
9000      * </li>
9001      * <li>Sensitivity control<ul>
9002      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
9003      * </ul>
9004      * </li>
9005      * <li>Lens controls (if the lens is adjustable)<ul>
9006      * <li>ACAMERA_LENS_FOCUS_DISTANCE</li>
9007      * <li>ACAMERA_LENS_APERTURE</li>
9008      * </ul>
9009      * </li>
9010      * </ul>
9011      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
9012      * always be included if the MANUAL_SENSOR capability is available.</p>
9013      *
9014      * @see ACAMERA_LENS_APERTURE
9015      * @see ACAMERA_LENS_FOCUS_DISTANCE
9016      * @see ACAMERA_SENSOR_EXPOSURE_TIME
9017      * @see ACAMERA_SENSOR_SENSITIVITY
9018      */
9019     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS      = 5,
9020 
9021     /**
9022      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
9023      * second, in at least the uncompressed YUV format, when post-processing settings are
9024      * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
9025      * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
9026      * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
9027      * <p>More specifically, this means that at least one output {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
9028      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
9029      * is larger or equal to the 'high resolution' defined above, and can be captured at at
9030      * least 20 fps.  For the largest {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
9031      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS },
9032      * camera device can capture this size for at least 10 frames per second if the size is
9033      * less than 24 megapixels. Also the ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES entry
9034      * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
9035      * for the largest YUV_420_888 size.</p>
9036      * <p>If the device supports the {@link AIMAGE_FORMAT_RAW10 }, {@link AIMAGE_FORMAT_RAW12 }, {@link AIMAGE_FORMAT_Y8 }, then those can also be
9037      * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
9038      * <p>In addition, the ACAMERA_SYNC_MAX_LATENCY field is guaranteed to have a value between 0
9039      * and 4, inclusive. ACAMERA_CONTROL_AE_LOCK_AVAILABLE and ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
9040      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
9041      * consistent image output.</p>
9042      *
9043      * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
9044      * @see ACAMERA_CONTROL_AE_LOCK_AVAILABLE
9045      * @see ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
9046      * @see ACAMERA_SYNC_MAX_LATENCY
9047      */
9048     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE             = 6,
9049 
9050     /**
9051      * <p>The camera device can produce depth measurements from its field of view.</p>
9052      * <p>This capability requires the camera device to support the following:</p>
9053      * <ul>
9054      * <li>{@link AIMAGE_FORMAT_DEPTH16 } is supported as
9055      *   an output format.</li>
9056      * <li>{@link AIMAGE_FORMAT_DEPTH_POINT_CLOUD } is
9057      *   optionally supported as an output format.</li>
9058      * <li>This camera device, and all camera devices with the same ACAMERA_LENS_FACING, will
9059      *   list the following calibration metadata entries in both {@link ACameraManager_getCameraCharacteristics }
9060      *   and {@link ACameraCaptureSession_captureCallback_result }:<ul>
9061      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
9062      * <li>ACAMERA_LENS_POSE_ROTATION</li>
9063      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
9064      * <li>ACAMERA_LENS_DISTORTION</li>
9065      * </ul>
9066      * </li>
9067      * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li>
9068      * <li>As of Android P, the ACAMERA_LENS_POSE_REFERENCE entry is listed by this device.</li>
9069      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
9070      *   normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
9071      *   DEPTH16 format.</li>
9072      * </ul>
9073      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
9074      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
9075      * should be accounted for (see {@link ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS }).
9076      * On a device that supports both depth and color-based output, to enable smooth preview,
9077      * using a repeating burst is recommended, where a depth-output target is only included
9078      * once every N frames, where N is the ratio between preview output rate and depth output
9079      * rate, including depth stall time.</p>
9080      *
9081      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
9082      * @see ACAMERA_LENS_DISTORTION
9083      * @see ACAMERA_LENS_FACING
9084      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
9085      * @see ACAMERA_LENS_POSE_REFERENCE
9086      * @see ACAMERA_LENS_POSE_ROTATION
9087      * @see ACAMERA_LENS_POSE_TRANSLATION
9088      */
9089     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT              = 8,
9090 
9091     /**
9092      * <p>The camera device supports the MOTION_TRACKING value for
9093      * ACAMERA_CONTROL_CAPTURE_INTENT, which limits maximum exposure time to 20 ms.</p>
9094      * <p>This limits the motion blur of capture images, resulting in better image tracking
9095      * results for use cases such as image stabilization or augmented reality.</p>
9096      *
9097      * @see ACAMERA_CONTROL_CAPTURE_INTENT
9098      */
9099     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING           = 10,
9100 
9101     /**
9102      * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
9103      * <p>In API level 28, the physical cameras must also be exposed to the application via
9104      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>.</p>
9105      * <p>Starting from API level 29:</p>
9106      * <ul>
9107      * <li>Some or all physical cameras may not be independently exposed to the application,
9108      * in which case the physical camera IDs will not be available in
9109      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>. But the
9110      * application can still query the physical cameras' characteristics by calling
9111      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraCharacteristics">CameraManager#getCameraCharacteristics</a>.</li>
9112      * <li>If a physical camera is hidden from camera ID list, the mandatory stream
9113      * combinations for that physical camera must be supported through the logical camera
9114      * using physical streams. One exception is that in API level 30, a physical camera
9115      * may become unavailable via
9116      * {@link ACameraManager_PhysicalCameraAvailabilityCallback }
9117      * callback.</li>
9118      * </ul>
9119      * <p>Combinations of logical and physical streams, or physical streams from different
9120      * physical cameras are not guaranteed. However, if the camera device supports
9121      * {@link ACameraDevice_isSessionConfigurationSupported },
9122      * application must be able to query whether a stream combination involving physical
9123      * streams is supported by calling
9124      * {@link ACameraDevice_isSessionConfigurationSupported }.</p>
9125      * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
9126      * camera in the system. For an application that switches between front and back cameras,
9127      * the recommendation is to switch between the first rear camera and the first front
9128      * camera in the list of supported camera devices.</p>
9129      * <p>This capability requires the camera device to support the following:</p>
9130      * <ul>
9131      * <li>The IDs of underlying physical cameras are returned via
9132      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getPhysicalCameraIds">CameraCharacteristics#getPhysicalCameraIds</a>.</li>
9133      * <li>This camera device must list static metadata
9134      *   ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE in
9135      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html">CameraCharacteristics</a>.</li>
9136      * <li>The underlying physical cameras' static metadata must list the following entries,
9137      *   so that the application can correlate pixels from the physical streams:<ul>
9138      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
9139      * <li>ACAMERA_LENS_POSE_ROTATION</li>
9140      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
9141      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
9142      * <li>ACAMERA_LENS_DISTORTION</li>
9143      * </ul>
9144      * </li>
9145      * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
9146      *   the same.</li>
9147      * <li>The logical camera must be LIMITED or higher device.</li>
9148      * </ul>
9149      * <p>A logical camera device's dynamic metadata may contain
9150      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID to notify the application of the current
9151      * active physical camera Id. An active physical camera is the physical camera from which
9152      * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
9153      * In addition, this serves as an indication which physical camera is used to output to
9154      * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
9155      * the application should request.</p>
9156      * <p>Logical camera's static metadata tags below describe the default active physical
9157      * camera. An active physical camera is default if it's used when application directly
9158      * uses requests built from a template. All templates will default to the same active
9159      * physical camera.</p>
9160      * <ul>
9161      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
9162      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
9163      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
9164      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
9165      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
9166      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
9167      * <li>ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED</li>
9168      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT1</li>
9169      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT2</li>
9170      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM1</li>
9171      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM2</li>
9172      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM1</li>
9173      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM2</li>
9174      * <li>ACAMERA_SENSOR_FORWARD_MATRIX1</li>
9175      * <li>ACAMERA_SENSOR_FORWARD_MATRIX2</li>
9176      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
9177      * <li>ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY</li>
9178      * <li>ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS</li>
9179      * <li>ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES</li>
9180      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
9181      * <li>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE</li>
9182      * <li>ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION</li>
9183      * <li>ACAMERA_LENS_POSE_ROTATION</li>
9184      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
9185      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
9186      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
9187      * <li>ACAMERA_LENS_DISTORTION</li>
9188      * </ul>
9189      * <p>The field of view of non-RAW physical streams must not be smaller than that of the
9190      * non-RAW logical streams, or the maximum field-of-view of the physical camera,
9191      * whichever is smaller. The application should check the physical capture result
9192      * metadata for how the physical streams are cropped or zoomed. More specifically, given
9193      * the physical camera result metadata, the effective horizontal field-of-view of the
9194      * physical camera is:</p>
9195      * <pre><code>fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength)
9196      * </code></pre>
9197      * <p>where the equation parameters are the physical camera's crop region width, physical
9198      * sensor width, zoom ratio, active array width, and focal length respectively. Typically
9199      * the physical stream of active physical camera has the same field-of-view as the
9200      * logical streams. However, the same may not be true for physical streams from
9201      * non-active physical cameras. For example, if the logical camera has a wide-ultrawide
9202      * configuration where the wide lens is the default, when the crop region is set to the
9203      * logical camera's active array size, (and the zoom ratio set to 1.0 starting from
9204      * Android 11), a physical stream for the ultrawide camera may prefer outputting images
9205      * with larger field-of-view than that of the wide camera for better stereo matching
9206      * margin or more robust motion tracking. At the same time, the physical non-RAW streams'
9207      * field of view must not be smaller than the requested crop region and zoom ratio, as
9208      * long as it's within the physical lens' capability. For example, for a logical camera
9209      * with wide-tele lens configuration where the wide lens is the default, if the logical
9210      * camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical
9211      * stream for the tele lens will be configured to its maximum size crop region (no zoom).</p>
9212      * <p><em>Deprecated:</em> Prior to Android 11, the field of view of all non-RAW physical streams
9213      * cannot be larger than that of non-RAW logical streams. If the logical camera has a
9214      * wide-ultrawide lens configuration where the wide lens is the default, when the logical
9215      * camera's crop region is set to maximum size, the FOV of the physical streams for the
9216      * ultrawide lens will be the same as the logical stream, by making the crop region
9217      * smaller than its active array size to compensate for the smaller focal length.</p>
9218      * <p>For a logical camera, typically the underlying physical cameras have different RAW
9219      * capabilities (such as resolution or CFA pattern). There are two ways for the
9220      * application to capture RAW images from the logical camera:</p>
9221      * <ul>
9222      * <li>If the logical camera has RAW capability, the application can create and use RAW
9223      * streams in the same way as before. In case a RAW stream is configured, to maintain
9224      * backward compatibility, the camera device makes sure the default active physical
9225      * camera remains active and does not switch to other physical cameras. (One exception
9226      * is that, if the logical camera consists of identical image sensors and advertises
9227      * multiple focalLength due to different lenses, the camera device may generate RAW
9228      * images from different physical cameras based on the focalLength being set by the
9229      * application.) This backward-compatible approach usually results in loss of optical
9230      * zoom, to telephoto lens or to ultrawide lens.</li>
9231      * <li>Alternatively, if supported by the device,
9232      * <a href="https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader.html">MultiResolutionImageReader</a>
9233      * can be used to capture RAW images from one of the underlying physical cameras (
9234      * depending on current zoom level). Because different physical cameras may have
9235      * different RAW characteristics, the application needs to use the characteristics
9236      * and result metadata of the active physical camera for the relevant RAW metadata.</li>
9237      * </ul>
9238      * <p>The capture request and result metadata tags required for backward compatible camera
9239      * functionalities will be solely based on the logical camera capability. On the other
9240      * hand, the use of manual capture controls (sensor or post-processing) with a
9241      * logical camera may result in unexpected behavior when the HAL decides to switch
9242      * between physical cameras with different characteristics under the hood. For example,
9243      * when the application manually sets exposure time and sensitivity while zooming in,
9244      * the brightness of the camera images may suddenly change because HAL switches from one
9245      * physical camera to the other.</p>
9246      *
9247      * @see ACAMERA_LENS_DISTORTION
9248      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
9249      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
9250      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
9251      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
9252      * @see ACAMERA_LENS_POSE_REFERENCE
9253      * @see ACAMERA_LENS_POSE_ROTATION
9254      * @see ACAMERA_LENS_POSE_TRANSLATION
9255      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
9256      * @see ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
9257      * @see ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES
9258      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
9259      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
9260      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
9261      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
9262      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
9263      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
9264      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
9265      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
9266      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
9267      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
9268      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
9269      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
9270      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
9271      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
9272      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
9273      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
9274      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
9275      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
9276      */
9277     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA      = 11,
9278 
9279     /**
9280      * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
9281      * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p>
9282      * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
9283      * its device level and capabilities. Additionally, if the monochrome camera device
9284      * supports Y8 format, all mandatory stream combination requirements related to {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888} apply
9285      * to {@link AIMAGE_FORMAT_Y8 Y8} as well. There are no
9286      * mandatory stream combination requirements with regard to
9287      * {@link AIMAGE_FORMAT_Y8 Y8} for Bayer camera devices.</p>
9288      * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
9289      * camera will be either MONO or NIR.</p>
9290      */
9291     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME                = 12,
9292 
9293     /**
9294      * <p>The camera device is capable of writing image data into a region of memory
9295      * inaccessible to Android userspace or the Android kernel, and only accessible to
9296      * trusted execution environments (TEE).</p>
9297      */
9298     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA         = 13,
9299 
9300     /**
9301      * <p>The camera device is only accessible by Android's system components and privileged
9302      * applications. Processes need to have the android.permission.SYSTEM_CAMERA in
9303      * addition to android.permission.CAMERA in order to connect to this camera device.</p>
9304      */
9305     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA             = 14,
9306 
9307     /**
9308      * <p>This camera device is capable of producing ultra high resolution images in
9309      * addition to the image sizes described in the
9310      * android.scaler.streamConfigurationMap.
9311      * It can operate in 'default' mode and 'max resolution' mode. It generally does this
9312      * by binning pixels in 'default' mode and not binning them in 'max resolution' mode.
9313      * <code>android.scaler.streamConfigurationMap</code> describes the streams supported in 'default'
9314      * mode.
9315      * The stream configurations supported in 'max resolution' mode are described by
9316      * <code>android.scaler.streamConfigurationMapMaximumResolution</code>.
9317      * The maximum resolution mode pixel array size of a camera device
9318      * (<code>ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE</code>) with this capability,
9319      * will be at least 24 megapixels.</p>
9320      *
9321      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
9322      */
9323     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR
9324                                                                       = 16,
9325 
9326     /**
9327      * <p>The camera device supports selecting a per-stream use case via
9328      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration.html#setStreamUseCase">OutputConfiguration#setStreamUseCase</a>
9329      * so that the device can optimize camera pipeline parameters such as tuning, sensor
9330      * mode, or ISP settings for a specific user scenario.
9331      * Some sample usages of this capability are:</p>
9332      * <ul>
9333      * <li>Distinguish high quality YUV captures from a regular YUV stream where
9334      *   the image quality may not be as good as the JPEG stream, or</li>
9335      * <li>Use one stream to serve multiple purposes: viewfinder, video recording and
9336      *   still capture. This is common with applications that wish to apply edits equally
9337      *   to preview, saved images, and saved videos.</li>
9338      * </ul>
9339      * <p>This capability requires the camera device to support the following
9340      * stream use cases:</p>
9341      * <ul>
9342      * <li>DEFAULT for backward compatibility where the application doesn't set
9343      *   a stream use case</li>
9344      * <li>PREVIEW for live viewfinder and in-app image analysis</li>
9345      * <li>STILL_CAPTURE for still photo capture</li>
9346      * <li>VIDEO_RECORD for recording video clips</li>
9347      * <li>PREVIEW_VIDEO_STILL for one single stream used for viewfinder, video
9348      *   recording, and still capture.</li>
9349      * <li>VIDEO_CALL for long running video calls</li>
9350      * </ul>
9351      * <p><a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#SCALER_AVAILABLE_STREAM_USE_CASES">CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES</a>
9352      * lists all of the supported stream use cases.</p>
9353      * <p>Refer to <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession">CameraDevice#createCaptureSession</a> for the
9354      * mandatory stream combinations involving stream use cases, which can also be queried
9355      * via <a href="https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.html">MandatoryStreamCombination</a>.</p>
9356      */
9357     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE           = 19,
9358 
9359 } acamera_metadata_enum_android_request_available_capabilities_t;
9360 
9361 // ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
9362 typedef enum acamera_metadata_enum_acamera_request_available_dynamic_range_profiles_map {
9363     /**
9364      * <p>8-bit SDR profile which is the default for all non 10-bit output capable devices.</p>
9365      */
9366     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD    = 0x1,
9367 
9368     /**
9369      * <p>10-bit pixel samples encoded using the Hybrid log-gamma transfer function.</p>
9370      */
9371     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10       = 0x2,
9372 
9373     /**
9374      * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.
9375      * This profile utilizes internal static metadata to increase the quality
9376      * of the capture.</p>
9377      */
9378     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10       = 0x4,
9379 
9380     /**
9381      * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.
9382      * In contrast to HDR10, this profile uses internal per-frame metadata
9383      * to further enhance the quality of the capture.</p>
9384      */
9385     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS  = 0x8,
9386 
9387     /**
9388      * <p>This is a camera mode for Dolby Vision capture optimized for a more scene
9389      * accurate capture. This would typically differ from what a specific device
9390      * might want to tune for a consumer optimized Dolby Vision general capture.</p>
9391      */
9392     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF
9393                                                                       = 0x10,
9394 
9395     /**
9396      * <p>This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.</p>
9397      */
9398     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO
9399                                                                       = 0x20,
9400 
9401     /**
9402      * <p>This is the camera mode for the default Dolby Vision capture mode for the
9403      * specific device. This would be tuned by each specific device for consumer
9404      * pleasing results that resonate with their particular audience. We expect
9405      * that each specific device would have a different look for their default
9406      * Dolby Vision capture.</p>
9407      */
9408     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM
9409                                                                       = 0x40,
9410 
9411     /**
9412      * <p>This is the power optimized mode for 10-bit Dolby Vision HDR device specific
9413      * capture Mode.</p>
9414      */
9415     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO
9416                                                                       = 0x80,
9417 
9418     /**
9419      * <p>This is the 8-bit version of the Dolby Vision reference capture mode optimized
9420      * for scene accuracy.</p>
9421      */
9422     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF
9423                                                                       = 0x100,
9424 
9425     /**
9426      * <p>This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.</p>
9427      */
9428     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO
9429                                                                       = 0x200,
9430 
9431     /**
9432      * <p>This is the 8-bit version of device specific tuned and optimized Dolby Vision
9433      * capture mode.</p>
9434      */
9435     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM
9436                                                                       = 0x400,
9437 
9438     /**
9439      * <p>This is the power optimized mode for 8-bit Dolby Vision HDR device specific
9440      * capture Mode.</p>
9441      */
9442     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO
9443                                                                       = 0x800,
9444 
9445     /**
9446      *
9447      */
9448     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX         = 0x1000,
9449 
9450 } acamera_metadata_enum_android_request_available_dynamic_range_profiles_map_t;
9451 
9452 
9453 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
9454 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations {
9455     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT            = 0,
9456 
9457     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT             = 1,
9458 
9459 } acamera_metadata_enum_android_scaler_available_stream_configurations_t;
9460 
9461 // ACAMERA_SCALER_CROPPING_TYPE
9462 typedef enum acamera_metadata_enum_acamera_scaler_cropping_type {
9463     /**
9464      * <p>The camera device only supports centered crop regions.</p>
9465      */
9466     ACAMERA_SCALER_CROPPING_TYPE_CENTER_ONLY                         = 0,
9467 
9468     /**
9469      * <p>The camera device supports arbitrarily chosen crop regions.</p>
9470      */
9471     ACAMERA_SCALER_CROPPING_TYPE_FREEFORM                            = 1,
9472 
9473 } acamera_metadata_enum_android_scaler_cropping_type_t;
9474 
9475 // ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
9476 typedef enum acamera_metadata_enum_acamera_scaler_available_recommended_stream_configurations {
9477     /**
9478      * <p>Preview must only include non-stalling processed stream configurations with
9479      * output formats like
9480      * {@link AIMAGE_FORMAT_YUV_420_888 },
9481      * {@link AIMAGE_FORMAT_PRIVATE }, etc.</p>
9482      */
9483     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW
9484                                                                       = 0x0,
9485 
9486     /**
9487      * <p>Video record must include stream configurations that match the advertised
9488      * supported media profiles <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> with
9489      * IMPLEMENTATION_DEFINED format.</p>
9490      */
9491     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD
9492                                                                       = 0x1,
9493 
9494     /**
9495      * <p>Video snapshot must include stream configurations at least as big as
9496      * the maximum RECORD resolutions and only with
9497      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
9498      * Additionally the configurations shouldn't cause preview glitches and also be able to
9499      * run at 30 fps.</p>
9500      */
9501     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT
9502                                                                       = 0x2,
9503 
9504     /**
9505      * <p>Recommended snapshot stream configurations must include at least one with
9506      * size close to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE and
9507      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
9508      * Taking into account restrictions on aspect ratio, alignment etc. the area of the
9509      * maximum suggested size shouldn’t be less than 97% of the sensor array size area.</p>
9510      *
9511      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
9512      */
9513     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT
9514                                                                       = 0x3,
9515 
9516     /**
9517      * <p>If supported, recommended input stream configurations must only be advertised with
9518      * ZSL along with other processed and/or stalling output formats.</p>
9519      */
9520     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL   = 0x4,
9521 
9522     /**
9523      * <p>If supported, recommended raw stream configurations must only include RAW based
9524      * output formats.</p>
9525      */
9526     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW   = 0x5,
9527 
9528     /**
9529      * <p>If supported, the recommended low latency stream configurations must have
9530      * end-to-end latency that does not exceed 200 ms. under standard operating conditions
9531      * (reasonable light levels, not loaded system) and using template
9532      * TEMPLATE_STILL_CAPTURE. This is primarily for listing configurations for the
9533      * {@link AIMAGE_FORMAT_JPEG JPEG output format}
9534      * however other supported output formats can be added as well.</p>
9535      */
9536     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT
9537                                                                       = 0x6,
9538 
9539     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END
9540                                                                       = 0x7,
9541 
9542     /**
9543      * <p>If supported, the recommended 10-bit output stream configurations must include
9544      * a subset of the advertised <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#YCBCR_P010">ImageFormat#YCBCR_P010</a> and
9545      * <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#PRIVATE">ImageFormat#PRIVATE</a> outputs that are optimized for power
9546      * and performance when registered along with a supported 10-bit dynamic range profile.
9547      * see android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile for
9548      * details.</p>
9549      */
9550     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_10BIT_OUTPUT
9551                                                                       = 0x8,
9552 
9553     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END_3_8
9554                                                                       = 0x9,
9555 
9556     /**
9557      * <p>Vendor defined use cases. These depend on the vendor implementation.</p>
9558      */
9559     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START
9560                                                                       = 0x18,
9561 
9562 } acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t;
9563 
9564 // ACAMERA_SCALER_ROTATE_AND_CROP
9565 typedef enum acamera_metadata_enum_acamera_scaler_rotate_and_crop {
9566     /**
9567      * <p>No rotate and crop is applied. Processed outputs are in the sensor orientation.</p>
9568      */
9569     ACAMERA_SCALER_ROTATE_AND_CROP_NONE                              = 0,
9570 
9571     /**
9572      * <p>Processed images are rotated by 90 degrees clockwise, and then cropped
9573      * to the original aspect ratio.</p>
9574      */
9575     ACAMERA_SCALER_ROTATE_AND_CROP_90                                = 1,
9576 
9577     /**
9578      * <p>Processed images are rotated by 180 degrees.  Since the aspect ratio does not
9579      * change, no cropping is performed.</p>
9580      */
9581     ACAMERA_SCALER_ROTATE_AND_CROP_180                               = 2,
9582 
9583     /**
9584      * <p>Processed images are rotated by 270 degrees clockwise, and then cropped
9585      * to the original aspect ratio.</p>
9586      */
9587     ACAMERA_SCALER_ROTATE_AND_CROP_270                               = 3,
9588 
9589     /**
9590      * <p>The camera API automatically selects the best concrete value for
9591      * rotate-and-crop based on the application's support for resizability and the current
9592      * multi-window mode.</p>
9593      * <p>If the application does not support resizing but the display mode for its main
9594      * Activity is not in a typical orientation, the camera API will set <code>ROTATE_AND_CROP_90</code>
9595      * or some other supported rotation value, depending on device configuration,
9596      * to ensure preview and captured images are correctly shown to the user. Otherwise,
9597      * <code>ROTATE_AND_CROP_NONE</code> will be selected.</p>
9598      * <p>When a value other than NONE is selected, several metadata fields will also be parsed
9599      * differently to ensure that coordinates are correctly handled for features like drawing
9600      * face detection boxes or passing in tap-to-focus coordinates.  The camera API will
9601      * convert positions in the active array coordinate system to/from the cropped-and-rotated
9602      * coordinate system to make the operation transparent for applications.</p>
9603      * <p>No coordinate mapping will be done when the application selects a non-AUTO mode.</p>
9604      */
9605     ACAMERA_SCALER_ROTATE_AND_CROP_AUTO                              = 4,
9606 
9607 } acamera_metadata_enum_android_scaler_rotate_and_crop_t;
9608 
9609 // ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
9610 typedef enum acamera_metadata_enum_acamera_scaler_physical_camera_multi_resolution_stream_configurations {
9611     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT
9612                                                                       = 0,
9613 
9614     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT
9615                                                                       = 1,
9616 
9617 } acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t;
9618 
9619 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
9620 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations_maximum_resolution {
9621     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
9622                                                                       = 0,
9623 
9624     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
9625                                                                       = 1,
9626 
9627 } acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t;
9628 
9629 // ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED
9630 typedef enum acamera_metadata_enum_acamera_scaler_multi_resolution_stream_supported {
9631     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE           = 0,
9632 
9633     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE            = 1,
9634 
9635 } acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t;
9636 
9637 // ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES
9638 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_use_cases {
9639     /**
9640      * <p>Default stream use case.</p>
9641      * <p>This use case is the same as when the application doesn't set any use case for
9642      * the stream. The camera device uses the properties of the output target, such as
9643      * format, dataSpace, or surface class type, to optimize the image processing pipeline.</p>
9644      */
9645     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT                = 0x0,
9646 
9647     /**
9648      * <p>Live stream shown to the user.</p>
9649      * <p>Optimized for performance and usability as a viewfinder, but not necessarily for
9650      * image quality. The output is not meant to be persisted as saved images or video.</p>
9651      * <p>No stall if ACAMERA_CONTROL_* are set to FAST. There may be stall if
9652      * they are set to HIGH_QUALITY. This use case has the same behavior as the
9653      * default SurfaceView and SurfaceTexture targets. Additionally, this use case can be
9654      * used for in-app image analysis.</p>
9655      */
9656     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW                = 0x1,
9657 
9658     /**
9659      * <p>Still photo capture.</p>
9660      * <p>Optimized for high-quality high-resolution capture, and not expected to maintain
9661      * preview-like frame rates.</p>
9662      * <p>The stream may have stalls regardless of whether ACAMERA_CONTROL_* is HIGH_QUALITY.
9663      * This use case has the same behavior as the default JPEG and RAW related formats.</p>
9664      */
9665     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE          = 0x2,
9666 
9667     /**
9668      * <p>Recording video clips.</p>
9669      * <p>Optimized for high-quality video capture, including high-quality image stabilization
9670      * if supported by the device and enabled by the application. As a result, may produce
9671      * output frames with a substantial lag from real time, to allow for highest-quality
9672      * stabilization or other processing. As such, such an output is not suitable for drawing
9673      * to screen directly, and is expected to be persisted to disk or similar for later
9674      * playback or processing. Only streams that set the VIDEO_RECORD use case are guaranteed
9675      * to have video stabilization applied when the video stabilization control is set
9676      * to ON, as opposed to PREVIEW_STABILIZATION.</p>
9677      * <p>This use case has the same behavior as the default MediaRecorder and MediaCodec
9678      * targets.</p>
9679      */
9680     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD           = 0x3,
9681 
9682     /**
9683      * <p>One single stream used for combined purposes of preview, video, and still capture.</p>
9684      * <p>For such multi-purpose streams, the camera device aims to make the best tradeoff
9685      * between the individual use cases. For example, the STILL_CAPTURE use case by itself
9686      * may have stalls for achieving best image quality. But if combined with PREVIEW and
9687      * VIDEO_RECORD, the camera device needs to trade off the additional image processing
9688      * for speed so that preview and video recording aren't slowed down.</p>
9689      * <p>Similarly, VIDEO_RECORD may produce frames with a substantial lag, but
9690      * PREVIEW_VIDEO_STILL must have minimal output delay. This means that to enable video
9691      * stabilization with this use case, the device must support and the app must select the
9692      * PREVIEW_STABILIZATION mode for video stabilization.</p>
9693      */
9694     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL    = 0x4,
9695 
9696     /**
9697      * <p>Long-running video call optimized for both power efficiency and video quality.</p>
9698      * <p>The camera sensor may run in a lower-resolution mode to reduce power consumption
9699      * at the cost of some image and digital zoom quality. Unlike VIDEO_RECORD, VIDEO_CALL
9700      * outputs are expected to work in dark conditions, so are usually accompanied with
9701      * variable frame rate settings to allow sufficient exposure time in low light.</p>
9702      */
9703     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL             = 0x5,
9704 
9705 } acamera_metadata_enum_android_scaler_available_stream_use_cases_t;
9706 
9707 
9708 // ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
9709 typedef enum acamera_metadata_enum_acamera_sensor_reference_illuminant1 {
9710     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT                    = 1,
9711 
9712     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT                 = 2,
9713 
9714     /**
9715      * <p>Incandescent light</p>
9716      */
9717     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN                    = 3,
9718 
9719     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLASH                       = 4,
9720 
9721     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER                = 9,
9722 
9723     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER              = 10,
9724 
9725     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_SHADE                       = 11,
9726 
9727     /**
9728      * <p>D 5700 - 7100K</p>
9729      */
9730     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT        = 12,
9731 
9732     /**
9733      * <p>N 4600 - 5400K</p>
9734      */
9735     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT       = 13,
9736 
9737     /**
9738      * <p>W 3900 - 4500K</p>
9739      */
9740     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT      = 14,
9741 
9742     /**
9743      * <p>WW 3200 - 3700K</p>
9744      */
9745     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT           = 15,
9746 
9747     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A                  = 17,
9748 
9749     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B                  = 18,
9750 
9751     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C                  = 19,
9752 
9753     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D55                         = 20,
9754 
9755     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D65                         = 21,
9756 
9757     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D75                         = 22,
9758 
9759     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D50                         = 23,
9760 
9761     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN         = 24,
9762 
9763 } acamera_metadata_enum_android_sensor_reference_illuminant1_t;
9764 
9765 // ACAMERA_SENSOR_TEST_PATTERN_MODE
9766 typedef enum acamera_metadata_enum_acamera_sensor_test_pattern_mode {
9767     /**
9768      * <p>No test pattern mode is used, and the camera
9769      * device returns captures from the image sensor.</p>
9770      * <p>This is the default if the key is not set.</p>
9771      */
9772     ACAMERA_SENSOR_TEST_PATTERN_MODE_OFF                             = 0,
9773 
9774     /**
9775      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
9776      * respective color channel provided in
9777      * ACAMERA_SENSOR_TEST_PATTERN_DATA.</p>
9778      * <p>For example:</p>
9779      * <pre><code>ACAMERA_SENSOR_TEST_PATTERN_DATA = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
9780      * </code></pre>
9781      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
9782      * <pre><code>ACAMERA_SENSOR_TEST_PATTERN_DATA = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
9783      * </code></pre>
9784      * <p>All red pixels are 100% red. Only the odd green pixels
9785      * are 100% green. All blue pixels are 100% black.</p>
9786      *
9787      * @see ACAMERA_SENSOR_TEST_PATTERN_DATA
9788      */
9789     ACAMERA_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR                     = 1,
9790 
9791     /**
9792      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
9793      * <p>The vertical bars (left-to-right) are as follows:</p>
9794      * <ul>
9795      * <li>100% white</li>
9796      * <li>yellow</li>
9797      * <li>cyan</li>
9798      * <li>green</li>
9799      * <li>magenta</li>
9800      * <li>red</li>
9801      * <li>blue</li>
9802      * <li>black</li>
9803      * </ul>
9804      * <p>In general the image would look like the following:</p>
9805      * <pre><code>W Y C G M R B K
9806      * W Y C G M R B K
9807      * W Y C G M R B K
9808      * W Y C G M R B K
9809      * W Y C G M R B K
9810      * . . . . . . . .
9811      * . . . . . . . .
9812      * . . . . . . . .
9813      *
9814      * (B = Blue, K = Black)
9815      * </code></pre>
9816      * <p>Each bar should take up 1/8 of the sensor pixel array width.
9817      * When this is not possible, the bar size should be rounded
9818      * down to the nearest integer and the pattern can repeat
9819      * on the right side.</p>
9820      * <p>Each bar's height must always take up the full sensor
9821      * pixel array height.</p>
9822      * <p>Each pixel in this test pattern must be set to either
9823      * 0% intensity or 100% intensity.</p>
9824      */
9825     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS                      = 2,
9826 
9827     /**
9828      * <p>The test pattern is similar to COLOR_BARS, except that
9829      * each bar should start at its specified color at the top,
9830      * and fade to gray at the bottom.</p>
9831      * <p>Furthermore each bar is further subdivided into a left and
9832      * right half. The left half should have a smooth gradient,
9833      * and the right half should have a quantized gradient.</p>
9834      * <p>In particular, the right half's should consist of blocks of the
9835      * same color for 1/16th active sensor pixel array width.</p>
9836      * <p>The least significant bits in the quantized gradient should
9837      * be copied from the most significant bits of the smooth gradient.</p>
9838      * <p>The height of each bar should always be a multiple of 128.
9839      * When this is not the case, the pattern should repeat at the bottom
9840      * of the image.</p>
9841      */
9842     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY         = 3,
9843 
9844     /**
9845      * <p>All pixel data is replaced by a pseudo-random sequence
9846      * generated from a PN9 512-bit sequence (typically implemented
9847      * in hardware with a linear feedback shift register).</p>
9848      * <p>The generator should be reset at the beginning of each frame,
9849      * and thus each subsequent raw frame with this test pattern should
9850      * be exactly the same as the last.</p>
9851      */
9852     ACAMERA_SENSOR_TEST_PATTERN_MODE_PN9                             = 4,
9853 
9854     /**
9855      * <p>The first custom test pattern. All custom patterns that are
9856      * available only on this camera device are at least this numeric
9857      * value.</p>
9858      * <p>All of the custom test patterns will be static
9859      * (that is the raw image must not vary from frame to frame).</p>
9860      */
9861     ACAMERA_SENSOR_TEST_PATTERN_MODE_CUSTOM1                         = 256,
9862 
9863 } acamera_metadata_enum_android_sensor_test_pattern_mode_t;
9864 
9865 // ACAMERA_SENSOR_PIXEL_MODE
9866 typedef enum acamera_metadata_enum_acamera_sensor_pixel_mode {
9867     /**
9868      * <p>This is the default sensor pixel mode. This is the only sensor pixel mode
9869      * supported unless a camera device advertises
9870      * <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>
9871      */
9872     ACAMERA_SENSOR_PIXEL_MODE_DEFAULT                                = 0,
9873 
9874     /**
9875      * <p>This sensor pixel mode is offered by devices with capability
9876      * <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>.
9877      * In this mode, sensors typically do not bin pixels, as a result can offer larger
9878      * image sizes.</p>
9879      */
9880     ACAMERA_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION                     = 1,
9881 
9882 } acamera_metadata_enum_android_sensor_pixel_mode_t;
9883 
9884 // ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED
9885 typedef enum acamera_metadata_enum_acamera_sensor_raw_binning_factor_used {
9886     /**
9887      * <p>The <code>RAW</code> targets in this capture have ACAMERA_SENSOR_INFO_BINNING_FACTOR as the
9888      * bayer pattern.</p>
9889      *
9890      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
9891      */
9892     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED_TRUE                      = 0,
9893 
9894     /**
9895      * <p>The <code>RAW</code> targets have a regular bayer pattern in this capture.</p>
9896      */
9897     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED_FALSE                     = 1,
9898 
9899 } acamera_metadata_enum_android_sensor_raw_binning_factor_used_t;
9900 
9901 
9902 // ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
9903 typedef enum acamera_metadata_enum_acamera_sensor_info_color_filter_arrangement {
9904     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB                = 0,
9905 
9906     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG                = 1,
9907 
9908     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG                = 2,
9909 
9910     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR                = 3,
9911 
9912     /**
9913      * <p>Sensor is not Bayer; output has 3 16-bit
9914      * values for each pixel, instead of just 1 16-bit value
9915      * per pixel.</p>
9916      */
9917     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB                 = 4,
9918 
9919     /**
9920      * <p>Sensor doesn't have any Bayer color filter.
9921      * Such sensor captures visible light in monochrome. The exact weighting and
9922      * wavelengths captured is not specified, but generally only includes the visible
9923      * frequencies. This value implies a MONOCHROME camera.</p>
9924      */
9925     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO                = 5,
9926 
9927     /**
9928      * <p>Sensor has a near infrared filter capturing light with wavelength between
9929      * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
9930      * value implies a MONOCHROME camera.</p>
9931      */
9932     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR                 = 6,
9933 
9934 } acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
9935 
9936 // ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
9937 typedef enum acamera_metadata_enum_acamera_sensor_info_timestamp_source {
9938     /**
9939      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in nanoseconds and monotonic, but can
9940      * not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.),
9941      * or other instances of the same or different camera devices in the same system with
9942      * accuracy. However, the timestamps are roughly in the same timebase as
9943      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#uptimeMillis">SystemClock#uptimeMillis</a>.  The accuracy is sufficient for tasks
9944      * like A/V synchronization for video recording, at least, and the timestamps can be
9945      * directly used together with timestamps from the audio subsystem for that task.</p>
9946      * <p>Timestamps between streams and results for a single camera instance are comparable,
9947      * and the timestamps for all buffers and the result metadata generated by a single
9948      * capture are identical.</p>
9949      *
9950      * @see ACAMERA_SENSOR_TIMESTAMP
9951      */
9952     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN                     = 0,
9953 
9954     /**
9955      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in the same timebase as
9956      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">SystemClock#elapsedRealtimeNanos</a>,
9957      * and they can be compared to other timestamps using that base.</p>
9958      * <p>When buffers from a REALTIME device are passed directly to a video encoder from the
9959      * camera, automatic compensation is done to account for differing timebases of the
9960      * audio and camera subsystems.  If the application is receiving buffers and then later
9961      * sending them to a video encoder or other application where they are compared with
9962      * audio subsystem timestamps or similar, this compensation is not present.  In those
9963      * 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
9964      * offset between the two sources can be measured once per active session and applied
9965      * to timestamps for sufficient accuracy for A/V sync.</p>
9966      *
9967      * @see ACAMERA_SENSOR_TIMESTAMP
9968      */
9969     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME                    = 1,
9970 
9971 } acamera_metadata_enum_android_sensor_info_timestamp_source_t;
9972 
9973 // ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
9974 typedef enum acamera_metadata_enum_acamera_sensor_info_lens_shading_applied {
9975     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE                   = 0,
9976 
9977     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE                    = 1,
9978 
9979 } acamera_metadata_enum_android_sensor_info_lens_shading_applied_t;
9980 
9981 
9982 // ACAMERA_SHADING_MODE
9983 typedef enum acamera_metadata_enum_acamera_shading_mode {
9984     /**
9985      * <p>No lens shading correction is applied.</p>
9986      */
9987     ACAMERA_SHADING_MODE_OFF                                         = 0,
9988 
9989     /**
9990      * <p>Apply lens shading corrections, without slowing
9991      * frame rate relative to sensor raw output</p>
9992      */
9993     ACAMERA_SHADING_MODE_FAST                                        = 1,
9994 
9995     /**
9996      * <p>Apply high-quality lens shading correction, at the
9997      * cost of possibly reduced frame rate.</p>
9998      */
9999     ACAMERA_SHADING_MODE_HIGH_QUALITY                                = 2,
10000 
10001 } acamera_metadata_enum_android_shading_mode_t;
10002 
10003 
10004 // ACAMERA_STATISTICS_FACE_DETECT_MODE
10005 typedef enum acamera_metadata_enum_acamera_statistics_face_detect_mode {
10006     /**
10007      * <p>Do not include face detection statistics in capture
10008      * results.</p>
10009      */
10010     ACAMERA_STATISTICS_FACE_DETECT_MODE_OFF                          = 0,
10011 
10012     /**
10013      * <p>Return face rectangle and confidence values only.</p>
10014      */
10015     ACAMERA_STATISTICS_FACE_DETECT_MODE_SIMPLE                       = 1,
10016 
10017     /**
10018      * <p>Return all face
10019      * metadata.</p>
10020      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
10021      */
10022     ACAMERA_STATISTICS_FACE_DETECT_MODE_FULL                         = 2,
10023 
10024 } acamera_metadata_enum_android_statistics_face_detect_mode_t;
10025 
10026 // ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
10027 typedef enum acamera_metadata_enum_acamera_statistics_hot_pixel_map_mode {
10028     /**
10029      * <p>Hot pixel map production is disabled.</p>
10030      */
10031     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_OFF                        = 0,
10032 
10033     /**
10034      * <p>Hot pixel map production is enabled.</p>
10035      */
10036     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_ON                         = 1,
10037 
10038 } acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t;
10039 
10040 // ACAMERA_STATISTICS_SCENE_FLICKER
10041 typedef enum acamera_metadata_enum_acamera_statistics_scene_flicker {
10042     /**
10043      * <p>The camera device does not detect any flickering illumination
10044      * in the current scene.</p>
10045      */
10046     ACAMERA_STATISTICS_SCENE_FLICKER_NONE                            = 0,
10047 
10048     /**
10049      * <p>The camera device detects illumination flickering at 50Hz
10050      * in the current scene.</p>
10051      */
10052     ACAMERA_STATISTICS_SCENE_FLICKER_50HZ                            = 1,
10053 
10054     /**
10055      * <p>The camera device detects illumination flickering at 60Hz
10056      * in the current scene.</p>
10057      */
10058     ACAMERA_STATISTICS_SCENE_FLICKER_60HZ                            = 2,
10059 
10060 } acamera_metadata_enum_android_statistics_scene_flicker_t;
10061 
10062 // ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
10063 typedef enum acamera_metadata_enum_acamera_statistics_lens_shading_map_mode {
10064     /**
10065      * <p>Do not include a lens shading map in the capture result.</p>
10066      */
10067     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_OFF                     = 0,
10068 
10069     /**
10070      * <p>Include a lens shading map in the capture result.</p>
10071      */
10072     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_ON                      = 1,
10073 
10074 } acamera_metadata_enum_android_statistics_lens_shading_map_mode_t;
10075 
10076 // ACAMERA_STATISTICS_OIS_DATA_MODE
10077 typedef enum acamera_metadata_enum_acamera_statistics_ois_data_mode {
10078     /**
10079      * <p>Do not include OIS data in the capture result.</p>
10080      */
10081     ACAMERA_STATISTICS_OIS_DATA_MODE_OFF                             = 0,
10082 
10083     /**
10084      * <p>Include OIS data in the capture result.</p>
10085      * <p>ACAMERA_STATISTICS_OIS_TIMESTAMPS, ACAMERA_STATISTICS_OIS_X_SHIFTS,
10086      * and ACAMERA_STATISTICS_OIS_Y_SHIFTS provide OIS data in the output result metadata.</p>
10087      *
10088      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
10089      * @see ACAMERA_STATISTICS_OIS_X_SHIFTS
10090      * @see ACAMERA_STATISTICS_OIS_Y_SHIFTS
10091      */
10092     ACAMERA_STATISTICS_OIS_DATA_MODE_ON                              = 1,
10093 
10094 } acamera_metadata_enum_android_statistics_ois_data_mode_t;
10095 
10096 
10097 
10098 // ACAMERA_TONEMAP_MODE
10099 typedef enum acamera_metadata_enum_acamera_tonemap_mode {
10100     /**
10101      * <p>Use the tone mapping curve specified in
10102      * the ACAMERA_TONEMAPCURVE_* entries.</p>
10103      * <p>All color enhancement and tonemapping must be disabled, except
10104      * for applying the tonemapping curve specified by
10105      * android.tonemap.curve.</p>
10106      * <p>Must not slow down frame rate relative to raw
10107      * sensor output.</p>
10108      */
10109     ACAMERA_TONEMAP_MODE_CONTRAST_CURVE                              = 0,
10110 
10111     /**
10112      * <p>Advanced gamma mapping and color enhancement may be applied, without
10113      * reducing frame rate compared to raw sensor output.</p>
10114      */
10115     ACAMERA_TONEMAP_MODE_FAST                                        = 1,
10116 
10117     /**
10118      * <p>High-quality gamma mapping and color enhancement will be applied, at
10119      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
10120      */
10121     ACAMERA_TONEMAP_MODE_HIGH_QUALITY                                = 2,
10122 
10123     /**
10124      * <p>Use the gamma value specified in ACAMERA_TONEMAP_GAMMA to perform
10125      * tonemapping.</p>
10126      * <p>All color enhancement and tonemapping must be disabled, except
10127      * for applying the tonemapping curve specified by ACAMERA_TONEMAP_GAMMA.</p>
10128      * <p>Must not slow down frame rate relative to raw sensor output.</p>
10129      *
10130      * @see ACAMERA_TONEMAP_GAMMA
10131      */
10132     ACAMERA_TONEMAP_MODE_GAMMA_VALUE                                 = 3,
10133 
10134     /**
10135      * <p>Use the preset tonemapping curve specified in
10136      * ACAMERA_TONEMAP_PRESET_CURVE to perform tonemapping.</p>
10137      * <p>All color enhancement and tonemapping must be disabled, except
10138      * for applying the tonemapping curve specified by
10139      * ACAMERA_TONEMAP_PRESET_CURVE.</p>
10140      * <p>Must not slow down frame rate relative to raw sensor output.</p>
10141      *
10142      * @see ACAMERA_TONEMAP_PRESET_CURVE
10143      */
10144     ACAMERA_TONEMAP_MODE_PRESET_CURVE                                = 4,
10145 
10146 } acamera_metadata_enum_android_tonemap_mode_t;
10147 
10148 // ACAMERA_TONEMAP_PRESET_CURVE
10149 typedef enum acamera_metadata_enum_acamera_tonemap_preset_curve {
10150     /**
10151      * <p>Tonemapping curve is defined by sRGB</p>
10152      */
10153     ACAMERA_TONEMAP_PRESET_CURVE_SRGB                                = 0,
10154 
10155     /**
10156      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
10157      */
10158     ACAMERA_TONEMAP_PRESET_CURVE_REC709                              = 1,
10159 
10160 } acamera_metadata_enum_android_tonemap_preset_curve_t;
10161 
10162 
10163 
10164 // ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
10165 typedef enum acamera_metadata_enum_acamera_info_supported_hardware_level {
10166     /**
10167      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
10168      * better.</p>
10169      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code> tables in the
10170      * {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
10171      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
10172      * support for color image capture. The only exception is that the device may
10173      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
10174      * measurements and not color images.</p>
10175      * <p><code>LIMITED</code> devices and above require the use of ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
10176      * to lock exposure metering (and calculate flash power, for cameras with flash) before
10177      * capturing a high-quality still image.</p>
10178      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
10179      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
10180      * supported for ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AF_MODE, or
10181      * ACAMERA_CONTROL_AWB_MODE)</p>
10182      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
10183      * can be checked for in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
10184      *
10185      * @see ACAMERA_CONTROL_AE_MODE
10186      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
10187      * @see ACAMERA_CONTROL_AF_MODE
10188      * @see ACAMERA_CONTROL_AWB_MODE
10189      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
10190      */
10191     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED                    = 0,
10192 
10193     /**
10194      * <p>This camera device is capable of supporting advanced imaging applications.</p>
10195      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code> tables in the
10196      * {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
10197      * <p>A <code>FULL</code> device will support below capabilities:</p>
10198      * <ul>
10199      * <li><code>BURST_CAPTURE</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
10200      *   <code>BURST_CAPTURE</code>)</li>
10201      * <li>Per frame control (ACAMERA_SYNC_MAX_LATENCY <code>==</code> PER_FRAME_CONTROL)</li>
10202      * <li>Manual sensor control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains <code>MANUAL_SENSOR</code>)</li>
10203      * <li>Manual post-processing control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
10204      *   <code>MANUAL_POST_PROCESSING</code>)</li>
10205      * <li>The required exposure time range defined in ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
10206      * <li>The required maxFrameDuration defined in ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
10207      * </ul>
10208      * <p>Note:
10209      * Pre-API level 23, FULL devices also supported arbitrary cropping region
10210      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>); this requirement was relaxed in API level
10211      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
10212      *
10213      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
10214      * @see ACAMERA_SCALER_CROPPING_TYPE
10215      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
10216      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
10217      * @see ACAMERA_SYNC_MAX_LATENCY
10218      */
10219     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_FULL                       = 1,
10220 
10221     /**
10222      * <p>This camera device is running in backward compatibility mode.</p>
10223      * <p>Only the stream configurations listed in the <code>LEGACY</code> table in the {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are supported.</p>
10224      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
10225      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
10226      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
10227      * <code>LEGACY</code> device in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
10228      * <p>In addition, the ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is not functional on <code>LEGACY</code>
10229      * devices. Instead, every request that includes a JPEG-format output target is treated
10230      * as triggering a still capture, internally executing a precapture trigger.  This may
10231      * fire the flash for flash power metering during precapture, and then fire the flash
10232      * for the final capture, if a flash is available on the device and the AE mode is set to
10233      * enable the flash.</p>
10234      * <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>
10235      *
10236      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
10237      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
10238      */
10239     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY                     = 2,
10240 
10241     /**
10242      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
10243      * FULL-level capabilities.</p>
10244      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
10245      * <code>LIMITED</code> tables in the {@link ACameraDevice_createCaptureSession createCaptureSession} documentation are guaranteed to be supported.</p>
10246      * <p>The following additional capabilities are guaranteed to be supported:</p>
10247      * <ul>
10248      * <li><code>YUV_REPROCESSING</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
10249      *   <code>YUV_REPROCESSING</code>)</li>
10250      * <li><code>RAW</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
10251      *   <code>RAW</code>)</li>
10252      * </ul>
10253      *
10254      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
10255      */
10256     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_3                          = 3,
10257 
10258     /**
10259      * <p>This camera device is backed by an external camera connected to this Android device.</p>
10260      * <p>The device has capability identical to a LIMITED level device, with the following
10261      * exceptions:</p>
10262      * <ul>
10263      * <li>The device may not report lens/sensor related information such as<ul>
10264      * <li>ACAMERA_LENS_FOCAL_LENGTH</li>
10265      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
10266      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
10267      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
10268      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
10269      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
10270      * <li>ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW</li>
10271      * </ul>
10272      * </li>
10273      * <li>The device will report 0 for ACAMERA_SENSOR_ORIENTATION</li>
10274      * <li>The device has less guarantee on stable framerate, as the framerate partly depends
10275      *   on the external camera being used.</li>
10276      * </ul>
10277      *
10278      * @see ACAMERA_LENS_FOCAL_LENGTH
10279      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
10280      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
10281      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
10282      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
10283      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
10284      * @see ACAMERA_SENSOR_ORIENTATION
10285      * @see ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW
10286      */
10287     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL                   = 4,
10288 
10289 } acamera_metadata_enum_android_info_supported_hardware_level_t;
10290 
10291 
10292 // ACAMERA_BLACK_LEVEL_LOCK
10293 typedef enum acamera_metadata_enum_acamera_black_level_lock {
10294     ACAMERA_BLACK_LEVEL_LOCK_OFF                                     = 0,
10295 
10296     ACAMERA_BLACK_LEVEL_LOCK_ON                                      = 1,
10297 
10298 } acamera_metadata_enum_android_black_level_lock_t;
10299 
10300 
10301 // ACAMERA_SYNC_FRAME_NUMBER
10302 typedef enum acamera_metadata_enum_acamera_sync_frame_number {
10303     /**
10304      * <p>The current result is not yet fully synchronized to any request.</p>
10305      * <p>Synchronization is in progress, and reading metadata from this
10306      * result may include a mix of data that have taken effect since the
10307      * last synchronization time.</p>
10308      * <p>In some future result, within ACAMERA_SYNC_MAX_LATENCY frames,
10309      * this value will update to the actual frame number frame number
10310      * the result is guaranteed to be synchronized to (as long as the
10311      * request settings remain constant).</p>
10312      *
10313      * @see ACAMERA_SYNC_MAX_LATENCY
10314      */
10315     ACAMERA_SYNC_FRAME_NUMBER_CONVERGING                             = -1,
10316 
10317     /**
10318      * <p>The current result's synchronization status is unknown.</p>
10319      * <p>The result may have already converged, or it may be in
10320      * progress.  Reading from this result may include some mix
10321      * of settings from past requests.</p>
10322      * <p>After a settings change, the new settings will eventually all
10323      * take effect for the output buffers and results. However, this
10324      * value will not change when that happens. Altering settings
10325      * rapidly may provide outcomes using mixes of settings from recent
10326      * requests.</p>
10327      * <p>This value is intended primarily for backwards compatibility with
10328      * the older camera implementations (for android.hardware.Camera).</p>
10329      */
10330     ACAMERA_SYNC_FRAME_NUMBER_UNKNOWN                                = -2,
10331 
10332 } acamera_metadata_enum_android_sync_frame_number_t;
10333 
10334 // ACAMERA_SYNC_MAX_LATENCY
10335 typedef enum acamera_metadata_enum_acamera_sync_max_latency {
10336     /**
10337      * <p>Every frame has the requests immediately applied.</p>
10338      * <p>Changing controls over multiple requests one after another will
10339      * produce results that have those controls applied atomically
10340      * each frame.</p>
10341      * <p>All FULL capability devices will have this as their maxLatency.</p>
10342      */
10343     ACAMERA_SYNC_MAX_LATENCY_PER_FRAME_CONTROL                       = 0,
10344 
10345     /**
10346      * <p>Each new frame has some subset (potentially the entire set)
10347      * of the past requests applied to the camera settings.</p>
10348      * <p>By submitting a series of identical requests, the camera device
10349      * will eventually have the camera settings applied, but it is
10350      * unknown when that exact point will be.</p>
10351      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
10352      */
10353     ACAMERA_SYNC_MAX_LATENCY_UNKNOWN                                 = -1,
10354 
10355 } acamera_metadata_enum_android_sync_max_latency_t;
10356 
10357 
10358 
10359 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
10360 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations {
10361     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT       = 0,
10362 
10363     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT        = 1,
10364 
10365 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_t;
10366 
10367 // ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
10368 typedef enum acamera_metadata_enum_acamera_depth_depth_is_exclusive {
10369     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE                           = 0,
10370 
10371     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE                            = 1,
10372 
10373 } acamera_metadata_enum_android_depth_depth_is_exclusive_t;
10374 
10375 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
10376 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations {
10377     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT
10378                                                                       = 0,
10379 
10380     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT
10381                                                                       = 1,
10382 
10383 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t;
10384 
10385 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
10386 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations_maximum_resolution {
10387     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
10388                                                                       = 0,
10389 
10390     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
10391                                                                       = 1,
10392 
10393 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t;
10394 
10395 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
10396 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations_maximum_resolution {
10397     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
10398                                                                       = 0,
10399 
10400     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
10401                                                                       = 1,
10402 
10403 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t;
10404 
10405 
10406 // ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
10407 typedef enum acamera_metadata_enum_acamera_logical_multi_camera_sensor_sync_type {
10408     /**
10409      * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
10410      * the timestamp of an image from a physical stream is only an approximation of the
10411      * image sensor start-of-exposure time.</p>
10412      */
10413     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE        = 0,
10414 
10415     /**
10416      * <p>The camera device supports frame timestamp synchronization at the hardware level,
10417      * and the timestamp of a physical stream image accurately reflects its
10418      * start-of-exposure time.</p>
10419      */
10420     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED         = 1,
10421 
10422 } acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t;
10423 
10424 
10425 // ACAMERA_DISTORTION_CORRECTION_MODE
10426 typedef enum acamera_metadata_enum_acamera_distortion_correction_mode {
10427     /**
10428      * <p>No distortion correction is applied.</p>
10429      */
10430     ACAMERA_DISTORTION_CORRECTION_MODE_OFF                           = 0,
10431 
10432     /**
10433      * <p>Lens distortion correction is applied without reducing frame rate
10434      * relative to sensor output. It may be the same as OFF if distortion correction would
10435      * reduce frame rate relative to sensor.</p>
10436      */
10437     ACAMERA_DISTORTION_CORRECTION_MODE_FAST                          = 1,
10438 
10439     /**
10440      * <p>High-quality distortion correction is applied, at the cost of
10441      * possibly reduced frame rate relative to sensor output.</p>
10442      */
10443     ACAMERA_DISTORTION_CORRECTION_MODE_HIGH_QUALITY                  = 2,
10444 
10445 } acamera_metadata_enum_android_distortion_correction_mode_t;
10446 
10447 
10448 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
10449 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations {
10450     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT         = 0,
10451 
10452     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT          = 1,
10453 
10454 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_t;
10455 
10456 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
10457 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations_maximum_resolution {
10458     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
10459                                                                       = 0,
10460 
10461     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
10462                                                                       = 1,
10463 
10464 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t;
10465 
10466 
10467 
10468 // ACAMERA_AUTOMOTIVE_LOCATION
10469 typedef enum acamera_metadata_enum_acamera_automotive_location {
10470     /**
10471      * <p>The camera device exists inside of the vehicle cabin.</p>
10472      */
10473     ACAMERA_AUTOMOTIVE_LOCATION_INTERIOR                             = 0,
10474 
10475     /**
10476      * <p>The camera exists outside of the vehicle body frame but not exactly on one of the
10477      * exterior locations this enum defines.  The applications should determine the exact
10478      * location from ACAMERA_LENS_POSE_TRANSLATION.</p>
10479      *
10480      * @see ACAMERA_LENS_POSE_TRANSLATION
10481      */
10482     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_OTHER                       = 1,
10483 
10484     /**
10485      * <p>The camera device exists outside of the vehicle body frame and on its front side.</p>
10486      */
10487     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_FRONT                       = 2,
10488 
10489     /**
10490      * <p>The camera device exists outside of the vehicle body frame and on its rear side.</p>
10491      */
10492     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_REAR                        = 3,
10493 
10494     /**
10495      * <p>The camera device exists outside and on left side of the vehicle body frame.</p>
10496      */
10497     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_LEFT                        = 4,
10498 
10499     /**
10500      * <p>The camera device exists outside and on right side of the vehicle body frame.</p>
10501      */
10502     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT                       = 5,
10503 
10504     /**
10505      * <p>The camera device exists on an extra vehicle, such as the trailer, but not exactly
10506      * on one of front, rear, left, or right side.  Applications should determine the exact
10507      * location from ACAMERA_LENS_POSE_TRANSLATION.</p>
10508      *
10509      * @see ACAMERA_LENS_POSE_TRANSLATION
10510      */
10511     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_OTHER                          = 6,
10512 
10513     /**
10514      * <p>The camera device exists outside of the extra vehicle's body frame and on its front
10515      * side.</p>
10516      */
10517     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_FRONT                          = 7,
10518 
10519     /**
10520      * <p>The camera device exists outside of the extra vehicle's body frame and on its rear
10521      * side.</p>
10522      */
10523     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_REAR                           = 8,
10524 
10525     /**
10526      * <p>The camera device exists outside and on left side of the extra vehicle body.</p>
10527      */
10528     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_LEFT                           = 9,
10529 
10530     /**
10531      * <p>The camera device exists outside and on right side of the extra vehicle body.</p>
10532      */
10533     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_RIGHT                          = 10,
10534 
10535 } acamera_metadata_enum_android_automotive_location_t;
10536 
10537 
10538 // ACAMERA_AUTOMOTIVE_LENS_FACING
10539 typedef enum acamera_metadata_enum_acamera_automotive_lens_facing {
10540     /**
10541      * <p>The camera device faces the outside of the vehicle body frame but not exactly
10542      * one of the exterior sides defined by this enum.  Applications should determine
10543      * the exact facing direction from ACAMERA_LENS_POSE_ROTATION and
10544      * ACAMERA_LENS_POSE_TRANSLATION.</p>
10545      *
10546      * @see ACAMERA_LENS_POSE_ROTATION
10547      * @see ACAMERA_LENS_POSE_TRANSLATION
10548      */
10549     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER                    = 0,
10550 
10551     /**
10552      * <p>The camera device faces the front of the vehicle body frame.</p>
10553      */
10554     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT                    = 1,
10555 
10556     /**
10557      * <p>The camera device faces the rear of the vehicle body frame.</p>
10558      */
10559     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR                     = 2,
10560 
10561     /**
10562      * <p>The camera device faces the left side of the vehicle body frame.</p>
10563      */
10564     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT                     = 3,
10565 
10566     /**
10567      * <p>The camera device faces the right side of the vehicle body frame.</p>
10568      */
10569     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT                    = 4,
10570 
10571     /**
10572      * <p>The camera device faces the inside of the vehicle body frame but not exactly
10573      * one of seats described by this enum.  Applications should determine the exact
10574      * facing direction from ACAMERA_LENS_POSE_ROTATION and ACAMERA_LENS_POSE_TRANSLATION.</p>
10575      *
10576      * @see ACAMERA_LENS_POSE_ROTATION
10577      * @see ACAMERA_LENS_POSE_TRANSLATION
10578      */
10579     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER                    = 5,
10580 
10581     /**
10582      * <p>The camera device faces the left side seat of the first row.</p>
10583      */
10584     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT          = 6,
10585 
10586     /**
10587      * <p>The camera device faces the center seat of the first row.</p>
10588      */
10589     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER        = 7,
10590 
10591     /**
10592      * <p>The camera device faces the right seat of the first row.</p>
10593      */
10594     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT         = 8,
10595 
10596     /**
10597      * <p>The camera device faces the left side seat of the second row.</p>
10598      */
10599     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT          = 9,
10600 
10601     /**
10602      * <p>The camera device faces the center seat of the second row.</p>
10603      */
10604     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER        = 10,
10605 
10606     /**
10607      * <p>The camera device faces the right side seat of the second row.</p>
10608      */
10609     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT         = 11,
10610 
10611     /**
10612      * <p>The camera device faces the left side seat of the third row.</p>
10613      */
10614     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT          = 12,
10615 
10616     /**
10617      * <p>The camera device faces the center seat of the third row.</p>
10618      */
10619     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER        = 13,
10620 
10621     /**
10622      * <p>The camera device faces the right seat of the third row.</p>
10623      */
10624     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT         = 14,
10625 
10626 } acamera_metadata_enum_android_automotive_lens_facing_t;
10627 
10628 
10629 
10630 __END_DECLS
10631 
10632 #endif /* _NDK_CAMERA_METADATA_TAGS_H */
10633 
10634 /** @} */
10635