OSDN Git Service

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