• 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  * Note: The following enum values were incorrect and have been updated:
45  * enum                                                        old value                        updated value
46  * ACAMERA_CONTROL_SETTINGS_OVERRIDE                           ACAMERA_CONTROL_START + 49       ACAMERA_CONTROL_START + 52;
47  * ACAMERA_CONTROL_AVAILABLE_SETTINGS_OVERRIDES                ACAMERA_CONTROL_START + 50       ACAMERA_CONTROL_START + 53;
48  * ACAMERA_CONTROL_AUTOFRAMING                                 ACAMERA_CONTROL_START + 52       ACAMERA_CONTROL_START + 55;
49  * ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE                       ACAMERA_CONTROL_START + 53       ACAMERA_CONTROL_START + 56;
50  * ACAMERA_CONTROL_AUTOFRAMING_STATE                           ACAMERA_CONTROL_START + 54       ACAMERA_CONTROL_START + 57;
51  * ACAMERA_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE        ACAMERA_CONTROL_START + 55       ACAMERA_CONTROL_START + 58;
52  * ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE                       ACAMERA_CONTROL_START + 56       ACAMERA_CONTROL_START + 59;
53 
54  * ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES                   ACAMERA_SCALER_START + 25        ACAMERA_SCALER_START + 26;
55  * ACAMERA_SCALER_CROP_REGION                                  ACAMERA_SCALER_START + 26        ACAMERA_SCALER_START + 27;
56  */
57 
58 
59 typedef enum acamera_metadata_section {
60     ACAMERA_COLOR_CORRECTION,
61     ACAMERA_CONTROL,
62     ACAMERA_DEMOSAIC,
63     ACAMERA_EDGE,
64     ACAMERA_FLASH,
65     ACAMERA_FLASH_INFO,
66     ACAMERA_HOT_PIXEL,
67     ACAMERA_JPEG,
68     ACAMERA_LENS,
69     ACAMERA_LENS_INFO,
70     ACAMERA_NOISE_REDUCTION,
71     ACAMERA_QUIRKS,
72     ACAMERA_REQUEST,
73     ACAMERA_SCALER,
74     ACAMERA_SENSOR,
75     ACAMERA_SENSOR_INFO,
76     ACAMERA_SHADING,
77     ACAMERA_STATISTICS,
78     ACAMERA_STATISTICS_INFO,
79     ACAMERA_TONEMAP,
80     ACAMERA_LED,
81     ACAMERA_INFO,
82     ACAMERA_BLACK_LEVEL,
83     ACAMERA_SYNC,
84     ACAMERA_REPROCESS,
85     ACAMERA_DEPTH,
86     ACAMERA_LOGICAL_MULTI_CAMERA,
87     ACAMERA_DISTORTION_CORRECTION,
88     ACAMERA_HEIC,
89     ACAMERA_HEIC_INFO,
90     ACAMERA_AUTOMOTIVE,
91     ACAMERA_AUTOMOTIVE_LENS,
92     ACAMERA_EXTENSION,
93     ACAMERA_JPEGR,
94     ACAMERA_EFV,
95     ACAMERA_SECTION_COUNT,
96 
97     ACAMERA_VENDOR = 0x8000
98 } acamera_metadata_section_t;
99 
100 /**
101  * Hierarchy positions in enum space.
102  */
103 typedef enum acamera_metadata_section_start {
104     ACAMERA_COLOR_CORRECTION_START = ACAMERA_COLOR_CORRECTION  << 16,
105     ACAMERA_CONTROL_START          = ACAMERA_CONTROL           << 16,
106     ACAMERA_DEMOSAIC_START         = ACAMERA_DEMOSAIC          << 16,
107     ACAMERA_EDGE_START             = ACAMERA_EDGE              << 16,
108     ACAMERA_FLASH_START            = ACAMERA_FLASH             << 16,
109     ACAMERA_FLASH_INFO_START       = ACAMERA_FLASH_INFO        << 16,
110     ACAMERA_HOT_PIXEL_START        = ACAMERA_HOT_PIXEL         << 16,
111     ACAMERA_JPEG_START             = ACAMERA_JPEG              << 16,
112     ACAMERA_LENS_START             = ACAMERA_LENS              << 16,
113     ACAMERA_LENS_INFO_START        = ACAMERA_LENS_INFO         << 16,
114     ACAMERA_NOISE_REDUCTION_START  = ACAMERA_NOISE_REDUCTION   << 16,
115     ACAMERA_QUIRKS_START           = ACAMERA_QUIRKS            << 16,
116     ACAMERA_REQUEST_START          = ACAMERA_REQUEST           << 16,
117     ACAMERA_SCALER_START           = ACAMERA_SCALER            << 16,
118     ACAMERA_SENSOR_START           = ACAMERA_SENSOR            << 16,
119     ACAMERA_SENSOR_INFO_START      = ACAMERA_SENSOR_INFO       << 16,
120     ACAMERA_SHADING_START          = ACAMERA_SHADING           << 16,
121     ACAMERA_STATISTICS_START       = ACAMERA_STATISTICS        << 16,
122     ACAMERA_STATISTICS_INFO_START  = ACAMERA_STATISTICS_INFO   << 16,
123     ACAMERA_TONEMAP_START          = ACAMERA_TONEMAP           << 16,
124     ACAMERA_LED_START              = ACAMERA_LED               << 16,
125     ACAMERA_INFO_START             = ACAMERA_INFO              << 16,
126     ACAMERA_BLACK_LEVEL_START      = ACAMERA_BLACK_LEVEL       << 16,
127     ACAMERA_SYNC_START             = ACAMERA_SYNC              << 16,
128     ACAMERA_REPROCESS_START        = ACAMERA_REPROCESS         << 16,
129     ACAMERA_DEPTH_START            = ACAMERA_DEPTH             << 16,
130     ACAMERA_LOGICAL_MULTI_CAMERA_START
131                                    = ACAMERA_LOGICAL_MULTI_CAMERA
132                                                                 << 16,
133     ACAMERA_DISTORTION_CORRECTION_START
134                                    = ACAMERA_DISTORTION_CORRECTION
135                                                                 << 16,
136     ACAMERA_HEIC_START             = ACAMERA_HEIC              << 16,
137     ACAMERA_HEIC_INFO_START        = ACAMERA_HEIC_INFO         << 16,
138     ACAMERA_AUTOMOTIVE_START       = ACAMERA_AUTOMOTIVE        << 16,
139     ACAMERA_AUTOMOTIVE_LENS_START  = ACAMERA_AUTOMOTIVE_LENS   << 16,
140     ACAMERA_EXTENSION_START        = ACAMERA_EXTENSION         << 16,
141     ACAMERA_JPEGR_START            = ACAMERA_JPEGR             << 16,
142     ACAMERA_EFV_START              = ACAMERA_EFV               << 16,
143     ACAMERA_VENDOR_START           = ACAMERA_VENDOR            << 16
144 } acamera_metadata_section_start_t;
145 
146 /**
147  * Main enum for camera metadata tags.
148  */
149 typedef enum acamera_metadata_tag {
150     /**
151      * <p>The mode control selects how the image data is converted from the
152      * sensor's native color into linear sRGB color.</p>
153      *
154      * <p>Type: byte (acamera_metadata_enum_android_color_correction_mode_t)</p>
155      *
156      * <p>This tag may appear in:
157      * <ul>
158      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
159      *   <li>ACaptureRequest</li>
160      * </ul></p>
161      *
162      * <p>When auto-white balance (AWB) is enabled with ACAMERA_CONTROL_AWB_MODE, this
163      * control is overridden by the AWB routine. When AWB is disabled, the
164      * application controls how the color mapping is performed.</p>
165      * <p>We define the expected processing pipeline below. For consistency
166      * across devices, this is always the case with TRANSFORM_MATRIX.</p>
167      * <p>When either FAST or HIGH_QUALITY is used, the camera device may
168      * do additional processing but ACAMERA_COLOR_CORRECTION_GAINS and
169      * ACAMERA_COLOR_CORRECTION_TRANSFORM will still be provided by the
170      * camera device (in the results) and be roughly correct.</p>
171      * <p>Switching to TRANSFORM_MATRIX and using the data provided from
172      * FAST or HIGH_QUALITY will yield a picture with the same white point
173      * as what was produced by the camera device in the earlier frame.</p>
174      * <p>The expected processing pipeline is as follows:</p>
175      * <p><img alt="White balance processing pipeline" src="../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
176      * <p>The white balance is encoded by two values, a 4-channel white-balance
177      * gain vector (applied in the Bayer domain), and a 3x3 color transform
178      * matrix (applied after demosaic).</p>
179      * <p>The 4-channel white-balance gains are defined as:</p>
180      * <pre><code>ACAMERA_COLOR_CORRECTION_GAINS = [ R G_even G_odd B ]
181      * </code></pre>
182      * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
183      * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
184      * These may be identical for a given camera device implementation; if
185      * the camera device does not support a separate gain for even/odd green
186      * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
187      * <code>G_even</code> in the output result metadata.</p>
188      * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
189      * <pre><code>ACAMERA_COLOR_CORRECTION_TRANSFORM = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
190      * </code></pre>
191      * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
192      * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
193      * <p>with colors as follows:</p>
194      * <pre><code>r' = I0r + I1g + I2b
195      * g' = I3r + I4g + I5b
196      * b' = I6r + I7g + I8b
197      * </code></pre>
198      * <p>Both the input and output value ranges must match. Overflow/underflow
199      * values are clipped to fit within the range.</p>
200      *
201      * @see ACAMERA_COLOR_CORRECTION_GAINS
202      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
203      * @see ACAMERA_CONTROL_AWB_MODE
204      */
205     ACAMERA_COLOR_CORRECTION_MODE =                             // byte (acamera_metadata_enum_android_color_correction_mode_t)
206             ACAMERA_COLOR_CORRECTION_START,
207     /**
208      * <p>A color transform matrix to use to transform
209      * from sensor RGB color space to output linear sRGB color space.</p>
210      *
211      * <p>Type: rational[3*3]</p>
212      *
213      * <p>This tag may appear in:
214      * <ul>
215      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
216      *   <li>ACaptureRequest</li>
217      * </ul></p>
218      *
219      * <p>This matrix is either set by the camera device when the request
220      * ACAMERA_COLOR_CORRECTION_MODE is not TRANSFORM_MATRIX, or
221      * directly by the application in the request when the
222      * ACAMERA_COLOR_CORRECTION_MODE is TRANSFORM_MATRIX.</p>
223      * <p>In the latter case, the camera device may round the matrix to account
224      * for precision issues; the final rounded matrix should be reported back
225      * in this matrix result metadata. The transform should keep the magnitude
226      * of the output color values within <code>[0, 1.0]</code> (assuming input color
227      * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
228      * <p>The valid range of each matrix element varies on different devices, but
229      * values within [-1.5, 3.0] are guaranteed not to be clipped.</p>
230      *
231      * @see ACAMERA_COLOR_CORRECTION_MODE
232      */
233     ACAMERA_COLOR_CORRECTION_TRANSFORM =                        // rational[3*3]
234             ACAMERA_COLOR_CORRECTION_START + 1,
235     /**
236      * <p>Gains applying to Bayer raw color channels for
237      * white-balance.</p>
238      *
239      * <p>Type: float[4]</p>
240      *
241      * <p>This tag may appear in:
242      * <ul>
243      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
244      *   <li>ACaptureRequest</li>
245      * </ul></p>
246      *
247      * <p>These per-channel gains are either set by the camera device
248      * when the request ACAMERA_COLOR_CORRECTION_MODE is not
249      * TRANSFORM_MATRIX, or directly by the application in the
250      * request when the ACAMERA_COLOR_CORRECTION_MODE is
251      * TRANSFORM_MATRIX.</p>
252      * <p>The gains in the result metadata are the gains actually
253      * applied by the camera device to the current frame.</p>
254      * <p>The valid range of gains varies on different devices, but gains
255      * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
256      * device allows gains below 1.0, this is usually not recommended because
257      * this can create color artifacts.</p>
258      *
259      * @see ACAMERA_COLOR_CORRECTION_MODE
260      */
261     ACAMERA_COLOR_CORRECTION_GAINS =                            // float[4]
262             ACAMERA_COLOR_CORRECTION_START + 2,
263     /**
264      * <p>Mode of operation for the chromatic aberration correction algorithm.</p>
265      *
266      * <p>Type: byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)</p>
267      *
268      * <p>This tag may appear in:
269      * <ul>
270      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
271      *   <li>ACaptureRequest</li>
272      * </ul></p>
273      *
274      * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light
275      * can not focus on the same point after exiting from the lens. This metadata defines
276      * the high level control of chromatic aberration correction algorithm, which aims to
277      * minimize the chromatic artifacts that may occur along the object boundaries in an
278      * image.</p>
279      * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration
280      * correction will be applied. HIGH_QUALITY mode indicates that the camera device will
281      * use the highest-quality aberration correction algorithms, even if it slows down
282      * capture rate. FAST means the camera device will not slow down capture rate when
283      * applying aberration correction.</p>
284      * <p>LEGACY devices will always be in FAST mode.</p>
285      */
286     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE =                  // byte (acamera_metadata_enum_android_color_correction_aberration_mode_t)
287             ACAMERA_COLOR_CORRECTION_START + 3,
288     /**
289      * <p>List of aberration correction modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE that are
290      * supported by this camera device.</p>
291      *
292      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
293      *
294      * <p>Type: byte[n]</p>
295      *
296      * <p>This tag may appear in:
297      * <ul>
298      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
299      * </ul></p>
300      *
301      * <p>This key lists the valid modes for ACAMERA_COLOR_CORRECTION_ABERRATION_MODE.  If no
302      * aberration correction modes are available for a device, this list will solely include
303      * OFF mode. All camera devices will support either OFF or FAST mode.</p>
304      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list
305      * OFF mode. This includes all FULL level devices.</p>
306      * <p>LEGACY devices will always only support FAST mode.</p>
307      *
308      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
309      */
310     ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES =       // byte[n]
311             ACAMERA_COLOR_CORRECTION_START + 4,
312     ACAMERA_COLOR_CORRECTION_END,
313 
314     /**
315      * <p>The desired setting for the camera device's auto-exposure
316      * algorithm's antibanding compensation.</p>
317      *
318      * <p>Type: byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)</p>
319      *
320      * <p>This tag may appear in:
321      * <ul>
322      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
323      *   <li>ACaptureRequest</li>
324      * </ul></p>
325      *
326      * <p>Some kinds of lighting fixtures, such as some fluorescent
327      * lights, flicker at the rate of the power supply frequency
328      * (60Hz or 50Hz, depending on country). While this is
329      * typically not noticeable to a person, it can be visible to
330      * a camera device. If a camera sets its exposure time to the
331      * wrong value, the flicker may become visible in the
332      * viewfinder as flicker or in a final captured image, as a
333      * set of variable-brightness bands across the image.</p>
334      * <p>Therefore, the auto-exposure routines of camera devices
335      * include antibanding routines that ensure that the chosen
336      * exposure value will not cause such banding. The choice of
337      * exposure time depends on the rate of flicker, which the
338      * camera device can detect automatically, or the expected
339      * rate can be selected by the application using this
340      * control.</p>
341      * <p>A given camera device may not support all of the possible
342      * options for the antibanding mode. The
343      * ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES key contains
344      * the available modes for a given camera device.</p>
345      * <p>AUTO mode is the default if it is available on given
346      * camera device. When AUTO mode is not available, the
347      * default will be either 50HZ or 60HZ, and both 50HZ
348      * and 60HZ will be available.</p>
349      * <p>If manual exposure control is enabled (by setting
350      * ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE to OFF),
351      * then this setting has no effect, and the application must
352      * ensure it selects exposure times that do not cause banding
353      * issues. The ACAMERA_STATISTICS_SCENE_FLICKER key can assist
354      * the application in this.</p>
355      *
356      * @see ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
357      * @see ACAMERA_CONTROL_AE_MODE
358      * @see ACAMERA_CONTROL_MODE
359      * @see ACAMERA_STATISTICS_SCENE_FLICKER
360      */
361     ACAMERA_CONTROL_AE_ANTIBANDING_MODE =                       // byte (acamera_metadata_enum_android_control_ae_antibanding_mode_t)
362             ACAMERA_CONTROL_START,
363     /**
364      * <p>Adjustment to auto-exposure (AE) target image
365      * brightness.</p>
366      *
367      * <p>Type: int32</p>
368      *
369      * <p>This tag may appear in:
370      * <ul>
371      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
372      *   <li>ACaptureRequest</li>
373      * </ul></p>
374      *
375      * <p>The adjustment is measured as a count of steps, with the
376      * step size defined by ACAMERA_CONTROL_AE_COMPENSATION_STEP and the
377      * allowed range by ACAMERA_CONTROL_AE_COMPENSATION_RANGE.</p>
378      * <p>For example, if the exposure value (EV) step is 0.333, '6'
379      * will mean an exposure compensation of +2 EV; -3 will mean an
380      * exposure compensation of -1 EV. One EV represents a doubling
381      * of image brightness. Note that this control will only be
382      * effective if ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF. This control
383      * will take effect even when ACAMERA_CONTROL_AE_LOCK <code>== true</code>.</p>
384      * <p>In the event of exposure compensation value being changed, camera device
385      * may take several frames to reach the newly requested exposure target.
386      * During that time, ACAMERA_CONTROL_AE_STATE field will be in the SEARCHING
387      * state. Once the new exposure target is reached, ACAMERA_CONTROL_AE_STATE will
388      * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
389      * FLASH_REQUIRED (if the scene is too dark for still capture).</p>
390      *
391      * @see ACAMERA_CONTROL_AE_COMPENSATION_RANGE
392      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
393      * @see ACAMERA_CONTROL_AE_LOCK
394      * @see ACAMERA_CONTROL_AE_MODE
395      * @see ACAMERA_CONTROL_AE_STATE
396      */
397     ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION =                  // int32
398             ACAMERA_CONTROL_START + 1,
399     /**
400      * <p>Whether auto-exposure (AE) is currently locked to its latest
401      * calculated values.</p>
402      *
403      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_t)</p>
404      *
405      * <p>This tag may appear in:
406      * <ul>
407      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
408      *   <li>ACaptureRequest</li>
409      * </ul></p>
410      *
411      * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters,
412      * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p>
413      * <p>Note that even when AE is locked, the flash may be fired if
414      * the ACAMERA_CONTROL_AE_MODE is ON_AUTO_FLASH /
415      * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p>
416      * <p>When ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION is changed, even if the AE lock
417      * is ON, the camera device will still adjust its exposure value.</p>
418      * <p>If AE precapture is triggered (see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER)
419      * when AE is already locked, the camera device will not change the exposure time
420      * (ACAMERA_SENSOR_EXPOSURE_TIME) and sensitivity (ACAMERA_SENSOR_SENSITIVITY)
421      * parameters. The flash may be fired if the ACAMERA_CONTROL_AE_MODE
422      * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
423      * ACAMERA_CONTROL_AE_MODE is ON_ALWAYS_FLASH, the scene may become overexposed.
424      * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p>
425      * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock
426      * the AE if AE is locked by the camera device internally during precapture metering
427      * sequence In other words, submitting requests with AE unlock has no effect for an
428      * ongoing precapture metering sequence. Otherwise, the precapture metering sequence
429      * will never succeed in a sequence of preview requests where AE lock is always set
430      * to <code>false</code>.</p>
431      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
432      * get locked do not necessarily correspond to the settings that were present in the
433      * latest capture result received from the camera device, since additional captures
434      * and AE updates may have occurred even before the result was sent out. If an
435      * application is switching between automatic and manual control and wishes to eliminate
436      * any flicker during the switch, the following procedure is recommended:</p>
437      * <ol>
438      * <li>Starting in auto-AE mode:</li>
439      * <li>Lock AE</li>
440      * <li>Wait for the first result to be output that has the AE locked</li>
441      * <li>Copy exposure settings from that result into a request, set the request to manual AE</li>
442      * <li>Submit the capture request, proceed to run manual AE as desired.</li>
443      * </ol>
444      * <p>See ACAMERA_CONTROL_AE_STATE for AE lock related state transition details.</p>
445      *
446      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
447      * @see ACAMERA_CONTROL_AE_MODE
448      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
449      * @see ACAMERA_CONTROL_AE_STATE
450      * @see ACAMERA_SENSOR_EXPOSURE_TIME
451      * @see ACAMERA_SENSOR_SENSITIVITY
452      */
453     ACAMERA_CONTROL_AE_LOCK =                                   // byte (acamera_metadata_enum_android_control_ae_lock_t)
454             ACAMERA_CONTROL_START + 2,
455     /**
456      * <p>The desired mode for the camera device's
457      * auto-exposure routine.</p>
458      *
459      * <p>Type: byte (acamera_metadata_enum_android_control_ae_mode_t)</p>
460      *
461      * <p>This tag may appear in:
462      * <ul>
463      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
464      *   <li>ACaptureRequest</li>
465      * </ul></p>
466      *
467      * <p>This control is only effective if ACAMERA_CONTROL_MODE is
468      * AUTO.</p>
469      * <p>When set to any of the ON modes, the camera device's
470      * auto-exposure routine is enabled, overriding the
471      * application's selected exposure time, sensor sensitivity,
472      * and frame duration (ACAMERA_SENSOR_EXPOSURE_TIME,
473      * ACAMERA_SENSOR_SENSITIVITY, and
474      * ACAMERA_SENSOR_FRAME_DURATION). If one of the FLASH modes
475      * is selected, the camera device's flash unit controls are
476      * also overridden.</p>
477      * <p>The FLASH modes are only available if the camera device
478      * has a flash unit (ACAMERA_FLASH_INFO_AVAILABLE is <code>true</code>).</p>
479      * <p>If flash TORCH mode is desired, this field must be set to
480      * ON or OFF, and ACAMERA_FLASH_MODE set to TORCH.</p>
481      * <p>When set to any of the ON modes, the values chosen by the
482      * camera device auto-exposure routine for the overridden
483      * fields for a given capture will be available in its
484      * CaptureResult.</p>
485      *
486      * @see ACAMERA_CONTROL_MODE
487      * @see ACAMERA_FLASH_INFO_AVAILABLE
488      * @see ACAMERA_FLASH_MODE
489      * @see ACAMERA_SENSOR_EXPOSURE_TIME
490      * @see ACAMERA_SENSOR_FRAME_DURATION
491      * @see ACAMERA_SENSOR_SENSITIVITY
492      */
493     ACAMERA_CONTROL_AE_MODE =                                   // byte (acamera_metadata_enum_android_control_ae_mode_t)
494             ACAMERA_CONTROL_START + 3,
495     /**
496      * <p>List of metering areas to use for auto-exposure adjustment.</p>
497      *
498      * <p>Type: int32[5*area_count]</p>
499      *
500      * <p>This tag may appear in:
501      * <ul>
502      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
503      *   <li>ACaptureRequest</li>
504      * </ul></p>
505      *
506      * <p>Not available if android.control.maxRegionsAe is 0.
507      * Otherwise will always be present.</p>
508      * <p>The maximum number of regions supported by the device is determined by the value
509      * of android.control.maxRegionsAe.</p>
510      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
511      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
512      * the top-left pixel in the active pixel array, and
513      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
514      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
515      * active pixel array.</p>
516      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
517      * system depends on the mode being set.
518      * When the distortion correction mode is OFF, the coordinate system follows
519      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
520      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
521      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
522      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
523      * pixel in the pre-correction active pixel array.
524      * When the distortion correction mode is not OFF, the coordinate system follows
525      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
526      * <code>(0, 0)</code> being the top-left pixel of the active array, and
527      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
528      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
529      * active pixel array.</p>
530      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
531      * for every pixel in the area. This means that a large metering area
532      * with the same weight as a smaller area will have more effect in
533      * the metering result. Metering areas can partially overlap and the
534      * camera device will add the weights in the overlap region.</p>
535      * <p>The weights are relative to weights of other exposure metering regions, so if only one
536      * region is used, all non-zero weights will have the same effect. A region with 0
537      * weight is ignored.</p>
538      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
539      * camera device.</p>
540      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
541      * capture result metadata, the camera device will ignore the sections outside the crop
542      * region and output only the intersection rectangle as the metering region in the result
543      * metadata.  If the region is entirely outside the crop region, it will be ignored and
544      * not reported in the result metadata.</p>
545      * <p>When setting the AE metering regions, the application must consider the additional
546      * crop resulted from the aspect ratio differences between the preview stream and
547      * ACAMERA_SCALER_CROP_REGION. For example, if the ACAMERA_SCALER_CROP_REGION is the full
548      * active array size with 4:3 aspect ratio, and the preview stream is 16:9,
549      * the boundary of AE regions will be [0, y_crop] and
550      * [active_width, active_height - 2 * y_crop] rather than [0, 0] and
551      * [active_width, active_height], where y_crop is the additional crop due to aspect ratio
552      * mismatch.</p>
553      * <p>Starting from API level 30, the coordinate system of activeArraySize or
554      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
555      * pre-zoom field of view. This means that the same aeRegions values at different
556      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The aeRegions
557      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
558      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
559      * aeRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
560      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
561      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
562      * mode.</p>
563      * <p>For camera devices with the
564      * <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>
565      * capability or devices where
566      * <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
567      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a>
568      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
569      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
570      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
571      * <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>
572      * <p>The data representation is <code>int[5 * area_count]</code>.
573      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
574      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
575      * ymax.</p>
576      *
577      * @see ACAMERA_CONTROL_ZOOM_RATIO
578      * @see ACAMERA_DISTORTION_CORRECTION_MODE
579      * @see ACAMERA_SCALER_CROP_REGION
580      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
581      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
582      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
583      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
584      * @see ACAMERA_SENSOR_PIXEL_MODE
585      */
586     ACAMERA_CONTROL_AE_REGIONS =                                // int32[5*area_count]
587             ACAMERA_CONTROL_START + 4,
588     /**
589      * <p>Range over which the auto-exposure routine can
590      * adjust the capture frame rate to maintain good
591      * exposure.</p>
592      *
593      * <p>Type: int32[2]</p>
594      *
595      * <p>This tag may appear in:
596      * <ul>
597      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
598      *   <li>ACaptureRequest</li>
599      * </ul></p>
600      *
601      * <p>Only constrains auto-exposure (AE) algorithm, not
602      * manual control of ACAMERA_SENSOR_EXPOSURE_TIME and
603      * ACAMERA_SENSOR_FRAME_DURATION.</p>
604      * <p>Note that the actual achievable max framerate also depends on the minimum frame
605      * duration of the output streams. The max frame rate will be
606      * <code>min(aeTargetFpsRange.maxFps, 1 / max(individual stream min durations))</code>. For example,
607      * if the application sets this key to <code>{60, 60}</code>, but the maximum minFrameDuration among
608      * all configured streams is 33ms, the maximum framerate won't be 60fps, but will be
609      * 30fps.</p>
610      * <p>To start a CaptureSession with a target FPS range different from the
611      * capture request template's default value, the application
612      * is strongly recommended to call
613      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }
614      * with the target fps range before creating the capture session. The aeTargetFpsRange is
615      * typically a session parameter. Specifying it at session creation time helps avoid
616      * session reconfiguration delays in cases like 60fps or high speed recording.</p>
617      *
618      * @see ACAMERA_SENSOR_EXPOSURE_TIME
619      * @see ACAMERA_SENSOR_FRAME_DURATION
620      */
621     ACAMERA_CONTROL_AE_TARGET_FPS_RANGE =                       // int32[2]
622             ACAMERA_CONTROL_START + 5,
623     /**
624      * <p>Whether the camera device will trigger a precapture
625      * metering sequence when it processes this request.</p>
626      *
627      * <p>Type: byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)</p>
628      *
629      * <p>This tag may appear in:
630      * <ul>
631      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
632      *   <li>ACaptureRequest</li>
633      * </ul></p>
634      *
635      * <p>This entry is normally set to IDLE, or is not
636      * included at all in the request settings. When included and
637      * set to START, the camera device will trigger the auto-exposure (AE)
638      * precapture metering sequence.</p>
639      * <p>When set to CANCEL, the camera device will cancel any active
640      * precapture metering trigger, and return to its initial AE state.
641      * If a precapture metering sequence is already completed, and the camera
642      * device has implicitly locked the AE for subsequent still capture, the
643      * CANCEL trigger will unlock the AE and return to its initial AE state.</p>
644      * <p>The precapture sequence should be triggered before starting a
645      * high-quality still capture for final metering decisions to
646      * be made, and for firing pre-capture flash pulses to estimate
647      * scene brightness and required final capture flash power, when
648      * the flash is enabled.</p>
649      * <p>Normally, this entry should be set to START for only a
650      * single request, and the application should wait until the
651      * sequence completes before starting a new one.</p>
652      * <p>When a precapture metering sequence is finished, the camera device
653      * may lock the auto-exposure routine internally to be able to accurately expose the
654      * subsequent still capture image (<code>ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE</code>).
655      * For this case, the AE may not resume normal scan if no subsequent still capture is
656      * submitted. To ensure that the AE routine restarts normal scan, the application should
657      * submit a request with <code>ACAMERA_CONTROL_AE_LOCK == true</code>, followed by a request
658      * with <code>ACAMERA_CONTROL_AE_LOCK == false</code>, if the application decides not to submit a
659      * still capture request after the precapture sequence completes. Alternatively, for
660      * API level 23 or newer devices, the CANCEL can be used to unlock the camera device
661      * internally locked AE if the application doesn't submit a still capture request after
662      * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
663      * be used in devices that have earlier API levels.</p>
664      * <p>The exact effect of auto-exposure (AE) precapture trigger
665      * depends on the current AE mode and state; see
666      * ACAMERA_CONTROL_AE_STATE for AE precapture state transition
667      * details.</p>
668      * <p>On LEGACY-level devices, the precapture trigger is not supported;
669      * capturing a high-resolution JPEG image will automatically trigger a
670      * precapture sequence before the high-resolution capture, including
671      * potentially firing a pre-capture flash.</p>
672      * <p>Using the precapture trigger and the auto-focus trigger ACAMERA_CONTROL_AF_TRIGGER
673      * simultaneously is allowed. However, since these triggers often require cooperation between
674      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
675      * focus sweep), the camera device may delay acting on a later trigger until the previous
676      * trigger has been fully handled. This may lead to longer intervals between the trigger and
677      * changes to ACAMERA_CONTROL_AE_STATE indicating the start of the precapture sequence, for
678      * example.</p>
679      * <p>If both the precapture and the auto-focus trigger are activated on the same request, then
680      * the camera device will complete them in the optimal order for that device.</p>
681      *
682      * @see ACAMERA_CONTROL_AE_LOCK
683      * @see ACAMERA_CONTROL_AE_STATE
684      * @see ACAMERA_CONTROL_AF_TRIGGER
685      * @see ACAMERA_CONTROL_CAPTURE_INTENT
686      */
687     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER =                     // byte (acamera_metadata_enum_android_control_ae_precapture_trigger_t)
688             ACAMERA_CONTROL_START + 6,
689     /**
690      * <p>Whether auto-focus (AF) is currently enabled, and what
691      * mode it is set to.</p>
692      *
693      * <p>Type: byte (acamera_metadata_enum_android_control_af_mode_t)</p>
694      *
695      * <p>This tag may appear in:
696      * <ul>
697      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
698      *   <li>ACaptureRequest</li>
699      * </ul></p>
700      *
701      * <p>Only effective if ACAMERA_CONTROL_MODE = AUTO and the lens is not fixed focus
702      * (i.e. <code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>). Also note that
703      * when ACAMERA_CONTROL_AE_MODE is OFF, the behavior of AF is device
704      * dependent. It is recommended to lock AF by using ACAMERA_CONTROL_AF_TRIGGER before
705      * setting ACAMERA_CONTROL_AE_MODE to OFF, or set AF mode to OFF when AE is OFF.</p>
706      * <p>If the lens is controlled by the camera device auto-focus algorithm,
707      * the camera device will report the current AF status in ACAMERA_CONTROL_AF_STATE
708      * in result metadata.</p>
709      *
710      * @see ACAMERA_CONTROL_AE_MODE
711      * @see ACAMERA_CONTROL_AF_STATE
712      * @see ACAMERA_CONTROL_AF_TRIGGER
713      * @see ACAMERA_CONTROL_MODE
714      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
715      */
716     ACAMERA_CONTROL_AF_MODE =                                   // byte (acamera_metadata_enum_android_control_af_mode_t)
717             ACAMERA_CONTROL_START + 7,
718     /**
719      * <p>List of metering areas to use for auto-focus.</p>
720      *
721      * <p>Type: int32[5*area_count]</p>
722      *
723      * <p>This tag may appear in:
724      * <ul>
725      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
726      *   <li>ACaptureRequest</li>
727      * </ul></p>
728      *
729      * <p>Not available if android.control.maxRegionsAf is 0.
730      * Otherwise will always be present.</p>
731      * <p>The maximum number of focus areas supported by the device is determined by the value
732      * of android.control.maxRegionsAf.</p>
733      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
734      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
735      * the top-left pixel in the active pixel array, and
736      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
737      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
738      * active pixel array.</p>
739      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
740      * system depends on the mode being set.
741      * When the distortion correction mode is OFF, the coordinate system follows
742      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
743      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
744      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
745      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
746      * pixel in the pre-correction active pixel array.
747      * When the distortion correction mode is not OFF, the coordinate system follows
748      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
749      * <code>(0, 0)</code> being the top-left pixel of the active array, and
750      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
751      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
752      * active pixel array.</p>
753      * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight
754      * for every pixel in the area. This means that a large metering area
755      * with the same weight as a smaller area will have more effect in
756      * the metering result. Metering areas can partially overlap and the
757      * camera device will add the weights in the overlap region.</p>
758      * <p>The weights are relative to weights of other metering regions, so if only one region
759      * is used, all non-zero weights will have the same effect. A region with 0 weight is
760      * ignored.</p>
761      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
762      * camera device. The capture result will either be a zero weight region as well, or
763      * the region selected by the camera device as the focus area of interest.</p>
764      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
765      * capture result metadata, the camera device will ignore the sections outside the crop
766      * region and output only the intersection rectangle as the metering region in the result
767      * metadata. If the region is entirely outside the crop region, it will be ignored and
768      * not reported in the result metadata.</p>
769      * <p>When setting the AF metering regions, the application must consider the additional
770      * crop resulted from the aspect ratio differences between the preview stream and
771      * ACAMERA_SCALER_CROP_REGION. For example, if the ACAMERA_SCALER_CROP_REGION is the full
772      * active array size with 4:3 aspect ratio, and the preview stream is 16:9,
773      * the boundary of AF regions will be [0, y_crop] and
774      * [active_width, active_height - 2 * y_crop] rather than [0, 0] and
775      * [active_width, active_height], where y_crop is the additional crop due to aspect ratio
776      * mismatch.</p>
777      * <p>Starting from API level 30, the coordinate system of activeArraySize or
778      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
779      * pre-zoom field of view. This means that the same afRegions values at different
780      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The afRegions
781      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
782      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
783      * afRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of the
784      * scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
785      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
786      * mode.</p>
787      * <p>For camera devices with the
788      * <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>
789      * capability or devices where
790      * <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
791      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a>,
792      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
793      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
794      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
795      * <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>
796      * <p>The data representation is <code>int[5 * area_count]</code>.
797      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
798      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
799      * ymax.</p>
800      *
801      * @see ACAMERA_CONTROL_ZOOM_RATIO
802      * @see ACAMERA_DISTORTION_CORRECTION_MODE
803      * @see ACAMERA_SCALER_CROP_REGION
804      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
805      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
806      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
807      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
808      * @see ACAMERA_SENSOR_PIXEL_MODE
809      */
810     ACAMERA_CONTROL_AF_REGIONS =                                // int32[5*area_count]
811             ACAMERA_CONTROL_START + 8,
812     /**
813      * <p>Whether the camera device will trigger autofocus for this request.</p>
814      *
815      * <p>Type: byte (acamera_metadata_enum_android_control_af_trigger_t)</p>
816      *
817      * <p>This tag may appear in:
818      * <ul>
819      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
820      *   <li>ACaptureRequest</li>
821      * </ul></p>
822      *
823      * <p>This entry is normally set to IDLE, or is not
824      * included at all in the request settings.</p>
825      * <p>When included and set to START, the camera device will trigger the
826      * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
827      * <p>When set to CANCEL, the camera device will cancel any active trigger,
828      * and return to its initial AF state.</p>
829      * <p>Generally, applications should set this entry to START or CANCEL for only a
830      * single capture, and then return it to IDLE (or not set at all). Specifying
831      * START for multiple captures in a row means restarting the AF operation over
832      * and over again.</p>
833      * <p>See ACAMERA_CONTROL_AF_STATE for what the trigger means for each AF mode.</p>
834      * <p>Using the autofocus trigger and the precapture trigger ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
835      * simultaneously is allowed. However, since these triggers often require cooperation between
836      * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
837      * focus sweep), the camera device may delay acting on a later trigger until the previous
838      * trigger has been fully handled. This may lead to longer intervals between the trigger and
839      * changes to ACAMERA_CONTROL_AF_STATE, for example.</p>
840      *
841      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
842      * @see ACAMERA_CONTROL_AF_STATE
843      */
844     ACAMERA_CONTROL_AF_TRIGGER =                                // byte (acamera_metadata_enum_android_control_af_trigger_t)
845             ACAMERA_CONTROL_START + 9,
846     /**
847      * <p>Whether auto-white balance (AWB) is currently locked to its
848      * latest calculated values.</p>
849      *
850      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_t)</p>
851      *
852      * <p>This tag may appear in:
853      * <ul>
854      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
855      *   <li>ACaptureRequest</li>
856      * </ul></p>
857      *
858      * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters,
859      * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p>
860      * <p>Since the camera device has a pipeline of in-flight requests, the settings that
861      * get locked do not necessarily correspond to the settings that were present in the
862      * latest capture result received from the camera device, since additional captures
863      * and AWB updates may have occurred even before the result was sent out. If an
864      * application is switching between automatic and manual control and wishes to eliminate
865      * any flicker during the switch, the following procedure is recommended:</p>
866      * <ol>
867      * <li>Starting in auto-AWB mode:</li>
868      * <li>Lock AWB</li>
869      * <li>Wait for the first result to be output that has the AWB locked</li>
870      * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li>
871      * <li>Submit the capture request, proceed to run manual AWB as desired.</li>
872      * </ol>
873      * <p>Note that AWB lock is only meaningful when
874      * ACAMERA_CONTROL_AWB_MODE is in the AUTO mode; in other modes,
875      * AWB is already fixed to a specific setting.</p>
876      * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p>
877      *
878      * @see ACAMERA_CONTROL_AWB_MODE
879      */
880     ACAMERA_CONTROL_AWB_LOCK =                                  // byte (acamera_metadata_enum_android_control_awb_lock_t)
881             ACAMERA_CONTROL_START + 10,
882     /**
883      * <p>Whether auto-white balance (AWB) is currently setting the color
884      * transform fields, and what its illumination target
885      * is.</p>
886      *
887      * <p>Type: byte (acamera_metadata_enum_android_control_awb_mode_t)</p>
888      *
889      * <p>This tag may appear in:
890      * <ul>
891      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
892      *   <li>ACaptureRequest</li>
893      * </ul></p>
894      *
895      * <p>This control is only effective if ACAMERA_CONTROL_MODE is AUTO.</p>
896      * <p>When set to the AUTO mode, the camera device's auto-white balance
897      * routine is enabled, overriding the application's selected
898      * ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS and
899      * ACAMERA_COLOR_CORRECTION_MODE. Note that when ACAMERA_CONTROL_AE_MODE
900      * is OFF, the behavior of AWB is device dependent. It is recommended to
901      * also set AWB mode to OFF or lock AWB by using ACAMERA_CONTROL_AWB_LOCK before
902      * setting AE mode to OFF.</p>
903      * <p>When set to the OFF mode, the camera device's auto-white balance
904      * routine is disabled. The application manually controls the white
905      * balance by ACAMERA_COLOR_CORRECTION_TRANSFORM, ACAMERA_COLOR_CORRECTION_GAINS
906      * and ACAMERA_COLOR_CORRECTION_MODE.</p>
907      * <p>When set to any other modes, the camera device's auto-white
908      * balance routine is disabled. The camera device uses each
909      * particular illumination target for white balance
910      * adjustment. The application's values for
911      * ACAMERA_COLOR_CORRECTION_TRANSFORM,
912      * ACAMERA_COLOR_CORRECTION_GAINS and
913      * ACAMERA_COLOR_CORRECTION_MODE are ignored.</p>
914      *
915      * @see ACAMERA_COLOR_CORRECTION_GAINS
916      * @see ACAMERA_COLOR_CORRECTION_MODE
917      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
918      * @see ACAMERA_CONTROL_AE_MODE
919      * @see ACAMERA_CONTROL_AWB_LOCK
920      * @see ACAMERA_CONTROL_MODE
921      */
922     ACAMERA_CONTROL_AWB_MODE =                                  // byte (acamera_metadata_enum_android_control_awb_mode_t)
923             ACAMERA_CONTROL_START + 11,
924     /**
925      * <p>List of metering areas to use for auto-white-balance illuminant
926      * estimation.</p>
927      *
928      * <p>Type: int32[5*area_count]</p>
929      *
930      * <p>This tag may appear in:
931      * <ul>
932      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
933      *   <li>ACaptureRequest</li>
934      * </ul></p>
935      *
936      * <p>Not available if android.control.maxRegionsAwb is 0.
937      * Otherwise will always be present.</p>
938      * <p>The maximum number of regions supported by the device is determined by the value
939      * of android.control.maxRegionsAwb.</p>
940      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
941      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0,0) being
942      * the top-left pixel in the active pixel array, and
943      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
944      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
945      * active pixel array.</p>
946      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
947      * system depends on the mode being set.
948      * When the distortion correction mode is OFF, the coordinate system follows
949      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
950      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array, and
951      * (ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.width - 1,
952      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right
953      * pixel in the pre-correction active pixel array.
954      * When the distortion correction mode is not OFF, the coordinate system follows
955      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
956      * <code>(0, 0)</code> being the top-left pixel of the active array, and
957      * (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.width - 1,
958      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.height - 1) being the bottom-right pixel in the
959      * active pixel array.</p>
960      * <p>The weight must range from 0 to 1000, and represents a weight
961      * for every pixel in the area. This means that a large metering area
962      * with the same weight as a smaller area will have more effect in
963      * the metering result. Metering areas can partially overlap and the
964      * camera device will add the weights in the overlap region.</p>
965      * <p>The weights are relative to weights of other white balance metering regions, so if
966      * only one region is used, all non-zero weights will have the same effect. A region with
967      * 0 weight is ignored.</p>
968      * <p>If all regions have 0 weight, then no specific metering area needs to be used by the
969      * camera device.</p>
970      * <p>If the metering region is outside the used ACAMERA_SCALER_CROP_REGION returned in
971      * capture result metadata, the camera device will ignore the sections outside the crop
972      * region and output only the intersection rectangle as the metering region in the result
973      * metadata.  If the region is entirely outside the crop region, it will be ignored and
974      * not reported in the result metadata.</p>
975      * <p>When setting the AWB metering regions, the application must consider the additional
976      * crop resulted from the aspect ratio differences between the preview stream and
977      * ACAMERA_SCALER_CROP_REGION. For example, if the ACAMERA_SCALER_CROP_REGION is the full
978      * active array size with 4:3 aspect ratio, and the preview stream is 16:9,
979      * the boundary of AWB regions will be [0, y_crop] and
980      * [active_width, active_height - 2 * y_crop] rather than [0, 0] and
981      * [active_width, active_height], where y_crop is the additional crop due to aspect ratio
982      * mismatch.</p>
983      * <p>Starting from API level 30, the coordinate system of activeArraySize or
984      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
985      * pre-zoom field of view. This means that the same awbRegions values at different
986      * ACAMERA_CONTROL_ZOOM_RATIO represent different parts of the scene. The awbRegions
987      * coordinates are relative to the activeArray/preCorrectionActiveArray representing the
988      * zoomed field of view. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0 (default), the same
989      * awbRegions at different ACAMERA_SCALER_CROP_REGION still represent the same parts of
990      * the scene as they do before. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use
991      * activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
992      * mode.</p>
993      * <p>For camera devices with the
994      * <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>
995      * capability or devices where
996      * <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
997      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a>,
998      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
999      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
1000      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
1001      * <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>
1002      * <p>The data representation is <code>int[5 * area_count]</code>.
1003      * Every five elements represent a metering region of <code>(xmin, ymin, xmax, ymax, weight)</code>.
1004      * The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
1005      * ymax.</p>
1006      *
1007      * @see ACAMERA_CONTROL_ZOOM_RATIO
1008      * @see ACAMERA_DISTORTION_CORRECTION_MODE
1009      * @see ACAMERA_SCALER_CROP_REGION
1010      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
1011      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
1012      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
1013      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
1014      * @see ACAMERA_SENSOR_PIXEL_MODE
1015      */
1016     ACAMERA_CONTROL_AWB_REGIONS =                               // int32[5*area_count]
1017             ACAMERA_CONTROL_START + 12,
1018     /**
1019      * <p>Information to the camera device 3A (auto-exposure,
1020      * auto-focus, auto-white balance) routines about the purpose
1021      * of this capture, to help the camera device to decide optimal 3A
1022      * strategy.</p>
1023      *
1024      * <p>Type: byte (acamera_metadata_enum_android_control_capture_intent_t)</p>
1025      *
1026      * <p>This tag may appear in:
1027      * <ul>
1028      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1029      *   <li>ACaptureRequest</li>
1030      * </ul></p>
1031      *
1032      * <p>This control (except for MANUAL) is only effective if
1033      * <code>ACAMERA_CONTROL_MODE != OFF</code> and any 3A routine is active.</p>
1034      * <p>All intents are supported by all devices, except that:</p>
1035      * <ul>
1036      * <li>ZERO_SHUTTER_LAG will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
1037      * PRIVATE_REPROCESSING or YUV_REPROCESSING.</li>
1038      * <li>MANUAL will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
1039      * MANUAL_SENSOR.</li>
1040      * <li>MOTION_TRACKING will be supported if ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
1041      * MOTION_TRACKING.</li>
1042      * </ul>
1043      *
1044      * @see ACAMERA_CONTROL_MODE
1045      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
1046      */
1047     ACAMERA_CONTROL_CAPTURE_INTENT =                            // byte (acamera_metadata_enum_android_control_capture_intent_t)
1048             ACAMERA_CONTROL_START + 13,
1049     /**
1050      * <p>A special color effect to apply.</p>
1051      *
1052      * <p>Type: byte (acamera_metadata_enum_android_control_effect_mode_t)</p>
1053      *
1054      * <p>This tag may appear in:
1055      * <ul>
1056      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1057      *   <li>ACaptureRequest</li>
1058      * </ul></p>
1059      *
1060      * <p>When this mode is set, a color effect will be applied
1061      * to images produced by the camera device. The interpretation
1062      * and implementation of these color effects is left to the
1063      * implementor of the camera device, and should not be
1064      * depended on to be consistent (or present) across all
1065      * devices.</p>
1066      */
1067     ACAMERA_CONTROL_EFFECT_MODE =                               // byte (acamera_metadata_enum_android_control_effect_mode_t)
1068             ACAMERA_CONTROL_START + 14,
1069     /**
1070      * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
1071      * routines.</p>
1072      *
1073      * <p>Type: byte (acamera_metadata_enum_android_control_mode_t)</p>
1074      *
1075      * <p>This tag may appear in:
1076      * <ul>
1077      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1078      *   <li>ACaptureRequest</li>
1079      * </ul></p>
1080      *
1081      * <p>This is a top-level 3A control switch. When set to OFF, all 3A control
1082      * by the camera device is disabled. The application must set the fields for
1083      * capture parameters itself.</p>
1084      * <p>When set to AUTO, the individual algorithm controls in
1085      * ACAMERA_CONTROL_* are in effect, such as ACAMERA_CONTROL_AF_MODE.</p>
1086      * <p>When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
1087      * ACAMERA_CONTROL_* are mostly disabled, and the camera device
1088      * implements one of the scene mode or extended scene mode settings (such as ACTION,
1089      * SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
1090      * 3A settings are provided by {@link ACameraCaptureSession_captureCallback_result capture results}.</p>
1091      * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1092      * is that this frame will not be used by camera device background 3A statistics
1093      * update, as if this frame is never captured. This mode can be used in the scenario
1094      * where the application doesn't want a 3A manual control capture to affect
1095      * the subsequent auto 3A capture results.</p>
1096      *
1097      * @see ACAMERA_CONTROL_AF_MODE
1098      */
1099     ACAMERA_CONTROL_MODE =                                      // byte (acamera_metadata_enum_android_control_mode_t)
1100             ACAMERA_CONTROL_START + 15,
1101     /**
1102      * <p>Control for which scene mode is currently active.</p>
1103      *
1104      * <p>Type: byte (acamera_metadata_enum_android_control_scene_mode_t)</p>
1105      *
1106      * <p>This tag may appear in:
1107      * <ul>
1108      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1109      *   <li>ACaptureRequest</li>
1110      * </ul></p>
1111      *
1112      * <p>Scene modes are custom camera modes optimized for a certain set of conditions and
1113      * capture settings.</p>
1114      * <p>This is the mode that that is active when
1115      * <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will
1116      * disable ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
1117      * while in use.</p>
1118      * <p>The interpretation and implementation of these scene modes is left
1119      * to the implementor of the camera device. Their behavior will not be
1120      * consistent across all devices, and any given device may only implement
1121      * a subset of these modes.</p>
1122      *
1123      * @see ACAMERA_CONTROL_AE_MODE
1124      * @see ACAMERA_CONTROL_AF_MODE
1125      * @see ACAMERA_CONTROL_AWB_MODE
1126      * @see ACAMERA_CONTROL_MODE
1127      */
1128     ACAMERA_CONTROL_SCENE_MODE =                                // byte (acamera_metadata_enum_android_control_scene_mode_t)
1129             ACAMERA_CONTROL_START + 16,
1130     /**
1131      * <p>Whether video stabilization is
1132      * active.</p>
1133      *
1134      * <p>Type: byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)</p>
1135      *
1136      * <p>This tag may appear in:
1137      * <ul>
1138      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1139      *   <li>ACaptureRequest</li>
1140      * </ul></p>
1141      *
1142      * <p>Video stabilization automatically warps images from
1143      * the camera in order to stabilize motion between consecutive frames.</p>
1144      * <p>If enabled, video stabilization can modify the
1145      * ACAMERA_SCALER_CROP_REGION to keep the video stream stabilized.</p>
1146      * <p>Switching between different video stabilization modes may take several
1147      * frames to initialize, the camera device will report the current mode
1148      * in capture result metadata. For example, When "ON" mode is requested,
1149      * the video stabilization modes in the first several capture results may
1150      * still be "OFF", and it will become "ON" when the initialization is
1151      * done.</p>
1152      * <p>In addition, not all recording sizes or frame rates may be supported for
1153      * stabilization by a device that reports stabilization support. It is guaranteed
1154      * that an output targeting a MediaRecorder or MediaCodec will be stabilized if
1155      * the recording resolution is less than or equal to 1920 x 1080 (width less than
1156      * or equal to 1920, height less than or equal to 1080), and the recording
1157      * frame rate is less than or equal to 30fps.  At other sizes, the CaptureResult
1158      * ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE field will return
1159      * OFF if the recording output is not stabilized, or if there are no output
1160      * Surface types that can be stabilized.</p>
1161      * <p>The application is strongly recommended to call
1162      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }
1163      * with the desired video stabilization mode before creating the capture session.
1164      * Video stabilization mode is a session parameter on many devices. Specifying
1165      * it at session creation time helps avoid reconfiguration delay caused by difference
1166      * between the default value and the first CaptureRequest.</p>
1167      * <p>If a camera device supports both this mode and OIS
1168      * (ACAMERA_LENS_OPTICAL_STABILIZATION_MODE), turning both modes on may
1169      * produce undesirable interaction, so it is recommended not to enable
1170      * both at the same time.</p>
1171      * <p>If video stabilization is set to "PREVIEW_STABILIZATION",
1172      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE is overridden. The camera sub-system may choose
1173      * to turn on hardware based image stabilization in addition to software based stabilization
1174      * if it deems that appropriate.
1175      * This key may be a part of the available session keys, which camera clients may
1176      * query via
1177      * {@link ACameraManager_getCameraCharacteristics }.
1178      * If this is the case, changing this key over the life-time of a capture session may
1179      * cause delays / glitches.</p>
1180      *
1181      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1182      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
1183      * @see ACAMERA_SCALER_CROP_REGION
1184      */
1185     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE =                  // byte (acamera_metadata_enum_android_control_video_stabilization_mode_t)
1186             ACAMERA_CONTROL_START + 17,
1187     /**
1188      * <p>List of auto-exposure antibanding modes for ACAMERA_CONTROL_AE_ANTIBANDING_MODE that are
1189      * supported by this camera device.</p>
1190      *
1191      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1192      *
1193      * <p>Type: byte[n]</p>
1194      *
1195      * <p>This tag may appear in:
1196      * <ul>
1197      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1198      * </ul></p>
1199      *
1200      * <p>Not all of the auto-exposure anti-banding modes may be
1201      * supported by a given camera device. This field lists the
1202      * valid anti-banding modes that the application may request
1203      * for this camera device with the
1204      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE control.</p>
1205      *
1206      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
1207      */
1208     ACAMERA_CONTROL_AE_AVAILABLE_ANTIBANDING_MODES =            // byte[n]
1209             ACAMERA_CONTROL_START + 18,
1210     /**
1211      * <p>List of auto-exposure modes for ACAMERA_CONTROL_AE_MODE that are supported by this camera
1212      * device.</p>
1213      *
1214      * @see ACAMERA_CONTROL_AE_MODE
1215      *
1216      * <p>Type: byte[n]</p>
1217      *
1218      * <p>This tag may appear in:
1219      * <ul>
1220      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1221      * </ul></p>
1222      *
1223      * <p>Not all the auto-exposure modes may be supported by a
1224      * given camera device, especially if no flash unit is
1225      * available. This entry lists the valid modes for
1226      * ACAMERA_CONTROL_AE_MODE for this camera device.</p>
1227      * <p>All camera devices support ON, and all camera devices with flash
1228      * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p>
1229      * <p>FULL mode camera devices always support OFF mode,
1230      * which enables application control of camera exposure time,
1231      * sensitivity, and frame duration.</p>
1232      * <p>LEGACY mode camera devices never support OFF mode.
1233      * LIMITED mode devices support OFF if they support the MANUAL_SENSOR
1234      * capability.</p>
1235      *
1236      * @see ACAMERA_CONTROL_AE_MODE
1237      */
1238     ACAMERA_CONTROL_AE_AVAILABLE_MODES =                        // byte[n]
1239             ACAMERA_CONTROL_START + 19,
1240     /**
1241      * <p>List of frame rate ranges for ACAMERA_CONTROL_AE_TARGET_FPS_RANGE supported by
1242      * this camera device.</p>
1243      *
1244      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
1245      *
1246      * <p>Type: int32[2*n]</p>
1247      *
1248      * <p>This tag may appear in:
1249      * <ul>
1250      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1251      * </ul></p>
1252      *
1253      * <p>For devices at the LEGACY level or above:</p>
1254      * <ul>
1255      * <li>
1256      * <p>For constant-framerate recording, for each normal
1257      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>, that is, a
1258      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1259      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#quality">quality</a> in
1260      * the range [<a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_LOW">QUALITY_LOW</a>,
1261      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#QUALITY_2160P">QUALITY_2160P</a>], if the profile is
1262      * supported by the device and has
1263      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code>, this list will
1264      * always include (<code>x</code>,<code>x</code>).</p>
1265      * </li>
1266      * <li>
1267      * <p>Also, a camera device must either not support any
1268      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a>,
1269      * or support at least one
1270      * normal <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> that has
1271      * <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html#videoFrameRate">videoFrameRate</a> <code>x</code> &gt;= 24.</p>
1272      * </li>
1273      * </ul>
1274      * <p>For devices at the LIMITED level or above:</p>
1275      * <ul>
1276      * <li>For devices that advertise NIR color filter arrangement in
1277      * ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT, this list will always include
1278      * (<code>max</code>, <code>max</code>) where <code>max</code> = the maximum output frame rate of the maximum YUV_420_888
1279      * output size.</li>
1280      * <li>For devices advertising any color filter arrangement other than NIR, or devices not
1281      * advertising color filter arrangement, this list will always include (<code>min</code>, <code>max</code>) and
1282      * (<code>max</code>, <code>max</code>) where <code>min</code> &lt;= 15 and <code>max</code> = the maximum output frame rate of the
1283      * maximum YUV_420_888 output size.</li>
1284      * </ul>
1285      *
1286      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
1287      */
1288     ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES =            // int32[2*n]
1289             ACAMERA_CONTROL_START + 20,
1290     /**
1291      * <p>Maximum and minimum exposure compensation values for
1292      * ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION, in counts of ACAMERA_CONTROL_AE_COMPENSATION_STEP,
1293      * that are supported by this camera device.</p>
1294      *
1295      * @see ACAMERA_CONTROL_AE_COMPENSATION_STEP
1296      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1297      *
1298      * <p>Type: int32[2]</p>
1299      *
1300      * <p>This tag may appear in:
1301      * <ul>
1302      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1303      * </ul></p>
1304      *
1305      */
1306     ACAMERA_CONTROL_AE_COMPENSATION_RANGE =                     // int32[2]
1307             ACAMERA_CONTROL_START + 21,
1308     /**
1309      * <p>Smallest step by which the exposure compensation
1310      * can be changed.</p>
1311      *
1312      * <p>Type: rational</p>
1313      *
1314      * <p>This tag may appear in:
1315      * <ul>
1316      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1317      * </ul></p>
1318      *
1319      * <p>This is the unit for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION. For example, if this key has
1320      * a value of <code>1/2</code>, then a setting of <code>-2</code> for ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION means
1321      * that the target EV offset for the auto-exposure routine is -1 EV.</p>
1322      * <p>One unit of EV compensation changes the brightness of the captured image by a factor
1323      * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p>
1324      *
1325      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
1326      */
1327     ACAMERA_CONTROL_AE_COMPENSATION_STEP =                      // rational
1328             ACAMERA_CONTROL_START + 22,
1329     /**
1330      * <p>List of auto-focus (AF) modes for ACAMERA_CONTROL_AF_MODE that are
1331      * supported by this camera device.</p>
1332      *
1333      * @see ACAMERA_CONTROL_AF_MODE
1334      *
1335      * <p>Type: byte[n]</p>
1336      *
1337      * <p>This tag may appear in:
1338      * <ul>
1339      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1340      * </ul></p>
1341      *
1342      * <p>Not all the auto-focus modes may be supported by a
1343      * given camera device. This entry lists the valid modes for
1344      * ACAMERA_CONTROL_AF_MODE for this camera device.</p>
1345      * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all
1346      * camera devices with adjustable focuser units
1347      * (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE &gt; 0</code>) will support AUTO mode.</p>
1348      * <p>LEGACY devices will support OFF mode only if they support
1349      * focusing to infinity (by also setting ACAMERA_LENS_FOCUS_DISTANCE to
1350      * <code>0.0f</code>).</p>
1351      *
1352      * @see ACAMERA_CONTROL_AF_MODE
1353      * @see ACAMERA_LENS_FOCUS_DISTANCE
1354      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
1355      */
1356     ACAMERA_CONTROL_AF_AVAILABLE_MODES =                        // byte[n]
1357             ACAMERA_CONTROL_START + 23,
1358     /**
1359      * <p>List of color effects for ACAMERA_CONTROL_EFFECT_MODE that are supported by this camera
1360      * device.</p>
1361      *
1362      * @see ACAMERA_CONTROL_EFFECT_MODE
1363      *
1364      * <p>Type: byte[n]</p>
1365      *
1366      * <p>This tag may appear in:
1367      * <ul>
1368      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1369      * </ul></p>
1370      *
1371      * <p>This list contains the color effect modes that can be applied to
1372      * images produced by the camera device.
1373      * Implementations are not expected to be consistent across all devices.
1374      * If no color effect modes are available for a device, this will only list
1375      * OFF.</p>
1376      * <p>A color effect will only be applied if
1377      * ACAMERA_CONTROL_MODE != OFF.  OFF is always included in this list.</p>
1378      * <p>This control has no effect on the operation of other control routines such
1379      * as auto-exposure, white balance, or focus.</p>
1380      *
1381      * @see ACAMERA_CONTROL_MODE
1382      */
1383     ACAMERA_CONTROL_AVAILABLE_EFFECTS =                         // byte[n]
1384             ACAMERA_CONTROL_START + 24,
1385     /**
1386      * <p>List of scene modes for ACAMERA_CONTROL_SCENE_MODE that are supported by this camera
1387      * device.</p>
1388      *
1389      * @see ACAMERA_CONTROL_SCENE_MODE
1390      *
1391      * <p>Type: byte[n]</p>
1392      *
1393      * <p>This tag may appear in:
1394      * <ul>
1395      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1396      * </ul></p>
1397      *
1398      * <p>This list contains scene modes that can be set for the camera device.
1399      * Only scene modes that have been fully implemented for the
1400      * camera device may be included here. Implementations are not expected
1401      * to be consistent across all devices.</p>
1402      * <p>If no scene modes are supported by the camera device, this
1403      * will be set to DISABLED. Otherwise DISABLED will not be listed.</p>
1404      * <p>FACE_PRIORITY is always listed if face detection is
1405      * supported (i.e.<code>ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT &gt;
1406      * 0</code>).</p>
1407      *
1408      * @see ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT
1409      */
1410     ACAMERA_CONTROL_AVAILABLE_SCENE_MODES =                     // byte[n]
1411             ACAMERA_CONTROL_START + 25,
1412     /**
1413      * <p>List of video stabilization modes for ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1414      * that are supported by this camera device.</p>
1415      *
1416      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
1417      *
1418      * <p>Type: byte[n]</p>
1419      *
1420      * <p>This tag may appear in:
1421      * <ul>
1422      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1423      * </ul></p>
1424      *
1425      * <p>OFF will always be listed.</p>
1426      */
1427     ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES =       // byte[n]
1428             ACAMERA_CONTROL_START + 26,
1429     /**
1430      * <p>List of auto-white-balance modes for ACAMERA_CONTROL_AWB_MODE that are supported by this
1431      * camera device.</p>
1432      *
1433      * @see ACAMERA_CONTROL_AWB_MODE
1434      *
1435      * <p>Type: byte[n]</p>
1436      *
1437      * <p>This tag may appear in:
1438      * <ul>
1439      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1440      * </ul></p>
1441      *
1442      * <p>Not all the auto-white-balance modes may be supported by a
1443      * given camera device. This entry lists the valid modes for
1444      * ACAMERA_CONTROL_AWB_MODE for this camera device.</p>
1445      * <p>All camera devices will support ON mode.</p>
1446      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
1447      * mode, which enables application control of white balance, by using
1448      * ACAMERA_COLOR_CORRECTION_TRANSFORM and ACAMERA_COLOR_CORRECTION_GAINS(ACAMERA_COLOR_CORRECTION_MODE must be set to TRANSFORM_MATRIX). This includes all FULL
1449      * mode camera devices.</p>
1450      *
1451      * @see ACAMERA_COLOR_CORRECTION_GAINS
1452      * @see ACAMERA_COLOR_CORRECTION_MODE
1453      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
1454      * @see ACAMERA_CONTROL_AWB_MODE
1455      */
1456     ACAMERA_CONTROL_AWB_AVAILABLE_MODES =                       // byte[n]
1457             ACAMERA_CONTROL_START + 27,
1458     /**
1459      * <p>List of the maximum number of regions that can be used for metering in
1460      * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
1461      * this corresponds to the maximum number of elements in
1462      * ACAMERA_CONTROL_AE_REGIONS, ACAMERA_CONTROL_AWB_REGIONS,
1463      * and ACAMERA_CONTROL_AF_REGIONS.</p>
1464      *
1465      * @see ACAMERA_CONTROL_AE_REGIONS
1466      * @see ACAMERA_CONTROL_AF_REGIONS
1467      * @see ACAMERA_CONTROL_AWB_REGIONS
1468      *
1469      * <p>Type: int32[3]</p>
1470      *
1471      * <p>This tag may appear in:
1472      * <ul>
1473      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1474      * </ul></p>
1475      *
1476      */
1477     ACAMERA_CONTROL_MAX_REGIONS =                               // int32[3]
1478             ACAMERA_CONTROL_START + 28,
1479     /**
1480      * <p>Current state of the auto-exposure (AE) algorithm.</p>
1481      *
1482      * <p>Type: byte (acamera_metadata_enum_android_control_ae_state_t)</p>
1483      *
1484      * <p>This tag may appear in:
1485      * <ul>
1486      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1487      * </ul></p>
1488      *
1489      * <p>Switching between or enabling AE modes (ACAMERA_CONTROL_AE_MODE) always
1490      * resets the AE state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1491      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1492      * the algorithm states to INACTIVE.</p>
1493      * <p>The camera device can do several state transitions between two results, if it is
1494      * allowed by the state transition table. For example: INACTIVE may never actually be
1495      * seen in a result.</p>
1496      * <p>The state in the result is the state for this image (in sync with this image): if
1497      * AE state becomes CONVERGED, then the image data associated with this result should
1498      * be good to use.</p>
1499      * <p>Below are state transition tables for different AE modes.</p>
1500      * <p>State       | Transition Cause | New State | Notes
1501      * :------------:|:----------------:|:---------:|:-----------------------:
1502      * INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled</p>
1503      * <p>When ACAMERA_CONTROL_AE_MODE is AE_MODE_ON*:</p>
1504      * <p>State        | Transition Cause                             | New State      | Notes
1505      * :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
1506      * INACTIVE       | Camera device initiates AE scan              | SEARCHING      | Values changing
1507      * INACTIVE       | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1508      * SEARCHING      | Camera device finishes AE scan               | CONVERGED      | Good values, not changing
1509      * SEARCHING      | Camera device finishes AE scan               | FLASH_REQUIRED | Converged but too dark w/o flash
1510      * SEARCHING      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1511      * CONVERGED      | Camera device initiates AE scan              | SEARCHING      | Values changing
1512      * CONVERGED      | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1513      * FLASH_REQUIRED | Camera device initiates AE scan              | SEARCHING      | Values changing
1514      * FLASH_REQUIRED | ACAMERA_CONTROL_AE_LOCK is ON                 | LOCKED         | Values locked
1515      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | SEARCHING      | Values not good after unlock
1516      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | CONVERGED      | Values good after unlock
1517      * LOCKED         | ACAMERA_CONTROL_AE_LOCK is OFF                | FLASH_REQUIRED | Exposure good, but too dark
1518      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is OFF | CONVERGED      | Ready for high-quality capture
1519      * PRECAPTURE     | Sequence done. ACAMERA_CONTROL_AE_LOCK is ON  | LOCKED         | Ready for high-quality capture
1520      * LOCKED         | aeLock is ON and aePrecaptureTrigger is START | LOCKED        | Precapture trigger is ignored when AE is already locked
1521      * LOCKED         | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED        | Precapture trigger is ignored when AE is already locked
1522      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is START | PRECAPTURE     | Start AE precapture metering sequence
1523      * Any state (excluding LOCKED) | ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled</p>
1524      * <p>If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
1525      * ACAMERA_CONTROL_AE_AVAILABLE_MODES), ACAMERA_CONTROL_AE_STATE must be FLASH_REQUIRED after
1526      * the camera device finishes AE scan and it's too dark without flash.</p>
1527      * <p>For the above table, the camera device may skip reporting any state changes that happen
1528      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1529      * can be skipped in that manner is called a transient state.</p>
1530      * <p>For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
1531      * listed in above table, it is also legal for the camera device to skip one or more
1532      * transient states between two results. See below table for examples:</p>
1533      * <p>State        | Transition Cause                                            | New State      | Notes
1534      * :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
1535      * INACTIVE       | Camera device finished AE scan                              | CONVERGED      | Values are already good, transient states are skipped by camera device.
1536      * 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.
1537      * 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.
1538      * 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.
1539      * 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.
1540      * 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.
1541      * FLASH_REQUIRED | Camera device finished AE scan                              | CONVERGED      | Converged after a new scan, transient states are skipped by camera device.</p>
1542      *
1543      * @see ACAMERA_CONTROL_AE_AVAILABLE_MODES
1544      * @see ACAMERA_CONTROL_AE_LOCK
1545      * @see ACAMERA_CONTROL_AE_MODE
1546      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
1547      * @see ACAMERA_CONTROL_AE_STATE
1548      * @see ACAMERA_CONTROL_MODE
1549      * @see ACAMERA_CONTROL_SCENE_MODE
1550      */
1551     ACAMERA_CONTROL_AE_STATE =                                  // byte (acamera_metadata_enum_android_control_ae_state_t)
1552             ACAMERA_CONTROL_START + 31,
1553     /**
1554      * <p>Current state of auto-focus (AF) algorithm.</p>
1555      *
1556      * <p>Type: byte (acamera_metadata_enum_android_control_af_state_t)</p>
1557      *
1558      * <p>This tag may appear in:
1559      * <ul>
1560      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1561      * </ul></p>
1562      *
1563      * <p>Switching between or enabling AF modes (ACAMERA_CONTROL_AF_MODE) always
1564      * resets the AF state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1565      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1566      * the algorithm states to INACTIVE.</p>
1567      * <p>The camera device can do several state transitions between two results, if it is
1568      * allowed by the state transition table. For example: INACTIVE may never actually be
1569      * seen in a result.</p>
1570      * <p>The state in the result is the state for this image (in sync with this image): if
1571      * AF state becomes FOCUSED, then the image data associated with this result should
1572      * be sharp.</p>
1573      * <p>Below are state transition tables for different AF modes.</p>
1574      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_OFF or AF_MODE_EDOF:</p>
1575      * <p>State       | Transition Cause | New State | Notes
1576      * :------------:|:----------------:|:---------:|:-----------:
1577      * INACTIVE      |                  | INACTIVE  | Never changes</p>
1578      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_AUTO or AF_MODE_MACRO:</p>
1579      * <p>State            | Transition Cause | New State          | Notes
1580      * :-----------------:|:----------------:|:------------------:|:--------------:
1581      * INACTIVE           | AF_TRIGGER       | ACTIVE_SCAN        | Start AF sweep, Lens now moving
1582      * ACTIVE_SCAN        | AF sweep done    | FOCUSED_LOCKED     | Focused, Lens now locked
1583      * ACTIVE_SCAN        | AF sweep done    | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
1584      * ACTIVE_SCAN        | AF_CANCEL        | INACTIVE           | Cancel/reset AF, Lens now locked
1585      * FOCUSED_LOCKED     | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1586      * FOCUSED_LOCKED     | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1587      * NOT_FOCUSED_LOCKED | AF_CANCEL        | INACTIVE           | Cancel/reset AF
1588      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
1589      * Any state          | Mode change      | INACTIVE           |</p>
1590      * <p>For the above table, the camera device may skip reporting any state changes that happen
1591      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1592      * can be skipped in that manner is called a transient state.</p>
1593      * <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
1594      * state transitions listed in above table, it is also legal for the camera device to skip
1595      * one or more transient states between two results. See below table for examples:</p>
1596      * <p>State            | Transition Cause | New State          | Notes
1597      * :-----------------:|:----------------:|:------------------:|:--------------:
1598      * INACTIVE           | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1599      * INACTIVE           | AF_TRIGGER       | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
1600      * FOCUSED_LOCKED     | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
1601      * NOT_FOCUSED_LOCKED | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is good after a scan, lens is not locked.</p>
1602      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_VIDEO:</p>
1603      * <p>State            | Transition Cause                    | New State          | Notes
1604      * :-----------------:|:-----------------------------------:|:------------------:|:--------------:
1605      * INACTIVE           | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1606      * INACTIVE           | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1607      * PASSIVE_SCAN       | Camera device completes current scan| PASSIVE_FOCUSED    | End AF scan, Lens now locked
1608      * PASSIVE_SCAN       | Camera device fails current scan    | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1609      * PASSIVE_SCAN       | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, if focus is good. Lens now locked
1610      * PASSIVE_SCAN       | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
1611      * PASSIVE_SCAN       | AF_CANCEL                           | INACTIVE           | Reset lens position, Lens now locked
1612      * PASSIVE_FOCUSED    | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1613      * PASSIVE_UNFOCUSED  | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
1614      * PASSIVE_FOCUSED    | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, lens now locked
1615      * PASSIVE_UNFOCUSED  | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
1616      * FOCUSED_LOCKED     | AF_TRIGGER                          | FOCUSED_LOCKED     | No effect
1617      * FOCUSED_LOCKED     | AF_CANCEL                           | INACTIVE           | Restart AF scan
1618      * NOT_FOCUSED_LOCKED | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | No effect
1619      * NOT_FOCUSED_LOCKED | AF_CANCEL                           | INACTIVE           | Restart AF scan</p>
1620      * <p>When ACAMERA_CONTROL_AF_MODE is AF_MODE_CONTINUOUS_PICTURE:</p>
1621      * <p>State            | Transition Cause                     | New State          | Notes
1622      * :-----------------:|:------------------------------------:|:------------------:|:--------------:
1623      * INACTIVE           | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1624      * INACTIVE           | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
1625      * PASSIVE_SCAN       | Camera device completes current scan | PASSIVE_FOCUSED    | End AF scan, Lens now locked
1626      * PASSIVE_SCAN       | Camera device fails current scan     | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
1627      * PASSIVE_SCAN       | AF_TRIGGER                           | FOCUSED_LOCKED     | Eventual transition once the focus is good. Lens now locked
1628      * PASSIVE_SCAN       | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
1629      * PASSIVE_SCAN       | AF_CANCEL                            | INACTIVE           | Reset lens position, Lens now locked
1630      * PASSIVE_FOCUSED    | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1631      * PASSIVE_UNFOCUSED  | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
1632      * PASSIVE_FOCUSED    | AF_TRIGGER                           | FOCUSED_LOCKED     | Immediate trans. Lens now locked
1633      * PASSIVE_UNFOCUSED  | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
1634      * FOCUSED_LOCKED     | AF_TRIGGER                           | FOCUSED_LOCKED     | No effect
1635      * FOCUSED_LOCKED     | AF_CANCEL                            | INACTIVE           | Restart AF scan
1636      * NOT_FOCUSED_LOCKED | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | No effect
1637      * NOT_FOCUSED_LOCKED | AF_CANCEL                            | INACTIVE           | Restart AF scan</p>
1638      * <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
1639      * (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
1640      * camera device. When a trigger is included in a mode switch request, the trigger
1641      * will be evaluated in the context of the new mode in the request.
1642      * See below table for examples:</p>
1643      * <p>State      | Transition Cause                       | New State                                | Notes
1644      * :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
1645      * any state    | CAF--&gt;AUTO mode switch                 | INACTIVE                                 | Mode switch without trigger, initial state must be INACTIVE
1646      * any state    | CAF--&gt;AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE   | Mode switch with trigger, INACTIVE is skipped
1647      * any state    | AUTO--&gt;CAF mode switch                 | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped</p>
1648      *
1649      * @see ACAMERA_CONTROL_AF_MODE
1650      * @see ACAMERA_CONTROL_MODE
1651      * @see ACAMERA_CONTROL_SCENE_MODE
1652      */
1653     ACAMERA_CONTROL_AF_STATE =                                  // byte (acamera_metadata_enum_android_control_af_state_t)
1654             ACAMERA_CONTROL_START + 32,
1655     /**
1656      * <p>Current state of auto-white balance (AWB) algorithm.</p>
1657      *
1658      * <p>Type: byte (acamera_metadata_enum_android_control_awb_state_t)</p>
1659      *
1660      * <p>This tag may appear in:
1661      * <ul>
1662      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1663      * </ul></p>
1664      *
1665      * <p>Switching between or enabling AWB modes (ACAMERA_CONTROL_AWB_MODE) always
1666      * resets the AWB state to INACTIVE. Similarly, switching between ACAMERA_CONTROL_MODE,
1667      * or ACAMERA_CONTROL_SCENE_MODE if <code>ACAMERA_CONTROL_MODE == USE_SCENE_MODE</code> resets all
1668      * the algorithm states to INACTIVE.</p>
1669      * <p>The camera device can do several state transitions between two results, if it is
1670      * allowed by the state transition table. So INACTIVE may never actually be seen in
1671      * a result.</p>
1672      * <p>The state in the result is the state for this image (in sync with this image): if
1673      * AWB state becomes CONVERGED, then the image data associated with this result should
1674      * be good to use.</p>
1675      * <p>Below are state transition tables for different AWB modes.</p>
1676      * <p>When <code>ACAMERA_CONTROL_AWB_MODE != AWB_MODE_AUTO</code>:</p>
1677      * <p>State       | Transition Cause | New State | Notes
1678      * :------------:|:----------------:|:---------:|:-----------------------:
1679      * INACTIVE      |                  |INACTIVE   |Camera device auto white balance algorithm is disabled</p>
1680      * <p>When ACAMERA_CONTROL_AWB_MODE is AWB_MODE_AUTO:</p>
1681      * <p>State        | Transition Cause                 | New State     | Notes
1682      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1683      * INACTIVE       | Camera device initiates AWB scan | SEARCHING     | Values changing
1684      * INACTIVE       | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1685      * SEARCHING      | Camera device finishes AWB scan  | CONVERGED     | Good values, not changing
1686      * SEARCHING      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1687      * CONVERGED      | Camera device initiates AWB scan | SEARCHING     | Values changing
1688      * CONVERGED      | ACAMERA_CONTROL_AWB_LOCK is ON    | LOCKED        | Values locked
1689      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | SEARCHING     | Values not good after unlock</p>
1690      * <p>For the above table, the camera device may skip reporting any state changes that happen
1691      * without application intervention (i.e. mode switch, trigger, locking). Any state that
1692      * can be skipped in that manner is called a transient state.</p>
1693      * <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
1694      * listed in above table, it is also legal for the camera device to skip one or more
1695      * transient states between two results. See below table for examples:</p>
1696      * <p>State        | Transition Cause                 | New State     | Notes
1697      * :-------------:|:--------------------------------:|:-------------:|:-----------------:
1698      * INACTIVE       | Camera device finished AWB scan  | CONVERGED     | Values are already good, transient states are skipped by camera device.
1699      * LOCKED         | ACAMERA_CONTROL_AWB_LOCK is OFF   | CONVERGED     | Values good after unlock, transient states are skipped by camera device.</p>
1700      *
1701      * @see ACAMERA_CONTROL_AWB_LOCK
1702      * @see ACAMERA_CONTROL_AWB_MODE
1703      * @see ACAMERA_CONTROL_MODE
1704      * @see ACAMERA_CONTROL_SCENE_MODE
1705      */
1706     ACAMERA_CONTROL_AWB_STATE =                                 // byte (acamera_metadata_enum_android_control_awb_state_t)
1707             ACAMERA_CONTROL_START + 34,
1708     /**
1709      * <p>Whether the camera device supports ACAMERA_CONTROL_AE_LOCK</p>
1710      *
1711      * @see ACAMERA_CONTROL_AE_LOCK
1712      *
1713      * <p>Type: byte (acamera_metadata_enum_android_control_ae_lock_available_t)</p>
1714      *
1715      * <p>This tag may appear in:
1716      * <ul>
1717      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1718      * </ul></p>
1719      *
1720      * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
1721      * list <code>true</code>. This includes FULL devices.</p>
1722      */
1723     ACAMERA_CONTROL_AE_LOCK_AVAILABLE =                         // byte (acamera_metadata_enum_android_control_ae_lock_available_t)
1724             ACAMERA_CONTROL_START + 36,
1725     /**
1726      * <p>Whether the camera device supports ACAMERA_CONTROL_AWB_LOCK</p>
1727      *
1728      * @see ACAMERA_CONTROL_AWB_LOCK
1729      *
1730      * <p>Type: byte (acamera_metadata_enum_android_control_awb_lock_available_t)</p>
1731      *
1732      * <p>This tag may appear in:
1733      * <ul>
1734      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1735      * </ul></p>
1736      *
1737      * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
1738      * always list <code>true</code>. This includes FULL devices.</p>
1739      */
1740     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE =                        // byte (acamera_metadata_enum_android_control_awb_lock_available_t)
1741             ACAMERA_CONTROL_START + 37,
1742     /**
1743      * <p>List of control modes for ACAMERA_CONTROL_MODE that are supported by this camera
1744      * device.</p>
1745      *
1746      * @see ACAMERA_CONTROL_MODE
1747      *
1748      * <p>Type: byte[n]</p>
1749      *
1750      * <p>This tag may appear in:
1751      * <ul>
1752      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1753      * </ul></p>
1754      *
1755      * <p>This list contains control modes that can be set for the camera device.
1756      * LEGACY mode devices will always support AUTO mode. LIMITED and FULL
1757      * devices will always support OFF, AUTO modes.</p>
1758      */
1759     ACAMERA_CONTROL_AVAILABLE_MODES =                           // byte[n]
1760             ACAMERA_CONTROL_START + 38,
1761     /**
1762      * <p>Range of boosts for ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST supported
1763      * by this camera device.</p>
1764      *
1765      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1766      *
1767      * <p>Type: int32[2]</p>
1768      *
1769      * <p>This tag may appear in:
1770      * <ul>
1771      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1772      * </ul></p>
1773      *
1774      * <p>Devices support post RAW sensitivity boost  will advertise
1775      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST key for controlling
1776      * post RAW sensitivity boost.</p>
1777      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1778      * outputs. For devices that do support RAW format outputs, this key will always
1779      * present, and if a device does not support post RAW sensitivity boost, it will
1780      * list <code>(100, 100)</code> in this key.</p>
1781      *
1782      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1783      */
1784     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE =          // int32[2]
1785             ACAMERA_CONTROL_START + 39,
1786     /**
1787      * <p>The amount of additional sensitivity boost applied to output images
1788      * after RAW sensor data is captured.</p>
1789      *
1790      * <p>Type: int32</p>
1791      *
1792      * <p>This tag may appear in:
1793      * <ul>
1794      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1795      *   <li>ACaptureRequest</li>
1796      * </ul></p>
1797      *
1798      * <p>Some camera devices support additional digital sensitivity boosting in the
1799      * camera processing pipeline after sensor RAW image is captured.
1800      * Such a boost will be applied to YUV/JPEG format output images but will not
1801      * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p>
1802      * <p>This key will be <code>null</code> for devices that do not support any RAW format
1803      * outputs. For devices that do support RAW format outputs, this key will always
1804      * present, and if a device does not support post RAW sensitivity boost, it will
1805      * list <code>100</code> in this key.</p>
1806      * <p>If the camera device cannot apply the exact boost requested, it will reduce the
1807      * boost to the nearest supported value.
1808      * The final boost value used will be available in the output capture result.</p>
1809      * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images
1810      * of such device will have the total sensitivity of
1811      * <code>ACAMERA_SENSOR_SENSITIVITY * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST / 100</code>
1812      * The sensitivity of RAW format images will always be <code>ACAMERA_SENSOR_SENSITIVITY</code></p>
1813      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
1814      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
1815      *
1816      * @see ACAMERA_CONTROL_AE_MODE
1817      * @see ACAMERA_CONTROL_MODE
1818      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
1819      * @see ACAMERA_SENSOR_SENSITIVITY
1820      */
1821     ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST =                // int32
1822             ACAMERA_CONTROL_START + 40,
1823     /**
1824      * <p>Allow camera device to enable zero-shutter-lag mode for requests with
1825      * ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE.</p>
1826      *
1827      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1828      *
1829      * <p>Type: byte (acamera_metadata_enum_android_control_enable_zsl_t)</p>
1830      *
1831      * <p>This tag may appear in:
1832      * <ul>
1833      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1834      *   <li>ACaptureRequest</li>
1835      * </ul></p>
1836      *
1837      * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with
1838      * STILL_CAPTURE capture intent. The camera device may use images captured in the past to
1839      * produce output images for a zero-shutter-lag request. The result metadata including the
1840      * ACAMERA_SENSOR_TIMESTAMP reflects the source frames used to produce output images.
1841      * Therefore, the contents of the output images and the result metadata may be out of order
1842      * compared to previous regular requests. enableZsl does not affect requests with other
1843      * capture intents.</p>
1844      * <p>For example, when requests are submitted in the following order:
1845      *   Request A: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is PREVIEW
1846      *   Request B: enableZsl is ON, ACAMERA_CONTROL_CAPTURE_INTENT is STILL_CAPTURE</p>
1847      * <p>The output images for request B may have contents captured before the output images for
1848      * request A, and the result metadata for request B may be older than the result metadata for
1849      * request A.</p>
1850      * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in
1851      * the past for requests with STILL_CAPTURE capture intent.</p>
1852      * <p>For applications targeting SDK versions O and newer, the value of enableZsl in
1853      * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
1854      * <code>false</code> if present.</p>
1855      * <p>For applications targeting SDK versions older than O, the value of enableZsl in all
1856      * capture templates is always <code>false</code> if present.</p>
1857      * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
1858      *
1859      * @see ACAMERA_CONTROL_CAPTURE_INTENT
1860      * @see ACAMERA_SENSOR_TIMESTAMP
1861      */
1862     ACAMERA_CONTROL_ENABLE_ZSL =                                // byte (acamera_metadata_enum_android_control_enable_zsl_t)
1863             ACAMERA_CONTROL_START + 41,
1864     /**
1865      * <p>Whether a significant scene change is detected within the currently-set AF
1866      * region(s).</p>
1867      *
1868      * <p>Type: byte (acamera_metadata_enum_android_control_af_scene_change_t)</p>
1869      *
1870      * <p>This tag may appear in:
1871      * <ul>
1872      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1873      * </ul></p>
1874      *
1875      * <p>When the camera focus routine detects a change in the scene it is looking at,
1876      * such as a large shift in camera viewpoint, significant motion in the scene, or a
1877      * significant illumination change, this value will be set to DETECTED for a single capture
1878      * result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
1879      * to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.</p>
1880      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
1881      */
1882     ACAMERA_CONTROL_AF_SCENE_CHANGE =                           // byte (acamera_metadata_enum_android_control_af_scene_change_t)
1883             ACAMERA_CONTROL_START + 42,
1884     /**
1885      * <p>The list of extended scene modes for ACAMERA_CONTROL_EXTENDED_SCENE_MODE that are supported
1886      * by this camera device, and each extended scene mode's maximum streaming (non-stall) size
1887      * with  effect.</p>
1888      *
1889      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1890      *
1891      * <p>Type: int32[3*n]</p>
1892      *
1893      * <p>This tag may appear in:
1894      * <ul>
1895      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1896      * </ul></p>
1897      *
1898      * <p>For DISABLED mode, the camera behaves normally with no extended scene mode enabled.</p>
1899      * <p>For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
1900      * under which bokeh is effective when capture intent is PREVIEW. Note that when capture
1901      * intent is PREVIEW, the bokeh effect may not be as high in quality compared to
1902      * STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming
1903      * dimension must be one of the YUV_420_888 or PRIVATE resolutions in
1904      * availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the
1905      * application configures a stream larger than the maximum streaming dimension, bokeh
1906      * effect may not be applied for this stream for PREVIEW intent.</p>
1907      * <p>For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
1908      * which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
1909      * resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
1910      * larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
1911      * If the application configures a stream with larger dimension, the stream may not have
1912      * bokeh effect applied.</p>
1913      */
1914     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES =   // int32[3*n]
1915             ACAMERA_CONTROL_START + 43,
1916     /**
1917      * <p>The ranges of supported zoom ratio for non-DISABLED ACAMERA_CONTROL_EXTENDED_SCENE_MODE.</p>
1918      *
1919      * @see ACAMERA_CONTROL_EXTENDED_SCENE_MODE
1920      *
1921      * <p>Type: float[2*n]</p>
1922      *
1923      * <p>This tag may appear in:
1924      * <ul>
1925      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1926      * </ul></p>
1927      *
1928      * <p>When extended scene mode is set, the camera device may have limited range of zoom ratios
1929      * compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges
1930      * for all supported non-DISABLED extended scene modes, in the same order as in
1931      * android.control.availableExtended.</p>
1932      * <p>Range [1.0, 1.0] means that no zoom (optical or digital) is supported.</p>
1933      */
1934     ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_ZOOM_RATIO_RANGES =
1935                                                                 // float[2*n]
1936             ACAMERA_CONTROL_START + 44,
1937     /**
1938      * <p>Whether extended scene mode is enabled for a particular capture request.</p>
1939      *
1940      * <p>Type: byte (acamera_metadata_enum_android_control_extended_scene_mode_t)</p>
1941      *
1942      * <p>This tag may appear in:
1943      * <ul>
1944      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
1945      *   <li>ACaptureRequest</li>
1946      * </ul></p>
1947      *
1948      * <p>With bokeh mode, the camera device may blur out the parts of scene that are not in
1949      * focus, creating a bokeh (or shallow depth of field) effect for people or objects.</p>
1950      * <p>When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
1951      * processing needed for high quality bokeh effect, the stall may be longer than when
1952      * capture intent is not STILL_CAPTURE.</p>
1953      * <p>When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,</p>
1954      * <ul>
1955      * <li>If the camera device has BURST_CAPTURE capability, the frame rate requirement of
1956      * BURST_CAPTURE must still be met.</li>
1957      * <li>All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
1958      * (queried via {@link ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES })
1959      * will have preview bokeh effect applied.</li>
1960      * </ul>
1961      * <p>When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
1962      * maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
1963      * be available for streams larger than the maximum streaming dimension.</p>
1964      * <p>Switching between different extended scene modes may involve reconfiguration of the camera
1965      * pipeline, resulting in long latency. The application should check this key against the
1966      * available session keys queried via
1967      * {@link ACameraManager_getCameraCharacteristics }.</p>
1968      * <p>For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
1969      * with different field of view. As a result, when bokeh mode is enabled, the camera device
1970      * may override ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO, and the field of
1971      * view may be smaller than when bokeh mode is off.</p>
1972      *
1973      * @see ACAMERA_CONTROL_ZOOM_RATIO
1974      * @see ACAMERA_SCALER_CROP_REGION
1975      */
1976     ACAMERA_CONTROL_EXTENDED_SCENE_MODE =                       // byte (acamera_metadata_enum_android_control_extended_scene_mode_t)
1977             ACAMERA_CONTROL_START + 45,
1978     /**
1979      * <p>Minimum and maximum zoom ratios supported by this camera device.</p>
1980      *
1981      * <p>Type: float[2]</p>
1982      *
1983      * <p>This tag may appear in:
1984      * <ul>
1985      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
1986      * </ul></p>
1987      *
1988      * <p>If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
1989      * setting ACAMERA_CONTROL_ZOOM_RATIO to values less than 1.0 increases the camera's field
1990      * of view.</p>
1991      *
1992      * @see ACAMERA_CONTROL_ZOOM_RATIO
1993      */
1994     ACAMERA_CONTROL_ZOOM_RATIO_RANGE =                          // float[2]
1995             ACAMERA_CONTROL_START + 46,
1996     /**
1997      * <p>The desired zoom ratio</p>
1998      *
1999      * <p>Type: float</p>
2000      *
2001      * <p>This tag may appear in:
2002      * <ul>
2003      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2004      *   <li>ACaptureRequest</li>
2005      * </ul></p>
2006      *
2007      * <p>Instead of using ACAMERA_SCALER_CROP_REGION for zoom, the application can now choose to
2008      * use this tag to specify the desired zoom level.</p>
2009      * <p>By using this control, the application gains a simpler way to control zoom, which can
2010      * be a combination of optical and digital zoom. For example, a multi-camera system may
2011      * contain more than one lens with different focal lengths, and the user can use optical
2012      * zoom by switching between lenses. Using zoomRatio has benefits in the scenarios below:</p>
2013      * <ul>
2014      * <li>Zooming in from a wide-angle lens to a telephoto lens: A floating-point ratio provides
2015      *   better precision compared to an integer value of ACAMERA_SCALER_CROP_REGION.</li>
2016      * <li>Zooming out from a wide lens to an ultrawide lens: zoomRatio supports zoom-out whereas
2017      *   ACAMERA_SCALER_CROP_REGION doesn't.</li>
2018      * </ul>
2019      * <p>To illustrate, here are several scenarios of different zoom ratios, crop regions,
2020      * and output streams, for a hypothetical camera device with an active array of size
2021      * <code>(2000,1500)</code>.</p>
2022      * <ul>
2023      * <li>Camera Configuration:<ul>
2024      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
2025      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
2026      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
2027      * </ul>
2028      * </li>
2029      * <li>Case #1: 4:3 crop region with 2.0x zoom ratio<ul>
2030      * <li>Zoomed field of view: 1/4 of original field of view</li>
2031      * <li>Crop region: <code>Rect(0, 0, 2000, 1500) // (left, top, right, bottom)</code> (post zoom)</li>
2032      * </ul>
2033      * </li>
2034      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-43.png" /><ul>
2035      * <li><code>640x480</code> stream source area: <code>(0, 0, 2000, 1500)</code> (equal to crop region)</li>
2036      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (letterboxed)</li>
2037      * </ul>
2038      * </li>
2039      * <li>Case #2: 16:9 crop region with 2.0x zoom.<ul>
2040      * <li>Zoomed field of view: 1/4 of original field of view</li>
2041      * <li>Crop region: <code>Rect(0, 187, 2000, 1312)</code></li>
2042      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-2-crop-169.png" /></li>
2043      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (pillarboxed)</li>
2044      * <li><code>1280x720</code> stream source area: <code>(0, 187, 2000, 1312)</code> (equal to crop region)</li>
2045      * </ul>
2046      * </li>
2047      * <li>Case #3: 1:1 crop region with 0.5x zoom out to ultrawide lens.<ul>
2048      * <li>Zoomed field of view: 4x of original field of view (switched from wide lens to ultrawide lens)</li>
2049      * <li>Crop region: <code>Rect(250, 0, 1750, 1500)</code></li>
2050      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.control.zoomRatio/zoom-ratio-0.5-crop-11.png" /></li>
2051      * <li><code>640x480</code> stream source area: <code>(250, 187, 1750, 1312)</code> (letterboxed)</li>
2052      * <li><code>1280x720</code> stream source area: <code>(250, 328, 1750, 1172)</code> (letterboxed)</li>
2053      * </ul>
2054      * </li>
2055      * </ul>
2056      * <p>As seen from the graphs above, the coordinate system of cropRegion now changes to the
2057      * effective after-zoom field-of-view, and is represented by the rectangle of (0, 0,
2058      * activeArrayWith, activeArrayHeight). The same applies to AE/AWB/AF regions, and faces.
2059      * This coordinate system change isn't applicable to RAW capture and its related
2060      * metadata such as intrinsicCalibration and lensShadingMap.</p>
2061      * <p>Using the same hypothetical example above, and assuming output stream #1 (640x480) is
2062      * the viewfinder stream, the application can achieve 2.0x zoom in one of two ways:</p>
2063      * <ul>
2064      * <li>zoomRatio = 2.0, scaler.cropRegion = (0, 0, 2000, 1500)</li>
2065      * <li>zoomRatio = 1.0 (default), scaler.cropRegion = (500, 375, 1500, 1125)</li>
2066      * </ul>
2067      * <p>If the application intends to set aeRegions to be top-left quarter of the viewfinder
2068      * field-of-view, the ACAMERA_CONTROL_AE_REGIONS should be set to (0, 0, 1000, 750) with
2069      * zoomRatio set to 2.0. Alternatively, the application can set aeRegions to the equivalent
2070      * region of (500, 375, 1000, 750) for zoomRatio of 1.0. If the application doesn't
2071      * explicitly set ACAMERA_CONTROL_ZOOM_RATIO, its value defaults to 1.0.</p>
2072      * <p>One limitation of controlling zoom using zoomRatio is that the ACAMERA_SCALER_CROP_REGION
2073      * must only be used for letterboxing or pillarboxing of the sensor active array, and no
2074      * FREEFORM cropping can be used with ACAMERA_CONTROL_ZOOM_RATIO other than 1.0. If
2075      * ACAMERA_CONTROL_ZOOM_RATIO is not 1.0, and ACAMERA_SCALER_CROP_REGION is set to be
2076      * windowboxing, the camera framework will override the ACAMERA_SCALER_CROP_REGION to be
2077      * the active array.</p>
2078      * <p>In the capture request, if the application sets ACAMERA_CONTROL_ZOOM_RATIO to a
2079      * value != 1.0, the ACAMERA_CONTROL_ZOOM_RATIO tag in the capture result reflects the
2080      * effective zoom ratio achieved by the camera device, and the ACAMERA_SCALER_CROP_REGION
2081      * adjusts for additional crops that are not zoom related. Otherwise, if the application
2082      * sets ACAMERA_CONTROL_ZOOM_RATIO to 1.0, or does not set it at all, the
2083      * ACAMERA_CONTROL_ZOOM_RATIO tag in the result metadata will also be 1.0.</p>
2084      * <p>When the application requests a physical stream for a logical multi-camera, the
2085      * ACAMERA_CONTROL_ZOOM_RATIO in the physical camera result metadata will be 1.0, and
2086      * the ACAMERA_SCALER_CROP_REGION tag reflects the amount of zoom and crop done by the
2087      * physical camera device.</p>
2088      *
2089      * @see ACAMERA_CONTROL_AE_REGIONS
2090      * @see ACAMERA_CONTROL_ZOOM_RATIO
2091      * @see ACAMERA_SCALER_CROP_REGION
2092      */
2093     ACAMERA_CONTROL_ZOOM_RATIO =                                // float
2094             ACAMERA_CONTROL_START + 47,
2095     /**
2096      * <p>The desired CaptureRequest settings override with which certain keys are
2097      * applied earlier so that they can take effect sooner.</p>
2098      *
2099      * <p>Type: int32 (acamera_metadata_enum_android_control_settings_override_t)</p>
2100      *
2101      * <p>This tag may appear in:
2102      * <ul>
2103      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2104      *   <li>ACaptureRequest</li>
2105      * </ul></p>
2106      *
2107      * <p>There are some CaptureRequest keys which can be applied earlier than others
2108      * when controls within a CaptureRequest aren't required to take effect at the same time.
2109      * One such example is zoom. Zoom can be applied at a later stage of the camera pipeline.
2110      * As soon as the camera device receives the CaptureRequest, it can apply the requested
2111      * zoom value onto an earlier request that's already in the pipeline, thus improves zoom
2112      * latency.</p>
2113      * <p>This key's value in the capture result reflects whether the controls for this capture
2114      * are overridden "by" a newer request. This means that if a capture request turns on
2115      * settings override, the capture result of an earlier request will contain the key value
2116      * of ZOOM. On the other hand, if a capture request has settings override turned on,
2117      * but all newer requests have it turned off, the key's value in the capture result will
2118      * be OFF because this capture isn't overridden by a newer capture. In the two examples
2119      * below, the capture results columns illustrate the settingsOverride values in different
2120      * scenarios.</p>
2121      * <p>Assuming the zoom settings override can speed up by 1 frame, below example illustrates
2122      * the speed-up at the start of capture session:</p>
2123      * <pre><code>Camera session created
2124      * Request 1 (zoom=1.0x, override=ZOOM) -&gt;
2125      * Request 2 (zoom=1.2x, override=ZOOM) -&gt;
2126      * Request 3 (zoom=1.4x, override=ZOOM) -&gt;  Result 1 (zoom=1.2x, override=ZOOM)
2127      * Request 4 (zoom=1.6x, override=ZOOM) -&gt;  Result 2 (zoom=1.4x, override=ZOOM)
2128      * Request 5 (zoom=1.8x, override=ZOOM) -&gt;  Result 3 (zoom=1.6x, override=ZOOM)
2129      *                                      -&gt;  Result 4 (zoom=1.8x, override=ZOOM)
2130      *                                      -&gt;  Result 5 (zoom=1.8x, override=OFF)
2131      * </code></pre>
2132      * <p>The application can turn on settings override and use zoom as normal. The example
2133      * shows that the later zoom values (1.2x, 1.4x, 1.6x, and 1.8x) overwrite the zoom
2134      * values (1.0x, 1.2x, 1.4x, and 1.8x) of earlier requests (#1, #2, #3, and #4).</p>
2135      * <p>The application must make sure the settings override doesn't interfere with user
2136      * journeys requiring simultaneous application of all controls in CaptureRequest on the
2137      * requested output targets. For example, if the application takes a still capture using
2138      * CameraCaptureSession#capture, and the repeating request immediately sets a different
2139      * zoom value using override, the inflight still capture could have its zoom value
2140      * overwritten unexpectedly.</p>
2141      * <p>So the application is strongly recommended to turn off settingsOverride when taking
2142      * still/burst captures, and turn it back on when there is only repeating viewfinder
2143      * request and no inflight still/burst captures.</p>
2144      * <p>Below is the example demonstrating the transitions in and out of the
2145      * settings override:</p>
2146      * <pre><code>Request 1 (zoom=1.0x, override=OFF)
2147      * Request 2 (zoom=1.2x, override=OFF)
2148      * Request 3 (zoom=1.4x, override=ZOOM)  -&gt; Result 1 (zoom=1.0x, override=OFF)
2149      * Request 4 (zoom=1.6x, override=ZOOM)  -&gt; Result 2 (zoom=1.4x, override=ZOOM)
2150      * Request 5 (zoom=1.8x, override=OFF)   -&gt; Result 3 (zoom=1.6x, override=ZOOM)
2151      *                                       -&gt; Result 4 (zoom=1.6x, override=OFF)
2152      *                                       -&gt; Result 5 (zoom=1.8x, override=OFF)
2153      * </code></pre>
2154      * <p>This example shows that:</p>
2155      * <ul>
2156      * <li>The application "ramps in" settings override by setting the control to ZOOM.
2157      * In the example, request #3 enables zoom settings override. Because the camera device
2158      * can speed up applying zoom by 1 frame, the outputs of request #2 has 1.4x zoom, the
2159      * value specified in request #3.</li>
2160      * <li>The application "ramps out" of settings override by setting the control to OFF. In
2161      * the example, request #5 changes the override to OFF. Because request #4's zoom
2162      * takes effect in result #3, result #4's zoom remains the same until new value takes
2163      * effect in result #5.</li>
2164      * </ul>
2165      */
2166     ACAMERA_CONTROL_SETTINGS_OVERRIDE =                         // int32 (acamera_metadata_enum_android_control_settings_override_t)
2167             ACAMERA_CONTROL_START + 52,
2168     /**
2169      * <p>List of available settings overrides supported by the camera device that can
2170      * be used to speed up certain controls.</p>
2171      *
2172      * <p>Type: int32[n]</p>
2173      *
2174      * <p>This tag may appear in:
2175      * <ul>
2176      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2177      * </ul></p>
2178      *
2179      * <p>When not all controls within a CaptureRequest are required to take effect
2180      * at the same time on the outputs, the camera device may apply certain request keys sooner
2181      * to improve latency. This list contains such supported settings overrides. Each settings
2182      * override corresponds to a set of CaptureRequest keys that can be sped up when applying.</p>
2183      * <p>A supported settings override can be passed in via
2184      * <a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html#CONTROL_SETTINGS_OVERRIDE">CaptureRequest#CONTROL_SETTINGS_OVERRIDE</a>, and the
2185      * CaptureRequest keys corresponding to the override are applied as soon as possible, not
2186      * bound by per-frame synchronization. See ACAMERA_CONTROL_SETTINGS_OVERRIDE for the
2187      * CaptureRequest keys for each override.</p>
2188      * <p>OFF is always included in this list.</p>
2189      *
2190      * @see ACAMERA_CONTROL_SETTINGS_OVERRIDE
2191      */
2192     ACAMERA_CONTROL_AVAILABLE_SETTINGS_OVERRIDES =              // int32[n]
2193             ACAMERA_CONTROL_START + 53,
2194     /**
2195      * <p>Automatic crop, pan and zoom to keep objects in the center of the frame.</p>
2196      *
2197      * <p>Type: byte (acamera_metadata_enum_android_control_autoframing_t)</p>
2198      *
2199      * <p>This tag may appear in:
2200      * <ul>
2201      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2202      *   <li>ACaptureRequest</li>
2203      * </ul></p>
2204      *
2205      * <p>Auto-framing is a special mode provided by the camera device to dynamically crop, zoom
2206      * or pan the camera feed to try to ensure that the people in a scene occupy a reasonable
2207      * portion of the viewport. It is primarily designed to support video calling in
2208      * situations where the user isn't directly in front of the device, especially for
2209      * wide-angle cameras.
2210      * ACAMERA_SCALER_CROP_REGION and ACAMERA_CONTROL_ZOOM_RATIO in CaptureResult will be used
2211      * to denote the coordinates of the auto-framed region.
2212      * Zoom and video stabilization controls are disabled when auto-framing is enabled. The 3A
2213      * regions must map the screen coordinates into the scaler crop returned from the capture
2214      * result instead of using the active array sensor.</p>
2215      *
2216      * @see ACAMERA_CONTROL_ZOOM_RATIO
2217      * @see ACAMERA_SCALER_CROP_REGION
2218      */
2219     ACAMERA_CONTROL_AUTOFRAMING =                               // byte (acamera_metadata_enum_android_control_autoframing_t)
2220             ACAMERA_CONTROL_START + 55,
2221     /**
2222      * <p>Whether the camera device supports ACAMERA_CONTROL_AUTOFRAMING.</p>
2223      *
2224      * @see ACAMERA_CONTROL_AUTOFRAMING
2225      *
2226      * <p>Type: byte (acamera_metadata_enum_android_control_autoframing_available_t)</p>
2227      *
2228      * <p>This tag may appear in:
2229      * <ul>
2230      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2231      * </ul></p>
2232      *
2233      * <p>Will be <code>false</code> if auto-framing is not available.</p>
2234      */
2235     ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE =                     // byte (acamera_metadata_enum_android_control_autoframing_available_t)
2236             ACAMERA_CONTROL_START + 56,
2237     /**
2238      * <p>Current state of auto-framing.</p>
2239      *
2240      * <p>Type: byte (acamera_metadata_enum_android_control_autoframing_state_t)</p>
2241      *
2242      * <p>This tag may appear in:
2243      * <ul>
2244      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2245      * </ul></p>
2246      *
2247      * <p>When the camera doesn't have auto-framing available (i.e
2248      * <code>ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE</code> == false) or it is not enabled (i.e
2249      * <code>ACAMERA_CONTROL_AUTOFRAMING</code> == OFF), the state will always be INACTIVE.
2250      * Other states indicate the current auto-framing state:</p>
2251      * <ul>
2252      * <li>When <code>ACAMERA_CONTROL_AUTOFRAMING</code> is set to ON, auto-framing will take
2253      * place. While the frame is aligning itself to center the object (doing things like
2254      * zooming in, zooming out or pan), the state will be FRAMING.</li>
2255      * <li>When field of view is not being adjusted anymore and has reached a stable state, the
2256      * state will be CONVERGED.</li>
2257      * </ul>
2258      *
2259      * @see ACAMERA_CONTROL_AUTOFRAMING
2260      * @see ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE
2261      */
2262     ACAMERA_CONTROL_AUTOFRAMING_STATE =                         // byte (acamera_metadata_enum_android_control_autoframing_state_t)
2263             ACAMERA_CONTROL_START + 57,
2264     /**
2265      * <p>The operating luminance range of low light boost measured in lux (lx).</p>
2266      *
2267      * <p>Type: float[2]</p>
2268      *
2269      * <p>This tag may appear in:
2270      * <ul>
2271      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2272      * </ul></p>
2273      *
2274      */
2275     ACAMERA_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE =      // float[2]
2276             ACAMERA_CONTROL_START + 58,
2277     /**
2278      * <p>Current state of the low light boost AE mode.</p>
2279      *
2280      * <p>Type: byte (acamera_metadata_enum_android_control_low_light_boost_state_t)</p>
2281      *
2282      * <p>This tag may appear in:
2283      * <ul>
2284      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2285      * </ul></p>
2286      *
2287      * <p>When low light boost is enabled by setting the AE mode to
2288      * 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY', it can dynamically apply a low light
2289      * boost when the light level threshold is exceeded.</p>
2290      * <p>This state indicates when low light boost is 'ACTIVE' and applied. Similarly, it can
2291      * indicate when it is not being applied by returning 'INACTIVE'.</p>
2292      * <p>This key will be absent from the CaptureResult if AE mode is not set to
2293      * 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY.</p>
2294      * <p>The default value will always be 'INACTIVE'.</p>
2295      */
2296     ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE =                     // byte (acamera_metadata_enum_android_control_low_light_boost_state_t)
2297             ACAMERA_CONTROL_START + 59,
2298     ACAMERA_CONTROL_END,
2299 
2300     /**
2301      * <p>Operation mode for edge
2302      * enhancement.</p>
2303      *
2304      * <p>Type: byte (acamera_metadata_enum_android_edge_mode_t)</p>
2305      *
2306      * <p>This tag may appear in:
2307      * <ul>
2308      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2309      *   <li>ACaptureRequest</li>
2310      * </ul></p>
2311      *
2312      * <p>Edge enhancement improves sharpness and details in the captured image. OFF means
2313      * no enhancement will be applied by the camera device.</p>
2314      * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
2315      * will be applied. HIGH_QUALITY mode indicates that the
2316      * camera device will use the highest-quality enhancement algorithms,
2317      * even if it slows down capture rate. FAST means the camera device will
2318      * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
2319      * edge enhancement will slow down capture rate. Every output stream will have a similar
2320      * amount of enhancement applied.</p>
2321      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
2322      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
2323      * into a final capture when triggered by the user. In this mode, the camera device applies
2324      * edge enhancement to low-resolution streams (below maximum recording resolution) to
2325      * maximize preview quality, but does not apply edge enhancement to high-resolution streams,
2326      * since those will be reprocessed later if necessary.</p>
2327      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
2328      * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
2329      * The camera device may adjust its internal edge enhancement parameters for best
2330      * image quality based on the android.reprocess.effectiveExposureFactor, if it is set.</p>
2331      */
2332     ACAMERA_EDGE_MODE =                                         // byte (acamera_metadata_enum_android_edge_mode_t)
2333             ACAMERA_EDGE_START,
2334     /**
2335      * <p>List of edge enhancement modes for ACAMERA_EDGE_MODE that are supported by this camera
2336      * device.</p>
2337      *
2338      * @see ACAMERA_EDGE_MODE
2339      *
2340      * <p>Type: byte[n]</p>
2341      *
2342      * <p>This tag may appear in:
2343      * <ul>
2344      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2345      * </ul></p>
2346      *
2347      * <p>Full-capability camera devices must always support OFF; camera devices that support
2348      * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
2349      * list FAST.</p>
2350      */
2351     ACAMERA_EDGE_AVAILABLE_EDGE_MODES =                         // byte[n]
2352             ACAMERA_EDGE_START + 2,
2353     ACAMERA_EDGE_END,
2354 
2355     /**
2356      * <p>The desired mode for for the camera device's flash control.</p>
2357      *
2358      * <p>Type: byte (acamera_metadata_enum_android_flash_mode_t)</p>
2359      *
2360      * <p>This tag may appear in:
2361      * <ul>
2362      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2363      *   <li>ACaptureRequest</li>
2364      * </ul></p>
2365      *
2366      * <p>This control is only effective when flash unit is available
2367      * (<code>ACAMERA_FLASH_INFO_AVAILABLE == true</code>).</p>
2368      * <p>When this control is used, the ACAMERA_CONTROL_AE_MODE must be set to ON or OFF.
2369      * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2370      * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
2371      * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
2372      * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
2373      * device's auto-exposure routine's result. When used in still capture case, this
2374      * control should be used along with auto-exposure (AE) precapture metering sequence
2375      * (ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER), otherwise, the image may be incorrectly exposed.</p>
2376      * <p>When set to TORCH, the flash will be on continuously. This mode can be used
2377      * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
2378      * <p>The flash status will be reported by ACAMERA_FLASH_STATE in the capture result metadata.</p>
2379      *
2380      * @see ACAMERA_CONTROL_AE_MODE
2381      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
2382      * @see ACAMERA_FLASH_INFO_AVAILABLE
2383      * @see ACAMERA_FLASH_STATE
2384      */
2385     ACAMERA_FLASH_MODE =                                        // byte (acamera_metadata_enum_android_flash_mode_t)
2386             ACAMERA_FLASH_START + 2,
2387     /**
2388      * <p>Current state of the flash
2389      * unit.</p>
2390      *
2391      * <p>Type: byte (acamera_metadata_enum_android_flash_state_t)</p>
2392      *
2393      * <p>This tag may appear in:
2394      * <ul>
2395      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2396      * </ul></p>
2397      *
2398      * <p>When the camera device doesn't have flash unit
2399      * (i.e. <code>ACAMERA_FLASH_INFO_AVAILABLE == false</code>), this state will always be UNAVAILABLE.
2400      * Other states indicate the current flash status.</p>
2401      * <p>In certain conditions, this will be available on LEGACY devices:</p>
2402      * <ul>
2403      * <li>Flash-less cameras always return UNAVAILABLE.</li>
2404      * <li>Using ACAMERA_CONTROL_AE_MODE <code>==</code> ON_ALWAYS_FLASH
2405      *    will always return FIRED.</li>
2406      * <li>Using ACAMERA_FLASH_MODE <code>==</code> TORCH
2407      *    will always return FIRED.</li>
2408      * </ul>
2409      * <p>In all other conditions the state will not be available on
2410      * LEGACY devices (i.e. it will be <code>null</code>).</p>
2411      *
2412      * @see ACAMERA_CONTROL_AE_MODE
2413      * @see ACAMERA_FLASH_INFO_AVAILABLE
2414      * @see ACAMERA_FLASH_MODE
2415      */
2416     ACAMERA_FLASH_STATE =                                       // byte (acamera_metadata_enum_android_flash_state_t)
2417             ACAMERA_FLASH_START + 5,
2418     /**
2419      * <p>Flash strength level to be used when manual flash control is active.</p>
2420      *
2421      * <p>Type: int32</p>
2422      *
2423      * <p>This tag may appear in:
2424      * <ul>
2425      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2426      *   <li>ACaptureRequest</li>
2427      * </ul></p>
2428      *
2429      * <p>Flash strength level to use in capture mode i.e. when the applications control
2430      * flash with either <code>SINGLE</code> or <code>TORCH</code> mode.</p>
2431      * <p>Use ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL and
2432      * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL to check whether the device supports
2433      * flash strength control or not.
2434      * If the values of ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL and
2435      * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL are greater than 1,
2436      * then the device supports manual flash strength control.</p>
2437      * <p>If the ACAMERA_FLASH_MODE <code>==</code> <code>TORCH</code> the value must be &gt;= 1
2438      * and &lt;= ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL.
2439      * If the application doesn't set the key and
2440      * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL &gt; 1,
2441      * then the flash will be fired at the default level set by HAL in
2442      * ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL.
2443      * If the ACAMERA_FLASH_MODE <code>==</code> <code>SINGLE</code>, then the value must be &gt;= 1
2444      * and &lt;= ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL.
2445      * If the application does not set this key and
2446      * ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL &gt; 1,
2447      * then the flash will be fired at the default level set by HAL
2448      * in ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL.
2449      * If ACAMERA_CONTROL_AE_MODE is set to any of <code>ON_AUTO_FLASH</code>, <code>ON_ALWAYS_FLASH</code>,
2450      * <code>ON_AUTO_FLASH_REDEYE</code>, <code>ON_EXTERNAL_FLASH</code> values, then the strengthLevel will be ignored.</p>
2451      *
2452      * @see ACAMERA_CONTROL_AE_MODE
2453      * @see ACAMERA_FLASH_MODE
2454      * @see ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL
2455      * @see ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
2456      * @see ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL
2457      * @see ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL
2458      */
2459     ACAMERA_FLASH_STRENGTH_LEVEL =                              // int32
2460             ACAMERA_FLASH_START + 6,
2461     /**
2462      * <p>Maximum flash brightness level for manual flash control in <code>SINGLE</code> mode.</p>
2463      *
2464      * <p>Type: int32</p>
2465      *
2466      * <p>This tag may appear in:
2467      * <ul>
2468      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2469      * </ul></p>
2470      *
2471      * <p>Maximum flash brightness level in camera capture mode and
2472      * ACAMERA_FLASH_MODE set to <code>SINGLE</code>.
2473      * Value will be &gt; 1 if the manual flash strength control feature is supported,
2474      * otherwise the value will be equal to 1.
2475      * Note that this level is just a number of supported levels (the granularity of control).
2476      * There is no actual physical power units tied to this level.</p>
2477      *
2478      * @see ACAMERA_FLASH_MODE
2479      */
2480     ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL =                   // int32
2481             ACAMERA_FLASH_START + 7,
2482     /**
2483      * <p>Default flash brightness level for manual flash control in <code>SINGLE</code> mode.</p>
2484      *
2485      * <p>Type: int32</p>
2486      *
2487      * <p>This tag may appear in:
2488      * <ul>
2489      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2490      * </ul></p>
2491      *
2492      * <p>If flash unit is available this will be greater than or equal to 1 and less
2493      * or equal to ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL.
2494      * Note for devices that do not support the manual flash strength control
2495      * feature, this level will always be equal to 1.</p>
2496      *
2497      * @see ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
2498      */
2499     ACAMERA_FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL =               // int32
2500             ACAMERA_FLASH_START + 8,
2501     /**
2502      * <p>Maximum flash brightness level for manual flash control in <code>TORCH</code> mode</p>
2503      *
2504      * <p>Type: int32</p>
2505      *
2506      * <p>This tag may appear in:
2507      * <ul>
2508      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2509      * </ul></p>
2510      *
2511      * <p>Maximum flash brightness level in camera capture mode and
2512      * ACAMERA_FLASH_MODE set to <code>TORCH</code>.
2513      * Value will be &gt; 1 if the manual flash strength control feature is supported,
2514      * otherwise the value will be equal to 1.</p>
2515      * <p>Note that this level is just a number of supported levels(the granularity of control).
2516      * There is no actual physical power units tied to this level.
2517      * There is no relation between ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL and
2518      * ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL i.e. the ratio of
2519      * ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL:ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
2520      * is not guaranteed to be the ratio of actual brightness.</p>
2521      *
2522      * @see ACAMERA_FLASH_MODE
2523      * @see ACAMERA_FLASH_SINGLE_STRENGTH_MAX_LEVEL
2524      * @see ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL
2525      */
2526     ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL =                    // int32
2527             ACAMERA_FLASH_START + 9,
2528     /**
2529      * <p>Default flash brightness level for manual flash control in <code>TORCH</code> mode</p>
2530      *
2531      * <p>Type: int32</p>
2532      *
2533      * <p>This tag may appear in:
2534      * <ul>
2535      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2536      * </ul></p>
2537      *
2538      * <p>If flash unit is available this will be greater than or equal to 1 and less
2539      * or equal to ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL.
2540      * Note for the devices that do not support the manual flash strength control feature,
2541      * this level will always be equal to 1.</p>
2542      *
2543      * @see ACAMERA_FLASH_TORCH_STRENGTH_MAX_LEVEL
2544      */
2545     ACAMERA_FLASH_TORCH_STRENGTH_DEFAULT_LEVEL =                // int32
2546             ACAMERA_FLASH_START + 10,
2547     ACAMERA_FLASH_END,
2548 
2549     /**
2550      * <p>Whether this camera device has a
2551      * flash unit.</p>
2552      *
2553      * <p>Type: byte (acamera_metadata_enum_android_flash_info_available_t)</p>
2554      *
2555      * <p>This tag may appear in:
2556      * <ul>
2557      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2558      * </ul></p>
2559      *
2560      * <p>Will be <code>false</code> if no flash is available.</p>
2561      * <p>If there is no flash unit, none of the flash controls do
2562      * anything.</p>
2563      */
2564     ACAMERA_FLASH_INFO_AVAILABLE =                              // byte (acamera_metadata_enum_android_flash_info_available_t)
2565             ACAMERA_FLASH_INFO_START,
2566     /**
2567      * <p>Maximum flashlight brightness level.</p>
2568      *
2569      * <p>Type: int32</p>
2570      *
2571      * <p>This tag may appear in:
2572      * <ul>
2573      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2574      * </ul></p>
2575      *
2576      * <p>If this value is greater than 1, then the device supports controlling the
2577      * flashlight brightness level via
2578      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#turnOnTorchWithStrengthLevel">CameraManager#turnOnTorchWithStrengthLevel</a>.
2579      * If this value is equal to 1, flashlight brightness control is not supported.
2580      * The value for this key will be null for devices with no flash unit.</p>
2581      * <p>The maximum value is guaranteed to be safe to use for an indefinite duration in
2582      * terms of device flashlight lifespan, but may be too bright for comfort for many
2583      * use cases. Use the default torch brightness value to avoid problems with an
2584      * over-bright flashlight.</p>
2585      */
2586     ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL =                 // int32
2587             ACAMERA_FLASH_INFO_START + 2,
2588     /**
2589      * <p>Default flashlight brightness level to be set via
2590      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#turnOnTorchWithStrengthLevel">CameraManager#turnOnTorchWithStrengthLevel</a>.</p>
2591      *
2592      * <p>Type: int32</p>
2593      *
2594      * <p>This tag may appear in:
2595      * <ul>
2596      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2597      * </ul></p>
2598      *
2599      * <p>If flash unit is available this will be greater than or equal to 1 and less
2600      * or equal to <code>ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL</code>.</p>
2601      * <p>Setting flashlight brightness above the default level
2602      * (i.e.<code>ACAMERA_FLASH_INFO_STRENGTH_DEFAULT_LEVEL</code>) may make the device more
2603      * likely to reach thermal throttling conditions and slow down, or drain the
2604      * battery quicker than normal. To minimize such issues, it is recommended to
2605      * start the flashlight at this default brightness until a user explicitly requests
2606      * a brighter level.
2607      * Note that the value for this key will be null for devices with no flash unit.
2608      * The default level should always be &gt; 0.</p>
2609      *
2610      * @see ACAMERA_FLASH_INFO_STRENGTH_DEFAULT_LEVEL
2611      * @see ACAMERA_FLASH_INFO_STRENGTH_MAXIMUM_LEVEL
2612      */
2613     ACAMERA_FLASH_INFO_STRENGTH_DEFAULT_LEVEL =                 // int32
2614             ACAMERA_FLASH_INFO_START + 3,
2615     ACAMERA_FLASH_INFO_END,
2616 
2617     /**
2618      * <p>Operational mode for hot pixel correction.</p>
2619      *
2620      * <p>Type: byte (acamera_metadata_enum_android_hot_pixel_mode_t)</p>
2621      *
2622      * <p>This tag may appear in:
2623      * <ul>
2624      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2625      *   <li>ACaptureRequest</li>
2626      * </ul></p>
2627      *
2628      * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
2629      * that do not accurately measure the incoming light (i.e. pixels that
2630      * are stuck at an arbitrary value or are oversensitive).</p>
2631      */
2632     ACAMERA_HOT_PIXEL_MODE =                                    // byte (acamera_metadata_enum_android_hot_pixel_mode_t)
2633             ACAMERA_HOT_PIXEL_START,
2634     /**
2635      * <p>List of hot pixel correction modes for ACAMERA_HOT_PIXEL_MODE that are supported by this
2636      * camera device.</p>
2637      *
2638      * @see ACAMERA_HOT_PIXEL_MODE
2639      *
2640      * <p>Type: byte[n]</p>
2641      *
2642      * <p>This tag may appear in:
2643      * <ul>
2644      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2645      * </ul></p>
2646      *
2647      * <p>FULL mode camera devices will always support FAST.</p>
2648      */
2649     ACAMERA_HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES =               // byte[n]
2650             ACAMERA_HOT_PIXEL_START + 1,
2651     ACAMERA_HOT_PIXEL_END,
2652 
2653     /**
2654      * <p>GPS coordinates to include in output JPEG
2655      * EXIF.</p>
2656      *
2657      * <p>Type: double[3]</p>
2658      *
2659      * <p>This tag may appear in:
2660      * <ul>
2661      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2662      *   <li>ACaptureRequest</li>
2663      * </ul></p>
2664      *
2665      * <p>This tag is also used for HEIC image capture.</p>
2666      */
2667     ACAMERA_JPEG_GPS_COORDINATES =                              // double[3]
2668             ACAMERA_JPEG_START,
2669     /**
2670      * <p>32 characters describing GPS algorithm to
2671      * include in EXIF.</p>
2672      *
2673      * <p>Type: byte</p>
2674      *
2675      * <p>This tag may appear in:
2676      * <ul>
2677      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2678      *   <li>ACaptureRequest</li>
2679      * </ul></p>
2680      *
2681      * <p>This tag is also used for HEIC image capture.</p>
2682      */
2683     ACAMERA_JPEG_GPS_PROCESSING_METHOD =                        // byte
2684             ACAMERA_JPEG_START + 1,
2685     /**
2686      * <p>Time GPS fix was made to include in
2687      * EXIF.</p>
2688      *
2689      * <p>Type: int64</p>
2690      *
2691      * <p>This tag may appear in:
2692      * <ul>
2693      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2694      *   <li>ACaptureRequest</li>
2695      * </ul></p>
2696      *
2697      * <p>This tag is also used for HEIC image capture.</p>
2698      */
2699     ACAMERA_JPEG_GPS_TIMESTAMP =                                // int64
2700             ACAMERA_JPEG_START + 2,
2701     /**
2702      * <p>The orientation for a JPEG image.</p>
2703      *
2704      * <p>Type: int32</p>
2705      *
2706      * <p>This tag may appear in:
2707      * <ul>
2708      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2709      *   <li>ACaptureRequest</li>
2710      * </ul></p>
2711      *
2712      * <p>The clockwise rotation angle in degrees, relative to the orientation
2713      * to the camera, that the JPEG picture needs to be rotated by, to be viewed
2714      * upright.</p>
2715      * <p>Camera devices may either encode this value into the JPEG EXIF header, or
2716      * rotate the image data to match this orientation. When the image data is rotated,
2717      * the thumbnail data will also be rotated. Additionally, in the case where the image data
2718      * is rotated, <a href="https://developer.android.com/reference/android/media/Image.html#getWidth">Image#getWidth</a> and <a href="https://developer.android.com/reference/android/media/Image.html#getHeight">Image#getHeight</a>
2719      * will not be updated to reflect the height and width of the rotated image.</p>
2720      * <p>Note that this orientation is relative to the orientation of the camera sensor, given
2721      * by ACAMERA_SENSOR_ORIENTATION.</p>
2722      * <p>To translate from the device orientation given by the Android sensor APIs for camera
2723      * sensors which are not EXTERNAL, the following sample code may be used:</p>
2724      * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2725      *     if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2726      *     int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2727      *
2728      *     // Round device orientation to a multiple of 90
2729      *     deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2730      *
2731      *     // Reverse device orientation for front-facing cameras
2732      *     boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2733      *     if (facingFront) deviceOrientation = -deviceOrientation;
2734      *
2735      *     // Calculate desired JPEG orientation relative to camera orientation to make
2736      *     // the image upright relative to the device orientation
2737      *     int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2738      *
2739      *     return jpegOrientation;
2740      * }
2741      * </code></pre>
2742      * <p>For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
2743      * also be set to EXTERNAL. The above code is not relevant in such case.</p>
2744      * <p>This tag is also used to describe the orientation of the HEIC image capture, in which
2745      * case the rotation is reflected by
2746      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2747      * rotating the image data itself.</p>
2748      *
2749      * @see ACAMERA_SENSOR_ORIENTATION
2750      */
2751     ACAMERA_JPEG_ORIENTATION =                                  // int32
2752             ACAMERA_JPEG_START + 3,
2753     /**
2754      * <p>Compression quality of the final JPEG
2755      * image.</p>
2756      *
2757      * <p>Type: byte</p>
2758      *
2759      * <p>This tag may appear in:
2760      * <ul>
2761      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2762      *   <li>ACaptureRequest</li>
2763      * </ul></p>
2764      *
2765      * <p>85-95 is typical usage range. This tag is also used to describe the quality
2766      * of the HEIC image capture.</p>
2767      */
2768     ACAMERA_JPEG_QUALITY =                                      // byte
2769             ACAMERA_JPEG_START + 4,
2770     /**
2771      * <p>Compression quality of JPEG
2772      * thumbnail.</p>
2773      *
2774      * <p>Type: byte</p>
2775      *
2776      * <p>This tag may appear in:
2777      * <ul>
2778      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2779      *   <li>ACaptureRequest</li>
2780      * </ul></p>
2781      *
2782      * <p>This tag is also used to describe the quality of the HEIC image capture.</p>
2783      */
2784     ACAMERA_JPEG_THUMBNAIL_QUALITY =                            // byte
2785             ACAMERA_JPEG_START + 5,
2786     /**
2787      * <p>Resolution of embedded JPEG thumbnail.</p>
2788      *
2789      * <p>Type: int32[2]</p>
2790      *
2791      * <p>This tag may appear in:
2792      * <ul>
2793      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2794      *   <li>ACaptureRequest</li>
2795      * </ul></p>
2796      *
2797      * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2798      * but the captured JPEG will still be a valid image.</p>
2799      * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected
2800      * should have the same aspect ratio as the main JPEG output.</p>
2801      * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2802      * ratio, the camera device creates the thumbnail by cropping it from the primary image.
2803      * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2804      * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2805      * generate the thumbnail image. The thumbnail image will always have a smaller Field
2806      * Of View (FOV) than the primary image when aspect ratios differ.</p>
2807      * <p>When an ACAMERA_JPEG_ORIENTATION of non-zero degree is requested,
2808      * the camera device will handle thumbnail rotation in one of the following ways:</p>
2809      * <ul>
2810      * <li>Set the <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>
2811      *   and keep jpeg and thumbnail image data unrotated.</li>
2812      * <li>Rotate the jpeg and thumbnail image data and not set
2813      *   <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>. In this
2814      *   case, LIMITED or FULL hardware level devices will report rotated thumbnail size in
2815      *   capture result, so the width and height will be interchanged if 90 or 270 degree
2816      *   orientation is requested. LEGACY device will always report unrotated thumbnail
2817      *   size.</li>
2818      * </ul>
2819      * <p>The tag is also used as thumbnail size for HEIC image format capture, in which case the
2820      * the thumbnail rotation is reflected by
2821      * <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_ORIENTATION">EXIF orientation flag</a>, and not by
2822      * rotating the thumbnail data itself.</p>
2823      *
2824      * @see ACAMERA_JPEG_ORIENTATION
2825      */
2826     ACAMERA_JPEG_THUMBNAIL_SIZE =                               // int32[2]
2827             ACAMERA_JPEG_START + 6,
2828     /**
2829      * <p>List of JPEG thumbnail sizes for ACAMERA_JPEG_THUMBNAIL_SIZE supported by this
2830      * camera device.</p>
2831      *
2832      * @see ACAMERA_JPEG_THUMBNAIL_SIZE
2833      *
2834      * <p>Type: int32[2*n]</p>
2835      *
2836      * <p>This tag may appear in:
2837      * <ul>
2838      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
2839      * </ul></p>
2840      *
2841      * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no
2842      * thumbnail should be generated.</p>
2843      * <p>Below conditions will be satisfied for this size list:</p>
2844      * <ul>
2845      * <li>The sizes will be sorted by increasing pixel area (width x height).
2846      * If several resolutions have the same area, they will be sorted by increasing width.</li>
2847      * <li>The aspect ratio of the largest thumbnail size will be same as the
2848      * aspect ratio of largest JPEG output size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
2849      * The largest size is defined as the size that has the largest pixel area
2850      * in a given size list.</li>
2851      * <li>Each output JPEG size in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS will have at least
2852      * one corresponding size that has the same aspect ratio in availableThumbnailSizes,
2853      * and vice versa.</li>
2854      * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights.</li>
2855      * </ul>
2856      * <p>This list is also used as supported thumbnail sizes for HEIC image format capture.</p>
2857      *
2858      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
2859      */
2860     ACAMERA_JPEG_AVAILABLE_THUMBNAIL_SIZES =                    // int32[2*n]
2861             ACAMERA_JPEG_START + 7,
2862     ACAMERA_JPEG_END,
2863 
2864     /**
2865      * <p>The desired lens aperture size, as a ratio of lens focal length to the
2866      * effective aperture diameter.</p>
2867      *
2868      * <p>Type: float</p>
2869      *
2870      * <p>This tag may appear in:
2871      * <ul>
2872      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2873      *   <li>ACaptureRequest</li>
2874      * </ul></p>
2875      *
2876      * <p>Setting this value is only supported on the camera devices that have a variable
2877      * aperture lens.</p>
2878      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is OFF,
2879      * this can be set along with ACAMERA_SENSOR_EXPOSURE_TIME,
2880      * ACAMERA_SENSOR_SENSITIVITY, and ACAMERA_SENSOR_FRAME_DURATION
2881      * to achieve manual exposure control.</p>
2882      * <p>The requested aperture value may take several frames to reach the
2883      * requested value; the camera device will report the current (intermediate)
2884      * aperture size in capture result metadata while the aperture is changing.
2885      * While the aperture is still changing, ACAMERA_LENS_STATE will be set to MOVING.</p>
2886      * <p>When this is supported and ACAMERA_CONTROL_AE_MODE is one of
2887      * the ON modes, this will be overridden by the camera device
2888      * auto-exposure algorithm, the overridden values are then provided
2889      * back to the user in the corresponding result.</p>
2890      *
2891      * @see ACAMERA_CONTROL_AE_MODE
2892      * @see ACAMERA_LENS_STATE
2893      * @see ACAMERA_SENSOR_EXPOSURE_TIME
2894      * @see ACAMERA_SENSOR_FRAME_DURATION
2895      * @see ACAMERA_SENSOR_SENSITIVITY
2896      */
2897     ACAMERA_LENS_APERTURE =                                     // float
2898             ACAMERA_LENS_START,
2899     /**
2900      * <p>The desired setting for the lens neutral density filter(s).</p>
2901      *
2902      * <p>Type: float</p>
2903      *
2904      * <p>This tag may appear in:
2905      * <ul>
2906      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2907      *   <li>ACaptureRequest</li>
2908      * </ul></p>
2909      *
2910      * <p>This control will not be supported on most camera devices.</p>
2911      * <p>Lens filters are typically used to lower the amount of light the
2912      * sensor is exposed to (measured in steps of EV). As used here, an EV
2913      * step is the standard logarithmic representation, which are
2914      * non-negative, and inversely proportional to the amount of light
2915      * hitting the sensor.  For example, setting this to 0 would result
2916      * in no reduction of the incoming light, and setting this to 2 would
2917      * mean that the filter is set to reduce incoming light by two stops
2918      * (allowing 1/4 of the prior amount of light to the sensor).</p>
2919      * <p>It may take several frames before the lens filter density changes
2920      * to the requested value. While the filter density is still changing,
2921      * ACAMERA_LENS_STATE will be set to MOVING.</p>
2922      *
2923      * @see ACAMERA_LENS_STATE
2924      */
2925     ACAMERA_LENS_FILTER_DENSITY =                               // float
2926             ACAMERA_LENS_START + 1,
2927     /**
2928      * <p>The desired lens focal length; used for optical zoom.</p>
2929      *
2930      * <p>Type: float</p>
2931      *
2932      * <p>This tag may appear in:
2933      * <ul>
2934      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2935      *   <li>ACaptureRequest</li>
2936      * </ul></p>
2937      *
2938      * <p>This setting controls the physical focal length of the camera
2939      * device's lens. Changing the focal length changes the field of
2940      * view of the camera device, and is usually used for optical zoom.</p>
2941      * <p>Like ACAMERA_LENS_FOCUS_DISTANCE and ACAMERA_LENS_APERTURE, this
2942      * setting won't be applied instantaneously, and it may take several
2943      * frames before the lens can change to the requested focal length.
2944      * While the focal length is still changing, ACAMERA_LENS_STATE will
2945      * be set to MOVING.</p>
2946      * <p>Optical zoom via this control will not be supported on most devices. Starting from API
2947      * level 30, the camera device may combine optical and digital zoom through the
2948      * ACAMERA_CONTROL_ZOOM_RATIO control.</p>
2949      *
2950      * @see ACAMERA_CONTROL_ZOOM_RATIO
2951      * @see ACAMERA_LENS_APERTURE
2952      * @see ACAMERA_LENS_FOCUS_DISTANCE
2953      * @see ACAMERA_LENS_STATE
2954      */
2955     ACAMERA_LENS_FOCAL_LENGTH =                                 // float
2956             ACAMERA_LENS_START + 2,
2957     /**
2958      * <p>Desired distance to plane of sharpest focus,
2959      * measured from frontmost surface of the lens.</p>
2960      *
2961      * <p>Type: float</p>
2962      *
2963      * <p>This tag may appear in:
2964      * <ul>
2965      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2966      *   <li>ACaptureRequest</li>
2967      * </ul></p>
2968      *
2969      * <p>Should be zero for fixed-focus cameras</p>
2970      */
2971     ACAMERA_LENS_FOCUS_DISTANCE =                               // float
2972             ACAMERA_LENS_START + 3,
2973     /**
2974      * <p>Sets whether the camera device uses optical image stabilization (OIS)
2975      * when capturing images.</p>
2976      *
2977      * <p>Type: byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)</p>
2978      *
2979      * <p>This tag may appear in:
2980      * <ul>
2981      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
2982      *   <li>ACaptureRequest</li>
2983      * </ul></p>
2984      *
2985      * <p>OIS is used to compensate for motion blur due to small
2986      * movements of the camera during capture. Unlike digital image
2987      * stabilization (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), OIS
2988      * makes use of mechanical elements to stabilize the camera
2989      * sensor, and thus allows for longer exposure times before
2990      * camera shake becomes apparent.</p>
2991      * <p>Switching between different optical stabilization modes may take several
2992      * frames to initialize, the camera device will report the current mode in
2993      * capture result metadata. For example, When "ON" mode is requested, the
2994      * optical stabilization modes in the first several capture results may still
2995      * be "OFF", and it will become "ON" when the initialization is done.</p>
2996      * <p>If a camera device supports both OIS and digital image stabilization
2997      * (ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE), turning both modes on may produce undesirable
2998      * interaction, so it is recommended not to enable both at the same time.</p>
2999      * <p>If ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE is set to "PREVIEW_STABILIZATION",
3000      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE is overridden. The camera sub-system may choose
3001      * to turn on hardware based image stabilization in addition to software based stabilization
3002      * if it deems that appropriate. This key's value in the capture result will reflect which
3003      * OIS mode was chosen.</p>
3004      * <p>Not all devices will support OIS; see
3005      * ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION for
3006      * available controls.</p>
3007      *
3008      * @see ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
3009      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
3010      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
3011      */
3012     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE =                   // byte (acamera_metadata_enum_android_lens_optical_stabilization_mode_t)
3013             ACAMERA_LENS_START + 4,
3014     /**
3015      * <p>Direction the camera faces relative to
3016      * device screen.</p>
3017      *
3018      * <p>Type: byte (acamera_metadata_enum_android_lens_facing_t)</p>
3019      *
3020      * <p>This tag may appear in:
3021      * <ul>
3022      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3023      * </ul></p>
3024      *
3025      */
3026     ACAMERA_LENS_FACING =                                       // byte (acamera_metadata_enum_android_lens_facing_t)
3027             ACAMERA_LENS_START + 5,
3028     /**
3029      * <p>The orientation of the camera relative to the sensor
3030      * coordinate system.</p>
3031      *
3032      * <p>Type: float[4]</p>
3033      *
3034      * <p>This tag may appear in:
3035      * <ul>
3036      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3037      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3038      * </ul></p>
3039      *
3040      * <p>The four coefficients that describe the quaternion
3041      * rotation from the Android sensor coordinate system to a
3042      * camera-aligned coordinate system where the X-axis is
3043      * aligned with the long side of the image sensor, the Y-axis
3044      * is aligned with the short side of the image sensor, and
3045      * the Z-axis is aligned with the optical axis of the sensor.</p>
3046      * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code>
3047      * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation
3048      * amount <code>theta</code>, the following formulas can be used:</p>
3049      * <pre><code> theta = 2 * acos(w)
3050      * a_x = x / sin(theta/2)
3051      * a_y = y / sin(theta/2)
3052      * a_z = z / sin(theta/2)
3053      * </code></pre>
3054      * <p>To create a 3x3 rotation matrix that applies the rotation
3055      * defined by this quaternion, the following matrix can be
3056      * used:</p>
3057      * <pre><code>R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
3058      *            2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
3059      *            2xz - 2yw,       2yz + 2xw, 1 - 2x^2 - 2y^2 ]
3060      * </code></pre>
3061      * <p>This matrix can then be used to apply the rotation to a
3062      *  column vector point with</p>
3063      * <p><code>p' = Rp</code></p>
3064      * <p>where <code>p</code> is in the device sensor coordinate system, and
3065      *  <code>p'</code> is in the camera-oriented coordinate system.</p>
3066      * <p>If ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, the quaternion rotation cannot
3067      *  be accurately represented by the camera device, and will be represented by
3068      *  default values matching its default facing.</p>
3069      *
3070      * @see ACAMERA_LENS_POSE_REFERENCE
3071      */
3072     ACAMERA_LENS_POSE_ROTATION =                                // float[4]
3073             ACAMERA_LENS_START + 6,
3074     /**
3075      * <p>Position of the camera optical center.</p>
3076      *
3077      * <p>Type: float[3]</p>
3078      *
3079      * <p>This tag may appear in:
3080      * <ul>
3081      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3082      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3083      * </ul></p>
3084      *
3085      * <p>The position of the camera device's lens optical center,
3086      * as a three-dimensional vector <code>(x,y,z)</code>.</p>
3087      * <p>Prior to Android P, or when ACAMERA_LENS_POSE_REFERENCE is PRIMARY_CAMERA, this position
3088      * is relative to the optical center of the largest camera device facing in the same
3089      * direction as this camera, in the <a href="https://developer.android.com/reference/android/hardware/SensorEvent.html">Android sensor
3090      * coordinate axes</a>. Note that only the axis definitions are shared with the sensor
3091      * coordinate system, but not the origin.</p>
3092      * <p>If this device is the largest or only camera device with a given facing, then this
3093      * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm
3094      * from the main sensor along the +X axis (to the right from the user's perspective) will
3095      * report <code>(0.03, 0, 0)</code>.  Note that this means that, for many computer vision
3096      * applications, the position needs to be negated to convert it to a translation from the
3097      * camera to the origin.</p>
3098      * <p>To transform a pixel coordinates between two cameras facing the same direction, first
3099      * the source camera ACAMERA_LENS_DISTORTION must be corrected for.  Then the source
3100      * camera ACAMERA_LENS_INTRINSIC_CALIBRATION needs to be applied, followed by the
3101      * ACAMERA_LENS_POSE_ROTATION of the source camera, the translation of the source camera
3102      * relative to the destination camera, the ACAMERA_LENS_POSE_ROTATION of the destination
3103      * camera, and finally the inverse of ACAMERA_LENS_INTRINSIC_CALIBRATION of the destination
3104      * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
3105      * coordinates.</p>
3106      * <p>To compare this against a real image from the destination camera, the destination camera
3107      * image then needs to be corrected for radial distortion before comparison or sampling.</p>
3108      * <p>When ACAMERA_LENS_POSE_REFERENCE is GYROSCOPE, then this position is relative to
3109      * the center of the primary gyroscope on the device. The axis definitions are the same as
3110      * with PRIMARY_CAMERA.</p>
3111      * <p>When ACAMERA_LENS_POSE_REFERENCE is UNDEFINED, this position cannot be accurately
3112      * represented by the camera device, and will be represented as <code>(0, 0, 0)</code>.</p>
3113      * <p>When ACAMERA_LENS_POSE_REFERENCE is AUTOMOTIVE, then this position is relative to the
3114      * origin of the automotive sensor coordinate system, which is at the center of the rear
3115      * axle.</p>
3116      *
3117      * @see ACAMERA_LENS_DISTORTION
3118      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
3119      * @see ACAMERA_LENS_POSE_REFERENCE
3120      * @see ACAMERA_LENS_POSE_ROTATION
3121      */
3122     ACAMERA_LENS_POSE_TRANSLATION =                             // float[3]
3123             ACAMERA_LENS_START + 7,
3124     /**
3125      * <p>The range of scene distances that are in
3126      * sharp focus (depth of field).</p>
3127      *
3128      * <p>Type: float[2]</p>
3129      *
3130      * <p>This tag may appear in:
3131      * <ul>
3132      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3133      * </ul></p>
3134      *
3135      * <p>If variable focus not supported, can still report
3136      * fixed depth of field range</p>
3137      */
3138     ACAMERA_LENS_FOCUS_RANGE =                                  // float[2]
3139             ACAMERA_LENS_START + 8,
3140     /**
3141      * <p>Current lens status.</p>
3142      *
3143      * <p>Type: byte (acamera_metadata_enum_android_lens_state_t)</p>
3144      *
3145      * <p>This tag may appear in:
3146      * <ul>
3147      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3148      * </ul></p>
3149      *
3150      * <p>For lens parameters ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
3151      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE, when changes are requested,
3152      * they may take several frames to reach the requested values. This state indicates
3153      * the current status of the lens parameters.</p>
3154      * <p>When the state is STATIONARY, the lens parameters are not changing. This could be
3155      * either because the parameters are all fixed, or because the lens has had enough
3156      * time to reach the most recently-requested values.
3157      * If all these lens parameters are not changeable for a camera device, as listed below:</p>
3158      * <ul>
3159      * <li>Fixed focus (<code>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE == 0</code>), which means
3160      * ACAMERA_LENS_FOCUS_DISTANCE parameter will always be 0.</li>
3161      * <li>Fixed focal length (ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS contains single value),
3162      * which means the optical zoom is not supported.</li>
3163      * <li>No ND filter (ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES contains only 0).</li>
3164      * <li>Fixed aperture (ACAMERA_LENS_INFO_AVAILABLE_APERTURES contains single value).</li>
3165      * </ul>
3166      * <p>Then this state will always be STATIONARY.</p>
3167      * <p>When the state is MOVING, it indicates that at least one of the lens parameters
3168      * is changing.</p>
3169      *
3170      * @see ACAMERA_LENS_APERTURE
3171      * @see ACAMERA_LENS_FILTER_DENSITY
3172      * @see ACAMERA_LENS_FOCAL_LENGTH
3173      * @see ACAMERA_LENS_FOCUS_DISTANCE
3174      * @see ACAMERA_LENS_INFO_AVAILABLE_APERTURES
3175      * @see ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES
3176      * @see ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS
3177      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
3178      */
3179     ACAMERA_LENS_STATE =                                        // byte (acamera_metadata_enum_android_lens_state_t)
3180             ACAMERA_LENS_START + 9,
3181     /**
3182      * <p>The parameters for this camera device's intrinsic
3183      * calibration.</p>
3184      *
3185      * <p>Type: float[5]</p>
3186      *
3187      * <p>This tag may appear in:
3188      * <ul>
3189      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3190      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3191      * </ul></p>
3192      *
3193      * <p>The five calibration parameters that describe the
3194      * transform from camera-centric 3D coordinates to sensor
3195      * pixel coordinates:</p>
3196      * <pre><code>[f_x, f_y, c_x, c_y, s]
3197      * </code></pre>
3198      * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical
3199      * focal lengths, <code>[c_x, c_y]</code> is the position of the optical
3200      * axis, and <code>s</code> is a skew parameter for the sensor plane not
3201      * being aligned with the lens plane.</p>
3202      * <p>These are typically used within a transformation matrix K:</p>
3203      * <pre><code>K = [ f_x,   s, c_x,
3204      *        0, f_y, c_y,
3205      *        0    0,   1 ]
3206      * </code></pre>
3207      * <p>which can then be combined with the camera pose rotation
3208      * <code>R</code> and translation <code>t</code> (ACAMERA_LENS_POSE_ROTATION and
3209      * ACAMERA_LENS_POSE_TRANSLATION, respectively) to calculate the
3210      * complete transform from world coordinates to pixel
3211      * coordinates:</p>
3212      * <pre><code>P = [ K 0   * [ R -Rt
3213      *      0 1 ]      0 1 ]
3214      * </code></pre>
3215      * <p>(Note the negation of poseTranslation when mapping from camera
3216      * to world coordinates, and multiplication by the rotation).</p>
3217      * <p>With <code>p_w</code> being a point in the world coordinate system
3218      * and <code>p_s</code> being a point in the camera active pixel array
3219      * coordinate system, and with the mapping including the
3220      * homogeneous division by z:</p>
3221      * <pre><code> p_h = (x_h, y_h, z_h) = P p_w
3222      * p_s = p_h / z_h
3223      * </code></pre>
3224      * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world
3225      * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity
3226      * (depth) in pixel coordinates.</p>
3227      * <p>Note that the coordinate system for this transform is the
3228      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE system,
3229      * where <code>(0,0)</code> is the top-left of the
3230      * preCorrectionActiveArraySize rectangle. Once the pose and
3231      * intrinsic calibration transforms have been applied to a
3232      * world point, then the ACAMERA_LENS_DISTORTION
3233      * transform needs to be applied, and the result adjusted to
3234      * be in the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate
3235      * system (where <code>(0, 0)</code> is the top-left of the
3236      * activeArraySize rectangle), to determine the final pixel
3237      * coordinate of the world point for processed (non-RAW)
3238      * output buffers.</p>
3239      * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at
3240      * coordinate <code>(x + 0.5, y + 0.5)</code>.  So on a device with a
3241      * precorrection active array of size <code>(10,10)</code>, the valid pixel
3242      * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would
3243      * have an optical center at the exact center of the pixel grid, at
3244      * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel
3245      * <code>(5,5)</code>.</p>
3246      *
3247      * @see ACAMERA_LENS_DISTORTION
3248      * @see ACAMERA_LENS_POSE_ROTATION
3249      * @see ACAMERA_LENS_POSE_TRANSLATION
3250      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
3251      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
3252      */
3253     ACAMERA_LENS_INTRINSIC_CALIBRATION =                        // float[5]
3254             ACAMERA_LENS_START + 10,
3255     ACAMERA_LENS_RADIAL_DISTORTION =                            // Deprecated! DO NOT USE
3256             ACAMERA_LENS_START + 11,
3257     /**
3258      * <p>The origin for ACAMERA_LENS_POSE_TRANSLATION, and the accuracy of
3259      * ACAMERA_LENS_POSE_TRANSLATION and ACAMERA_LENS_POSE_ROTATION.</p>
3260      *
3261      * @see ACAMERA_LENS_POSE_ROTATION
3262      * @see ACAMERA_LENS_POSE_TRANSLATION
3263      *
3264      * <p>Type: byte (acamera_metadata_enum_android_lens_pose_reference_t)</p>
3265      *
3266      * <p>This tag may appear in:
3267      * <ul>
3268      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3269      * </ul></p>
3270      *
3271      * <p>Different calibration methods and use cases can produce better or worse results
3272      * depending on the selected coordinate origin.</p>
3273      */
3274     ACAMERA_LENS_POSE_REFERENCE =                               // byte (acamera_metadata_enum_android_lens_pose_reference_t)
3275             ACAMERA_LENS_START + 12,
3276     /**
3277      * <p>The correction coefficients to correct for this camera device's
3278      * radial and tangential lens distortion.</p>
3279      * <p>Replaces the deprecated ACAMERA_LENS_RADIAL_DISTORTION field, which was
3280      * inconsistently defined.</p>
3281      *
3282      * @see ACAMERA_LENS_RADIAL_DISTORTION
3283      *
3284      * <p>Type: float[5]</p>
3285      *
3286      * <p>This tag may appear in:
3287      * <ul>
3288      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3289      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3290      * </ul></p>
3291      *
3292      * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2,
3293      * kappa_3]</code> and two tangential distortion coefficients
3294      * <code>[kappa_4, kappa_5]</code> that can be used to correct the
3295      * lens's geometric distortion with the mapping equations:</p>
3296      * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
3297      *        kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
3298      *  y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
3299      *        kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
3300      * </code></pre>
3301      * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the
3302      * input image that correspond to the pixel values in the
3303      * corrected image at the coordinate <code>[x_i, y_i]</code>:</p>
3304      * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
3305      * </code></pre>
3306      * <p>The pixel coordinates are defined in a coordinate system
3307      * related to the ACAMERA_LENS_INTRINSIC_CALIBRATION
3308      * calibration fields; see that entry for details of the mapping stages.
3309      * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code>
3310      * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and
3311      * the range of the coordinates depends on the focal length
3312      * terms of the intrinsic calibration.</p>
3313      * <p>Finally, <code>r</code> represents the radial distance from the
3314      * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p>
3315      * <p>The distortion model used is the Brown-Conrady model.</p>
3316      *
3317      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
3318      */
3319     ACAMERA_LENS_DISTORTION =                                   // float[5]
3320             ACAMERA_LENS_START + 13,
3321     /**
3322      * <p>The correction coefficients to correct for this camera device's
3323      * radial and tangential lens distortion for a
3324      * CaptureRequest with ACAMERA_SENSOR_PIXEL_MODE set to
3325      * <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>
3326      *
3327      * @see ACAMERA_SENSOR_PIXEL_MODE
3328      *
3329      * <p>Type: float[5]</p>
3330      *
3331      * <p>This tag may appear in:
3332      * <ul>
3333      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3334      * </ul></p>
3335      *
3336      * <p>Analogous to ACAMERA_LENS_DISTORTION, when ACAMERA_SENSOR_PIXEL_MODE is set to
3337      * <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>
3338      *
3339      * @see ACAMERA_LENS_DISTORTION
3340      * @see ACAMERA_SENSOR_PIXEL_MODE
3341      */
3342     ACAMERA_LENS_DISTORTION_MAXIMUM_RESOLUTION =                // float[5]
3343             ACAMERA_LENS_START + 14,
3344     /**
3345      * <p>The parameters for this camera device's intrinsic
3346      * calibration when ACAMERA_SENSOR_PIXEL_MODE is set to
3347      * <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>
3348      *
3349      * @see ACAMERA_SENSOR_PIXEL_MODE
3350      *
3351      * <p>Type: float[5]</p>
3352      *
3353      * <p>This tag may appear in:
3354      * <ul>
3355      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3356      * </ul></p>
3357      *
3358      * <p>Analogous to ACAMERA_LENS_INTRINSIC_CALIBRATION, when ACAMERA_SENSOR_PIXEL_MODE is set to
3359      * <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>
3360      *
3361      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
3362      * @see ACAMERA_SENSOR_PIXEL_MODE
3363      */
3364     ACAMERA_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION =     // float[5]
3365             ACAMERA_LENS_START + 15,
3366     ACAMERA_LENS_END,
3367 
3368     /**
3369      * <p>List of aperture size values for ACAMERA_LENS_APERTURE that are
3370      * supported by this camera device.</p>
3371      *
3372      * @see ACAMERA_LENS_APERTURE
3373      *
3374      * <p>Type: float[n]</p>
3375      *
3376      * <p>This tag may appear in:
3377      * <ul>
3378      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3379      * </ul></p>
3380      *
3381      * <p>If the camera device doesn't support a variable lens aperture,
3382      * this list will contain only one value, which is the fixed aperture size.</p>
3383      * <p>If the camera device supports a variable aperture, the aperture values
3384      * in this list will be sorted in ascending order.</p>
3385      */
3386     ACAMERA_LENS_INFO_AVAILABLE_APERTURES =                     // float[n]
3387             ACAMERA_LENS_INFO_START,
3388     /**
3389      * <p>List of neutral density filter values for
3390      * ACAMERA_LENS_FILTER_DENSITY that are supported by this camera device.</p>
3391      *
3392      * @see ACAMERA_LENS_FILTER_DENSITY
3393      *
3394      * <p>Type: float[n]</p>
3395      *
3396      * <p>This tag may appear in:
3397      * <ul>
3398      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3399      * </ul></p>
3400      *
3401      * <p>If a neutral density filter is not supported by this camera device,
3402      * this list will contain only 0. Otherwise, this list will include every
3403      * filter density supported by the camera device, in ascending order.</p>
3404      */
3405     ACAMERA_LENS_INFO_AVAILABLE_FILTER_DENSITIES =              // float[n]
3406             ACAMERA_LENS_INFO_START + 1,
3407     /**
3408      * <p>List of focal lengths for ACAMERA_LENS_FOCAL_LENGTH that are supported by this camera
3409      * device.</p>
3410      *
3411      * @see ACAMERA_LENS_FOCAL_LENGTH
3412      *
3413      * <p>Type: float[n]</p>
3414      *
3415      * <p>This tag may appear in:
3416      * <ul>
3417      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3418      * </ul></p>
3419      *
3420      * <p>If optical zoom is not supported, this list will only contain
3421      * a single value corresponding to the fixed focal length of the
3422      * device. Otherwise, this list will include every focal length supported
3423      * by the camera device, in ascending order.</p>
3424      */
3425     ACAMERA_LENS_INFO_AVAILABLE_FOCAL_LENGTHS =                 // float[n]
3426             ACAMERA_LENS_INFO_START + 2,
3427     /**
3428      * <p>List of optical image stabilization (OIS) modes for
3429      * ACAMERA_LENS_OPTICAL_STABILIZATION_MODE that are supported by this camera device.</p>
3430      *
3431      * @see ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
3432      *
3433      * <p>Type: byte[n]</p>
3434      *
3435      * <p>This tag may appear in:
3436      * <ul>
3437      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3438      * </ul></p>
3439      *
3440      * <p>If OIS is not supported by a given camera device, this list will
3441      * contain only OFF.</p>
3442      */
3443     ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION =         // byte[n]
3444             ACAMERA_LENS_INFO_START + 3,
3445     /**
3446      * <p>Hyperfocal distance for this lens.</p>
3447      *
3448      * <p>Type: float</p>
3449      *
3450      * <p>This tag may appear in:
3451      * <ul>
3452      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3453      * </ul></p>
3454      *
3455      * <p>If the lens is not fixed focus, the camera device will report this
3456      * field when ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION is APPROXIMATE or CALIBRATED.</p>
3457      *
3458      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
3459      */
3460     ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE =                     // float
3461             ACAMERA_LENS_INFO_START + 4,
3462     /**
3463      * <p>Shortest distance from frontmost surface
3464      * of the lens that can be brought into sharp focus.</p>
3465      *
3466      * <p>Type: float</p>
3467      *
3468      * <p>This tag may appear in:
3469      * <ul>
3470      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3471      * </ul></p>
3472      *
3473      * <p>If the lens is fixed-focus, this will be
3474      * 0.</p>
3475      */
3476     ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE =                  // float
3477             ACAMERA_LENS_INFO_START + 5,
3478     /**
3479      * <p>Dimensions of lens shading map.</p>
3480      *
3481      * <p>Type: int32[2]</p>
3482      *
3483      * <p>This tag may appear in:
3484      * <ul>
3485      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3486      * </ul></p>
3487      *
3488      * <p>The map should be on the order of 30-40 rows and columns, and
3489      * must be smaller than 64x64.</p>
3490      */
3491     ACAMERA_LENS_INFO_SHADING_MAP_SIZE =                        // int32[2]
3492             ACAMERA_LENS_INFO_START + 6,
3493     /**
3494      * <p>The lens focus distance calibration quality.</p>
3495      *
3496      * <p>Type: byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)</p>
3497      *
3498      * <p>This tag may appear in:
3499      * <ul>
3500      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3501      * </ul></p>
3502      *
3503      * <p>The lens focus distance calibration quality determines the reliability of
3504      * focus related metadata entries, i.e. ACAMERA_LENS_FOCUS_DISTANCE,
3505      * ACAMERA_LENS_FOCUS_RANGE, ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE, and
3506      * ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE.</p>
3507      * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in
3508      * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity,
3509      * and increasing positive numbers represent focusing closer and closer
3510      * to the camera device. The focus distance control also uses diopters
3511      * on these devices.</p>
3512      * <p>UNCALIBRATED devices do not use units that are directly comparable
3513      * to any real physical measurement, but <code>0.0f</code> still represents farthest
3514      * focus, and ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE represents the
3515      * nearest focus the device can achieve.</p>
3516      *
3517      * @see ACAMERA_LENS_FOCUS_DISTANCE
3518      * @see ACAMERA_LENS_FOCUS_RANGE
3519      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
3520      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
3521      */
3522     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION =              // byte (acamera_metadata_enum_android_lens_info_focus_distance_calibration_t)
3523             ACAMERA_LENS_INFO_START + 7,
3524     ACAMERA_LENS_INFO_END,
3525 
3526     /**
3527      * <p>Mode of operation for the noise reduction algorithm.</p>
3528      *
3529      * <p>Type: byte (acamera_metadata_enum_android_noise_reduction_mode_t)</p>
3530      *
3531      * <p>This tag may appear in:
3532      * <ul>
3533      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3534      *   <li>ACaptureRequest</li>
3535      * </ul></p>
3536      *
3537      * <p>The noise reduction algorithm attempts to improve image quality by removing
3538      * excessive noise added by the capture process, especially in dark conditions.</p>
3539      * <p>OFF means no noise reduction will be applied by the camera device, for both raw and
3540      * YUV domain.</p>
3541      * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
3542      * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
3543      * This mode is optional, may not be support by all devices. The application should check
3544      * ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES before using it.</p>
3545      * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
3546      * will be applied. HIGH_QUALITY mode indicates that the camera device
3547      * will use the highest-quality noise filtering algorithms,
3548      * even if it slows down capture rate. FAST means the camera device will not
3549      * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
3550      * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
3551      * Every output stream will have a similar amount of enhancement applied.</p>
3552      * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
3553      * buffer of high-resolution images during preview and reprocess image(s) from that buffer
3554      * into a final capture when triggered by the user. In this mode, the camera device applies
3555      * noise reduction to low-resolution streams (below maximum recording resolution) to maximize
3556      * preview quality, but does not apply noise reduction to high-resolution streams, since
3557      * those will be reprocessed later if necessary.</p>
3558      * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
3559      * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
3560      * may adjust the noise reduction parameters for best image quality based on the
3561      * android.reprocess.effectiveExposureFactor if it is set.</p>
3562      *
3563      * @see ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
3564      */
3565     ACAMERA_NOISE_REDUCTION_MODE =                              // byte (acamera_metadata_enum_android_noise_reduction_mode_t)
3566             ACAMERA_NOISE_REDUCTION_START,
3567     /**
3568      * <p>List of noise reduction modes for ACAMERA_NOISE_REDUCTION_MODE that are supported
3569      * by this camera device.</p>
3570      *
3571      * @see ACAMERA_NOISE_REDUCTION_MODE
3572      *
3573      * <p>Type: byte[n]</p>
3574      *
3575      * <p>This tag may appear in:
3576      * <ul>
3577      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3578      * </ul></p>
3579      *
3580      * <p>Full-capability camera devices will always support OFF and FAST.</p>
3581      * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
3582      * ZERO_SHUTTER_LAG.</p>
3583      * <p>Legacy-capability camera devices will only support FAST mode.</p>
3584      */
3585     ACAMERA_NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES =   // byte[n]
3586             ACAMERA_NOISE_REDUCTION_START + 2,
3587     ACAMERA_NOISE_REDUCTION_END,
3588 
3589     /**
3590      * <p>The maximum numbers of different types of output streams
3591      * that can be configured and used simultaneously by a camera device.</p>
3592      *
3593      * <p>Type: int32[3]</p>
3594      *
3595      * <p>This tag may appear in:
3596      * <ul>
3597      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3598      * </ul></p>
3599      *
3600      * <p>This is a 3 element tuple that contains the max number of output simultaneous
3601      * streams for raw sensor, processed (but not stalling), and processed (and stalling)
3602      * formats respectively. For example, assuming that JPEG is typically a processed and
3603      * stalling stream, if max raw sensor format output stream number is 1, max YUV streams
3604      * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p>
3605      * <p>This lists the upper bound of the number of output streams supported by
3606      * the camera device. Using more streams simultaneously may require more hardware and
3607      * CPU resources that will consume more power. The image format for an output stream can
3608      * be any supported format provided by ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS.
3609      * The formats defined in ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS can be categorized
3610      * into the 3 stream types as below:</p>
3611      * <ul>
3612      * <li>Processed (but stalling): any non-RAW format with a stallDurations &gt; 0.
3613      *   Typically {@link AIMAGE_FORMAT_JPEG JPEG format}.</li>
3614      * <li>Raw formats: {@link AIMAGE_FORMAT_RAW16 RAW_SENSOR}, {@link AIMAGE_FORMAT_RAW10 RAW10}, or
3615      *   {@link AIMAGE_FORMAT_RAW12 RAW12}.</li>
3616      * <li>Processed (but not-stalling): any non-RAW format without a stall duration.  Typically
3617      *   {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888},
3618      *   <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>
3619      * </ul>
3620      *
3621      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
3622      */
3623     ACAMERA_REQUEST_MAX_NUM_OUTPUT_STREAMS =                    // int32[3]
3624             ACAMERA_REQUEST_START + 6,
3625     /**
3626      * <p>Specifies the number of pipeline stages the frame went
3627      * through from when it was exposed to when the final completed result
3628      * was available to the framework.</p>
3629      *
3630      * <p>Type: byte</p>
3631      *
3632      * <p>This tag may appear in:
3633      * <ul>
3634      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3635      * </ul></p>
3636      *
3637      * <p>Depending on what settings are used in the request, and
3638      * what streams are configured, the data may undergo less processing,
3639      * and some pipeline stages skipped.</p>
3640      * <p>See ACAMERA_REQUEST_PIPELINE_MAX_DEPTH for more details.</p>
3641      *
3642      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
3643      */
3644     ACAMERA_REQUEST_PIPELINE_DEPTH =                            // byte
3645             ACAMERA_REQUEST_START + 9,
3646     /**
3647      * <p>Specifies the number of maximum pipeline stages a frame
3648      * has to go through from when it's exposed to when it's available
3649      * to the framework.</p>
3650      *
3651      * <p>Type: byte</p>
3652      *
3653      * <p>This tag may appear in:
3654      * <ul>
3655      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3656      * </ul></p>
3657      *
3658      * <p>A typical minimum value for this is 2 (one stage to expose,
3659      * one stage to readout) from the sensor. The ISP then usually adds
3660      * its own stages to do custom HW processing. Further stages may be
3661      * added by SW processing.</p>
3662      * <p>Depending on what settings are used (e.g. YUV, JPEG) and what
3663      * processing is enabled (e.g. face detection), the actual pipeline
3664      * depth (specified by ACAMERA_REQUEST_PIPELINE_DEPTH) may be less than
3665      * the max pipeline depth.</p>
3666      * <p>A pipeline depth of X stages is equivalent to a pipeline latency of
3667      * X frame intervals.</p>
3668      * <p>This value will normally be 8 or less, however, for high speed capture session,
3669      * the max pipeline depth will be up to 8 x size of high speed capture request list.</p>
3670      *
3671      * @see ACAMERA_REQUEST_PIPELINE_DEPTH
3672      */
3673     ACAMERA_REQUEST_PIPELINE_MAX_DEPTH =                        // byte
3674             ACAMERA_REQUEST_START + 10,
3675     /**
3676      * <p>Defines how many sub-components
3677      * a result will be composed of.</p>
3678      *
3679      * <p>Type: int32</p>
3680      *
3681      * <p>This tag may appear in:
3682      * <ul>
3683      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3684      * </ul></p>
3685      *
3686      * <p>In order to combat the pipeline latency, partial results
3687      * may be delivered to the application layer from the camera device as
3688      * soon as they are available.</p>
3689      * <p>Optional; defaults to 1. A value of 1 means that partial
3690      * results are not supported, and only the final TotalCaptureResult will
3691      * be produced by the camera device.</p>
3692      * <p>A typical use case for this might be: after requesting an
3693      * auto-focus (AF) lock the new AF state might be available 50%
3694      * of the way through the pipeline.  The camera device could
3695      * then immediately dispatch this state via a partial result to
3696      * the application, and the rest of the metadata via later
3697      * partial results.</p>
3698      */
3699     ACAMERA_REQUEST_PARTIAL_RESULT_COUNT =                      // int32
3700             ACAMERA_REQUEST_START + 11,
3701     /**
3702      * <p>List of capabilities that this camera device
3703      * advertises as fully supporting.</p>
3704      *
3705      * <p>Type: byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)</p>
3706      *
3707      * <p>This tag may appear in:
3708      * <ul>
3709      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3710      * </ul></p>
3711      *
3712      * <p>A capability is a contract that the camera device makes in order
3713      * to be able to satisfy one or more use cases.</p>
3714      * <p>Listing a capability guarantees that the whole set of features
3715      * required to support a common use will all be available.</p>
3716      * <p>Using a subset of the functionality provided by an unsupported
3717      * capability may be possible on a specific camera device implementation;
3718      * to do this query each of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS,
3719      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS,
3720      * ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS.</p>
3721      * <p>The following capabilities are guaranteed to be available on
3722      * ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL <code>==</code> FULL devices:</p>
3723      * <ul>
3724      * <li>MANUAL_SENSOR</li>
3725      * <li>MANUAL_POST_PROCESSING</li>
3726      * </ul>
3727      * <p>Other capabilities may be available on either FULL or LIMITED
3728      * devices, but the application should query this key to be sure.</p>
3729      *
3730      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
3731      * @see ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS
3732      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3733      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3734      */
3735     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES =                    // byte[n] (acamera_metadata_enum_android_request_available_capabilities_t)
3736             ACAMERA_REQUEST_START + 12,
3737     /**
3738      * <p>A list of all keys that the camera device has available
3739      * to use with {@link ACaptureRequest }.</p>
3740      *
3741      * <p>Type: int32[n]</p>
3742      *
3743      * <p>This tag may appear in:
3744      * <ul>
3745      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3746      * </ul></p>
3747      *
3748      * <p>Attempting to set a key into a CaptureRequest that is not
3749      * listed here will result in an invalid request and will be rejected
3750      * by the camera device.</p>
3751      * <p>This field can be used to query the feature set of a camera device
3752      * at a more granular level than capabilities. This is especially
3753      * important for optional keys that are not listed under any capability
3754      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3755      *
3756      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3757      */
3758     ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS =                    // int32[n]
3759             ACAMERA_REQUEST_START + 13,
3760     /**
3761      * <p>A list of all keys that the camera device has available to use with {@link ACameraCaptureSession_captureCallback_result }.</p>
3762      *
3763      * <p>Type: int32[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>Attempting to get a key from a CaptureResult that is not
3771      * listed here will always return a <code>null</code> value. Getting a key from
3772      * a CaptureResult that is listed here will generally never return a <code>null</code>
3773      * value.</p>
3774      * <p>The following keys may return <code>null</code> unless they are enabled:</p>
3775      * <ul>
3776      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP (non-null iff ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON)</li>
3777      * </ul>
3778      * <p>(Those sometimes-null keys will nevertheless be listed here
3779      * if they are available.)</p>
3780      * <p>This field can be used to query the feature set of a camera device
3781      * at a more granular level than capabilities. This is especially
3782      * important for optional keys that are not listed under any capability
3783      * in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
3784      *
3785      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
3786      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
3787      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
3788      */
3789     ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS =                     // int32[n]
3790             ACAMERA_REQUEST_START + 14,
3791     /**
3792      * <p>A list of all keys that the camera device has available to use with {@link ACameraManager_getCameraCharacteristics }.</p>
3793      *
3794      * <p>Type: int32[n]</p>
3795      *
3796      * <p>This tag may appear in:
3797      * <ul>
3798      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3799      * </ul></p>
3800      *
3801      * <p>This entry follows the same rules as
3802      * ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS (except that it applies for
3803      * CameraCharacteristics instead of CaptureResult). See above for more
3804      * details.</p>
3805      *
3806      * @see ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS
3807      */
3808     ACAMERA_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS =            // int32[n]
3809             ACAMERA_REQUEST_START + 15,
3810     /**
3811      * <p>A subset of the available request keys that the camera device
3812      * can pass as part of the capture session initialization.</p>
3813      *
3814      * <p>Type: int32[n]</p>
3815      *
3816      * <p>This tag may appear in:
3817      * <ul>
3818      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3819      * </ul></p>
3820      *
3821      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which
3822      * contains a list of keys that are difficult to apply per-frame and
3823      * can result in unexpected delays when modified during the capture session
3824      * lifetime. Typical examples include parameters that require a
3825      * time-consuming hardware re-configuration or internal camera pipeline
3826      * change. For performance reasons we advise clients to pass their initial
3827      * values as part of
3828      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3829      * Once the camera capture session is enabled it is also recommended to avoid
3830      * changing them from their initial values set in
3831      * {@link ACameraDevice_createCaptureSessionWithSessionParameters }.
3832      * Control over session parameters can still be exerted in capture requests
3833      * but clients should be aware and expect delays during their application.
3834      * An example usage scenario could look like this:</p>
3835      * <ul>
3836      * <li>The camera client starts by querying the session parameter key list via
3837      *   {@link ACameraManager_getCameraCharacteristics }.</li>
3838      * <li>Before triggering the capture session create sequence, a capture request
3839      *   must be built via
3840      *   {@link ACameraDevice_createCaptureRequest }
3841      *   using an appropriate template matching the particular use case.</li>
3842      * <li>The client should go over the list of session parameters and check
3843      *   whether some of the keys listed matches with the parameters that
3844      *   they intend to modify as part of the first capture request.</li>
3845      * <li>If there is no such match, the capture request can be  passed
3846      *   unmodified to
3847      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3848      * <li>If matches do exist, the client should update the respective values
3849      *   and pass the request to
3850      *   {@link ACameraDevice_createCaptureSessionWithSessionParameters }.</li>
3851      * <li>After the capture session initialization completes the session parameter
3852      *   key list can continue to serve as reference when posting or updating
3853      *   further requests. As mentioned above further changes to session
3854      *   parameters should ideally be avoided, if updates are necessary
3855      *   however clients could expect a delay/glitch during the
3856      *   parameter switch.</li>
3857      * </ul>
3858      *
3859      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3860      */
3861     ACAMERA_REQUEST_AVAILABLE_SESSION_KEYS =                    // int32[n]
3862             ACAMERA_REQUEST_START + 16,
3863     /**
3864      * <p>A subset of the available request keys that can be overridden for
3865      * physical devices backing a logical multi-camera.</p>
3866      *
3867      * <p>Type: int32[n]</p>
3868      *
3869      * <p>This tag may appear in:
3870      * <ul>
3871      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3872      * </ul></p>
3873      *
3874      * <p>This is a subset of ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS which contains a list
3875      * of keys that can be overridden using
3876      * <a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Builder.html#setPhysicalCameraKey">Builder#setPhysicalCameraKey</a>.
3877      * The respective value of such request key can be obtained by calling
3878      * <a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.Builder.html#getPhysicalCameraKey">Builder#getPhysicalCameraKey</a>.
3879      * Capture requests that contain individual physical device requests must be built via
3880      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureRequest(int,">Set)</a>.</p>
3881      *
3882      * @see ACAMERA_REQUEST_AVAILABLE_REQUEST_KEYS
3883      */
3884     ACAMERA_REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS =    // int32[n]
3885             ACAMERA_REQUEST_START + 17,
3886     /**
3887      * <p>A map of all available 10-bit dynamic range profiles along with their
3888      * capture request constraints.</p>
3889      *
3890      * <p>Type: int64[n*3] (acamera_metadata_enum_android_request_available_dynamic_range_profiles_map_t)</p>
3891      *
3892      * <p>This tag may appear in:
3893      * <ul>
3894      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3895      * </ul></p>
3896      *
3897      * <p>Devices supporting the 10-bit output capability
3898      * <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>
3899      * must list their supported dynamic range profiles. In case the camera is not able to
3900      * support every possible profile combination within a single capture request, then the
3901      * constraints must be listed here as well.</p>
3902      */
3903     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP =      // int64[n*3] (acamera_metadata_enum_android_request_available_dynamic_range_profiles_map_t)
3904             ACAMERA_REQUEST_START + 19,
3905     /**
3906      * <p>A list of all possible color space profiles supported by a camera device.</p>
3907      *
3908      * <p>Type: int64[n*3] (acamera_metadata_enum_android_request_available_color_space_profiles_map_t)</p>
3909      *
3910      * <p>This tag may appear in:
3911      * <ul>
3912      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
3913      * </ul></p>
3914      *
3915      * <p>A color space profile is a combination of a color space, an image format, and a dynamic range
3916      * profile. If a camera does not support the
3917      * <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>
3918      * capability, the dynamic range profile will always be
3919      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles.html#STANDARD">DynamicRangeProfiles#STANDARD</a>. Camera clients can
3920      * use <a href="https://developer.android.com/reference/android/hardware/camera2/params/SessionConfiguration.html#setColorSpace">SessionConfiguration#setColorSpace</a> to select
3921      * a color space.</p>
3922      */
3923     ACAMERA_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP =        // int64[n*3] (acamera_metadata_enum_android_request_available_color_space_profiles_map_t)
3924             ACAMERA_REQUEST_START + 21,
3925     ACAMERA_REQUEST_END,
3926 
3927     /**
3928      * <p>The desired region of the sensor to read out for this capture.</p>
3929      *
3930      * <p>Type: int32[4]</p>
3931      *
3932      * <p>This tag may appear in:
3933      * <ul>
3934      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
3935      *   <li>ACaptureRequest</li>
3936      * </ul></p>
3937      *
3938      * <p>This control can be used to implement digital zoom.</p>
3939      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
3940      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
3941      * the top-left pixel of the active array.</p>
3942      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate system
3943      * depends on the mode being set.  When the distortion correction mode is OFF, the
3944      * coordinate system follows ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with <code>(0,
3945      * 0)</code> being the top-left pixel of the pre-correction active array.  When the distortion
3946      * correction mode is not OFF, the coordinate system follows
3947      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being the top-left pixel of the
3948      * active array.</p>
3949      * <p>Output streams use this rectangle to produce their output, cropping to a smaller region
3950      * if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
3951      * match the output's configured resolution.</p>
3952      * <p>The crop region is usually applied after the RAW to other color space (e.g. YUV)
3953      * conversion. As a result RAW streams are not croppable unless supported by the
3954      * camera device. See ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES#CROPPED_RAW for details.</p>
3955      * <p>For non-raw streams, any additional per-stream cropping will be done to maximize the
3956      * final pixel area of the stream.</p>
3957      * <p>For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
3958      * the exact crop region. 16:9 streams will further crop vertically (letterbox).</p>
3959      * <p>Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
3960      * (pillarbox), and 16:9 streams will match exactly. These additional crops will be
3961      * centered within the crop region.</p>
3962      * <p>To illustrate, here are several scenarios of different crop regions and output streams,
3963      * for a hypothetical camera device with an active array of size <code>(2000,1500)</code>.  Note that
3964      * several of these examples use non-centered crop regions for ease of illustration; such
3965      * regions are only supported on devices with FREEFORM capability
3966      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>), but this does not affect the way the crop
3967      * rules work otherwise.</p>
3968      * <ul>
3969      * <li>Camera Configuration:<ul>
3970      * <li>Active array size: <code>2000x1500</code> (3 MP, 4:3 aspect ratio)</li>
3971      * <li>Output stream #1: <code>640x480</code> (VGA, 4:3 aspect ratio)</li>
3972      * <li>Output stream #2: <code>1280x720</code> (720p, 16:9 aspect ratio)</li>
3973      * </ul>
3974      * </li>
3975      * <li>Case #1: 4:3 crop region with 2x digital zoom<ul>
3976      * <li>Crop region: <code>Rect(500, 375, 1500, 1125) // (left, top, right, bottom)</code></li>
3977      * <li><img alt="4:3 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-43-ratio.png" /></li>
3978      * <li><code>640x480</code> stream source area: <code>(500, 375, 1500, 1125)</code> (equal to crop region)</li>
3979      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
3980      * </ul>
3981      * </li>
3982      * <li>Case #2: 16:9 crop region with ~1.5x digital zoom.<ul>
3983      * <li>Crop region: <code>Rect(500, 375, 1833, 1125)</code></li>
3984      * <li><img alt="16:9 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-169-ratio.png" /></li>
3985      * <li><code>640x480</code> stream source area: <code>(666, 375, 1666, 1125)</code> (pillarboxed)</li>
3986      * <li><code>1280x720</code> stream source area: <code>(500, 375, 1833, 1125)</code> (equal to crop region)</li>
3987      * </ul>
3988      * </li>
3989      * <li>Case #3: 1:1 crop region with ~2.6x digital zoom.<ul>
3990      * <li>Crop region: <code>Rect(500, 375, 1250, 1125)</code></li>
3991      * <li><img alt="1:1 aspect ratio crop diagram" src="../images/camera2/metadata/android.scaler.cropRegion/crop-region-11-ratio.png" /></li>
3992      * <li><code>640x480</code> stream source area: <code>(500, 469, 1250, 1031)</code> (letterboxed)</li>
3993      * <li><code>1280x720</code> stream source area: <code>(500, 543, 1250, 957)</code> (letterboxed)</li>
3994      * </ul>
3995      * </li>
3996      * <li>Case #4: Replace <code>640x480</code> stream with <code>1024x1024</code> stream, with 4:3 crop region:<ul>
3997      * <li>Crop region: <code>Rect(500, 375, 1500, 1125)</code></li>
3998      * <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>
3999      * <li><code>1024x1024</code> stream source area: <code>(625, 375, 1375, 1125)</code> (pillarboxed)</li>
4000      * <li><code>1280x720</code> stream source area: <code>(500, 469, 1500, 1031)</code> (letterboxed)</li>
4001      * <li>Note that in this case, neither of the two outputs is a subset of the other, with
4002      *   each containing image data the other doesn't have.</li>
4003      * </ul>
4004      * </li>
4005      * </ul>
4006      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, the width and height
4007      * of the crop region cannot be set to be smaller than
4008      * <code>floor( activeArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code> and
4009      * <code>floor( activeArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>, respectively.</p>
4010      * <p>If the coordinate system is ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, the width
4011      * and height of the crop region cannot be set to be smaller than
4012      * <code>floor( preCorrectionActiveArraySize.width / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>
4013      * and
4014      * <code>floor( preCorrectionActiveArraySize.height / ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM )</code>,
4015      * respectively.</p>
4016      * <p>The camera device may adjust the crop region to account for rounding and other hardware
4017      * requirements; the final crop region used will be included in the output capture result.</p>
4018      * <p>The camera sensor output aspect ratio depends on factors such as output stream
4019      * combination and ACAMERA_CONTROL_AE_TARGET_FPS_RANGE, and shouldn't be adjusted by using
4020      * this control. And the camera device will treat different camera sensor output sizes
4021      * (potentially with in-sensor crop) as the same crop of
4022      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE. As a result, the application shouldn't assume the
4023      * maximum crop region always maps to the same aspect ratio or field of view for the
4024      * sensor output.</p>
4025      * <p>Starting from API level 30, it's strongly recommended to use ACAMERA_CONTROL_ZOOM_RATIO
4026      * to take advantage of better support for zoom with logical multi-camera. The benefits
4027      * include better precision with optical-digital zoom combination, and ability to do
4028      * zoom-out from 1.0x. When using ACAMERA_CONTROL_ZOOM_RATIO for zoom, the crop region in
4029      * the capture request should be left as the default activeArray size. The
4030      * coordinate system is post-zoom, meaning that the activeArraySize or
4031      * preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
4032      * ACAMERA_CONTROL_ZOOM_RATIO for details.</p>
4033      * <p>For camera devices with the
4034      * <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>
4035      * capability or devices where <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
4036      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a></p>
4037      * <p>ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
4038      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
4039      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
4040      * <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>
4041      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
4042      *
4043      * @see ACAMERA_CONTROL_AE_TARGET_FPS_RANGE
4044      * @see ACAMERA_CONTROL_ZOOM_RATIO
4045      * @see ACAMERA_DISTORTION_CORRECTION_MODE
4046      * @see ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
4047      * @see ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES
4048      * @see ACAMERA_SCALER_CROPPING_TYPE
4049      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4050      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
4051      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4052      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
4053      * @see ACAMERA_SENSOR_PIXEL_MODE
4054      */
4055     ACAMERA_SCALER_CROP_REGION =                                // int32[4]
4056             ACAMERA_SCALER_START,
4057     /**
4058      * <p>The maximum ratio between both active area width
4059      * and crop region width, and active area height and
4060      * crop region height, for ACAMERA_SCALER_CROP_REGION.</p>
4061      *
4062      * @see ACAMERA_SCALER_CROP_REGION
4063      *
4064      * <p>Type: float</p>
4065      *
4066      * <p>This tag may appear in:
4067      * <ul>
4068      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4069      * </ul></p>
4070      *
4071      * <p>This represents the maximum amount of zooming possible by
4072      * the camera device, or equivalently, the minimum cropping
4073      * window size.</p>
4074      * <p>Crop regions that have a width or height that is smaller
4075      * than this ratio allows will be rounded up to the minimum
4076      * allowed size by the camera device.</p>
4077      * <p>Starting from API level 30, when using ACAMERA_CONTROL_ZOOM_RATIO to zoom in or out,
4078      * the application must use ACAMERA_CONTROL_ZOOM_RATIO_RANGE to query both the minimum and
4079      * maximum zoom ratio.</p>
4080      *
4081      * @see ACAMERA_CONTROL_ZOOM_RATIO
4082      * @see ACAMERA_CONTROL_ZOOM_RATIO_RANGE
4083      */
4084     ACAMERA_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM =                 // float
4085             ACAMERA_SCALER_START + 4,
4086     /**
4087      * <p>The available stream configurations that this
4088      * camera device supports
4089      * (i.e. format, width, height, output/input stream).</p>
4090      *
4091      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)</p>
4092      *
4093      * <p>This tag may appear in:
4094      * <ul>
4095      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4096      * </ul></p>
4097      *
4098      * <p>The configurations are listed as <code>(format, width, height, input?)</code>
4099      * tuples.</p>
4100      * <p>For a given use case, the actual maximum supported resolution
4101      * may be lower than what is listed here, depending on the destination
4102      * Surface for the image data. For example, for recording video,
4103      * the video encoder chosen may have a maximum size limit (e.g. 1080p)
4104      * smaller than what the camera (e.g. maximum resolution is 3264x2448)
4105      * can provide.</p>
4106      * <p>Please reference the documentation for the image data destination to
4107      * check if it limits the maximum size for image data.</p>
4108      * <p>Not all output formats may be supported in a configuration with
4109      * an input stream of a particular format. For more details, see
4110      * android.scaler.availableInputOutputFormatsMap.</p>
4111      * <p>For applications targeting SDK version older than 31, the following table
4112      * describes the minimum required output stream configurations based on the hardware level
4113      * (ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL):</p>
4114      * <p>Format         | Size                                         | Hardware Level | Notes
4115      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
4116      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
4117      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
4118      * JPEG           | 1280x720 (720)                               | Any            | if 720p &lt;= activeArraySize
4119      * JPEG           | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
4120      * JPEG           | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
4121      * YUV_420_888    | all output sizes available for JPEG          | FULL           |
4122      * YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
4123      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
4124      * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
4125      * media performance class 12 or higher by setting
4126      * <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,
4127      * the primary camera devices (first rear/front camera in the camera ID list) will not
4128      * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
4129      * smaller than 1080p, the camera device will round up the JPEG image size to at least
4130      * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
4131      * This new minimum required output stream configurations are illustrated by the table below:</p>
4132      * <p>Format         | Size                                         | Hardware Level | Notes
4133      * :-------------:|:--------------------------------------------:|:--------------:|:--------------:
4134      * JPEG           | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | Any            |
4135      * JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
4136      * YUV_420_888    | ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE          | FULL           |
4137      * YUV_420_888    | 1920x1080 (1080p)                            | FULL           | if 1080p &lt;= activeArraySize
4138      * YUV_420_888    | 1280x720 (720)                               | FULL           | if 720p &lt;= activeArraySize
4139      * YUV_420_888    | 640x480 (480p)                               | FULL           | if 480p &lt;= activeArraySize
4140      * YUV_420_888    | 320x240 (240p)                               | FULL           | if 240p &lt;= activeArraySize
4141      * YUV_420_888    | all output sizes available for FULL hardware level, up to the maximum video size | LIMITED        |
4142      * IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |</p>
4143      * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
4144      * to be media performance class 12 or better by setting
4145      * <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,
4146      * or if the camera device isn't a primary rear/front camera, the minimum required output
4147      * stream configurations are the same as for applications targeting SDK version older than
4148      * 31.</p>
4149      * <p>Refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES for additional
4150      * mandatory stream configurations on a per-capability basis.</p>
4151      * <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
4152      * downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
4153      * fully supported due to this limitation on devices with high-resolution image sensors.
4154      * Therefore, trying to configure a QCIF resolution stream together with any other
4155      * stream larger than 1920x1080 resolution (either width or height) might not be supported,
4156      * and capture session creation will fail if it is not.</p>
4157      *
4158      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
4159      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
4160      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4161      */
4162     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS =            // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_t)
4163             ACAMERA_SCALER_START + 10,
4164     /**
4165      * <p>This lists the minimum frame duration for each
4166      * format/size combination.</p>
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>This should correspond to the frame duration when only that
4176      * stream is active, with all processing (typically in android.*.mode)
4177      * set to either OFF or FAST.</p>
4178      * <p>When multiple streams are used in a request, the minimum frame
4179      * duration will be max(individual stream min durations).</p>
4180      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
4181      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
4182      * calculating the max frame rate.</p>
4183      *
4184      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
4185      * @see ACAMERA_SENSOR_FRAME_DURATION
4186      */
4187     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS =              // int64[4*n]
4188             ACAMERA_SCALER_START + 11,
4189     /**
4190      * <p>This lists the maximum stall duration for each
4191      * output format/size combination.</p>
4192      *
4193      * <p>Type: int64[4*n]</p>
4194      *
4195      * <p>This tag may appear in:
4196      * <ul>
4197      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4198      * </ul></p>
4199      *
4200      * <p>A stall duration is how much extra time would get added
4201      * to the normal minimum frame duration for a repeating request
4202      * that has streams with non-zero stall.</p>
4203      * <p>For example, consider JPEG captures which have the following
4204      * characteristics:</p>
4205      * <ul>
4206      * <li>JPEG streams act like processed YUV streams in requests for which
4207      * they are not included; in requests in which they are directly
4208      * referenced, they act as JPEG streams. This is because supporting a
4209      * JPEG stream requires the underlying YUV data to always be ready for
4210      * use by a JPEG encoder, but the encoder will only be used (and impact
4211      * frame duration) on requests that actually reference a JPEG stream.</li>
4212      * <li>The JPEG processor can run concurrently to the rest of the camera
4213      * pipeline, but cannot process more than 1 capture at a time.</li>
4214      * </ul>
4215      * <p>In other words, using a repeating YUV request would result
4216      * in a steady frame rate (let's say it's 30 FPS). If a single
4217      * JPEG request is submitted periodically, the frame rate will stay
4218      * at 30 FPS (as long as we wait for the previous JPEG to return each
4219      * time). If we try to submit a repeating YUV + JPEG request, then
4220      * the frame rate will drop from 30 FPS.</p>
4221      * <p>In general, submitting a new request with a non-0 stall time
4222      * stream will <em>not</em> cause a frame rate drop unless there are still
4223      * outstanding buffers for that stream from previous requests.</p>
4224      * <p>Submitting a repeating request with streams (call this <code>S</code>)
4225      * is the same as setting the minimum frame duration from
4226      * the normal minimum frame duration corresponding to <code>S</code>, added with
4227      * the maximum stall duration for <code>S</code>.</p>
4228      * <p>If interleaving requests with and without a stall duration,
4229      * a request will stall by the maximum of the remaining times
4230      * for each can-stall stream with outstanding buffers.</p>
4231      * <p>This means that a stalling request will not have an exposure start
4232      * until the stall has completed.</p>
4233      * <p>This should correspond to the stall duration when only that stream is
4234      * active, with all processing (typically in android.*.mode) set to FAST
4235      * or OFF. Setting any of the processing modes to HIGH_QUALITY
4236      * effectively results in an indeterminate stall duration for all
4237      * streams in a request (the regular stall calculation rules are
4238      * ignored).</p>
4239      * <p>The following formats may always have a stall duration:</p>
4240      * <ul>
4241      * <li>{@link AIMAGE_FORMAT_JPEG }</li>
4242      * <li>{@link AIMAGE_FORMAT_RAW16 }</li>
4243      * </ul>
4244      * <p>The following formats will never have a stall duration:</p>
4245      * <ul>
4246      * <li>{@link AIMAGE_FORMAT_YUV_420_888 }</li>
4247      * <li>{@link AIMAGE_FORMAT_RAW10 }</li>
4248      * <li>{@link AIMAGE_FORMAT_RAW12 }</li>
4249      * <li>{@link AIMAGE_FORMAT_Y8 }</li>
4250      * </ul>
4251      * <p>All other formats may or may not have an allowed stall duration on
4252      * a per-capability basis; refer to ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
4253      * for more details.</p>
4254      * <p>See ACAMERA_SENSOR_FRAME_DURATION for more information about
4255      * calculating the max frame rate (absent stalls).</p>
4256      *
4257      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
4258      * @see ACAMERA_SENSOR_FRAME_DURATION
4259      */
4260     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS =                  // int64[4*n]
4261             ACAMERA_SCALER_START + 12,
4262     /**
4263      * <p>The crop type that this camera device supports.</p>
4264      *
4265      * <p>Type: byte (acamera_metadata_enum_android_scaler_cropping_type_t)</p>
4266      *
4267      * <p>This tag may appear in:
4268      * <ul>
4269      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4270      * </ul></p>
4271      *
4272      * <p>When passing a non-centered crop region (ACAMERA_SCALER_CROP_REGION) to a camera
4273      * device that only supports CENTER_ONLY cropping, the camera device will move the
4274      * crop region to the center of the sensor active array (ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE)
4275      * and keep the crop region width and height unchanged. The camera device will return the
4276      * final used crop region in metadata result ACAMERA_SCALER_CROP_REGION.</p>
4277      * <p>Camera devices that support FREEFORM cropping will support any crop region that
4278      * is inside of the active array. The camera device will apply the same crop region and
4279      * return the final used crop region in capture result metadata ACAMERA_SCALER_CROP_REGION.</p>
4280      * <p>Starting from API level 30,</p>
4281      * <ul>
4282      * <li>If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
4283      * application must set ACAMERA_CONTROL_ZOOM_RATIO to 1.0, and use ACAMERA_SCALER_CROP_REGION
4284      * for zoom.</li>
4285      * <li>To do CENTER_ONLY zoom, the application has below 2 options:<ol>
4286      * <li>Set ACAMERA_CONTROL_ZOOM_RATIO to 1.0; adjust zoom by ACAMERA_SCALER_CROP_REGION.</li>
4287      * <li>Adjust zoom by ACAMERA_CONTROL_ZOOM_RATIO; use ACAMERA_SCALER_CROP_REGION to crop
4288      * the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
4289      * windowboxing.</li>
4290      * </ol>
4291      * </li>
4292      * <li>Setting ACAMERA_CONTROL_ZOOM_RATIO to values different than 1.0 and
4293      * ACAMERA_SCALER_CROP_REGION to be windowboxing at the same time are not supported. In this
4294      * case, the camera framework will override the ACAMERA_SCALER_CROP_REGION to be the active
4295      * array.</li>
4296      * </ul>
4297      * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p>
4298      *
4299      * @see ACAMERA_CONTROL_ZOOM_RATIO
4300      * @see ACAMERA_SCALER_CROP_REGION
4301      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4302      */
4303     ACAMERA_SCALER_CROPPING_TYPE =                              // byte (acamera_metadata_enum_android_scaler_cropping_type_t)
4304             ACAMERA_SCALER_START + 13,
4305     /**
4306      * <p>Recommended stream configurations for common client use cases.</p>
4307      *
4308      * <p>Type: int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)</p>
4309      *
4310      * <p>This tag may appear in:
4311      * <ul>
4312      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4313      * </ul></p>
4314      *
4315      * <p>Optional subset of the ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS that contains
4316      * similar tuples listed as
4317      * (i.e. width, height, format, output/input stream, usecase bit field).
4318      * Camera devices will be able to suggest particular stream configurations which are
4319      * power and performance efficient for specific use cases. For more information about
4320      * retrieving the suggestions see
4321      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
4322      * <p>The data representation is int[5], which maps to
4323      * (width, height, format, output/input stream, usecase bit field). The array can be
4324      * parsed using the following pseudo code:</p>
4325      * <p>struct StreamConfiguration {
4326      * int32_t format;
4327      * int32_t width;
4328      * int32_t height;
4329      * int32_t isInput; };</p>
4330      * <p>void getPreferredStreamConfigurations(
4331      *     int32_t *array, size_t count, int32_t usecaseId,
4332      *     Vector &lt; StreamConfiguration &gt; * scs) {
4333      *     const size_t STREAM_CONFIGURATION_SIZE = 5;
4334      *     const size_t STREAM_WIDTH_OFFSET = 0;
4335      *     const size_t STREAM_HEIGHT_OFFSET = 1;
4336      *     const size_t STREAM_FORMAT_OFFSET = 2;
4337      *     const size_t STREAM_IS_INPUT_OFFSET = 3;
4338      *     const size_t STREAM_USECASE_BITMAP_OFFSET = 4;</p>
4339      * <pre><code>for (size_t i = 0; i &lt; count; i+= STREAM_CONFIGURATION_SIZE) {
4340      *     int32_t width = array[i + STREAM_WIDTH_OFFSET];
4341      *     int32_t height = array[i + STREAM_HEIGHT_OFFSET];
4342      *     int32_t format = array[i + STREAM_FORMAT_OFFSET];
4343      *     int32_t isInput = array[i + STREAM_IS_INPUT_OFFSET];
4344      *     int32_t supportedUsecases = array[i + STREAM_USECASE_BITMAP_OFFSET];
4345      *     if (supportedUsecases &amp; (1 &lt;&lt; usecaseId)) {
4346      *         StreamConfiguration sc = {format, width, height, isInput};
4347      *         scs-&gt;add(sc);
4348      *     }
4349      * }
4350      * </code></pre>
4351      * <p>}</p>
4352      *
4353      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
4354      */
4355     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS =
4356                                                                 // int32[n*5] (acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t)
4357             ACAMERA_SCALER_START + 14,
4358     /**
4359      * <p>Recommended mappings of image formats that are supported by this
4360      * camera device for input streams, to their corresponding output formats.</p>
4361      *
4362      * <p>Type: int32</p>
4363      *
4364      * <p>This tag may appear in:
4365      * <ul>
4366      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4367      * </ul></p>
4368      *
4369      * <p>This is a recommended subset of the complete list of mappings found in
4370      * android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
4371      * The list however doesn't need to contain all available and supported mappings. Instead of
4372      * this developers must list only recommended and efficient entries.
4373      * If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
4374      * configuration see
4375      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
4376      */
4377     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP =
4378                                                                 // int32
4379             ACAMERA_SCALER_START + 15,
4380     /**
4381      * <p>List of rotate-and-crop modes for ACAMERA_SCALER_ROTATE_AND_CROP that are supported by this camera device.</p>
4382      *
4383      * @see ACAMERA_SCALER_ROTATE_AND_CROP
4384      *
4385      * <p>Type: byte[n]</p>
4386      *
4387      * <p>This tag may appear in:
4388      * <ul>
4389      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4390      * </ul></p>
4391      *
4392      * <p>This entry lists the valid modes for ACAMERA_SCALER_ROTATE_AND_CROP for this camera device.</p>
4393      * <p>Starting with API level 30, all devices will list at least <code>ROTATE_AND_CROP_NONE</code>.
4394      * Devices with support for rotate-and-crop will additionally list at least
4395      * <code>ROTATE_AND_CROP_AUTO</code> and <code>ROTATE_AND_CROP_90</code>.</p>
4396      *
4397      * @see ACAMERA_SCALER_ROTATE_AND_CROP
4398      */
4399     ACAMERA_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES =            // byte[n]
4400             ACAMERA_SCALER_START + 16,
4401     /**
4402      * <p>Whether a rotation-and-crop operation is applied to processed
4403      * outputs from the camera.</p>
4404      *
4405      * <p>Type: byte (acamera_metadata_enum_android_scaler_rotate_and_crop_t)</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>This control is primarily intended to help camera applications with no support for
4414      * multi-window modes to work correctly on devices where multi-window scenarios are
4415      * unavoidable, such as foldables or other devices with variable display geometry or more
4416      * free-form window placement (such as laptops, which often place portrait-orientation apps
4417      * in landscape with pillarboxing).</p>
4418      * <p>If supported, the default value is <code>ROTATE_AND_CROP_AUTO</code>, which allows the camera API
4419      * to enable backwards-compatibility support for applications that do not support resizing
4420      * / multi-window modes, when the device is in fact in a multi-window mode (such as inset
4421      * portrait on laptops, or on a foldable device in some fold states).  In addition,
4422      * <code>ROTATE_AND_CROP_NONE</code> and <code>ROTATE_AND_CROP_90</code> will always be available if this control
4423      * is supported by the device.  If not supported, devices API level 30 or higher will always
4424      * list only <code>ROTATE_AND_CROP_NONE</code>.</p>
4425      * <p>When <code>CROP_AUTO</code> is in use, and the camera API activates backward-compatibility mode,
4426      * several metadata fields will also be parsed differently to ensure that coordinates are
4427      * correctly handled for features like drawing face detection boxes or passing in
4428      * tap-to-focus coordinates.  The camera API will convert positions in the active array
4429      * coordinate system to/from the cropped-and-rotated coordinate system to make the
4430      * operation transparent for applications.  The following controls are affected:</p>
4431      * <ul>
4432      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
4433      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
4434      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
4435      * <li>android.statistics.faces</li>
4436      * </ul>
4437      * <p>Capture results will contain the actual value selected by the API;
4438      * <code>ROTATE_AND_CROP_AUTO</code> will never be seen in a capture result.</p>
4439      * <p>Applications can also select their preferred cropping mode, either to opt out of the
4440      * backwards-compatibility treatment, or to use the cropping feature themselves as needed.
4441      * In this case, no coordinate translation will be done automatically, and all controls
4442      * will continue to use the normal active array coordinates.</p>
4443      * <p>Cropping and rotating is done after the application of digital zoom (via either
4444      * ACAMERA_SCALER_CROP_REGION or ACAMERA_CONTROL_ZOOM_RATIO), but before each individual
4445      * output is further cropped and scaled. It only affects processed outputs such as
4446      * YUV, PRIVATE, and JPEG.  It has no effect on RAW outputs.</p>
4447      * <p>When <code>CROP_90</code> or <code>CROP_270</code> are selected, there is a significant loss to the field of
4448      * view. For example, with a 4:3 aspect ratio output of 1600x1200, <code>CROP_90</code> will still
4449      * produce 1600x1200 output, but these buffers are cropped from a vertical 3:4 slice at the
4450      * center of the 4:3 area, then rotated to be 4:3, and then upscaled to 1600x1200.  Only
4451      * 56.25% of the original FOV is still visible.  In general, for an aspect ratio of <code>w:h</code>,
4452      * the crop and rotate operation leaves <code>(h/w)^2</code> of the field of view visible. For 16:9,
4453      * this is ~31.6%.</p>
4454      * <p>As a visual example, the figure below shows the effect of <code>ROTATE_AND_CROP_90</code> on the
4455      * outputs for the following parameters:</p>
4456      * <ul>
4457      * <li>Sensor active array: <code>2000x1500</code></li>
4458      * <li>Crop region: top-left: <code>(500, 375)</code>, size: <code>(1000, 750)</code> (4:3 aspect ratio)</li>
4459      * <li>Output streams: YUV <code>640x480</code> and YUV <code>1280x720</code></li>
4460      * <li><code>ROTATE_AND_CROP_90</code></li>
4461      * </ul>
4462      * <p><img alt="Effect of ROTATE_AND_CROP_90" src="../images/camera2/metadata/android.scaler.rotateAndCrop/crop-region-rotate-90-43-ratio.png" /></p>
4463      * <p>With these settings, the regions of the active array covered by the output streams are:</p>
4464      * <ul>
4465      * <li>640x480 stream crop: top-left: <code>(219, 375)</code>, size: <code>(562, 750)</code></li>
4466      * <li>1280x720 stream crop: top-left: <code>(289, 375)</code>, size: <code>(422, 750)</code></li>
4467      * </ul>
4468      * <p>Since the buffers are rotated, the buffers as seen by the application are:</p>
4469      * <ul>
4470      * <li>640x480 stream: top-left: <code>(781, 375)</code> on active array, size: <code>(640, 480)</code>, downscaled 1.17x from sensor pixels</li>
4471      * <li>1280x720 stream: top-left: <code>(711, 375)</code> on active array, size: <code>(1280, 720)</code>, upscaled 1.71x from sensor pixels</li>
4472      * </ul>
4473      *
4474      * @see ACAMERA_CONTROL_AE_REGIONS
4475      * @see ACAMERA_CONTROL_AF_REGIONS
4476      * @see ACAMERA_CONTROL_AWB_REGIONS
4477      * @see ACAMERA_CONTROL_ZOOM_RATIO
4478      * @see ACAMERA_SCALER_CROP_REGION
4479      */
4480     ACAMERA_SCALER_ROTATE_AND_CROP =                            // byte (acamera_metadata_enum_android_scaler_rotate_and_crop_t)
4481             ACAMERA_SCALER_START + 17,
4482     /**
4483      * <p>Default YUV/PRIVATE size to use for requesting secure image buffers.</p>
4484      *
4485      * <p>Type: int32[2]</p>
4486      *
4487      * <p>This tag may appear in:
4488      * <ul>
4489      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4490      * </ul></p>
4491      *
4492      * <p>This entry lists the default size supported in the secure camera mode. This entry is
4493      * optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null
4494      * if the camera device does not list SECURE_IMAGE_DATA capability.</p>
4495      * <p>When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed
4496      * to be supported by the camera HAL in the secure camera mode. Any other format or
4497      * resolutions might not be supported. Use
4498      * {@link ACameraDevice_isSessionConfigurationSupported }
4499      * API to query if a secure session configuration is supported if the device supports this
4500      * API.</p>
4501      * <p>If this key returns null on a device with SECURE_IMAGE_DATA capability, the application
4502      * can assume all output sizes listed in the
4503      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
4504      * are supported.</p>
4505      */
4506     ACAMERA_SCALER_DEFAULT_SECURE_IMAGE_SIZE =                  // int32[2]
4507             ACAMERA_SCALER_START + 18,
4508     /**
4509      * <p>The available multi-resolution stream configurations that this
4510      * physical camera device supports
4511      * (i.e. format, width, height, output/input stream).</p>
4512      *
4513      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t)</p>
4514      *
4515      * <p>This tag may appear in:
4516      * <ul>
4517      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4518      * </ul></p>
4519      *
4520      * <p>This list contains a subset of the parent logical camera's multi-resolution stream
4521      * configurations which belong to this physical camera, and it will advertise and will only
4522      * advertise the maximum supported resolutions for a particular format.</p>
4523      * <p>If this camera device isn't a physical camera device constituting a logical camera,
4524      * 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>
4525      * camera, this field represents the multi-resolution input/output stream configurations of
4526      * default mode and max resolution modes. The sizes will be the maximum resolution of a
4527      * particular format for default mode and max resolution mode.</p>
4528      * <p>This field will only be advertised if the device is a physical camera of a
4529      * logical multi-camera device or an ultra high resolution sensor camera. For a logical
4530      * multi-camera, the camera API will derive the logical camera’s multi-resolution stream
4531      * configurations from all physical cameras. For an ultra high resolution sensor camera, this
4532      * is used directly as the camera’s multi-resolution stream configurations.</p>
4533      */
4534     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS =
4535                                                                 // int32[n*4] (acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t)
4536             ACAMERA_SCALER_START + 19,
4537     /**
4538      * <p>The available stream configurations that this
4539      * camera device supports (i.e. format, width, height, output/input stream) for a
4540      * CaptureRequest with ACAMERA_SENSOR_PIXEL_MODE set to
4541      * <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>
4542      *
4543      * @see ACAMERA_SENSOR_PIXEL_MODE
4544      *
4545      * <p>Type: int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t)</p>
4546      *
4547      * <p>This tag may appear in:
4548      * <ul>
4549      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4550      * </ul></p>
4551      *
4552      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, for configurations
4553      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4554      * <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>
4555      * <p>Not all output formats may be supported in a configuration with
4556      * an input stream of a particular format. For more details, see
4557      * android.scaler.availableInputOutputFormatsMapMaximumResolution.</p>
4558      *
4559      * @see ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
4560      * @see ACAMERA_SENSOR_PIXEL_MODE
4561      */
4562     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
4563                                                                 // int32[n*4] (acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t)
4564             ACAMERA_SCALER_START + 20,
4565     /**
4566      * <p>This lists the minimum frame duration for each
4567      * format/size combination when the camera device is sent a CaptureRequest with
4568      * ACAMERA_SENSOR_PIXEL_MODE set to
4569      * <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>
4570      *
4571      * @see ACAMERA_SENSOR_PIXEL_MODE
4572      *
4573      * <p>Type: int64[4*n]</p>
4574      *
4575      * <p>This tag may appear in:
4576      * <ul>
4577      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4578      * </ul></p>
4579      *
4580      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, for configurations
4581      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4582      * <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>
4583      * <p>When multiple streams are used in a request (if supported, when ACAMERA_SENSOR_PIXEL_MODE
4584      * is set to
4585      * <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
4586      * minimum frame duration will be max(individual stream min durations).</p>
4587      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
4588      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION for more details about
4589      * calculating the max frame rate.</p>
4590      *
4591      * @see ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
4592      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION
4593      * @see ACAMERA_SENSOR_FRAME_DURATION
4594      * @see ACAMERA_SENSOR_PIXEL_MODE
4595      */
4596     ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
4597                                                                 // int64[4*n]
4598             ACAMERA_SCALER_START + 21,
4599     /**
4600      * <p>This lists the maximum stall duration for each
4601      * output format/size combination when CaptureRequests are submitted with
4602      * ACAMERA_SENSOR_PIXEL_MODE set to
4603      * <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>
4604      *
4605      * @see ACAMERA_SENSOR_PIXEL_MODE
4606      *
4607      * <p>Type: int64[4*n]</p>
4608      *
4609      * <p>This tag may appear in:
4610      * <ul>
4611      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4612      * </ul></p>
4613      *
4614      * <p>Analogous to ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS, for configurations
4615      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
4616      * <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>
4617      *
4618      * @see ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS
4619      * @see ACAMERA_SENSOR_PIXEL_MODE
4620      */
4621     ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION =
4622                                                                 // int64[4*n]
4623             ACAMERA_SCALER_START + 22,
4624     /**
4625      * <p>Whether the camera device supports multi-resolution input or output streams</p>
4626      *
4627      * <p>Type: byte (acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t)</p>
4628      *
4629      * <p>This tag may appear in:
4630      * <ul>
4631      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4632      * </ul></p>
4633      *
4634      * <p>A logical multi-camera or an ultra high resolution camera may support multi-resolution
4635      * input or output streams. With multi-resolution output streams, the camera device is able
4636      * to output different resolution images depending on the current active physical camera or
4637      * pixel mode. With multi-resolution input streams, the camera device can reprocess images
4638      * of different resolutions from different physical cameras or sensor pixel modes.</p>
4639      * <p>When set to TRUE:</p>
4640      * <ul>
4641      * <li>For a logical multi-camera, the camera framework derives
4642      * android.scaler.multiResolutionStreamConfigurationMap by combining the
4643      * ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS from its physical
4644      * cameras.</li>
4645      * <li>For an ultra-high resolution sensor camera, the camera framework directly copies
4646      * the value of ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS to
4647      * android.scaler.multiResolutionStreamConfigurationMap.</li>
4648      * </ul>
4649      *
4650      * @see ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
4651      */
4652     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED =          // byte (acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t)
4653             ACAMERA_SCALER_START + 24,
4654     /**
4655      * <p>The stream use cases supported by this camera device.</p>
4656      *
4657      * <p>Type: int64[n] (acamera_metadata_enum_android_scaler_available_stream_use_cases_t)</p>
4658      *
4659      * <p>This tag may appear in:
4660      * <ul>
4661      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4662      * </ul></p>
4663      *
4664      * <p>The stream use case indicates the purpose of a particular camera stream from
4665      * the end-user perspective. Some examples of camera use cases are: preview stream for
4666      * live viewfinder shown to the user, still capture for generating high quality photo
4667      * capture, video record for encoding the camera output for the purpose of future playback,
4668      * and video call for live realtime video conferencing.</p>
4669      * <p>With this flag, the camera device can optimize the image processing pipeline
4670      * parameters, such as tuning, sensor mode, and ISP settings, independent of
4671      * the properties of the immediate camera output surface. For example, if the output
4672      * surface is a SurfaceTexture, the stream use case flag can be used to indicate whether
4673      * the camera frames eventually go to display, video encoder,
4674      * still image capture, or all of them combined.</p>
4675      * <p>The application sets the use case of a camera stream by calling
4676      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration.html#setStreamUseCase">OutputConfiguration#setStreamUseCase</a>.</p>
4677      * <p>A camera device with
4678      * <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>
4679      * capability must support the following stream use cases:</p>
4680      * <ul>
4681      * <li>DEFAULT</li>
4682      * <li>PREVIEW</li>
4683      * <li>STILL_CAPTURE</li>
4684      * <li>VIDEO_RECORD</li>
4685      * <li>PREVIEW_VIDEO_STILL</li>
4686      * <li>VIDEO_CALL</li>
4687      * </ul>
4688      * <p>The guaranteed stream combinations related to stream use case for a camera device with
4689      * <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>
4690      * capability is documented in the camera device
4691      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#stream-use-case-capability-additional-guaranteed-configurations">guideline</a>.
4692      * The application is strongly recommended to use one of the guaranteed stream combinations.
4693      * If the application creates a session with a stream combination not in the guaranteed
4694      * list, or with mixed DEFAULT and non-DEFAULT use cases within the same session,
4695      * the camera device may ignore some stream use cases due to hardware constraints
4696      * and implementation details.</p>
4697      * <p>For stream combinations not covered by the stream use case mandatory lists, such as
4698      * reprocessable session, constrained high speed session, or RAW stream combinations, the
4699      * application should leave stream use cases within the session as DEFAULT.</p>
4700      */
4701     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES =                 // int64[n] (acamera_metadata_enum_android_scaler_available_stream_use_cases_t)
4702             ACAMERA_SCALER_START + 26,
4703     /**
4704      * <p>The region of the sensor that corresponds to the RAW read out for this
4705      * capture when the stream use case of a RAW stream is set to CROPPED_RAW.</p>
4706      *
4707      * <p>Type: int32[4]</p>
4708      *
4709      * <p>This tag may appear in:
4710      * <ul>
4711      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4712      * </ul></p>
4713      *
4714      * <p>The coordinate system follows that of ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
4715      * <p>This CaptureResult key will be set when the corresponding CaptureRequest has a RAW target
4716      * with stream use case set to
4717      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW">CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW</a>,
4718      * otherwise it will be {@code null}.
4719      * The value of this key specifies the region of the sensor used for the RAW capture and can
4720      * be used to calculate the corresponding field of view of RAW streams.
4721      * This field of view will always be &gt;= field of view for (processed) non-RAW streams for the
4722      * capture. Note: The region specified may not necessarily be centered.</p>
4723      * <p>For example: Assume a camera device has a pre correction active array size of
4724      * {@code {0, 0, 1500, 2000}}. If the RAW_CROP_REGION is {@code {500, 375, 1500, 1125}}, that
4725      * corresponds to a centered crop of 1/4th of the full field of view RAW stream.</p>
4726      * <p>The metadata keys which describe properties of RAW frames:</p>
4727      * <ul>
4728      * <li>ACAMERA_STATISTICS_HOT_PIXEL_MAP</li>
4729      * <li>android.statistics.lensShadingCorrectionMap</li>
4730      * <li>ACAMERA_LENS_DISTORTION</li>
4731      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
4732      * <li>ACAMERA_LENS_POSE_ROTATION</li>
4733      * <li>ACAMERA_LENS_DISTORTION</li>
4734      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
4735      * </ul>
4736      * <p>should be interpreted in the effective after raw crop field-of-view coordinate system.
4737      * In this coordinate system,
4738      * {ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.left,
4739      *  ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.top} corresponds to the
4740      * the top left corner of the cropped RAW frame and
4741      * {ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.right,
4742      *  ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.bottom} corresponds to
4743      * the bottom right corner. Client applications must use the values of the keys
4744      * in the CaptureResult metadata if present.</p>
4745      * <p>Crop regions ACAMERA_SCALER_CROP_REGION, AE/AWB/AF regions and face coordinates still
4746      * use the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE coordinate system as usual.</p>
4747      *
4748      * @see ACAMERA_LENS_DISTORTION
4749      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
4750      * @see ACAMERA_LENS_POSE_ROTATION
4751      * @see ACAMERA_LENS_POSE_TRANSLATION
4752      * @see ACAMERA_SCALER_CROP_REGION
4753      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
4754      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
4755      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
4756      */
4757     ACAMERA_SCALER_RAW_CROP_REGION =                            // int32[4]
4758             ACAMERA_SCALER_START + 27,
4759     ACAMERA_SCALER_END,
4760 
4761     /**
4762      * <p>Duration each pixel is exposed to
4763      * light.</p>
4764      *
4765      * <p>Type: int64</p>
4766      *
4767      * <p>This tag may appear in:
4768      * <ul>
4769      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4770      *   <li>ACaptureRequest</li>
4771      * </ul></p>
4772      *
4773      * <p>If the sensor can't expose this exact duration, it will shorten the
4774      * duration exposed to the nearest possible value (rather than expose longer).
4775      * The final exposure time used will be available in the output capture result.</p>
4776      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4777      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4778      *
4779      * @see ACAMERA_CONTROL_AE_MODE
4780      * @see ACAMERA_CONTROL_MODE
4781      */
4782     ACAMERA_SENSOR_EXPOSURE_TIME =                              // int64
4783             ACAMERA_SENSOR_START,
4784     /**
4785      * <p>Duration from start of frame readout to
4786      * start of next frame readout.</p>
4787      *
4788      * <p>Type: int64</p>
4789      *
4790      * <p>This tag may appear in:
4791      * <ul>
4792      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4793      *   <li>ACaptureRequest</li>
4794      * </ul></p>
4795      *
4796      * <p>The maximum frame rate that can be supported by a camera subsystem is
4797      * a function of many factors:</p>
4798      * <ul>
4799      * <li>Requested resolutions of output image streams</li>
4800      * <li>Availability of binning / skipping modes on the imager</li>
4801      * <li>The bandwidth of the imager interface</li>
4802      * <li>The bandwidth of the various ISP processing blocks</li>
4803      * </ul>
4804      * <p>Since these factors can vary greatly between different ISPs and
4805      * sensors, the camera abstraction tries to represent the bandwidth
4806      * restrictions with as simple a model as possible.</p>
4807      * <p>The model presented has the following characteristics:</p>
4808      * <ul>
4809      * <li>The image sensor is always configured to output the smallest
4810      * resolution possible given the application's requested output stream
4811      * sizes.  The smallest resolution is defined as being at least as large
4812      * as the largest requested output stream size; the camera pipeline must
4813      * never digitally upsample sensor data when the crop region covers the
4814      * whole sensor. In general, this means that if only small output stream
4815      * resolutions are configured, the sensor can provide a higher frame
4816      * rate.</li>
4817      * <li>Since any request may use any or all the currently configured
4818      * output streams, the sensor and ISP must be configured to support
4819      * scaling a single capture to all the streams at the same time.  This
4820      * means the camera pipeline must be ready to produce the largest
4821      * requested output size without any delay.  Therefore, the overall
4822      * frame rate of a given configured stream set is governed only by the
4823      * largest requested stream resolution.</li>
4824      * <li>Using more than one output stream in a request does not affect the
4825      * frame duration.</li>
4826      * <li>Certain format-streams may need to do additional background processing
4827      * before data is consumed/produced by that stream. These processors
4828      * can run concurrently to the rest of the camera pipeline, but
4829      * cannot process more than 1 capture at a time.</li>
4830      * </ul>
4831      * <p>The necessary information for the application, given the model above, is provided via
4832      * {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }.
4833      * These are used to determine the maximum frame rate / minimum frame duration that is
4834      * possible for a given stream configuration.</p>
4835      * <p>Specifically, the application can use the following rules to
4836      * determine the minimum frame duration it can request from the camera
4837      * device:</p>
4838      * <ol>
4839      * <li>Let the set of currently configured input/output streams be called <code>S</code>.</li>
4840      * <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 }
4841      * (with its respective size/format). Let this set of frame durations be called <code>F</code>.</li>
4842      * <li>For any given request <code>R</code>, the minimum frame duration allowed for <code>R</code> is the maximum
4843      * out of all values in <code>F</code>. Let the streams used in <code>R</code> be called <code>S_r</code>.</li>
4844      * </ol>
4845      * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }
4846      * using its respective size/format), then the frame duration in <code>F</code> determines the steady
4847      * state frame rate that the application will get if it uses <code>R</code> as a repeating request. Let
4848      * this special kind of request be called <code>Rsimple</code>.</p>
4849      * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved by a single capture of a
4850      * new request <code>Rstall</code> (which has at least one in-use stream with a non-0 stall time) and if
4851      * <code>Rstall</code> has the same minimum frame duration this will not cause a frame rate loss if all
4852      * buffers from the previous <code>Rstall</code> have already been delivered.</p>
4853      * <p>For more details about stalling, see {@link ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS }.</p>
4854      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4855      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4856      * <p><em>Note:</em> Prior to Android 13, this field was described as measuring the duration from
4857      * start of frame exposure to start of next frame exposure, which doesn't reflect the
4858      * definition from sensor manufacturer. A mobile sensor defines the frame duration as
4859      * intervals between sensor readouts.</p>
4860      *
4861      * @see ACAMERA_CONTROL_AE_MODE
4862      * @see ACAMERA_CONTROL_MODE
4863      */
4864     ACAMERA_SENSOR_FRAME_DURATION =                             // int64
4865             ACAMERA_SENSOR_START + 1,
4866     /**
4867      * <p>The amount of gain applied to sensor data
4868      * before processing.</p>
4869      *
4870      * <p>Type: int32</p>
4871      *
4872      * <p>This tag may appear in:
4873      * <ul>
4874      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
4875      *   <li>ACaptureRequest</li>
4876      * </ul></p>
4877      *
4878      * <p>The sensitivity is the standard ISO sensitivity value,
4879      * as defined in ISO 12232:2006.</p>
4880      * <p>The sensitivity must be within ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE, and
4881      * if if it less than ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY, the camera device
4882      * is guaranteed to use only analog amplification for applying the gain.</p>
4883      * <p>If the camera device cannot apply the exact sensitivity
4884      * requested, it will reduce the gain to the nearest supported
4885      * value. The final sensitivity used will be available in the
4886      * output capture result.</p>
4887      * <p>This control is only effective if ACAMERA_CONTROL_AE_MODE or ACAMERA_CONTROL_MODE is set to
4888      * OFF; otherwise the auto-exposure algorithm will override this value.</p>
4889      * <p>Note that for devices supporting postRawSensitivityBoost, the total sensitivity applied
4890      * to the final processed image is the combination of ACAMERA_SENSOR_SENSITIVITY and
4891      * ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST. In case the application uses the sensor
4892      * sensitivity from last capture result of an auto request for a manual request, in order
4893      * to achieve the same brightness in the output image, the application should also
4894      * set postRawSensitivityBoost.</p>
4895      *
4896      * @see ACAMERA_CONTROL_AE_MODE
4897      * @see ACAMERA_CONTROL_MODE
4898      * @see ACAMERA_CONTROL_POST_RAW_SENSITIVITY_BOOST
4899      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
4900      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
4901      * @see ACAMERA_SENSOR_SENSITIVITY
4902      */
4903     ACAMERA_SENSOR_SENSITIVITY =                                // int32
4904             ACAMERA_SENSOR_START + 2,
4905     /**
4906      * <p>The standard reference illuminant used as the scene light source when
4907      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM1,
4908      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
4909      * ACAMERA_SENSOR_FORWARD_MATRIX1 matrices.</p>
4910      *
4911      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
4912      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
4913      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
4914      *
4915      * <p>Type: byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)</p>
4916      *
4917      * <p>This tag may appear in:
4918      * <ul>
4919      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4920      * </ul></p>
4921      *
4922      * <p>The values in this key correspond to the values defined for the
4923      * EXIF LightSource tag. These illuminants are standard light sources
4924      * that are often used calibrating camera devices.</p>
4925      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM1,
4926      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM1, and
4927      * ACAMERA_SENSOR_FORWARD_MATRIX1 will also be present.</p>
4928      * <p>Some devices may choose to provide a second set of calibration
4929      * information for improved quality, including
4930      * ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 and its corresponding matrices.</p>
4931      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4932      * the camera device has RAW capability.</p>
4933      *
4934      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
4935      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
4936      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
4937      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
4938      */
4939     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 =                      // byte (acamera_metadata_enum_android_sensor_reference_illuminant1_t)
4940             ACAMERA_SENSOR_START + 3,
4941     /**
4942      * <p>The standard reference illuminant used as the scene light source when
4943      * calculating the ACAMERA_SENSOR_COLOR_TRANSFORM2,
4944      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
4945      * ACAMERA_SENSOR_FORWARD_MATRIX2 matrices.</p>
4946      *
4947      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
4948      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
4949      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
4950      *
4951      * <p>Type: byte</p>
4952      *
4953      * <p>This tag may appear in:
4954      * <ul>
4955      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4956      * </ul></p>
4957      *
4958      * <p>See ACAMERA_SENSOR_REFERENCE_ILLUMINANT1 for more details.</p>
4959      * <p>If this key is present, then ACAMERA_SENSOR_COLOR_TRANSFORM2,
4960      * ACAMERA_SENSOR_CALIBRATION_TRANSFORM2, and
4961      * ACAMERA_SENSOR_FORWARD_MATRIX2 will also be present.</p>
4962      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4963      * the camera device has RAW capability.</p>
4964      *
4965      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
4966      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
4967      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
4968      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4969      */
4970     ACAMERA_SENSOR_REFERENCE_ILLUMINANT2 =                      // byte
4971             ACAMERA_SENSOR_START + 4,
4972     /**
4973      * <p>A per-device calibration transform matrix that maps from the
4974      * reference sensor colorspace to the actual device sensor colorspace.</p>
4975      *
4976      * <p>Type: rational[3*3]</p>
4977      *
4978      * <p>This tag may appear in:
4979      * <ul>
4980      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
4981      * </ul></p>
4982      *
4983      * <p>This matrix is used to correct for per-device variations in the
4984      * sensor colorspace, and is used for processing raw buffer data.</p>
4985      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
4986      * contains a per-device calibration transform that maps colors
4987      * from reference sensor color space (i.e. the "golden module"
4988      * colorspace) into this camera device's native sensor color
4989      * space under the first reference illuminant
4990      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
4991      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
4992      * the camera device has RAW capability.</p>
4993      *
4994      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
4995      */
4996     ACAMERA_SENSOR_CALIBRATION_TRANSFORM1 =                     // rational[3*3]
4997             ACAMERA_SENSOR_START + 5,
4998     /**
4999      * <p>A per-device calibration transform matrix that maps from the
5000      * reference sensor colorspace to the actual device sensor colorspace
5001      * (this is the colorspace of the raw buffer data).</p>
5002      *
5003      * <p>Type: rational[3*3]</p>
5004      *
5005      * <p>This tag may appear in:
5006      * <ul>
5007      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5008      * </ul></p>
5009      *
5010      * <p>This matrix is used to correct for per-device variations in the
5011      * sensor colorspace, and is used for processing raw buffer data.</p>
5012      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
5013      * contains a per-device calibration transform that maps colors
5014      * from reference sensor color space (i.e. the "golden module"
5015      * colorspace) into this camera device's native sensor color
5016      * space under the second reference illuminant
5017      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
5018      * <p>This matrix will only be present if the second reference
5019      * illuminant is present.</p>
5020      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5021      * the camera device has RAW capability.</p>
5022      *
5023      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
5024      */
5025     ACAMERA_SENSOR_CALIBRATION_TRANSFORM2 =                     // rational[3*3]
5026             ACAMERA_SENSOR_START + 6,
5027     /**
5028      * <p>A matrix that transforms color values from CIE XYZ color space to
5029      * reference sensor color space.</p>
5030      *
5031      * <p>Type: rational[3*3]</p>
5032      *
5033      * <p>This tag may appear in:
5034      * <ul>
5035      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5036      * </ul></p>
5037      *
5038      * <p>This matrix is used to convert from the standard CIE XYZ color
5039      * space to the reference sensor colorspace, and is used when processing
5040      * raw buffer data.</p>
5041      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
5042      * contains a color transform matrix that maps colors from the CIE
5043      * XYZ color space to the reference sensor color space (i.e. the
5044      * "golden module" colorspace) under the first reference illuminant
5045      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1).</p>
5046      * <p>The white points chosen in both the reference sensor color space
5047      * and the CIE XYZ colorspace when calculating this transform will
5048      * match the standard white point for the first reference illuminant
5049      * (i.e. no chromatic adaptation will be applied by this transform).</p>
5050      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5051      * the camera device has RAW capability.</p>
5052      *
5053      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
5054      */
5055     ACAMERA_SENSOR_COLOR_TRANSFORM1 =                           // rational[3*3]
5056             ACAMERA_SENSOR_START + 7,
5057     /**
5058      * <p>A matrix that transforms color values from CIE XYZ color space to
5059      * reference sensor color space.</p>
5060      *
5061      * <p>Type: rational[3*3]</p>
5062      *
5063      * <p>This tag may appear in:
5064      * <ul>
5065      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5066      * </ul></p>
5067      *
5068      * <p>This matrix is used to convert from the standard CIE XYZ color
5069      * space to the reference sensor colorspace, and is used when processing
5070      * raw buffer data.</p>
5071      * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and
5072      * contains a color transform matrix that maps colors from the CIE
5073      * XYZ color space to the reference sensor color space (i.e. the
5074      * "golden module" colorspace) under the second reference illuminant
5075      * (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2).</p>
5076      * <p>The white points chosen in both the reference sensor color space
5077      * and the CIE XYZ colorspace when calculating this transform will
5078      * match the standard white point for the second reference illuminant
5079      * (i.e. no chromatic adaptation will be applied by this transform).</p>
5080      * <p>This matrix will only be present if the second reference
5081      * illuminant is present.</p>
5082      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5083      * the camera device has RAW capability.</p>
5084      *
5085      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
5086      */
5087     ACAMERA_SENSOR_COLOR_TRANSFORM2 =                           // rational[3*3]
5088             ACAMERA_SENSOR_START + 8,
5089     /**
5090      * <p>A matrix that transforms white balanced camera colors from the reference
5091      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
5092      *
5093      * <p>Type: rational[3*3]</p>
5094      *
5095      * <p>This tag may appear in:
5096      * <ul>
5097      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5098      * </ul></p>
5099      *
5100      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
5101      * is used when processing raw buffer data.</p>
5102      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
5103      * a color transform matrix that maps white balanced colors from the
5104      * reference sensor color space to the CIE XYZ color space with a D50 white
5105      * point.</p>
5106      * <p>Under the first reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT1)
5107      * this matrix is chosen so that the standard white point for this reference
5108      * illuminant in the reference sensor colorspace is mapped to D50 in the
5109      * CIE XYZ colorspace.</p>
5110      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5111      * the camera device has RAW capability.</p>
5112      *
5113      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
5114      */
5115     ACAMERA_SENSOR_FORWARD_MATRIX1 =                            // rational[3*3]
5116             ACAMERA_SENSOR_START + 9,
5117     /**
5118      * <p>A matrix that transforms white balanced camera colors from the reference
5119      * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p>
5120      *
5121      * <p>Type: rational[3*3]</p>
5122      *
5123      * <p>This tag may appear in:
5124      * <ul>
5125      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5126      * </ul></p>
5127      *
5128      * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and
5129      * is used when processing raw buffer data.</p>
5130      * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains
5131      * a color transform matrix that maps white balanced colors from the
5132      * reference sensor color space to the CIE XYZ color space with a D50 white
5133      * point.</p>
5134      * <p>Under the second reference illuminant (ACAMERA_SENSOR_REFERENCE_ILLUMINANT2)
5135      * this matrix is chosen so that the standard white point for this reference
5136      * illuminant in the reference sensor colorspace is mapped to D50 in the
5137      * CIE XYZ colorspace.</p>
5138      * <p>This matrix will only be present if the second reference
5139      * illuminant is present.</p>
5140      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5141      * the camera device has RAW capability.</p>
5142      *
5143      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
5144      */
5145     ACAMERA_SENSOR_FORWARD_MATRIX2 =                            // rational[3*3]
5146             ACAMERA_SENSOR_START + 10,
5147     /**
5148      * <p>A fixed black level offset for each of the color filter arrangement
5149      * (CFA) mosaic channels.</p>
5150      *
5151      * <p>Type: int32[4]</p>
5152      *
5153      * <p>This tag may appear in:
5154      * <ul>
5155      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5156      * </ul></p>
5157      *
5158      * <p>This key specifies the zero light value for each of the CFA mosaic
5159      * channels in the camera sensor.  The maximal value output by the
5160      * sensor is represented by the value in ACAMERA_SENSOR_INFO_WHITE_LEVEL.</p>
5161      * <p>The values are given in the same order as channels listed for the CFA
5162      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
5163      * nth value given corresponds to the black level offset for the nth
5164      * color channel listed in the CFA.</p>
5165      * <p>The black level values of captured images may vary for different
5166      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
5167      * represents a coarse approximation for such case. It is recommended to
5168      * use ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL or use pixels from
5169      * ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS directly for captures when
5170      * supported by the camera device, which provides more accurate black
5171      * level values. For raw capture in particular, it is recommended to use
5172      * pixels from ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS to calculate black
5173      * level values for each frame.</p>
5174      * <p>For a MONOCHROME camera device, all of the 2x2 channels must have the same values.</p>
5175      *
5176      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
5177      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
5178      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
5179      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
5180      * @see ACAMERA_SENSOR_SENSITIVITY
5181      */
5182     ACAMERA_SENSOR_BLACK_LEVEL_PATTERN =                        // int32[4]
5183             ACAMERA_SENSOR_START + 12,
5184     /**
5185      * <p>Maximum sensitivity that is implemented
5186      * purely through analog gain.</p>
5187      *
5188      * <p>Type: int32</p>
5189      *
5190      * <p>This tag may appear in:
5191      * <ul>
5192      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5193      * </ul></p>
5194      *
5195      * <p>For ACAMERA_SENSOR_SENSITIVITY values less than or
5196      * equal to this, all applied gain must be analog. For
5197      * values above this, the gain applied can be a mix of analog and
5198      * digital.</p>
5199      *
5200      * @see ACAMERA_SENSOR_SENSITIVITY
5201      */
5202     ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY =                     // int32
5203             ACAMERA_SENSOR_START + 13,
5204     /**
5205      * <p>Clockwise angle through which the output image needs to be rotated to be
5206      * upright on the device screen in its native orientation.</p>
5207      *
5208      * <p>Type: int32</p>
5209      *
5210      * <p>This tag may appear in:
5211      * <ul>
5212      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5213      * </ul></p>
5214      *
5215      * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in
5216      * the sensor's coordinate system.</p>
5217      * <p>Starting with Android API level 32, camera clients that query the orientation via
5218      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> on foldable devices which
5219      * include logical cameras can receive a value that can dynamically change depending on the
5220      * device/fold state.
5221      * Clients are advised to not cache or store the orientation value of such logical sensors.
5222      * In case repeated queries to CameraCharacteristics are not preferred, then clients can
5223      * also access the entire mapping from device state to sensor orientation in
5224      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/DeviceStateSensorOrientationMap.html">DeviceStateSensorOrientationMap</a>.
5225      * Do note that a dynamically changing sensor orientation value in camera characteristics
5226      * will not be the best way to establish the orientation per frame. Clients that want to
5227      * know the sensor orientation of a particular captured frame should query the
5228      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID from the corresponding capture result and
5229      * check the respective physical camera orientation.</p>
5230      * <p>Native camera clients must query ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS for the mapping
5231      * between device state and camera sensor orientation. Dynamic updates to the sensor
5232      * orientation are not supported in this code path.</p>
5233      *
5234      * @see ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS
5235      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
5236      */
5237     ACAMERA_SENSOR_ORIENTATION =                                // int32
5238             ACAMERA_SENSOR_START + 14,
5239     /**
5240      * <p>Time at start of exposure of first
5241      * row of the image sensor active array, in nanoseconds.</p>
5242      *
5243      * <p>Type: int64</p>
5244      *
5245      * <p>This tag may appear in:
5246      * <ul>
5247      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5248      * </ul></p>
5249      *
5250      * <p>The timestamps are also included in all image
5251      * buffers produced for the same capture, and will be identical
5252      * on all the outputs.</p>
5253      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> UNKNOWN,
5254      * the timestamps measure time since an unspecified starting point,
5255      * and are monotonically increasing. They can be compared with the
5256      * timestamps for other captures from the same camera device, but are
5257      * not guaranteed to be comparable to any other time source.</p>
5258      * <p>When ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME, the
5259      * 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
5260      * be compared to other timestamps from other subsystems that
5261      * are using that base.</p>
5262      * <p>For reprocessing, the timestamp will match the start of exposure of
5263      * the input image, i.e. <a href="https://developer.android.com/reference/CaptureResult.html#SENSOR_TIMESTAMP">the
5264      * timestamp</a> in the TotalCaptureResult that was used to create the
5265      * reprocess capture request.</p>
5266      *
5267      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
5268      */
5269     ACAMERA_SENSOR_TIMESTAMP =                                  // int64
5270             ACAMERA_SENSOR_START + 16,
5271     /**
5272      * <p>The estimated camera neutral color in the native sensor colorspace at
5273      * the time of capture.</p>
5274      *
5275      * <p>Type: rational[3]</p>
5276      *
5277      * <p>This tag may appear in:
5278      * <ul>
5279      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5280      * </ul></p>
5281      *
5282      * <p>This value gives the neutral color point encoded as an RGB value in the
5283      * native sensor color space.  The neutral color point indicates the
5284      * currently estimated white point of the scene illumination.  It can be
5285      * used to interpolate between the provided color transforms when
5286      * processing raw sensor data.</p>
5287      * <p>The order of the values is R, G, B; where R is in the lowest index.</p>
5288      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5289      * the camera device has RAW capability.</p>
5290      */
5291     ACAMERA_SENSOR_NEUTRAL_COLOR_POINT =                        // rational[3]
5292             ACAMERA_SENSOR_START + 18,
5293     /**
5294      * <p>Noise model coefficients for each CFA mosaic channel.</p>
5295      *
5296      * <p>Type: double[2*CFA Channels]</p>
5297      *
5298      * <p>This tag may appear in:
5299      * <ul>
5300      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5301      * </ul></p>
5302      *
5303      * <p>This key contains two noise model coefficients for each CFA channel
5304      * corresponding to the sensor amplification (S) and sensor readout
5305      * noise (O).  These are given as pairs of coefficients for each channel
5306      * in the same order as channels listed for the CFA layout key
5307      * (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT).  This is
5308      * represented as an array of Pair&lt;Double, Double&gt;, where
5309      * the first member of the Pair at index n is the S coefficient and the
5310      * second member is the O coefficient for the nth color channel in the CFA.</p>
5311      * <p>These coefficients are used in a two parameter noise model to describe
5312      * the amount of noise present in the image for each CFA channel.  The
5313      * noise model used here is:</p>
5314      * <p>N(x) = sqrt(Sx + O)</p>
5315      * <p>Where x represents the recorded signal of a CFA channel normalized to
5316      * the range [0, 1], and S and O are the noise model coefficients for
5317      * that channel.</p>
5318      * <p>A more detailed description of the noise model can be found in the
5319      * Adobe DNG specification for the NoiseProfile tag.</p>
5320      * <p>For a MONOCHROME camera, there is only one color channel. So the noise model coefficients
5321      * will only contain one S and one O.</p>
5322      *
5323      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
5324      */
5325     ACAMERA_SENSOR_NOISE_PROFILE =                              // double[2*CFA Channels]
5326             ACAMERA_SENSOR_START + 19,
5327     /**
5328      * <p>The worst-case divergence between Bayer green channels.</p>
5329      *
5330      * <p>Type: float</p>
5331      *
5332      * <p>This tag may appear in:
5333      * <ul>
5334      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5335      * </ul></p>
5336      *
5337      * <p>This value is an estimate of the worst case split between the
5338      * Bayer green channels in the red and blue rows in the sensor color
5339      * filter array.</p>
5340      * <p>The green split is calculated as follows:</p>
5341      * <ol>
5342      * <li>A 5x5 pixel (or larger) window W within the active sensor array is
5343      * chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
5344      * mosaic channels (R, Gr, Gb, B).  The location and size of the window
5345      * chosen is implementation defined, and should be chosen to provide a
5346      * green split estimate that is both representative of the entire image
5347      * for this camera sensor, and can be calculated quickly.</li>
5348      * <li>The arithmetic mean of the green channels from the red
5349      * rows (mean_Gr) within W is computed.</li>
5350      * <li>The arithmetic mean of the green channels from the blue
5351      * rows (mean_Gb) within W is computed.</li>
5352      * <li>The maximum ratio R of the two means is computed as follows:
5353      * <code>R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))</code></li>
5354      * </ol>
5355      * <p>The ratio R is the green split divergence reported for this property,
5356      * which represents how much the green channels differ in the mosaic
5357      * pattern.  This value is typically used to determine the treatment of
5358      * the green mosaic channels when demosaicing.</p>
5359      * <p>The green split value can be roughly interpreted as follows:</p>
5360      * <ul>
5361      * <li>R &lt; 1.03 is a negligible split (&lt;3% divergence).</li>
5362      * <li>1.20 &lt;= R &gt;= 1.03 will require some software
5363      * correction to avoid demosaic errors (3-20% divergence).</li>
5364      * <li>R &gt; 1.20 will require strong software correction to produce
5365      * a usable image (&gt;20% divergence).</li>
5366      * </ul>
5367      * <p>Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
5368      * the camera device has RAW capability.</p>
5369      */
5370     ACAMERA_SENSOR_GREEN_SPLIT =                                // float
5371             ACAMERA_SENSOR_START + 22,
5372     /**
5373      * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
5374      * when ACAMERA_SENSOR_TEST_PATTERN_MODE is SOLID_COLOR.</p>
5375      *
5376      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
5377      *
5378      * <p>Type: int32[4]</p>
5379      *
5380      * <p>This tag may appear in:
5381      * <ul>
5382      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5383      *   <li>ACaptureRequest</li>
5384      * </ul></p>
5385      *
5386      * <p>Each color channel is treated as an unsigned 32-bit integer.
5387      * The camera device then uses the most significant X bits
5388      * that correspond to how many bits are in its Bayer raw sensor
5389      * output.</p>
5390      * <p>For example, a sensor with RAW10 Bayer output would use the
5391      * 10 most significant bits from each color channel.</p>
5392      */
5393     ACAMERA_SENSOR_TEST_PATTERN_DATA =                          // int32[4]
5394             ACAMERA_SENSOR_START + 23,
5395     /**
5396      * <p>When enabled, the sensor sends a test pattern instead of
5397      * doing a real exposure from the camera.</p>
5398      *
5399      * <p>Type: int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)</p>
5400      *
5401      * <p>This tag may appear in:
5402      * <ul>
5403      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5404      *   <li>ACaptureRequest</li>
5405      * </ul></p>
5406      *
5407      * <p>When a test pattern is enabled, all manual sensor controls specified
5408      * by ACAMERA_SENSOR_* will be ignored. All other controls should
5409      * work as normal.</p>
5410      * <p>For example, if manual flash is enabled, flash firing should still
5411      * occur (and that the test pattern remain unmodified, since the flash
5412      * would not actually affect it).</p>
5413      * <p>Defaults to OFF.</p>
5414      */
5415     ACAMERA_SENSOR_TEST_PATTERN_MODE =                          // int32 (acamera_metadata_enum_android_sensor_test_pattern_mode_t)
5416             ACAMERA_SENSOR_START + 24,
5417     /**
5418      * <p>List of sensor test pattern modes for ACAMERA_SENSOR_TEST_PATTERN_MODE
5419      * supported by this camera device.</p>
5420      *
5421      * @see ACAMERA_SENSOR_TEST_PATTERN_MODE
5422      *
5423      * <p>Type: int32[n]</p>
5424      *
5425      * <p>This tag may appear in:
5426      * <ul>
5427      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5428      * </ul></p>
5429      *
5430      * <p>Defaults to OFF, and always includes OFF if defined.</p>
5431      */
5432     ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES =               // int32[n]
5433             ACAMERA_SENSOR_START + 25,
5434     /**
5435      * <p>Duration between the start of exposure for the first row of the image sensor,
5436      * and the start of exposure for one past the last row of the image sensor.</p>
5437      *
5438      * <p>Type: int64</p>
5439      *
5440      * <p>This tag may appear in:
5441      * <ul>
5442      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5443      * </ul></p>
5444      *
5445      * <p>This is the exposure time skew between the first and <code>(last+1)</code> row exposure start times. The
5446      * first row and the last row are the first and last rows inside of the
5447      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5448      * <p>For typical camera sensors that use rolling shutters, this is also equivalent to the frame
5449      * readout time.</p>
5450      * <p>If the image sensor is operating in a binned or cropped mode due to the current output
5451      * target resolutions, it's possible this skew is reported to be larger than the exposure
5452      * time, for example, since it is based on the full array even if a partial array is read
5453      * out. Be sure to scale the number to cover the section of the sensor actually being used
5454      * for the outputs you care about. So if your output covers N rows of the active array of
5455      * height H, scale this value by N/H to get the total skew for that viewport.</p>
5456      * <p><em>Note:</em> Prior to Android 11, this field was described as measuring duration from
5457      * first to last row of the image sensor, which is not equal to the frame readout time for a
5458      * rolling shutter sensor. Implementations generally reported the latter value, so to resolve
5459      * the inconsistency, the description has been updated to range from (first, last+1) row
5460      * exposure start, instead.</p>
5461      *
5462      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5463      */
5464     ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW =                       // int64
5465             ACAMERA_SENSOR_START + 26,
5466     /**
5467      * <p>List of disjoint rectangles indicating the sensor
5468      * optically shielded black pixel regions.</p>
5469      *
5470      * <p>Type: int32[4*num_regions]</p>
5471      *
5472      * <p>This tag may appear in:
5473      * <ul>
5474      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5475      * </ul></p>
5476      *
5477      * <p>In most camera sensors, the active array is surrounded by some
5478      * optically shielded pixel areas. By blocking light, these pixels
5479      * provides a reliable black reference for black level compensation
5480      * in active array region.</p>
5481      * <p>This key provides a list of disjoint rectangles specifying the
5482      * regions of optically shielded (with metal shield) black pixel
5483      * regions if the camera device is capable of reading out these black
5484      * pixels in the output raw images. In comparison to the fixed black
5485      * level values reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN, this key
5486      * may provide a more accurate way for the application to calculate
5487      * black level of each captured raw images.</p>
5488      * <p>When this key is reported, the ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL and
5489      * ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL will also be reported.</p>
5490      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5491      *
5492      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5493      * @see ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL
5494      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
5495      */
5496     ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS =                      // int32[4*num_regions]
5497             ACAMERA_SENSOR_START + 27,
5498     /**
5499      * <p>A per-frame dynamic black level offset for each of the color filter
5500      * arrangement (CFA) mosaic channels.</p>
5501      *
5502      * <p>Type: float[4]</p>
5503      *
5504      * <p>This tag may appear in:
5505      * <ul>
5506      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5507      * </ul></p>
5508      *
5509      * <p>Camera sensor black levels may vary dramatically for different
5510      * capture settings (e.g. ACAMERA_SENSOR_SENSITIVITY). The fixed black
5511      * level reported by ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may be too
5512      * inaccurate to represent the actual value on a per-frame basis. The
5513      * camera device internal pipeline relies on reliable black level values
5514      * to process the raw images appropriately. To get the best image
5515      * quality, the camera device may choose to estimate the per frame black
5516      * level values either based on optically shielded black regions
5517      * (ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS) or its internal model.</p>
5518      * <p>This key reports the camera device estimated per-frame zero light
5519      * value for each of the CFA mosaic channels in the camera sensor. The
5520      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may only represent a coarse
5521      * approximation of the actual black level values. This value is the
5522      * black level used in camera device internal image processing pipeline
5523      * and generally more accurate than the fixed black level values.
5524      * However, since they are estimated values by the camera device, they
5525      * may not be as accurate as the black level values calculated from the
5526      * optical black pixels reported by ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS.</p>
5527      * <p>The values are given in the same order as channels listed for the CFA
5528      * layout key (see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT), i.e. the
5529      * nth value given corresponds to the black level offset for the nth
5530      * color channel listed in the CFA.</p>
5531      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values.</p>
5532      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is available or the
5533      * camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
5534      *
5535      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5536      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
5537      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
5538      * @see ACAMERA_SENSOR_SENSITIVITY
5539      */
5540     ACAMERA_SENSOR_DYNAMIC_BLACK_LEVEL =                        // float[4]
5541             ACAMERA_SENSOR_START + 28,
5542     /**
5543      * <p>Maximum raw value output by sensor for this frame.</p>
5544      *
5545      * <p>Type: int32</p>
5546      *
5547      * <p>This tag may appear in:
5548      * <ul>
5549      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5550      * </ul></p>
5551      *
5552      * <p>Since the ACAMERA_SENSOR_BLACK_LEVEL_PATTERN may change for different
5553      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY), the white
5554      * level will change accordingly. This key is similar to
5555      * ACAMERA_SENSOR_INFO_WHITE_LEVEL, but specifies the camera device
5556      * estimated white level for each frame.</p>
5557      * <p>This key will be available if ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS is
5558      * available or the camera device advertises this key via
5559      * {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.</p>
5560      *
5561      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5562      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
5563      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
5564      * @see ACAMERA_SENSOR_SENSITIVITY
5565      */
5566     ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL =                        // int32
5567             ACAMERA_SENSOR_START + 29,
5568     /**
5569      * <p>Switches sensor pixel mode between maximum resolution mode and default mode.</p>
5570      *
5571      * <p>Type: byte (acamera_metadata_enum_android_sensor_pixel_mode_t)</p>
5572      *
5573      * <p>This tag may appear in:
5574      * <ul>
5575      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5576      *   <li>ACaptureRequest</li>
5577      * </ul></p>
5578      *
5579      * <p>This key controls whether the camera sensor operates in
5580      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5581      * mode or not. By default, all camera devices operate in
5582      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode.
5583      * When operating in
5584      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode, sensors
5585      * would typically perform pixel binning in order to improve low light
5586      * performance, noise reduction etc. However, in
5587      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5588      * mode, sensors typically operate in unbinned mode allowing for a larger image size.
5589      * The stream configurations supported in
5590      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5591      * mode are also different from those of
5592      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT</a> mode.
5593      * They can be queried through
5594      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> with
5595      * <a href="https://developer.android.com/reference/CameraCharacteristics.html#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION">CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION</a>.
5596      * Unless reported by both
5597      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a>s, the outputs from
5598      * <code>android.scaler.streamConfigurationMapMaximumResolution</code> and
5599      * <code>android.scaler.streamConfigurationMap</code>
5600      * must not be mixed in the same CaptureRequest. In other words, these outputs are
5601      * exclusive to each other.
5602      * This key does not need to be set for reprocess requests.
5603      * This key will be be present on devices supporting the
5604      * <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>
5605      * capability. It may also be present on devices which do not support the aforementioned
5606      * capability. In that case:</p>
5607      * <ul>
5608      * <li>
5609      * <p>The mandatory stream combinations listed in
5610      *   android.scaler.mandatoryMaximumResolutionStreamCombinations  would not apply.</p>
5611      * </li>
5612      * <li>
5613      * <p>The bayer pattern of {@code RAW} streams when
5614      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5615      *   is selected will be the one listed in ACAMERA_SENSOR_INFO_BINNING_FACTOR.</p>
5616      * </li>
5617      * <li>
5618      * <p>The following keys will always be present:</p>
5619      * <ul>
5620      * <li>android.scaler.streamConfigurationMapMaximumResolution</li>
5621      * <li>ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION</li>
5622      * <li>ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION</li>
5623      * <li>ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION</li>
5624      * </ul>
5625      * </li>
5626      * </ul>
5627      *
5628      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
5629      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
5630      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION
5631      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
5632      */
5633     ACAMERA_SENSOR_PIXEL_MODE =                                 // byte (acamera_metadata_enum_android_sensor_pixel_mode_t)
5634             ACAMERA_SENSOR_START + 32,
5635     /**
5636      * <p>Whether <code>RAW</code> images requested have their bayer pattern as described by
5637      * ACAMERA_SENSOR_INFO_BINNING_FACTOR.</p>
5638      *
5639      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
5640      *
5641      * <p>Type: byte (acamera_metadata_enum_android_sensor_raw_binning_factor_used_t)</p>
5642      *
5643      * <p>This tag may appear in:
5644      * <ul>
5645      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
5646      * </ul></p>
5647      *
5648      * <p>This key will only be present in devices advertising the
5649      * <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>
5650      * capability which also advertise <code>REMOSAIC_REPROCESSING</code> capability. On all other devices
5651      * RAW targets will have a regular bayer pattern.</p>
5652      */
5653     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED =                    // byte (acamera_metadata_enum_android_sensor_raw_binning_factor_used_t)
5654             ACAMERA_SENSOR_START + 33,
5655     ACAMERA_SENSOR_END,
5656 
5657     /**
5658      * <p>The area of the image sensor which corresponds to active pixels after any geometric
5659      * distortion correction has been applied.</p>
5660      *
5661      * <p>Type: int32[4]</p>
5662      *
5663      * <p>This tag may appear in:
5664      * <ul>
5665      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5666      * </ul></p>
5667      *
5668      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
5669      * the region that actually receives light from the scene) after any geometric correction
5670      * has been applied, and should be treated as the maximum size in pixels of any of the
5671      * image output formats aside from the raw formats.</p>
5672      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
5673      * the full pixel array, and the size of the full pixel array is given by
5674      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5675      * <p>The coordinate system for most other keys that list pixel coordinates, including
5676      * ACAMERA_SCALER_CROP_REGION, is defined relative to the active array rectangle given in
5677      * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p>
5678      * <p>The active array may be smaller than the full pixel array, since the full array may
5679      * include black calibration pixels or other inactive regions.</p>
5680      * <p>For devices that do not support ACAMERA_DISTORTION_CORRECTION_MODE control, the active
5681      * array must be the same as ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
5682      * <p>For devices that support ACAMERA_DISTORTION_CORRECTION_MODE control, the active array must
5683      * be enclosed by ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. The difference between
5684      * pre-correction active array and active array accounts for scaling or cropping caused
5685      * by lens geometric distortion correction.</p>
5686      * <p>In general, application should always refer to active array size for controls like
5687      * metering regions or crop region. Two exceptions are when the application is dealing with
5688      * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
5689      * ACAMERA_DISTORTION_CORRECTION_MODE to OFF. In these cases, application should refer
5690      * to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</p>
5691      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5692      *
5693      * @see ACAMERA_DISTORTION_CORRECTION_MODE
5694      * @see ACAMERA_SCALER_CROP_REGION
5695      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5696      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5697      */
5698     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE =                     // int32[4]
5699             ACAMERA_SENSOR_INFO_START,
5700     /**
5701      * <p>Range of sensitivities for ACAMERA_SENSOR_SENSITIVITY supported by this
5702      * camera device.</p>
5703      *
5704      * @see ACAMERA_SENSOR_SENSITIVITY
5705      *
5706      * <p>Type: int32[2]</p>
5707      *
5708      * <p>This tag may appear in:
5709      * <ul>
5710      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5711      * </ul></p>
5712      *
5713      * <p>The values are the standard ISO sensitivity values,
5714      * as defined in ISO 12232:2006.</p>
5715      */
5716     ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE =                     // int32[2]
5717             ACAMERA_SENSOR_INFO_START + 1,
5718     /**
5719      * <p>The arrangement of color filters on sensor;
5720      * represents the colors in the top-left 2x2 section of
5721      * the sensor, in reading order, for a Bayer camera, or the
5722      * light spectrum it captures for MONOCHROME camera.</p>
5723      *
5724      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)</p>
5725      *
5726      * <p>This tag may appear in:
5727      * <ul>
5728      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5729      * </ul></p>
5730      *
5731      */
5732     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT =              // byte (acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t)
5733             ACAMERA_SENSOR_INFO_START + 2,
5734     /**
5735      * <p>The range of image exposure times for ACAMERA_SENSOR_EXPOSURE_TIME supported
5736      * by this camera device.</p>
5737      *
5738      * @see ACAMERA_SENSOR_EXPOSURE_TIME
5739      *
5740      * <p>Type: int64[2]</p>
5741      *
5742      * <p>This tag may appear in:
5743      * <ul>
5744      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5745      * </ul></p>
5746      *
5747      */
5748     ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE =                   // int64[2]
5749             ACAMERA_SENSOR_INFO_START + 3,
5750     /**
5751      * <p>The maximum possible frame duration (minimum frame rate) for
5752      * ACAMERA_SENSOR_FRAME_DURATION that is supported this camera device.</p>
5753      *
5754      * @see ACAMERA_SENSOR_FRAME_DURATION
5755      *
5756      * <p>Type: int64</p>
5757      *
5758      * <p>This tag may appear in:
5759      * <ul>
5760      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5761      * </ul></p>
5762      *
5763      * <p>Attempting to use frame durations beyond the maximum will result in the frame
5764      * duration being clipped to the maximum. See that control for a full definition of frame
5765      * durations.</p>
5766      * <p>Refer to {@link ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS }
5767      * for the minimum frame duration values.</p>
5768      */
5769     ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION =                    // int64
5770             ACAMERA_SENSOR_INFO_START + 4,
5771     /**
5772      * <p>The physical dimensions of the full pixel
5773      * array.</p>
5774      *
5775      * <p>Type: float[2]</p>
5776      *
5777      * <p>This tag may appear in:
5778      * <ul>
5779      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5780      * </ul></p>
5781      *
5782      * <p>This is the physical size of the sensor pixel
5783      * array defined by ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5784      *
5785      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5786      */
5787     ACAMERA_SENSOR_INFO_PHYSICAL_SIZE =                         // float[2]
5788             ACAMERA_SENSOR_INFO_START + 5,
5789     /**
5790      * <p>Dimensions of the full pixel array, possibly
5791      * including black calibration pixels.</p>
5792      *
5793      * <p>Type: int32[2]</p>
5794      *
5795      * <p>This tag may appear in:
5796      * <ul>
5797      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5798      * </ul></p>
5799      *
5800      * <p>The pixel count of the full pixel array of the image sensor, which covers
5801      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area.  This represents the full pixel dimensions of
5802      * the raw buffers produced by this sensor.</p>
5803      * <p>If a camera device supports raw sensor formats, either this or
5804      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is the maximum dimensions for the raw
5805      * output formats listed in {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
5806      * (this depends on whether or not the image sensor returns buffers containing pixels that
5807      * are not part of the active array region for blacklevel calibration or other purposes).</p>
5808      * <p>Some parts of the full pixel array may not receive light from the scene,
5809      * or be otherwise inactive.  The ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE key
5810      * defines the rectangle of active pixels that will be included in processed image
5811      * formats.</p>
5812      *
5813      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
5814      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5815      */
5816     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE =                      // int32[2]
5817             ACAMERA_SENSOR_INFO_START + 6,
5818     /**
5819      * <p>Maximum raw value output by sensor.</p>
5820      *
5821      * <p>Type: int32</p>
5822      *
5823      * <p>This tag may appear in:
5824      * <ul>
5825      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5826      * </ul></p>
5827      *
5828      * <p>This specifies the fully-saturated encoding level for the raw
5829      * sample values from the sensor.  This is typically caused by the
5830      * sensor becoming highly non-linear or clipping. The minimum for
5831      * each channel is specified by the offset in the
5832      * ACAMERA_SENSOR_BLACK_LEVEL_PATTERN key.</p>
5833      * <p>The white level is typically determined either by sensor bit depth
5834      * (8-14 bits is expected), or by the point where the sensor response
5835      * becomes too non-linear to be useful.  The default value for this is
5836      * maximum representable value for a 16-bit raw sample (2^16 - 1).</p>
5837      * <p>The white level values of captured images may vary for different
5838      * capture settings (e.g., ACAMERA_SENSOR_SENSITIVITY). This key
5839      * represents a coarse approximation for such case. It is recommended
5840      * to use ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL for captures when supported
5841      * by the camera device, which provides more accurate white level values.</p>
5842      *
5843      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
5844      * @see ACAMERA_SENSOR_DYNAMIC_WHITE_LEVEL
5845      * @see ACAMERA_SENSOR_SENSITIVITY
5846      */
5847     ACAMERA_SENSOR_INFO_WHITE_LEVEL =                           // int32
5848             ACAMERA_SENSOR_INFO_START + 7,
5849     /**
5850      * <p>The time base source for sensor capture start timestamps.</p>
5851      *
5852      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)</p>
5853      *
5854      * <p>This tag may appear in:
5855      * <ul>
5856      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5857      * </ul></p>
5858      *
5859      * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but
5860      * may not based on a time source that can be compared to other system time sources.</p>
5861      * <p>This characteristic defines the source for the timestamps, and therefore whether they
5862      * can be compared against other system time sources/timestamps.</p>
5863      */
5864     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE =                      // byte (acamera_metadata_enum_android_sensor_info_timestamp_source_t)
5865             ACAMERA_SENSOR_INFO_START + 8,
5866     /**
5867      * <p>Whether the RAW images output from this camera device are subject to
5868      * lens shading correction.</p>
5869      *
5870      * <p>Type: byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)</p>
5871      *
5872      * <p>This tag may appear in:
5873      * <ul>
5874      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5875      * </ul></p>
5876      *
5877      * <p>If <code>true</code>, all images produced by the camera device in the <code>RAW</code> image formats will have
5878      * at least some lens shading correction already applied to it. If <code>false</code>, the images will
5879      * not be adjusted for lens shading correction.  See android.request.maxNumOutputRaw for a
5880      * list of RAW image formats.</p>
5881      * <p>When <code>true</code>, the <code>lensShadingCorrectionMap</code> key may still have values greater than 1.0,
5882      * and those will need to be applied to any captured RAW frames for them to match the shading
5883      * correction of processed buffers such as <code>YUV</code> or <code>JPEG</code> images. This may occur, for
5884      * example, when some basic fixed lens shading correction is applied by hardware to RAW data,
5885      * and additional correction is done dynamically in the camera processing pipeline after
5886      * demosaicing.</p>
5887      * <p>This key will be <code>null</code> for all devices do not report this information.
5888      * Devices with RAW capability will always report this information in this key.</p>
5889      */
5890     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED =                  // byte (acamera_metadata_enum_android_sensor_info_lens_shading_applied_t)
5891             ACAMERA_SENSOR_INFO_START + 9,
5892     /**
5893      * <p>The area of the image sensor which corresponds to active pixels prior to the
5894      * application of any geometric distortion correction.</p>
5895      *
5896      * <p>Type: int32[4]</p>
5897      *
5898      * <p>This tag may appear in:
5899      * <ul>
5900      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5901      * </ul></p>
5902      *
5903      * <p>This is the rectangle representing the size of the active region of the sensor (i.e.
5904      * the region that actually receives light from the scene) before any geometric correction
5905      * has been applied, and should be treated as the active region rectangle for any of the
5906      * raw formats.  All metadata associated with raw processing (e.g. the lens shading
5907      * correction map, and radial distortion fields) treats the top, left of this rectangle as
5908      * the origin, (0,0).</p>
5909      * <p>The size of this region determines the maximum field of view and the maximum number of
5910      * pixels that an image from this sensor can contain, prior to the application of
5911      * geometric distortion correction. The effective maximum pixel dimensions of a
5912      * post-distortion-corrected image is given by the ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5913      * field, and the effective maximum field of view for a post-distortion-corrected image
5914      * can be calculated by applying the geometric distortion correction fields to this
5915      * rectangle, and cropping to the rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5916      * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
5917      * dimensions in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE given the position of a pixel,
5918      * (x', y'), in the raw pixel array with dimensions given in
5919      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE:</p>
5920      * <ol>
5921      * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in
5922      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, otherwise this pixel is considered
5923      * to be outside of the FOV, and will not be shown in the processed output image.</li>
5924      * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate,
5925      * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
5926      * buffers is defined relative to the top, left of the
5927      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE rectangle.</li>
5928      * <li>If the resulting corrected pixel coordinate is within the region given in
5929      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, then the position of this pixel in the
5930      * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>,
5931      * when the top, left coordinate of that buffer is treated as (0, 0).</li>
5932      * </ol>
5933      * <p>Thus, for pixel x',y' = (25, 25) on a sensor where ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5934      * is (100,100), ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE is (10, 10, 100, 100),
5935      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE is (20, 20, 80, 80), and the geometric distortion
5936      * correction doesn't change the pixel coordinate, the resulting pixel selected in
5937      * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
5938      * with dimensions given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, and would be (5, 5)
5939      * relative to the top,left of post-processed YUV output buffer with dimensions given in
5940      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5941      * <p>The currently supported fields that correct for geometric distortion are:</p>
5942      * <ol>
5943      * <li>ACAMERA_LENS_DISTORTION.</li>
5944      * </ol>
5945      * <p>If the camera device doesn't support geometric distortion correction, or all of the
5946      * geometric distortion fields are no-ops, this rectangle will be the same as the
5947      * post-distortion-corrected rectangle given in ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
5948      * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
5949      * the full pixel array, and the size of the full pixel array is given by
5950      * ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.</p>
5951      * <p>The pre-correction active array may be smaller than the full pixel array, since the
5952      * full array may include black calibration pixels or other inactive regions.</p>
5953      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5954      *
5955      * @see ACAMERA_LENS_DISTORTION
5956      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5957      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5958      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
5959      */
5960     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE =      // int32[4]
5961             ACAMERA_SENSOR_INFO_START + 10,
5962     /**
5963      * <p>The area of the image sensor which corresponds to active pixels after any geometric
5964      * distortion correction has been applied, when the sensor runs in maximum resolution mode.</p>
5965      *
5966      * <p>Type: int32[4]</p>
5967      *
5968      * <p>This tag may appear in:
5969      * <ul>
5970      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
5971      * </ul></p>
5972      *
5973      * <p>Analogous to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, when ACAMERA_SENSOR_PIXEL_MODE
5974      * is set to
5975      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
5976      * Refer to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE for details, with sensor array related keys
5977      * replaced with their
5978      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>
5979      * counterparts.
5980      * This key will only be present for devices which advertise the
5981      * <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>
5982      * capability or devices where <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
5983      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a></p>
5984      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
5985      *
5986      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
5987      * @see ACAMERA_SENSOR_PIXEL_MODE
5988      */
5989     ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =  // int32[4]
5990             ACAMERA_SENSOR_INFO_START + 11,
5991     /**
5992      * <p>Dimensions of the full pixel array, possibly
5993      * including black calibration pixels, when the sensor runs in maximum resolution mode.
5994      * Analogous to ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE, when ACAMERA_SENSOR_PIXEL_MODE is
5995      * set to
5996      * <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>
5997      *
5998      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
5999      * @see ACAMERA_SENSOR_PIXEL_MODE
6000      *
6001      * <p>Type: int32[2]</p>
6002      *
6003      * <p>This tag may appear in:
6004      * <ul>
6005      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6006      * </ul></p>
6007      *
6008      * <p>The pixel count of the full pixel array of the image sensor, which covers
6009      * ACAMERA_SENSOR_INFO_PHYSICAL_SIZE area. This represents the full pixel dimensions of
6010      * the raw buffers produced by this sensor, when it runs in maximum resolution mode. That
6011      * is, when ACAMERA_SENSOR_PIXEL_MODE is set to
6012      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
6013      * This key will only be present for devices which advertise the
6014      * <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>
6015      * capability or devices where <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
6016      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a></p>
6017      *
6018      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
6019      * @see ACAMERA_SENSOR_PIXEL_MODE
6020      */
6021     ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION =   // int32[2]
6022             ACAMERA_SENSOR_INFO_START + 12,
6023     /**
6024      * <p>The area of the image sensor which corresponds to active pixels prior to the
6025      * application of any geometric distortion correction, when the sensor runs in maximum
6026      * resolution mode. This key must be used for crop / metering regions, only when
6027      * ACAMERA_SENSOR_PIXEL_MODE is set to
6028      * <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>
6029      *
6030      * @see ACAMERA_SENSOR_PIXEL_MODE
6031      *
6032      * <p>Type: int32[4]</p>
6033      *
6034      * <p>This tag may appear in:
6035      * <ul>
6036      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6037      * </ul></p>
6038      *
6039      * <p>Analogous to ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
6040      * when ACAMERA_SENSOR_PIXEL_MODE is set to
6041      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.
6042      * This key will only be present for devices which advertise the
6043      * <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>
6044      * capability or devices where <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
6045      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a></p>
6046      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, width, height)</code>.</p>
6047      *
6048      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
6049      * @see ACAMERA_SENSOR_PIXEL_MODE
6050      */
6051     ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION =
6052                                                                 // int32[4]
6053             ACAMERA_SENSOR_INFO_START + 13,
6054     /**
6055      * <p>Dimensions of the group of pixels which are under the same color filter.
6056      * This specifies the width and height (pair of integers) of the group of pixels which fall
6057      * under the same color filter for ULTRA_HIGH_RESOLUTION sensors.</p>
6058      *
6059      * <p>Type: int32[2]</p>
6060      *
6061      * <p>This tag may appear in:
6062      * <ul>
6063      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6064      * </ul></p>
6065      *
6066      * <p>Sensors can have pixels grouped together under the same color filter in order
6067      * to improve various aspects of imaging such as noise reduction, low light
6068      * performance etc. These groups can be of various sizes such as 2X2 (quad bayer),
6069      * 3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under
6070      * the same color filter.
6071      * In case the device has the
6072      * <a href="https://developer.android.com/reference/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
6073      * capability :</p>
6074      * <ul>
6075      * <li>This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW
6076      *   images will have a regular bayer pattern.</li>
6077      * </ul>
6078      * <p>In case the device does not have the
6079      * <a href="https://developer.android.com/reference/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR</a>
6080      * capability :</p>
6081      * <ul>
6082      * <li>This key will be present if
6083      *   <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
6084      *   lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a>, since RAW
6085      *   images may not necessarily have a regular bayer pattern when
6086      *   <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a> is set to
6087      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION</a>.</li>
6088      * </ul>
6089      *
6090      * @see ACAMERA_SENSOR_PIXEL_MODE
6091      */
6092     ACAMERA_SENSOR_INFO_BINNING_FACTOR =                        // int32[2]
6093             ACAMERA_SENSOR_INFO_START + 14,
6094     ACAMERA_SENSOR_INFO_END,
6095 
6096     /**
6097      * <p>Quality of lens shading correction applied
6098      * to the image data.</p>
6099      *
6100      * <p>Type: byte (acamera_metadata_enum_android_shading_mode_t)</p>
6101      *
6102      * <p>This tag may appear in:
6103      * <ul>
6104      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6105      *   <li>ACaptureRequest</li>
6106      * </ul></p>
6107      *
6108      * <p>When set to OFF mode, no lens shading correction will be applied by the
6109      * camera device, and an identity lens shading map data will be provided
6110      * if <code>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE == ON</code>. For example, for lens
6111      * shading map with size of <code>[ 4, 3 ]</code>,
6112      * the output android.statistics.lensShadingCorrectionMap for this case will be an identity
6113      * map shown below:</p>
6114      * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
6115      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
6116      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
6117      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
6118      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
6119      *  1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
6120      * </code></pre>
6121      * <p>When set to other modes, lens shading correction will be applied by the camera
6122      * device. Applications can request lens shading map data by setting
6123      * ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE to ON, and then the camera device will provide lens
6124      * shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
6125      * data will be the one applied by the camera device for this capture request.</p>
6126      * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
6127      * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
6128      * AWB are in AUTO modes(ACAMERA_CONTROL_AE_MODE <code>!=</code> OFF and ACAMERA_CONTROL_AWB_MODE <code>!=</code>
6129      * OFF), to get best results, it is recommended that the applications wait for the AE and AWB
6130      * to be converged before using the returned shading map data.</p>
6131      *
6132      * @see ACAMERA_CONTROL_AE_MODE
6133      * @see ACAMERA_CONTROL_AWB_MODE
6134      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
6135      */
6136     ACAMERA_SHADING_MODE =                                      // byte (acamera_metadata_enum_android_shading_mode_t)
6137             ACAMERA_SHADING_START,
6138     /**
6139      * <p>List of lens shading modes for ACAMERA_SHADING_MODE that are supported by this camera device.</p>
6140      *
6141      * @see ACAMERA_SHADING_MODE
6142      *
6143      * <p>Type: byte[n]</p>
6144      *
6145      * <p>This tag may appear in:
6146      * <ul>
6147      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6148      * </ul></p>
6149      *
6150      * <p>This list contains lens shading modes that can be set for the camera device.
6151      * Camera devices that support the MANUAL_POST_PROCESSING capability will always
6152      * list OFF and FAST mode. This includes all FULL level devices.
6153      * LEGACY devices will always only support FAST mode.</p>
6154      */
6155     ACAMERA_SHADING_AVAILABLE_MODES =                           // byte[n]
6156             ACAMERA_SHADING_START + 2,
6157     ACAMERA_SHADING_END,
6158 
6159     /**
6160      * <p>Operating mode for the face detector
6161      * unit.</p>
6162      *
6163      * <p>Type: byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)</p>
6164      *
6165      * <p>This tag may appear in:
6166      * <ul>
6167      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6168      *   <li>ACaptureRequest</li>
6169      * </ul></p>
6170      *
6171      * <p>Whether face detection is enabled, and whether it
6172      * should output just the basic fields or the full set of
6173      * fields.</p>
6174      */
6175     ACAMERA_STATISTICS_FACE_DETECT_MODE =                       // byte (acamera_metadata_enum_android_statistics_face_detect_mode_t)
6176             ACAMERA_STATISTICS_START,
6177     /**
6178      * <p>Operating mode for hot pixel map generation.</p>
6179      *
6180      * <p>Type: byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)</p>
6181      *
6182      * <p>This tag may appear in:
6183      * <ul>
6184      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6185      *   <li>ACaptureRequest</li>
6186      * </ul></p>
6187      *
6188      * <p>If set to <code>true</code>, a hot pixel map is returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.
6189      * If set to <code>false</code>, no hot pixel map will be returned.</p>
6190      *
6191      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
6192      */
6193     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE =                     // byte (acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t)
6194             ACAMERA_STATISTICS_START + 3,
6195     /**
6196      * <p>List of unique IDs for detected faces.</p>
6197      *
6198      * <p>Type: int32[n]</p>
6199      *
6200      * <p>This tag may appear in:
6201      * <ul>
6202      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6203      * </ul></p>
6204      *
6205      * <p>Each detected face is given a unique ID that is valid for as long as the face is visible
6206      * to the camera device.  A face that leaves the field of view and later returns may be
6207      * assigned a new ID.</p>
6208      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL</p>
6209      *
6210      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
6211      */
6212     ACAMERA_STATISTICS_FACE_IDS =                               // int32[n]
6213             ACAMERA_STATISTICS_START + 4,
6214     /**
6215      * <p>List of landmarks for detected
6216      * faces.</p>
6217      *
6218      * <p>Type: int32[n*6]</p>
6219      *
6220      * <p>This tag may appear in:
6221      * <ul>
6222      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6223      * </ul></p>
6224      *
6225      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
6226      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
6227      * the top-left pixel of the active array.</p>
6228      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
6229      * system depends on the mode being set.
6230      * When the distortion correction mode is OFF, the coordinate system follows
6231      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
6232      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
6233      * When the distortion correction mode is not OFF, the coordinate system follows
6234      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
6235      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
6236      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE == FULL.</p>
6237      * <p>Starting from API level 30, the coordinate system of activeArraySize or
6238      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
6239      * pre-zoomRatio field of view. This means that if the relative position of faces and
6240      * the camera device doesn't change, when zooming in by increasing
6241      * ACAMERA_CONTROL_ZOOM_RATIO, the face landmarks move farther away from the center of the
6242      * activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO is set to 1.0
6243      * (default), the face landmarks coordinates won't change as ACAMERA_SCALER_CROP_REGION
6244      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
6245      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
6246      *
6247      * @see ACAMERA_CONTROL_ZOOM_RATIO
6248      * @see ACAMERA_DISTORTION_CORRECTION_MODE
6249      * @see ACAMERA_SCALER_CROP_REGION
6250      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
6251      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
6252      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
6253      */
6254     ACAMERA_STATISTICS_FACE_LANDMARKS =                         // int32[n*6]
6255             ACAMERA_STATISTICS_START + 5,
6256     /**
6257      * <p>List of the bounding rectangles for detected
6258      * faces.</p>
6259      *
6260      * <p>Type: int32[n*4]</p>
6261      *
6262      * <p>This tag may appear in:
6263      * <ul>
6264      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6265      * </ul></p>
6266      *
6267      * <p>For devices not supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
6268      * system always follows that of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with <code>(0, 0)</code> being
6269      * the top-left pixel of the active array.</p>
6270      * <p>For devices supporting ACAMERA_DISTORTION_CORRECTION_MODE control, the coordinate
6271      * system depends on the mode being set.
6272      * When the distortion correction mode is OFF, the coordinate system follows
6273      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with
6274      * <code>(0, 0)</code> being the top-left pixel of the pre-correction active array.
6275      * When the distortion correction mode is not OFF, the coordinate system follows
6276      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with
6277      * <code>(0, 0)</code> being the top-left pixel of the active array.</p>
6278      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
6279      * <p>Starting from API level 30, the coordinate system of activeArraySize or
6280      * preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
6281      * pre-zoomRatio field of view. This means that if the relative position of faces and
6282      * the camera device doesn't change, when zooming in by increasing
6283      * ACAMERA_CONTROL_ZOOM_RATIO, the face rectangles grow larger and move farther away from
6284      * the center of the activeArray or preCorrectionActiveArray. If ACAMERA_CONTROL_ZOOM_RATIO
6285      * is set to 1.0 (default), the face rectangles won't change as ACAMERA_SCALER_CROP_REGION
6286      * changes. See ACAMERA_CONTROL_ZOOM_RATIO for details. Whether to use activeArraySize or
6287      * preCorrectionActiveArraySize still depends on distortion correction mode.</p>
6288      * <p>The data representation is <code>int[4]</code>, which maps to <code>(left, top, right, bottom)</code>.</p>
6289      *
6290      * @see ACAMERA_CONTROL_ZOOM_RATIO
6291      * @see ACAMERA_DISTORTION_CORRECTION_MODE
6292      * @see ACAMERA_SCALER_CROP_REGION
6293      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
6294      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
6295      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
6296      */
6297     ACAMERA_STATISTICS_FACE_RECTANGLES =                        // int32[n*4]
6298             ACAMERA_STATISTICS_START + 6,
6299     /**
6300      * <p>List of the face confidence scores for
6301      * detected faces</p>
6302      *
6303      * <p>Type: byte[n]</p>
6304      *
6305      * <p>This tag may appear in:
6306      * <ul>
6307      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6308      * </ul></p>
6309      *
6310      * <p>Only available if ACAMERA_STATISTICS_FACE_DETECT_MODE != OFF.</p>
6311      *
6312      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
6313      */
6314     ACAMERA_STATISTICS_FACE_SCORES =                            // byte[n]
6315             ACAMERA_STATISTICS_START + 7,
6316     /**
6317      * <p>The shading map is a low-resolution floating-point map
6318      * that lists the coefficients used to correct for vignetting and color shading,
6319      * for each Bayer color channel of RAW image data.</p>
6320      *
6321      * <p>Type: float[4*n*m]</p>
6322      *
6323      * <p>This tag may appear in:
6324      * <ul>
6325      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6326      * </ul></p>
6327      *
6328      * <p>The map provided here is the same map that is used by the camera device to
6329      * correct both color shading and vignetting for output non-RAW images.</p>
6330      * <p>When there is no lens shading correction applied to RAW
6331      * output images (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED <code>==</code>
6332      * false), this map is the complete lens shading correction
6333      * map; when there is some lens shading correction applied to
6334      * the RAW output image (ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED<code>==</code> true), this map reports the remaining lens shading
6335      * correction map that needs to be applied to get shading
6336      * corrected images that match the camera device's output for
6337      * non-RAW formats.</p>
6338      * <p>For a complete shading correction map, the least shaded
6339      * section of the image will have a gain factor of 1; all
6340      * other sections will have gains above 1.</p>
6341      * <p>When ACAMERA_COLOR_CORRECTION_MODE = TRANSFORM_MATRIX, the map
6342      * will take into account the colorCorrection settings.</p>
6343      * <p>The shading map is for the entire active pixel array, and is not
6344      * affected by the crop region specified in the request. Each shading map
6345      * entry is the value of the shading compensation map over a specific
6346      * pixel on the sensor.  Specifically, with a (N x M) resolution shading
6347      * map, and an active pixel array size (W x H), shading map entry
6348      * (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
6349      * pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
6350      * The map is assumed to be bilinearly interpolated between the sample points.</p>
6351      * <p>For a Bayer camera, the channel order is [R, Geven, Godd, B], where Geven is
6352      * the green channel for the even rows of a Bayer pattern, and Godd is the odd rows.
6353      * The shading map is stored in a fully interleaved format, and its size
6354      * is provided in the camera static metadata by ACAMERA_LENS_INFO_SHADING_MAP_SIZE.</p>
6355      * <p>The shading map will generally have on the order of 30-40 rows and columns,
6356      * and will be smaller than 64x64.</p>
6357      * <p>As an example, given a very small map for a Bayer camera defined as:</p>
6358      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
6359      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
6360      * [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
6361      *     1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
6362      *   1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
6363      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
6364      *   1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
6365      *     1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
6366      * </code></pre>
6367      * <p>The low-resolution scaling map images for each channel are
6368      * (displayed using nearest-neighbor interpolation):</p>
6369      * <p><img alt="Red lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/red_shading.png" />
6370      * <img alt="Green (even rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_e_shading.png" />
6371      * <img alt="Green (odd rows) lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/green_o_shading.png" />
6372      * <img alt="Blue lens shading map" src="../images/camera2/metadata/android.statistics.lensShadingMap/blue_shading.png" /></p>
6373      * <p>As a visualization only, inverting the full-color map to recover an
6374      * image of a gray wall (using bicubic interpolation for visual quality)
6375      * as captured by the sensor gives:</p>
6376      * <p><img alt="Image of a uniform white wall (inverse shading map)" src="../images/camera2/metadata/android.statistics.lensShadingMap/inv_shading.png" /></p>
6377      * <p>For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
6378      * shading map for such a camera is defined as:</p>
6379      * <pre><code>ACAMERA_LENS_INFO_SHADING_MAP_SIZE = [ 4, 3 ]
6380      * ACAMERA_STATISTICS_LENS_SHADING_MAP =
6381      * [ 1.3, 1.3, 1.3, 1.3,  1.2, 1.2, 1.2, 1.2,
6382      *     1.1, 1.1, 1.1, 1.1,  1.3, 1.3, 1.3, 1.3,
6383      *   1.2, 1.2, 1.2, 1.2,  1.1, 1.1, 1.1, 1.1,
6384      *     1.0, 1.0, 1.0, 1.0,  1.2, 1.2, 1.2, 1.2,
6385      *   1.3, 1.3, 1.3, 1.3,   1.2, 1.2, 1.2, 1.2,
6386      *     1.2, 1.2, 1.2, 1.2,  1.3, 1.3, 1.3, 1.3 ]
6387      * </code></pre>
6388      * <p>Note that the RAW image data might be subject to lens shading
6389      * correction not reported on this map. Query
6390      * ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED to see if RAW image data has subject
6391      * to lens shading correction. If ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
6392      * is TRUE, the RAW image data is subject to partial or full lens shading
6393      * correction. In the case full lens shading correction is applied to RAW
6394      * images, the gain factor map reported in this key will contain all 1.0 gains.
6395      * In other words, the map reported in this key is the remaining lens shading
6396      * that needs to be applied on the RAW image to get images without lens shading
6397      * artifacts. See android.request.maxNumOutputRaw for a list of RAW image
6398      * formats.</p>
6399      *
6400      * @see ACAMERA_COLOR_CORRECTION_MODE
6401      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
6402      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
6403      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
6404      */
6405     ACAMERA_STATISTICS_LENS_SHADING_MAP =                       // float[4*n*m]
6406             ACAMERA_STATISTICS_START + 11,
6407     /**
6408      * <p>The camera device estimated scene illumination lighting
6409      * frequency.</p>
6410      *
6411      * <p>Type: byte (acamera_metadata_enum_android_statistics_scene_flicker_t)</p>
6412      *
6413      * <p>This tag may appear in:
6414      * <ul>
6415      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6416      * </ul></p>
6417      *
6418      * <p>Many light sources, such as most fluorescent lights, flicker at a rate
6419      * that depends on the local utility power standards. This flicker must be
6420      * accounted for by auto-exposure routines to avoid artifacts in captured images.
6421      * The camera device uses this entry to tell the application what the scene
6422      * illuminant frequency is.</p>
6423      * <p>When manual exposure control is enabled
6424      * (<code>ACAMERA_CONTROL_AE_MODE == OFF</code> or <code>ACAMERA_CONTROL_MODE ==
6425      * OFF</code>), the ACAMERA_CONTROL_AE_ANTIBANDING_MODE doesn't perform
6426      * antibanding, and the application can ensure it selects
6427      * exposure times that do not cause banding issues by looking
6428      * into this metadata field. See
6429      * ACAMERA_CONTROL_AE_ANTIBANDING_MODE for more details.</p>
6430      * <p>Reports NONE if there doesn't appear to be flickering illumination.</p>
6431      *
6432      * @see ACAMERA_CONTROL_AE_ANTIBANDING_MODE
6433      * @see ACAMERA_CONTROL_AE_MODE
6434      * @see ACAMERA_CONTROL_MODE
6435      */
6436     ACAMERA_STATISTICS_SCENE_FLICKER =                          // byte (acamera_metadata_enum_android_statistics_scene_flicker_t)
6437             ACAMERA_STATISTICS_START + 14,
6438     /**
6439      * <p>List of <code>(x, y)</code> coordinates of hot/defective pixels on the sensor.</p>
6440      *
6441      * <p>Type: int32[2*n]</p>
6442      *
6443      * <p>This tag may appear in:
6444      * <ul>
6445      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6446      * </ul></p>
6447      *
6448      * <p>A coordinate <code>(x, y)</code> must lie between <code>(0, 0)</code>, and
6449      * <code>(width - 1, height - 1)</code> (inclusive), which are the top-left and
6450      * bottom-right of the pixel array, respectively. The width and
6451      * height dimensions are given in ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE.
6452      * This may include hot pixels that lie outside of the active array
6453      * bounds given by ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.</p>
6454      *
6455      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
6456      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
6457      */
6458     ACAMERA_STATISTICS_HOT_PIXEL_MAP =                          // int32[2*n]
6459             ACAMERA_STATISTICS_START + 15,
6460     /**
6461      * <p>Whether the camera device will output the lens
6462      * shading map in output result metadata.</p>
6463      *
6464      * <p>Type: byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)</p>
6465      *
6466      * <p>This tag may appear in:
6467      * <ul>
6468      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6469      *   <li>ACaptureRequest</li>
6470      * </ul></p>
6471      *
6472      * <p>When set to ON,
6473      * ACAMERA_STATISTICS_LENS_SHADING_MAP will be provided in
6474      * the output result metadata.</p>
6475      * <p>ON is always supported on devices with the RAW capability.</p>
6476      *
6477      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
6478      */
6479     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE =                  // byte (acamera_metadata_enum_android_statistics_lens_shading_map_mode_t)
6480             ACAMERA_STATISTICS_START + 16,
6481     /**
6482      * <p>A control for selecting whether optical stabilization (OIS) position
6483      * information is included in output result metadata.</p>
6484      *
6485      * <p>Type: byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)</p>
6486      *
6487      * <p>This tag may appear in:
6488      * <ul>
6489      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6490      *   <li>ACaptureRequest</li>
6491      * </ul></p>
6492      *
6493      * <p>Since optical image stabilization generally involves motion much faster than the duration
6494      * of individual image exposure, multiple OIS samples can be included for a single capture
6495      * result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
6496      * at 30fps may have 6-7 OIS samples per capture result. This information can be combined
6497      * with the rolling shutter skew to account for lens motion during image exposure in
6498      * post-processing algorithms.</p>
6499      */
6500     ACAMERA_STATISTICS_OIS_DATA_MODE =                          // byte (acamera_metadata_enum_android_statistics_ois_data_mode_t)
6501             ACAMERA_STATISTICS_START + 17,
6502     /**
6503      * <p>An array of timestamps of OIS samples, in nanoseconds.</p>
6504      *
6505      * <p>Type: int64[n]</p>
6506      *
6507      * <p>This tag may appear in:
6508      * <ul>
6509      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6510      * </ul></p>
6511      *
6512      * <p>The array contains the timestamps of OIS samples. The timestamps are in the same
6513      * timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.</p>
6514      *
6515      * @see ACAMERA_SENSOR_TIMESTAMP
6516      */
6517     ACAMERA_STATISTICS_OIS_TIMESTAMPS =                         // int64[n]
6518             ACAMERA_STATISTICS_START + 18,
6519     /**
6520      * <p>An array of shifts of OIS samples, in x direction.</p>
6521      *
6522      * <p>Type: float[n]</p>
6523      *
6524      * <p>This tag may appear in:
6525      * <ul>
6526      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6527      * </ul></p>
6528      *
6529      * <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
6530      * A positive value is a shift from left to right in the pre-correction active array
6531      * coordinate system. For example, if the optical center is (1000, 500) in pre-correction
6532      * active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).</p>
6533      * <p>The number of shifts must match the number of timestamps in
6534      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
6535      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
6536      * supporting devices). They are always reported in pre-correction active array coordinates,
6537      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
6538      * is needed.</p>
6539      *
6540      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
6541      */
6542     ACAMERA_STATISTICS_OIS_X_SHIFTS =                           // float[n]
6543             ACAMERA_STATISTICS_START + 19,
6544     /**
6545      * <p>An array of shifts of OIS samples, in y direction.</p>
6546      *
6547      * <p>Type: float[n]</p>
6548      *
6549      * <p>This tag may appear in:
6550      * <ul>
6551      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6552      * </ul></p>
6553      *
6554      * <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
6555      * A positive value is a shift from top to bottom in pre-correction active array coordinate
6556      * system. For example, if the optical center is (1000, 500) in active array coordinates, a
6557      * shift of (0, 5) puts the new optical center at (1000, 505).</p>
6558      * <p>The number of shifts must match the number of timestamps in
6559      * ACAMERA_STATISTICS_OIS_TIMESTAMPS.</p>
6560      * <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
6561      * supporting devices). They are always reported in pre-correction active array coordinates,
6562      * since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
6563      * is needed.</p>
6564      *
6565      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
6566      */
6567     ACAMERA_STATISTICS_OIS_Y_SHIFTS =                           // float[n]
6568             ACAMERA_STATISTICS_START + 20,
6569     /**
6570      * <p>An array of timestamps of lens intrinsics samples, in nanoseconds.</p>
6571      *
6572      * <p>Type: int64[n]</p>
6573      *
6574      * <p>This tag may appear in:
6575      * <ul>
6576      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6577      * </ul></p>
6578      *
6579      * <p>The array contains the timestamps of lens intrinsics samples. The timestamps are in the
6580      * same timebase as and comparable to ACAMERA_SENSOR_TIMESTAMP.</p>
6581      *
6582      * @see ACAMERA_SENSOR_TIMESTAMP
6583      */
6584     ACAMERA_STATISTICS_LENS_INTRINSIC_TIMESTAMPS =              // int64[n]
6585             ACAMERA_STATISTICS_START + 21,
6586     /**
6587      * <p>An array of intra-frame lens intrinsics.</p>
6588      *
6589      * <p>Type: float[5*n]</p>
6590      *
6591      * <p>This tag may appear in:
6592      * <ul>
6593      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6594      * </ul></p>
6595      *
6596      * <p>The data layout and contents of individual array entries matches with
6597      * ACAMERA_LENS_INTRINSIC_CALIBRATION.</p>
6598      *
6599      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
6600      */
6601     ACAMERA_STATISTICS_LENS_INTRINSIC_SAMPLES =                 // float[5*n]
6602             ACAMERA_STATISTICS_START + 22,
6603     ACAMERA_STATISTICS_END,
6604 
6605     /**
6606      * <p>List of face detection modes for ACAMERA_STATISTICS_FACE_DETECT_MODE that are
6607      * supported by this camera device.</p>
6608      *
6609      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
6610      *
6611      * <p>Type: byte[n]</p>
6612      *
6613      * <p>This tag may appear in:
6614      * <ul>
6615      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6616      * </ul></p>
6617      *
6618      * <p>OFF is always supported.</p>
6619      */
6620     ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES =       // byte[n]
6621             ACAMERA_STATISTICS_INFO_START,
6622     /**
6623      * <p>The maximum number of simultaneously detectable
6624      * faces.</p>
6625      *
6626      * <p>Type: int32</p>
6627      *
6628      * <p>This tag may appear in:
6629      * <ul>
6630      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6631      * </ul></p>
6632      *
6633      */
6634     ACAMERA_STATISTICS_INFO_MAX_FACE_COUNT =                    // int32
6635             ACAMERA_STATISTICS_INFO_START + 2,
6636     /**
6637      * <p>List of hot pixel map output modes for ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE that are
6638      * supported by this camera device.</p>
6639      *
6640      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
6641      *
6642      * <p>Type: byte[n]</p>
6643      *
6644      * <p>This tag may appear in:
6645      * <ul>
6646      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6647      * </ul></p>
6648      *
6649      * <p>If no hotpixel map output is available for this camera device, this will contain only
6650      * <code>false</code>.</p>
6651      * <p>ON is always supported on devices with the RAW capability.</p>
6652      */
6653     ACAMERA_STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES =     // byte[n]
6654             ACAMERA_STATISTICS_INFO_START + 6,
6655     /**
6656      * <p>List of lens shading map output modes for ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE that
6657      * are supported by this camera device.</p>
6658      *
6659      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
6660      *
6661      * <p>Type: byte[n]</p>
6662      *
6663      * <p>This tag may appear in:
6664      * <ul>
6665      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6666      * </ul></p>
6667      *
6668      * <p>If no lens shading map output is available for this camera device, this key will
6669      * contain only OFF.</p>
6670      * <p>ON is always supported on devices with the RAW capability.
6671      * LEGACY mode devices will always only support OFF.</p>
6672      */
6673     ACAMERA_STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =  // byte[n]
6674             ACAMERA_STATISTICS_INFO_START + 7,
6675     /**
6676      * <p>List of OIS data output modes for ACAMERA_STATISTICS_OIS_DATA_MODE that
6677      * are supported by this camera device.</p>
6678      *
6679      * @see ACAMERA_STATISTICS_OIS_DATA_MODE
6680      *
6681      * <p>Type: byte[n]</p>
6682      *
6683      * <p>This tag may appear in:
6684      * <ul>
6685      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6686      * </ul></p>
6687      *
6688      * <p>If no OIS data output is available for this camera device, this key will
6689      * contain only OFF.</p>
6690      */
6691     ACAMERA_STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =          // byte[n]
6692             ACAMERA_STATISTICS_INFO_START + 8,
6693     ACAMERA_STATISTICS_INFO_END,
6694 
6695     /**
6696      * <p>Tonemapping / contrast / gamma curve for the blue
6697      * channel, to use when ACAMERA_TONEMAP_MODE is
6698      * CONTRAST_CURVE.</p>
6699      *
6700      * @see ACAMERA_TONEMAP_MODE
6701      *
6702      * <p>Type: float[n*2]</p>
6703      *
6704      * <p>This tag may appear in:
6705      * <ul>
6706      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6707      *   <li>ACaptureRequest</li>
6708      * </ul></p>
6709      *
6710      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
6711      *
6712      * @see ACAMERA_TONEMAP_CURVE_RED
6713      */
6714     ACAMERA_TONEMAP_CURVE_BLUE =                                // float[n*2]
6715             ACAMERA_TONEMAP_START,
6716     /**
6717      * <p>Tonemapping / contrast / gamma curve for the green
6718      * channel, to use when ACAMERA_TONEMAP_MODE is
6719      * CONTRAST_CURVE.</p>
6720      *
6721      * @see ACAMERA_TONEMAP_MODE
6722      *
6723      * <p>Type: float[n*2]</p>
6724      *
6725      * <p>This tag may appear in:
6726      * <ul>
6727      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6728      *   <li>ACaptureRequest</li>
6729      * </ul></p>
6730      *
6731      * <p>See ACAMERA_TONEMAP_CURVE_RED for more details.</p>
6732      *
6733      * @see ACAMERA_TONEMAP_CURVE_RED
6734      */
6735     ACAMERA_TONEMAP_CURVE_GREEN =                               // float[n*2]
6736             ACAMERA_TONEMAP_START + 1,
6737     /**
6738      * <p>Tonemapping / contrast / gamma curve for the red
6739      * channel, to use when ACAMERA_TONEMAP_MODE is
6740      * CONTRAST_CURVE.</p>
6741      *
6742      * @see ACAMERA_TONEMAP_MODE
6743      *
6744      * <p>Type: float[n*2]</p>
6745      *
6746      * <p>This tag may appear in:
6747      * <ul>
6748      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6749      *   <li>ACaptureRequest</li>
6750      * </ul></p>
6751      *
6752      * <p>Each channel's curve is defined by an array of control points:</p>
6753      * <pre><code>ACAMERA_TONEMAP_CURVE_RED =
6754      *   [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
6755      * 2 &lt;= N &lt;= ACAMERA_TONEMAP_MAX_CURVE_POINTS</code></pre>
6756      * <p>These are sorted in order of increasing <code>Pin</code>; it is
6757      * required that input values 0.0 and 1.0 are included in the list to
6758      * define a complete mapping. For input values between control points,
6759      * the camera device must linearly interpolate between the control
6760      * points.</p>
6761      * <p>Each curve can have an independent number of points, and the number
6762      * of points can be less than max (that is, the request doesn't have to
6763      * always provide a curve with number of points equivalent to
6764      * ACAMERA_TONEMAP_MAX_CURVE_POINTS).</p>
6765      * <p>For devices with MONOCHROME capability, all three channels must have the same set of
6766      * control points.</p>
6767      * <p>A few examples, and their corresponding graphical mappings; these
6768      * only specify the red channel and the precision is limited to 4
6769      * digits, for conciseness.</p>
6770      * <p>Linear mapping:</p>
6771      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 0, 1.0, 1.0 ]
6772      * </code></pre>
6773      * <p><img alt="Linear mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
6774      * <p>Invert mapping:</p>
6775      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [ 0, 1.0, 1.0, 0 ]
6776      * </code></pre>
6777      * <p><img alt="Inverting mapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
6778      * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
6779      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
6780      *   0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
6781      *   0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
6782      *   0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
6783      *   0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
6784      * </code></pre>
6785      * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
6786      * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
6787      * <pre><code>ACAMERA_TONEMAP_CURVE_RED = [
6788      *   0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
6789      *   0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
6790      *   0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
6791      *   0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
6792      * </code></pre>
6793      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
6794      *
6795      * @see ACAMERA_TONEMAP_CURVE_RED
6796      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
6797      */
6798     ACAMERA_TONEMAP_CURVE_RED =                                 // float[n*2]
6799             ACAMERA_TONEMAP_START + 2,
6800     /**
6801      * <p>High-level global contrast/gamma/tonemapping control.</p>
6802      *
6803      * <p>Type: byte (acamera_metadata_enum_android_tonemap_mode_t)</p>
6804      *
6805      * <p>This tag may appear in:
6806      * <ul>
6807      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6808      *   <li>ACaptureRequest</li>
6809      * </ul></p>
6810      *
6811      * <p>When switching to an application-defined contrast curve by setting
6812      * ACAMERA_TONEMAP_MODE to CONTRAST_CURVE, the curve is defined
6813      * per-channel with a set of <code>(in, out)</code> points that specify the
6814      * mapping from input high-bit-depth pixel value to the output
6815      * low-bit-depth value.  Since the actual pixel ranges of both input
6816      * and output may change depending on the camera pipeline, the values
6817      * are specified by normalized floating-point numbers.</p>
6818      * <p>More-complex color mapping operations such as 3D color look-up
6819      * tables, selective chroma enhancement, or other non-linear color
6820      * transforms will be disabled when ACAMERA_TONEMAP_MODE is
6821      * CONTRAST_CURVE.</p>
6822      * <p>When using either FAST or HIGH_QUALITY, the camera device will
6823      * emit its own tonemap curve in android.tonemap.curve.
6824      * These values are always available, and as close as possible to the
6825      * actually used nonlinear/nonglobal transforms.</p>
6826      * <p>If a request is sent with CONTRAST_CURVE with the camera device's
6827      * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
6828      * roughly the same.</p>
6829      *
6830      * @see ACAMERA_TONEMAP_MODE
6831      */
6832     ACAMERA_TONEMAP_MODE =                                      // byte (acamera_metadata_enum_android_tonemap_mode_t)
6833             ACAMERA_TONEMAP_START + 3,
6834     /**
6835      * <p>Maximum number of supported points in the
6836      * tonemap curve that can be used for android.tonemap.curve.</p>
6837      *
6838      * <p>Type: int32</p>
6839      *
6840      * <p>This tag may appear in:
6841      * <ul>
6842      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6843      * </ul></p>
6844      *
6845      * <p>If the actual number of points provided by the application (in ACAMERA_TONEMAPCURVE_*) is
6846      * less than this maximum, the camera device will resample the curve to its internal
6847      * representation, using linear interpolation.</p>
6848      * <p>The output curves in the result metadata may have a different number
6849      * of points than the input curves, and will represent the actual
6850      * hardware curves used as closely as possible when linearly interpolated.</p>
6851      */
6852     ACAMERA_TONEMAP_MAX_CURVE_POINTS =                          // int32
6853             ACAMERA_TONEMAP_START + 4,
6854     /**
6855      * <p>List of tonemapping modes for ACAMERA_TONEMAP_MODE that are supported by this camera
6856      * device.</p>
6857      *
6858      * @see ACAMERA_TONEMAP_MODE
6859      *
6860      * <p>Type: byte[n]</p>
6861      *
6862      * <p>This tag may appear in:
6863      * <ul>
6864      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6865      * </ul></p>
6866      *
6867      * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
6868      * at least one of below mode combinations:</p>
6869      * <ul>
6870      * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li>
6871      * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li>
6872      * </ul>
6873      * <p>This includes all FULL level devices.</p>
6874      */
6875     ACAMERA_TONEMAP_AVAILABLE_TONE_MAP_MODES =                  // byte[n]
6876             ACAMERA_TONEMAP_START + 5,
6877     /**
6878      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
6879      * GAMMA_VALUE</p>
6880      *
6881      * @see ACAMERA_TONEMAP_MODE
6882      *
6883      * <p>Type: float</p>
6884      *
6885      * <p>This tag may appear in:
6886      * <ul>
6887      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6888      *   <li>ACaptureRequest</li>
6889      * </ul></p>
6890      *
6891      * <p>The tonemap curve will be defined the following formula:</p>
6892      * <ul>
6893      * <li>OUT = pow(IN, 1.0 / gamma)</li>
6894      * </ul>
6895      * <p>where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
6896      * pow is the power function and gamma is the gamma value specified by this
6897      * key.</p>
6898      * <p>The same curve will be applied to all color channels. The camera device
6899      * may clip the input gamma value to its supported range. The actual applied
6900      * value will be returned in capture result.</p>
6901      * <p>The valid range of gamma value varies on different devices, but values
6902      * within [1.0, 5.0] are guaranteed not to be clipped.</p>
6903      */
6904     ACAMERA_TONEMAP_GAMMA =                                     // float
6905             ACAMERA_TONEMAP_START + 6,
6906     /**
6907      * <p>Tonemapping curve to use when ACAMERA_TONEMAP_MODE is
6908      * PRESET_CURVE</p>
6909      *
6910      * @see ACAMERA_TONEMAP_MODE
6911      *
6912      * <p>Type: byte (acamera_metadata_enum_android_tonemap_preset_curve_t)</p>
6913      *
6914      * <p>This tag may appear in:
6915      * <ul>
6916      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
6917      *   <li>ACaptureRequest</li>
6918      * </ul></p>
6919      *
6920      * <p>The tonemap curve will be defined by specified standard.</p>
6921      * <p>sRGB (approximated by 16 control points):</p>
6922      * <p><img alt="sRGB tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
6923      * <p>Rec. 709 (approximated by 16 control points):</p>
6924      * <p><img alt="Rec. 709 tonemapping curve" src="../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p>
6925      * <p>Note that above figures show a 16 control points approximation of preset
6926      * curves. Camera devices may apply a different approximation to the curve.</p>
6927      */
6928     ACAMERA_TONEMAP_PRESET_CURVE =                              // byte (acamera_metadata_enum_android_tonemap_preset_curve_t)
6929             ACAMERA_TONEMAP_START + 7,
6930     ACAMERA_TONEMAP_END,
6931 
6932     /**
6933      * <p>Generally classifies the overall set of the camera device functionality.</p>
6934      *
6935      * <p>Type: byte (acamera_metadata_enum_android_info_supported_hardware_level_t)</p>
6936      *
6937      * <p>This tag may appear in:
6938      * <ul>
6939      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
6940      * </ul></p>
6941      *
6942      * <p>The supported hardware level is a high-level description of the camera device's
6943      * capabilities, summarizing several capabilities into one field.  Each level adds additional
6944      * features to the previous one, and is always a strict superset of the previous level.
6945      * The ordering is <code>LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3</code>.</p>
6946      * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing
6947      * numerical value as well. To check if a given device is at least at a given hardware level,
6948      * the following code snippet can be used:</p>
6949      * <pre><code>// Returns true if the device supports the required hardware level, or better.
6950      * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
6951      *     final int[] sortedHwLevels = {
6952      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
6953      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
6954      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
6955      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
6956      *         CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
6957      *     };
6958      *     int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
6959      *     if (requiredLevel == deviceLevel) {
6960      *         return true;
6961      *     }
6962      *
6963      *     for (int sortedlevel : sortedHwLevels) {
6964      *         if (sortedlevel == requiredLevel) {
6965      *             return true;
6966      *         } else if (sortedlevel == deviceLevel) {
6967      *             return false;
6968      *         }
6969      *     }
6970      *     return false; // Should never reach here
6971      * }
6972      * </code></pre>
6973      * <p>At a high level, the levels are:</p>
6974      * <ul>
6975      * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older
6976      *   Android devices, and have very limited capabilities.</li>
6977      * <li><code>LIMITED</code> devices represent the
6978      *   baseline feature set, and may also include additional capabilities that are
6979      *   subsets of <code>FULL</code>.</li>
6980      * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and
6981      *   post-processing settings, and image capture at a high rate.</li>
6982      * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along
6983      *   with additional output stream configurations.</li>
6984      * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or
6985      *   lens information not reported or less stable framerates.</li>
6986      * </ul>
6987      * <p>See the individual level enums for full descriptions of the supported capabilities.  The
6988      * ACAMERA_REQUEST_AVAILABLE_CAPABILITIES entry describes the device's capabilities at a
6989      * finer-grain level, if needed. In addition, many controls have their available settings or
6990      * ranges defined in individual entries from {@link ACameraManager_getCameraCharacteristics }.</p>
6991      * <p>Some features are not part of any particular hardware level or capability and must be
6992      * queried separately. These include:</p>
6993      * <ul>
6994      * <li>Calibrated timestamps (ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE <code>==</code> REALTIME)</li>
6995      * <li>Precision lens control (ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION <code>==</code> CALIBRATED)</li>
6996      * <li>Face detection (ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES)</li>
6997      * <li>Optical or electrical image stabilization
6998      *   (ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION,
6999      *    ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES)</li>
7000      * </ul>
7001      *
7002      * @see ACAMERA_CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES
7003      * @see ACAMERA_LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION
7004      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
7005      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
7006      * @see ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
7007      * @see ACAMERA_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
7008      */
7009     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL =                     // byte (acamera_metadata_enum_android_info_supported_hardware_level_t)
7010             ACAMERA_INFO_START,
7011     /**
7012      * <p>A short string for manufacturer version information about the camera device, such as
7013      * ISP hardware, sensors, etc.</p>
7014      *
7015      * <p>Type: byte</p>
7016      *
7017      * <p>This tag may appear in:
7018      * <ul>
7019      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7020      * </ul></p>
7021      *
7022      * <p>This can be used in <a href="https://developer.android.com/reference/android/media/ExifInterface.html#TAG_IMAGE_DESCRIPTION">TAG_IMAGE_DESCRIPTION</a>
7023      * in jpeg EXIF. This key may be absent if no version information is available on the
7024      * device.</p>
7025      */
7026     ACAMERA_INFO_VERSION =                                      // byte
7027             ACAMERA_INFO_START + 1,
7028     /**
7029      *
7030      * <p>Type: int64[2*n]</p>
7031      *
7032      * <p>This tag may appear in:
7033      * <ul>
7034      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7035      * </ul></p>
7036      *
7037      * <p>HAL must populate the array with
7038      * (hardware::camera::provider::V2_5::DeviceState, sensorOrientation) pairs for each
7039      * supported device state bitwise combination.</p>
7040      */
7041     ACAMERA_INFO_DEVICE_STATE_ORIENTATIONS =                    // int64[2*n]
7042             ACAMERA_INFO_START + 3,
7043     ACAMERA_INFO_END,
7044 
7045     /**
7046      * <p>Whether black-level compensation is locked
7047      * to its current values, or is free to vary.</p>
7048      *
7049      * <p>Type: byte (acamera_metadata_enum_android_black_level_lock_t)</p>
7050      *
7051      * <p>This tag may appear in:
7052      * <ul>
7053      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7054      *   <li>ACaptureRequest</li>
7055      * </ul></p>
7056      *
7057      * <p>Whether the black level offset was locked for this frame.  Should be
7058      * ON if ACAMERA_BLACK_LEVEL_LOCK was ON in the capture request, unless
7059      * a change in other capture settings forced the camera device to
7060      * perform a black level reset.</p>
7061      *
7062      * @see ACAMERA_BLACK_LEVEL_LOCK
7063      */
7064     ACAMERA_BLACK_LEVEL_LOCK =                                  // byte (acamera_metadata_enum_android_black_level_lock_t)
7065             ACAMERA_BLACK_LEVEL_START,
7066     ACAMERA_BLACK_LEVEL_END,
7067 
7068     /**
7069      * <p>The frame number corresponding to the last request
7070      * with which the output result (metadata + buffers) has been fully
7071      * synchronized.</p>
7072      *
7073      * <p>Type: int64 (acamera_metadata_enum_android_sync_frame_number_t)</p>
7074      *
7075      * <p>This tag may appear in:
7076      * <ul>
7077      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7078      * </ul></p>
7079      *
7080      * <p>When a request is submitted to the camera device, there is usually a
7081      * delay of several frames before the controls get applied. A camera
7082      * device may either choose to account for this delay by implementing a
7083      * pipeline and carefully submit well-timed atomic control updates, or
7084      * it may start streaming control changes that span over several frame
7085      * boundaries.</p>
7086      * <p>In the latter case, whenever a request's settings change relative to
7087      * the previous submitted request, the full set of changes may take
7088      * multiple frame durations to fully take effect. Some settings may
7089      * take effect sooner (in less frame durations) than others.</p>
7090      * <p>While a set of control changes are being propagated, this value
7091      * will be CONVERGING.</p>
7092      * <p>Once it is fully known that a set of control changes have been
7093      * finished propagating, and the resulting updated control settings
7094      * have been read back by the camera device, this value will be set
7095      * to a non-negative frame number (corresponding to the request to
7096      * which the results have synchronized to).</p>
7097      * <p>Older camera device implementations may not have a way to detect
7098      * when all camera controls have been applied, and will always set this
7099      * value to UNKNOWN.</p>
7100      * <p>FULL capability devices will always have this value set to the
7101      * frame number of the request corresponding to this result.</p>
7102      * <p><em>Further details</em>:</p>
7103      * <ul>
7104      * <li>Whenever a request differs from the last request, any future
7105      * results not yet returned may have this value set to CONVERGING (this
7106      * could include any in-progress captures not yet returned by the camera
7107      * device, for more details see pipeline considerations below).</li>
7108      * <li>Submitting a series of multiple requests that differ from the
7109      * previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
7110      * moves the new synchronization frame to the last non-repeating
7111      * request (using the smallest frame number from the contiguous list of
7112      * repeating requests).</li>
7113      * <li>Submitting the same request repeatedly will not change this value
7114      * to CONVERGING, if it was already a non-negative value.</li>
7115      * <li>When this value changes to non-negative, that means that all of the
7116      * metadata controls from the request have been applied, all of the
7117      * metadata controls from the camera device have been read to the
7118      * updated values (into the result), and all of the graphics buffers
7119      * corresponding to this result are also synchronized to the request.</li>
7120      * </ul>
7121      * <p><em>Pipeline considerations</em>:</p>
7122      * <p>Submitting a request with updated controls relative to the previously
7123      * submitted requests may also invalidate the synchronization state
7124      * of all the results corresponding to currently in-flight requests.</p>
7125      * <p>In other words, results for this current request and up to
7126      * ACAMERA_REQUEST_PIPELINE_MAX_DEPTH prior requests may have their
7127      * ACAMERA_SYNC_FRAME_NUMBER change to CONVERGING.</p>
7128      *
7129      * @see ACAMERA_REQUEST_PIPELINE_MAX_DEPTH
7130      * @see ACAMERA_SYNC_FRAME_NUMBER
7131      */
7132     ACAMERA_SYNC_FRAME_NUMBER =                                 // int64 (acamera_metadata_enum_android_sync_frame_number_t)
7133             ACAMERA_SYNC_START,
7134     /**
7135      * <p>The maximum number of frames that can occur after a request
7136      * (different than the previous) has been submitted, and before the
7137      * result's state becomes synchronized.</p>
7138      *
7139      * <p>Type: int32 (acamera_metadata_enum_android_sync_max_latency_t)</p>
7140      *
7141      * <p>This tag may appear in:
7142      * <ul>
7143      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7144      * </ul></p>
7145      *
7146      * <p>This defines the maximum distance (in number of metadata results),
7147      * between the frame number of the request that has new controls to apply
7148      * and the frame number of the result that has all the controls applied.</p>
7149      * <p>In other words this acts as an upper boundary for how many frames
7150      * must occur before the camera device knows for a fact that the new
7151      * submitted camera settings have been applied in outgoing frames.</p>
7152      */
7153     ACAMERA_SYNC_MAX_LATENCY =                                  // int32 (acamera_metadata_enum_android_sync_max_latency_t)
7154             ACAMERA_SYNC_START + 1,
7155     ACAMERA_SYNC_END,
7156 
7157     /**
7158      * <p>The available depth dataspace stream
7159      * configurations that this camera device supports
7160      * (i.e. format, width, height, output/input stream).</p>
7161      *
7162      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)</p>
7163      *
7164      * <p>This tag may appear in:
7165      * <ul>
7166      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7167      * </ul></p>
7168      *
7169      * <p>These are output stream configurations for use with
7170      * dataSpace HAL_DATASPACE_DEPTH. The configurations are
7171      * listed as <code>(format, width, height, input?)</code> tuples.</p>
7172      * <p>Only devices that support depth output for at least
7173      * the HAL_PIXEL_FORMAT_Y16 dense depth map may include
7174      * this entry.</p>
7175      * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB
7176      * sparse depth point cloud must report a single entry for
7177      * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB,
7178      * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to
7179      * the entries for HAL_PIXEL_FORMAT_Y16.</p>
7180      */
7181     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS =       // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_t)
7182             ACAMERA_DEPTH_START + 1,
7183     /**
7184      * <p>This lists the minimum frame duration for each
7185      * format/size combination for depth output formats.</p>
7186      *
7187      * <p>Type: int64[4*n]</p>
7188      *
7189      * <p>This tag may appear in:
7190      * <ul>
7191      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7192      * </ul></p>
7193      *
7194      * <p>This should correspond to the frame duration when only that
7195      * stream is active, with all processing (typically in android.*.mode)
7196      * set to either OFF or FAST.</p>
7197      * <p>When multiple streams are used in a request, the minimum frame
7198      * duration will be max(individual stream min durations).</p>
7199      * <p>The minimum frame duration of a stream (of a particular format, size)
7200      * is the same regardless of whether the stream is input or output.</p>
7201      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
7202      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
7203      * calculating the max frame rate.</p>
7204      *
7205      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7206      * @see ACAMERA_SENSOR_FRAME_DURATION
7207      */
7208     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS =         // int64[4*n]
7209             ACAMERA_DEPTH_START + 2,
7210     /**
7211      * <p>This lists the maximum stall duration for each
7212      * output format/size combination for depth streams.</p>
7213      *
7214      * <p>Type: int64[4*n]</p>
7215      *
7216      * <p>This tag may appear in:
7217      * <ul>
7218      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7219      * </ul></p>
7220      *
7221      * <p>A stall duration is how much extra time would get added
7222      * to the normal minimum frame duration for a repeating request
7223      * that has streams with non-zero stall.</p>
7224      * <p>This functions similarly to
7225      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for depth
7226      * streams.</p>
7227      * <p>All depth output stream formats may have a nonzero stall
7228      * duration.</p>
7229      *
7230      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7231      */
7232     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS =             // int64[4*n]
7233             ACAMERA_DEPTH_START + 3,
7234     /**
7235      * <p>Indicates whether a capture request may target both a
7236      * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
7237      * YUV_420_888, JPEG, or RAW) simultaneously.</p>
7238      *
7239      * <p>Type: byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)</p>
7240      *
7241      * <p>This tag may appear in:
7242      * <ul>
7243      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7244      * </ul></p>
7245      *
7246      * <p>If TRUE, including both depth and color outputs in a single
7247      * capture request is not supported. An application must interleave color
7248      * and depth requests.  If FALSE, a single request can target both types
7249      * of output.</p>
7250      * <p>Typically, this restriction exists on camera devices that
7251      * need to emit a specific pattern or wavelength of light to
7252      * measure depth values, which causes the color image to be
7253      * corrupted during depth measurement.</p>
7254      */
7255     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE =                          // byte (acamera_metadata_enum_android_depth_depth_is_exclusive_t)
7256             ACAMERA_DEPTH_START + 4,
7257     /**
7258      * <p>Recommended depth stream configurations for common client use cases.</p>
7259      *
7260      * <p>Type: int32[n*5]</p>
7261      *
7262      * <p>This tag may appear in:
7263      * <ul>
7264      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7265      * </ul></p>
7266      *
7267      * <p>Optional subset of the ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS that
7268      * contains similar tuples listed as
7269      * (i.e. width, height, format, output/input stream, usecase bit field).
7270      * Camera devices will be able to suggest particular depth stream configurations which are
7271      * power and performance efficient for specific use cases. For more information about
7272      * retrieving the suggestions see
7273      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getRecommendedStreamConfigurationMap">CameraCharacteristics#getRecommendedStreamConfigurationMap</a>.</p>
7274      * <p>For data representation please refer to
7275      * ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS</p>
7276      *
7277      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
7278      * @see ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
7279      */
7280     ACAMERA_DEPTH_AVAILABLE_RECOMMENDED_DEPTH_STREAM_CONFIGURATIONS =
7281                                                                 // int32[n*5]
7282             ACAMERA_DEPTH_START + 5,
7283     /**
7284      * <p>The available dynamic depth dataspace stream
7285      * configurations that this camera device supports
7286      * (i.e. format, width, height, output/input stream).</p>
7287      *
7288      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)</p>
7289      *
7290      * <p>This tag may appear in:
7291      * <ul>
7292      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7293      * </ul></p>
7294      *
7295      * <p>These are output stream configurations for use with
7296      * dataSpace DYNAMIC_DEPTH. The configurations are
7297      * listed as <code>(format, width, height, input?)</code> tuples.</p>
7298      * <p>Only devices that support depth output for at least
7299      * the HAL_PIXEL_FORMAT_Y16 dense depth map along with
7300      * HAL_PIXEL_FORMAT_BLOB with the same size or size with
7301      * the same aspect ratio can have dynamic depth dataspace
7302      * stream configuration. ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE also
7303      * needs to be set to FALSE.</p>
7304      *
7305      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
7306      */
7307     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS =
7308                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t)
7309             ACAMERA_DEPTH_START + 6,
7310     /**
7311      * <p>This lists the minimum frame duration for each
7312      * format/size combination for dynamic depth output streams.</p>
7313      *
7314      * <p>Type: int64[4*n]</p>
7315      *
7316      * <p>This tag may appear in:
7317      * <ul>
7318      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7319      * </ul></p>
7320      *
7321      * <p>This should correspond to the frame duration when only that
7322      * stream is active, with all processing (typically in android.*.mode)
7323      * set to either OFF or FAST.</p>
7324      * <p>When multiple streams are used in a request, the minimum frame
7325      * duration will be max(individual stream min durations).</p>
7326      * <p>The minimum frame duration of a stream (of a particular format, size)
7327      * is the same regardless of whether the stream is input or output.</p>
7328      */
7329     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS = // int64[4*n]
7330             ACAMERA_DEPTH_START + 7,
7331     /**
7332      * <p>This lists the maximum stall duration for each
7333      * output format/size combination for dynamic depth streams.</p>
7334      *
7335      * <p>Type: int64[4*n]</p>
7336      *
7337      * <p>This tag may appear in:
7338      * <ul>
7339      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7340      * </ul></p>
7341      *
7342      * <p>A stall duration is how much extra time would get added
7343      * to the normal minimum frame duration for a repeating request
7344      * that has streams with non-zero stall.</p>
7345      * <p>All dynamic depth output streams may have a nonzero stall
7346      * duration.</p>
7347      */
7348     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS =     // int64[4*n]
7349             ACAMERA_DEPTH_START + 8,
7350     /**
7351      * <p>The available depth dataspace stream
7352      * configurations that this camera device supports
7353      * (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with
7354      * ACAMERA_SENSOR_PIXEL_MODE set to
7355      * <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>
7356      *
7357      * @see ACAMERA_SENSOR_PIXEL_MODE
7358      *
7359      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t)</p>
7360      *
7361      * <p>This tag may appear in:
7362      * <ul>
7363      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7364      * </ul></p>
7365      *
7366      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, for configurations which
7367      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
7368      * <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>
7369      *
7370      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
7371      * @see ACAMERA_SENSOR_PIXEL_MODE
7372      */
7373     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
7374                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t)
7375             ACAMERA_DEPTH_START + 9,
7376     /**
7377      * <p>This lists the minimum frame duration for each
7378      * format/size combination for depth output formats when a CaptureRequest is submitted with
7379      * ACAMERA_SENSOR_PIXEL_MODE set to
7380      * <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>
7381      *
7382      * @see ACAMERA_SENSOR_PIXEL_MODE
7383      *
7384      * <p>Type: int64[4*n]</p>
7385      *
7386      * <p>This tag may appear in:
7387      * <ul>
7388      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7389      * </ul></p>
7390      *
7391      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS, for configurations which
7392      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
7393      * <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>
7394      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
7395      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION for more details about
7396      * calculating the max frame rate.</p>
7397      *
7398      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS
7399      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION
7400      * @see ACAMERA_SENSOR_FRAME_DURATION
7401      * @see ACAMERA_SENSOR_PIXEL_MODE
7402      */
7403     ACAMERA_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
7404                                                                 // int64[4*n]
7405             ACAMERA_DEPTH_START + 10,
7406     /**
7407      * <p>This lists the maximum stall duration for each
7408      * output format/size combination for depth streams for CaptureRequests where
7409      * ACAMERA_SENSOR_PIXEL_MODE is set to
7410      * <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>
7411      *
7412      * @see ACAMERA_SENSOR_PIXEL_MODE
7413      *
7414      * <p>Type: int64[4*n]</p>
7415      *
7416      * <p>This tag may appear in:
7417      * <ul>
7418      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7419      * </ul></p>
7420      *
7421      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS, for configurations which
7422      * are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
7423      * <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>
7424      *
7425      * @see ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS
7426      * @see ACAMERA_SENSOR_PIXEL_MODE
7427      */
7428     ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
7429                                                                 // int64[4*n]
7430             ACAMERA_DEPTH_START + 11,
7431     /**
7432      * <p>The available dynamic depth dataspace stream
7433      * configurations that this camera device supports (i.e. format, width, height,
7434      * output/input stream) for CaptureRequests where ACAMERA_SENSOR_PIXEL_MODE is set to
7435      * <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>
7436      *
7437      * @see ACAMERA_SENSOR_PIXEL_MODE
7438      *
7439      * <p>Type: int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t)</p>
7440      *
7441      * <p>This tag may appear in:
7442      * <ul>
7443      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7444      * </ul></p>
7445      *
7446      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS, for configurations
7447      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
7448      * <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>
7449      *
7450      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
7451      * @see ACAMERA_SENSOR_PIXEL_MODE
7452      */
7453     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
7454                                                                 // int32[n*4] (acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t)
7455             ACAMERA_DEPTH_START + 12,
7456     /**
7457      * <p>This lists the minimum frame duration for each
7458      * format/size combination for dynamic depth output streams  for CaptureRequests where
7459      * ACAMERA_SENSOR_PIXEL_MODE is set to
7460      * <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>
7461      *
7462      * @see ACAMERA_SENSOR_PIXEL_MODE
7463      *
7464      * <p>Type: int64[4*n]</p>
7465      *
7466      * <p>This tag may appear in:
7467      * <ul>
7468      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7469      * </ul></p>
7470      *
7471      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS, for configurations
7472      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
7473      * <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>
7474      *
7475      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS
7476      * @see ACAMERA_SENSOR_PIXEL_MODE
7477      */
7478     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
7479                                                                 // int64[4*n]
7480             ACAMERA_DEPTH_START + 13,
7481     /**
7482      * <p>This lists the maximum stall duration for each
7483      * output format/size combination for dynamic depth streams for CaptureRequests where
7484      * ACAMERA_SENSOR_PIXEL_MODE is set to
7485      * <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>
7486      *
7487      * @see ACAMERA_SENSOR_PIXEL_MODE
7488      *
7489      * <p>Type: int64[4*n]</p>
7490      *
7491      * <p>This tag may appear in:
7492      * <ul>
7493      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7494      * </ul></p>
7495      *
7496      * <p>Analogous to ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS, for configurations
7497      * which are applicable when ACAMERA_SENSOR_PIXEL_MODE is set to
7498      * <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>
7499      *
7500      * @see ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS
7501      * @see ACAMERA_SENSOR_PIXEL_MODE
7502      */
7503     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION =
7504                                                                 // int64[4*n]
7505             ACAMERA_DEPTH_START + 14,
7506     ACAMERA_DEPTH_END,
7507 
7508     /**
7509      * <p>String containing the ids of the underlying physical cameras.</p>
7510      *
7511      * <p>Type: byte[n]</p>
7512      *
7513      * <p>This tag may appear in:
7514      * <ul>
7515      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7516      * </ul></p>
7517      *
7518      * <p>For a logical camera, this is concatenation of all underlying physical camera IDs.
7519      * The null terminator for physical camera ID must be preserved so that the whole string
7520      * can be tokenized using '\0' to generate list of physical camera IDs.</p>
7521      * <p>For example, if the physical camera IDs of the logical camera are "2" and "3", the
7522      * value of this tag will be ['2', '\0', '3', '\0'].</p>
7523      * <p>The number of physical camera IDs must be no less than 2.</p>
7524      */
7525     ACAMERA_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =                 // byte[n]
7526             ACAMERA_LOGICAL_MULTI_CAMERA_START,
7527     /**
7528      * <p>The accuracy of frame timestamp synchronization between physical cameras</p>
7529      *
7530      * <p>Type: byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)</p>
7531      *
7532      * <p>This tag may appear in:
7533      * <ul>
7534      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7535      * </ul></p>
7536      *
7537      * <p>The accuracy of the frame timestamp synchronization determines the physical cameras'
7538      * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the
7539      * physical camera sensors usually run in leader/follower mode where one sensor generates a
7540      * timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE
7541      * sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors
7542      * use their own timing generator, and there could be offset between their start of exposure.</p>
7543      * <p>In both cases, all images generated for a particular capture request still carry the same
7544      * timestamps, so that they can be used to look up the matching frame number and
7545      * onCaptureStarted callback.</p>
7546      * <p>This tag is only applicable if the logical camera device supports concurrent physical
7547      * streams from different physical cameras.</p>
7548      */
7549     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE =             // byte (acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t)
7550             ACAMERA_LOGICAL_MULTI_CAMERA_START + 1,
7551     /**
7552      * <p>String containing the ID of the underlying active physical camera.</p>
7553      *
7554      * <p>Type: byte</p>
7555      *
7556      * <p>This tag may appear in:
7557      * <ul>
7558      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7559      * </ul></p>
7560      *
7561      * <p>The ID of the active physical camera that's backing the logical camera. All camera
7562      * streams and metadata that are not physical camera specific will be originating from this
7563      * physical camera.</p>
7564      * <p>For a logical camera made up of physical cameras where each camera's lenses have
7565      * different characteristics, the camera device may choose to switch between the physical
7566      * cameras when application changes FOCAL_LENGTH or SCALER_CROP_REGION.
7567      * At the time of lens switch, this result metadata reflects the new active physical camera
7568      * ID.</p>
7569      * <p>This key will be available if the camera device advertises this key via {@link ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS }.
7570      * When available, this must be one of valid physical IDs backing this logical multi-camera.
7571      * If this key is not available for a logical multi-camera, the camera device implementation
7572      * may still switch between different active physical cameras based on use case, but the
7573      * current active physical camera information won't be available to the application.</p>
7574      */
7575     ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID =           // byte
7576             ACAMERA_LOGICAL_MULTI_CAMERA_START + 2,
7577     /**
7578      * <p>The current region of the active physical sensor that will be read out for this
7579      * capture.</p>
7580      *
7581      * <p>Type: int32[4]</p>
7582      *
7583      * <p>This tag may appear in:
7584      * <ul>
7585      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7586      * </ul></p>
7587      *
7588      * <p>This capture result matches with ACAMERA_SCALER_CROP_REGION on non-logical single
7589      * camera sensor devices. In case of logical cameras that can switch between several
7590      * physical devices in response to ACAMERA_CONTROL_ZOOM_RATIO, this capture result will
7591      * not behave like ACAMERA_SCALER_CROP_REGION and ACAMERA_CONTROL_ZOOM_RATIO, where the
7592      * combination of both reflects the effective zoom and crop of the logical camera output.
7593      * Instead, this capture result value will describe the zoom and crop of the active physical
7594      * device. Some examples of when the value of this capture result will change include
7595      * switches between different physical lenses, switches between regular and maximum
7596      * resolution pixel mode and going through the device digital or optical range.
7597      * This capture result is similar to ACAMERA_SCALER_CROP_REGION with respect to distortion
7598      * correction. When the distortion correction mode is OFF, the coordinate system follows
7599      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE, with (0, 0) being the top-left pixel
7600      * of the pre-correction active array. When the distortion correction mode is not OFF,
7601      * the coordinate system follows ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE, with (0, 0) being
7602      * the top-left pixel of the active array.</p>
7603      * <p>For camera devices with the
7604      * <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>
7605      * capability or devices where <a href="https://developer.android.com/reference/CameraCharacteristics.html#getAvailableCaptureRequestKeys">CameraCharacteristics#getAvailableCaptureRequestKeys</a>
7606      * lists <a href="https://developer.android.com/reference/CaptureRequest.html#SENSOR_PIXEL_MODE">ACAMERA_SENSOR_PIXEL_MODE</a>
7607      * , the current active physical device
7608      * ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION /
7609      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION must be used as the
7610      * coordinate system for requests where ACAMERA_SENSOR_PIXEL_MODE is set to
7611      * <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>
7612      * <p>The data representation is int[4], which maps to (left, top, width, height).</p>
7613      *
7614      * @see ACAMERA_CONTROL_ZOOM_RATIO
7615      * @see ACAMERA_SCALER_CROP_REGION
7616      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
7617      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
7618      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
7619      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION
7620      * @see ACAMERA_SENSOR_PIXEL_MODE
7621      */
7622     ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_SENSOR_CROP_REGION =
7623                                                                 // int32[4]
7624             ACAMERA_LOGICAL_MULTI_CAMERA_START + 3,
7625     ACAMERA_LOGICAL_MULTI_CAMERA_END,
7626 
7627     /**
7628      * <p>Mode of operation for the lens distortion correction block.</p>
7629      *
7630      * <p>Type: byte (acamera_metadata_enum_android_distortion_correction_mode_t)</p>
7631      *
7632      * <p>This tag may appear in:
7633      * <ul>
7634      *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
7635      *   <li>ACaptureRequest</li>
7636      * </ul></p>
7637      *
7638      * <p>The lens distortion correction block attempts to improve image quality by fixing
7639      * radial, tangential, or other geometric aberrations in the camera device's optics.  If
7640      * available, the ACAMERA_LENS_DISTORTION field documents the lens's distortion parameters.</p>
7641      * <p>OFF means no distortion correction is done.</p>
7642      * <p>FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
7643      * applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
7644      * correction algorithms, even if it slows down capture rate. FAST means the camera device
7645      * will not slow down capture rate when applying correction. FAST may be the same as OFF if
7646      * any correction at all would slow down capture rate.  Every output stream will have a
7647      * similar amount of enhancement applied.</p>
7648      * <p>The correction only applies to processed outputs such as YUV, Y8, JPEG, or DEPTH16; it is
7649      * not applied to any RAW output.</p>
7650      * <p>This control will be on by default on devices that support this control. Applications
7651      * disabling distortion correction need to pay extra attention with the coordinate system of
7652      * metering regions, crop region, and face rectangles. When distortion correction is OFF,
7653      * metadata coordinates follow the coordinate system of
7654      * ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE. When distortion is not OFF, metadata
7655      * coordinates follow the coordinate system of ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE.  The
7656      * camera device will map these metadata fields to match the corrected image produced by the
7657      * camera device, for both capture requests and results.  However, this mapping is not very
7658      * precise, since rectangles do not generally map to rectangles when corrected.  Only linear
7659      * scaling between the active array and precorrection active array coordinates is
7660      * performed. Applications that require precise correction of metadata need to undo that
7661      * linear scaling, and apply a more complete correction that takes into the account the app's
7662      * own requirements.</p>
7663      * <p>The full list of metadata that is affected in this way by distortion correction is:</p>
7664      * <ul>
7665      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
7666      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
7667      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
7668      * <li>ACAMERA_SCALER_CROP_REGION</li>
7669      * <li>android.statistics.faces</li>
7670      * </ul>
7671      *
7672      * @see ACAMERA_CONTROL_AE_REGIONS
7673      * @see ACAMERA_CONTROL_AF_REGIONS
7674      * @see ACAMERA_CONTROL_AWB_REGIONS
7675      * @see ACAMERA_LENS_DISTORTION
7676      * @see ACAMERA_SCALER_CROP_REGION
7677      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
7678      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
7679      */
7680     ACAMERA_DISTORTION_CORRECTION_MODE =                        // byte (acamera_metadata_enum_android_distortion_correction_mode_t)
7681             ACAMERA_DISTORTION_CORRECTION_START,
7682     /**
7683      * <p>List of distortion correction modes for ACAMERA_DISTORTION_CORRECTION_MODE that are
7684      * supported by this camera device.</p>
7685      *
7686      * @see ACAMERA_DISTORTION_CORRECTION_MODE
7687      *
7688      * <p>Type: byte[n]</p>
7689      *
7690      * <p>This tag may appear in:
7691      * <ul>
7692      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7693      * </ul></p>
7694      *
7695      * <p>No device is required to support this API; such devices will always list only 'OFF'.
7696      * All devices that support this API will list both FAST and HIGH_QUALITY.</p>
7697      */
7698     ACAMERA_DISTORTION_CORRECTION_AVAILABLE_MODES =             // byte[n]
7699             ACAMERA_DISTORTION_CORRECTION_START + 1,
7700     ACAMERA_DISTORTION_CORRECTION_END,
7701 
7702     /**
7703      * <p>The available HEIC (ISO/IEC 23008-12) stream
7704      * configurations that this camera device supports
7705      * (i.e. format, width, height, output/input stream).</p>
7706      *
7707      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)</p>
7708      *
7709      * <p>This tag may appear in:
7710      * <ul>
7711      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7712      * </ul></p>
7713      *
7714      * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
7715      * <p>If the camera device supports HEIC image format, it will support identical set of stream
7716      * combinations involving HEIC image format, compared to the combinations involving JPEG
7717      * image format as required by the device's hardware level and capabilities.</p>
7718      * <p>All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
7719      * Configuring JPEG and HEIC streams at the same time is not supported.</p>
7720      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
7721      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
7722      */
7723     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS =         // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_t)
7724             ACAMERA_HEIC_START,
7725     /**
7726      * <p>This lists the minimum frame duration for each
7727      * format/size combination for HEIC output formats.</p>
7728      *
7729      * <p>Type: int64[4*n]</p>
7730      *
7731      * <p>This tag may appear in:
7732      * <ul>
7733      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7734      * </ul></p>
7735      *
7736      * <p>This should correspond to the frame duration when only that
7737      * stream is active, with all processing (typically in android.*.mode)
7738      * set to either OFF or FAST.</p>
7739      * <p>When multiple streams are used in a request, the minimum frame
7740      * duration will be max(individual stream min durations).</p>
7741      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
7742      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
7743      * calculating the max frame rate.</p>
7744      *
7745      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7746      * @see ACAMERA_SENSOR_FRAME_DURATION
7747      */
7748     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS =           // int64[4*n]
7749             ACAMERA_HEIC_START + 1,
7750     /**
7751      * <p>This lists the maximum stall duration for each
7752      * output format/size combination for HEIC streams.</p>
7753      *
7754      * <p>Type: int64[4*n]</p>
7755      *
7756      * <p>This tag may appear in:
7757      * <ul>
7758      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7759      * </ul></p>
7760      *
7761      * <p>A stall duration is how much extra time would get added
7762      * to the normal minimum frame duration for a repeating request
7763      * that has streams with non-zero stall.</p>
7764      * <p>This functions similarly to
7765      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for HEIC
7766      * streams.</p>
7767      * <p>All HEIC output stream formats may have a nonzero stall
7768      * duration.</p>
7769      *
7770      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7771      */
7772     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS =               // int64[4*n]
7773             ACAMERA_HEIC_START + 2,
7774     /**
7775      * <p>The available HEIC (ISO/IEC 23008-12) stream
7776      * configurations that this camera device supports
7777      * (i.e. format, width, height, output/input stream).</p>
7778      *
7779      * <p>Type: int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t)</p>
7780      *
7781      * <p>This tag may appear in:
7782      * <ul>
7783      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7784      * </ul></p>
7785      *
7786      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS for details.</p>
7787      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
7788      * AIMAGE_FORMAT_HEIC format as OUTPUT only.</p>
7789      *
7790      * @see ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
7791      */
7792     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
7793                                                                 // int32[n*4] (acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t)
7794             ACAMERA_HEIC_START + 3,
7795     /**
7796      * <p>This lists the minimum frame duration for each
7797      * format/size combination for HEIC output formats for CaptureRequests where
7798      * ACAMERA_SENSOR_PIXEL_MODE is set to
7799      * <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>
7800      *
7801      * @see ACAMERA_SENSOR_PIXEL_MODE
7802      *
7803      * <p>Type: int64[4*n]</p>
7804      *
7805      * <p>This tag may appear in:
7806      * <ul>
7807      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7808      * </ul></p>
7809      *
7810      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS for details.</p>
7811      *
7812      * @see ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS
7813      */
7814     ACAMERA_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
7815                                                                 // int64[4*n]
7816             ACAMERA_HEIC_START + 4,
7817     /**
7818      * <p>This lists the maximum stall duration for each
7819      * output format/size combination for HEIC streams for CaptureRequests where
7820      * ACAMERA_SENSOR_PIXEL_MODE is set to
7821      * <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>
7822      *
7823      * @see ACAMERA_SENSOR_PIXEL_MODE
7824      *
7825      * <p>Type: int64[4*n]</p>
7826      *
7827      * <p>This tag may appear in:
7828      * <ul>
7829      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7830      * </ul></p>
7831      *
7832      * <p>Refer to ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS for details.</p>
7833      *
7834      * @see ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS
7835      */
7836     ACAMERA_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION =
7837                                                                 // int64[4*n]
7838             ACAMERA_HEIC_START + 5,
7839     ACAMERA_HEIC_END,
7840 
7841     /**
7842      * <p>Location of the cameras on the automotive devices.</p>
7843      *
7844      * <p>Type: byte (acamera_metadata_enum_android_automotive_location_t)</p>
7845      *
7846      * <p>This tag may appear in:
7847      * <ul>
7848      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7849      * </ul></p>
7850      *
7851      * <p>This enum defines the locations of the cameras relative to the vehicle body frame on
7852      * <a href="https://source.android.com/devices/sensors/sensor-types#auto_axes">the automotive sensor coordinate system</a>.
7853      * If the system has FEATURE_AUTOMOTIVE, the camera will have this entry in its static
7854      * metadata.</p>
7855      * <ul>
7856      * <li>INTERIOR is the inside of the vehicle body frame (or the passenger cabin).</li>
7857      * <li>EXTERIOR is the outside of the vehicle body frame.</li>
7858      * <li>EXTRA is the extra vehicle such as a trailer.</li>
7859      * </ul>
7860      * <p>Each side of the vehicle body frame on this coordinate system is defined as below:</p>
7861      * <ul>
7862      * <li>FRONT is where the Y-axis increases toward.</li>
7863      * <li>REAR is where the Y-axis decreases toward.</li>
7864      * <li>LEFT is where the X-axis decreases toward.</li>
7865      * <li>RIGHT is where the X-axis increases toward.</li>
7866      * </ul>
7867      * <p>If the camera has either EXTERIOR_OTHER or EXTRA_OTHER, its static metadata will list
7868      * the following entries, so that applications can determine the camera's exact location:</p>
7869      * <ul>
7870      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
7871      * <li>ACAMERA_LENS_POSE_ROTATION</li>
7872      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
7873      * </ul>
7874      *
7875      * @see ACAMERA_LENS_POSE_REFERENCE
7876      * @see ACAMERA_LENS_POSE_ROTATION
7877      * @see ACAMERA_LENS_POSE_TRANSLATION
7878      */
7879     ACAMERA_AUTOMOTIVE_LOCATION =                               // byte (acamera_metadata_enum_android_automotive_location_t)
7880             ACAMERA_AUTOMOTIVE_START,
7881     ACAMERA_AUTOMOTIVE_END,
7882 
7883     /**
7884      * <p>The direction of the camera faces relative to the vehicle body frame and the
7885      * passenger seats.</p>
7886      *
7887      * <p>Type: byte[n] (acamera_metadata_enum_android_automotive_lens_facing_t)</p>
7888      *
7889      * <p>This tag may appear in:
7890      * <ul>
7891      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7892      * </ul></p>
7893      *
7894      * <p>This enum defines the lens facing characteristic of the cameras on the automotive
7895      * devices with locations ACAMERA_AUTOMOTIVE_LOCATION defines.  If the system has
7896      * FEATURE_AUTOMOTIVE, the camera will have this entry in its static metadata.</p>
7897      * <p>When ACAMERA_AUTOMOTIVE_LOCATION is INTERIOR, this has one or more INTERIOR_*
7898      * values or a single EXTERIOR_* value.  When this has more than one INTERIOR_*,
7899      * the first value must be the one for the seat closest to the optical axis. If this
7900      * contains INTERIOR_OTHER, all other values will be ineffective.</p>
7901      * <p>When ACAMERA_AUTOMOTIVE_LOCATION is EXTERIOR_* or EXTRA, this has a single
7902      * EXTERIOR_* value.</p>
7903      * <p>If a camera has INTERIOR_OTHER or EXTERIOR_OTHER, or more than one camera is at the
7904      * same location and facing the same direction, their static metadata will list the
7905      * following entries, so that applications can determine their lenses' exact facing
7906      * directions:</p>
7907      * <ul>
7908      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
7909      * <li>ACAMERA_LENS_POSE_ROTATION</li>
7910      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
7911      * </ul>
7912      *
7913      * @see ACAMERA_AUTOMOTIVE_LOCATION
7914      * @see ACAMERA_LENS_POSE_REFERENCE
7915      * @see ACAMERA_LENS_POSE_ROTATION
7916      * @see ACAMERA_LENS_POSE_TRANSLATION
7917      */
7918     ACAMERA_AUTOMOTIVE_LENS_FACING =                            // byte[n] (acamera_metadata_enum_android_automotive_lens_facing_t)
7919             ACAMERA_AUTOMOTIVE_LENS_START,
7920     ACAMERA_AUTOMOTIVE_LENS_END,
7921 
7922     /**
7923      * <p>The available Jpeg/R stream
7924      * configurations that this camera device supports
7925      * (i.e. format, width, height, output/input stream).</p>
7926      *
7927      * <p>Type: int32[n*4] (acamera_metadata_enum_android_jpegr_available_jpeg_r_stream_configurations_t)</p>
7928      *
7929      * <p>This tag may appear in:
7930      * <ul>
7931      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7932      * </ul></p>
7933      *
7934      * <p>The configurations are listed as <code>(format, width, height, input?)</code> tuples.</p>
7935      * <p>If the camera device supports Jpeg/R, it will support the same stream combinations with
7936      * Jpeg/R as it does with P010. The stream combinations with Jpeg/R (or P010) supported
7937      * by the device is determined by the device's hardware level and capabilities.</p>
7938      * <p>All the static, control, and dynamic metadata tags related to JPEG apply to Jpeg/R formats.
7939      * Configuring JPEG and Jpeg/R streams at the same time is not supported.</p>
7940      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
7941      * AIMAGE_FORMAT_JPEGR format as OUTPUT only.</p>
7942      */
7943     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS =      // int32[n*4] (acamera_metadata_enum_android_jpegr_available_jpeg_r_stream_configurations_t)
7944             ACAMERA_JPEGR_START,
7945     /**
7946      * <p>This lists the minimum frame duration for each
7947      * format/size combination for Jpeg/R output formats.</p>
7948      *
7949      * <p>Type: int64[4*n]</p>
7950      *
7951      * <p>This tag may appear in:
7952      * <ul>
7953      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7954      * </ul></p>
7955      *
7956      * <p>This should correspond to the frame duration when only that
7957      * stream is active, with all processing (typically in android.*.mode)
7958      * set to either OFF or FAST.</p>
7959      * <p>When multiple streams are used in a request, the minimum frame
7960      * duration will be max(individual stream min durations).</p>
7961      * <p>See ACAMERA_SENSOR_FRAME_DURATION and
7962      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for more details about
7963      * calculating the max frame rate.</p>
7964      *
7965      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7966      * @see ACAMERA_SENSOR_FRAME_DURATION
7967      */
7968     ACAMERA_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS =        // int64[4*n]
7969             ACAMERA_JPEGR_START + 1,
7970     /**
7971      * <p>This lists the maximum stall duration for each
7972      * output format/size combination for Jpeg/R streams.</p>
7973      *
7974      * <p>Type: int64[4*n]</p>
7975      *
7976      * <p>This tag may appear in:
7977      * <ul>
7978      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
7979      * </ul></p>
7980      *
7981      * <p>A stall duration is how much extra time would get added
7982      * to the normal minimum frame duration for a repeating request
7983      * that has streams with non-zero stall.</p>
7984      * <p>This functions similarly to
7985      * ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS for Jpeg/R
7986      * streams.</p>
7987      * <p>All Jpeg/R output stream formats may have a nonzero stall
7988      * duration.</p>
7989      *
7990      * @see ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS
7991      */
7992     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS =            // int64[4*n]
7993             ACAMERA_JPEGR_START + 2,
7994     /**
7995      * <p>The available Jpeg/R stream
7996      * configurations that this camera device supports
7997      * (i.e. format, width, height, output/input stream).</p>
7998      *
7999      * <p>Type: int32[n*4] (acamera_metadata_enum_android_jpegr_available_jpeg_r_stream_configurations_maximum_resolution_t)</p>
8000      *
8001      * <p>This tag may appear in:
8002      * <ul>
8003      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
8004      * </ul></p>
8005      *
8006      * <p>Refer to ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS for details.</p>
8007      * <p>All the configuration tuples <code>(format, width, height, input?)</code> will contain
8008      * AIMAGE_FORMAT_JPEG_R format as OUTPUT only.</p>
8009      *
8010      * @see ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS
8011      */
8012     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION =
8013                                                                 // int32[n*4] (acamera_metadata_enum_android_jpegr_available_jpeg_r_stream_configurations_maximum_resolution_t)
8014             ACAMERA_JPEGR_START + 3,
8015     /**
8016      * <p>This lists the minimum frame duration for each
8017      * format/size combination for Jpeg/R output formats for CaptureRequests where
8018      * ACAMERA_SENSOR_PIXEL_MODE is set to
8019      * <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>
8020      *
8021      * @see ACAMERA_SENSOR_PIXEL_MODE
8022      *
8023      * <p>Type: int64[4*n]</p>
8024      *
8025      * <p>This tag may appear in:
8026      * <ul>
8027      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
8028      * </ul></p>
8029      *
8030      * <p>Refer to ACAMERA_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS for details.</p>
8031      *
8032      * @see ACAMERA_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS
8033      */
8034     ACAMERA_JPEGR_AVAILABLE_JPEG_R_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION =
8035                                                                 // int64[4*n]
8036             ACAMERA_JPEGR_START + 4,
8037     /**
8038      * <p>This lists the maximum stall duration for each
8039      * output format/size combination for Jpeg/R streams for CaptureRequests where
8040      * ACAMERA_SENSOR_PIXEL_MODE is set to
8041      * <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>
8042      *
8043      * @see ACAMERA_SENSOR_PIXEL_MODE
8044      *
8045      * <p>Type: int64[4*n]</p>
8046      *
8047      * <p>This tag may appear in:
8048      * <ul>
8049      *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
8050      * </ul></p>
8051      *
8052      * <p>Refer to ACAMERA_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS for details.</p>
8053      *
8054      * @see ACAMERA_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS
8055      */
8056     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STALL_DURATIONS_MAXIMUM_RESOLUTION =
8057                                                                 // int64[4*n]
8058             ACAMERA_JPEGR_START + 5,
8059     ACAMERA_JPEGR_END,
8060 
8061 } acamera_metadata_tag_t;
8062 
8063 /**
8064  * Enumeration definitions for the various entries that need them
8065  */
8066 
8067 // ACAMERA_COLOR_CORRECTION_MODE
8068 typedef enum acamera_metadata_enum_acamera_color_correction_mode {
8069     /**
8070      * <p>Use the ACAMERA_COLOR_CORRECTION_TRANSFORM matrix
8071      * and ACAMERA_COLOR_CORRECTION_GAINS to do color conversion.</p>
8072      * <p>All advanced white balance adjustments (not specified
8073      * by our white balance pipeline) must be disabled.</p>
8074      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
8075      * TRANSFORM_MATRIX is ignored. The camera device will override
8076      * this value to either FAST or HIGH_QUALITY.</p>
8077      *
8078      * @see ACAMERA_COLOR_CORRECTION_GAINS
8079      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8080      * @see ACAMERA_CONTROL_AWB_MODE
8081      */
8082     ACAMERA_COLOR_CORRECTION_MODE_TRANSFORM_MATRIX                   = 0,
8083 
8084     /**
8085      * <p>Color correction processing must not slow down
8086      * capture rate relative to sensor raw output.</p>
8087      * <p>Advanced white balance adjustments above and beyond
8088      * the specified white balance pipeline may be applied.</p>
8089      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
8090      * the camera device uses the last frame's AWB values
8091      * (or defaults if AWB has never been run).</p>
8092      *
8093      * @see ACAMERA_CONTROL_AWB_MODE
8094      */
8095     ACAMERA_COLOR_CORRECTION_MODE_FAST                               = 1,
8096 
8097     /**
8098      * <p>Color correction processing operates at improved
8099      * quality but the capture rate might be reduced (relative to sensor
8100      * raw output rate)</p>
8101      * <p>Advanced white balance adjustments above and beyond
8102      * the specified white balance pipeline may be applied.</p>
8103      * <p>If AWB is enabled with <code>ACAMERA_CONTROL_AWB_MODE != OFF</code>, then
8104      * the camera device uses the last frame's AWB values
8105      * (or defaults if AWB has never been run).</p>
8106      *
8107      * @see ACAMERA_CONTROL_AWB_MODE
8108      */
8109     ACAMERA_COLOR_CORRECTION_MODE_HIGH_QUALITY                       = 2,
8110 
8111 } acamera_metadata_enum_android_color_correction_mode_t;
8112 
8113 // ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
8114 typedef enum acamera_metadata_enum_acamera_color_correction_aberration_mode {
8115     /**
8116      * <p>No aberration correction is applied.</p>
8117      */
8118     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_OFF                     = 0,
8119 
8120     /**
8121      * <p>Aberration correction will not slow down capture rate
8122      * relative to sensor raw output.</p>
8123      */
8124     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_FAST                    = 1,
8125 
8126     /**
8127      * <p>Aberration correction operates at improved quality but the capture rate might be
8128      * reduced (relative to sensor raw output rate)</p>
8129      */
8130     ACAMERA_COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY            = 2,
8131 
8132 } acamera_metadata_enum_android_color_correction_aberration_mode_t;
8133 
8134 
8135 // ACAMERA_CONTROL_AE_ANTIBANDING_MODE
8136 typedef enum acamera_metadata_enum_acamera_control_ae_antibanding_mode {
8137     /**
8138      * <p>The camera device will not adjust exposure duration to
8139      * avoid banding problems.</p>
8140      */
8141     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_OFF                          = 0,
8142 
8143     /**
8144      * <p>The camera device will adjust exposure duration to
8145      * avoid banding problems with 50Hz illumination sources.</p>
8146      */
8147     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_50HZ                         = 1,
8148 
8149     /**
8150      * <p>The camera device will adjust exposure duration to
8151      * avoid banding problems with 60Hz illumination
8152      * sources.</p>
8153      */
8154     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_60HZ                         = 2,
8155 
8156     /**
8157      * <p>The camera device will automatically adapt its
8158      * antibanding routine to the current illumination
8159      * condition. This is the default mode if AUTO is
8160      * available on given camera device.</p>
8161      */
8162     ACAMERA_CONTROL_AE_ANTIBANDING_MODE_AUTO                         = 3,
8163 
8164 } acamera_metadata_enum_android_control_ae_antibanding_mode_t;
8165 
8166 // ACAMERA_CONTROL_AE_LOCK
8167 typedef enum acamera_metadata_enum_acamera_control_ae_lock {
8168     /**
8169      * <p>Auto-exposure lock is disabled; the AE algorithm
8170      * is free to update its parameters.</p>
8171      */
8172     ACAMERA_CONTROL_AE_LOCK_OFF                                      = 0,
8173 
8174     /**
8175      * <p>Auto-exposure lock is enabled; the AE algorithm
8176      * must not update the exposure and sensitivity parameters
8177      * while the lock is active.</p>
8178      * <p>ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION setting changes
8179      * will still take effect while auto-exposure is locked.</p>
8180      * <p>Some rare LEGACY devices may not support
8181      * this, in which case the value will always be overridden to OFF.</p>
8182      *
8183      * @see ACAMERA_CONTROL_AE_EXPOSURE_COMPENSATION
8184      */
8185     ACAMERA_CONTROL_AE_LOCK_ON                                       = 1,
8186 
8187 } acamera_metadata_enum_android_control_ae_lock_t;
8188 
8189 // ACAMERA_CONTROL_AE_MODE
8190 typedef enum acamera_metadata_enum_acamera_control_ae_mode {
8191     /**
8192      * <p>The camera device's autoexposure routine is disabled.</p>
8193      * <p>The application-selected ACAMERA_SENSOR_EXPOSURE_TIME,
8194      * ACAMERA_SENSOR_SENSITIVITY and
8195      * ACAMERA_SENSOR_FRAME_DURATION are used by the camera
8196      * device, along with ACAMERA_FLASH_* fields, if there's
8197      * a flash unit for this camera device.</p>
8198      * <p>Note that auto-white balance (AWB) and auto-focus (AF)
8199      * behavior is device dependent when AE is in OFF mode.
8200      * To have consistent behavior across different devices,
8201      * it is recommended to either set AWB and AF to OFF mode
8202      * or lock AWB and AF before setting AE to OFF.
8203      * See ACAMERA_CONTROL_AWB_MODE, ACAMERA_CONTROL_AF_MODE,
8204      * ACAMERA_CONTROL_AWB_LOCK, and ACAMERA_CONTROL_AF_TRIGGER
8205      * for more details.</p>
8206      * <p>LEGACY devices do not support the OFF mode and will
8207      * override attempts to use this value to ON.</p>
8208      *
8209      * @see ACAMERA_CONTROL_AF_MODE
8210      * @see ACAMERA_CONTROL_AF_TRIGGER
8211      * @see ACAMERA_CONTROL_AWB_LOCK
8212      * @see ACAMERA_CONTROL_AWB_MODE
8213      * @see ACAMERA_SENSOR_EXPOSURE_TIME
8214      * @see ACAMERA_SENSOR_FRAME_DURATION
8215      * @see ACAMERA_SENSOR_SENSITIVITY
8216      */
8217     ACAMERA_CONTROL_AE_MODE_OFF                                      = 0,
8218 
8219     /**
8220      * <p>The camera device's autoexposure routine is active,
8221      * with no flash control.</p>
8222      * <p>The application's values for
8223      * ACAMERA_SENSOR_EXPOSURE_TIME,
8224      * ACAMERA_SENSOR_SENSITIVITY, and
8225      * ACAMERA_SENSOR_FRAME_DURATION are ignored. The
8226      * application has control over the various
8227      * ACAMERA_FLASH_* fields.</p>
8228      *
8229      * @see ACAMERA_SENSOR_EXPOSURE_TIME
8230      * @see ACAMERA_SENSOR_FRAME_DURATION
8231      * @see ACAMERA_SENSOR_SENSITIVITY
8232      */
8233     ACAMERA_CONTROL_AE_MODE_ON                                       = 1,
8234 
8235     /**
8236      * <p>Like ON, except that the camera device also controls
8237      * the camera's flash unit, firing it in low-light
8238      * conditions.</p>
8239      * <p>The flash may be fired during a precapture sequence
8240      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
8241      * may be fired for captures for which the
8242      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
8243      * STILL_CAPTURE</p>
8244      *
8245      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8246      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8247      */
8248     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH                            = 2,
8249 
8250     /**
8251      * <p>Like ON, except that the camera device also controls
8252      * the camera's flash unit, always firing it for still
8253      * captures.</p>
8254      * <p>The flash may be fired during a precapture sequence
8255      * (triggered by ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER) and
8256      * will always be fired for captures for which the
8257      * ACAMERA_CONTROL_CAPTURE_INTENT field is set to
8258      * STILL_CAPTURE</p>
8259      *
8260      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8261      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8262      */
8263     ACAMERA_CONTROL_AE_MODE_ON_ALWAYS_FLASH                          = 3,
8264 
8265     /**
8266      * <p>Like ON_AUTO_FLASH, but with automatic red eye
8267      * reduction.</p>
8268      * <p>If deemed necessary by the camera device, a red eye
8269      * reduction flash will fire during the precapture
8270      * sequence.</p>
8271      */
8272     ACAMERA_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE                     = 4,
8273 
8274     /**
8275      * <p>An external flash has been turned on.</p>
8276      * <p>It informs the camera device that an external flash has been turned on, and that
8277      * metering (and continuous focus if active) should be quickly recalculated to account
8278      * for the external flash. Otherwise, this mode acts like ON.</p>
8279      * <p>When the external flash is turned off, AE mode should be changed to one of the
8280      * other available AE modes.</p>
8281      * <p>If the camera device supports AE external flash mode, ACAMERA_CONTROL_AE_STATE must
8282      * be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
8283      * flash.</p>
8284      *
8285      * @see ACAMERA_CONTROL_AE_STATE
8286      */
8287     ACAMERA_CONTROL_AE_MODE_ON_EXTERNAL_FLASH                        = 5,
8288 
8289     /**
8290      * <p>Like 'ON' but applies additional brightness boost in low light scenes.</p>
8291      * <p>When the scene lighting conditions are within the range defined by
8292      * ACAMERA_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE this mode will apply additional
8293      * brightness boost.</p>
8294      * <p>This mode will automatically adjust the intensity of low light boost applied
8295      * according to the scene lighting conditions. A darker scene will receive more boost
8296      * while a brighter scene will receive less boost.</p>
8297      * <p>This mode can ignore the set target frame rate to allow more light to be captured
8298      * which can result in choppier motion. The frame rate can extend to lower than the
8299      * ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES but will not go below 10 FPS. This mode
8300      * can also increase the sensor sensitivity gain which can result in increased luma
8301      * and chroma noise. The sensor sensitivity gain can extend to higher values beyond
8302      * ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE. This mode may also apply additional
8303      * processing to recover details in dark and bright areas of the image,and noise
8304      * reduction at high sensitivity gain settings to manage the trade-off between light
8305      * sensitivity and capture noise.</p>
8306      * <p>This mode is restricted to two output surfaces. One output surface type can either
8307      * be SurfaceView or TextureView. Another output surface type can either be MediaCodec
8308      * or MediaRecorder. This mode cannot be used with a target FPS range higher than 30
8309      * FPS.</p>
8310      * <p>If the session configuration is not supported, the AE mode reported in the
8311      * CaptureResult will be 'ON' instead of 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY'.</p>
8312      * <p>When this AE mode is enabled, the CaptureResult field
8313      * ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE will indicate when low light boost is 'ACTIVE'
8314      * or 'INACTIVE'. By default ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE will be 'INACTIVE'.</p>
8315      * <p>The low light boost is 'ACTIVE' once the scene lighting condition is less than the
8316      * upper bound lux value defined by ACAMERA_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE.
8317      * This mode will be 'INACTIVE' once the scene lighting condition is greater than the
8318      * upper bound lux value defined by ACAMERA_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE.</p>
8319      *
8320      * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
8321      * @see ACAMERA_CONTROL_LOW_LIGHT_BOOST_INFO_LUMINANCE_RANGE
8322      * @see ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE
8323      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
8324      */
8325     ACAMERA_CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY   = 6,
8326 
8327 } acamera_metadata_enum_android_control_ae_mode_t;
8328 
8329 // ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
8330 typedef enum acamera_metadata_enum_acamera_control_ae_precapture_trigger {
8331     /**
8332      * <p>The trigger is idle.</p>
8333      */
8334     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_IDLE                       = 0,
8335 
8336     /**
8337      * <p>The precapture metering sequence will be started
8338      * by the camera device.</p>
8339      * <p>The exact effect of the precapture trigger depends on
8340      * the current AE mode and state.</p>
8341      */
8342     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_START                      = 1,
8343 
8344     /**
8345      * <p>The camera device will cancel any currently active or completed
8346      * precapture metering sequence, the auto-exposure routine will return to its
8347      * initial state.</p>
8348      */
8349     ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL                     = 2,
8350 
8351 } acamera_metadata_enum_android_control_ae_precapture_trigger_t;
8352 
8353 // ACAMERA_CONTROL_AF_MODE
8354 typedef enum acamera_metadata_enum_acamera_control_af_mode {
8355     /**
8356      * <p>The auto-focus routine does not control the lens;
8357      * ACAMERA_LENS_FOCUS_DISTANCE is controlled by the
8358      * application.</p>
8359      *
8360      * @see ACAMERA_LENS_FOCUS_DISTANCE
8361      */
8362     ACAMERA_CONTROL_AF_MODE_OFF                                      = 0,
8363 
8364     /**
8365      * <p>Basic automatic focus mode.</p>
8366      * <p>In this mode, the lens does not move unless
8367      * the autofocus trigger action is called. When that trigger
8368      * is activated, AF will transition to ACTIVE_SCAN, then to
8369      * the outcome of the scan (FOCUSED or NOT_FOCUSED).</p>
8370      * <p>Always supported if lens is not fixed focus.</p>
8371      * <p>Use ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE to determine if lens
8372      * is fixed-focus.</p>
8373      * <p>Triggering AF_CANCEL resets the lens position to default,
8374      * and sets the AF state to INACTIVE.</p>
8375      *
8376      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
8377      */
8378     ACAMERA_CONTROL_AF_MODE_AUTO                                     = 1,
8379 
8380     /**
8381      * <p>Close-up focusing mode.</p>
8382      * <p>In this mode, the lens does not move unless the
8383      * autofocus trigger action is called. When that trigger is
8384      * activated, AF will transition to ACTIVE_SCAN, then to
8385      * the outcome of the scan (FOCUSED or NOT_FOCUSED). This
8386      * mode is optimized for focusing on objects very close to
8387      * the camera.</p>
8388      * <p>When that trigger is activated, AF will transition to
8389      * ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
8390      * NOT_FOCUSED). Triggering cancel AF resets the lens
8391      * position to default, and sets the AF state to
8392      * INACTIVE.</p>
8393      */
8394     ACAMERA_CONTROL_AF_MODE_MACRO                                    = 2,
8395 
8396     /**
8397      * <p>In this mode, the AF algorithm modifies the lens
8398      * position continually to attempt to provide a
8399      * constantly-in-focus image stream.</p>
8400      * <p>The focusing behavior should be suitable for good quality
8401      * video recording; typically this means slower focus
8402      * movement and no overshoots. When the AF trigger is not
8403      * involved, the AF algorithm should start in INACTIVE state,
8404      * and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
8405      * states as appropriate. When the AF trigger is activated,
8406      * the algorithm should immediately transition into
8407      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
8408      * lens position until a cancel AF trigger is received.</p>
8409      * <p>Once cancel is received, the algorithm should transition
8410      * back to INACTIVE and resume passive scan. Note that this
8411      * behavior is not identical to CONTINUOUS_PICTURE, since an
8412      * ongoing PASSIVE_SCAN must immediately be
8413      * canceled.</p>
8414      */
8415     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_VIDEO                         = 3,
8416 
8417     /**
8418      * <p>In this mode, the AF algorithm modifies the lens
8419      * position continually to attempt to provide a
8420      * constantly-in-focus image stream.</p>
8421      * <p>The focusing behavior should be suitable for still image
8422      * capture; typically this means focusing as fast as
8423      * possible. When the AF trigger is not involved, the AF
8424      * algorithm should start in INACTIVE state, and then
8425      * transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
8426      * appropriate as it attempts to maintain focus. When the AF
8427      * trigger is activated, the algorithm should finish its
8428      * PASSIVE_SCAN if active, and then transition into
8429      * AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
8430      * lens position until a cancel AF trigger is received.</p>
8431      * <p>When the AF cancel trigger is activated, the algorithm
8432      * should transition back to INACTIVE and then act as if it
8433      * has just been started.</p>
8434      */
8435     ACAMERA_CONTROL_AF_MODE_CONTINUOUS_PICTURE                       = 4,
8436 
8437     /**
8438      * <p>Extended depth of field (digital focus) mode.</p>
8439      * <p>The camera device will produce images with an extended
8440      * depth of field automatically; no special focusing
8441      * operations need to be done before taking a picture.</p>
8442      * <p>AF triggers are ignored, and the AF state will always be
8443      * INACTIVE.</p>
8444      */
8445     ACAMERA_CONTROL_AF_MODE_EDOF                                     = 5,
8446 
8447 } acamera_metadata_enum_android_control_af_mode_t;
8448 
8449 // ACAMERA_CONTROL_AF_TRIGGER
8450 typedef enum acamera_metadata_enum_acamera_control_af_trigger {
8451     /**
8452      * <p>The trigger is idle.</p>
8453      */
8454     ACAMERA_CONTROL_AF_TRIGGER_IDLE                                  = 0,
8455 
8456     /**
8457      * <p>Autofocus will trigger now.</p>
8458      */
8459     ACAMERA_CONTROL_AF_TRIGGER_START                                 = 1,
8460 
8461     /**
8462      * <p>Autofocus will return to its initial
8463      * state, and cancel any currently active trigger.</p>
8464      */
8465     ACAMERA_CONTROL_AF_TRIGGER_CANCEL                                = 2,
8466 
8467 } acamera_metadata_enum_android_control_af_trigger_t;
8468 
8469 // ACAMERA_CONTROL_AWB_LOCK
8470 typedef enum acamera_metadata_enum_acamera_control_awb_lock {
8471     /**
8472      * <p>Auto-white balance lock is disabled; the AWB
8473      * algorithm is free to update its parameters if in AUTO
8474      * mode.</p>
8475      */
8476     ACAMERA_CONTROL_AWB_LOCK_OFF                                     = 0,
8477 
8478     /**
8479      * <p>Auto-white balance lock is enabled; the AWB
8480      * algorithm will not update its parameters while the lock
8481      * is active.</p>
8482      */
8483     ACAMERA_CONTROL_AWB_LOCK_ON                                      = 1,
8484 
8485 } acamera_metadata_enum_android_control_awb_lock_t;
8486 
8487 // ACAMERA_CONTROL_AWB_MODE
8488 typedef enum acamera_metadata_enum_acamera_control_awb_mode {
8489     /**
8490      * <p>The camera device's auto-white balance routine is disabled.</p>
8491      * <p>The application-selected color transform matrix
8492      * (ACAMERA_COLOR_CORRECTION_TRANSFORM) and gains
8493      * (ACAMERA_COLOR_CORRECTION_GAINS) are used by the camera
8494      * device for manual white balance control.</p>
8495      *
8496      * @see ACAMERA_COLOR_CORRECTION_GAINS
8497      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8498      */
8499     ACAMERA_CONTROL_AWB_MODE_OFF                                     = 0,
8500 
8501     /**
8502      * <p>The camera device's auto-white balance routine is active.</p>
8503      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8504      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8505      * For devices that support the MANUAL_POST_PROCESSING capability, the
8506      * values used by the camera device for the transform and gains
8507      * will be available in the capture result for this request.</p>
8508      *
8509      * @see ACAMERA_COLOR_CORRECTION_GAINS
8510      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8511      */
8512     ACAMERA_CONTROL_AWB_MODE_AUTO                                    = 1,
8513 
8514     /**
8515      * <p>The camera device's auto-white balance routine is disabled;
8516      * the camera device uses incandescent light as the assumed scene
8517      * illumination for white balance.</p>
8518      * <p>While the exact white balance transforms are up to the
8519      * camera device, they will approximately match the CIE
8520      * standard illuminant A.</p>
8521      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8522      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8523      * For devices that support the MANUAL_POST_PROCESSING capability, the
8524      * values used by the camera device for the transform and gains
8525      * will be available in the capture result for this request.</p>
8526      *
8527      * @see ACAMERA_COLOR_CORRECTION_GAINS
8528      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8529      */
8530     ACAMERA_CONTROL_AWB_MODE_INCANDESCENT                            = 2,
8531 
8532     /**
8533      * <p>The camera device's auto-white balance routine is disabled;
8534      * the camera device uses fluorescent light as the assumed scene
8535      * illumination for white balance.</p>
8536      * <p>While the exact white balance transforms are up to the
8537      * camera device, they will approximately match the CIE
8538      * standard illuminant F2.</p>
8539      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8540      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8541      * For devices that support the MANUAL_POST_PROCESSING capability, the
8542      * values used by the camera device for the transform and gains
8543      * will be available in the capture result for this request.</p>
8544      *
8545      * @see ACAMERA_COLOR_CORRECTION_GAINS
8546      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8547      */
8548     ACAMERA_CONTROL_AWB_MODE_FLUORESCENT                             = 3,
8549 
8550     /**
8551      * <p>The camera device's auto-white balance routine is disabled;
8552      * the camera device uses warm fluorescent light as the assumed scene
8553      * illumination for white balance.</p>
8554      * <p>While the exact white balance transforms are up to the
8555      * camera device, they will approximately match the CIE
8556      * standard illuminant F4.</p>
8557      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8558      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8559      * For devices that support the MANUAL_POST_PROCESSING capability, the
8560      * values used by the camera device for the transform and gains
8561      * will be available in the capture result for this request.</p>
8562      *
8563      * @see ACAMERA_COLOR_CORRECTION_GAINS
8564      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8565      */
8566     ACAMERA_CONTROL_AWB_MODE_WARM_FLUORESCENT                        = 4,
8567 
8568     /**
8569      * <p>The camera device's auto-white balance routine is disabled;
8570      * the camera device uses daylight light as the assumed scene
8571      * illumination for white balance.</p>
8572      * <p>While the exact white balance transforms are up to the
8573      * camera device, they will approximately match the CIE
8574      * standard illuminant D65.</p>
8575      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8576      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8577      * For devices that support the MANUAL_POST_PROCESSING capability, the
8578      * values used by the camera device for the transform and gains
8579      * will be available in the capture result for this request.</p>
8580      *
8581      * @see ACAMERA_COLOR_CORRECTION_GAINS
8582      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8583      */
8584     ACAMERA_CONTROL_AWB_MODE_DAYLIGHT                                = 5,
8585 
8586     /**
8587      * <p>The camera device's auto-white balance routine is disabled;
8588      * the camera device uses cloudy daylight light as the assumed scene
8589      * illumination for white balance.</p>
8590      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8591      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8592      * For devices that support the MANUAL_POST_PROCESSING capability, the
8593      * values used by the camera device for the transform and gains
8594      * will be available in the capture result for this request.</p>
8595      *
8596      * @see ACAMERA_COLOR_CORRECTION_GAINS
8597      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8598      */
8599     ACAMERA_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT                         = 6,
8600 
8601     /**
8602      * <p>The camera device's auto-white balance routine is disabled;
8603      * the camera device uses twilight light as the assumed scene
8604      * illumination for white balance.</p>
8605      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8606      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8607      * For devices that support the MANUAL_POST_PROCESSING capability, the
8608      * values used by the camera device for the transform and gains
8609      * will be available in the capture result for this request.</p>
8610      *
8611      * @see ACAMERA_COLOR_CORRECTION_GAINS
8612      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8613      */
8614     ACAMERA_CONTROL_AWB_MODE_TWILIGHT                                = 7,
8615 
8616     /**
8617      * <p>The camera device's auto-white balance routine is disabled;
8618      * the camera device uses shade light as the assumed scene
8619      * illumination for white balance.</p>
8620      * <p>The application's values for ACAMERA_COLOR_CORRECTION_TRANSFORM
8621      * and ACAMERA_COLOR_CORRECTION_GAINS are ignored.
8622      * For devices that support the MANUAL_POST_PROCESSING capability, the
8623      * values used by the camera device for the transform and gains
8624      * will be available in the capture result for this request.</p>
8625      *
8626      * @see ACAMERA_COLOR_CORRECTION_GAINS
8627      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
8628      */
8629     ACAMERA_CONTROL_AWB_MODE_SHADE                                   = 8,
8630 
8631 } acamera_metadata_enum_android_control_awb_mode_t;
8632 
8633 // ACAMERA_CONTROL_CAPTURE_INTENT
8634 typedef enum acamera_metadata_enum_acamera_control_capture_intent {
8635     /**
8636      * <p>The goal of this request doesn't fall into the other
8637      * categories. The camera device will default to preview-like
8638      * behavior.</p>
8639      */
8640     ACAMERA_CONTROL_CAPTURE_INTENT_CUSTOM                            = 0,
8641 
8642     /**
8643      * <p>This request is for a preview-like use case.</p>
8644      * <p>The precapture trigger may be used to start off a metering
8645      * w/flash sequence.</p>
8646      */
8647     ACAMERA_CONTROL_CAPTURE_INTENT_PREVIEW                           = 1,
8648 
8649     /**
8650      * <p>This request is for a still capture-type
8651      * use case.</p>
8652      * <p>If the flash unit is under automatic control, it may fire as needed.</p>
8653      */
8654     ACAMERA_CONTROL_CAPTURE_INTENT_STILL_CAPTURE                     = 2,
8655 
8656     /**
8657      * <p>This request is for a video recording
8658      * use case.</p>
8659      */
8660     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_RECORD                      = 3,
8661 
8662     /**
8663      * <p>This request is for a video snapshot (still
8664      * image while recording video) use case.</p>
8665      * <p>The camera device should take the highest-quality image
8666      * possible (given the other settings) without disrupting the
8667      * frame rate of video recording.  </p>
8668      */
8669     ACAMERA_CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT                    = 4,
8670 
8671     /**
8672      * <p>This request is for a ZSL usecase; the
8673      * application will stream full-resolution images and
8674      * reprocess one or several later for a final
8675      * capture.</p>
8676      */
8677     ACAMERA_CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG                  = 5,
8678 
8679     /**
8680      * <p>This request is for manual capture use case where
8681      * the applications want to directly control the capture parameters.</p>
8682      * <p>For example, the application may wish to manually control
8683      * ACAMERA_SENSOR_EXPOSURE_TIME, ACAMERA_SENSOR_SENSITIVITY, etc.</p>
8684      *
8685      * @see ACAMERA_SENSOR_EXPOSURE_TIME
8686      * @see ACAMERA_SENSOR_SENSITIVITY
8687      */
8688     ACAMERA_CONTROL_CAPTURE_INTENT_MANUAL                            = 6,
8689 
8690     /**
8691      * <p>This request is for a motion tracking use case, where
8692      * the application will use camera and inertial sensor data to
8693      * locate and track objects in the world.</p>
8694      * <p>The camera device auto-exposure routine will limit the exposure time
8695      * of the camera to no more than 20 milliseconds, to minimize motion blur.</p>
8696      */
8697     ACAMERA_CONTROL_CAPTURE_INTENT_MOTION_TRACKING                   = 7,
8698 
8699 } acamera_metadata_enum_android_control_capture_intent_t;
8700 
8701 // ACAMERA_CONTROL_EFFECT_MODE
8702 typedef enum acamera_metadata_enum_acamera_control_effect_mode {
8703     /**
8704      * <p>No color effect will be applied.</p>
8705      */
8706     ACAMERA_CONTROL_EFFECT_MODE_OFF                                  = 0,
8707 
8708     /**
8709      * <p>A "monocolor" effect where the image is mapped into
8710      * a single color.</p>
8711      * <p>This will typically be grayscale.</p>
8712      */
8713     ACAMERA_CONTROL_EFFECT_MODE_MONO                                 = 1,
8714 
8715     /**
8716      * <p>A "photo-negative" effect where the image's colors
8717      * are inverted.</p>
8718      */
8719     ACAMERA_CONTROL_EFFECT_MODE_NEGATIVE                             = 2,
8720 
8721     /**
8722      * <p>A "solarisation" effect (Sabattier effect) where the
8723      * image is wholly or partially reversed in
8724      * tone.</p>
8725      */
8726     ACAMERA_CONTROL_EFFECT_MODE_SOLARIZE                             = 3,
8727 
8728     /**
8729      * <p>A "sepia" effect where the image is mapped into warm
8730      * gray, red, and brown tones.</p>
8731      */
8732     ACAMERA_CONTROL_EFFECT_MODE_SEPIA                                = 4,
8733 
8734     /**
8735      * <p>A "posterization" effect where the image uses
8736      * discrete regions of tone rather than a continuous
8737      * gradient of tones.</p>
8738      */
8739     ACAMERA_CONTROL_EFFECT_MODE_POSTERIZE                            = 5,
8740 
8741     /**
8742      * <p>A "whiteboard" effect where the image is typically displayed
8743      * as regions of white, with black or grey details.</p>
8744      */
8745     ACAMERA_CONTROL_EFFECT_MODE_WHITEBOARD                           = 6,
8746 
8747     /**
8748      * <p>A "blackboard" effect where the image is typically displayed
8749      * as regions of black, with white or grey details.</p>
8750      */
8751     ACAMERA_CONTROL_EFFECT_MODE_BLACKBOARD                           = 7,
8752 
8753     /**
8754      * <p>An "aqua" effect where a blue hue is added to the image.</p>
8755      */
8756     ACAMERA_CONTROL_EFFECT_MODE_AQUA                                 = 8,
8757 
8758 } acamera_metadata_enum_android_control_effect_mode_t;
8759 
8760 // ACAMERA_CONTROL_MODE
8761 typedef enum acamera_metadata_enum_acamera_control_mode {
8762     /**
8763      * <p>Full application control of pipeline.</p>
8764      * <p>All control by the device's metering and focusing (3A)
8765      * routines is disabled, and no other settings in
8766      * ACAMERA_CONTROL_* have any effect, except that
8767      * ACAMERA_CONTROL_CAPTURE_INTENT may be used by the camera
8768      * device to select post-processing values for processing
8769      * blocks that do not allow for manual control, or are not
8770      * exposed by the camera API.</p>
8771      * <p>However, the camera device's 3A routines may continue to
8772      * collect statistics and update their internal state so that
8773      * when control is switched to AUTO mode, good control values
8774      * can be immediately applied.</p>
8775      *
8776      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8777      */
8778     ACAMERA_CONTROL_MODE_OFF                                         = 0,
8779 
8780     /**
8781      * <p>Use settings for each individual 3A routine.</p>
8782      * <p>Manual control of capture parameters is disabled. All
8783      * controls in ACAMERA_CONTROL_* besides sceneMode take
8784      * effect.</p>
8785      */
8786     ACAMERA_CONTROL_MODE_AUTO                                        = 1,
8787 
8788     /**
8789      * <p>Use a specific scene mode.</p>
8790      * <p>Enabling this disables control.aeMode, control.awbMode and
8791      * control.afMode controls; the camera device will ignore
8792      * those settings while USE_SCENE_MODE is active (except for
8793      * FACE_PRIORITY scene mode). Other control entries are still active.
8794      * This setting can only be used if scene mode is supported (i.e.
8795      * ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
8796      * contain some modes other than DISABLED).</p>
8797      * <p>For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.</p>
8798      *
8799      * @see ACAMERA_CONTROL_AVAILABLE_SCENE_MODES
8800      */
8801     ACAMERA_CONTROL_MODE_USE_SCENE_MODE                              = 2,
8802 
8803     /**
8804      * <p>Same as OFF mode, except that this capture will not be
8805      * used by camera device background auto-exposure, auto-white balance and
8806      * auto-focus algorithms (3A) to update their statistics.</p>
8807      * <p>Specifically, the 3A routines are locked to the last
8808      * values set from a request with AUTO, OFF, or
8809      * USE_SCENE_MODE, and any statistics or state updates
8810      * collected from manual captures with OFF_KEEP_STATE will be
8811      * discarded by the camera device.</p>
8812      */
8813     ACAMERA_CONTROL_MODE_OFF_KEEP_STATE                              = 3,
8814 
8815     /**
8816      * <p>Use a specific extended scene mode.</p>
8817      * <p>When extended scene mode is on, the camera device may override certain control
8818      * parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
8819      * quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
8820      * are guaranteed.</p>
8821      * <p>This setting can only be used if extended scene mode is supported (i.e.
8822      * android.control.availableExtendedSceneModes
8823      * contains some modes other than DISABLED).</p>
8824      */
8825     ACAMERA_CONTROL_MODE_USE_EXTENDED_SCENE_MODE                     = 4,
8826 
8827 } acamera_metadata_enum_android_control_mode_t;
8828 
8829 // ACAMERA_CONTROL_SCENE_MODE
8830 typedef enum acamera_metadata_enum_acamera_control_scene_mode {
8831     /**
8832      * <p>Indicates that no scene modes are set for a given capture request.</p>
8833      */
8834     ACAMERA_CONTROL_SCENE_MODE_DISABLED                              = 0,
8835 
8836     /**
8837      * <p>If face detection support exists, use face
8838      * detection data for auto-focus, auto-white balance, and
8839      * auto-exposure routines.</p>
8840      * <p>If face detection statistics are disabled
8841      * (i.e. ACAMERA_STATISTICS_FACE_DETECT_MODE is set to OFF),
8842      * this should still operate correctly (but will not return
8843      * face detection statistics to the framework).</p>
8844      * <p>Unlike the other scene modes, ACAMERA_CONTROL_AE_MODE,
8845      * ACAMERA_CONTROL_AWB_MODE, and ACAMERA_CONTROL_AF_MODE
8846      * remain active when FACE_PRIORITY is set.</p>
8847      *
8848      * @see ACAMERA_CONTROL_AE_MODE
8849      * @see ACAMERA_CONTROL_AF_MODE
8850      * @see ACAMERA_CONTROL_AWB_MODE
8851      * @see ACAMERA_STATISTICS_FACE_DETECT_MODE
8852      */
8853     ACAMERA_CONTROL_SCENE_MODE_FACE_PRIORITY                         = 1,
8854 
8855     /**
8856      * <p>Optimized for photos of quickly moving objects.</p>
8857      * <p>Similar to SPORTS.</p>
8858      */
8859     ACAMERA_CONTROL_SCENE_MODE_ACTION                                = 2,
8860 
8861     /**
8862      * <p>Optimized for still photos of people.</p>
8863      */
8864     ACAMERA_CONTROL_SCENE_MODE_PORTRAIT                              = 3,
8865 
8866     /**
8867      * <p>Optimized for photos of distant macroscopic objects.</p>
8868      */
8869     ACAMERA_CONTROL_SCENE_MODE_LANDSCAPE                             = 4,
8870 
8871     /**
8872      * <p>Optimized for low-light settings.</p>
8873      */
8874     ACAMERA_CONTROL_SCENE_MODE_NIGHT                                 = 5,
8875 
8876     /**
8877      * <p>Optimized for still photos of people in low-light
8878      * settings.</p>
8879      */
8880     ACAMERA_CONTROL_SCENE_MODE_NIGHT_PORTRAIT                        = 6,
8881 
8882     /**
8883      * <p>Optimized for dim, indoor settings where flash must
8884      * remain off.</p>
8885      */
8886     ACAMERA_CONTROL_SCENE_MODE_THEATRE                               = 7,
8887 
8888     /**
8889      * <p>Optimized for bright, outdoor beach settings.</p>
8890      */
8891     ACAMERA_CONTROL_SCENE_MODE_BEACH                                 = 8,
8892 
8893     /**
8894      * <p>Optimized for bright, outdoor settings containing snow.</p>
8895      */
8896     ACAMERA_CONTROL_SCENE_MODE_SNOW                                  = 9,
8897 
8898     /**
8899      * <p>Optimized for scenes of the setting sun.</p>
8900      */
8901     ACAMERA_CONTROL_SCENE_MODE_SUNSET                                = 10,
8902 
8903     /**
8904      * <p>Optimized to avoid blurry photos due to small amounts of
8905      * device motion (for example: due to hand shake).</p>
8906      */
8907     ACAMERA_CONTROL_SCENE_MODE_STEADYPHOTO                           = 11,
8908 
8909     /**
8910      * <p>Optimized for nighttime photos of fireworks.</p>
8911      */
8912     ACAMERA_CONTROL_SCENE_MODE_FIREWORKS                             = 12,
8913 
8914     /**
8915      * <p>Optimized for photos of quickly moving people.</p>
8916      * <p>Similar to ACTION.</p>
8917      */
8918     ACAMERA_CONTROL_SCENE_MODE_SPORTS                                = 13,
8919 
8920     /**
8921      * <p>Optimized for dim, indoor settings with multiple moving
8922      * people.</p>
8923      */
8924     ACAMERA_CONTROL_SCENE_MODE_PARTY                                 = 14,
8925 
8926     /**
8927      * <p>Optimized for dim settings where the main light source
8928      * is a candle.</p>
8929      */
8930     ACAMERA_CONTROL_SCENE_MODE_CANDLELIGHT                           = 15,
8931 
8932     /**
8933      * <p>Optimized for accurately capturing a photo of barcode
8934      * for use by camera applications that wish to read the
8935      * barcode value.</p>
8936      */
8937     ACAMERA_CONTROL_SCENE_MODE_BARCODE                               = 16,
8938 
8939     /**
8940      * <p>Turn on a device-specific high dynamic range (HDR) mode.</p>
8941      * <p>In this scene mode, the camera device captures images
8942      * that keep a larger range of scene illumination levels
8943      * visible in the final image. For example, when taking a
8944      * picture of a object in front of a bright window, both
8945      * the object and the scene through the window may be
8946      * visible when using HDR mode, while in normal AUTO mode,
8947      * one or the other may be poorly exposed. As a tradeoff,
8948      * HDR mode generally takes much longer to capture a single
8949      * image, has no user control, and may have other artifacts
8950      * depending on the HDR method used.</p>
8951      * <p>Therefore, HDR captures operate at a much slower rate
8952      * than regular captures.</p>
8953      * <p>In this mode, on LIMITED or FULL devices, when a request
8954      * is made with a ACAMERA_CONTROL_CAPTURE_INTENT of
8955      * STILL_CAPTURE, the camera device will capture an image
8956      * using a high dynamic range capture technique.  On LEGACY
8957      * devices, captures that target a JPEG-format output will
8958      * be captured with HDR, and the capture intent is not
8959      * relevant.</p>
8960      * <p>The HDR capture may involve the device capturing a burst
8961      * of images internally and combining them into one, or it
8962      * may involve the device using specialized high dynamic
8963      * range capture hardware. In all cases, a single image is
8964      * produced in response to a capture request submitted
8965      * while in HDR mode.</p>
8966      * <p>Since substantial post-processing is generally needed to
8967      * produce an HDR image, only YUV, PRIVATE, and JPEG
8968      * outputs are supported for LIMITED/FULL device HDR
8969      * captures, and only JPEG outputs are supported for LEGACY
8970      * HDR captures. Using a RAW output for HDR capture is not
8971      * supported.</p>
8972      * <p>Some devices may also support always-on HDR, which
8973      * applies HDR processing at full frame rate.  For these
8974      * devices, intents other than STILL_CAPTURE will also
8975      * produce an HDR output with no frame rate impact compared
8976      * to normal operation, though the quality may be lower
8977      * than for STILL_CAPTURE intents.</p>
8978      * <p>If SCENE_MODE_HDR is used with unsupported output types
8979      * or capture intents, the images captured will be as if
8980      * the SCENE_MODE was not enabled at all.</p>
8981      *
8982      * @see ACAMERA_CONTROL_CAPTURE_INTENT
8983      */
8984     ACAMERA_CONTROL_SCENE_MODE_HDR                                   = 18,
8985 
8986 } acamera_metadata_enum_android_control_scene_mode_t;
8987 
8988 // ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE
8989 typedef enum acamera_metadata_enum_acamera_control_video_stabilization_mode {
8990     /**
8991      * <p>Video stabilization is disabled.</p>
8992      */
8993     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_OFF                     = 0,
8994 
8995     /**
8996      * <p>Video stabilization is enabled.</p>
8997      */
8998     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_ON                      = 1,
8999 
9000     /**
9001      * <p>Preview stabilization, where the preview in addition to all other non-RAW streams are
9002      * stabilized with the same quality of stabilization, is enabled. This mode aims to give
9003      * clients a 'what you see is what you get' effect. In this mode, the FoV reduction will
9004      * be a maximum of 20 % both horizontally and vertically
9005      * (10% from left, right, top, bottom) for the given zoom ratio / crop region.
9006      * The resultant FoV will also be the same across all processed streams
9007      * (that have the same aspect ratio).</p>
9008      */
9009     ACAMERA_CONTROL_VIDEO_STABILIZATION_MODE_PREVIEW_STABILIZATION   = 2,
9010 
9011 } acamera_metadata_enum_android_control_video_stabilization_mode_t;
9012 
9013 // ACAMERA_CONTROL_AE_STATE
9014 typedef enum acamera_metadata_enum_acamera_control_ae_state {
9015     /**
9016      * <p>AE is off or recently reset.</p>
9017      * <p>When a camera device is opened, it starts in
9018      * this state. This is a transient state, the camera device may skip reporting
9019      * this state in capture result.</p>
9020      */
9021     ACAMERA_CONTROL_AE_STATE_INACTIVE                                = 0,
9022 
9023     /**
9024      * <p>AE doesn't yet have a good set of control values
9025      * for the current scene.</p>
9026      * <p>This is a transient state, the camera device may skip
9027      * reporting this state in capture result.</p>
9028      */
9029     ACAMERA_CONTROL_AE_STATE_SEARCHING                               = 1,
9030 
9031     /**
9032      * <p>AE has a good set of control values for the
9033      * current scene.</p>
9034      */
9035     ACAMERA_CONTROL_AE_STATE_CONVERGED                               = 2,
9036 
9037     /**
9038      * <p>AE has been locked.</p>
9039      */
9040     ACAMERA_CONTROL_AE_STATE_LOCKED                                  = 3,
9041 
9042     /**
9043      * <p>AE has a good set of control values, but flash
9044      * needs to be fired for good quality still
9045      * capture.</p>
9046      */
9047     ACAMERA_CONTROL_AE_STATE_FLASH_REQUIRED                          = 4,
9048 
9049     /**
9050      * <p>AE has been asked to do a precapture sequence
9051      * and is currently executing it.</p>
9052      * <p>Precapture can be triggered through setting
9053      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to START. Currently
9054      * active and completed (if it causes camera device internal AE lock) precapture
9055      * metering sequence can be canceled through setting
9056      * ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER to CANCEL.</p>
9057      * <p>Once PRECAPTURE completes, AE will transition to CONVERGED
9058      * or FLASH_REQUIRED as appropriate. This is a transient
9059      * state, the camera device may skip reporting this state in
9060      * capture result.</p>
9061      *
9062      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
9063      */
9064     ACAMERA_CONTROL_AE_STATE_PRECAPTURE                              = 5,
9065 
9066 } acamera_metadata_enum_android_control_ae_state_t;
9067 
9068 // ACAMERA_CONTROL_AF_STATE
9069 typedef enum acamera_metadata_enum_acamera_control_af_state {
9070     /**
9071      * <p>AF is off or has not yet tried to scan/been asked
9072      * to scan.</p>
9073      * <p>When a camera device is opened, it starts in this
9074      * state. This is a transient state, the camera device may
9075      * skip reporting this state in capture
9076      * result.</p>
9077      */
9078     ACAMERA_CONTROL_AF_STATE_INACTIVE                                = 0,
9079 
9080     /**
9081      * <p>AF is currently performing an AF scan initiated the
9082      * camera device in a continuous autofocus mode.</p>
9083      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
9084      * state, the camera device may skip reporting this state in
9085      * capture result.</p>
9086      */
9087     ACAMERA_CONTROL_AF_STATE_PASSIVE_SCAN                            = 1,
9088 
9089     /**
9090      * <p>AF currently believes it is in focus, but may
9091      * restart scanning at any time.</p>
9092      * <p>Only used by CONTINUOUS_* AF modes. This is a transient
9093      * state, the camera device may skip reporting this state in
9094      * capture result.</p>
9095      */
9096     ACAMERA_CONTROL_AF_STATE_PASSIVE_FOCUSED                         = 2,
9097 
9098     /**
9099      * <p>AF is performing an AF scan because it was
9100      * triggered by AF trigger.</p>
9101      * <p>Only used by AUTO or MACRO AF modes. This is a transient
9102      * state, the camera device may skip reporting this state in
9103      * capture result.</p>
9104      */
9105     ACAMERA_CONTROL_AF_STATE_ACTIVE_SCAN                             = 3,
9106 
9107     /**
9108      * <p>AF believes it is focused correctly and has locked
9109      * focus.</p>
9110      * <p>This state is reached only after an explicit START AF trigger has been
9111      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus has been obtained.</p>
9112      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
9113      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
9114      *
9115      * @see ACAMERA_CONTROL_AF_MODE
9116      * @see ACAMERA_CONTROL_AF_TRIGGER
9117      */
9118     ACAMERA_CONTROL_AF_STATE_FOCUSED_LOCKED                          = 4,
9119 
9120     /**
9121      * <p>AF has failed to focus successfully and has locked
9122      * focus.</p>
9123      * <p>This state is reached only after an explicit START AF trigger has been
9124      * sent (ACAMERA_CONTROL_AF_TRIGGER), when good focus cannot be obtained.</p>
9125      * <p>The lens will remain stationary until the AF mode (ACAMERA_CONTROL_AF_MODE) is changed or
9126      * a new AF trigger is sent to the camera device (ACAMERA_CONTROL_AF_TRIGGER).</p>
9127      *
9128      * @see ACAMERA_CONTROL_AF_MODE
9129      * @see ACAMERA_CONTROL_AF_TRIGGER
9130      */
9131     ACAMERA_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED                      = 5,
9132 
9133     /**
9134      * <p>AF finished a passive scan without finding focus,
9135      * and may restart scanning at any time.</p>
9136      * <p>Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
9137      * device may skip reporting this state in capture result.</p>
9138      * <p>LEGACY camera devices do not support this state. When a passive
9139      * scan has finished, it will always go to PASSIVE_FOCUSED.</p>
9140      */
9141     ACAMERA_CONTROL_AF_STATE_PASSIVE_UNFOCUSED                       = 6,
9142 
9143 } acamera_metadata_enum_android_control_af_state_t;
9144 
9145 // ACAMERA_CONTROL_AWB_STATE
9146 typedef enum acamera_metadata_enum_acamera_control_awb_state {
9147     /**
9148      * <p>AWB is not in auto mode, or has not yet started metering.</p>
9149      * <p>When a camera device is opened, it starts in this
9150      * state. This is a transient state, the camera device may
9151      * skip reporting this state in capture
9152      * result.</p>
9153      */
9154     ACAMERA_CONTROL_AWB_STATE_INACTIVE                               = 0,
9155 
9156     /**
9157      * <p>AWB doesn't yet have a good set of control
9158      * values for the current scene.</p>
9159      * <p>This is a transient state, the camera device
9160      * may skip reporting this state in capture result.</p>
9161      */
9162     ACAMERA_CONTROL_AWB_STATE_SEARCHING                              = 1,
9163 
9164     /**
9165      * <p>AWB has a good set of control values for the
9166      * current scene.</p>
9167      */
9168     ACAMERA_CONTROL_AWB_STATE_CONVERGED                              = 2,
9169 
9170     /**
9171      * <p>AWB has been locked.</p>
9172      */
9173     ACAMERA_CONTROL_AWB_STATE_LOCKED                                 = 3,
9174 
9175 } acamera_metadata_enum_android_control_awb_state_t;
9176 
9177 // ACAMERA_CONTROL_AE_LOCK_AVAILABLE
9178 typedef enum acamera_metadata_enum_acamera_control_ae_lock_available {
9179     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_FALSE                          = 0,
9180 
9181     ACAMERA_CONTROL_AE_LOCK_AVAILABLE_TRUE                           = 1,
9182 
9183 } acamera_metadata_enum_android_control_ae_lock_available_t;
9184 
9185 // ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
9186 typedef enum acamera_metadata_enum_acamera_control_awb_lock_available {
9187     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_FALSE                         = 0,
9188 
9189     ACAMERA_CONTROL_AWB_LOCK_AVAILABLE_TRUE                          = 1,
9190 
9191 } acamera_metadata_enum_android_control_awb_lock_available_t;
9192 
9193 // ACAMERA_CONTROL_ENABLE_ZSL
9194 typedef enum acamera_metadata_enum_acamera_control_enable_zsl {
9195     /**
9196      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE must be captured
9197      * after previous requests.</p>
9198      *
9199      * @see ACAMERA_CONTROL_CAPTURE_INTENT
9200      */
9201     ACAMERA_CONTROL_ENABLE_ZSL_FALSE                                 = 0,
9202 
9203     /**
9204      * <p>Requests with ACAMERA_CONTROL_CAPTURE_INTENT == STILL_CAPTURE may or may not be
9205      * captured before previous requests.</p>
9206      *
9207      * @see ACAMERA_CONTROL_CAPTURE_INTENT
9208      */
9209     ACAMERA_CONTROL_ENABLE_ZSL_TRUE                                  = 1,
9210 
9211 } acamera_metadata_enum_android_control_enable_zsl_t;
9212 
9213 // ACAMERA_CONTROL_AF_SCENE_CHANGE
9214 typedef enum acamera_metadata_enum_acamera_control_af_scene_change {
9215     /**
9216      * <p>Scene change is not detected within the AF region(s).</p>
9217      */
9218     ACAMERA_CONTROL_AF_SCENE_CHANGE_NOT_DETECTED                     = 0,
9219 
9220     /**
9221      * <p>Scene change is detected within the AF region(s).</p>
9222      */
9223     ACAMERA_CONTROL_AF_SCENE_CHANGE_DETECTED                         = 1,
9224 
9225 } acamera_metadata_enum_android_control_af_scene_change_t;
9226 
9227 // ACAMERA_CONTROL_EXTENDED_SCENE_MODE
9228 typedef enum acamera_metadata_enum_acamera_control_extended_scene_mode {
9229     /**
9230      * <p>Extended scene mode is disabled.</p>
9231      */
9232     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_DISABLED                     = 0,
9233 
9234     /**
9235      * <p>High quality bokeh mode is enabled for all non-raw streams (including YUV,
9236      * JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
9237      * extra image processing, this mode may introduce additional stall to non-raw streams.
9238      * This mode should be used in high quality still capture use case.</p>
9239      */
9240     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_STILL_CAPTURE          = 1,
9241 
9242     /**
9243      * <p>Bokeh effect must not slow down capture rate relative to sensor raw output,
9244      * and the effect is applied to all processed streams no larger than the maximum
9245      * streaming dimension. This mode should be used if performance and power are a
9246      * priority, such as video recording.</p>
9247      */
9248     ACAMERA_CONTROL_EXTENDED_SCENE_MODE_BOKEH_CONTINUOUS             = 2,
9249 
9250 } acamera_metadata_enum_android_control_extended_scene_mode_t;
9251 
9252 // ACAMERA_CONTROL_SETTINGS_OVERRIDE
9253 typedef enum acamera_metadata_enum_acamera_control_settings_override {
9254     /**
9255      * <p>No keys are applied sooner than the other keys when applying CaptureRequest
9256      * settings to the camera device. This is the default value.</p>
9257      */
9258     ACAMERA_CONTROL_SETTINGS_OVERRIDE_OFF                            = 0,
9259 
9260     /**
9261      * <p>Zoom related keys are applied sooner than the other keys in the CaptureRequest. The
9262      * zoom related keys are:</p>
9263      * <ul>
9264      * <li>ACAMERA_CONTROL_ZOOM_RATIO</li>
9265      * <li>ACAMERA_SCALER_CROP_REGION</li>
9266      * <li>ACAMERA_CONTROL_AE_REGIONS</li>
9267      * <li>ACAMERA_CONTROL_AWB_REGIONS</li>
9268      * <li>ACAMERA_CONTROL_AF_REGIONS</li>
9269      * </ul>
9270      * <p>Even though ACAMERA_CONTROL_AE_REGIONS, ACAMERA_CONTROL_AWB_REGIONS,
9271      * and ACAMERA_CONTROL_AF_REGIONS are not directly zoom related, applications
9272      * typically scale these regions together with ACAMERA_SCALER_CROP_REGION to have a
9273      * consistent mapping within the current field of view. In this aspect, they are
9274      * related to ACAMERA_SCALER_CROP_REGION and ACAMERA_CONTROL_ZOOM_RATIO.</p>
9275      *
9276      * @see ACAMERA_CONTROL_AE_REGIONS
9277      * @see ACAMERA_CONTROL_AF_REGIONS
9278      * @see ACAMERA_CONTROL_AWB_REGIONS
9279      * @see ACAMERA_CONTROL_ZOOM_RATIO
9280      * @see ACAMERA_SCALER_CROP_REGION
9281      */
9282     ACAMERA_CONTROL_SETTINGS_OVERRIDE_ZOOM                           = 1,
9283 
9284 } acamera_metadata_enum_android_control_settings_override_t;
9285 
9286 // ACAMERA_CONTROL_AUTOFRAMING
9287 typedef enum acamera_metadata_enum_acamera_control_autoframing {
9288     /**
9289      * <p>Disable autoframing.</p>
9290      */
9291     ACAMERA_CONTROL_AUTOFRAMING_OFF                                  = 0,
9292 
9293     /**
9294      * <p>Enable autoframing to keep people in the frame's field of view.</p>
9295      */
9296     ACAMERA_CONTROL_AUTOFRAMING_ON                                   = 1,
9297 
9298 } acamera_metadata_enum_android_control_autoframing_t;
9299 
9300 // ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE
9301 typedef enum acamera_metadata_enum_acamera_control_autoframing_available {
9302     ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE_FALSE                      = 0,
9303 
9304     ACAMERA_CONTROL_AUTOFRAMING_AVAILABLE_TRUE                       = 1,
9305 
9306 } acamera_metadata_enum_android_control_autoframing_available_t;
9307 
9308 // ACAMERA_CONTROL_AUTOFRAMING_STATE
9309 typedef enum acamera_metadata_enum_acamera_control_autoframing_state {
9310     /**
9311      * <p>Auto-framing is inactive.</p>
9312      */
9313     ACAMERA_CONTROL_AUTOFRAMING_STATE_INACTIVE                       = 0,
9314 
9315     /**
9316      * <p>Auto-framing is in process - either zooming in, zooming out or pan is taking place.</p>
9317      */
9318     ACAMERA_CONTROL_AUTOFRAMING_STATE_FRAMING                        = 1,
9319 
9320     /**
9321      * <p>Auto-framing has reached a stable state (frame/fov is not being adjusted). The state
9322      * may transition back to FRAMING if the scene changes.</p>
9323      */
9324     ACAMERA_CONTROL_AUTOFRAMING_STATE_CONVERGED                      = 2,
9325 
9326 } acamera_metadata_enum_android_control_autoframing_state_t;
9327 
9328 // ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE
9329 typedef enum acamera_metadata_enum_acamera_control_low_light_boost_state {
9330     /**
9331      * <p>The AE mode 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY' is enabled but not applied.</p>
9332      */
9333     ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE_INACTIVE                   = 0,
9334 
9335     /**
9336      * <p>The AE mode 'ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY' is enabled and applied.</p>
9337      */
9338     ACAMERA_CONTROL_LOW_LIGHT_BOOST_STATE_ACTIVE                     = 1,
9339 
9340 } acamera_metadata_enum_android_control_low_light_boost_state_t;
9341 
9342 
9343 
9344 // ACAMERA_EDGE_MODE
9345 typedef enum acamera_metadata_enum_acamera_edge_mode {
9346     /**
9347      * <p>No edge enhancement is applied.</p>
9348      */
9349     ACAMERA_EDGE_MODE_OFF                                            = 0,
9350 
9351     /**
9352      * <p>Apply edge enhancement at a quality level that does not slow down frame rate
9353      * relative to sensor output. It may be the same as OFF if edge enhancement will
9354      * slow down frame rate relative to sensor.</p>
9355      */
9356     ACAMERA_EDGE_MODE_FAST                                           = 1,
9357 
9358     /**
9359      * <p>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.</p>
9360      */
9361     ACAMERA_EDGE_MODE_HIGH_QUALITY                                   = 2,
9362 
9363     /**
9364      * <p>Edge enhancement is applied at different
9365      * levels for different output streams, based on resolution. Streams at maximum recording
9366      * resolution (see {@link ACameraDevice_createCaptureSession })
9367      * or below have edge enhancement applied, while higher-resolution streams have no edge
9368      * enhancement applied. The level of edge enhancement for low-resolution streams is tuned
9369      * so that frame rate is not impacted, and the quality is equal to or better than FAST
9370      * (since it is only applied to lower-resolution outputs, quality may improve from FAST).</p>
9371      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
9372      * with YUV or PRIVATE reprocessing, where the application continuously captures
9373      * high-resolution intermediate buffers into a circular buffer, from which a final image is
9374      * produced via reprocessing when a user takes a picture.  For such a use case, the
9375      * high-resolution buffers must not have edge enhancement applied to maximize efficiency of
9376      * preview and to avoid double-applying enhancement when reprocessed, while low-resolution
9377      * buffers (used for recording or preview, generally) need edge enhancement applied for
9378      * reasonable preview quality.</p>
9379      * <p>This mode is guaranteed to be supported by devices that support either the
9380      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
9381      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
9382      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
9383      *
9384      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9385      */
9386     ACAMERA_EDGE_MODE_ZERO_SHUTTER_LAG                               = 3,
9387 
9388 } acamera_metadata_enum_android_edge_mode_t;
9389 
9390 
9391 // ACAMERA_FLASH_MODE
9392 typedef enum acamera_metadata_enum_acamera_flash_mode {
9393     /**
9394      * <p>Do not fire the flash for this capture.</p>
9395      */
9396     ACAMERA_FLASH_MODE_OFF                                           = 0,
9397 
9398     /**
9399      * <p>If the flash is available and charged, fire flash
9400      * for this capture.</p>
9401      */
9402     ACAMERA_FLASH_MODE_SINGLE                                        = 1,
9403 
9404     /**
9405      * <p>Transition flash to continuously on.</p>
9406      */
9407     ACAMERA_FLASH_MODE_TORCH                                         = 2,
9408 
9409 } acamera_metadata_enum_android_flash_mode_t;
9410 
9411 // ACAMERA_FLASH_STATE
9412 typedef enum acamera_metadata_enum_acamera_flash_state {
9413     /**
9414      * <p>No flash on camera.</p>
9415      */
9416     ACAMERA_FLASH_STATE_UNAVAILABLE                                  = 0,
9417 
9418     /**
9419      * <p>Flash is charging and cannot be fired.</p>
9420      */
9421     ACAMERA_FLASH_STATE_CHARGING                                     = 1,
9422 
9423     /**
9424      * <p>Flash is ready to fire.</p>
9425      */
9426     ACAMERA_FLASH_STATE_READY                                        = 2,
9427 
9428     /**
9429      * <p>Flash fired for this capture.</p>
9430      */
9431     ACAMERA_FLASH_STATE_FIRED                                        = 3,
9432 
9433     /**
9434      * <p>Flash partially illuminated this frame.</p>
9435      * <p>This is usually due to the next or previous frame having
9436      * the flash fire, and the flash spilling into this capture
9437      * due to hardware limitations.</p>
9438      */
9439     ACAMERA_FLASH_STATE_PARTIAL                                      = 4,
9440 
9441 } acamera_metadata_enum_android_flash_state_t;
9442 
9443 
9444 // ACAMERA_FLASH_INFO_AVAILABLE
9445 typedef enum acamera_metadata_enum_acamera_flash_info_available {
9446     ACAMERA_FLASH_INFO_AVAILABLE_FALSE                               = 0,
9447 
9448     ACAMERA_FLASH_INFO_AVAILABLE_TRUE                                = 1,
9449 
9450 } acamera_metadata_enum_android_flash_info_available_t;
9451 
9452 
9453 // ACAMERA_HOT_PIXEL_MODE
9454 typedef enum acamera_metadata_enum_acamera_hot_pixel_mode {
9455     /**
9456      * <p>No hot pixel correction is applied.</p>
9457      * <p>The frame rate must not be reduced relative to sensor raw output
9458      * for this option.</p>
9459      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
9460      *
9461      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
9462      */
9463     ACAMERA_HOT_PIXEL_MODE_OFF                                       = 0,
9464 
9465     /**
9466      * <p>Hot pixel correction is applied, without reducing frame
9467      * rate relative to sensor raw output.</p>
9468      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
9469      *
9470      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
9471      */
9472     ACAMERA_HOT_PIXEL_MODE_FAST                                      = 1,
9473 
9474     /**
9475      * <p>High-quality hot pixel correction is applied, at a cost
9476      * of possibly reduced frame rate relative to sensor raw output.</p>
9477      * <p>The hotpixel map may be returned in ACAMERA_STATISTICS_HOT_PIXEL_MAP.</p>
9478      *
9479      * @see ACAMERA_STATISTICS_HOT_PIXEL_MAP
9480      */
9481     ACAMERA_HOT_PIXEL_MODE_HIGH_QUALITY                              = 2,
9482 
9483 } acamera_metadata_enum_android_hot_pixel_mode_t;
9484 
9485 
9486 
9487 // ACAMERA_LENS_OPTICAL_STABILIZATION_MODE
9488 typedef enum acamera_metadata_enum_acamera_lens_optical_stabilization_mode {
9489     /**
9490      * <p>Optical stabilization is unavailable.</p>
9491      */
9492     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_OFF                      = 0,
9493 
9494     /**
9495      * <p>Optical stabilization is enabled.</p>
9496      */
9497     ACAMERA_LENS_OPTICAL_STABILIZATION_MODE_ON                       = 1,
9498 
9499 } acamera_metadata_enum_android_lens_optical_stabilization_mode_t;
9500 
9501 // ACAMERA_LENS_FACING
9502 typedef enum acamera_metadata_enum_acamera_lens_facing {
9503     /**
9504      * <p>The camera device faces the same direction as the device's screen.</p>
9505      */
9506     ACAMERA_LENS_FACING_FRONT                                        = 0,
9507 
9508     /**
9509      * <p>The camera device faces the opposite direction as the device's screen.</p>
9510      */
9511     ACAMERA_LENS_FACING_BACK                                         = 1,
9512 
9513     /**
9514      * <p>The camera device is an external camera, and has no fixed facing relative to the
9515      * device's screen.</p>
9516      */
9517     ACAMERA_LENS_FACING_EXTERNAL                                     = 2,
9518 
9519 } acamera_metadata_enum_android_lens_facing_t;
9520 
9521 // ACAMERA_LENS_STATE
9522 typedef enum acamera_metadata_enum_acamera_lens_state {
9523     /**
9524      * <p>The lens parameters (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
9525      * ACAMERA_LENS_FILTER_DENSITY and ACAMERA_LENS_APERTURE) are not changing.</p>
9526      *
9527      * @see ACAMERA_LENS_APERTURE
9528      * @see ACAMERA_LENS_FILTER_DENSITY
9529      * @see ACAMERA_LENS_FOCAL_LENGTH
9530      * @see ACAMERA_LENS_FOCUS_DISTANCE
9531      */
9532     ACAMERA_LENS_STATE_STATIONARY                                    = 0,
9533 
9534     /**
9535      * <p>One or several of the lens parameters
9536      * (ACAMERA_LENS_FOCAL_LENGTH, ACAMERA_LENS_FOCUS_DISTANCE,
9537      * ACAMERA_LENS_FILTER_DENSITY or ACAMERA_LENS_APERTURE) is
9538      * currently changing.</p>
9539      *
9540      * @see ACAMERA_LENS_APERTURE
9541      * @see ACAMERA_LENS_FILTER_DENSITY
9542      * @see ACAMERA_LENS_FOCAL_LENGTH
9543      * @see ACAMERA_LENS_FOCUS_DISTANCE
9544      */
9545     ACAMERA_LENS_STATE_MOVING                                        = 1,
9546 
9547 } acamera_metadata_enum_android_lens_state_t;
9548 
9549 // ACAMERA_LENS_POSE_REFERENCE
9550 typedef enum acamera_metadata_enum_acamera_lens_pose_reference {
9551     /**
9552      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the optical center of
9553      * the largest camera device facing the same direction as this camera.</p>
9554      * <p>This is the default value for API levels before Android P.</p>
9555      *
9556      * @see ACAMERA_LENS_POSE_TRANSLATION
9557      */
9558     ACAMERA_LENS_POSE_REFERENCE_PRIMARY_CAMERA                       = 0,
9559 
9560     /**
9561      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the position of the
9562      * primary gyroscope of this Android device.</p>
9563      *
9564      * @see ACAMERA_LENS_POSE_TRANSLATION
9565      */
9566     ACAMERA_LENS_POSE_REFERENCE_GYROSCOPE                            = 1,
9567 
9568     /**
9569      * <p>The camera device cannot represent the values of ACAMERA_LENS_POSE_TRANSLATION
9570      * and ACAMERA_LENS_POSE_ROTATION accurately enough. One such example is a camera device
9571      * on the cover of a foldable phone: in order to measure the pose translation and rotation,
9572      * some kind of hinge position sensor would be needed.</p>
9573      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION must be all zeros, and
9574      * ACAMERA_LENS_POSE_ROTATION must be values matching its default facing.</p>
9575      *
9576      * @see ACAMERA_LENS_POSE_ROTATION
9577      * @see ACAMERA_LENS_POSE_TRANSLATION
9578      */
9579     ACAMERA_LENS_POSE_REFERENCE_UNDEFINED                            = 2,
9580 
9581     /**
9582      * <p>The value of ACAMERA_LENS_POSE_TRANSLATION is relative to the origin of the
9583      * automotive sensor coordinate system, which is at the center of the rear axle.</p>
9584      *
9585      * @see ACAMERA_LENS_POSE_TRANSLATION
9586      */
9587     ACAMERA_LENS_POSE_REFERENCE_AUTOMOTIVE                           = 3,
9588 
9589 } acamera_metadata_enum_android_lens_pose_reference_t;
9590 
9591 
9592 // ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
9593 typedef enum acamera_metadata_enum_acamera_lens_info_focus_distance_calibration {
9594     /**
9595      * <p>The lens focus distance is not accurate, and the units used for
9596      * ACAMERA_LENS_FOCUS_DISTANCE do not correspond to any physical units.</p>
9597      * <p>Setting the lens to the same focus distance on separate occasions may
9598      * result in a different real focus distance, depending on factors such
9599      * as the orientation of the device, the age of the focusing mechanism,
9600      * and the device temperature. The focus distance value will still be
9601      * in the range of <code>[0, ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE]</code>, where 0
9602      * represents the farthest focus.</p>
9603      *
9604      * @see ACAMERA_LENS_FOCUS_DISTANCE
9605      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
9606      */
9607     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED        = 0,
9608 
9609     /**
9610      * <p>The lens focus distance is measured in diopters.</p>
9611      * <p>However, setting the lens to the same focus distance
9612      * on separate occasions may result in a different real
9613      * focus distance, depending on factors such as the
9614      * orientation of the device, the age of the focusing
9615      * mechanism, and the device temperature.</p>
9616      */
9617     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE         = 1,
9618 
9619     /**
9620      * <p>The lens focus distance is measured in diopters, and
9621      * is calibrated.</p>
9622      * <p>The lens mechanism is calibrated so that setting the
9623      * same focus distance is repeatable on multiple
9624      * occasions with good accuracy, and the focus distance
9625      * corresponds to the real physical distance to the plane
9626      * of best focus.</p>
9627      */
9628     ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED          = 2,
9629 
9630 } acamera_metadata_enum_android_lens_info_focus_distance_calibration_t;
9631 
9632 
9633 // ACAMERA_NOISE_REDUCTION_MODE
9634 typedef enum acamera_metadata_enum_acamera_noise_reduction_mode {
9635     /**
9636      * <p>No noise reduction is applied.</p>
9637      */
9638     ACAMERA_NOISE_REDUCTION_MODE_OFF                                 = 0,
9639 
9640     /**
9641      * <p>Noise reduction is applied without reducing frame rate relative to sensor
9642      * output. It may be the same as OFF if noise reduction will reduce frame rate
9643      * relative to sensor.</p>
9644      */
9645     ACAMERA_NOISE_REDUCTION_MODE_FAST                                = 1,
9646 
9647     /**
9648      * <p>High-quality noise reduction is applied, at the cost of possibly reduced frame
9649      * rate relative to sensor output.</p>
9650      */
9651     ACAMERA_NOISE_REDUCTION_MODE_HIGH_QUALITY                        = 2,
9652 
9653     /**
9654      * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
9655      * sensor output. </p>
9656      */
9657     ACAMERA_NOISE_REDUCTION_MODE_MINIMAL                             = 3,
9658 
9659     /**
9660      * <p>Noise reduction is applied at different levels for different output streams,
9661      * based on resolution. Streams at maximum recording resolution (see {@link ACameraDevice_createCaptureSession })
9662      * or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
9663      * supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
9664      * noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
9665      * and the quality is equal to or better than FAST (since it is only applied to
9666      * lower-resolution outputs, quality may improve from FAST).</p>
9667      * <p>This mode is intended to be used by applications operating in a zero-shutter-lag mode
9668      * with YUV or PRIVATE reprocessing, where the application continuously captures
9669      * high-resolution intermediate buffers into a circular buffer, from which a final image is
9670      * produced via reprocessing when a user takes a picture.  For such a use case, the
9671      * high-resolution buffers must not have noise reduction applied to maximize efficiency of
9672      * preview and to avoid over-applying noise filtering when reprocessing, while
9673      * low-resolution buffers (used for recording or preview, generally) need noise reduction
9674      * applied for reasonable preview quality.</p>
9675      * <p>This mode is guaranteed to be supported by devices that support either the
9676      * YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
9677      * (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES lists either of those capabilities) and it will
9678      * be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
9679      *
9680      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9681      */
9682     ACAMERA_NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG                    = 4,
9683 
9684 } acamera_metadata_enum_android_noise_reduction_mode_t;
9685 
9686 
9687 
9688 // ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
9689 typedef enum acamera_metadata_enum_acamera_request_available_capabilities {
9690     /**
9691      * <p>The minimal set of capabilities that every camera
9692      * device (regardless of ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL)
9693      * supports.</p>
9694      * <p>This capability is listed by all normal devices, and
9695      * indicates that the camera device has a feature set
9696      * that's comparable to the baseline requirements for the
9697      * older android.hardware.Camera API.</p>
9698      * <p>Devices with the DEPTH_OUTPUT capability might not list this
9699      * capability, indicating that they support only depth measurement,
9700      * not standard color output.</p>
9701      *
9702      * @see ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
9703      */
9704     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE       = 0,
9705 
9706     /**
9707      * <p>The camera device can be manually controlled (3A algorithms such
9708      * as auto-exposure, and auto-focus can be bypassed).
9709      * The camera device supports basic manual control of the sensor image
9710      * acquisition related stages. This means the following controls are
9711      * guaranteed to be supported:</p>
9712      * <ul>
9713      * <li>Manual frame duration control<ul>
9714      * <li>ACAMERA_SENSOR_FRAME_DURATION</li>
9715      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
9716      * </ul>
9717      * </li>
9718      * <li>Manual exposure control<ul>
9719      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
9720      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
9721      * </ul>
9722      * </li>
9723      * <li>Manual sensitivity control<ul>
9724      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
9725      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
9726      * </ul>
9727      * </li>
9728      * <li>Manual lens control (if the lens is adjustable)<ul>
9729      * <li>ACAMERA_LENS_*</li>
9730      * </ul>
9731      * </li>
9732      * <li>Manual flash control (if a flash unit is present)<ul>
9733      * <li>ACAMERA_FLASH_*</li>
9734      * </ul>
9735      * </li>
9736      * <li>Manual black level locking<ul>
9737      * <li>ACAMERA_BLACK_LEVEL_LOCK</li>
9738      * </ul>
9739      * </li>
9740      * <li>Auto exposure lock<ul>
9741      * <li>ACAMERA_CONTROL_AE_LOCK</li>
9742      * </ul>
9743      * </li>
9744      * </ul>
9745      * <p>If any of the above 3A algorithms are enabled, then the camera
9746      * device will accurately report the values applied by 3A in the
9747      * result.</p>
9748      * <p>A given camera device may also support additional manual sensor controls,
9749      * but this capability only covers the above list of controls.</p>
9750      * <p>If this is supported, android.scaler.streamConfigurationMap will
9751      * additionally return a min frame duration that is greater than
9752      * zero for each supported size-format combination.</p>
9753      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
9754      * physical camera switches, exposureTime, sensitivity, and lens properties may change
9755      * even if AE/AF is locked. However, the overall auto exposure and auto focus experience
9756      * for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
9757      *
9758      * @see ACAMERA_BLACK_LEVEL_LOCK
9759      * @see ACAMERA_CONTROL_AE_LOCK
9760      * @see ACAMERA_SENSOR_EXPOSURE_TIME
9761      * @see ACAMERA_SENSOR_FRAME_DURATION
9762      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
9763      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
9764      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
9765      * @see ACAMERA_SENSOR_SENSITIVITY
9766      */
9767     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR             = 1,
9768 
9769     /**
9770      * <p>The camera device post-processing stages can be manually controlled.
9771      * The camera device supports basic manual control of the image post-processing
9772      * stages. This means the following controls are guaranteed to be supported:</p>
9773      * <ul>
9774      * <li>
9775      * <p>Manual tonemap control</p>
9776      * <ul>
9777      * <li>android.tonemap.curve</li>
9778      * <li>ACAMERA_TONEMAP_MODE</li>
9779      * <li>ACAMERA_TONEMAP_MAX_CURVE_POINTS</li>
9780      * <li>ACAMERA_TONEMAP_GAMMA</li>
9781      * <li>ACAMERA_TONEMAP_PRESET_CURVE</li>
9782      * </ul>
9783      * </li>
9784      * <li>
9785      * <p>Manual white balance control</p>
9786      * <ul>
9787      * <li>ACAMERA_COLOR_CORRECTION_TRANSFORM</li>
9788      * <li>ACAMERA_COLOR_CORRECTION_GAINS</li>
9789      * </ul>
9790      * </li>
9791      * <li>Manual lens shading map control<ul>
9792      * <li>ACAMERA_SHADING_MODE</li>
9793      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE</li>
9794      * <li>ACAMERA_STATISTICS_LENS_SHADING_MAP</li>
9795      * <li>ACAMERA_LENS_INFO_SHADING_MAP_SIZE</li>
9796      * </ul>
9797      * </li>
9798      * <li>Manual aberration correction control (if aberration correction is supported)<ul>
9799      * <li>ACAMERA_COLOR_CORRECTION_ABERRATION_MODE</li>
9800      * <li>ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES</li>
9801      * </ul>
9802      * </li>
9803      * <li>Auto white balance lock<ul>
9804      * <li>ACAMERA_CONTROL_AWB_LOCK</li>
9805      * </ul>
9806      * </li>
9807      * </ul>
9808      * <p>If auto white balance is enabled, then the camera device
9809      * will accurately report the values applied by AWB in the result.</p>
9810      * <p>A given camera device may also support additional post-processing
9811      * controls, but this capability only covers the above list of controls.</p>
9812      * <p>For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
9813      * physical camera switches, tonemap, white balance, and shading map may change even if
9814      * awb is locked. However, the overall post-processing experience for users will be
9815      * consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.</p>
9816      *
9817      * @see ACAMERA_COLOR_CORRECTION_ABERRATION_MODE
9818      * @see ACAMERA_COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
9819      * @see ACAMERA_COLOR_CORRECTION_GAINS
9820      * @see ACAMERA_COLOR_CORRECTION_TRANSFORM
9821      * @see ACAMERA_CONTROL_AWB_LOCK
9822      * @see ACAMERA_LENS_INFO_SHADING_MAP_SIZE
9823      * @see ACAMERA_SHADING_MODE
9824      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP
9825      * @see ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
9826      * @see ACAMERA_TONEMAP_GAMMA
9827      * @see ACAMERA_TONEMAP_MAX_CURVE_POINTS
9828      * @see ACAMERA_TONEMAP_MODE
9829      * @see ACAMERA_TONEMAP_PRESET_CURVE
9830      */
9831     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING    = 2,
9832 
9833     /**
9834      * <p>The camera device supports outputting RAW buffers and
9835      * metadata for interpreting them.</p>
9836      * <p>Devices supporting the RAW capability allow both for
9837      * saving DNG files, and for direct application processing of
9838      * raw sensor images.</p>
9839      * <ul>
9840      * <li>RAW_SENSOR is supported as an output format.</li>
9841      * <li>The maximum available resolution for RAW_SENSOR streams
9842      *   will match either the value in
9843      *   ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE or
9844      *   ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE.</li>
9845      * <li>All DNG-related optional metadata entries are provided
9846      *   by the camera device.</li>
9847      * </ul>
9848      *
9849      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
9850      * @see ACAMERA_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
9851      */
9852     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_RAW                       = 3,
9853 
9854     /**
9855      * <p>The camera device supports accurately reporting the sensor settings for many of
9856      * the sensor controls while the built-in 3A algorithm is running.  This allows
9857      * reporting of sensor settings even when these settings cannot be manually changed.</p>
9858      * <p>The values reported for the following controls are guaranteed to be available
9859      * in the CaptureResult, including when 3A is enabled:</p>
9860      * <ul>
9861      * <li>Exposure control<ul>
9862      * <li>ACAMERA_SENSOR_EXPOSURE_TIME</li>
9863      * </ul>
9864      * </li>
9865      * <li>Sensitivity control<ul>
9866      * <li>ACAMERA_SENSOR_SENSITIVITY</li>
9867      * </ul>
9868      * </li>
9869      * <li>Lens controls (if the lens is adjustable)<ul>
9870      * <li>ACAMERA_LENS_FOCUS_DISTANCE</li>
9871      * <li>ACAMERA_LENS_APERTURE</li>
9872      * </ul>
9873      * </li>
9874      * </ul>
9875      * <p>This capability is a subset of the MANUAL_SENSOR control capability, and will
9876      * always be included if the MANUAL_SENSOR capability is available.</p>
9877      *
9878      * @see ACAMERA_LENS_APERTURE
9879      * @see ACAMERA_LENS_FOCUS_DISTANCE
9880      * @see ACAMERA_SENSOR_EXPOSURE_TIME
9881      * @see ACAMERA_SENSOR_SENSITIVITY
9882      */
9883     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS      = 5,
9884 
9885     /**
9886      * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
9887      * second, in at least the uncompressed YUV format, when post-processing settings are
9888      * set to FAST. Additionally, all image resolutions less than 24 megapixels can be
9889      * captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
9890      * megapixels, or the maximum resolution of the device, whichever is smaller.</p>
9891      * <p>More specifically, this means that at least one output {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
9892      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS }
9893      * is larger or equal to the 'high resolution' defined above, and can be captured at at
9894      * least 20 fps.  For the largest {@link AIMAGE_FORMAT_YUV_420_888 } size listed in
9895      * {@link ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS },
9896      * camera device can capture this size for at least 10 frames per second if the size is
9897      * less than 24 megapixels. Also the ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES entry
9898      * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
9899      * for the largest YUV_420_888 size.</p>
9900      * <p>If the device supports the {@link AIMAGE_FORMAT_RAW10 }, {@link AIMAGE_FORMAT_RAW12 }, {@link AIMAGE_FORMAT_Y8 }, then those can also be
9901      * captured at the same rate as the maximum-size YUV_420_888 resolution is.</p>
9902      * <p>In addition, the ACAMERA_SYNC_MAX_LATENCY field is guaranteed to have a value between 0
9903      * and 4, inclusive. ACAMERA_CONTROL_AE_LOCK_AVAILABLE and ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
9904      * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
9905      * consistent image output.</p>
9906      *
9907      * @see ACAMERA_CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
9908      * @see ACAMERA_CONTROL_AE_LOCK_AVAILABLE
9909      * @see ACAMERA_CONTROL_AWB_LOCK_AVAILABLE
9910      * @see ACAMERA_SYNC_MAX_LATENCY
9911      */
9912     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE             = 6,
9913 
9914     /**
9915      * <p>The camera device can produce depth measurements from its field of view.</p>
9916      * <p>This capability requires the camera device to support the following:</p>
9917      * <ul>
9918      * <li>{@link AIMAGE_FORMAT_DEPTH16 } is supported as
9919      *   an output format.</li>
9920      * <li>{@link AIMAGE_FORMAT_DEPTH_POINT_CLOUD } is
9921      *   optionally supported as an output format.</li>
9922      * <li>This camera device, and all camera devices with the same ACAMERA_LENS_FACING, will
9923      *   list the following calibration metadata entries in both {@link ACameraManager_getCameraCharacteristics }
9924      *   and {@link ACameraCaptureSession_captureCallback_result }:<ul>
9925      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
9926      * <li>ACAMERA_LENS_POSE_ROTATION</li>
9927      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
9928      * <li>ACAMERA_LENS_DISTORTION</li>
9929      * </ul>
9930      * </li>
9931      * <li>The ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE entry is listed by this device.</li>
9932      * <li>As of Android P, the ACAMERA_LENS_POSE_REFERENCE entry is listed by this device.</li>
9933      * <li>A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
9934      *   normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
9935      *   DEPTH16 format.</li>
9936      * </ul>
9937      * <p>Generally, depth output operates at a slower frame rate than standard color capture,
9938      * so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
9939      * should be accounted for (see {@link ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS }).
9940      * On a device that supports both depth and color-based output, to enable smooth preview,
9941      * using a repeating burst is recommended, where a depth-output target is only included
9942      * once every N frames, where N is the ratio between preview output rate and depth output
9943      * rate, including depth stall time.</p>
9944      *
9945      * @see ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
9946      * @see ACAMERA_LENS_DISTORTION
9947      * @see ACAMERA_LENS_FACING
9948      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
9949      * @see ACAMERA_LENS_POSE_REFERENCE
9950      * @see ACAMERA_LENS_POSE_ROTATION
9951      * @see ACAMERA_LENS_POSE_TRANSLATION
9952      */
9953     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT              = 8,
9954 
9955     /**
9956      * <p>The camera device supports the MOTION_TRACKING value for
9957      * ACAMERA_CONTROL_CAPTURE_INTENT, which limits maximum exposure time to 20 ms.</p>
9958      * <p>This limits the motion blur of capture images, resulting in better image tracking
9959      * results for use cases such as image stabilization or augmented reality.</p>
9960      *
9961      * @see ACAMERA_CONTROL_CAPTURE_INTENT
9962      */
9963     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING           = 10,
9964 
9965     /**
9966      * <p>The camera device is a logical camera backed by two or more physical cameras.</p>
9967      * <p>In API level 28, the physical cameras must also be exposed to the application via
9968      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>.</p>
9969      * <p>Starting from API level 29:</p>
9970      * <ul>
9971      * <li>Some or all physical cameras may not be independently exposed to the application,
9972      * in which case the physical camera IDs will not be available in
9973      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraIdList">CameraManager#getCameraIdList</a>. But the
9974      * application can still query the physical cameras' characteristics by calling
9975      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraManager.html#getCameraCharacteristics">CameraManager#getCameraCharacteristics</a>.</li>
9976      * <li>If a physical camera is hidden from camera ID list, the mandatory stream
9977      * combinations for that physical camera must be supported through the logical camera
9978      * using physical streams. One exception is that in API level 30, a physical camera
9979      * may become unavailable via
9980      * {@link ACameraManager_PhysicalCameraAvailabilityCallback }
9981      * callback.</li>
9982      * </ul>
9983      * <p>Combinations of logical and physical streams, or physical streams from different
9984      * physical cameras are not guaranteed. However, if the camera device supports
9985      * {@link ACameraDevice_isSessionConfigurationSupported },
9986      * application must be able to query whether a stream combination involving physical
9987      * streams is supported by calling
9988      * {@link ACameraDevice_isSessionConfigurationSupported }.</p>
9989      * <p>Camera application shouldn't assume that there are at most 1 rear camera and 1 front
9990      * camera in the system. For an application that switches between front and back cameras,
9991      * the recommendation is to switch between the first rear camera and the first front
9992      * camera in the list of supported camera devices.</p>
9993      * <p>This capability requires the camera device to support the following:</p>
9994      * <ul>
9995      * <li>The IDs of underlying physical cameras are returned via
9996      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#getPhysicalCameraIds">CameraCharacteristics#getPhysicalCameraIds</a>.</li>
9997      * <li>This camera device must list static metadata
9998      *   ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE in
9999      *   <a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html">CameraCharacteristics</a>.</li>
10000      * <li>The underlying physical cameras' static metadata must list the following entries,
10001      *   so that the application can correlate pixels from the physical streams:<ul>
10002      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
10003      * <li>ACAMERA_LENS_POSE_ROTATION</li>
10004      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
10005      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
10006      * <li>ACAMERA_LENS_DISTORTION</li>
10007      * </ul>
10008      * </li>
10009      * <li>The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
10010      *   the same.</li>
10011      * <li>The logical camera must be LIMITED or higher device.</li>
10012      * </ul>
10013      * <p>A logical camera device's dynamic metadata may contain
10014      * ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID to notify the application of the current
10015      * active physical camera Id. An active physical camera is the physical camera from which
10016      * the logical camera's main image data outputs (YUV or RAW) and metadata come from.
10017      * In addition, this serves as an indication which physical camera is used to output to
10018      * a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
10019      * the application should request.</p>
10020      * <p>Logical camera's static metadata tags below describe the default active physical
10021      * camera. An active physical camera is default if it's used when application directly
10022      * uses requests built from a template. All templates will default to the same active
10023      * physical camera.</p>
10024      * <ul>
10025      * <li>ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE</li>
10026      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
10027      * <li>ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
10028      * <li>ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
10029      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
10030      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
10031      * <li>ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED</li>
10032      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT1</li>
10033      * <li>ACAMERA_SENSOR_REFERENCE_ILLUMINANT2</li>
10034      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM1</li>
10035      * <li>ACAMERA_SENSOR_CALIBRATION_TRANSFORM2</li>
10036      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM1</li>
10037      * <li>ACAMERA_SENSOR_COLOR_TRANSFORM2</li>
10038      * <li>ACAMERA_SENSOR_FORWARD_MATRIX1</li>
10039      * <li>ACAMERA_SENSOR_FORWARD_MATRIX2</li>
10040      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
10041      * <li>ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY</li>
10042      * <li>ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS</li>
10043      * <li>ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES</li>
10044      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
10045      * <li>ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE</li>
10046      * <li>ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION</li>
10047      * <li>ACAMERA_LENS_POSE_ROTATION</li>
10048      * <li>ACAMERA_LENS_POSE_TRANSLATION</li>
10049      * <li>ACAMERA_LENS_INTRINSIC_CALIBRATION</li>
10050      * <li>ACAMERA_LENS_POSE_REFERENCE</li>
10051      * <li>ACAMERA_LENS_DISTORTION</li>
10052      * </ul>
10053      * <p>The field of view of non-RAW physical streams must not be smaller than that of the
10054      * non-RAW logical streams, or the maximum field-of-view of the physical camera,
10055      * whichever is smaller. The application should check the physical capture result
10056      * metadata for how the physical streams are cropped or zoomed. More specifically, given
10057      * the physical camera result metadata, the effective horizontal field-of-view of the
10058      * physical camera is:</p>
10059      * <pre><code>fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength)
10060      * </code></pre>
10061      * <p>where the equation parameters are the physical camera's crop region width, physical
10062      * sensor width, zoom ratio, active array width, and focal length respectively. Typically
10063      * the physical stream of active physical camera has the same field-of-view as the
10064      * logical streams. However, the same may not be true for physical streams from
10065      * non-active physical cameras. For example, if the logical camera has a wide-ultrawide
10066      * configuration where the wide lens is the default, when the crop region is set to the
10067      * logical camera's active array size, (and the zoom ratio set to 1.0 starting from
10068      * Android 11), a physical stream for the ultrawide camera may prefer outputting images
10069      * with larger field-of-view than that of the wide camera for better stereo matching
10070      * margin or more robust motion tracking. At the same time, the physical non-RAW streams'
10071      * field of view must not be smaller than the requested crop region and zoom ratio, as
10072      * long as it's within the physical lens' capability. For example, for a logical camera
10073      * with wide-tele lens configuration where the wide lens is the default, if the logical
10074      * camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical
10075      * stream for the tele lens will be configured to its maximum size crop region (no zoom).</p>
10076      * <p><em>Deprecated:</em> Prior to Android 11, the field of view of all non-RAW physical streams
10077      * cannot be larger than that of non-RAW logical streams. If the logical camera has a
10078      * wide-ultrawide lens configuration where the wide lens is the default, when the logical
10079      * camera's crop region is set to maximum size, the FOV of the physical streams for the
10080      * ultrawide lens will be the same as the logical stream, by making the crop region
10081      * smaller than its active array size to compensate for the smaller focal length.</p>
10082      * <p>For a logical camera, typically the underlying physical cameras have different RAW
10083      * capabilities (such as resolution or CFA pattern). There are two ways for the
10084      * application to capture RAW images from the logical camera:</p>
10085      * <ul>
10086      * <li>If the logical camera has RAW capability, the application can create and use RAW
10087      * streams in the same way as before. In case a RAW stream is configured, to maintain
10088      * backward compatibility, the camera device makes sure the default active physical
10089      * camera remains active and does not switch to other physical cameras. (One exception
10090      * is that, if the logical camera consists of identical image sensors and advertises
10091      * multiple focalLength due to different lenses, the camera device may generate RAW
10092      * images from different physical cameras based on the focalLength being set by the
10093      * application.) This backward-compatible approach usually results in loss of optical
10094      * zoom, to telephoto lens or to ultrawide lens.</li>
10095      * <li>Alternatively, if supported by the device,
10096      * <a href="https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader.html">MultiResolutionImageReader</a>
10097      * can be used to capture RAW images from one of the underlying physical cameras (
10098      * depending on current zoom level). Because different physical cameras may have
10099      * different RAW characteristics, the application needs to use the characteristics
10100      * and result metadata of the active physical camera for the relevant RAW metadata.</li>
10101      * </ul>
10102      * <p>The capture request and result metadata tags required for backward compatible camera
10103      * functionalities will be solely based on the logical camera capability. On the other
10104      * hand, the use of manual capture controls (sensor or post-processing) with a
10105      * logical camera may result in unexpected behavior when the HAL decides to switch
10106      * between physical cameras with different characteristics under the hood. For example,
10107      * when the application manually sets exposure time and sensitivity while zooming in,
10108      * the brightness of the camera images may suddenly change because HAL switches from one
10109      * physical camera to the other.</p>
10110      *
10111      * @see ACAMERA_LENS_DISTORTION
10112      * @see ACAMERA_LENS_INFO_FOCUS_DISTANCE_CALIBRATION
10113      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
10114      * @see ACAMERA_LENS_INFO_MINIMUM_FOCUS_DISTANCE
10115      * @see ACAMERA_LENS_INTRINSIC_CALIBRATION
10116      * @see ACAMERA_LENS_POSE_REFERENCE
10117      * @see ACAMERA_LENS_POSE_ROTATION
10118      * @see ACAMERA_LENS_POSE_TRANSLATION
10119      * @see ACAMERA_LOGICAL_MULTI_CAMERA_ACTIVE_PHYSICAL_ID
10120      * @see ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
10121      * @see ACAMERA_SENSOR_AVAILABLE_TEST_PATTERN_MODES
10122      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
10123      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM1
10124      * @see ACAMERA_SENSOR_CALIBRATION_TRANSFORM2
10125      * @see ACAMERA_SENSOR_COLOR_TRANSFORM1
10126      * @see ACAMERA_SENSOR_COLOR_TRANSFORM2
10127      * @see ACAMERA_SENSOR_FORWARD_MATRIX1
10128      * @see ACAMERA_SENSOR_FORWARD_MATRIX2
10129      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
10130      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
10131      * @see ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
10132      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
10133      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
10134      * @see ACAMERA_SENSOR_INFO_SENSITIVITY_RANGE
10135      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
10136      * @see ACAMERA_SENSOR_MAX_ANALOG_SENSITIVITY
10137      * @see ACAMERA_SENSOR_OPTICAL_BLACK_REGIONS
10138      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
10139      * @see ACAMERA_SENSOR_REFERENCE_ILLUMINANT2
10140      */
10141     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA      = 11,
10142 
10143     /**
10144      * <p>The camera device is a monochrome camera that doesn't contain a color filter array,
10145      * and for YUV_420_888 stream, the pixel values on U and V planes are all 128.</p>
10146      * <p>A MONOCHROME camera must support the guaranteed stream combinations required for
10147      * its device level and capabilities. Additionally, if the monochrome camera device
10148      * supports Y8 format, all mandatory stream combination requirements related to {@link AIMAGE_FORMAT_YUV_420_888 YUV_420_888} apply
10149      * to {@link AIMAGE_FORMAT_Y8 Y8} as well. There are no
10150      * mandatory stream combination requirements with regard to
10151      * {@link AIMAGE_FORMAT_Y8 Y8} for Bayer camera devices.</p>
10152      * <p>Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
10153      * camera will be either MONO or NIR.</p>
10154      */
10155     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME                = 12,
10156 
10157     /**
10158      * <p>The camera device is capable of writing image data into a region of memory
10159      * inaccessible to Android userspace or the Android kernel, and only accessible to
10160      * trusted execution environments (TEE).</p>
10161      */
10162     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA         = 13,
10163 
10164     /**
10165      * <p>The camera device is only accessible by Android's system components and privileged
10166      * applications. Processes need to have the android.permission.SYSTEM_CAMERA in
10167      * addition to android.permission.CAMERA in order to connect to this camera device.</p>
10168      */
10169     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA             = 14,
10170 
10171     /**
10172      * <p>This camera device is capable of producing ultra high resolution images in
10173      * addition to the image sizes described in the
10174      * android.scaler.streamConfigurationMap.
10175      * It can operate in 'default' mode and 'max resolution' mode. It generally does this
10176      * by binning pixels in 'default' mode and not binning them in 'max resolution' mode.
10177      * <code>android.scaler.streamConfigurationMap</code> describes the streams supported in 'default'
10178      * mode.
10179      * The stream configurations supported in 'max resolution' mode are described by
10180      * <code>android.scaler.streamConfigurationMapMaximumResolution</code>.
10181      * The maximum resolution mode pixel array size of a camera device
10182      * (<code>ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE</code>) with this capability,
10183      * will be at least 24 megapixels.</p>
10184      *
10185      * @see ACAMERA_SENSOR_INFO_PIXEL_ARRAY_SIZE
10186      */
10187     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR
10188                                                                       = 16,
10189 
10190     /**
10191      * <p>The camera device supports selecting a per-stream use case via
10192      * <a href="https://developer.android.com/reference/android/hardware/camera2/params/OutputConfiguration.html#setStreamUseCase">OutputConfiguration#setStreamUseCase</a>
10193      * so that the device can optimize camera pipeline parameters such as tuning, sensor
10194      * mode, or ISP settings for a specific user scenario.
10195      * Some sample usages of this capability are:</p>
10196      * <ul>
10197      * <li>Distinguish high quality YUV captures from a regular YUV stream where
10198      *   the image quality may not be as good as the JPEG stream, or</li>
10199      * <li>Use one stream to serve multiple purposes: viewfinder, video recording and
10200      *   still capture. This is common with applications that wish to apply edits equally
10201      *   to preview, saved images, and saved videos.</li>
10202      * </ul>
10203      * <p>This capability requires the camera device to support the following
10204      * stream use cases:</p>
10205      * <ul>
10206      * <li>DEFAULT for backward compatibility where the application doesn't set
10207      *   a stream use case</li>
10208      * <li>PREVIEW for live viewfinder and in-app image analysis</li>
10209      * <li>STILL_CAPTURE for still photo capture</li>
10210      * <li>VIDEO_RECORD for recording video clips</li>
10211      * <li>PREVIEW_VIDEO_STILL for one single stream used for viewfinder, video
10212      *   recording, and still capture.</li>
10213      * <li>VIDEO_CALL for long running video calls</li>
10214      * </ul>
10215      * <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>
10216      * lists all of the supported stream use cases.</p>
10217      * <p>Refer to the
10218      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#stream-use-case-capability-additional-guaranteed-configurations">guideline</a>
10219      * for the mandatory stream combinations involving stream use cases, which can also be
10220      * queried via <a href="https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.html">MandatoryStreamCombination</a>.</p>
10221      */
10222     ACAMERA_REQUEST_AVAILABLE_CAPABILITIES_STREAM_USE_CASE           = 19,
10223 
10224 } acamera_metadata_enum_android_request_available_capabilities_t;
10225 
10226 // ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP
10227 typedef enum acamera_metadata_enum_acamera_request_available_dynamic_range_profiles_map {
10228     /**
10229      * <p>8-bit SDR profile which is the default for all non 10-bit output capable devices.</p>
10230      */
10231     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_STANDARD    = 0x1,
10232 
10233     /**
10234      * <p>10-bit pixel samples encoded using the Hybrid log-gamma transfer function.</p>
10235      */
10236     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HLG10       = 0x2,
10237 
10238     /**
10239      * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.
10240      * This profile utilizes internal static metadata to increase the quality
10241      * of the capture.</p>
10242      */
10243     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10       = 0x4,
10244 
10245     /**
10246      * <p>10-bit pixel samples encoded using the SMPTE ST 2084 transfer function.
10247      * In contrast to HDR10, this profile uses internal per-frame metadata
10248      * to further enhance the quality of the capture.</p>
10249      */
10250     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_HDR10_PLUS  = 0x8,
10251 
10252     /**
10253      * <p>This is a camera mode for Dolby Vision capture optimized for a more scene
10254      * accurate capture. This would typically differ from what a specific device
10255      * might want to tune for a consumer optimized Dolby Vision general capture.</p>
10256      */
10257     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF
10258                                                                       = 0x10,
10259 
10260     /**
10261      * <p>This is the power optimized mode for 10-bit Dolby Vision HDR Reference Mode.</p>
10262      */
10263     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_REF_PO
10264                                                                       = 0x20,
10265 
10266     /**
10267      * <p>This is the camera mode for the default Dolby Vision capture mode for the
10268      * specific device. This would be tuned by each specific device for consumer
10269      * pleasing results that resonate with their particular audience. We expect
10270      * that each specific device would have a different look for their default
10271      * Dolby Vision capture.</p>
10272      */
10273     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM
10274                                                                       = 0x40,
10275 
10276     /**
10277      * <p>This is the power optimized mode for 10-bit Dolby Vision HDR device specific
10278      * capture Mode.</p>
10279      */
10280     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_10B_HDR_OEM_PO
10281                                                                       = 0x80,
10282 
10283     /**
10284      * <p>This is the 8-bit version of the Dolby Vision reference capture mode optimized
10285      * for scene accuracy.</p>
10286      */
10287     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF
10288                                                                       = 0x100,
10289 
10290     /**
10291      * <p>This is the power optimized mode for 8-bit Dolby Vision HDR Reference Mode.</p>
10292      */
10293     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_REF_PO
10294                                                                       = 0x200,
10295 
10296     /**
10297      * <p>This is the 8-bit version of device specific tuned and optimized Dolby Vision
10298      * capture mode.</p>
10299      */
10300     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM
10301                                                                       = 0x400,
10302 
10303     /**
10304      * <p>This is the power optimized mode for 8-bit Dolby Vision HDR device specific
10305      * capture Mode.</p>
10306      */
10307     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_DOLBY_VISION_8B_HDR_OEM_PO
10308                                                                       = 0x800,
10309 
10310     /**
10311      *
10312      */
10313     ACAMERA_REQUEST_AVAILABLE_DYNAMIC_RANGE_PROFILES_MAP_MAX         = 0x1000,
10314 
10315 } acamera_metadata_enum_android_request_available_dynamic_range_profiles_map_t;
10316 
10317 // ACAMERA_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP
10318 typedef enum acamera_metadata_enum_acamera_request_available_color_space_profiles_map {
10319     /**
10320      * <p>Default value, when not explicitly specified. The Camera device will choose the color
10321      * space to employ.</p>
10322      */
10323     ACAMERA_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_UNSPECIFIED   = -1,
10324 
10325     /**
10326      * <p>RGB color space sRGB standardized as IEC 61966-2.1:1999.</p>
10327      */
10328     ACAMERA_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_SRGB          = 0,
10329 
10330     /**
10331      * <p>RGB color space Display P3 based on SMPTE RP 431-2-2007 and IEC 61966-2.1:1999.</p>
10332      */
10333     ACAMERA_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_DISPLAY_P3    = 7,
10334 
10335     /**
10336      * <p>RGB color space BT.2100 standardized as Hybrid Log Gamma encoding.</p>
10337      */
10338     ACAMERA_REQUEST_AVAILABLE_COLOR_SPACE_PROFILES_MAP_BT2020_HLG    = 16,
10339 
10340 } acamera_metadata_enum_android_request_available_color_space_profiles_map_t;
10341 
10342 
10343 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS
10344 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations {
10345     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT            = 0,
10346 
10347     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_INPUT             = 1,
10348 
10349 } acamera_metadata_enum_android_scaler_available_stream_configurations_t;
10350 
10351 // ACAMERA_SCALER_CROPPING_TYPE
10352 typedef enum acamera_metadata_enum_acamera_scaler_cropping_type {
10353     /**
10354      * <p>The camera device only supports centered crop regions.</p>
10355      */
10356     ACAMERA_SCALER_CROPPING_TYPE_CENTER_ONLY                         = 0,
10357 
10358     /**
10359      * <p>The camera device supports arbitrarily chosen crop regions.</p>
10360      */
10361     ACAMERA_SCALER_CROPPING_TYPE_FREEFORM                            = 1,
10362 
10363 } acamera_metadata_enum_android_scaler_cropping_type_t;
10364 
10365 // ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS
10366 typedef enum acamera_metadata_enum_acamera_scaler_available_recommended_stream_configurations {
10367     /**
10368      * <p>Preview must only include non-stalling processed stream configurations with
10369      * output formats like
10370      * {@link AIMAGE_FORMAT_YUV_420_888 },
10371      * {@link AIMAGE_FORMAT_PRIVATE }, etc.</p>
10372      */
10373     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW
10374                                                                       = 0x0,
10375 
10376     /**
10377      * <p>Video record must include stream configurations that match the advertised
10378      * supported media profiles <a href="https://developer.android.com/reference/android/media/CamcorderProfile.html">CamcorderProfile</a> with
10379      * IMPLEMENTATION_DEFINED format.</p>
10380      */
10381     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD
10382                                                                       = 0x1,
10383 
10384     /**
10385      * <p>Video snapshot must include stream configurations at least as big as
10386      * the maximum RECORD resolutions and only with
10387      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
10388      * Additionally the configurations shouldn't cause preview glitches and also be able to
10389      * run at 30 fps.</p>
10390      */
10391     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT
10392                                                                       = 0x2,
10393 
10394     /**
10395      * <p>Recommended snapshot stream configurations must include at least one with
10396      * size close to ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE and
10397      * {@link AIMAGE_FORMAT_JPEG JPEG output format}.
10398      * Taking into account restrictions on aspect ratio, alignment etc. the area of the
10399      * maximum suggested size shouldn’t be less than 97% of the sensor array size area.</p>
10400      *
10401      * @see ACAMERA_SENSOR_INFO_ACTIVE_ARRAY_SIZE
10402      */
10403     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT
10404                                                                       = 0x3,
10405 
10406     /**
10407      * <p>If supported, recommended input stream configurations must only be advertised with
10408      * ZSL along with other processed and/or stalling output formats.</p>
10409      */
10410     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_ZSL   = 0x4,
10411 
10412     /**
10413      * <p>If supported, recommended raw stream configurations must only include RAW based
10414      * output formats.</p>
10415      */
10416     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RAW   = 0x5,
10417 
10418     /**
10419      * <p>If supported, the recommended low latency stream configurations must have
10420      * end-to-end latency that does not exceed 200 ms. under standard operating conditions
10421      * (reasonable light levels, not loaded system) and using template
10422      * TEMPLATE_STILL_CAPTURE. This is primarily for listing configurations for the
10423      * {@link AIMAGE_FORMAT_JPEG JPEG output format}
10424      * however other supported output formats can be added as well.</p>
10425      */
10426     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_LOW_LATENCY_SNAPSHOT
10427                                                                       = 0x6,
10428 
10429     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END
10430                                                                       = 0x7,
10431 
10432     /**
10433      * <p>If supported, the recommended 10-bit output stream configurations must include
10434      * a subset of the advertised <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#YCBCR_P010">ImageFormat#YCBCR_P010</a> and
10435      * <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#PRIVATE">ImageFormat#PRIVATE</a> outputs that are optimized for power
10436      * and performance when registered along with a supported 10-bit dynamic range profile.
10437      * see android.hardware.camera2.params.OutputConfiguration#setDynamicRangeProfile for
10438      * details.</p>
10439      */
10440     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_10BIT_OUTPUT
10441                                                                       = 0x8,
10442 
10443     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PUBLIC_END_3_8
10444                                                                       = 0x9,
10445 
10446     /**
10447      * <p>Vendor defined use cases. These depend on the vendor implementation.</p>
10448      */
10449     ACAMERA_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VENDOR_START
10450                                                                       = 0x18,
10451 
10452 } acamera_metadata_enum_android_scaler_available_recommended_stream_configurations_t;
10453 
10454 // ACAMERA_SCALER_ROTATE_AND_CROP
10455 typedef enum acamera_metadata_enum_acamera_scaler_rotate_and_crop {
10456     /**
10457      * <p>No rotate and crop is applied. Processed outputs are in the sensor orientation.</p>
10458      */
10459     ACAMERA_SCALER_ROTATE_AND_CROP_NONE                              = 0,
10460 
10461     /**
10462      * <p>Processed images are rotated by 90 degrees clockwise, and then cropped
10463      * to the original aspect ratio.</p>
10464      */
10465     ACAMERA_SCALER_ROTATE_AND_CROP_90                                = 1,
10466 
10467     /**
10468      * <p>Processed images are rotated by 180 degrees.  Since the aspect ratio does not
10469      * change, no cropping is performed.</p>
10470      */
10471     ACAMERA_SCALER_ROTATE_AND_CROP_180                               = 2,
10472 
10473     /**
10474      * <p>Processed images are rotated by 270 degrees clockwise, and then cropped
10475      * to the original aspect ratio.</p>
10476      */
10477     ACAMERA_SCALER_ROTATE_AND_CROP_270                               = 3,
10478 
10479     /**
10480      * <p>The camera API automatically selects the best concrete value for
10481      * rotate-and-crop based on the application's support for resizability and the current
10482      * multi-window mode.</p>
10483      * <p>If the application does not support resizing but the display mode for its main
10484      * Activity is not in a typical orientation, the camera API will set <code>ROTATE_AND_CROP_90</code>
10485      * or some other supported rotation value, depending on device configuration,
10486      * to ensure preview and captured images are correctly shown to the user. Otherwise,
10487      * <code>ROTATE_AND_CROP_NONE</code> will be selected.</p>
10488      * <p>When a value other than NONE is selected, several metadata fields will also be parsed
10489      * differently to ensure that coordinates are correctly handled for features like drawing
10490      * face detection boxes or passing in tap-to-focus coordinates.  The camera API will
10491      * convert positions in the active array coordinate system to/from the cropped-and-rotated
10492      * coordinate system to make the operation transparent for applications.</p>
10493      * <p>No coordinate mapping will be done when the application selects a non-AUTO mode.</p>
10494      */
10495     ACAMERA_SCALER_ROTATE_AND_CROP_AUTO                              = 4,
10496 
10497 } acamera_metadata_enum_android_scaler_rotate_and_crop_t;
10498 
10499 // ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
10500 typedef enum acamera_metadata_enum_acamera_scaler_physical_camera_multi_resolution_stream_configurations {
10501     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT
10502                                                                       = 0,
10503 
10504     ACAMERA_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT
10505                                                                       = 1,
10506 
10507 } acamera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t;
10508 
10509 // ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
10510 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_configurations_maximum_resolution {
10511     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
10512                                                                       = 0,
10513 
10514     ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
10515                                                                       = 1,
10516 
10517 } acamera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t;
10518 
10519 // ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED
10520 typedef enum acamera_metadata_enum_acamera_scaler_multi_resolution_stream_supported {
10521     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE           = 0,
10522 
10523     ACAMERA_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE            = 1,
10524 
10525 } acamera_metadata_enum_android_scaler_multi_resolution_stream_supported_t;
10526 
10527 // ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES
10528 typedef enum acamera_metadata_enum_acamera_scaler_available_stream_use_cases {
10529     /**
10530      * <p>Default stream use case.</p>
10531      * <p>This use case is the same as when the application doesn't set any use case for
10532      * the stream. The camera device uses the properties of the output target, such as
10533      * format, dataSpace, or surface class type, to optimize the image processing pipeline.</p>
10534      */
10535     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_DEFAULT                = 0x0,
10536 
10537     /**
10538      * <p>Live stream shown to the user.</p>
10539      * <p>Optimized for performance and usability as a viewfinder, but not necessarily for
10540      * image quality. The output is not meant to be persisted as saved images or video.</p>
10541      * <p>No stall if ACAMERA_CONTROL_* are set to FAST. There may be stall if
10542      * they are set to HIGH_QUALITY. This use case has the same behavior as the
10543      * default SurfaceView and SurfaceTexture targets. Additionally, this use case can be
10544      * used for in-app image analysis.</p>
10545      */
10546     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW                = 0x1,
10547 
10548     /**
10549      * <p>Still photo capture.</p>
10550      * <p>Optimized for high-quality high-resolution capture, and not expected to maintain
10551      * preview-like frame rates.</p>
10552      * <p>The stream may have stalls regardless of whether ACAMERA_CONTROL_* is HIGH_QUALITY.
10553      * This use case has the same behavior as the default JPEG and RAW related formats.</p>
10554      */
10555     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_STILL_CAPTURE          = 0x2,
10556 
10557     /**
10558      * <p>Recording video clips.</p>
10559      * <p>Optimized for high-quality video capture, including high-quality image stabilization
10560      * if supported by the device and enabled by the application. As a result, may produce
10561      * output frames with a substantial lag from real time, to allow for highest-quality
10562      * stabilization or other processing. As such, such an output is not suitable for drawing
10563      * to screen directly, and is expected to be persisted to disk or similar for later
10564      * playback or processing. Only streams that set the VIDEO_RECORD use case are guaranteed
10565      * to have video stabilization applied when the video stabilization control is set
10566      * to ON, as opposed to PREVIEW_STABILIZATION.</p>
10567      * <p>This use case has the same behavior as the default MediaRecorder and MediaCodec
10568      * targets.</p>
10569      */
10570     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_RECORD           = 0x3,
10571 
10572     /**
10573      * <p>One single stream used for combined purposes of preview, video, and still capture.</p>
10574      * <p>For such multi-purpose streams, the camera device aims to make the best tradeoff
10575      * between the individual use cases. For example, the STILL_CAPTURE use case by itself
10576      * may have stalls for achieving best image quality. But if combined with PREVIEW and
10577      * VIDEO_RECORD, the camera device needs to trade off the additional image processing
10578      * for speed so that preview and video recording aren't slowed down.</p>
10579      * <p>Similarly, VIDEO_RECORD may produce frames with a substantial lag, but
10580      * PREVIEW_VIDEO_STILL must have minimal output delay. This means that to enable video
10581      * stabilization with this use case, the device must support and the app must select the
10582      * PREVIEW_STABILIZATION mode for video stabilization.</p>
10583      */
10584     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_PREVIEW_VIDEO_STILL    = 0x4,
10585 
10586     /**
10587      * <p>Long-running video call optimized for both power efficiency and video quality.</p>
10588      * <p>The camera sensor may run in a lower-resolution mode to reduce power consumption
10589      * at the cost of some image and digital zoom quality. Unlike VIDEO_RECORD, VIDEO_CALL
10590      * outputs are expected to work in dark conditions, so are usually accompanied with
10591      * variable frame rate settings to allow sufficient exposure time in low light.</p>
10592      */
10593     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_VIDEO_CALL             = 0x5,
10594 
10595     /**
10596      * <p>Cropped RAW stream when the client chooses to crop the field of view.</p>
10597      * <p>Certain types of image sensors can run in binned modes in order to improve signal to
10598      * noise ratio while capturing frames. However, at certain zoom levels and / or when
10599      * other scene conditions are deemed fit, the camera sub-system may choose to un-bin and
10600      * remosaic the sensor's output. This results in a RAW frame which is cropped in field
10601      * of view and yet has the same number of pixels as full field of view RAW, thereby
10602      * improving image detail.</p>
10603      * <p>The resultant field of view of the RAW stream will be greater than or equal to
10604      * croppable non-RAW streams. The effective crop region for this RAW stream will be
10605      * reflected in the CaptureResult key ACAMERA_SCALER_RAW_CROP_REGION.</p>
10606      * <p>If this stream use case is set on a non-RAW stream, i.e. not one of :</p>
10607      * <ul>
10608      * <li>{@link AIMAGE_FORMAT_RAW16 RAW_SENSOR}</li>
10609      * <li>{@link AIMAGE_FORMAT_RAW10 RAW10}</li>
10610      * <li>{@link AIMAGE_FORMAT_RAW12 RAW12}</li>
10611      * </ul>
10612      * <p>session configuration is not guaranteed to succeed.</p>
10613      * <p>This stream use case may not be supported on some devices.</p>
10614      *
10615      * @see ACAMERA_SCALER_RAW_CROP_REGION
10616      */
10617     ACAMERA_SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW            = 0x6,
10618 
10619 } acamera_metadata_enum_android_scaler_available_stream_use_cases_t;
10620 
10621 
10622 // ACAMERA_SENSOR_REFERENCE_ILLUMINANT1
10623 typedef enum acamera_metadata_enum_acamera_sensor_reference_illuminant1 {
10624     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT                    = 1,
10625 
10626     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT                 = 2,
10627 
10628     /**
10629      * <p>Incandescent light</p>
10630      */
10631     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN                    = 3,
10632 
10633     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FLASH                       = 4,
10634 
10635     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER                = 9,
10636 
10637     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER              = 10,
10638 
10639     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_SHADE                       = 11,
10640 
10641     /**
10642      * <p>D 5700 - 7100K</p>
10643      */
10644     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT        = 12,
10645 
10646     /**
10647      * <p>N 4600 - 5400K</p>
10648      */
10649     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT       = 13,
10650 
10651     /**
10652      * <p>W 3900 - 4500K</p>
10653      */
10654     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT      = 14,
10655 
10656     /**
10657      * <p>WW 3200 - 3700K</p>
10658      */
10659     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT           = 15,
10660 
10661     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A                  = 17,
10662 
10663     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B                  = 18,
10664 
10665     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C                  = 19,
10666 
10667     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D55                         = 20,
10668 
10669     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D65                         = 21,
10670 
10671     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D75                         = 22,
10672 
10673     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_D50                         = 23,
10674 
10675     ACAMERA_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN         = 24,
10676 
10677 } acamera_metadata_enum_android_sensor_reference_illuminant1_t;
10678 
10679 // ACAMERA_SENSOR_TEST_PATTERN_MODE
10680 typedef enum acamera_metadata_enum_acamera_sensor_test_pattern_mode {
10681     /**
10682      * <p>No test pattern mode is used, and the camera
10683      * device returns captures from the image sensor.</p>
10684      * <p>This is the default if the key is not set.</p>
10685      */
10686     ACAMERA_SENSOR_TEST_PATTERN_MODE_OFF                             = 0,
10687 
10688     /**
10689      * <p>Each pixel in <code>[R, G_even, G_odd, B]</code> is replaced by its
10690      * respective color channel provided in
10691      * ACAMERA_SENSOR_TEST_PATTERN_DATA.</p>
10692      * <p>For example:</p>
10693      * <pre><code>ACAMERA_SENSOR_TEST_PATTERN_DATA = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
10694      * </code></pre>
10695      * <p>All green pixels are 100% green. All red/blue pixels are black.</p>
10696      * <pre><code>ACAMERA_SENSOR_TEST_PATTERN_DATA = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
10697      * </code></pre>
10698      * <p>All red pixels are 100% red. Only the odd green pixels
10699      * are 100% green. All blue pixels are 100% black.</p>
10700      *
10701      * @see ACAMERA_SENSOR_TEST_PATTERN_DATA
10702      */
10703     ACAMERA_SENSOR_TEST_PATTERN_MODE_SOLID_COLOR                     = 1,
10704 
10705     /**
10706      * <p>All pixel data is replaced with an 8-bar color pattern.</p>
10707      * <p>The vertical bars (left-to-right) are as follows:</p>
10708      * <ul>
10709      * <li>100% white</li>
10710      * <li>yellow</li>
10711      * <li>cyan</li>
10712      * <li>green</li>
10713      * <li>magenta</li>
10714      * <li>red</li>
10715      * <li>blue</li>
10716      * <li>black</li>
10717      * </ul>
10718      * <p>In general the image would look like the following:</p>
10719      * <pre><code>W Y C G M R B K
10720      * W Y C G M R B K
10721      * W Y C G M R B K
10722      * W Y C G M R B K
10723      * W Y C G M R B K
10724      * . . . . . . . .
10725      * . . . . . . . .
10726      * . . . . . . . .
10727      *
10728      * (B = Blue, K = Black)
10729      * </code></pre>
10730      * <p>Each bar should take up 1/8 of the sensor pixel array width.
10731      * When this is not possible, the bar size should be rounded
10732      * down to the nearest integer and the pattern can repeat
10733      * on the right side.</p>
10734      * <p>Each bar's height must always take up the full sensor
10735      * pixel array height.</p>
10736      * <p>Each pixel in this test pattern must be set to either
10737      * 0% intensity or 100% intensity.</p>
10738      */
10739     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS                      = 2,
10740 
10741     /**
10742      * <p>The test pattern is similar to COLOR_BARS, except that
10743      * each bar should start at its specified color at the top,
10744      * and fade to gray at the bottom.</p>
10745      * <p>Furthermore each bar is further subdivided into a left and
10746      * right half. The left half should have a smooth gradient,
10747      * and the right half should have a quantized gradient.</p>
10748      * <p>In particular, the right half's should consist of blocks of the
10749      * same color for 1/16th active sensor pixel array width.</p>
10750      * <p>The least significant bits in the quantized gradient should
10751      * be copied from the most significant bits of the smooth gradient.</p>
10752      * <p>The height of each bar should always be a multiple of 128.
10753      * When this is not the case, the pattern should repeat at the bottom
10754      * of the image.</p>
10755      */
10756     ACAMERA_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY         = 3,
10757 
10758     /**
10759      * <p>All pixel data is replaced by a pseudo-random sequence
10760      * generated from a PN9 512-bit sequence (typically implemented
10761      * in hardware with a linear feedback shift register).</p>
10762      * <p>The generator should be reset at the beginning of each frame,
10763      * and thus each subsequent raw frame with this test pattern should
10764      * be exactly the same as the last.</p>
10765      */
10766     ACAMERA_SENSOR_TEST_PATTERN_MODE_PN9                             = 4,
10767 
10768     /**
10769      * <p>The first custom test pattern. All custom patterns that are
10770      * available only on this camera device are at least this numeric
10771      * value.</p>
10772      * <p>All of the custom test patterns will be static
10773      * (that is the raw image must not vary from frame to frame).</p>
10774      */
10775     ACAMERA_SENSOR_TEST_PATTERN_MODE_CUSTOM1                         = 256,
10776 
10777 } acamera_metadata_enum_android_sensor_test_pattern_mode_t;
10778 
10779 // ACAMERA_SENSOR_PIXEL_MODE
10780 typedef enum acamera_metadata_enum_acamera_sensor_pixel_mode {
10781     /**
10782      * <p>This is the default sensor pixel mode.</p>
10783      */
10784     ACAMERA_SENSOR_PIXEL_MODE_DEFAULT                                = 0,
10785 
10786     /**
10787      * <p>In this mode, sensors typically do not bin pixels, as a result can offer larger
10788      * image sizes.</p>
10789      */
10790     ACAMERA_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION                     = 1,
10791 
10792 } acamera_metadata_enum_android_sensor_pixel_mode_t;
10793 
10794 // ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED
10795 typedef enum acamera_metadata_enum_acamera_sensor_raw_binning_factor_used {
10796     /**
10797      * <p>The <code>RAW</code> targets in this capture have ACAMERA_SENSOR_INFO_BINNING_FACTOR as the
10798      * bayer pattern.</p>
10799      *
10800      * @see ACAMERA_SENSOR_INFO_BINNING_FACTOR
10801      */
10802     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED_TRUE                      = 0,
10803 
10804     /**
10805      * <p>The <code>RAW</code> targets have a regular bayer pattern in this capture.</p>
10806      */
10807     ACAMERA_SENSOR_RAW_BINNING_FACTOR_USED_FALSE                     = 1,
10808 
10809 } acamera_metadata_enum_android_sensor_raw_binning_factor_used_t;
10810 
10811 
10812 // ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
10813 typedef enum acamera_metadata_enum_acamera_sensor_info_color_filter_arrangement {
10814     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB                = 0,
10815 
10816     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG                = 1,
10817 
10818     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG                = 2,
10819 
10820     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR                = 3,
10821 
10822     /**
10823      * <p>Sensor is not Bayer; output has 3 16-bit
10824      * values for each pixel, instead of just 1 16-bit value
10825      * per pixel.</p>
10826      */
10827     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB                 = 4,
10828 
10829     /**
10830      * <p>Sensor doesn't have any Bayer color filter.
10831      * Such sensor captures visible light in monochrome. The exact weighting and
10832      * wavelengths captured is not specified, but generally only includes the visible
10833      * frequencies. This value implies a MONOCHROME camera.</p>
10834      */
10835     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_MONO                = 5,
10836 
10837     /**
10838      * <p>Sensor has a near infrared filter capturing light with wavelength between
10839      * roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
10840      * value implies a MONOCHROME camera.</p>
10841      */
10842     ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_NIR                 = 6,
10843 
10844 } acamera_metadata_enum_android_sensor_info_color_filter_arrangement_t;
10845 
10846 // ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE
10847 typedef enum acamera_metadata_enum_acamera_sensor_info_timestamp_source {
10848     /**
10849      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in nanoseconds and monotonic, but can
10850      * not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.),
10851      * or other instances of the same or different camera devices in the same system with
10852      * accuracy. However, the timestamps are roughly in the same timebase as
10853      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#uptimeMillis">SystemClock#uptimeMillis</a>.  The accuracy is sufficient for tasks
10854      * like A/V synchronization for video recording, at least, and the timestamps can be
10855      * directly used together with timestamps from the audio subsystem for that task.</p>
10856      * <p>Timestamps between streams and results for a single camera instance are comparable,
10857      * and the timestamps for all buffers and the result metadata generated by a single
10858      * capture are identical.</p>
10859      *
10860      * @see ACAMERA_SENSOR_TIMESTAMP
10861      */
10862     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN                     = 0,
10863 
10864     /**
10865      * <p>Timestamps from ACAMERA_SENSOR_TIMESTAMP are in the same timebase as
10866      * <a href="https://developer.android.com/reference/android/os/SystemClock.html#elapsedRealtimeNanos">SystemClock#elapsedRealtimeNanos</a>,
10867      * and they can be compared to other timestamps using that base.</p>
10868      * <p>When buffers from a REALTIME device are passed directly to a video encoder from the
10869      * camera, automatic compensation is done to account for differing timebases of the
10870      * audio and camera subsystems.  If the application is receiving buffers and then later
10871      * sending them to a video encoder or other application where they are compared with
10872      * audio subsystem timestamps or similar, this compensation is not present.  In those
10873      * 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
10874      * offset between the two sources can be measured once per active session and applied
10875      * to timestamps for sufficient accuracy for A/V sync.</p>
10876      *
10877      * @see ACAMERA_SENSOR_TIMESTAMP
10878      */
10879     ACAMERA_SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME                    = 1,
10880 
10881 } acamera_metadata_enum_android_sensor_info_timestamp_source_t;
10882 
10883 // ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED
10884 typedef enum acamera_metadata_enum_acamera_sensor_info_lens_shading_applied {
10885     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_FALSE                   = 0,
10886 
10887     ACAMERA_SENSOR_INFO_LENS_SHADING_APPLIED_TRUE                    = 1,
10888 
10889 } acamera_metadata_enum_android_sensor_info_lens_shading_applied_t;
10890 
10891 
10892 // ACAMERA_SHADING_MODE
10893 typedef enum acamera_metadata_enum_acamera_shading_mode {
10894     /**
10895      * <p>No lens shading correction is applied.</p>
10896      */
10897     ACAMERA_SHADING_MODE_OFF                                         = 0,
10898 
10899     /**
10900      * <p>Apply lens shading corrections, without slowing
10901      * frame rate relative to sensor raw output</p>
10902      */
10903     ACAMERA_SHADING_MODE_FAST                                        = 1,
10904 
10905     /**
10906      * <p>Apply high-quality lens shading correction, at the
10907      * cost of possibly reduced frame rate.</p>
10908      */
10909     ACAMERA_SHADING_MODE_HIGH_QUALITY                                = 2,
10910 
10911 } acamera_metadata_enum_android_shading_mode_t;
10912 
10913 
10914 // ACAMERA_STATISTICS_FACE_DETECT_MODE
10915 typedef enum acamera_metadata_enum_acamera_statistics_face_detect_mode {
10916     /**
10917      * <p>Do not include face detection statistics in capture
10918      * results.</p>
10919      */
10920     ACAMERA_STATISTICS_FACE_DETECT_MODE_OFF                          = 0,
10921 
10922     /**
10923      * <p>Return face rectangle and confidence values only.</p>
10924      */
10925     ACAMERA_STATISTICS_FACE_DETECT_MODE_SIMPLE                       = 1,
10926 
10927     /**
10928      * <p>Return all face
10929      * metadata.</p>
10930      * <p>In this mode, face rectangles, scores, landmarks, and face IDs are all valid.</p>
10931      */
10932     ACAMERA_STATISTICS_FACE_DETECT_MODE_FULL                         = 2,
10933 
10934 } acamera_metadata_enum_android_statistics_face_detect_mode_t;
10935 
10936 // ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE
10937 typedef enum acamera_metadata_enum_acamera_statistics_hot_pixel_map_mode {
10938     /**
10939      * <p>Hot pixel map production is disabled.</p>
10940      */
10941     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_OFF                        = 0,
10942 
10943     /**
10944      * <p>Hot pixel map production is enabled.</p>
10945      */
10946     ACAMERA_STATISTICS_HOT_PIXEL_MAP_MODE_ON                         = 1,
10947 
10948 } acamera_metadata_enum_android_statistics_hot_pixel_map_mode_t;
10949 
10950 // ACAMERA_STATISTICS_SCENE_FLICKER
10951 typedef enum acamera_metadata_enum_acamera_statistics_scene_flicker {
10952     /**
10953      * <p>The camera device does not detect any flickering illumination
10954      * in the current scene.</p>
10955      */
10956     ACAMERA_STATISTICS_SCENE_FLICKER_NONE                            = 0,
10957 
10958     /**
10959      * <p>The camera device detects illumination flickering at 50Hz
10960      * in the current scene.</p>
10961      */
10962     ACAMERA_STATISTICS_SCENE_FLICKER_50HZ                            = 1,
10963 
10964     /**
10965      * <p>The camera device detects illumination flickering at 60Hz
10966      * in the current scene.</p>
10967      */
10968     ACAMERA_STATISTICS_SCENE_FLICKER_60HZ                            = 2,
10969 
10970 } acamera_metadata_enum_android_statistics_scene_flicker_t;
10971 
10972 // ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE
10973 typedef enum acamera_metadata_enum_acamera_statistics_lens_shading_map_mode {
10974     /**
10975      * <p>Do not include a lens shading map in the capture result.</p>
10976      */
10977     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_OFF                     = 0,
10978 
10979     /**
10980      * <p>Include a lens shading map in the capture result.</p>
10981      */
10982     ACAMERA_STATISTICS_LENS_SHADING_MAP_MODE_ON                      = 1,
10983 
10984 } acamera_metadata_enum_android_statistics_lens_shading_map_mode_t;
10985 
10986 // ACAMERA_STATISTICS_OIS_DATA_MODE
10987 typedef enum acamera_metadata_enum_acamera_statistics_ois_data_mode {
10988     /**
10989      * <p>Do not include OIS data in the capture result.</p>
10990      */
10991     ACAMERA_STATISTICS_OIS_DATA_MODE_OFF                             = 0,
10992 
10993     /**
10994      * <p>Include OIS data in the capture result.</p>
10995      * <p>ACAMERA_STATISTICS_OIS_TIMESTAMPS, ACAMERA_STATISTICS_OIS_X_SHIFTS,
10996      * and ACAMERA_STATISTICS_OIS_Y_SHIFTS provide OIS data in the output result metadata.</p>
10997      *
10998      * @see ACAMERA_STATISTICS_OIS_TIMESTAMPS
10999      * @see ACAMERA_STATISTICS_OIS_X_SHIFTS
11000      * @see ACAMERA_STATISTICS_OIS_Y_SHIFTS
11001      */
11002     ACAMERA_STATISTICS_OIS_DATA_MODE_ON                              = 1,
11003 
11004 } acamera_metadata_enum_android_statistics_ois_data_mode_t;
11005 
11006 
11007 
11008 // ACAMERA_TONEMAP_MODE
11009 typedef enum acamera_metadata_enum_acamera_tonemap_mode {
11010     /**
11011      * <p>Use the tone mapping curve specified in
11012      * the ACAMERA_TONEMAPCURVE_* entries.</p>
11013      * <p>All color enhancement and tonemapping must be disabled, except
11014      * for applying the tonemapping curve specified by
11015      * android.tonemap.curve.</p>
11016      * <p>Must not slow down frame rate relative to raw
11017      * sensor output.</p>
11018      */
11019     ACAMERA_TONEMAP_MODE_CONTRAST_CURVE                              = 0,
11020 
11021     /**
11022      * <p>Advanced gamma mapping and color enhancement may be applied, without
11023      * reducing frame rate compared to raw sensor output.</p>
11024      */
11025     ACAMERA_TONEMAP_MODE_FAST                                        = 1,
11026 
11027     /**
11028      * <p>High-quality gamma mapping and color enhancement will be applied, at
11029      * the cost of possibly reduced frame rate compared to raw sensor output.</p>
11030      */
11031     ACAMERA_TONEMAP_MODE_HIGH_QUALITY                                = 2,
11032 
11033     /**
11034      * <p>Use the gamma value specified in ACAMERA_TONEMAP_GAMMA to perform
11035      * tonemapping.</p>
11036      * <p>All color enhancement and tonemapping must be disabled, except
11037      * for applying the tonemapping curve specified by ACAMERA_TONEMAP_GAMMA.</p>
11038      * <p>Must not slow down frame rate relative to raw sensor output.</p>
11039      *
11040      * @see ACAMERA_TONEMAP_GAMMA
11041      */
11042     ACAMERA_TONEMAP_MODE_GAMMA_VALUE                                 = 3,
11043 
11044     /**
11045      * <p>Use the preset tonemapping curve specified in
11046      * ACAMERA_TONEMAP_PRESET_CURVE to perform tonemapping.</p>
11047      * <p>All color enhancement and tonemapping must be disabled, except
11048      * for applying the tonemapping curve specified by
11049      * ACAMERA_TONEMAP_PRESET_CURVE.</p>
11050      * <p>Must not slow down frame rate relative to raw sensor output.</p>
11051      *
11052      * @see ACAMERA_TONEMAP_PRESET_CURVE
11053      */
11054     ACAMERA_TONEMAP_MODE_PRESET_CURVE                                = 4,
11055 
11056 } acamera_metadata_enum_android_tonemap_mode_t;
11057 
11058 // ACAMERA_TONEMAP_PRESET_CURVE
11059 typedef enum acamera_metadata_enum_acamera_tonemap_preset_curve {
11060     /**
11061      * <p>Tonemapping curve is defined by sRGB</p>
11062      */
11063     ACAMERA_TONEMAP_PRESET_CURVE_SRGB                                = 0,
11064 
11065     /**
11066      * <p>Tonemapping curve is defined by ITU-R BT.709</p>
11067      */
11068     ACAMERA_TONEMAP_PRESET_CURVE_REC709                              = 1,
11069 
11070 } acamera_metadata_enum_android_tonemap_preset_curve_t;
11071 
11072 
11073 
11074 // ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL
11075 typedef enum acamera_metadata_enum_acamera_info_supported_hardware_level {
11076     /**
11077      * <p>This camera device does not have enough capabilities to qualify as a <code>FULL</code> device or
11078      * better.</p>
11079      * <p>Only the stream configurations listed in the <code>LEGACY</code> and <code>LIMITED</code>
11080      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#limited-level-additional-guaranteed-configurations">tables</a>
11081      * in the documentation are guaranteed to be supported.</p>
11082      * <p>All <code>LIMITED</code> devices support the <code>BACKWARDS_COMPATIBLE</code> capability, indicating basic
11083      * support for color image capture. The only exception is that the device may
11084      * alternatively support only the <code>DEPTH_OUTPUT</code> capability, if it can only output depth
11085      * measurements and not color images.</p>
11086      * <p><code>LIMITED</code> devices and above require the use of ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
11087      * to lock exposure metering (and calculate flash power, for cameras with flash) before
11088      * capturing a high-quality still image.</p>
11089      * <p>A <code>LIMITED</code> device that only lists the <code>BACKWARDS_COMPATIBLE</code> capability is only
11090      * required to support full-automatic operation and post-processing (<code>OFF</code> is not
11091      * supported for ACAMERA_CONTROL_AE_MODE, ACAMERA_CONTROL_AF_MODE, or
11092      * ACAMERA_CONTROL_AWB_MODE)</p>
11093      * <p>Additional capabilities may optionally be supported by a <code>LIMITED</code>-level device, and
11094      * can be checked for in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
11095      *
11096      * @see ACAMERA_CONTROL_AE_MODE
11097      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
11098      * @see ACAMERA_CONTROL_AF_MODE
11099      * @see ACAMERA_CONTROL_AWB_MODE
11100      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
11101      */
11102     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED                    = 0,
11103 
11104     /**
11105      * <p>This camera device is capable of supporting advanced imaging applications.</p>
11106      * <p>The stream configurations listed in the <code>FULL</code>, <code>LEGACY</code> and <code>LIMITED</code>
11107      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#full-level-additional-guaranteed-configurations">tables</a>
11108      * in the documentation are guaranteed to be supported.</p>
11109      * <p>A <code>FULL</code> device will support below capabilities:</p>
11110      * <ul>
11111      * <li><code>BURST_CAPTURE</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
11112      *   <code>BURST_CAPTURE</code>)</li>
11113      * <li>Per frame control (ACAMERA_SYNC_MAX_LATENCY <code>==</code> PER_FRAME_CONTROL)</li>
11114      * <li>Manual sensor control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains <code>MANUAL_SENSOR</code>)</li>
11115      * <li>Manual post-processing control (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
11116      *   <code>MANUAL_POST_PROCESSING</code>)</li>
11117      * <li>The required exposure time range defined in ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE</li>
11118      * <li>The required maxFrameDuration defined in ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION</li>
11119      * </ul>
11120      * <p>Note:
11121      * Pre-API level 23, FULL devices also supported arbitrary cropping region
11122      * (ACAMERA_SCALER_CROPPING_TYPE <code>== FREEFORM</code>); this requirement was relaxed in API level
11123      * 23, and <code>FULL</code> devices may only support <code>CENTERED</code> cropping.</p>
11124      *
11125      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
11126      * @see ACAMERA_SCALER_CROPPING_TYPE
11127      * @see ACAMERA_SENSOR_INFO_EXPOSURE_TIME_RANGE
11128      * @see ACAMERA_SENSOR_INFO_MAX_FRAME_DURATION
11129      * @see ACAMERA_SYNC_MAX_LATENCY
11130      */
11131     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_FULL                       = 1,
11132 
11133     /**
11134      * <p>This camera device is running in backward compatibility mode.</p>
11135      * <p>Only the stream configurations listed in the <code>LEGACY</code>
11136      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#legacy-level-guaranteed-configurations">table</a>
11137      * in the documentation are supported.</p>
11138      * <p>A <code>LEGACY</code> device does not support per-frame control, manual sensor control, manual
11139      * post-processing, arbitrary cropping regions, and has relaxed performance constraints.
11140      * No additional capabilities beyond <code>BACKWARD_COMPATIBLE</code> will ever be listed by a
11141      * <code>LEGACY</code> device in ACAMERA_REQUEST_AVAILABLE_CAPABILITIES.</p>
11142      * <p>In addition, the ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER is not functional on <code>LEGACY</code>
11143      * devices. Instead, every request that includes a JPEG-format output target is treated
11144      * as triggering a still capture, internally executing a precapture trigger.  This may
11145      * fire the flash for flash power metering during precapture, and then fire the flash
11146      * for the final capture, if a flash is available on the device and the AE mode is set to
11147      * enable the flash.</p>
11148      * <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>
11149      *
11150      * @see ACAMERA_CONTROL_AE_PRECAPTURE_TRIGGER
11151      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
11152      */
11153     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY                     = 2,
11154 
11155     /**
11156      * <p>This camera device is capable of YUV reprocessing and RAW data capture, in addition to
11157      * FULL-level capabilities.</p>
11158      * <p>The stream configurations listed in the <code>LEVEL_3</code>, <code>RAW</code>, <code>FULL</code>, <code>LEGACY</code> and
11159      * <code>LIMITED</code>
11160      * <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice#level-3-additional-guaranteed-configurations">tables</a>
11161      * in the documentation are guaranteed to be supported.</p>
11162      * <p>The following additional capabilities are guaranteed to be supported:</p>
11163      * <ul>
11164      * <li><code>YUV_REPROCESSING</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
11165      *   <code>YUV_REPROCESSING</code>)</li>
11166      * <li><code>RAW</code> capability (ACAMERA_REQUEST_AVAILABLE_CAPABILITIES contains
11167      *   <code>RAW</code>)</li>
11168      * </ul>
11169      *
11170      * @see ACAMERA_REQUEST_AVAILABLE_CAPABILITIES
11171      */
11172     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_3                          = 3,
11173 
11174     /**
11175      * <p>This camera device is backed by an external camera connected to this Android device.</p>
11176      * <p>The device has capability identical to a LIMITED level device, with the following
11177      * exceptions:</p>
11178      * <ul>
11179      * <li>The device may not report lens/sensor related information such as<ul>
11180      * <li>ACAMERA_LENS_FOCAL_LENGTH</li>
11181      * <li>ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE</li>
11182      * <li>ACAMERA_SENSOR_INFO_PHYSICAL_SIZE</li>
11183      * <li>ACAMERA_SENSOR_INFO_WHITE_LEVEL</li>
11184      * <li>ACAMERA_SENSOR_BLACK_LEVEL_PATTERN</li>
11185      * <li>ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT</li>
11186      * <li>ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW</li>
11187      * </ul>
11188      * </li>
11189      * <li>The device will report 0 for ACAMERA_SENSOR_ORIENTATION</li>
11190      * <li>The device has less guarantee on stable framerate, as the framerate partly depends
11191      *   on the external camera being used.</li>
11192      * </ul>
11193      *
11194      * @see ACAMERA_LENS_FOCAL_LENGTH
11195      * @see ACAMERA_LENS_INFO_HYPERFOCAL_DISTANCE
11196      * @see ACAMERA_SENSOR_BLACK_LEVEL_PATTERN
11197      * @see ACAMERA_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
11198      * @see ACAMERA_SENSOR_INFO_PHYSICAL_SIZE
11199      * @see ACAMERA_SENSOR_INFO_WHITE_LEVEL
11200      * @see ACAMERA_SENSOR_ORIENTATION
11201      * @see ACAMERA_SENSOR_ROLLING_SHUTTER_SKEW
11202      */
11203     ACAMERA_INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL                   = 4,
11204 
11205 } acamera_metadata_enum_android_info_supported_hardware_level_t;
11206 
11207 
11208 // ACAMERA_BLACK_LEVEL_LOCK
11209 typedef enum acamera_metadata_enum_acamera_black_level_lock {
11210     ACAMERA_BLACK_LEVEL_LOCK_OFF                                     = 0,
11211 
11212     ACAMERA_BLACK_LEVEL_LOCK_ON                                      = 1,
11213 
11214 } acamera_metadata_enum_android_black_level_lock_t;
11215 
11216 
11217 // ACAMERA_SYNC_FRAME_NUMBER
11218 typedef enum acamera_metadata_enum_acamera_sync_frame_number {
11219     /**
11220      * <p>The current result is not yet fully synchronized to any request.</p>
11221      * <p>Synchronization is in progress, and reading metadata from this
11222      * result may include a mix of data that have taken effect since the
11223      * last synchronization time.</p>
11224      * <p>In some future result, within ACAMERA_SYNC_MAX_LATENCY frames,
11225      * this value will update to the actual frame number frame number
11226      * the result is guaranteed to be synchronized to (as long as the
11227      * request settings remain constant).</p>
11228      *
11229      * @see ACAMERA_SYNC_MAX_LATENCY
11230      */
11231     ACAMERA_SYNC_FRAME_NUMBER_CONVERGING                             = -1,
11232 
11233     /**
11234      * <p>The current result's synchronization status is unknown.</p>
11235      * <p>The result may have already converged, or it may be in
11236      * progress.  Reading from this result may include some mix
11237      * of settings from past requests.</p>
11238      * <p>After a settings change, the new settings will eventually all
11239      * take effect for the output buffers and results. However, this
11240      * value will not change when that happens. Altering settings
11241      * rapidly may provide outcomes using mixes of settings from recent
11242      * requests.</p>
11243      * <p>This value is intended primarily for backwards compatibility with
11244      * the older camera implementations (for android.hardware.Camera).</p>
11245      */
11246     ACAMERA_SYNC_FRAME_NUMBER_UNKNOWN                                = -2,
11247 
11248 } acamera_metadata_enum_android_sync_frame_number_t;
11249 
11250 // ACAMERA_SYNC_MAX_LATENCY
11251 typedef enum acamera_metadata_enum_acamera_sync_max_latency {
11252     /**
11253      * <p>Every frame has the requests immediately applied.</p>
11254      * <p>Changing controls over multiple requests one after another will
11255      * produce results that have those controls applied atomically
11256      * each frame.</p>
11257      * <p>All FULL capability devices will have this as their maxLatency.</p>
11258      */
11259     ACAMERA_SYNC_MAX_LATENCY_PER_FRAME_CONTROL                       = 0,
11260 
11261     /**
11262      * <p>Each new frame has some subset (potentially the entire set)
11263      * of the past requests applied to the camera settings.</p>
11264      * <p>By submitting a series of identical requests, the camera device
11265      * will eventually have the camera settings applied, but it is
11266      * unknown when that exact point will be.</p>
11267      * <p>All LEGACY capability devices will have this as their maxLatency.</p>
11268      */
11269     ACAMERA_SYNC_MAX_LATENCY_UNKNOWN                                 = -1,
11270 
11271 } acamera_metadata_enum_android_sync_max_latency_t;
11272 
11273 
11274 
11275 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS
11276 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations {
11277     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT       = 0,
11278 
11279     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_INPUT        = 1,
11280 
11281 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_t;
11282 
11283 // ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE
11284 typedef enum acamera_metadata_enum_acamera_depth_depth_is_exclusive {
11285     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_FALSE                           = 0,
11286 
11287     ACAMERA_DEPTH_DEPTH_IS_EXCLUSIVE_TRUE                            = 1,
11288 
11289 } acamera_metadata_enum_android_depth_depth_is_exclusive_t;
11290 
11291 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS
11292 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations {
11293     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_OUTPUT
11294                                                                       = 0,
11295 
11296     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_INPUT
11297                                                                       = 1,
11298 
11299 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t;
11300 
11301 // ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
11302 typedef enum acamera_metadata_enum_acamera_depth_available_depth_stream_configurations_maximum_resolution {
11303     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
11304                                                                       = 0,
11305 
11306     ACAMERA_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
11307                                                                       = 1,
11308 
11309 } acamera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t;
11310 
11311 // ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
11312 typedef enum acamera_metadata_enum_acamera_depth_available_dynamic_depth_stream_configurations_maximum_resolution {
11313     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
11314                                                                       = 0,
11315 
11316     ACAMERA_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
11317                                                                       = 1,
11318 
11319 } acamera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t;
11320 
11321 
11322 // ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
11323 typedef enum acamera_metadata_enum_acamera_logical_multi_camera_sensor_sync_type {
11324     /**
11325      * <p>A software mechanism is used to synchronize between the physical cameras. As a result,
11326      * the timestamp of an image from a physical stream is only an approximation of the
11327      * image sensor start-of-exposure time.</p>
11328      */
11329     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE        = 0,
11330 
11331     /**
11332      * <p>The camera device supports frame timestamp synchronization at the hardware level,
11333      * and the timestamp of a physical stream image accurately reflects its
11334      * start-of-exposure time.</p>
11335      */
11336     ACAMERA_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED         = 1,
11337 
11338 } acamera_metadata_enum_android_logical_multi_camera_sensor_sync_type_t;
11339 
11340 
11341 // ACAMERA_DISTORTION_CORRECTION_MODE
11342 typedef enum acamera_metadata_enum_acamera_distortion_correction_mode {
11343     /**
11344      * <p>No distortion correction is applied.</p>
11345      */
11346     ACAMERA_DISTORTION_CORRECTION_MODE_OFF                           = 0,
11347 
11348     /**
11349      * <p>Lens distortion correction is applied without reducing frame rate
11350      * relative to sensor output. It may be the same as OFF if distortion correction would
11351      * reduce frame rate relative to sensor.</p>
11352      */
11353     ACAMERA_DISTORTION_CORRECTION_MODE_FAST                          = 1,
11354 
11355     /**
11356      * <p>High-quality distortion correction is applied, at the cost of
11357      * possibly reduced frame rate relative to sensor output.</p>
11358      */
11359     ACAMERA_DISTORTION_CORRECTION_MODE_HIGH_QUALITY                  = 2,
11360 
11361 } acamera_metadata_enum_android_distortion_correction_mode_t;
11362 
11363 
11364 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS
11365 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations {
11366     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_OUTPUT         = 0,
11367 
11368     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT          = 1,
11369 
11370 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_t;
11371 
11372 // ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
11373 typedef enum acamera_metadata_enum_acamera_heic_available_heic_stream_configurations_maximum_resolution {
11374     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
11375                                                                       = 0,
11376 
11377     ACAMERA_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
11378                                                                       = 1,
11379 
11380 } acamera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t;
11381 
11382 
11383 
11384 // ACAMERA_AUTOMOTIVE_LOCATION
11385 typedef enum acamera_metadata_enum_acamera_automotive_location {
11386     /**
11387      * <p>The camera device exists inside of the vehicle cabin.</p>
11388      */
11389     ACAMERA_AUTOMOTIVE_LOCATION_INTERIOR                             = 0,
11390 
11391     /**
11392      * <p>The camera exists outside of the vehicle body frame but not exactly on one of the
11393      * exterior locations this enum defines.  The applications should determine the exact
11394      * location from ACAMERA_LENS_POSE_TRANSLATION.</p>
11395      *
11396      * @see ACAMERA_LENS_POSE_TRANSLATION
11397      */
11398     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_OTHER                       = 1,
11399 
11400     /**
11401      * <p>The camera device exists outside of the vehicle body frame and on its front side.</p>
11402      */
11403     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_FRONT                       = 2,
11404 
11405     /**
11406      * <p>The camera device exists outside of the vehicle body frame and on its rear side.</p>
11407      */
11408     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_REAR                        = 3,
11409 
11410     /**
11411      * <p>The camera device exists outside and on left side of the vehicle body frame.</p>
11412      */
11413     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_LEFT                        = 4,
11414 
11415     /**
11416      * <p>The camera device exists outside and on right side of the vehicle body frame.</p>
11417      */
11418     ACAMERA_AUTOMOTIVE_LOCATION_EXTERIOR_RIGHT                       = 5,
11419 
11420     /**
11421      * <p>The camera device exists on an extra vehicle, such as the trailer, but not exactly
11422      * on one of front, rear, left, or right side.  Applications should determine the exact
11423      * location from ACAMERA_LENS_POSE_TRANSLATION.</p>
11424      *
11425      * @see ACAMERA_LENS_POSE_TRANSLATION
11426      */
11427     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_OTHER                          = 6,
11428 
11429     /**
11430      * <p>The camera device exists outside of the extra vehicle's body frame and on its front
11431      * side.</p>
11432      */
11433     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_FRONT                          = 7,
11434 
11435     /**
11436      * <p>The camera device exists outside of the extra vehicle's body frame and on its rear
11437      * side.</p>
11438      */
11439     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_REAR                           = 8,
11440 
11441     /**
11442      * <p>The camera device exists outside and on left side of the extra vehicle body.</p>
11443      */
11444     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_LEFT                           = 9,
11445 
11446     /**
11447      * <p>The camera device exists outside and on right side of the extra vehicle body.</p>
11448      */
11449     ACAMERA_AUTOMOTIVE_LOCATION_EXTRA_RIGHT                          = 10,
11450 
11451 } acamera_metadata_enum_android_automotive_location_t;
11452 
11453 
11454 // ACAMERA_AUTOMOTIVE_LENS_FACING
11455 typedef enum acamera_metadata_enum_acamera_automotive_lens_facing {
11456     /**
11457      * <p>The camera device faces the outside of the vehicle body frame but not exactly
11458      * one of the exterior sides defined by this enum.  Applications should determine
11459      * the exact facing direction from ACAMERA_LENS_POSE_ROTATION and
11460      * ACAMERA_LENS_POSE_TRANSLATION.</p>
11461      *
11462      * @see ACAMERA_LENS_POSE_ROTATION
11463      * @see ACAMERA_LENS_POSE_TRANSLATION
11464      */
11465     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_OTHER                    = 0,
11466 
11467     /**
11468      * <p>The camera device faces the front of the vehicle body frame.</p>
11469      */
11470     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_FRONT                    = 1,
11471 
11472     /**
11473      * <p>The camera device faces the rear of the vehicle body frame.</p>
11474      */
11475     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_REAR                     = 2,
11476 
11477     /**
11478      * <p>The camera device faces the left side of the vehicle body frame.</p>
11479      */
11480     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_LEFT                     = 3,
11481 
11482     /**
11483      * <p>The camera device faces the right side of the vehicle body frame.</p>
11484      */
11485     ACAMERA_AUTOMOTIVE_LENS_FACING_EXTERIOR_RIGHT                    = 4,
11486 
11487     /**
11488      * <p>The camera device faces the inside of the vehicle body frame but not exactly
11489      * one of seats described by this enum.  Applications should determine the exact
11490      * facing direction from ACAMERA_LENS_POSE_ROTATION and ACAMERA_LENS_POSE_TRANSLATION.</p>
11491      *
11492      * @see ACAMERA_LENS_POSE_ROTATION
11493      * @see ACAMERA_LENS_POSE_TRANSLATION
11494      */
11495     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_OTHER                    = 5,
11496 
11497     /**
11498      * <p>The camera device faces the left side seat of the first row.</p>
11499      */
11500     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_LEFT          = 6,
11501 
11502     /**
11503      * <p>The camera device faces the center seat of the first row.</p>
11504      */
11505     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_CENTER        = 7,
11506 
11507     /**
11508      * <p>The camera device faces the right seat of the first row.</p>
11509      */
11510     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_1_RIGHT         = 8,
11511 
11512     /**
11513      * <p>The camera device faces the left side seat of the second row.</p>
11514      */
11515     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_LEFT          = 9,
11516 
11517     /**
11518      * <p>The camera device faces the center seat of the second row.</p>
11519      */
11520     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_CENTER        = 10,
11521 
11522     /**
11523      * <p>The camera device faces the right side seat of the second row.</p>
11524      */
11525     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_2_RIGHT         = 11,
11526 
11527     /**
11528      * <p>The camera device faces the left side seat of the third row.</p>
11529      */
11530     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_LEFT          = 12,
11531 
11532     /**
11533      * <p>The camera device faces the center seat of the third row.</p>
11534      */
11535     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_CENTER        = 13,
11536 
11537     /**
11538      * <p>The camera device faces the right seat of the third row.</p>
11539      */
11540     ACAMERA_AUTOMOTIVE_LENS_FACING_INTERIOR_SEAT_ROW_3_RIGHT         = 14,
11541 
11542 } acamera_metadata_enum_android_automotive_lens_facing_t;
11543 
11544 
11545 
11546 // ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS
11547 typedef enum acamera_metadata_enum_acamera_jpegr_available_jpeg_r_stream_configurations {
11548     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_OUTPUT      = 0,
11549 
11550     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_INPUT       = 1,
11551 
11552 } acamera_metadata_enum_android_jpegr_available_jpeg_r_stream_configurations_t;
11553 
11554 // ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
11555 typedef enum acamera_metadata_enum_acamera_jpegr_available_jpeg_r_stream_configurations_maximum_resolution {
11556     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
11557                                                                       = 0,
11558 
11559     ACAMERA_JPEGR_AVAILABLE_JPEG_R_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
11560                                                                       = 1,
11561 
11562 } acamera_metadata_enum_android_jpegr_available_jpeg_r_stream_configurations_maximum_resolution_t;
11563 
11564 
11565 
11566 
11567 __END_DECLS
11568 
11569 #endif /* _NDK_CAMERA_METADATA_TAGS_H */
11570 
11571 /** @} */
11572